From db92e7eff1c72c46fc60827ab58adffc14fd44dd Mon Sep 17 00:00:00 2001 From: agnynureza Date: Thu, 1 Mar 2018 11:52:38 +0700 Subject: [PATCH] feedback --- .gitignore | 1 + .vscode/settings.json | 3 + app.js | 21 + config/config.json | 23 + helper/help.js | 16 + .../20180301022239-create-restaurant.js | 30 + migrations/20180301022338-create-menu.js | 36 + migrations/20180301022812-addforeignkey.js | 24 + models/index.js | 36 + models/menu.js | 41 + models/restaurant.js | 13 + node_modules/.bin/atob | 1 + node_modules/.bin/css-beautify | 1 + node_modules/.bin/editorconfig | 1 + node_modules/.bin/html-beautify | 1 + node_modules/.bin/js-beautify | 1 + node_modules/.bin/mime | 1 + node_modules/.bin/mkdirp | 1 + node_modules/.bin/nodemon | 1 + node_modules/.bin/nodetouch | 1 + node_modules/.bin/nopt | 1 + node_modules/.bin/rc | 1 + node_modules/.bin/semver | 1 + node_modules/.bin/sequelize | 1 + node_modules/.bin/uuid | 1 + node_modules/.bin/which | 1 + node_modules/@types/geojson/LICENSE | 21 + node_modules/@types/geojson/README.md | 16 + node_modules/@types/geojson/index.d.ts | 123 + node_modules/@types/geojson/package.json | 54 + node_modules/@types/node/LICENSE | 21 + node_modules/@types/node/README.md | 16 + node_modules/@types/node/index.d.ts | 7168 + node_modules/@types/node/inspector.d.ts | 2488 + node_modules/@types/node/package.json | 122 + node_modules/abbrev/LICENSE | 46 + node_modules/abbrev/README.md | 23 + node_modules/abbrev/abbrev.js | 61 + node_modules/abbrev/package.json | 56 + node_modules/accepts/HISTORY.md | 218 + node_modules/accepts/LICENSE | 23 + node_modules/accepts/README.md | 143 + node_modules/accepts/index.js | 238 + node_modules/accepts/package.json | 88 + node_modules/ansi-align/CHANGELOG.md | 36 + node_modules/ansi-align/LICENSE | 13 + node_modules/ansi-align/README.md | 79 + node_modules/ansi-align/index.js | 61 + node_modules/ansi-align/package.json | 70 + node_modules/ansi-regex/index.js | 10 + node_modules/ansi-regex/license | 9 + node_modules/ansi-regex/package.json | 85 + node_modules/ansi-regex/readme.md | 46 + node_modules/ansi-styles/index.js | 152 + node_modules/ansi-styles/license | 9 + node_modules/ansi-styles/package.json | 86 + node_modules/ansi-styles/readme.md | 147 + node_modules/anymatch/LICENSE | 15 + node_modules/anymatch/README.md | 99 + node_modules/anymatch/index.js | 67 + node_modules/anymatch/package.json | 72 + node_modules/arr-diff/LICENSE | 21 + node_modules/arr-diff/README.md | 130 + node_modules/arr-diff/index.js | 47 + node_modules/arr-diff/package.json | 109 + node_modules/arr-flatten/LICENSE | 21 + node_modules/arr-flatten/README.md | 86 + node_modules/arr-flatten/index.js | 22 + node_modules/arr-flatten/package.json | 113 + node_modules/arr-union/LICENSE | 21 + node_modules/arr-union/README.md | 99 + node_modules/arr-union/index.js | 29 + node_modules/arr-union/package.json | 108 + node_modules/array-flatten/LICENSE | 21 + node_modules/array-flatten/README.md | 43 + node_modules/array-flatten/array-flatten.js | 64 + node_modules/array-flatten/package.json | 67 + node_modules/array-unique/LICENSE | 21 + node_modules/array-unique/README.md | 77 + node_modules/array-unique/index.js | 43 + node_modules/array-unique/package.json | 96 + node_modules/assign-symbols/LICENSE | 21 + node_modules/assign-symbols/README.md | 73 + node_modules/assign-symbols/index.js | 40 + node_modules/assign-symbols/package.json | 71 + node_modules/async-each/.npmignore | 3 + node_modules/async-each/CHANGELOG.md | 23 + node_modules/async-each/README.md | 38 + node_modules/async-each/index.js | 38 + node_modules/async-each/package.json | 60 + node_modules/atob/LICENSE | 230 + node_modules/atob/LICENSE.DOCS | 319 + node_modules/atob/README.md | 43 + node_modules/atob/bin/atob.js | 6 + node_modules/atob/bower.json | 25 + node_modules/atob/browser-atob.js | 36 + node_modules/atob/node-atob.js | 7 + node_modules/atob/package.json | 53 + node_modules/atob/test.js | 20 + node_modules/babel-runtime/.npmignore | 2 + node_modules/babel-runtime/README.md | 2 + node_modules/babel-runtime/core-js.js | 4 + .../babel-runtime/core-js/array/concat.js | 1 + .../core-js/array/copy-within.js | 1 + .../babel-runtime/core-js/array/entries.js | 1 + .../babel-runtime/core-js/array/every.js | 1 + .../babel-runtime/core-js/array/fill.js | 1 + .../babel-runtime/core-js/array/filter.js | 1 + .../babel-runtime/core-js/array/find-index.js | 1 + .../babel-runtime/core-js/array/find.js | 1 + .../babel-runtime/core-js/array/for-each.js | 1 + .../babel-runtime/core-js/array/from.js | 1 + .../babel-runtime/core-js/array/includes.js | 1 + .../babel-runtime/core-js/array/index-of.js | 1 + .../babel-runtime/core-js/array/join.js | 1 + .../babel-runtime/core-js/array/keys.js | 1 + .../core-js/array/last-index-of.js | 1 + .../babel-runtime/core-js/array/map.js | 1 + .../babel-runtime/core-js/array/of.js | 1 + .../babel-runtime/core-js/array/pop.js | 1 + .../babel-runtime/core-js/array/push.js | 1 + .../core-js/array/reduce-right.js | 1 + .../babel-runtime/core-js/array/reduce.js | 1 + .../babel-runtime/core-js/array/reverse.js | 1 + .../babel-runtime/core-js/array/shift.js | 1 + .../babel-runtime/core-js/array/slice.js | 1 + .../babel-runtime/core-js/array/some.js | 1 + .../babel-runtime/core-js/array/sort.js | 1 + .../babel-runtime/core-js/array/splice.js | 1 + .../babel-runtime/core-js/array/unshift.js | 1 + .../babel-runtime/core-js/array/values.js | 1 + node_modules/babel-runtime/core-js/asap.js | 1 + .../babel-runtime/core-js/clear-immediate.js | 1 + .../babel-runtime/core-js/error/is-error.js | 1 + .../babel-runtime/core-js/get-iterator.js | 1 + .../babel-runtime/core-js/is-iterable.js | 1 + .../babel-runtime/core-js/json/stringify.js | 1 + node_modules/babel-runtime/core-js/map.js | 1 + .../babel-runtime/core-js/math/acosh.js | 1 + .../babel-runtime/core-js/math/asinh.js | 1 + .../babel-runtime/core-js/math/atanh.js | 1 + .../babel-runtime/core-js/math/cbrt.js | 1 + .../babel-runtime/core-js/math/clz32.js | 1 + .../babel-runtime/core-js/math/cosh.js | 1 + .../babel-runtime/core-js/math/expm1.js | 1 + .../babel-runtime/core-js/math/fround.js | 1 + .../babel-runtime/core-js/math/hypot.js | 1 + .../babel-runtime/core-js/math/iaddh.js | 1 + .../babel-runtime/core-js/math/imul.js | 1 + .../babel-runtime/core-js/math/imulh.js | 1 + .../babel-runtime/core-js/math/isubh.js | 1 + .../babel-runtime/core-js/math/log10.js | 1 + .../babel-runtime/core-js/math/log1p.js | 1 + .../babel-runtime/core-js/math/log2.js | 1 + .../babel-runtime/core-js/math/sign.js | 1 + .../babel-runtime/core-js/math/sinh.js | 1 + .../babel-runtime/core-js/math/tanh.js | 1 + .../babel-runtime/core-js/math/trunc.js | 1 + .../babel-runtime/core-js/math/umulh.js | 1 + .../babel-runtime/core-js/number/epsilon.js | 1 + .../babel-runtime/core-js/number/is-finite.js | 1 + .../core-js/number/is-integer.js | 1 + .../babel-runtime/core-js/number/is-nan.js | 1 + .../core-js/number/is-safe-integer.js | 1 + .../core-js/number/max-safe-integer.js | 1 + .../core-js/number/min-safe-integer.js | 1 + .../core-js/number/parse-float.js | 1 + .../babel-runtime/core-js/number/parse-int.js | 1 + .../babel-runtime/core-js/object/assign.js | 1 + .../babel-runtime/core-js/object/create.js | 1 + .../core-js/object/define-properties.js | 1 + .../core-js/object/define-property.js | 1 + .../babel-runtime/core-js/object/entries.js | 1 + .../babel-runtime/core-js/object/freeze.js | 1 + .../object/get-own-property-descriptor.js | 1 + .../object/get-own-property-descriptors.js | 1 + .../core-js/object/get-own-property-names.js | 1 + .../object/get-own-property-symbols.js | 1 + .../core-js/object/get-prototype-of.js | 1 + .../core-js/object/is-extensible.js | 1 + .../babel-runtime/core-js/object/is-frozen.js | 1 + .../babel-runtime/core-js/object/is-sealed.js | 1 + .../babel-runtime/core-js/object/is.js | 1 + .../babel-runtime/core-js/object/keys.js | 1 + .../core-js/object/prevent-extensions.js | 1 + .../babel-runtime/core-js/object/seal.js | 1 + .../core-js/object/set-prototype-of.js | 1 + .../babel-runtime/core-js/object/values.js | 1 + .../babel-runtime/core-js/observable.js | 1 + node_modules/babel-runtime/core-js/promise.js | 1 + .../babel-runtime/core-js/reflect/apply.js | 1 + .../core-js/reflect/construct.js | 1 + .../core-js/reflect/define-metadata.js | 1 + .../core-js/reflect/define-property.js | 1 + .../core-js/reflect/delete-metadata.js | 1 + .../core-js/reflect/delete-property.js | 1 + .../core-js/reflect/enumerate.js | 1 + .../core-js/reflect/get-metadata-keys.js | 1 + .../core-js/reflect/get-metadata.js | 1 + .../core-js/reflect/get-own-metadata-keys.js | 1 + .../core-js/reflect/get-own-metadata.js | 1 + .../reflect/get-own-property-descriptor.js | 1 + .../core-js/reflect/get-prototype-of.js | 1 + .../babel-runtime/core-js/reflect/get.js | 1 + .../core-js/reflect/has-metadata.js | 1 + .../core-js/reflect/has-own-metadata.js | 1 + .../babel-runtime/core-js/reflect/has.js | 1 + .../core-js/reflect/is-extensible.js | 1 + .../babel-runtime/core-js/reflect/metadata.js | 1 + .../babel-runtime/core-js/reflect/own-keys.js | 1 + .../core-js/reflect/prevent-extensions.js | 1 + .../core-js/reflect/set-prototype-of.js | 1 + .../babel-runtime/core-js/reflect/set.js | 1 + .../babel-runtime/core-js/regexp/escape.js | 1 + .../babel-runtime/core-js/set-immediate.js | 1 + node_modules/babel-runtime/core-js/set.js | 1 + .../babel-runtime/core-js/string/at.js | 1 + .../core-js/string/code-point-at.js | 1 + .../babel-runtime/core-js/string/ends-with.js | 1 + .../core-js/string/from-code-point.js | 1 + .../babel-runtime/core-js/string/includes.js | 1 + .../babel-runtime/core-js/string/match-all.js | 1 + .../babel-runtime/core-js/string/pad-end.js | 1 + .../babel-runtime/core-js/string/pad-left.js | 1 + .../babel-runtime/core-js/string/pad-right.js | 1 + .../babel-runtime/core-js/string/pad-start.js | 1 + .../babel-runtime/core-js/string/raw.js | 1 + .../babel-runtime/core-js/string/repeat.js | 1 + .../core-js/string/starts-with.js | 1 + .../babel-runtime/core-js/string/trim-end.js | 1 + .../babel-runtime/core-js/string/trim-left.js | 1 + .../core-js/string/trim-right.js | 1 + .../core-js/string/trim-start.js | 1 + .../babel-runtime/core-js/string/trim.js | 1 + node_modules/babel-runtime/core-js/symbol.js | 1 + .../core-js/symbol/async-iterator.js | 1 + .../babel-runtime/core-js/symbol/for.js | 1 + .../core-js/symbol/has-instance.js | 1 + .../core-js/symbol/is-concat-spreadable.js | 1 + .../babel-runtime/core-js/symbol/iterator.js | 1 + .../babel-runtime/core-js/symbol/key-for.js | 1 + .../babel-runtime/core-js/symbol/match.js | 1 + .../core-js/symbol/observable.js | 1 + .../babel-runtime/core-js/symbol/replace.js | 1 + .../babel-runtime/core-js/symbol/search.js | 1 + .../babel-runtime/core-js/symbol/species.js | 1 + .../babel-runtime/core-js/symbol/split.js | 1 + .../core-js/symbol/to-primitive.js | 1 + .../core-js/symbol/to-string-tag.js | 1 + .../core-js/symbol/unscopables.js | 1 + .../babel-runtime/core-js/system/global.js | 1 + .../babel-runtime/core-js/weak-map.js | 1 + .../babel-runtime/core-js/weak-set.js | 1 + .../helpers/_async-generator-delegate.js | 1 + .../babel-runtime/helpers/_async-generator.js | 1 + .../babel-runtime/helpers/_async-iterator.js | 1 + .../helpers/_async-to-generator.js | 1 + .../helpers/_class-call-check.js | 1 + .../babel-runtime/helpers/_create-class.js | 1 + .../babel-runtime/helpers/_defaults.js | 1 + .../helpers/_define-enumerable-properties.js | 1 + .../babel-runtime/helpers/_define-property.js | 1 + .../babel-runtime/helpers/_extends.js | 1 + node_modules/babel-runtime/helpers/_get.js | 1 + .../babel-runtime/helpers/_inherits.js | 1 + .../babel-runtime/helpers/_instanceof.js | 1 + .../helpers/_interop-require-default.js | 1 + .../helpers/_interop-require-wildcard.js | 1 + node_modules/babel-runtime/helpers/_jsx.js | 1 + .../babel-runtime/helpers/_new-arrow-check.js | 1 + .../helpers/_object-destructuring-empty.js | 1 + .../helpers/_object-without-properties.js | 1 + .../helpers/_possible-constructor-return.js | 1 + .../babel-runtime/helpers/_self-global.js | 1 + node_modules/babel-runtime/helpers/_set.js | 1 + .../helpers/_sliced-to-array-loose.js | 1 + .../babel-runtime/helpers/_sliced-to-array.js | 1 + .../helpers/_tagged-template-literal-loose.js | 1 + .../helpers/_tagged-template-literal.js | 1 + .../babel-runtime/helpers/_temporal-ref.js | 1 + .../helpers/_temporal-undefined.js | 1 + .../babel-runtime/helpers/_to-array.js | 1 + .../helpers/_to-consumable-array.js | 1 + node_modules/babel-runtime/helpers/_typeof.js | 1 + .../helpers/async-generator-delegate.js | 1 + .../babel-runtime/helpers/async-generator.js | 1 + .../babel-runtime/helpers/async-iterator.js | 1 + .../helpers/async-to-generator.js | 1 + .../babel-runtime/helpers/asyncGenerator.js | 126 + .../helpers/asyncGeneratorDelegate.js | 69 + .../babel-runtime/helpers/asyncIterator.js | 32 + .../babel-runtime/helpers/asyncToGenerator.js | 38 + .../babel-runtime/helpers/class-call-check.js | 1 + .../babel-runtime/helpers/classCallCheck.js | 9 + .../babel-runtime/helpers/create-class.js | 1 + .../babel-runtime/helpers/createClass.js | 27 + .../babel-runtime/helpers/defaults.js | 32 + .../helpers/define-enumerable-properties.js | 1 + .../babel-runtime/helpers/define-property.js | 1 + .../helpers/defineEnumerableProperties.js | 20 + .../babel-runtime/helpers/defineProperty.js | 24 + node_modules/babel-runtime/helpers/extends.js | 23 + node_modules/babel-runtime/helpers/get.js | 38 + .../babel-runtime/helpers/inherits.js | 33 + .../babel-runtime/helpers/instanceof.js | 21 + .../helpers/interop-require-default.js | 1 + .../helpers/interop-require-wildcard.js | 1 + .../helpers/interopRequireDefault.js | 9 + .../helpers/interopRequireWildcard.js | 20 + node_modules/babel-runtime/helpers/jsx.js | 56 + .../babel-runtime/helpers/new-arrow-check.js | 1 + .../babel-runtime/helpers/newArrowCheck.js | 9 + .../helpers/object-destructuring-empty.js | 1 + .../helpers/object-without-properties.js | 1 + .../helpers/objectDestructuringEmpty.js | 7 + .../helpers/objectWithoutProperties.js | 15 + .../helpers/possible-constructor-return.js | 1 + .../helpers/possibleConstructorReturn.js | 17 + .../babel-runtime/helpers/self-global.js | 1 + .../babel-runtime/helpers/selfGlobal.js | 4 + node_modules/babel-runtime/helpers/set.js | 35 + .../helpers/sliced-to-array-loose.js | 1 + .../babel-runtime/helpers/sliced-to-array.js | 1 + .../babel-runtime/helpers/slicedToArray.js | 51 + .../helpers/slicedToArrayLoose.js | 31 + .../helpers/tagged-template-literal-loose.js | 1 + .../helpers/tagged-template-literal.js | 1 + .../helpers/taggedTemplateLiteral.js | 21 + .../helpers/taggedTemplateLiteralLoose.js | 8 + .../babel-runtime/helpers/temporal-ref.js | 1 + .../helpers/temporal-undefined.js | 1 + .../babel-runtime/helpers/temporalRef.js | 11 + .../helpers/temporalUndefined.js | 4 + .../babel-runtime/helpers/to-array.js | 1 + .../helpers/to-consumable-array.js | 1 + node_modules/babel-runtime/helpers/toArray.js | 13 + .../helpers/toConsumableArray.js | 21 + node_modules/babel-runtime/helpers/typeof.js | 21 + node_modules/babel-runtime/package-lock.json | 232 + node_modules/babel-runtime/package.json | 47 + .../babel-runtime/regenerator/index.js | 1 + node_modules/balanced-match/.npmignore | 5 + node_modules/balanced-match/LICENSE.md | 21 + node_modules/balanced-match/README.md | 91 + node_modules/balanced-match/index.js | 59 + node_modules/balanced-match/package.json | 77 + node_modules/base/LICENSE | 21 + node_modules/base/README.md | 491 + node_modules/base/index.js | 435 + .../base/node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 95 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 93 + node_modules/base/package.json | 164 + .../binary-extensions/binary-extensions.json | 246 + node_modules/binary-extensions/license | 9 + node_modules/binary-extensions/package.json | 68 + node_modules/binary-extensions/readme.md | 33 + node_modules/bluebird/LICENSE | 21 + node_modules/bluebird/README.md | 52 + node_modules/bluebird/changelog.md | 1 + .../bluebird/js/browser/bluebird.core.js | 3781 + .../bluebird/js/browser/bluebird.core.min.js | 31 + node_modules/bluebird/js/browser/bluebird.js | 5623 + .../bluebird/js/browser/bluebird.min.js | 31 + node_modules/bluebird/js/release/any.js | 21 + node_modules/bluebird/js/release/assert.js | 55 + node_modules/bluebird/js/release/async.js | 161 + node_modules/bluebird/js/release/bind.js | 67 + node_modules/bluebird/js/release/bluebird.js | 11 + node_modules/bluebird/js/release/call_get.js | 123 + node_modules/bluebird/js/release/cancel.js | 129 + .../bluebird/js/release/catch_filter.js | 42 + node_modules/bluebird/js/release/context.js | 69 + .../bluebird/js/release/debuggability.js | 919 + .../bluebird/js/release/direct_resolve.js | 46 + node_modules/bluebird/js/release/each.js | 30 + node_modules/bluebird/js/release/errors.js | 116 + node_modules/bluebird/js/release/es5.js | 80 + node_modules/bluebird/js/release/filter.js | 12 + node_modules/bluebird/js/release/finally.js | 146 + .../bluebird/js/release/generators.js | 223 + node_modules/bluebird/js/release/join.js | 168 + node_modules/bluebird/js/release/map.js | 168 + node_modules/bluebird/js/release/method.js | 55 + node_modules/bluebird/js/release/nodeback.js | 51 + node_modules/bluebird/js/release/nodeify.js | 58 + node_modules/bluebird/js/release/promise.js | 775 + .../bluebird/js/release/promise_array.js | 185 + node_modules/bluebird/js/release/promisify.js | 314 + node_modules/bluebird/js/release/props.js | 118 + node_modules/bluebird/js/release/queue.js | 73 + node_modules/bluebird/js/release/race.js | 49 + node_modules/bluebird/js/release/reduce.js | 172 + node_modules/bluebird/js/release/schedule.js | 61 + node_modules/bluebird/js/release/settle.js | 43 + node_modules/bluebird/js/release/some.js | 148 + .../js/release/synchronous_inspection.js | 103 + node_modules/bluebird/js/release/thenables.js | 86 + node_modules/bluebird/js/release/timers.js | 93 + node_modules/bluebird/js/release/using.js | 226 + node_modules/bluebird/js/release/util.js | 380 + node_modules/bluebird/package.json | 105 + node_modules/body-parser/HISTORY.md | 568 + node_modules/body-parser/LICENSE | 23 + node_modules/body-parser/README.md | 438 + node_modules/body-parser/index.js | 157 + node_modules/body-parser/lib/read.js | 181 + node_modules/body-parser/lib/types/json.js | 232 + node_modules/body-parser/lib/types/raw.js | 101 + node_modules/body-parser/lib/types/text.js | 121 + .../body-parser/lib/types/urlencoded.js | 284 + node_modules/body-parser/package.json | 95 + node_modules/boxen/index.js | 138 + node_modules/boxen/license | 9 + node_modules/boxen/package.json | 79 + node_modules/boxen/readme.md | 175 + node_modules/brace-expansion/LICENSE | 21 + node_modules/brace-expansion/README.md | 129 + node_modules/brace-expansion/index.js | 201 + node_modules/brace-expansion/package.json | 75 + node_modules/braces/LICENSE | 21 + node_modules/braces/README.md | 640 + node_modules/braces/index.js | 315 + node_modules/braces/lib/.DS_Store | Bin 0 -> 6148 bytes node_modules/braces/lib/braces.js | 106 + node_modules/braces/lib/compilers.js | 282 + node_modules/braces/lib/parsers-new.js | 439 + node_modules/braces/lib/parsers-orig.js | 360 + node_modules/braces/lib/parsers-parens.js | 493 + node_modules/braces/lib/parsers.js | 360 + node_modules/braces/lib/utils.js | 335 + .../node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 95 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 93 + .../node_modules/extend-shallow/LICENSE | 21 + .../node_modules/extend-shallow/README.md | 61 + .../node_modules/extend-shallow/index.js | 33 + .../node_modules/extend-shallow/package.json | 87 + node_modules/braces/package.json | 160 + node_modules/buffer-writer/.npmignore | 2 + node_modules/buffer-writer/.travis.yml | 4 + node_modules/buffer-writer/LICENSE | 19 + node_modules/buffer-writer/README.md | 48 + node_modules/buffer-writer/benchmark/index.js | 86 + .../benchmark/int-16-benchmark.js | 31 + .../benchmark/int-32-benchmark.js | 17 + .../buffer-writer/benchmark/join-benchmark.js | 16 + .../benchmark/resize-benchmark.js | 23 + .../benchmark/small-benchmark.js | 14 + node_modules/buffer-writer/index.js | 129 + node_modules/buffer-writer/package.json | 64 + node_modules/buffer-writer/test/mocha.opts | 1 + .../buffer-writer/test/writer-tests.js | 218 + .../builtin-modules/builtin-modules.json | 35 + node_modules/builtin-modules/index.js | 10 + node_modules/builtin-modules/license | 21 + node_modules/builtin-modules/package.json | 72 + node_modules/builtin-modules/readme.md | 41 + node_modules/builtin-modules/static.js | 2 + node_modules/bytes/History.md | 82 + node_modules/bytes/LICENSE | 23 + node_modules/bytes/Readme.md | 125 + node_modules/bytes/index.js | 159 + node_modules/bytes/package.json | 85 + node_modules/cache-base/LICENSE | 21 + node_modules/cache-base/README.md | 291 + node_modules/cache-base/index.js | 261 + node_modules/cache-base/package.json | 118 + node_modules/camelcase/index.js | 64 + node_modules/camelcase/license | 21 + node_modules/camelcase/package.json | 74 + node_modules/camelcase/readme.md | 57 + node_modules/capture-stack-trace/index.js | 18 + node_modules/capture-stack-trace/package.json | 61 + node_modules/capture-stack-trace/readme.md | 36 + node_modules/chalk/index.js | 228 + node_modules/chalk/license | 9 + node_modules/chalk/package.json | 99 + node_modules/chalk/readme.md | 309 + node_modules/chalk/templates.js | 128 + node_modules/chalk/types/index.d.ts | 97 + node_modules/chokidar/CHANGELOG.md | 290 + node_modules/chokidar/README.md | 293 + node_modules/chokidar/index.js | 738 + node_modules/chokidar/lib/fsevents-handler.js | 399 + node_modules/chokidar/lib/nodefs-handler.js | 481 + node_modules/chokidar/package.json | 88 + node_modules/class-utils/LICENSE | 21 + node_modules/class-utils/README.md | 300 + node_modules/class-utils/index.js | 370 + .../node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 77 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 82 + .../is-accessor-descriptor/LICENSE | 21 + .../is-accessor-descriptor/README.md | 123 + .../is-accessor-descriptor/index.js | 69 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-accessor-descriptor/package.json | 94 + .../node_modules/is-data-descriptor/LICENSE | 21 + .../node_modules/is-data-descriptor/README.md | 128 + .../node_modules/is-data-descriptor/index.js | 55 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-data-descriptor/package.json | 93 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 193 + .../node_modules/is-descriptor/index.js | 22 + .../node_modules/is-descriptor/package.json | 114 + .../class-utils/node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 342 + .../class-utils/node_modules/kind-of/index.js | 147 + .../node_modules/kind-of/package.json | 146 + node_modules/class-utils/package.json | 131 + node_modules/cli-boxes/boxes.json | 50 + node_modules/cli-boxes/index.js | 2 + node_modules/cli-boxes/license | 21 + node_modules/cli-boxes/package.json | 71 + node_modules/cli-boxes/readme.md | 94 + node_modules/cli-color/.lint | 13 + node_modules/cli-color/.npmignore | 4 + node_modules/cli-color/.travis.yml | 16 + node_modules/cli-color/CHANGES | 105 + node_modules/cli-color/LICENSE | 21 + node_modules/cli-color/README.md | 691 + node_modules/cli-color/art.js | 13 + node_modules/cli-color/bare.js | 71 + node_modules/cli-color/beep.js | 3 + .../cli-color/bin/generate-color-images | 18 + node_modules/cli-color/columns.js | 30 + node_modules/cli-color/erase.js | 10 + node_modules/cli-color/examples/art.js | 8 + node_modules/cli-color/examples/basic.js | 25 + node_modules/cli-color/examples/erase.js | 25 + node_modules/cli-color/examples/styles.js | 10 + node_modules/cli-color/examples/throbber.js | 15 + node_modules/cli-color/examples/xterm.js | 6 + node_modules/cli-color/get-stripped-length.js | 10 + node_modules/cli-color/index.js | 17 + node_modules/cli-color/lib/sgr.js | 107 + node_modules/cli-color/lib/xterm-colors.js | 53 + node_modules/cli-color/lib/xterm-match.js | 40 + node_modules/cli-color/move.js | 36 + .../node_modules/ansi-regex/index.js | 4 + .../cli-color/node_modules/ansi-regex/license | 21 + .../node_modules/ansi-regex/package.json | 108 + .../node_modules/ansi-regex/readme.md | 39 + node_modules/cli-color/package.json | 73 + node_modules/cli-color/reset.js | 3 + node_modules/cli-color/slice.js | 140 + node_modules/cli-color/strip.js | 8 + .../test/__playground/throbber.formatted.js | 12 + .../cli-color/test/__playground/throbber.js | 11 + node_modules/cli-color/test/art.js | 28 + node_modules/cli-color/test/bare.js | 284 + node_modules/cli-color/test/beep.js | 3 + node_modules/cli-color/test/columns.js | 32 + node_modules/cli-color/test/erase.js | 6 + .../cli-color/test/get-stripped-length.js | 16 + node_modules/cli-color/test/index.js | 16 + node_modules/cli-color/test/lib/sgr.js | 14 + .../cli-color/test/lib/xterm-colors.js | 10 + .../cli-color/test/lib/xterm-match.js | 9 + node_modules/cli-color/test/move.js | 37 + node_modules/cli-color/test/reset.js | 5 + node_modules/cli-color/test/slice.js | 92 + node_modules/cli-color/test/strip.js | 98 + node_modules/cli-color/test/throbber.js | 45 + node_modules/cli-color/test/visual.js | 124 + node_modules/cli-color/test/window-size.js | 8 + node_modules/cli-color/throbber.js | 50 + node_modules/cli-color/window-size.js | 8 + node_modules/cliui/CHANGELOG.md | 15 + node_modules/cliui/LICENSE.txt | 14 + node_modules/cliui/README.md | 110 + node_modules/cliui/index.js | 316 + .../cliui/node_modules/ansi-regex/index.js | 4 + .../cliui/node_modules/ansi-regex/license | 21 + .../node_modules/ansi-regex/package.json | 108 + .../cliui/node_modules/ansi-regex/readme.md | 39 + .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 77 + .../is-fullwidth-code-point/readme.md | 39 + .../cliui/node_modules/string-width/index.js | 37 + .../cliui/node_modules/string-width/license | 21 + .../node_modules/string-width/package.json | 88 + .../cliui/node_modules/string-width/readme.md | 42 + .../cliui/node_modules/strip-ansi/index.js | 6 + .../cliui/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 102 + .../cliui/node_modules/strip-ansi/readme.md | 33 + node_modules/cliui/package.json | 99 + node_modules/cls-bluebird/README.md | 142 + node_modules/cls-bluebird/changelog.md | 48 + node_modules/cls-bluebird/lib/index.js | 265 + node_modules/cls-bluebird/lib/shimCall.js | 50 + .../cls-bluebird/lib/shimCoroutine.js | 85 + node_modules/cls-bluebird/lib/shimMethod.js | 41 + node_modules/cls-bluebird/lib/shimOnCancel.js | 44 + node_modules/cls-bluebird/lib/shimUsing.js | 114 + node_modules/cls-bluebird/package.json | 90 + node_modules/code-point-at/index.js | 32 + node_modules/code-point-at/license | 21 + node_modules/code-point-at/package.json | 71 + node_modules/code-point-at/readme.md | 32 + node_modules/collection-visit/LICENSE | 21 + node_modules/collection-visit/README.md | 89 + node_modules/collection-visit/index.js | 30 + node_modules/collection-visit/package.json | 115 + node_modules/color-convert/CHANGELOG.md | 54 + node_modules/color-convert/LICENSE | 21 + node_modules/color-convert/README.md | 68 + node_modules/color-convert/conversions.js | 861 + node_modules/color-convert/index.js | 78 + node_modules/color-convert/package.json | 81 + node_modules/color-convert/route.js | 97 + node_modules/color-name/.eslintrc.json | 43 + node_modules/color-name/.npmignore | 107 + node_modules/color-name/LICENSE | 8 + node_modules/color-name/README.md | 11 + node_modules/color-name/index.js | 152 + node_modules/color-name/package.json | 53 + node_modules/color-name/test.js | 7 + node_modules/commander/CHANGELOG.md | 350 + node_modules/commander/LICENSE | 22 + node_modules/commander/Readme.md | 408 + node_modules/commander/index.js | 1157 + node_modules/commander/package.json | 69 + node_modules/commander/typings/index.d.ts | 309 + node_modules/component-emitter/History.md | 68 + node_modules/component-emitter/LICENSE | 24 + node_modules/component-emitter/Readme.md | 74 + node_modules/component-emitter/index.js | 163 + node_modules/component-emitter/package.json | 57 + node_modules/concat-map/.travis.yml | 4 + node_modules/concat-map/LICENSE | 18 + node_modules/concat-map/README.markdown | 62 + node_modules/concat-map/example/map.js | 6 + node_modules/concat-map/index.js | 13 + node_modules/concat-map/package.json | 88 + node_modules/concat-map/test/map.js | 39 + node_modules/config-chain/.npmignore | 3 + node_modules/config-chain/LICENCE | 22 + node_modules/config-chain/index.js | 282 + node_modules/config-chain/package.json | 59 + node_modules/config-chain/readme.markdown | 237 + node_modules/config-chain/test/broken.js | 10 + node_modules/config-chain/test/broken.json | 21 + node_modules/config-chain/test/chain-class.js | 100 + node_modules/config-chain/test/env.js | 10 + node_modules/config-chain/test/find-file.js | 13 + node_modules/config-chain/test/get.js | 15 + .../config-chain/test/ignore-unfound-file.js | 5 + node_modules/config-chain/test/ini.js | 18 + node_modules/config-chain/test/save.js | 59 + node_modules/configstore/index.js | 98 + node_modules/configstore/package.json | 79 + node_modules/configstore/readme.md | 116 + node_modules/content-disposition/HISTORY.md | 50 + node_modules/content-disposition/LICENSE | 22 + node_modules/content-disposition/README.md | 141 + node_modules/content-disposition/index.js | 445 + node_modules/content-disposition/package.json | 77 + node_modules/content-type/HISTORY.md | 24 + node_modules/content-type/LICENSE | 22 + node_modules/content-type/README.md | 92 + node_modules/content-type/index.js | 222 + node_modules/content-type/package.json | 79 + node_modules/cookie-signature/.npmignore | 4 + node_modules/cookie-signature/History.md | 38 + node_modules/cookie-signature/Readme.md | 42 + node_modules/cookie-signature/index.js | 51 + node_modules/cookie-signature/package.json | 60 + node_modules/cookie/HISTORY.md | 118 + node_modules/cookie/LICENSE | 24 + node_modules/cookie/README.md | 220 + node_modules/cookie/index.js | 195 + node_modules/cookie/package.json | 74 + node_modules/copy-descriptor/LICENSE | 21 + node_modules/copy-descriptor/index.js | 81 + node_modules/copy-descriptor/package.json | 87 + node_modules/core-js/CHANGELOG.md | 649 + node_modules/core-js/Gruntfile.js | 3 + node_modules/core-js/LICENSE | 19 + node_modules/core-js/README.md | 2289 + node_modules/core-js/bower.json | 49 + node_modules/core-js/build/Gruntfile.ls | 86 + node_modules/core-js/build/build.ls | 62 + node_modules/core-js/build/config.js | 274 + node_modules/core-js/build/index.js | 104 + node_modules/core-js/client/core.js | 8624 + node_modules/core-js/client/core.min.js | 10 + node_modules/core-js/client/core.min.js.map | 1 + node_modules/core-js/client/library.js | 8107 + node_modules/core-js/client/library.min.js | 10 + .../core-js/client/library.min.js.map | 1 + node_modules/core-js/client/shim.js | 8192 + node_modules/core-js/client/shim.min.js | 10 + node_modules/core-js/client/shim.min.js.map | 1 + node_modules/core-js/core/_.js | 2 + node_modules/core-js/core/delay.js | 2 + node_modules/core-js/core/dict.js | 2 + node_modules/core-js/core/function.js | 2 + node_modules/core-js/core/index.js | 15 + node_modules/core-js/core/number.js | 2 + node_modules/core-js/core/object.js | 5 + node_modules/core-js/core/regexp.js | 2 + node_modules/core-js/core/string.js | 3 + node_modules/core-js/es5/index.js | 37 + node_modules/core-js/es6/array.js | 23 + node_modules/core-js/es6/date.js | 6 + node_modules/core-js/es6/function.js | 4 + node_modules/core-js/es6/index.js | 138 + node_modules/core-js/es6/map.js | 5 + node_modules/core-js/es6/math.js | 18 + node_modules/core-js/es6/number.js | 13 + node_modules/core-js/es6/object.js | 20 + node_modules/core-js/es6/parse-float.js | 2 + node_modules/core-js/es6/parse-int.js | 2 + node_modules/core-js/es6/promise.js | 5 + node_modules/core-js/es6/reflect.js | 15 + node_modules/core-js/es6/regexp.js | 8 + node_modules/core-js/es6/set.js | 5 + node_modules/core-js/es6/string.js | 27 + node_modules/core-js/es6/symbol.js | 3 + node_modules/core-js/es6/typed.js | 13 + node_modules/core-js/es6/weak-map.js | 4 + node_modules/core-js/es6/weak-set.js | 4 + node_modules/core-js/es7/array.js | 4 + node_modules/core-js/es7/asap.js | 2 + node_modules/core-js/es7/error.js | 2 + node_modules/core-js/es7/global.js | 2 + node_modules/core-js/es7/index.js | 56 + node_modules/core-js/es7/map.js | 4 + node_modules/core-js/es7/math.js | 13 + node_modules/core-js/es7/object.js | 8 + node_modules/core-js/es7/observable.js | 7 + node_modules/core-js/es7/promise.js | 3 + node_modules/core-js/es7/reflect.js | 10 + node_modules/core-js/es7/set.js | 4 + node_modules/core-js/es7/string.js | 7 + node_modules/core-js/es7/symbol.js | 3 + node_modules/core-js/es7/system.js | 2 + node_modules/core-js/es7/weak-map.js | 3 + node_modules/core-js/es7/weak-set.js | 3 + node_modules/core-js/fn/_.js | 2 + node_modules/core-js/fn/array/concat.js | 4 + node_modules/core-js/fn/array/copy-within.js | 2 + node_modules/core-js/fn/array/entries.js | 2 + node_modules/core-js/fn/array/every.js | 2 + node_modules/core-js/fn/array/fill.js | 2 + node_modules/core-js/fn/array/filter.js | 2 + node_modules/core-js/fn/array/find-index.js | 2 + node_modules/core-js/fn/array/find.js | 2 + node_modules/core-js/fn/array/flat-map.js | 2 + node_modules/core-js/fn/array/flatten.js | 2 + node_modules/core-js/fn/array/for-each.js | 2 + node_modules/core-js/fn/array/from.js | 3 + node_modules/core-js/fn/array/includes.js | 2 + node_modules/core-js/fn/array/index-of.js | 2 + node_modules/core-js/fn/array/index.js | 26 + node_modules/core-js/fn/array/is-array.js | 2 + node_modules/core-js/fn/array/iterator.js | 2 + node_modules/core-js/fn/array/join.js | 2 + node_modules/core-js/fn/array/keys.js | 2 + .../core-js/fn/array/last-index-of.js | 2 + node_modules/core-js/fn/array/map.js | 2 + node_modules/core-js/fn/array/of.js | 2 + node_modules/core-js/fn/array/pop.js | 4 + node_modules/core-js/fn/array/push.js | 4 + node_modules/core-js/fn/array/reduce-right.js | 2 + node_modules/core-js/fn/array/reduce.js | 2 + node_modules/core-js/fn/array/reverse.js | 4 + node_modules/core-js/fn/array/shift.js | 4 + node_modules/core-js/fn/array/slice.js | 2 + node_modules/core-js/fn/array/some.js | 2 + node_modules/core-js/fn/array/sort.js | 2 + node_modules/core-js/fn/array/splice.js | 4 + node_modules/core-js/fn/array/unshift.js | 4 + node_modules/core-js/fn/array/values.js | 2 + .../core-js/fn/array/virtual/copy-within.js | 2 + .../core-js/fn/array/virtual/entries.js | 2 + .../core-js/fn/array/virtual/every.js | 2 + node_modules/core-js/fn/array/virtual/fill.js | 2 + .../core-js/fn/array/virtual/filter.js | 2 + .../core-js/fn/array/virtual/find-index.js | 2 + node_modules/core-js/fn/array/virtual/find.js | 2 + .../core-js/fn/array/virtual/flat-map.js | 2 + .../core-js/fn/array/virtual/flatten.js | 2 + .../core-js/fn/array/virtual/for-each.js | 2 + .../core-js/fn/array/virtual/includes.js | 2 + .../core-js/fn/array/virtual/index-of.js | 2 + .../core-js/fn/array/virtual/index.js | 20 + .../core-js/fn/array/virtual/iterator.js | 2 + node_modules/core-js/fn/array/virtual/join.js | 2 + node_modules/core-js/fn/array/virtual/keys.js | 2 + .../core-js/fn/array/virtual/last-index-of.js | 2 + node_modules/core-js/fn/array/virtual/map.js | 2 + .../core-js/fn/array/virtual/reduce-right.js | 2 + .../core-js/fn/array/virtual/reduce.js | 2 + .../core-js/fn/array/virtual/slice.js | 2 + node_modules/core-js/fn/array/virtual/some.js | 2 + node_modules/core-js/fn/array/virtual/sort.js | 2 + .../core-js/fn/array/virtual/values.js | 2 + node_modules/core-js/fn/asap.js | 2 + node_modules/core-js/fn/clear-immediate.js | 2 + node_modules/core-js/fn/date/index.js | 6 + node_modules/core-js/fn/date/now.js | 2 + node_modules/core-js/fn/date/to-iso-string.js | 3 + node_modules/core-js/fn/date/to-json.js | 2 + node_modules/core-js/fn/date/to-primitive.js | 5 + node_modules/core-js/fn/date/to-string.js | 5 + node_modules/core-js/fn/delay.js | 2 + node_modules/core-js/fn/dict.js | 2 + .../core-js/fn/dom-collections/index.js | 8 + .../core-js/fn/dom-collections/iterator.js | 2 + node_modules/core-js/fn/error/index.js | 2 + node_modules/core-js/fn/error/is-error.js | 2 + node_modules/core-js/fn/function/bind.js | 2 + .../core-js/fn/function/has-instance.js | 2 + node_modules/core-js/fn/function/index.js | 5 + node_modules/core-js/fn/function/name.js | 1 + node_modules/core-js/fn/function/part.js | 2 + .../core-js/fn/function/virtual/bind.js | 2 + .../core-js/fn/function/virtual/index.js | 3 + .../core-js/fn/function/virtual/part.js | 2 + .../core-js/fn/get-iterator-method.js | 3 + node_modules/core-js/fn/get-iterator.js | 3 + node_modules/core-js/fn/global.js | 2 + node_modules/core-js/fn/is-iterable.js | 3 + node_modules/core-js/fn/json/index.js | 2 + node_modules/core-js/fn/json/stringify.js | 5 + node_modules/core-js/fn/map.js | 8 + node_modules/core-js/fn/map/from.js | 8 + node_modules/core-js/fn/map/index.js | 8 + node_modules/core-js/fn/map/of.js | 8 + node_modules/core-js/fn/math/acosh.js | 2 + node_modules/core-js/fn/math/asinh.js | 2 + node_modules/core-js/fn/math/atanh.js | 2 + node_modules/core-js/fn/math/cbrt.js | 2 + node_modules/core-js/fn/math/clamp.js | 2 + node_modules/core-js/fn/math/clz32.js | 2 + node_modules/core-js/fn/math/cosh.js | 2 + node_modules/core-js/fn/math/deg-per-rad.js | 2 + node_modules/core-js/fn/math/degrees.js | 2 + node_modules/core-js/fn/math/expm1.js | 2 + node_modules/core-js/fn/math/fround.js | 2 + node_modules/core-js/fn/math/fscale.js | 2 + node_modules/core-js/fn/math/hypot.js | 2 + node_modules/core-js/fn/math/iaddh.js | 2 + node_modules/core-js/fn/math/imul.js | 2 + node_modules/core-js/fn/math/imulh.js | 2 + node_modules/core-js/fn/math/index.js | 30 + node_modules/core-js/fn/math/isubh.js | 2 + node_modules/core-js/fn/math/log10.js | 2 + node_modules/core-js/fn/math/log1p.js | 2 + node_modules/core-js/fn/math/log2.js | 2 + node_modules/core-js/fn/math/rad-per-deg.js | 2 + node_modules/core-js/fn/math/radians.js | 2 + node_modules/core-js/fn/math/scale.js | 2 + node_modules/core-js/fn/math/sign.js | 2 + node_modules/core-js/fn/math/signbit.js | 3 + node_modules/core-js/fn/math/sinh.js | 2 + node_modules/core-js/fn/math/tanh.js | 2 + node_modules/core-js/fn/math/trunc.js | 2 + node_modules/core-js/fn/math/umulh.js | 2 + node_modules/core-js/fn/number/constructor.js | 2 + node_modules/core-js/fn/number/epsilon.js | 2 + node_modules/core-js/fn/number/index.js | 14 + node_modules/core-js/fn/number/is-finite.js | 2 + node_modules/core-js/fn/number/is-integer.js | 2 + node_modules/core-js/fn/number/is-nan.js | 2 + .../core-js/fn/number/is-safe-integer.js | 2 + node_modules/core-js/fn/number/iterator.js | 5 + .../core-js/fn/number/max-safe-integer.js | 2 + .../core-js/fn/number/min-safe-integer.js | 2 + node_modules/core-js/fn/number/parse-float.js | 2 + node_modules/core-js/fn/number/parse-int.js | 2 + node_modules/core-js/fn/number/to-fixed.js | 2 + .../core-js/fn/number/to-precision.js | 2 + .../core-js/fn/number/virtual/index.js | 4 + .../core-js/fn/number/virtual/iterator.js | 2 + .../core-js/fn/number/virtual/to-fixed.js | 2 + .../core-js/fn/number/virtual/to-precision.js | 2 + node_modules/core-js/fn/object/assign.js | 2 + node_modules/core-js/fn/object/classof.js | 2 + node_modules/core-js/fn/object/create.js | 5 + .../core-js/fn/object/define-getter.js | 2 + .../core-js/fn/object/define-properties.js | 5 + .../core-js/fn/object/define-property.js | 5 + .../core-js/fn/object/define-setter.js | 2 + node_modules/core-js/fn/object/define.js | 2 + node_modules/core-js/fn/object/entries.js | 2 + node_modules/core-js/fn/object/freeze.js | 2 + .../fn/object/get-own-property-descriptor.js | 5 + .../fn/object/get-own-property-descriptors.js | 2 + .../fn/object/get-own-property-names.js | 5 + .../fn/object/get-own-property-symbols.js | 2 + .../core-js/fn/object/get-prototype-of.js | 2 + node_modules/core-js/fn/object/index.js | 30 + .../core-js/fn/object/is-extensible.js | 2 + node_modules/core-js/fn/object/is-frozen.js | 2 + node_modules/core-js/fn/object/is-object.js | 2 + node_modules/core-js/fn/object/is-sealed.js | 2 + node_modules/core-js/fn/object/is.js | 2 + node_modules/core-js/fn/object/keys.js | 2 + .../core-js/fn/object/lookup-getter.js | 2 + .../core-js/fn/object/lookup-setter.js | 2 + node_modules/core-js/fn/object/make.js | 2 + .../core-js/fn/object/prevent-extensions.js | 2 + node_modules/core-js/fn/object/seal.js | 2 + .../core-js/fn/object/set-prototype-of.js | 2 + node_modules/core-js/fn/object/values.js | 2 + node_modules/core-js/fn/observable.js | 7 + node_modules/core-js/fn/parse-float.js | 2 + node_modules/core-js/fn/parse-int.js | 2 + node_modules/core-js/fn/promise.js | 7 + node_modules/core-js/fn/promise/finally.js | 4 + node_modules/core-js/fn/promise/index.js | 7 + node_modules/core-js/fn/promise/try.js | 8 + node_modules/core-js/fn/reflect/apply.js | 2 + node_modules/core-js/fn/reflect/construct.js | 2 + .../core-js/fn/reflect/define-metadata.js | 2 + .../core-js/fn/reflect/define-property.js | 2 + .../core-js/fn/reflect/delete-metadata.js | 2 + .../core-js/fn/reflect/delete-property.js | 2 + node_modules/core-js/fn/reflect/enumerate.js | 2 + .../core-js/fn/reflect/get-metadata-keys.js | 2 + .../core-js/fn/reflect/get-metadata.js | 2 + .../fn/reflect/get-own-metadata-keys.js | 2 + .../core-js/fn/reflect/get-own-metadata.js | 2 + .../fn/reflect/get-own-property-descriptor.js | 2 + .../core-js/fn/reflect/get-prototype-of.js | 2 + node_modules/core-js/fn/reflect/get.js | 2 + .../core-js/fn/reflect/has-metadata.js | 2 + .../core-js/fn/reflect/has-own-metadata.js | 2 + node_modules/core-js/fn/reflect/has.js | 2 + node_modules/core-js/fn/reflect/index.js | 24 + .../core-js/fn/reflect/is-extensible.js | 2 + node_modules/core-js/fn/reflect/metadata.js | 2 + node_modules/core-js/fn/reflect/own-keys.js | 2 + .../core-js/fn/reflect/prevent-extensions.js | 2 + .../core-js/fn/reflect/set-prototype-of.js | 2 + node_modules/core-js/fn/reflect/set.js | 2 + node_modules/core-js/fn/regexp/constructor.js | 2 + node_modules/core-js/fn/regexp/escape.js | 2 + node_modules/core-js/fn/regexp/flags.js | 5 + node_modules/core-js/fn/regexp/index.js | 9 + node_modules/core-js/fn/regexp/match.js | 5 + node_modules/core-js/fn/regexp/replace.js | 5 + node_modules/core-js/fn/regexp/search.js | 5 + node_modules/core-js/fn/regexp/split.js | 5 + node_modules/core-js/fn/regexp/to-string.js | 5 + node_modules/core-js/fn/set-immediate.js | 2 + node_modules/core-js/fn/set-interval.js | 2 + node_modules/core-js/fn/set-timeout.js | 2 + node_modules/core-js/fn/set.js | 8 + node_modules/core-js/fn/set/from.js | 8 + node_modules/core-js/fn/set/index.js | 8 + node_modules/core-js/fn/set/of.js | 8 + node_modules/core-js/fn/string/anchor.js | 2 + node_modules/core-js/fn/string/at.js | 2 + node_modules/core-js/fn/string/big.js | 2 + node_modules/core-js/fn/string/blink.js | 2 + node_modules/core-js/fn/string/bold.js | 2 + .../core-js/fn/string/code-point-at.js | 2 + node_modules/core-js/fn/string/ends-with.js | 2 + node_modules/core-js/fn/string/escape-html.js | 2 + node_modules/core-js/fn/string/fixed.js | 2 + node_modules/core-js/fn/string/fontcolor.js | 2 + node_modules/core-js/fn/string/fontsize.js | 2 + .../core-js/fn/string/from-code-point.js | 2 + node_modules/core-js/fn/string/includes.js | 2 + node_modules/core-js/fn/string/index.js | 35 + node_modules/core-js/fn/string/italics.js | 2 + node_modules/core-js/fn/string/iterator.js | 5 + node_modules/core-js/fn/string/link.js | 2 + node_modules/core-js/fn/string/match-all.js | 2 + node_modules/core-js/fn/string/pad-end.js | 2 + node_modules/core-js/fn/string/pad-start.js | 2 + node_modules/core-js/fn/string/raw.js | 2 + node_modules/core-js/fn/string/repeat.js | 2 + node_modules/core-js/fn/string/small.js | 2 + node_modules/core-js/fn/string/starts-with.js | 2 + node_modules/core-js/fn/string/strike.js | 2 + node_modules/core-js/fn/string/sub.js | 2 + node_modules/core-js/fn/string/sup.js | 2 + node_modules/core-js/fn/string/trim-end.js | 2 + node_modules/core-js/fn/string/trim-left.js | 2 + node_modules/core-js/fn/string/trim-right.js | 2 + node_modules/core-js/fn/string/trim-start.js | 2 + node_modules/core-js/fn/string/trim.js | 2 + .../core-js/fn/string/unescape-html.js | 2 + .../core-js/fn/string/virtual/anchor.js | 2 + node_modules/core-js/fn/string/virtual/at.js | 2 + node_modules/core-js/fn/string/virtual/big.js | 2 + .../core-js/fn/string/virtual/blink.js | 2 + .../core-js/fn/string/virtual/bold.js | 2 + .../fn/string/virtual/code-point-at.js | 2 + .../core-js/fn/string/virtual/ends-with.js | 2 + .../core-js/fn/string/virtual/escape-html.js | 2 + .../core-js/fn/string/virtual/fixed.js | 2 + .../core-js/fn/string/virtual/fontcolor.js | 2 + .../core-js/fn/string/virtual/fontsize.js | 2 + .../core-js/fn/string/virtual/includes.js | 2 + .../core-js/fn/string/virtual/index.js | 33 + .../core-js/fn/string/virtual/italics.js | 2 + .../core-js/fn/string/virtual/iterator.js | 2 + .../core-js/fn/string/virtual/link.js | 2 + .../core-js/fn/string/virtual/match-all.js | 2 + .../core-js/fn/string/virtual/pad-end.js | 2 + .../core-js/fn/string/virtual/pad-start.js | 2 + .../core-js/fn/string/virtual/repeat.js | 2 + .../core-js/fn/string/virtual/small.js | 2 + .../core-js/fn/string/virtual/starts-with.js | 2 + .../core-js/fn/string/virtual/strike.js | 2 + node_modules/core-js/fn/string/virtual/sub.js | 2 + node_modules/core-js/fn/string/virtual/sup.js | 2 + .../core-js/fn/string/virtual/trim-end.js | 2 + .../core-js/fn/string/virtual/trim-left.js | 2 + .../core-js/fn/string/virtual/trim-right.js | 2 + .../core-js/fn/string/virtual/trim-start.js | 2 + .../core-js/fn/string/virtual/trim.js | 2 + .../fn/string/virtual/unescape-html.js | 2 + .../core-js/fn/symbol/async-iterator.js | 2 + node_modules/core-js/fn/symbol/for.js | 2 + .../core-js/fn/symbol/has-instance.js | 2 + node_modules/core-js/fn/symbol/index.js | 5 + .../core-js/fn/symbol/is-concat-spreadable.js | 1 + node_modules/core-js/fn/symbol/iterator.js | 3 + node_modules/core-js/fn/symbol/key-for.js | 2 + node_modules/core-js/fn/symbol/match.js | 2 + node_modules/core-js/fn/symbol/observable.js | 2 + node_modules/core-js/fn/symbol/replace.js | 2 + node_modules/core-js/fn/symbol/search.js | 2 + node_modules/core-js/fn/symbol/species.js | 1 + node_modules/core-js/fn/symbol/split.js | 2 + .../core-js/fn/symbol/to-primitive.js | 1 + .../core-js/fn/symbol/to-string-tag.js | 2 + node_modules/core-js/fn/symbol/unscopables.js | 1 + node_modules/core-js/fn/system/global.js | 2 + node_modules/core-js/fn/system/index.js | 2 + node_modules/core-js/fn/typed/array-buffer.js | 3 + node_modules/core-js/fn/typed/data-view.js | 3 + .../core-js/fn/typed/float32-array.js | 2 + .../core-js/fn/typed/float64-array.js | 2 + node_modules/core-js/fn/typed/index.js | 13 + node_modules/core-js/fn/typed/int16-array.js | 2 + node_modules/core-js/fn/typed/int32-array.js | 2 + node_modules/core-js/fn/typed/int8-array.js | 2 + node_modules/core-js/fn/typed/uint16-array.js | 2 + node_modules/core-js/fn/typed/uint32-array.js | 2 + node_modules/core-js/fn/typed/uint8-array.js | 2 + .../core-js/fn/typed/uint8-clamped-array.js | 2 + node_modules/core-js/fn/weak-map.js | 6 + node_modules/core-js/fn/weak-map/from.js | 8 + node_modules/core-js/fn/weak-map/index.js | 6 + node_modules/core-js/fn/weak-map/of.js | 8 + node_modules/core-js/fn/weak-set.js | 6 + node_modules/core-js/fn/weak-set/from.js | 8 + node_modules/core-js/fn/weak-set/index.js | 6 + node_modules/core-js/fn/weak-set/of.js | 8 + node_modules/core-js/index.js | 16 + node_modules/core-js/library/core/_.js | 2 + node_modules/core-js/library/core/delay.js | 2 + node_modules/core-js/library/core/dict.js | 2 + node_modules/core-js/library/core/function.js | 2 + node_modules/core-js/library/core/index.js | 15 + node_modules/core-js/library/core/number.js | 2 + node_modules/core-js/library/core/object.js | 5 + node_modules/core-js/library/core/regexp.js | 2 + node_modules/core-js/library/core/string.js | 3 + node_modules/core-js/library/es5/index.js | 37 + node_modules/core-js/library/es6/array.js | 23 + node_modules/core-js/library/es6/date.js | 6 + node_modules/core-js/library/es6/function.js | 4 + node_modules/core-js/library/es6/index.js | 138 + node_modules/core-js/library/es6/map.js | 5 + node_modules/core-js/library/es6/math.js | 18 + node_modules/core-js/library/es6/number.js | 13 + node_modules/core-js/library/es6/object.js | 20 + .../core-js/library/es6/parse-float.js | 2 + node_modules/core-js/library/es6/parse-int.js | 2 + node_modules/core-js/library/es6/promise.js | 5 + node_modules/core-js/library/es6/reflect.js | 15 + node_modules/core-js/library/es6/regexp.js | 8 + node_modules/core-js/library/es6/set.js | 5 + node_modules/core-js/library/es6/string.js | 27 + node_modules/core-js/library/es6/symbol.js | 3 + node_modules/core-js/library/es6/typed.js | 13 + node_modules/core-js/library/es6/weak-map.js | 4 + node_modules/core-js/library/es6/weak-set.js | 4 + node_modules/core-js/library/es7/array.js | 4 + node_modules/core-js/library/es7/asap.js | 2 + node_modules/core-js/library/es7/error.js | 2 + node_modules/core-js/library/es7/global.js | 2 + node_modules/core-js/library/es7/index.js | 56 + node_modules/core-js/library/es7/map.js | 4 + node_modules/core-js/library/es7/math.js | 13 + node_modules/core-js/library/es7/object.js | 8 + .../core-js/library/es7/observable.js | 7 + node_modules/core-js/library/es7/promise.js | 3 + node_modules/core-js/library/es7/reflect.js | 10 + node_modules/core-js/library/es7/set.js | 4 + node_modules/core-js/library/es7/string.js | 7 + node_modules/core-js/library/es7/symbol.js | 3 + node_modules/core-js/library/es7/system.js | 2 + node_modules/core-js/library/es7/weak-map.js | 3 + node_modules/core-js/library/es7/weak-set.js | 3 + node_modules/core-js/library/fn/_.js | 2 + .../core-js/library/fn/array/concat.js | 4 + .../core-js/library/fn/array/copy-within.js | 2 + .../core-js/library/fn/array/entries.js | 2 + .../core-js/library/fn/array/every.js | 2 + node_modules/core-js/library/fn/array/fill.js | 2 + .../core-js/library/fn/array/filter.js | 2 + .../core-js/library/fn/array/find-index.js | 2 + node_modules/core-js/library/fn/array/find.js | 2 + .../core-js/library/fn/array/flat-map.js | 2 + .../core-js/library/fn/array/flatten.js | 2 + .../core-js/library/fn/array/for-each.js | 2 + node_modules/core-js/library/fn/array/from.js | 3 + .../core-js/library/fn/array/includes.js | 2 + .../core-js/library/fn/array/index-of.js | 2 + .../core-js/library/fn/array/index.js | 26 + .../core-js/library/fn/array/is-array.js | 2 + .../core-js/library/fn/array/iterator.js | 2 + node_modules/core-js/library/fn/array/join.js | 2 + node_modules/core-js/library/fn/array/keys.js | 2 + .../core-js/library/fn/array/last-index-of.js | 2 + node_modules/core-js/library/fn/array/map.js | 2 + node_modules/core-js/library/fn/array/of.js | 2 + node_modules/core-js/library/fn/array/pop.js | 4 + node_modules/core-js/library/fn/array/push.js | 4 + .../core-js/library/fn/array/reduce-right.js | 2 + .../core-js/library/fn/array/reduce.js | 2 + .../core-js/library/fn/array/reverse.js | 4 + .../core-js/library/fn/array/shift.js | 4 + .../core-js/library/fn/array/slice.js | 2 + node_modules/core-js/library/fn/array/some.js | 2 + node_modules/core-js/library/fn/array/sort.js | 2 + .../core-js/library/fn/array/splice.js | 4 + .../core-js/library/fn/array/unshift.js | 4 + .../core-js/library/fn/array/values.js | 2 + .../library/fn/array/virtual/copy-within.js | 2 + .../library/fn/array/virtual/entries.js | 2 + .../core-js/library/fn/array/virtual/every.js | 2 + .../core-js/library/fn/array/virtual/fill.js | 2 + .../library/fn/array/virtual/filter.js | 2 + .../library/fn/array/virtual/find-index.js | 2 + .../core-js/library/fn/array/virtual/find.js | 2 + .../library/fn/array/virtual/flat-map.js | 2 + .../library/fn/array/virtual/flatten.js | 2 + .../library/fn/array/virtual/for-each.js | 2 + .../library/fn/array/virtual/includes.js | 2 + .../library/fn/array/virtual/index-of.js | 2 + .../core-js/library/fn/array/virtual/index.js | 20 + .../library/fn/array/virtual/iterator.js | 2 + .../core-js/library/fn/array/virtual/join.js | 2 + .../core-js/library/fn/array/virtual/keys.js | 2 + .../library/fn/array/virtual/last-index-of.js | 2 + .../core-js/library/fn/array/virtual/map.js | 2 + .../library/fn/array/virtual/reduce-right.js | 2 + .../library/fn/array/virtual/reduce.js | 2 + .../core-js/library/fn/array/virtual/slice.js | 2 + .../core-js/library/fn/array/virtual/some.js | 2 + .../core-js/library/fn/array/virtual/sort.js | 2 + .../library/fn/array/virtual/values.js | 2 + node_modules/core-js/library/fn/asap.js | 2 + .../core-js/library/fn/clear-immediate.js | 2 + node_modules/core-js/library/fn/date/index.js | 6 + node_modules/core-js/library/fn/date/now.js | 2 + .../core-js/library/fn/date/to-iso-string.js | 3 + .../core-js/library/fn/date/to-json.js | 2 + .../core-js/library/fn/date/to-primitive.js | 5 + .../core-js/library/fn/date/to-string.js | 5 + node_modules/core-js/library/fn/delay.js | 2 + node_modules/core-js/library/fn/dict.js | 2 + .../library/fn/dom-collections/index.js | 8 + .../library/fn/dom-collections/iterator.js | 2 + .../core-js/library/fn/error/index.js | 2 + .../core-js/library/fn/error/is-error.js | 2 + .../core-js/library/fn/function/bind.js | 2 + .../library/fn/function/has-instance.js | 2 + .../core-js/library/fn/function/index.js | 5 + .../core-js/library/fn/function/name.js | 1 + .../core-js/library/fn/function/part.js | 2 + .../library/fn/function/virtual/bind.js | 2 + .../library/fn/function/virtual/index.js | 3 + .../library/fn/function/virtual/part.js | 2 + .../core-js/library/fn/get-iterator-method.js | 3 + .../core-js/library/fn/get-iterator.js | 3 + node_modules/core-js/library/fn/global.js | 2 + .../core-js/library/fn/is-iterable.js | 3 + node_modules/core-js/library/fn/json/index.js | 2 + .../core-js/library/fn/json/stringify.js | 5 + node_modules/core-js/library/fn/map.js | 8 + node_modules/core-js/library/fn/map/from.js | 8 + node_modules/core-js/library/fn/map/index.js | 8 + node_modules/core-js/library/fn/map/of.js | 8 + node_modules/core-js/library/fn/math/acosh.js | 2 + node_modules/core-js/library/fn/math/asinh.js | 2 + node_modules/core-js/library/fn/math/atanh.js | 2 + node_modules/core-js/library/fn/math/cbrt.js | 2 + node_modules/core-js/library/fn/math/clamp.js | 2 + node_modules/core-js/library/fn/math/clz32.js | 2 + node_modules/core-js/library/fn/math/cosh.js | 2 + .../core-js/library/fn/math/deg-per-rad.js | 2 + .../core-js/library/fn/math/degrees.js | 2 + node_modules/core-js/library/fn/math/expm1.js | 2 + .../core-js/library/fn/math/fround.js | 2 + .../core-js/library/fn/math/fscale.js | 2 + node_modules/core-js/library/fn/math/hypot.js | 2 + node_modules/core-js/library/fn/math/iaddh.js | 2 + node_modules/core-js/library/fn/math/imul.js | 2 + node_modules/core-js/library/fn/math/imulh.js | 2 + node_modules/core-js/library/fn/math/index.js | 30 + node_modules/core-js/library/fn/math/isubh.js | 2 + node_modules/core-js/library/fn/math/log10.js | 2 + node_modules/core-js/library/fn/math/log1p.js | 2 + node_modules/core-js/library/fn/math/log2.js | 2 + .../core-js/library/fn/math/rad-per-deg.js | 2 + .../core-js/library/fn/math/radians.js | 2 + node_modules/core-js/library/fn/math/scale.js | 2 + node_modules/core-js/library/fn/math/sign.js | 2 + .../core-js/library/fn/math/signbit.js | 3 + node_modules/core-js/library/fn/math/sinh.js | 2 + node_modules/core-js/library/fn/math/tanh.js | 2 + node_modules/core-js/library/fn/math/trunc.js | 2 + node_modules/core-js/library/fn/math/umulh.js | 2 + .../core-js/library/fn/number/constructor.js | 2 + .../core-js/library/fn/number/epsilon.js | 2 + .../core-js/library/fn/number/index.js | 14 + .../core-js/library/fn/number/is-finite.js | 2 + .../core-js/library/fn/number/is-integer.js | 2 + .../core-js/library/fn/number/is-nan.js | 2 + .../library/fn/number/is-safe-integer.js | 2 + .../core-js/library/fn/number/iterator.js | 5 + .../library/fn/number/max-safe-integer.js | 2 + .../library/fn/number/min-safe-integer.js | 2 + .../core-js/library/fn/number/parse-float.js | 2 + .../core-js/library/fn/number/parse-int.js | 2 + .../core-js/library/fn/number/to-fixed.js | 2 + .../core-js/library/fn/number/to-precision.js | 2 + .../library/fn/number/virtual/index.js | 4 + .../library/fn/number/virtual/iterator.js | 2 + .../library/fn/number/virtual/to-fixed.js | 2 + .../library/fn/number/virtual/to-precision.js | 2 + .../core-js/library/fn/object/assign.js | 2 + .../core-js/library/fn/object/classof.js | 2 + .../core-js/library/fn/object/create.js | 5 + .../library/fn/object/define-getter.js | 2 + .../library/fn/object/define-properties.js | 5 + .../library/fn/object/define-property.js | 5 + .../library/fn/object/define-setter.js | 2 + .../core-js/library/fn/object/define.js | 2 + .../core-js/library/fn/object/entries.js | 2 + .../core-js/library/fn/object/freeze.js | 2 + .../fn/object/get-own-property-descriptor.js | 5 + .../fn/object/get-own-property-descriptors.js | 2 + .../fn/object/get-own-property-names.js | 5 + .../fn/object/get-own-property-symbols.js | 2 + .../library/fn/object/get-prototype-of.js | 2 + .../core-js/library/fn/object/index.js | 30 + .../library/fn/object/is-extensible.js | 2 + .../core-js/library/fn/object/is-frozen.js | 2 + .../core-js/library/fn/object/is-object.js | 2 + .../core-js/library/fn/object/is-sealed.js | 2 + node_modules/core-js/library/fn/object/is.js | 2 + .../core-js/library/fn/object/keys.js | 2 + .../library/fn/object/lookup-getter.js | 2 + .../library/fn/object/lookup-setter.js | 2 + .../core-js/library/fn/object/make.js | 2 + .../library/fn/object/prevent-extensions.js | 2 + .../core-js/library/fn/object/seal.js | 2 + .../library/fn/object/set-prototype-of.js | 2 + .../core-js/library/fn/object/values.js | 2 + node_modules/core-js/library/fn/observable.js | 7 + .../core-js/library/fn/parse-float.js | 2 + node_modules/core-js/library/fn/parse-int.js | 2 + node_modules/core-js/library/fn/promise.js | 7 + .../core-js/library/fn/promise/finally.js | 4 + .../core-js/library/fn/promise/index.js | 7 + .../core-js/library/fn/promise/try.js | 8 + .../core-js/library/fn/reflect/apply.js | 2 + .../core-js/library/fn/reflect/construct.js | 2 + .../library/fn/reflect/define-metadata.js | 2 + .../library/fn/reflect/define-property.js | 2 + .../library/fn/reflect/delete-metadata.js | 2 + .../library/fn/reflect/delete-property.js | 2 + .../core-js/library/fn/reflect/enumerate.js | 2 + .../library/fn/reflect/get-metadata-keys.js | 2 + .../library/fn/reflect/get-metadata.js | 2 + .../fn/reflect/get-own-metadata-keys.js | 2 + .../library/fn/reflect/get-own-metadata.js | 2 + .../fn/reflect/get-own-property-descriptor.js | 2 + .../library/fn/reflect/get-prototype-of.js | 2 + .../core-js/library/fn/reflect/get.js | 2 + .../library/fn/reflect/has-metadata.js | 2 + .../library/fn/reflect/has-own-metadata.js | 2 + .../core-js/library/fn/reflect/has.js | 2 + .../core-js/library/fn/reflect/index.js | 24 + .../library/fn/reflect/is-extensible.js | 2 + .../core-js/library/fn/reflect/metadata.js | 2 + .../core-js/library/fn/reflect/own-keys.js | 2 + .../library/fn/reflect/prevent-extensions.js | 2 + .../library/fn/reflect/set-prototype-of.js | 2 + .../core-js/library/fn/reflect/set.js | 2 + .../core-js/library/fn/regexp/constructor.js | 2 + .../core-js/library/fn/regexp/escape.js | 2 + .../core-js/library/fn/regexp/flags.js | 5 + .../core-js/library/fn/regexp/index.js | 9 + .../core-js/library/fn/regexp/match.js | 5 + .../core-js/library/fn/regexp/replace.js | 5 + .../core-js/library/fn/regexp/search.js | 5 + .../core-js/library/fn/regexp/split.js | 5 + .../core-js/library/fn/regexp/to-string.js | 5 + .../core-js/library/fn/set-immediate.js | 2 + .../core-js/library/fn/set-interval.js | 2 + .../core-js/library/fn/set-timeout.js | 2 + node_modules/core-js/library/fn/set.js | 8 + node_modules/core-js/library/fn/set/from.js | 8 + node_modules/core-js/library/fn/set/index.js | 8 + node_modules/core-js/library/fn/set/of.js | 8 + .../core-js/library/fn/string/anchor.js | 2 + node_modules/core-js/library/fn/string/at.js | 2 + node_modules/core-js/library/fn/string/big.js | 2 + .../core-js/library/fn/string/blink.js | 2 + .../core-js/library/fn/string/bold.js | 2 + .../library/fn/string/code-point-at.js | 2 + .../core-js/library/fn/string/ends-with.js | 2 + .../core-js/library/fn/string/escape-html.js | 2 + .../core-js/library/fn/string/fixed.js | 2 + .../core-js/library/fn/string/fontcolor.js | 2 + .../core-js/library/fn/string/fontsize.js | 2 + .../library/fn/string/from-code-point.js | 2 + .../core-js/library/fn/string/includes.js | 2 + .../core-js/library/fn/string/index.js | 35 + .../core-js/library/fn/string/italics.js | 2 + .../core-js/library/fn/string/iterator.js | 5 + .../core-js/library/fn/string/link.js | 2 + .../core-js/library/fn/string/match-all.js | 2 + .../core-js/library/fn/string/pad-end.js | 2 + .../core-js/library/fn/string/pad-start.js | 2 + node_modules/core-js/library/fn/string/raw.js | 2 + .../core-js/library/fn/string/repeat.js | 2 + .../core-js/library/fn/string/small.js | 2 + .../core-js/library/fn/string/starts-with.js | 2 + .../core-js/library/fn/string/strike.js | 2 + node_modules/core-js/library/fn/string/sub.js | 2 + node_modules/core-js/library/fn/string/sup.js | 2 + .../core-js/library/fn/string/trim-end.js | 2 + .../core-js/library/fn/string/trim-left.js | 2 + .../core-js/library/fn/string/trim-right.js | 2 + .../core-js/library/fn/string/trim-start.js | 2 + .../core-js/library/fn/string/trim.js | 2 + .../library/fn/string/unescape-html.js | 2 + .../library/fn/string/virtual/anchor.js | 2 + .../core-js/library/fn/string/virtual/at.js | 2 + .../core-js/library/fn/string/virtual/big.js | 2 + .../library/fn/string/virtual/blink.js | 2 + .../core-js/library/fn/string/virtual/bold.js | 2 + .../fn/string/virtual/code-point-at.js | 2 + .../library/fn/string/virtual/ends-with.js | 2 + .../library/fn/string/virtual/escape-html.js | 2 + .../library/fn/string/virtual/fixed.js | 2 + .../library/fn/string/virtual/fontcolor.js | 2 + .../library/fn/string/virtual/fontsize.js | 2 + .../library/fn/string/virtual/includes.js | 2 + .../library/fn/string/virtual/index.js | 33 + .../library/fn/string/virtual/italics.js | 2 + .../library/fn/string/virtual/iterator.js | 2 + .../core-js/library/fn/string/virtual/link.js | 2 + .../library/fn/string/virtual/match-all.js | 2 + .../library/fn/string/virtual/pad-end.js | 2 + .../library/fn/string/virtual/pad-start.js | 2 + .../library/fn/string/virtual/repeat.js | 2 + .../library/fn/string/virtual/small.js | 2 + .../library/fn/string/virtual/starts-with.js | 2 + .../library/fn/string/virtual/strike.js | 2 + .../core-js/library/fn/string/virtual/sub.js | 2 + .../core-js/library/fn/string/virtual/sup.js | 2 + .../library/fn/string/virtual/trim-end.js | 2 + .../library/fn/string/virtual/trim-left.js | 2 + .../library/fn/string/virtual/trim-right.js | 2 + .../library/fn/string/virtual/trim-start.js | 2 + .../core-js/library/fn/string/virtual/trim.js | 2 + .../fn/string/virtual/unescape-html.js | 2 + .../library/fn/symbol/async-iterator.js | 2 + node_modules/core-js/library/fn/symbol/for.js | 2 + .../core-js/library/fn/symbol/has-instance.js | 2 + .../core-js/library/fn/symbol/index.js | 5 + .../library/fn/symbol/is-concat-spreadable.js | 1 + .../core-js/library/fn/symbol/iterator.js | 3 + .../core-js/library/fn/symbol/key-for.js | 2 + .../core-js/library/fn/symbol/match.js | 2 + .../core-js/library/fn/symbol/observable.js | 2 + .../core-js/library/fn/symbol/replace.js | 2 + .../core-js/library/fn/symbol/search.js | 2 + .../core-js/library/fn/symbol/species.js | 1 + .../core-js/library/fn/symbol/split.js | 2 + .../core-js/library/fn/symbol/to-primitive.js | 1 + .../library/fn/symbol/to-string-tag.js | 2 + .../core-js/library/fn/symbol/unscopables.js | 1 + .../core-js/library/fn/system/global.js | 2 + .../core-js/library/fn/system/index.js | 2 + .../core-js/library/fn/typed/array-buffer.js | 3 + .../core-js/library/fn/typed/data-view.js | 3 + .../core-js/library/fn/typed/float32-array.js | 2 + .../core-js/library/fn/typed/float64-array.js | 2 + .../core-js/library/fn/typed/index.js | 13 + .../core-js/library/fn/typed/int16-array.js | 2 + .../core-js/library/fn/typed/int32-array.js | 2 + .../core-js/library/fn/typed/int8-array.js | 2 + .../core-js/library/fn/typed/uint16-array.js | 2 + .../core-js/library/fn/typed/uint32-array.js | 2 + .../core-js/library/fn/typed/uint8-array.js | 2 + .../library/fn/typed/uint8-clamped-array.js | 2 + node_modules/core-js/library/fn/weak-map.js | 6 + .../core-js/library/fn/weak-map/from.js | 8 + .../core-js/library/fn/weak-map/index.js | 6 + .../core-js/library/fn/weak-map/of.js | 8 + node_modules/core-js/library/fn/weak-set.js | 6 + .../core-js/library/fn/weak-set/from.js | 8 + .../core-js/library/fn/weak-set/index.js | 6 + .../core-js/library/fn/weak-set/of.js | 8 + node_modules/core-js/library/index.js | 16 + .../core-js/library/modules/_a-function.js | 4 + .../library/modules/_a-number-value.js | 5 + .../library/modules/_add-to-unscopables.js | 1 + .../core-js/library/modules/_an-instance.js | 5 + .../core-js/library/modules/_an-object.js | 5 + .../library/modules/_array-copy-within.js | 26 + .../core-js/library/modules/_array-fill.js | 15 + .../library/modules/_array-from-iterable.js | 7 + .../library/modules/_array-includes.js | 23 + .../core-js/library/modules/_array-methods.js | 44 + .../core-js/library/modules/_array-reduce.js | 28 + .../modules/_array-species-constructor.js | 16 + .../library/modules/_array-species-create.js | 6 + node_modules/core-js/library/modules/_bind.js | 25 + .../core-js/library/modules/_classof.js | 23 + node_modules/core-js/library/modules/_cof.js | 5 + .../library/modules/_collection-strong.js | 144 + .../library/modules/_collection-to-json.js | 9 + .../library/modules/_collection-weak.js | 85 + .../core-js/library/modules/_collection.js | 59 + node_modules/core-js/library/modules/_core.js | 2 + .../library/modules/_create-property.js | 8 + node_modules/core-js/library/modules/_ctx.js | 20 + .../library/modules/_date-to-iso-string.js | 26 + .../library/modules/_date-to-primitive.js | 9 + .../core-js/library/modules/_defined.js | 5 + .../core-js/library/modules/_descriptors.js | 4 + .../core-js/library/modules/_dom-create.js | 7 + .../core-js/library/modules/_entry-virtual.js | 5 + .../core-js/library/modules/_enum-bug-keys.js | 4 + .../core-js/library/modules/_enum-keys.js | 15 + .../core-js/library/modules/_export.js | 61 + .../library/modules/_fails-is-regexp.js | 12 + .../core-js/library/modules/_fails.js | 7 + .../core-js/library/modules/_fix-re-wks.js | 28 + .../core-js/library/modules/_flags.js | 13 + .../library/modules/_flatten-into-array.js | 39 + .../core-js/library/modules/_for-of.js | 25 + .../core-js/library/modules/_global.js | 6 + node_modules/core-js/library/modules/_has.js | 4 + node_modules/core-js/library/modules/_hide.js | 8 + node_modules/core-js/library/modules/_html.js | 2 + .../library/modules/_ie8-dom-define.js | 3 + .../library/modules/_inherit-if-required.js | 9 + .../core-js/library/modules/_invoke.js | 16 + .../core-js/library/modules/_iobject.js | 6 + .../core-js/library/modules/_is-array-iter.js | 8 + .../core-js/library/modules/_is-array.js | 5 + .../core-js/library/modules/_is-integer.js | 6 + .../core-js/library/modules/_is-object.js | 3 + .../core-js/library/modules/_is-regexp.js | 8 + .../core-js/library/modules/_iter-call.js | 12 + .../core-js/library/modules/_iter-create.js | 13 + .../core-js/library/modules/_iter-define.js | 70 + .../core-js/library/modules/_iter-detect.js | 22 + .../core-js/library/modules/_iter-step.js | 3 + .../core-js/library/modules/_iterators.js | 1 + .../core-js/library/modules/_keyof.js | 10 + .../core-js/library/modules/_library.js | 1 + .../core-js/library/modules/_math-expm1.js | 10 + .../core-js/library/modules/_math-fround.js | 23 + .../core-js/library/modules/_math-log1p.js | 4 + .../core-js/library/modules/_math-scale.js | 18 + .../core-js/library/modules/_math-sign.js | 5 + node_modules/core-js/library/modules/_meta.js | 53 + .../core-js/library/modules/_metadata.js | 51 + .../core-js/library/modules/_microtask.js | 68 + .../modules/_new-promise-capability.js | 18 + .../core-js/library/modules/_object-assign.js | 34 + .../core-js/library/modules/_object-create.js | 41 + .../core-js/library/modules/_object-define.js | 13 + .../core-js/library/modules/_object-dp.js | 16 + .../core-js/library/modules/_object-dps.js | 13 + .../library/modules/_object-forced-pam.js | 9 + .../core-js/library/modules/_object-gopd.js | 16 + .../library/modules/_object-gopn-ext.js | 19 + .../core-js/library/modules/_object-gopn.js | 7 + .../core-js/library/modules/_object-gops.js | 1 + .../core-js/library/modules/_object-gpo.js | 13 + .../library/modules/_object-keys-internal.js | 17 + .../core-js/library/modules/_object-keys.js | 7 + .../core-js/library/modules/_object-pie.js | 1 + .../core-js/library/modules/_object-sap.js | 10 + .../library/modules/_object-to-array.js | 16 + .../core-js/library/modules/_own-keys.js | 10 + .../core-js/library/modules/_parse-float.js | 8 + .../core-js/library/modules/_parse-int.js | 9 + .../core-js/library/modules/_partial.js | 25 + node_modules/core-js/library/modules/_path.js | 1 + .../core-js/library/modules/_perform.js | 7 + .../library/modules/_promise-resolve.js | 12 + .../core-js/library/modules/_property-desc.js | 8 + .../core-js/library/modules/_redefine-all.js | 7 + .../core-js/library/modules/_redefine.js | 1 + .../core-js/library/modules/_replacer.js | 8 + .../core-js/library/modules/_same-value.js | 5 + .../library/modules/_set-collection-from.js | 28 + .../library/modules/_set-collection-of.js | 12 + .../core-js/library/modules/_set-proto.js | 25 + .../core-js/library/modules/_set-species.js | 14 + .../library/modules/_set-to-string-tag.js | 7 + .../core-js/library/modules/_shared-key.js | 5 + .../core-js/library/modules/_shared.js | 6 + .../library/modules/_species-constructor.js | 9 + .../core-js/library/modules/_strict-method.js | 9 + .../core-js/library/modules/_string-at.js | 17 + .../library/modules/_string-context.js | 8 + .../core-js/library/modules/_string-html.js | 19 + .../core-js/library/modules/_string-pad.js | 16 + .../core-js/library/modules/_string-repeat.js | 12 + .../core-js/library/modules/_string-trim.js | 30 + .../core-js/library/modules/_string-ws.js | 2 + node_modules/core-js/library/modules/_task.js | 84 + .../library/modules/_to-absolute-index.js | 7 + .../core-js/library/modules/_to-index.js | 10 + .../core-js/library/modules/_to-integer.js | 6 + .../core-js/library/modules/_to-iobject.js | 6 + .../core-js/library/modules/_to-length.js | 6 + .../core-js/library/modules/_to-object.js | 5 + .../core-js/library/modules/_to-primitive.js | 12 + .../core-js/library/modules/_typed-array.js | 480 + .../core-js/library/modules/_typed-buffer.js | 276 + .../core-js/library/modules/_typed.js | 28 + node_modules/core-js/library/modules/_uid.js | 5 + .../core-js/library/modules/_user-agent.js | 4 + .../library/modules/_validate-collection.js | 5 + .../core-js/library/modules/_wks-define.js | 9 + .../core-js/library/modules/_wks-ext.js | 1 + node_modules/core-js/library/modules/_wks.js | 11 + .../core-js/library/modules/core.delay.js | 12 + .../core-js/library/modules/core.dict.js | 157 + .../library/modules/core.function.part.js | 7 + .../modules/core.get-iterator-method.js | 8 + .../library/modules/core.get-iterator.js | 7 + .../library/modules/core.is-iterable.js | 10 + .../library/modules/core.number.iterator.js | 9 + .../library/modules/core.object.classof.js | 3 + .../library/modules/core.object.define.js | 4 + .../library/modules/core.object.is-object.js | 3 + .../library/modules/core.object.make.js | 9 + .../library/modules/core.regexp.escape.js | 5 + .../modules/core.string.escape-html.js | 11 + .../modules/core.string.unescape-html.js | 11 + node_modules/core-js/library/modules/es5.js | 35 + .../library/modules/es6.array.copy-within.js | 6 + .../library/modules/es6.array.every.js | 10 + .../core-js/library/modules/es6.array.fill.js | 6 + .../library/modules/es6.array.filter.js | 10 + .../library/modules/es6.array.find-index.js | 14 + .../core-js/library/modules/es6.array.find.js | 14 + .../library/modules/es6.array.for-each.js | 11 + .../core-js/library/modules/es6.array.from.js | 37 + .../library/modules/es6.array.index-of.js | 15 + .../library/modules/es6.array.is-array.js | 4 + .../library/modules/es6.array.iterator.js | 34 + .../core-js/library/modules/es6.array.join.js | 12 + .../modules/es6.array.last-index-of.js | 22 + .../core-js/library/modules/es6.array.map.js | 10 + .../core-js/library/modules/es6.array.of.js | 19 + .../library/modules/es6.array.reduce-right.js | 10 + .../library/modules/es6.array.reduce.js | 10 + .../library/modules/es6.array.slice.js | 28 + .../core-js/library/modules/es6.array.some.js | 10 + .../core-js/library/modules/es6.array.sort.js | 23 + .../library/modules/es6.array.species.js | 1 + .../core-js/library/modules/es6.date.now.js | 4 + .../library/modules/es6.date.to-iso-string.js | 8 + .../library/modules/es6.date.to-json.js | 19 + .../library/modules/es6.date.to-primitive.js | 0 .../library/modules/es6.date.to-string.js | 0 .../library/modules/es6.function.bind.js | 4 + .../modules/es6.function.has-instance.js | 13 + .../library/modules/es6.function.name.js | 0 .../core-js/library/modules/es6.map.js | 19 + .../core-js/library/modules/es6.math.acosh.js | 18 + .../core-js/library/modules/es6.math.asinh.js | 10 + .../core-js/library/modules/es6.math.atanh.js | 10 + .../core-js/library/modules/es6.math.cbrt.js | 9 + .../core-js/library/modules/es6.math.clz32.js | 8 + .../core-js/library/modules/es6.math.cosh.js | 9 + .../core-js/library/modules/es6.math.expm1.js | 5 + .../library/modules/es6.math.fround.js | 4 + .../core-js/library/modules/es6.math.hypot.js | 25 + .../core-js/library/modules/es6.math.imul.js | 17 + .../core-js/library/modules/es6.math.log10.js | 8 + .../core-js/library/modules/es6.math.log1p.js | 4 + .../core-js/library/modules/es6.math.log2.js | 8 + .../core-js/library/modules/es6.math.sign.js | 4 + .../core-js/library/modules/es6.math.sinh.js | 15 + .../core-js/library/modules/es6.math.tanh.js | 12 + .../core-js/library/modules/es6.math.trunc.js | 8 + .../library/modules/es6.number.constructor.js | 0 .../library/modules/es6.number.epsilon.js | 4 + .../library/modules/es6.number.is-finite.js | 9 + .../library/modules/es6.number.is-integer.js | 4 + .../library/modules/es6.number.is-nan.js | 9 + .../modules/es6.number.is-safe-integer.js | 10 + .../modules/es6.number.max-safe-integer.js | 4 + .../modules/es6.number.min-safe-integer.js | 4 + .../library/modules/es6.number.parse-float.js | 4 + .../library/modules/es6.number.parse-int.js | 4 + .../library/modules/es6.number.to-fixed.js | 114 + .../modules/es6.number.to-precision.js | 18 + .../library/modules/es6.object.assign.js | 4 + .../library/modules/es6.object.create.js | 3 + .../modules/es6.object.define-properties.js | 3 + .../modules/es6.object.define-property.js | 3 + .../library/modules/es6.object.freeze.js | 9 + .../es6.object.get-own-property-descriptor.js | 9 + .../es6.object.get-own-property-names.js | 4 + .../modules/es6.object.get-prototype-of.js | 9 + .../modules/es6.object.is-extensible.js | 8 + .../library/modules/es6.object.is-frozen.js | 8 + .../library/modules/es6.object.is-sealed.js | 8 + .../core-js/library/modules/es6.object.is.js | 3 + .../library/modules/es6.object.keys.js | 9 + .../modules/es6.object.prevent-extensions.js | 9 + .../library/modules/es6.object.seal.js | 9 + .../modules/es6.object.set-prototype-of.js | 3 + .../library/modules/es6.object.to-string.js | 0 .../library/modules/es6.parse-float.js | 4 + .../core-js/library/modules/es6.parse-int.js | 4 + .../core-js/library/modules/es6.promise.js | 273 + .../library/modules/es6.reflect.apply.js | 16 + .../library/modules/es6.reflect.construct.js | 47 + .../modules/es6.reflect.define-property.js | 23 + .../modules/es6.reflect.delete-property.js | 11 + .../library/modules/es6.reflect.enumerate.js | 26 + ...es6.reflect.get-own-property-descriptor.js | 10 + .../modules/es6.reflect.get-prototype-of.js | 10 + .../library/modules/es6.reflect.get.js | 21 + .../library/modules/es6.reflect.has.js | 8 + .../modules/es6.reflect.is-extensible.js | 11 + .../library/modules/es6.reflect.own-keys.js | 4 + .../modules/es6.reflect.prevent-extensions.js | 16 + .../modules/es6.reflect.set-prototype-of.js | 15 + .../library/modules/es6.reflect.set.js | 31 + .../library/modules/es6.regexp.constructor.js | 1 + .../library/modules/es6.regexp.flags.js | 0 .../library/modules/es6.regexp.match.js | 0 .../library/modules/es6.regexp.replace.js | 0 .../library/modules/es6.regexp.search.js | 0 .../library/modules/es6.regexp.split.js | 0 .../library/modules/es6.regexp.to-string.js | 0 .../core-js/library/modules/es6.set.js | 14 + .../library/modules/es6.string.anchor.js | 7 + .../core-js/library/modules/es6.string.big.js | 7 + .../library/modules/es6.string.blink.js | 7 + .../library/modules/es6.string.bold.js | 7 + .../modules/es6.string.code-point-at.js | 9 + .../library/modules/es6.string.ends-with.js | 20 + .../library/modules/es6.string.fixed.js | 7 + .../library/modules/es6.string.fontcolor.js | 7 + .../library/modules/es6.string.fontsize.js | 7 + .../modules/es6.string.from-code-point.js | 23 + .../library/modules/es6.string.includes.js | 12 + .../library/modules/es6.string.italics.js | 7 + .../library/modules/es6.string.iterator.js | 17 + .../library/modules/es6.string.link.js | 7 + .../core-js/library/modules/es6.string.raw.js | 18 + .../library/modules/es6.string.repeat.js | 6 + .../library/modules/es6.string.small.js | 7 + .../library/modules/es6.string.starts-with.js | 18 + .../library/modules/es6.string.strike.js | 7 + .../core-js/library/modules/es6.string.sub.js | 7 + .../core-js/library/modules/es6.string.sup.js | 7 + .../library/modules/es6.string.trim.js | 7 + .../core-js/library/modules/es6.symbol.js | 234 + .../library/modules/es6.typed.array-buffer.js | 46 + .../library/modules/es6.typed.data-view.js | 4 + .../modules/es6.typed.float32-array.js | 5 + .../modules/es6.typed.float64-array.js | 5 + .../library/modules/es6.typed.int16-array.js | 5 + .../library/modules/es6.typed.int32-array.js | 5 + .../library/modules/es6.typed.int8-array.js | 5 + .../library/modules/es6.typed.uint16-array.js | 5 + .../library/modules/es6.typed.uint32-array.js | 5 + .../library/modules/es6.typed.uint8-array.js | 5 + .../modules/es6.typed.uint8-clamped-array.js | 5 + .../core-js/library/modules/es6.weak-map.js | 59 + .../core-js/library/modules/es6.weak-set.js | 14 + .../library/modules/es7.array.flat-map.js | 22 + .../library/modules/es7.array.flatten.js | 21 + .../library/modules/es7.array.includes.js | 12 + .../core-js/library/modules/es7.asap.js | 12 + .../library/modules/es7.error.is-error.js | 9 + .../core-js/library/modules/es7.global.js | 4 + .../core-js/library/modules/es7.map.from.js | 2 + .../core-js/library/modules/es7.map.of.js | 2 + .../library/modules/es7.map.to-json.js | 4 + .../core-js/library/modules/es7.math.clamp.js | 8 + .../library/modules/es7.math.deg-per-rad.js | 4 + .../library/modules/es7.math.degrees.js | 9 + .../library/modules/es7.math.fscale.js | 10 + .../core-js/library/modules/es7.math.iaddh.js | 11 + .../core-js/library/modules/es7.math.imulh.js | 16 + .../core-js/library/modules/es7.math.isubh.js | 11 + .../library/modules/es7.math.rad-per-deg.js | 4 + .../library/modules/es7.math.radians.js | 9 + .../core-js/library/modules/es7.math.scale.js | 4 + .../library/modules/es7.math.signbit.js | 7 + .../core-js/library/modules/es7.math.umulh.js | 16 + .../modules/es7.object.define-getter.js | 12 + .../modules/es7.object.define-setter.js | 12 + .../library/modules/es7.object.entries.js | 9 + ...es7.object.get-own-property-descriptors.js | 22 + .../modules/es7.object.lookup-getter.js | 18 + .../modules/es7.object.lookup-setter.js | 18 + .../library/modules/es7.object.values.js | 9 + .../core-js/library/modules/es7.observable.js | 199 + .../library/modules/es7.promise.finally.js | 20 + .../library/modules/es7.promise.try.js | 12 + .../modules/es7.reflect.define-metadata.js | 8 + .../modules/es7.reflect.delete-metadata.js | 15 + .../modules/es7.reflect.get-metadata-keys.js | 19 + .../modules/es7.reflect.get-metadata.js | 17 + .../es7.reflect.get-own-metadata-keys.js | 8 + .../modules/es7.reflect.get-own-metadata.js | 9 + .../modules/es7.reflect.has-metadata.js | 16 + .../modules/es7.reflect.has-own-metadata.js | 9 + .../library/modules/es7.reflect.metadata.js | 15 + .../core-js/library/modules/es7.set.from.js | 2 + .../core-js/library/modules/es7.set.of.js | 2 + .../library/modules/es7.set.to-json.js | 4 + .../core-js/library/modules/es7.string.at.js | 10 + .../library/modules/es7.string.match-all.js | 30 + .../library/modules/es7.string.pad-end.js | 12 + .../library/modules/es7.string.pad-start.js | 12 + .../library/modules/es7.string.trim-left.js | 7 + .../library/modules/es7.string.trim-right.js | 7 + .../modules/es7.symbol.async-iterator.js | 1 + .../library/modules/es7.symbol.observable.js | 1 + .../library/modules/es7.system.global.js | 4 + .../library/modules/es7.weak-map.from.js | 2 + .../library/modules/es7.weak-map.of.js | 2 + .../library/modules/es7.weak-set.from.js | 2 + .../library/modules/es7.weak-set.of.js | 2 + .../library/modules/web.dom.iterable.js | 19 + .../core-js/library/modules/web.immediate.js | 6 + .../core-js/library/modules/web.timers.js | 20 + node_modules/core-js/library/shim.js | 197 + node_modules/core-js/library/stage/0.js | 10 + node_modules/core-js/library/stage/1.js | 23 + node_modules/core-js/library/stage/2.js | 4 + node_modules/core-js/library/stage/3.js | 4 + node_modules/core-js/library/stage/4.js | 11 + node_modules/core-js/library/stage/index.js | 1 + node_modules/core-js/library/stage/pre.js | 10 + .../core-js/library/web/dom-collections.js | 2 + node_modules/core-js/library/web/immediate.js | 2 + node_modules/core-js/library/web/index.js | 4 + node_modules/core-js/library/web/timers.js | 2 + node_modules/core-js/modules/_a-function.js | 4 + .../core-js/modules/_a-number-value.js | 5 + .../core-js/modules/_add-to-unscopables.js | 7 + node_modules/core-js/modules/_an-instance.js | 5 + node_modules/core-js/modules/_an-object.js | 5 + .../core-js/modules/_array-copy-within.js | 26 + node_modules/core-js/modules/_array-fill.js | 15 + .../core-js/modules/_array-from-iterable.js | 7 + .../core-js/modules/_array-includes.js | 23 + .../core-js/modules/_array-methods.js | 44 + node_modules/core-js/modules/_array-reduce.js | 28 + .../modules/_array-species-constructor.js | 16 + .../core-js/modules/_array-species-create.js | 6 + node_modules/core-js/modules/_bind.js | 25 + node_modules/core-js/modules/_classof.js | 23 + node_modules/core-js/modules/_cof.js | 5 + .../core-js/modules/_collection-strong.js | 144 + .../core-js/modules/_collection-to-json.js | 9 + .../core-js/modules/_collection-weak.js | 85 + node_modules/core-js/modules/_collection.js | 85 + node_modules/core-js/modules/_core.js | 2 + .../core-js/modules/_create-property.js | 8 + node_modules/core-js/modules/_ctx.js | 20 + .../core-js/modules/_date-to-iso-string.js | 26 + .../core-js/modules/_date-to-primitive.js | 9 + node_modules/core-js/modules/_defined.js | 5 + node_modules/core-js/modules/_descriptors.js | 4 + node_modules/core-js/modules/_dom-create.js | 7 + .../core-js/modules/_entry-virtual.js | 5 + .../core-js/modules/_enum-bug-keys.js | 4 + node_modules/core-js/modules/_enum-keys.js | 15 + node_modules/core-js/modules/_export.js | 43 + .../core-js/modules/_fails-is-regexp.js | 12 + node_modules/core-js/modules/_fails.js | 7 + node_modules/core-js/modules/_fix-re-wks.js | 28 + node_modules/core-js/modules/_flags.js | 13 + .../core-js/modules/_flatten-into-array.js | 39 + node_modules/core-js/modules/_for-of.js | 25 + node_modules/core-js/modules/_global.js | 6 + node_modules/core-js/modules/_has.js | 4 + node_modules/core-js/modules/_hide.js | 8 + node_modules/core-js/modules/_html.js | 2 + .../core-js/modules/_ie8-dom-define.js | 3 + .../core-js/modules/_inherit-if-required.js | 9 + node_modules/core-js/modules/_invoke.js | 16 + node_modules/core-js/modules/_iobject.js | 6 + .../core-js/modules/_is-array-iter.js | 8 + node_modules/core-js/modules/_is-array.js | 5 + node_modules/core-js/modules/_is-integer.js | 6 + node_modules/core-js/modules/_is-object.js | 3 + node_modules/core-js/modules/_is-regexp.js | 8 + node_modules/core-js/modules/_iter-call.js | 12 + node_modules/core-js/modules/_iter-create.js | 13 + node_modules/core-js/modules/_iter-define.js | 70 + node_modules/core-js/modules/_iter-detect.js | 22 + node_modules/core-js/modules/_iter-step.js | 3 + node_modules/core-js/modules/_iterators.js | 1 + node_modules/core-js/modules/_keyof.js | 10 + node_modules/core-js/modules/_library.js | 1 + node_modules/core-js/modules/_math-expm1.js | 10 + node_modules/core-js/modules/_math-fround.js | 23 + node_modules/core-js/modules/_math-log1p.js | 4 + node_modules/core-js/modules/_math-scale.js | 18 + node_modules/core-js/modules/_math-sign.js | 5 + node_modules/core-js/modules/_meta.js | 53 + node_modules/core-js/modules/_metadata.js | 51 + node_modules/core-js/modules/_microtask.js | 68 + .../modules/_new-promise-capability.js | 18 + .../core-js/modules/_object-assign.js | 34 + .../core-js/modules/_object-create.js | 41 + .../core-js/modules/_object-define.js | 13 + node_modules/core-js/modules/_object-dp.js | 16 + node_modules/core-js/modules/_object-dps.js | 13 + .../core-js/modules/_object-forced-pam.js | 9 + node_modules/core-js/modules/_object-gopd.js | 16 + .../core-js/modules/_object-gopn-ext.js | 19 + node_modules/core-js/modules/_object-gopn.js | 7 + node_modules/core-js/modules/_object-gops.js | 1 + node_modules/core-js/modules/_object-gpo.js | 13 + .../core-js/modules/_object-keys-internal.js | 17 + node_modules/core-js/modules/_object-keys.js | 7 + node_modules/core-js/modules/_object-pie.js | 1 + node_modules/core-js/modules/_object-sap.js | 10 + .../core-js/modules/_object-to-array.js | 16 + node_modules/core-js/modules/_own-keys.js | 10 + node_modules/core-js/modules/_parse-float.js | 8 + node_modules/core-js/modules/_parse-int.js | 9 + node_modules/core-js/modules/_partial.js | 25 + node_modules/core-js/modules/_path.js | 1 + node_modules/core-js/modules/_perform.js | 7 + .../core-js/modules/_promise-resolve.js | 12 + .../core-js/modules/_property-desc.js | 8 + node_modules/core-js/modules/_redefine-all.js | 5 + node_modules/core-js/modules/_redefine.js | 31 + node_modules/core-js/modules/_replacer.js | 8 + node_modules/core-js/modules/_same-value.js | 5 + .../core-js/modules/_set-collection-from.js | 28 + .../core-js/modules/_set-collection-of.js | 12 + node_modules/core-js/modules/_set-proto.js | 25 + node_modules/core-js/modules/_set-species.js | 13 + .../core-js/modules/_set-to-string-tag.js | 7 + node_modules/core-js/modules/_shared-key.js | 5 + node_modules/core-js/modules/_shared.js | 6 + .../core-js/modules/_species-constructor.js | 9 + .../core-js/modules/_strict-method.js | 9 + node_modules/core-js/modules/_string-at.js | 17 + .../core-js/modules/_string-context.js | 8 + node_modules/core-js/modules/_string-html.js | 19 + node_modules/core-js/modules/_string-pad.js | 16 + .../core-js/modules/_string-repeat.js | 12 + node_modules/core-js/modules/_string-trim.js | 30 + node_modules/core-js/modules/_string-ws.js | 2 + node_modules/core-js/modules/_task.js | 84 + .../core-js/modules/_to-absolute-index.js | 7 + node_modules/core-js/modules/_to-index.js | 10 + node_modules/core-js/modules/_to-integer.js | 6 + node_modules/core-js/modules/_to-iobject.js | 6 + node_modules/core-js/modules/_to-length.js | 6 + node_modules/core-js/modules/_to-object.js | 5 + node_modules/core-js/modules/_to-primitive.js | 12 + node_modules/core-js/modules/_typed-array.js | 480 + node_modules/core-js/modules/_typed-buffer.js | 276 + node_modules/core-js/modules/_typed.js | 28 + node_modules/core-js/modules/_uid.js | 5 + node_modules/core-js/modules/_user-agent.js | 4 + .../core-js/modules/_validate-collection.js | 5 + node_modules/core-js/modules/_wks-define.js | 9 + node_modules/core-js/modules/_wks-ext.js | 1 + node_modules/core-js/modules/_wks.js | 11 + node_modules/core-js/modules/core.delay.js | 12 + node_modules/core-js/modules/core.dict.js | 157 + .../core-js/modules/core.function.part.js | 7 + .../modules/core.get-iterator-method.js | 8 + .../core-js/modules/core.get-iterator.js | 7 + .../core-js/modules/core.is-iterable.js | 10 + .../core-js/modules/core.number.iterator.js | 9 + .../core-js/modules/core.object.classof.js | 3 + .../core-js/modules/core.object.define.js | 4 + .../core-js/modules/core.object.is-object.js | 3 + .../core-js/modules/core.object.make.js | 9 + .../core-js/modules/core.regexp.escape.js | 5 + .../modules/core.string.escape-html.js | 11 + .../modules/core.string.unescape-html.js | 11 + node_modules/core-js/modules/es5.js | 35 + .../core-js/modules/es6.array.copy-within.js | 6 + .../core-js/modules/es6.array.every.js | 10 + .../core-js/modules/es6.array.fill.js | 6 + .../core-js/modules/es6.array.filter.js | 10 + .../core-js/modules/es6.array.find-index.js | 14 + .../core-js/modules/es6.array.find.js | 14 + .../core-js/modules/es6.array.for-each.js | 11 + .../core-js/modules/es6.array.from.js | 37 + .../core-js/modules/es6.array.index-of.js | 15 + .../core-js/modules/es6.array.is-array.js | 4 + .../core-js/modules/es6.array.iterator.js | 34 + .../core-js/modules/es6.array.join.js | 12 + .../modules/es6.array.last-index-of.js | 22 + node_modules/core-js/modules/es6.array.map.js | 10 + node_modules/core-js/modules/es6.array.of.js | 19 + .../core-js/modules/es6.array.reduce-right.js | 10 + .../core-js/modules/es6.array.reduce.js | 10 + .../core-js/modules/es6.array.slice.js | 28 + .../core-js/modules/es6.array.some.js | 10 + .../core-js/modules/es6.array.sort.js | 23 + .../core-js/modules/es6.array.species.js | 1 + node_modules/core-js/modules/es6.date.now.js | 4 + .../core-js/modules/es6.date.to-iso-string.js | 8 + .../core-js/modules/es6.date.to-json.js | 16 + .../core-js/modules/es6.date.to-primitive.js | 4 + .../core-js/modules/es6.date.to-string.js | 12 + .../core-js/modules/es6.function.bind.js | 4 + .../modules/es6.function.has-instance.js | 13 + .../core-js/modules/es6.function.name.js | 16 + node_modules/core-js/modules/es6.map.js | 19 + .../core-js/modules/es6.math.acosh.js | 18 + .../core-js/modules/es6.math.asinh.js | 10 + .../core-js/modules/es6.math.atanh.js | 10 + node_modules/core-js/modules/es6.math.cbrt.js | 9 + .../core-js/modules/es6.math.clz32.js | 8 + node_modules/core-js/modules/es6.math.cosh.js | 9 + .../core-js/modules/es6.math.expm1.js | 5 + .../core-js/modules/es6.math.fround.js | 4 + .../core-js/modules/es6.math.hypot.js | 25 + node_modules/core-js/modules/es6.math.imul.js | 17 + .../core-js/modules/es6.math.log10.js | 8 + .../core-js/modules/es6.math.log1p.js | 4 + node_modules/core-js/modules/es6.math.log2.js | 8 + node_modules/core-js/modules/es6.math.sign.js | 4 + node_modules/core-js/modules/es6.math.sinh.js | 15 + node_modules/core-js/modules/es6.math.tanh.js | 12 + .../core-js/modules/es6.math.trunc.js | 8 + .../core-js/modules/es6.number.constructor.js | 69 + .../core-js/modules/es6.number.epsilon.js | 4 + .../core-js/modules/es6.number.is-finite.js | 9 + .../core-js/modules/es6.number.is-integer.js | 4 + .../core-js/modules/es6.number.is-nan.js | 9 + .../modules/es6.number.is-safe-integer.js | 10 + .../modules/es6.number.max-safe-integer.js | 4 + .../modules/es6.number.min-safe-integer.js | 4 + .../core-js/modules/es6.number.parse-float.js | 4 + .../core-js/modules/es6.number.parse-int.js | 4 + .../core-js/modules/es6.number.to-fixed.js | 114 + .../modules/es6.number.to-precision.js | 18 + .../core-js/modules/es6.object.assign.js | 4 + .../core-js/modules/es6.object.create.js | 3 + .../modules/es6.object.define-properties.js | 3 + .../modules/es6.object.define-property.js | 3 + .../core-js/modules/es6.object.freeze.js | 9 + .../es6.object.get-own-property-descriptor.js | 9 + .../es6.object.get-own-property-names.js | 4 + .../modules/es6.object.get-prototype-of.js | 9 + .../modules/es6.object.is-extensible.js | 8 + .../core-js/modules/es6.object.is-frozen.js | 8 + .../core-js/modules/es6.object.is-sealed.js | 8 + node_modules/core-js/modules/es6.object.is.js | 3 + .../core-js/modules/es6.object.keys.js | 9 + .../modules/es6.object.prevent-extensions.js | 9 + .../core-js/modules/es6.object.seal.js | 9 + .../modules/es6.object.set-prototype-of.js | 3 + .../core-js/modules/es6.object.to-string.js | 10 + .../core-js/modules/es6.parse-float.js | 4 + node_modules/core-js/modules/es6.parse-int.js | 4 + node_modules/core-js/modules/es6.promise.js | 273 + .../core-js/modules/es6.reflect.apply.js | 16 + .../core-js/modules/es6.reflect.construct.js | 47 + .../modules/es6.reflect.define-property.js | 23 + .../modules/es6.reflect.delete-property.js | 11 + .../core-js/modules/es6.reflect.enumerate.js | 26 + ...es6.reflect.get-own-property-descriptor.js | 10 + .../modules/es6.reflect.get-prototype-of.js | 10 + .../core-js/modules/es6.reflect.get.js | 21 + .../core-js/modules/es6.reflect.has.js | 8 + .../modules/es6.reflect.is-extensible.js | 11 + .../core-js/modules/es6.reflect.own-keys.js | 4 + .../modules/es6.reflect.prevent-extensions.js | 16 + .../modules/es6.reflect.set-prototype-of.js | 15 + .../core-js/modules/es6.reflect.set.js | 31 + .../core-js/modules/es6.regexp.constructor.js | 43 + .../core-js/modules/es6.regexp.flags.js | 5 + .../core-js/modules/es6.regexp.match.js | 10 + .../core-js/modules/es6.regexp.replace.js | 12 + .../core-js/modules/es6.regexp.search.js | 10 + .../core-js/modules/es6.regexp.split.js | 71 + .../core-js/modules/es6.regexp.to-string.js | 25 + node_modules/core-js/modules/es6.set.js | 14 + .../core-js/modules/es6.string.anchor.js | 7 + .../core-js/modules/es6.string.big.js | 7 + .../core-js/modules/es6.string.blink.js | 7 + .../core-js/modules/es6.string.bold.js | 7 + .../modules/es6.string.code-point-at.js | 9 + .../core-js/modules/es6.string.ends-with.js | 20 + .../core-js/modules/es6.string.fixed.js | 7 + .../core-js/modules/es6.string.fontcolor.js | 7 + .../core-js/modules/es6.string.fontsize.js | 7 + .../modules/es6.string.from-code-point.js | 23 + .../core-js/modules/es6.string.includes.js | 12 + .../core-js/modules/es6.string.italics.js | 7 + .../core-js/modules/es6.string.iterator.js | 17 + .../core-js/modules/es6.string.link.js | 7 + .../core-js/modules/es6.string.raw.js | 18 + .../core-js/modules/es6.string.repeat.js | 6 + .../core-js/modules/es6.string.small.js | 7 + .../core-js/modules/es6.string.starts-with.js | 18 + .../core-js/modules/es6.string.strike.js | 7 + .../core-js/modules/es6.string.sub.js | 7 + .../core-js/modules/es6.string.sup.js | 7 + .../core-js/modules/es6.string.trim.js | 7 + node_modules/core-js/modules/es6.symbol.js | 234 + .../core-js/modules/es6.typed.array-buffer.js | 46 + .../core-js/modules/es6.typed.data-view.js | 4 + .../modules/es6.typed.float32-array.js | 5 + .../modules/es6.typed.float64-array.js | 5 + .../core-js/modules/es6.typed.int16-array.js | 5 + .../core-js/modules/es6.typed.int32-array.js | 5 + .../core-js/modules/es6.typed.int8-array.js | 5 + .../core-js/modules/es6.typed.uint16-array.js | 5 + .../core-js/modules/es6.typed.uint32-array.js | 5 + .../core-js/modules/es6.typed.uint8-array.js | 5 + .../modules/es6.typed.uint8-clamped-array.js | 5 + node_modules/core-js/modules/es6.weak-map.js | 59 + node_modules/core-js/modules/es6.weak-set.js | 14 + .../core-js/modules/es7.array.flat-map.js | 22 + .../core-js/modules/es7.array.flatten.js | 21 + .../core-js/modules/es7.array.includes.js | 12 + node_modules/core-js/modules/es7.asap.js | 12 + .../core-js/modules/es7.error.is-error.js | 9 + node_modules/core-js/modules/es7.global.js | 4 + node_modules/core-js/modules/es7.map.from.js | 2 + node_modules/core-js/modules/es7.map.of.js | 2 + .../core-js/modules/es7.map.to-json.js | 4 + .../core-js/modules/es7.math.clamp.js | 8 + .../core-js/modules/es7.math.deg-per-rad.js | 4 + .../core-js/modules/es7.math.degrees.js | 9 + .../core-js/modules/es7.math.fscale.js | 10 + .../core-js/modules/es7.math.iaddh.js | 11 + .../core-js/modules/es7.math.imulh.js | 16 + .../core-js/modules/es7.math.isubh.js | 11 + .../core-js/modules/es7.math.rad-per-deg.js | 4 + .../core-js/modules/es7.math.radians.js | 9 + .../core-js/modules/es7.math.scale.js | 4 + .../core-js/modules/es7.math.signbit.js | 7 + .../core-js/modules/es7.math.umulh.js | 16 + .../modules/es7.object.define-getter.js | 12 + .../modules/es7.object.define-setter.js | 12 + .../core-js/modules/es7.object.entries.js | 9 + ...es7.object.get-own-property-descriptors.js | 22 + .../modules/es7.object.lookup-getter.js | 18 + .../modules/es7.object.lookup-setter.js | 18 + .../core-js/modules/es7.object.values.js | 9 + .../core-js/modules/es7.observable.js | 199 + .../core-js/modules/es7.promise.finally.js | 20 + .../core-js/modules/es7.promise.try.js | 12 + .../modules/es7.reflect.define-metadata.js | 8 + .../modules/es7.reflect.delete-metadata.js | 15 + .../modules/es7.reflect.get-metadata-keys.js | 19 + .../modules/es7.reflect.get-metadata.js | 17 + .../es7.reflect.get-own-metadata-keys.js | 8 + .../modules/es7.reflect.get-own-metadata.js | 9 + .../modules/es7.reflect.has-metadata.js | 16 + .../modules/es7.reflect.has-own-metadata.js | 9 + .../core-js/modules/es7.reflect.metadata.js | 15 + node_modules/core-js/modules/es7.set.from.js | 2 + node_modules/core-js/modules/es7.set.of.js | 2 + .../core-js/modules/es7.set.to-json.js | 4 + node_modules/core-js/modules/es7.string.at.js | 10 + .../core-js/modules/es7.string.match-all.js | 30 + .../core-js/modules/es7.string.pad-end.js | 12 + .../core-js/modules/es7.string.pad-start.js | 12 + .../core-js/modules/es7.string.trim-left.js | 7 + .../core-js/modules/es7.string.trim-right.js | 7 + .../modules/es7.symbol.async-iterator.js | 1 + .../core-js/modules/es7.symbol.observable.js | 1 + .../core-js/modules/es7.system.global.js | 4 + .../core-js/modules/es7.weak-map.from.js | 2 + .../core-js/modules/es7.weak-map.of.js | 2 + .../core-js/modules/es7.weak-set.from.js | 2 + .../core-js/modules/es7.weak-set.of.js | 2 + .../modules/library/_add-to-unscopables.js | 1 + .../core-js/modules/library/_collection.js | 59 + .../core-js/modules/library/_export.js | 61 + .../core-js/modules/library/_library.js | 1 + node_modules/core-js/modules/library/_path.js | 1 + .../core-js/modules/library/_redefine-all.js | 7 + .../core-js/modules/library/_redefine.js | 1 + .../core-js/modules/library/_set-species.js | 14 + .../modules/library/es6.date.to-json.js | 19 + .../modules/library/es6.date.to-primitive.js | 0 .../modules/library/es6.date.to-string.js | 0 .../modules/library/es6.function.name.js | 0 .../modules/library/es6.number.constructor.js | 0 .../modules/library/es6.object.to-string.js | 0 .../modules/library/es6.regexp.constructor.js | 1 + .../modules/library/es6.regexp.flags.js | 0 .../modules/library/es6.regexp.match.js | 0 .../modules/library/es6.regexp.replace.js | 0 .../modules/library/es6.regexp.search.js | 0 .../modules/library/es6.regexp.split.js | 0 .../modules/library/es6.regexp.to-string.js | 0 .../modules/library/web.dom.iterable.js | 19 + .../core-js/modules/web.dom.iterable.js | 58 + node_modules/core-js/modules/web.immediate.js | 6 + node_modules/core-js/modules/web.timers.js | 20 + node_modules/core-js/package.json | 101 + node_modules/core-js/shim.js | 197 + node_modules/core-js/stage/0.js | 10 + node_modules/core-js/stage/1.js | 23 + node_modules/core-js/stage/2.js | 4 + node_modules/core-js/stage/3.js | 4 + node_modules/core-js/stage/4.js | 11 + node_modules/core-js/stage/index.js | 1 + node_modules/core-js/stage/pre.js | 10 + node_modules/core-js/web/dom-collections.js | 2 + node_modules/core-js/web/immediate.js | 2 + node_modules/core-js/web/index.js | 4 + node_modules/core-js/web/timers.js | 2 + node_modules/core-util-is/LICENSE | 19 + node_modules/core-util-is/README.md | 3 + node_modules/core-util-is/float.patch | 604 + node_modules/core-util-is/lib/util.js | 107 + node_modules/core-util-is/package.json | 62 + node_modules/core-util-is/test.js | 68 + node_modules/create-error-class/index.js | 44 + node_modules/create-error-class/license | 21 + node_modules/create-error-class/package.json | 60 + node_modules/create-error-class/readme.md | 54 + node_modules/cross-spawn/CHANGELOG.md | 6 + node_modules/cross-spawn/LICENSE | 19 + node_modules/cross-spawn/README.md | 85 + node_modules/cross-spawn/index.js | 59 + node_modules/cross-spawn/lib/enoent.js | 73 + node_modules/cross-spawn/lib/parse.js | 113 + .../cross-spawn/lib/util/escapeArgument.js | 30 + .../cross-spawn/lib/util/escapeCommand.js | 12 + .../lib/util/hasEmptyArgumentBug.js | 18 + .../cross-spawn/lib/util/readShebang.js | 37 + .../cross-spawn/lib/util/resolveCommand.js | 31 + node_modules/cross-spawn/package.json | 83 + node_modules/crypto-random-string/index.js | 10 + node_modules/crypto-random-string/license | 21 + .../crypto-random-string/package.json | 75 + node_modules/crypto-random-string/readme.md | 49 + node_modules/d/.lint | 11 + node_modules/d/.npmignore | 4 + node_modules/d/.travis.yml | 15 + node_modules/d/CHANGES | 13 + node_modules/d/LICENSE | 19 + node_modules/d/README.md | 104 + node_modules/d/auto-bind.js | 32 + node_modules/d/index.js | 63 + node_modules/d/lazy.js | 117 + node_modules/d/package.json | 72 + node_modules/d/test/auto-bind.js | 12 + node_modules/d/test/index.js | 182 + node_modules/d/test/lazy.js | 82 + node_modules/debug/.coveralls.yml | 1 + node_modules/debug/.eslintrc | 11 + node_modules/debug/.npmignore | 9 + node_modules/debug/.travis.yml | 14 + node_modules/debug/CHANGELOG.md | 362 + node_modules/debug/LICENSE | 19 + node_modules/debug/Makefile | 50 + node_modules/debug/README.md | 312 + node_modules/debug/component.json | 19 + node_modules/debug/karma.conf.js | 70 + node_modules/debug/node.js | 1 + node_modules/debug/package.json | 95 + node_modules/debug/src/browser.js | 185 + node_modules/debug/src/debug.js | 202 + node_modules/debug/src/index.js | 10 + node_modules/debug/src/inspector-log.js | 15 + node_modules/debug/src/node.js | 248 + node_modules/decamelize/index.js | 13 + node_modules/decamelize/license | 21 + node_modules/decamelize/package.json | 70 + node_modules/decamelize/readme.md | 48 + node_modules/decode-uri-component/index.js | 94 + node_modules/decode-uri-component/license | 21 + .../decode-uri-component/package.json | 69 + node_modules/decode-uri-component/readme.md | 70 + node_modules/deep-extend/CHANGELOG.md | 21 + node_modules/deep-extend/LICENSE | 20 + node_modules/deep-extend/README.md | 90 + node_modules/deep-extend/index.js | 1 + node_modules/deep-extend/lib/deep-extend.js | 144 + node_modules/deep-extend/package.json | 93 + node_modules/define-property/CHANGELOG.md | 82 + node_modules/define-property/LICENSE | 21 + node_modules/define-property/README.md | 117 + node_modules/define-property/index.js | 38 + node_modules/define-property/package.json | 106 + node_modules/depd/History.md | 96 + node_modules/depd/LICENSE | 22 + node_modules/depd/Readme.md | 280 + node_modules/depd/index.js | 522 + node_modules/depd/lib/browser/index.js | 77 + .../depd/lib/compat/callsite-tostring.js | 103 + .../depd/lib/compat/event-listener-count.js | 22 + node_modules/depd/lib/compat/index.js | 79 + node_modules/depd/package.json | 82 + node_modules/destroy/LICENSE | 22 + node_modules/destroy/README.md | 60 + node_modules/destroy/index.js | 75 + node_modules/destroy/package.json | 74 + node_modules/dot-prop/index.js | 123 + node_modules/dot-prop/license | 21 + node_modules/dot-prop/package.json | 80 + node_modules/dot-prop/readme.md | 103 + node_modules/dottie/.npmignore | 1 + node_modules/dottie/.travis.yml | 5 + node_modules/dottie/LICENSE | 23 + node_modules/dottie/README.md | 107 + node_modules/dottie/dottie.js | 244 + node_modules/dottie/package.json | 53 + node_modules/dottie/test/find.test.js | 19 + node_modules/dottie/test/flatten.test.js | 40 + node_modules/dottie/test/get.test.js | 112 + node_modules/dottie/test/paths.test.js | 26 + node_modules/dottie/test/set.test.js | 48 + node_modules/dottie/test/transform.test.js | 148 + node_modules/duplexer/.npmignore | 3 + node_modules/duplexer/.travis.yml | 6 + node_modules/duplexer/LICENCE | 19 + node_modules/duplexer/README.md | 47 + node_modules/duplexer/index.js | 87 + node_modules/duplexer/package.json | 79 + node_modules/duplexer/test/index.js | 31 + node_modules/duplexer3/LICENSE.md | 26 + node_modules/duplexer3/README.md | 115 + node_modules/duplexer3/index.js | 76 + node_modules/duplexer3/package.json | 64 + node_modules/editorconfig/.gitmodules | 3 + node_modules/editorconfig/LICENSE | 19 + node_modules/editorconfig/README.md | 203 + node_modules/editorconfig/bin/editorconfig | 42 + node_modules/editorconfig/editorconfig.js | 237 + node_modules/editorconfig/lib/fnmatch.js | 1080 + node_modules/editorconfig/lib/ini.js | 63 + .../editorconfig/node_modules/.bin/semver | 1 + .../node_modules/lru-cache/.npmignore | 1 + .../node_modules/lru-cache/.travis.yml | 8 + .../node_modules/lru-cache/CONTRIBUTORS | 14 + .../node_modules/lru-cache/LICENSE | 15 + .../node_modules/lru-cache/README.md | 132 + .../node_modules/lru-cache/lib/lru-cache.js | 356 + .../node_modules/lru-cache/package.json | 59 + .../node_modules/lru-cache/test/basic.js | 427 + .../node_modules/lru-cache/test/foreach.js | 130 + .../lru-cache/test/memory-leak.js | 51 + .../node_modules/lru-cache/test/overflow.js | 45 + .../node_modules/lru-cache/test/serialize.js | 224 + .../editorconfig/node_modules/semver/LICENSE | 15 + .../node_modules/semver/README.md | 388 + .../node_modules/semver/bin/semver | 143 + .../node_modules/semver/package.json | 54 + .../node_modules/semver/range.bnf | 16 + .../node_modules/semver/semver.js | 1324 + node_modules/editorconfig/package.json | 88 + node_modules/ee-first/LICENSE | 22 + node_modules/ee-first/README.md | 80 + node_modules/ee-first/index.js | 95 + node_modules/ee-first/package.json | 66 + node_modules/ejs/Jakefile | 70 + node_modules/ejs/LICENSE | 202 + node_modules/ejs/README.md | 257 + node_modules/ejs/ejs.js | 1494 + node_modules/ejs/ejs.min.js | 1 + node_modules/ejs/lib/ejs.js | 866 + node_modules/ejs/lib/utils.js | 164 + node_modules/ejs/package.json | 82 + node_modules/encodeurl/HISTORY.md | 14 + node_modules/encodeurl/LICENSE | 22 + node_modules/encodeurl/README.md | 128 + node_modules/encodeurl/index.js | 60 + node_modules/encodeurl/package.json | 81 + node_modules/error-ex/LICENSE | 21 + node_modules/error-ex/README.md | 144 + node_modules/error-ex/index.js | 133 + node_modules/error-ex/package.json | 86 + node_modules/es5-ext/.editorconfig | 14 + node_modules/es5-ext/CHANGELOG.md | 259 + node_modules/es5-ext/CHANGES | 650 + node_modules/es5-ext/LICENSE | 21 + node_modules/es5-ext/README.md | 1018 + .../es5-ext/array/#/@@iterator/implement.js | 10 + .../es5-ext/array/#/@@iterator/index.js | 4 + .../array/#/@@iterator/is-implemented.js | 16 + .../es5-ext/array/#/@@iterator/shim.js | 3 + .../es5-ext/array/#/_compare-by-length.js | 9 + node_modules/es5-ext/array/#/binary-search.js | 28 + node_modules/es5-ext/array/#/clear.js | 12 + node_modules/es5-ext/array/#/compact.js | 13 + .../es5-ext/array/#/concat/implement.js | 8 + node_modules/es5-ext/array/#/concat/index.js | 4 + .../es5-ext/array/#/concat/is-implemented.js | 7 + node_modules/es5-ext/array/#/concat/shim.js | 48 + node_modules/es5-ext/array/#/contains.js | 7 + .../es5-ext/array/#/copy-within/implement.js | 10 + .../es5-ext/array/#/copy-within/index.js | 4 + .../array/#/copy-within/is-implemented.js | 7 + .../es5-ext/array/#/copy-within/shim.js | 45 + node_modules/es5-ext/array/#/diff.js | 13 + node_modules/es5-ext/array/#/e-index-of.js | 28 + .../es5-ext/array/#/e-last-index-of.js | 31 + .../es5-ext/array/#/entries/implement.js | 8 + node_modules/es5-ext/array/#/entries/index.js | 4 + .../es5-ext/array/#/entries/is-implemented.js | 15 + node_modules/es5-ext/array/#/entries/shim.js | 6 + node_modules/es5-ext/array/#/exclusion.js | 31 + .../es5-ext/array/#/fill/implement.js | 8 + node_modules/es5-ext/array/#/fill/index.js | 4 + .../es5-ext/array/#/fill/is-implemented.js | 7 + node_modules/es5-ext/array/#/fill/shim.js | 25 + .../es5-ext/array/#/filter/implement.js | 8 + node_modules/es5-ext/array/#/filter/index.js | 4 + .../es5-ext/array/#/filter/is-implemented.js | 11 + node_modules/es5-ext/array/#/filter/shim.js | 23 + .../es5-ext/array/#/find-index/implement.js | 9 + .../es5-ext/array/#/find-index/index.js | 4 + .../array/#/find-index/is-implemented.js | 11 + .../es5-ext/array/#/find-index/shim.js | 26 + .../es5-ext/array/#/find/implement.js | 8 + node_modules/es5-ext/array/#/find/index.js | 4 + .../es5-ext/array/#/find/is-implemented.js | 11 + node_modules/es5-ext/array/#/find/shim.js | 9 + node_modules/es5-ext/array/#/first-index.js | 15 + node_modules/es5-ext/array/#/first.js | 9 + node_modules/es5-ext/array/#/flatten.js | 40 + .../es5-ext/array/#/for-each-right.js | 19 + node_modules/es5-ext/array/#/group.js | 28 + node_modules/es5-ext/array/#/index.js | 41 + node_modules/es5-ext/array/#/indexes-of.js | 12 + node_modules/es5-ext/array/#/intersection.js | 21 + node_modules/es5-ext/array/#/is-copy.js | 21 + node_modules/es5-ext/array/#/is-empty.js | 8 + node_modules/es5-ext/array/#/is-uniq.js | 14 + .../es5-ext/array/#/keys/implement.js | 8 + node_modules/es5-ext/array/#/keys/index.js | 4 + .../es5-ext/array/#/keys/is-implemented.js | 14 + node_modules/es5-ext/array/#/keys/shim.js | 6 + node_modules/es5-ext/array/#/last-index.js | 15 + node_modules/es5-ext/array/#/last.js | 9 + node_modules/es5-ext/array/#/map/implement.js | 8 + node_modules/es5-ext/array/#/map/index.js | 4 + .../es5-ext/array/#/map/is-implemented.js | 8 + node_modules/es5-ext/array/#/map/shim.js | 21 + node_modules/es5-ext/array/#/remove.js | 17 + node_modules/es5-ext/array/#/separate.js | 12 + .../es5-ext/array/#/slice/implement.js | 8 + node_modules/es5-ext/array/#/slice/index.js | 4 + .../es5-ext/array/#/slice/is-implemented.js | 7 + node_modules/es5-ext/array/#/slice/shim.js | 36 + node_modules/es5-ext/array/#/some-right.js | 21 + .../es5-ext/array/#/splice/implement.js | 8 + node_modules/es5-ext/array/#/splice/index.js | 4 + .../es5-ext/array/#/splice/is-implemented.js | 7 + node_modules/es5-ext/array/#/splice/shim.js | 17 + node_modules/es5-ext/array/#/uniq.js | 15 + .../es5-ext/array/#/values/implement.js | 8 + node_modules/es5-ext/array/#/values/index.js | 3 + .../es5-ext/array/#/values/is-implemented.js | 14 + node_modules/es5-ext/array/#/values/shim.js | 6 + node_modules/es5-ext/array/_is-extensible.js | 13 + .../es5-ext/array/_sub-array-dummy-safe.js | 25 + .../es5-ext/array/_sub-array-dummy.js | 20 + node_modules/es5-ext/array/from/implement.js | 8 + node_modules/es5-ext/array/from/index.js | 5 + .../es5-ext/array/from/is-implemented.js | 9 + node_modules/es5-ext/array/from/shim.js | 119 + node_modules/es5-ext/array/generate.js | 18 + node_modules/es5-ext/array/index.js | 11 + node_modules/es5-ext/array/is-plain-array.js | 11 + node_modules/es5-ext/array/of/implement.js | 8 + node_modules/es5-ext/array/of/index.js | 5 + .../es5-ext/array/of/is-implemented.js | 8 + node_modules/es5-ext/array/of/shim.js | 19 + node_modules/es5-ext/array/to-array.js | 9 + node_modules/es5-ext/array/valid-array.js | 8 + node_modules/es5-ext/boolean/index.js | 5 + node_modules/es5-ext/boolean/is-boolean.js | 10 + node_modules/es5-ext/date/#/copy.js | 7 + node_modules/es5-ext/date/#/days-in-month.js | 17 + node_modules/es5-ext/date/#/floor-day.js | 8 + node_modules/es5-ext/date/#/floor-month.js | 8 + node_modules/es5-ext/date/#/floor-year.js | 8 + node_modules/es5-ext/date/#/format.js | 38 + node_modules/es5-ext/date/#/index.js | 10 + .../es5-ext/date/ensure-time-value.js | 10 + node_modules/es5-ext/date/index.js | 9 + node_modules/es5-ext/date/is-date.js | 7 + node_modules/es5-ext/date/is-time-value.js | 12 + node_modules/es5-ext/date/valid-date.js | 8 + node_modules/es5-ext/error/#/index.js | 5 + node_modules/es5-ext/error/#/throw.js | 7 + node_modules/es5-ext/error/custom.js | 20 + node_modules/es5-ext/error/index.js | 8 + node_modules/es5-ext/error/is-error.js | 7 + node_modules/es5-ext/error/valid-error.js | 8 + node_modules/es5-ext/function/#/compose.js | 22 + node_modules/es5-ext/function/#/copy.js | 23 + node_modules/es5-ext/function/#/curry.js | 24 + node_modules/es5-ext/function/#/index.js | 12 + node_modules/es5-ext/function/#/lock.js | 14 + node_modules/es5-ext/function/#/not.js | 14 + node_modules/es5-ext/function/#/partial.js | 16 + node_modules/es5-ext/function/#/spread.js | 12 + .../es5-ext/function/#/to-string-tokens.js | 17 + .../es5-ext/function/_define-length.js | 56 + node_modules/es5-ext/function/constant.js | 7 + node_modules/es5-ext/function/identity.js | 5 + node_modules/es5-ext/function/index.js | 15 + node_modules/es5-ext/function/invoke.js | 15 + node_modules/es5-ext/function/is-arguments.js | 12 + node_modules/es5-ext/function/is-function.js | 7 + node_modules/es5-ext/function/noop.js | 4 + node_modules/es5-ext/function/pluck.js | 9 + .../es5-ext/function/valid-function.js | 8 + node_modules/es5-ext/global.js | 5 + node_modules/es5-ext/index.js | 22 + node_modules/es5-ext/iterable/for-each.js | 12 + node_modules/es5-ext/iterable/index.js | 8 + node_modules/es5-ext/iterable/is.js | 11 + .../es5-ext/iterable/validate-object.js | 9 + node_modules/es5-ext/iterable/validate.js | 8 + node_modules/es5-ext/json/index.js | 5 + node_modules/es5-ext/json/safe-stringify.js | 41 + node_modules/es5-ext/math/_pack-ieee754.js | 88 + node_modules/es5-ext/math/_unpack-ieee754.js | 33 + node_modules/es5-ext/math/acosh/implement.js | 8 + node_modules/es5-ext/math/acosh/index.js | 5 + .../es5-ext/math/acosh/is-implemented.js | 7 + node_modules/es5-ext/math/acosh/shim.js | 12 + node_modules/es5-ext/math/asinh/implement.js | 8 + node_modules/es5-ext/math/asinh/index.js | 5 + .../es5-ext/math/asinh/is-implemented.js | 7 + node_modules/es5-ext/math/asinh/shim.js | 15 + node_modules/es5-ext/math/atanh/implement.js | 8 + node_modules/es5-ext/math/atanh/index.js | 5 + .../es5-ext/math/atanh/is-implemented.js | 7 + node_modules/es5-ext/math/atanh/shim.js | 14 + node_modules/es5-ext/math/cbrt/implement.js | 8 + node_modules/es5-ext/math/cbrt/index.js | 5 + .../es5-ext/math/cbrt/is-implemented.js | 7 + node_modules/es5-ext/math/cbrt/shim.js | 12 + node_modules/es5-ext/math/clz32/implement.js | 8 + node_modules/es5-ext/math/clz32/index.js | 5 + .../es5-ext/math/clz32/is-implemented.js | 7 + node_modules/es5-ext/math/clz32/shim.js | 7 + node_modules/es5-ext/math/cosh/implement.js | 8 + node_modules/es5-ext/math/cosh/index.js | 5 + .../es5-ext/math/cosh/is-implemented.js | 7 + node_modules/es5-ext/math/cosh/shim.js | 11 + node_modules/es5-ext/math/expm1/implement.js | 8 + node_modules/es5-ext/math/expm1/index.js | 5 + .../es5-ext/math/expm1/is-implemented.js | 7 + node_modules/es5-ext/math/expm1/shim.js | 16 + node_modules/es5-ext/math/fround/implement.js | 8 + node_modules/es5-ext/math/fround/index.js | 5 + .../es5-ext/math/fround/is-implemented.js | 7 + node_modules/es5-ext/math/fround/shim.js | 35 + node_modules/es5-ext/math/hypot/implement.js | 8 + node_modules/es5-ext/math/hypot/index.js | 5 + .../es5-ext/math/hypot/is-implemented.js | 7 + node_modules/es5-ext/math/hypot/shim.js | 43 + node_modules/es5-ext/math/imul/implement.js | 8 + node_modules/es5-ext/math/imul/index.js | 5 + .../es5-ext/math/imul/is-implemented.js | 7 + node_modules/es5-ext/math/imul/shim.js | 17 + node_modules/es5-ext/math/index.js | 21 + node_modules/es5-ext/math/log10/implement.js | 8 + node_modules/es5-ext/math/log10/index.js | 5 + .../es5-ext/math/log10/is-implemented.js | 7 + node_modules/es5-ext/math/log10/shim.js | 14 + node_modules/es5-ext/math/log1p/implement.js | 8 + node_modules/es5-ext/math/log1p/index.js | 5 + .../es5-ext/math/log1p/is-implemented.js | 7 + node_modules/es5-ext/math/log1p/shim.js | 17 + node_modules/es5-ext/math/log2/implement.js | 8 + node_modules/es5-ext/math/log2/index.js | 5 + .../es5-ext/math/log2/is-implemented.js | 7 + node_modules/es5-ext/math/log2/shim.js | 14 + node_modules/es5-ext/math/sign/implement.js | 8 + node_modules/es5-ext/math/sign/index.js | 5 + .../es5-ext/math/sign/is-implemented.js | 7 + node_modules/es5-ext/math/sign/shim.js | 7 + node_modules/es5-ext/math/sinh/implement.js | 8 + node_modules/es5-ext/math/sinh/index.js | 5 + .../es5-ext/math/sinh/is-implemented.js | 7 + node_modules/es5-ext/math/sinh/shim.js | 18 + node_modules/es5-ext/math/tanh/implement.js | 8 + node_modules/es5-ext/math/tanh/index.js | 5 + .../es5-ext/math/tanh/is-implemented.js | 7 + node_modules/es5-ext/math/tanh/shim.js | 17 + node_modules/es5-ext/math/trunc/implement.js | 8 + node_modules/es5-ext/math/trunc/index.js | 5 + .../es5-ext/math/trunc/is-implemented.js | 7 + node_modules/es5-ext/math/trunc/shim.js | 13 + node_modules/es5-ext/number/#/index.js | 5 + node_modules/es5-ext/number/#/pad.js | 15 + .../es5-ext/number/epsilon/implement.js | 8 + node_modules/es5-ext/number/epsilon/index.js | 3 + .../es5-ext/number/epsilon/is-implemented.js | 5 + node_modules/es5-ext/number/index.js | 17 + .../es5-ext/number/is-finite/implement.js | 8 + .../es5-ext/number/is-finite/index.js | 5 + .../number/is-finite/is-implemented.js | 7 + node_modules/es5-ext/number/is-finite/shim.js | 5 + .../es5-ext/number/is-integer/implement.js | 8 + .../es5-ext/number/is-integer/index.js | 5 + .../number/is-integer/is-implemented.js | 7 + .../es5-ext/number/is-integer/shim.js | 8 + .../es5-ext/number/is-nan/implement.js | 8 + node_modules/es5-ext/number/is-nan/index.js | 5 + .../es5-ext/number/is-nan/is-implemented.js | 7 + node_modules/es5-ext/number/is-nan/shim.js | 6 + node_modules/es5-ext/number/is-natural.js | 7 + node_modules/es5-ext/number/is-number.js | 10 + .../number/is-safe-integer/implement.js | 8 + .../es5-ext/number/is-safe-integer/index.js | 5 + .../number/is-safe-integer/is-implemented.js | 8 + .../es5-ext/number/is-safe-integer/shim.js | 11 + .../number/max-safe-integer/implement.js | 8 + .../es5-ext/number/max-safe-integer/index.js | 3 + .../number/max-safe-integer/is-implemented.js | 5 + .../number/min-safe-integer/implement.js | 8 + .../es5-ext/number/min-safe-integer/index.js | 3 + .../number/min-safe-integer/is-implemented.js | 5 + node_modules/es5-ext/number/to-integer.js | 12 + node_modules/es5-ext/number/to-pos-integer.js | 9 + node_modules/es5-ext/number/to-uint32.js | 6 + node_modules/es5-ext/object/_iterate.js | 30 + node_modules/es5-ext/object/assign-deep.js | 33 + .../es5-ext/object/assign/implement.js | 8 + node_modules/es5-ext/object/assign/index.js | 5 + .../es5-ext/object/assign/is-implemented.js | 9 + node_modules/es5-ext/object/assign/shim.js | 23 + node_modules/es5-ext/object/clear.js | 16 + node_modules/es5-ext/object/compact.js | 10 + node_modules/es5-ext/object/compare.js | 45 + node_modules/es5-ext/object/copy-deep.js | 37 + node_modules/es5-ext/object/copy.js | 19 + node_modules/es5-ext/object/count.js | 7 + node_modules/es5-ext/object/create.js | 48 + node_modules/es5-ext/object/ensure-array.js | 9 + .../es5-ext/object/ensure-finite-number.js | 9 + .../object/ensure-natural-number-value.js | 10 + .../es5-ext/object/ensure-natural-number.js | 10 + node_modules/es5-ext/object/ensure-promise.js | 9 + node_modules/es5-ext/object/eq.js | 7 + node_modules/es5-ext/object/every.js | 3 + node_modules/es5-ext/object/filter.js | 14 + node_modules/es5-ext/object/find-key.js | 3 + node_modules/es5-ext/object/find.js | 10 + node_modules/es5-ext/object/first-key.js | 13 + node_modules/es5-ext/object/flatten.js | 17 + node_modules/es5-ext/object/for-each.js | 3 + .../es5-ext/object/get-property-names.js | 17 + node_modules/es5-ext/object/index.js | 63 + node_modules/es5-ext/object/is-array-like.js | 17 + node_modules/es5-ext/object/is-callable.js | 7 + node_modules/es5-ext/object/is-copy-deep.js | 59 + node_modules/es5-ext/object/is-copy.js | 23 + node_modules/es5-ext/object/is-empty.js | 14 + .../es5-ext/object/is-finite-number.js | 7 + .../es5-ext/object/is-natural-number-value.js | 9 + .../es5-ext/object/is-natural-number.js | 7 + .../es5-ext/object/is-number-value.js | 12 + node_modules/es5-ext/object/is-object.js | 9 + .../es5-ext/object/is-plain-function.js | 11 + .../es5-ext/object/is-plain-object.js | 20 + node_modules/es5-ext/object/is-promise.js | 8 + node_modules/es5-ext/object/is-value.js | 7 + node_modules/es5-ext/object/is.js | 10 + node_modules/es5-ext/object/key-of.js | 17 + node_modules/es5-ext/object/keys/implement.js | 8 + node_modules/es5-ext/object/keys/index.js | 5 + .../es5-ext/object/keys/is-implemented.js | 10 + node_modules/es5-ext/object/keys/shim.js | 9 + node_modules/es5-ext/object/map-keys.js | 18 + node_modules/es5-ext/object/map.js | 14 + .../es5-ext/object/mixin-prototypes.js | 37 + node_modules/es5-ext/object/mixin.js | 31 + .../es5-ext/object/normalize-options.js | 20 + node_modules/es5-ext/object/primitive-set.js | 12 + node_modules/es5-ext/object/safe-traverse.js | 16 + node_modules/es5-ext/object/serialize.js | 41 + .../object/set-prototype-of/implement.js | 8 + .../es5-ext/object/set-prototype-of/index.js | 5 + .../object/set-prototype-of/is-implemented.js | 9 + .../es5-ext/object/set-prototype-of/shim.js | 86 + node_modules/es5-ext/object/some.js | 3 + node_modules/es5-ext/object/to-array.js | 24 + node_modules/es5-ext/object/unserialize.js | 8 + node_modules/es5-ext/object/valid-callable.js | 6 + node_modules/es5-ext/object/valid-object.js | 8 + node_modules/es5-ext/object/valid-value.js | 8 + .../object/validate-array-like-object.js | 9 + .../es5-ext/object/validate-array-like.js | 8 + .../object/validate-stringifiable-value.js | 8 + .../es5-ext/object/validate-stringifiable.js | 12 + node_modules/es5-ext/optional-chaining.js | 12 + node_modules/es5-ext/package.json | 90 + node_modules/es5-ext/promise/.eslintrc.json | 3 + node_modules/es5-ext/promise/index.js | 5 + node_modules/es5-ext/promise/lazy.js | 38 + node_modules/es5-ext/reg-exp/#/index.js | 10 + node_modules/es5-ext/reg-exp/#/is-sticky.js | 9 + node_modules/es5-ext/reg-exp/#/is-unicode.js | 9 + .../es5-ext/reg-exp/#/match/implement.js | 8 + node_modules/es5-ext/reg-exp/#/match/index.js | 5 + .../es5-ext/reg-exp/#/match/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/match/shim.js | 8 + .../es5-ext/reg-exp/#/replace/implement.js | 8 + .../es5-ext/reg-exp/#/replace/index.js | 5 + .../reg-exp/#/replace/is-implemented.js | 8 + .../es5-ext/reg-exp/#/replace/shim.js | 8 + .../es5-ext/reg-exp/#/search/implement.js | 8 + .../es5-ext/reg-exp/#/search/index.js | 5 + .../reg-exp/#/search/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/search/shim.js | 8 + .../es5-ext/reg-exp/#/split/implement.js | 8 + node_modules/es5-ext/reg-exp/#/split/index.js | 5 + .../es5-ext/reg-exp/#/split/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/split/shim.js | 8 + .../es5-ext/reg-exp/#/sticky/implement.js | 9 + .../reg-exp/#/sticky/is-implemented.js | 10 + .../es5-ext/reg-exp/#/unicode/implement.js | 9 + .../reg-exp/#/unicode/is-implemented.js | 10 + node_modules/es5-ext/reg-exp/escape.js | 11 + node_modules/es5-ext/reg-exp/index.js | 8 + node_modules/es5-ext/reg-exp/is-reg-exp.js | 7 + node_modules/es5-ext/reg-exp/valid-reg-exp.js | 8 + node_modules/es5-ext/safe-to-string.js | 12 + .../es5-ext/string/#/@@iterator/implement.js | 6 + .../es5-ext/string/#/@@iterator/index.js | 4 + .../string/#/@@iterator/is-implemented.js | 16 + .../es5-ext/string/#/@@iterator/shim.js | 8 + node_modules/es5-ext/string/#/at.js | 35 + .../es5-ext/string/#/camel-to-hyphen.js | 10 + node_modules/es5-ext/string/#/capitalize.js | 8 + .../string/#/case-insensitive-compare.js | 7 + .../string/#/code-point-at/implement.js | 9 + .../es5-ext/string/#/code-point-at/index.js | 5 + .../string/#/code-point-at/is-implemented.js | 8 + .../es5-ext/string/#/code-point-at/shim.js | 26 + .../es5-ext/string/#/contains/implement.js | 9 + .../es5-ext/string/#/contains/index.js | 5 + .../string/#/contains/is-implemented.js | 8 + .../es5-ext/string/#/contains/shim.js | 7 + node_modules/es5-ext/string/#/count.js | 15 + .../es5-ext/string/#/ends-with/implement.js | 9 + .../es5-ext/string/#/ends-with/index.js | 5 + .../string/#/ends-with/is-implemented.js | 8 + .../es5-ext/string/#/ends-with/shim.js | 18 + .../es5-ext/string/#/hyphen-to-camel.js | 10 + node_modules/es5-ext/string/#/indent.js | 12 + node_modules/es5-ext/string/#/index.js | 23 + node_modules/es5-ext/string/#/last.js | 8 + .../es5-ext/string/#/normalize/_data.js | 7203 + .../es5-ext/string/#/normalize/implement.js | 9 + .../es5-ext/string/#/normalize/index.js | 5 + .../string/#/normalize/is-implemented.js | 8 + .../es5-ext/string/#/normalize/shim.js | 317 + node_modules/es5-ext/string/#/pad.js | 18 + .../es5-ext/string/#/plain-replace-all.js | 16 + .../es5-ext/string/#/plain-replace.js | 10 + .../es5-ext/string/#/repeat/implement.js | 9 + node_modules/es5-ext/string/#/repeat/index.js | 5 + .../es5-ext/string/#/repeat/is-implemented.js | 8 + node_modules/es5-ext/string/#/repeat/shim.js | 24 + .../es5-ext/string/#/starts-with/implement.js | 9 + .../es5-ext/string/#/starts-with/index.js | 5 + .../string/#/starts-with/is-implemented.js | 9 + .../es5-ext/string/#/starts-with/shim.js | 12 + node_modules/es5-ext/string/#/uncapitalize.js | 8 + node_modules/es5-ext/string/format-method.js | 27 + .../string/from-code-point/implement.js | 8 + .../es5-ext/string/from-code-point/index.js | 5 + .../string/from-code-point/is-implemented.js | 7 + .../es5-ext/string/from-code-point/shim.js | 37 + node_modules/es5-ext/string/index.js | 11 + node_modules/es5-ext/string/is-string.js | 13 + node_modules/es5-ext/string/random-uniq.js | 13 + node_modules/es5-ext/string/random.js | 42 + node_modules/es5-ext/string/raw/implement.js | 8 + node_modules/es5-ext/string/raw/index.js | 5 + .../es5-ext/string/raw/is-implemented.js | 9 + node_modules/es5-ext/string/raw/shim.js | 14 + node_modules/es5-ext/test/.eslintrc.json | 14 + node_modules/es5-ext/test/__tad.js | 3 + .../test/array/#/@@iterator/implement.js | 7 + .../es5-ext/test/array/#/@@iterator/index.js | 3 + .../test/array/#/@@iterator/is-implemented.js | 5 + .../es5-ext/test/array/#/@@iterator/shim.js | 9 + .../test/array/#/_compare-by-length.js | 7 + .../es5-ext/test/array/#/binary-search.js | 17 + node_modules/es5-ext/test/array/#/clear.js | 7 + node_modules/es5-ext/test/array/#/compact.js | 17 + .../es5-ext/test/array/#/concat/implement.js | 7 + .../es5-ext/test/array/#/concat/index.js | 3 + .../test/array/#/concat/is-implemented.js | 5 + .../es5-ext/test/array/#/concat/shim.js | 26 + node_modules/es5-ext/test/array/#/contains.js | 21 + .../test/array/#/copy-within/implement.js | 7 + .../es5-ext/test/array/#/copy-within/index.js | 3 + .../array/#/copy-within/is-implemented.js | 5 + .../es5-ext/test/array/#/copy-within/shim.js | 29 + node_modules/es5-ext/test/array/#/diff.js | 17 + .../es5-ext/test/array/#/e-index-of.js | 13 + .../es5-ext/test/array/#/e-last-index-of.js | 12 + .../es5-ext/test/array/#/entries/implement.js | 7 + .../es5-ext/test/array/#/entries/index.js | 3 + .../test/array/#/entries/is-implemented.js | 5 + .../es5-ext/test/array/#/entries/shim.js | 9 + .../es5-ext/test/array/#/exclusion.js | 15 + .../es5-ext/test/array/#/fill/implement.js | 7 + .../es5-ext/test/array/#/fill/index.js | 3 + .../test/array/#/fill/is-implemented.js | 5 + .../es5-ext/test/array/#/fill/shim.js | 18 + .../es5-ext/test/array/#/filter/implement.js | 7 + .../es5-ext/test/array/#/filter/index.js | 3 + .../test/array/#/filter/is-implemented.js | 5 + .../es5-ext/test/array/#/filter/shim.js | 17 + .../test/array/#/find-index/implement.js | 7 + .../es5-ext/test/array/#/find-index/index.js | 3 + .../test/array/#/find-index/is-implemented.js | 5 + .../es5-ext/test/array/#/find-index/shim.js | 17 + .../es5-ext/test/array/#/find/implement.js | 7 + .../es5-ext/test/array/#/find/index.js | 3 + .../test/array/#/find/is-implemented.js | 5 + .../es5-ext/test/array/#/find/shim.js | 17 + .../es5-ext/test/array/#/first-index.js | 17 + node_modules/es5-ext/test/array/#/first.js | 13 + node_modules/es5-ext/test/array/#/flatten.js | 14 + .../es5-ext/test/array/#/for-each-right.js | 47 + node_modules/es5-ext/test/array/#/group.js | 24 + .../es5-ext/test/array/#/indexes-of.js | 14 + .../es5-ext/test/array/#/intersection.js | 24 + node_modules/es5-ext/test/array/#/is-copy.js | 13 + node_modules/es5-ext/test/array/#/is-empty.js | 8 + node_modules/es5-ext/test/array/#/is-uniq.js | 11 + .../es5-ext/test/array/#/keys/implement.js | 7 + .../es5-ext/test/array/#/keys/index.js | 3 + .../test/array/#/keys/is-implemented.js | 5 + .../es5-ext/test/array/#/keys/shim.js | 9 + .../es5-ext/test/array/#/last-index.js | 17 + node_modules/es5-ext/test/array/#/last.js | 15 + .../es5-ext/test/array/#/map/implement.js | 7 + .../es5-ext/test/array/#/map/index.js | 3 + .../test/array/#/map/is-implemented.js | 5 + node_modules/es5-ext/test/array/#/map/shim.js | 19 + node_modules/es5-ext/test/array/#/remove.js | 14 + node_modules/es5-ext/test/array/#/separate.js | 15 + .../es5-ext/test/array/#/slice/implement.js | 7 + .../es5-ext/test/array/#/slice/index.js | 3 + .../test/array/#/slice/is-implemented.js | 5 + .../es5-ext/test/array/#/slice/shim.js | 17 + .../es5-ext/test/array/#/some-right.js | 62 + .../es5-ext/test/array/#/splice/implement.js | 7 + .../es5-ext/test/array/#/splice/index.js | 3 + .../test/array/#/splice/is-implemented.js | 5 + .../es5-ext/test/array/#/splice/shim.js | 19 + node_modules/es5-ext/test/array/#/uniq.js | 14 + .../es5-ext/test/array/#/values/implement.js | 7 + .../es5-ext/test/array/#/values/index.js | 3 + .../test/array/#/values/is-implemented.js | 5 + .../es5-ext/test/array/#/values/shim.js | 9 + node_modules/es5-ext/test/array/__scopes.js | 11 + .../es5-ext/test/array/_is-extensible.js | 5 + .../test/array/_sub-array-dummy-safe.js | 7 + .../es5-ext/test/array/_sub-array-dummy.js | 7 + .../es5-ext/test/array/from/implement.js | 7 + node_modules/es5-ext/test/array/from/index.js | 3 + .../es5-ext/test/array/from/is-implemented.js | 5 + node_modules/es5-ext/test/array/from/shim.js | 138 + node_modules/es5-ext/test/array/generate.js | 10 + .../es5-ext/test/array/is-plain-array.js | 18 + .../es5-ext/test/array/of/implement.js | 7 + node_modules/es5-ext/test/array/of/index.js | 3 + .../es5-ext/test/array/of/is-implemented.js | 5 + node_modules/es5-ext/test/array/of/shim.js | 89 + node_modules/es5-ext/test/array/to-array.js | 27 + .../es5-ext/test/array/valid-array.js | 30 + .../es5-ext/test/boolean/is-boolean.js | 12 + node_modules/es5-ext/test/date/#/copy.js | 10 + .../es5-ext/test/date/#/days-in-month.js | 17 + node_modules/es5-ext/test/date/#/floor-day.js | 6 + .../es5-ext/test/date/#/floor-month.js | 6 + .../es5-ext/test/date/#/floor-year.js | 6 + node_modules/es5-ext/test/date/#/format.js | 6 + .../es5-ext/test/date/ensure-time-value.js | 14 + node_modules/es5-ext/test/date/is-date.js | 10 + .../es5-ext/test/date/is-time-value.js | 15 + node_modules/es5-ext/test/date/valid-date.js | 14 + node_modules/es5-ext/test/error/#/throw.js | 10 + node_modules/es5-ext/test/error/custom.js | 12 + node_modules/es5-ext/test/error/is-error.js | 18 + .../es5-ext/test/error/valid-error.js | 9 + .../es5-ext/test/function/#/compose.js | 15 + node_modules/es5-ext/test/function/#/copy.js | 22 + node_modules/es5-ext/test/function/#/curry.js | 20 + node_modules/es5-ext/test/function/#/lock.js | 7 + node_modules/es5-ext/test/function/#/not.js | 11 + .../es5-ext/test/function/#/partial.js | 11 + .../es5-ext/test/function/#/spread.js | 10 + .../test/function/#/to-string-tokens.js | 33 + .../es5-ext/test/function/_define-length.js | 14 + .../es5-ext/test/function/constant.js | 7 + .../es5-ext/test/function/identity.js | 7 + node_modules/es5-ext/test/function/invoke.js | 9 + .../es5-ext/test/function/is-arguments.js | 13 + .../es5-ext/test/function/is-function.js | 8 + node_modules/es5-ext/test/function/noop.js | 5 + node_modules/es5-ext/test/function/pluck.js | 7 + .../es5-ext/test/function/valid-function.js | 22 + node_modules/es5-ext/test/global.js | 6 + .../es5-ext/test/iterable/for-each.js | 42 + node_modules/es5-ext/test/iterable/is.js | 28 + .../es5-ext/test/iterable/validate-object.js | 34 + .../es5-ext/test/iterable/validate.js | 32 + .../es5-ext/test/json/safe-stringify.js | 26 + .../es5-ext/test/math/_pack-ieee754.js | 5 + .../es5-ext/test/math/_unpack-ieee754.js | 5 + .../es5-ext/test/math/acosh/implement.js | 7 + node_modules/es5-ext/test/math/acosh/index.js | 3 + .../es5-ext/test/math/acosh/is-implemented.js | 5 + node_modules/es5-ext/test/math/acosh/shim.js | 11 + .../es5-ext/test/math/asinh/implement.js | 7 + node_modules/es5-ext/test/math/asinh/index.js | 3 + .../es5-ext/test/math/asinh/is-implemented.js | 5 + node_modules/es5-ext/test/math/asinh/shim.js | 10 + .../es5-ext/test/math/atanh/implement.js | 7 + node_modules/es5-ext/test/math/atanh/index.js | 3 + .../es5-ext/test/math/atanh/is-implemented.js | 5 + node_modules/es5-ext/test/math/atanh/shim.js | 11 + .../es5-ext/test/math/cbrt/implement.js | 7 + node_modules/es5-ext/test/math/cbrt/index.js | 3 + .../es5-ext/test/math/cbrt/is-implemented.js | 5 + node_modules/es5-ext/test/math/cbrt/shim.js | 11 + .../es5-ext/test/math/clz32/implement.js | 7 + node_modules/es5-ext/test/math/clz32/index.js | 3 + .../es5-ext/test/math/clz32/is-implemented.js | 5 + node_modules/es5-ext/test/math/clz32/shim.js | 12 + .../es5-ext/test/math/cosh/implement.js | 7 + node_modules/es5-ext/test/math/cosh/index.js | 3 + .../es5-ext/test/math/cosh/is-implemented.js | 5 + node_modules/es5-ext/test/math/cosh/shim.js | 13 + .../es5-ext/test/math/expm1/implement.js | 7 + node_modules/es5-ext/test/math/expm1/index.js | 3 + .../es5-ext/test/math/expm1/is-implemented.js | 5 + node_modules/es5-ext/test/math/expm1/shim.js | 9 + .../es5-ext/test/math/fround/implement.js | 7 + .../es5-ext/test/math/fround/index.js | 3 + .../test/math/fround/is-implemented.js | 5 + node_modules/es5-ext/test/math/fround/shim.js | 9 + .../es5-ext/test/math/hypot/implement.js | 7 + node_modules/es5-ext/test/math/hypot/index.js | 3 + .../es5-ext/test/math/hypot/is-implemented.js | 5 + node_modules/es5-ext/test/math/hypot/shim.js | 11 + .../es5-ext/test/math/imul/implement.js | 7 + node_modules/es5-ext/test/math/imul/index.js | 3 + .../es5-ext/test/math/imul/is-implemented.js | 5 + node_modules/es5-ext/test/math/imul/shim.js | 9 + .../es5-ext/test/math/log10/implement.js | 7 + node_modules/es5-ext/test/math/log10/index.js | 3 + .../es5-ext/test/math/log10/is-implemented.js | 5 + node_modules/es5-ext/test/math/log10/shim.js | 10 + .../es5-ext/test/math/log1p/implement.js | 7 + node_modules/es5-ext/test/math/log1p/index.js | 3 + .../es5-ext/test/math/log1p/is-implemented.js | 5 + node_modules/es5-ext/test/math/log1p/shim.js | 10 + .../es5-ext/test/math/log2/implement.js | 7 + node_modules/es5-ext/test/math/log2/index.js | 3 + .../es5-ext/test/math/log2/is-implemented.js | 5 + node_modules/es5-ext/test/math/log2/shim.js | 10 + .../es5-ext/test/math/sign/implement.js | 7 + node_modules/es5-ext/test/math/sign/index.js | 3 + .../es5-ext/test/math/sign/is-implemented.js | 5 + node_modules/es5-ext/test/math/sign/shim.js | 11 + .../es5-ext/test/math/sinh/implement.js | 7 + node_modules/es5-ext/test/math/sinh/index.js | 3 + .../es5-ext/test/math/sinh/is-implemented.js | 5 + node_modules/es5-ext/test/math/sinh/shim.js | 13 + .../es5-ext/test/math/tanh/implement.js | 7 + node_modules/es5-ext/test/math/tanh/index.js | 3 + .../es5-ext/test/math/tanh/is-implemented.js | 5 + node_modules/es5-ext/test/math/tanh/shim.js | 11 + .../es5-ext/test/math/trunc/implement.js | 7 + node_modules/es5-ext/test/math/trunc/index.js | 3 + .../es5-ext/test/math/trunc/is-implemented.js | 5 + node_modules/es5-ext/test/math/trunc/shim.js | 16 + node_modules/es5-ext/test/number/#/pad.js | 7 + .../es5-ext/test/number/epsilon/implement.js | 7 + .../es5-ext/test/number/epsilon/index.js | 5 + .../test/number/epsilon/is-implemented.js | 5 + .../test/number/is-finite/implement.js | 7 + .../es5-ext/test/number/is-finite/index.js | 3 + .../test/number/is-finite/is-implemented.js | 5 + .../es5-ext/test/number/is-finite/shim.js | 8 + .../test/number/is-integer/implement.js | 7 + .../es5-ext/test/number/is-integer/index.js | 3 + .../test/number/is-integer/is-implemented.js | 5 + .../es5-ext/test/number/is-integer/shim.js | 9 + .../es5-ext/test/number/is-nan/implement.js | 7 + .../es5-ext/test/number/is-nan/index.js | 3 + .../test/number/is-nan/is-implemented.js | 5 + .../es5-ext/test/number/is-nan/shim.js | 7 + .../es5-ext/test/number/is-natural.js | 10 + node_modules/es5-ext/test/number/is-number.js | 13 + .../test/number/is-safe-integer/implement.js | 7 + .../test/number/is-safe-integer/index.js | 3 + .../number/is-safe-integer/is-implemented.js | 5 + .../test/number/is-safe-integer/shim.js | 11 + .../test/number/max-safe-integer/implement.js | 7 + .../test/number/max-safe-integer/index.js | 5 + .../number/max-safe-integer/is-implemented.js | 5 + .../test/number/min-safe-integer/implement.js | 7 + .../test/number/min-safe-integer/index.js | 5 + .../number/min-safe-integer/is-implemented.js | 5 + .../es5-ext/test/number/to-integer.js | 10 + .../es5-ext/test/number/to-pos-integer.js | 10 + node_modules/es5-ext/test/number/to-uint32.js | 8 + node_modules/es5-ext/test/object/_iterate.js | 30 + .../es5-ext/test/object/assign-deep.js | 15 + .../es5-ext/test/object/assign/implement.js | 7 + .../es5-ext/test/object/assign/index.js | 3 + .../test/object/assign/is-implemented.js | 5 + .../es5-ext/test/object/assign/shim.js | 11 + node_modules/es5-ext/test/object/clear.js | 13 + node_modules/es5-ext/test/object/compact.js | 20 + node_modules/es5-ext/test/object/compare.js | 13 + node_modules/es5-ext/test/object/copy-deep.js | 35 + node_modules/es5-ext/test/object/copy.js | 30 + node_modules/es5-ext/test/object/count.js | 11 + node_modules/es5-ext/test/object/create.js | 22 + .../es5-ext/test/object/ensure-array.js | 55 + .../test/object/ensure-finite-number.js | 54 + .../object/ensure-natural-number-value.js | 24 + .../test/object/ensure-natural-number.js | 22 + .../es5-ext/test/object/ensure-promise.js | 32 + node_modules/es5-ext/test/object/eq.js | 12 + node_modules/es5-ext/test/object/every.js | 21 + node_modules/es5-ext/test/object/filter.js | 8 + node_modules/es5-ext/test/object/find-key.js | 23 + node_modules/es5-ext/test/object/find.js | 23 + node_modules/es5-ext/test/object/first-key.js | 13 + node_modules/es5-ext/test/object/flatten.js | 6 + node_modules/es5-ext/test/object/for-each.js | 10 + .../es5-ext/test/object/get-property-names.js | 18 + .../es5-ext/test/object/is-array-like.js | 22 + .../es5-ext/test/object/is-callable.js | 8 + .../es5-ext/test/object/is-copy-deep.js | 46 + node_modules/es5-ext/test/object/is-copy.js | 18 + node_modules/es5-ext/test/object/is-empty.js | 6 + .../es5-ext/test/object/is-finite-number.js | 18 + .../test/object/is-natural-number-value.js | 12 + .../es5-ext/test/object/is-natural-number.js | 12 + .../es5-ext/test/object/is-number-value.js | 18 + node_modules/es5-ext/test/object/is-object.js | 13 + .../es5-ext/test/object/is-plain-function.js | 42 + .../es5-ext/test/object/is-plain-object.js | 18 + .../es5-ext/test/object/is-promise.js | 17 + node_modules/es5-ext/test/object/is-value.js | 14 + node_modules/es5-ext/test/object/is.js | 12 + node_modules/es5-ext/test/object/key-of.js | 12 + .../es5-ext/test/object/keys/implement.js | 7 + .../es5-ext/test/object/keys/index.js | 3 + .../test/object/keys/is-implemented.js | 5 + node_modules/es5-ext/test/object/keys/shim.js | 12 + node_modules/es5-ext/test/object/map-keys.js | 7 + node_modules/es5-ext/test/object/map.js | 9 + .../es5-ext/test/object/mixin-prototypes.js | 73 + node_modules/es5-ext/test/object/mixin.js | 75 + .../es5-ext/test/object/normalize-options.js | 46 + .../es5-ext/test/object/primitive-set.js | 15 + .../es5-ext/test/object/safe-traverse.js | 15 + node_modules/es5-ext/test/object/serialize.js | 45 + .../test/object/set-prototype-of/implement.js | 8 + .../test/object/set-prototype-of/index.js | 27 + .../object/set-prototype-of/is-implemented.js | 5 + .../test/object/set-prototype-of/shim.js | 27 + node_modules/es5-ext/test/object/some.js | 23 + node_modules/es5-ext/test/object/to-array.js | 15 + .../es5-ext/test/object/unserialize.js | 41 + .../es5-ext/test/object/valid-callable.js | 9 + .../es5-ext/test/object/valid-object.js | 25 + .../es5-ext/test/object/valid-value.js | 19 + .../test/object/validate-array-like-object.js | 29 + .../test/object/validate-array-like.js | 27 + .../object/validate-stringifiable-value.js | 22 + .../test/object/validate-stringifiable.js | 18 + .../es5-ext/test/optional-chaining.js | 17 + .../es5-ext/test/promise/.eslintrc.json | 3 + node_modules/es5-ext/test/promise/lazy.js | 52 + node_modules/es5-ext/test/reg-exp/#/index.js | 15 + .../es5-ext/test/reg-exp/#/is-sticky.js | 13 + .../es5-ext/test/reg-exp/#/is-unicode.js | 13 + .../es5-ext/test/reg-exp/#/match/implement.js | 7 + .../es5-ext/test/reg-exp/#/match/index.js | 3 + .../test/reg-exp/#/match/is-implemented.js | 5 + .../es5-ext/test/reg-exp/#/match/shim.js | 8 + .../test/reg-exp/#/replace/implement.js | 7 + .../es5-ext/test/reg-exp/#/replace/index.js | 3 + .../test/reg-exp/#/replace/is-implemented.js | 5 + .../es5-ext/test/reg-exp/#/replace/shim.js | 5 + .../test/reg-exp/#/search/implement.js | 7 + .../es5-ext/test/reg-exp/#/search/index.js | 3 + .../test/reg-exp/#/search/is-implemented.js | 5 + .../es5-ext/test/reg-exp/#/search/shim.js | 5 + .../es5-ext/test/reg-exp/#/split/implement.js | 7 + .../es5-ext/test/reg-exp/#/split/index.js | 3 + .../test/reg-exp/#/split/is-implemented.js | 5 + .../es5-ext/test/reg-exp/#/split/shim.js | 5 + .../test/reg-exp/#/sticky/implement.js | 7 + .../test/reg-exp/#/sticky/is-implemented.js | 5 + .../test/reg-exp/#/unicode/implement.js | 7 + .../test/reg-exp/#/unicode/is-implemented.js | 5 + node_modules/es5-ext/test/reg-exp/escape.js | 6 + .../es5-ext/test/reg-exp/is-reg-exp.js | 12 + .../es5-ext/test/reg-exp/valid-reg-exp.js | 19 + node_modules/es5-ext/test/safe-to-string.js | 19 + .../test/string/#/@@iterator/implement.js | 7 + .../es5-ext/test/string/#/@@iterator/index.js | 3 + .../string/#/@@iterator/is-implemented.js | 5 + .../es5-ext/test/string/#/@@iterator/shim.js | 9 + node_modules/es5-ext/test/string/#/at.js | 132 + .../es5-ext/test/string/#/camel-to-hyphen.js | 7 + .../es5-ext/test/string/#/capitalize.js | 9 + .../test/string/#/case-insensitive-compare.js | 7 + .../test/string/#/code-point-at/implement.js | 8 + .../test/string/#/code-point-at/index.js | 3 + .../string/#/code-point-at/is-implemented.js | 5 + .../test/string/#/code-point-at/shim.js | 119 + .../test/string/#/contains/implement.js | 7 + .../es5-ext/test/string/#/contains/index.js | 3 + .../test/string/#/contains/is-implemented.js | 5 + .../es5-ext/test/string/#/contains/shim.js | 14 + node_modules/es5-ext/test/string/#/count.js | 14 + .../test/string/#/ends-with/implement.js | 7 + .../es5-ext/test/string/#/ends-with/index.js | 3 + .../test/string/#/ends-with/is-implemented.js | 5 + .../es5-ext/test/string/#/ends-with/shim.js | 16 + .../es5-ext/test/string/#/hyphen-to-camel.js | 7 + node_modules/es5-ext/test/string/#/indent.js | 9 + node_modules/es5-ext/test/string/#/last.js | 6 + .../es5-ext/test/string/#/normalize/_data.js | 5 + .../test/string/#/normalize/implement.js | 7 + .../es5-ext/test/string/#/normalize/index.js | 3 + .../test/string/#/normalize/is-implemented.js | 5 + .../es5-ext/test/string/#/normalize/shim.js | 13 + node_modules/es5-ext/test/string/#/pad.js | 24 + .../test/string/#/plain-replace-all.js | 11 + .../es5-ext/test/string/#/plain-replace.js | 7 + .../es5-ext/test/string/#/repeat/implement.js | 7 + .../es5-ext/test/string/#/repeat/index.js | 3 + .../test/string/#/repeat/is-implemented.js | 5 + .../es5-ext/test/string/#/repeat/shim.js | 12 + .../test/string/#/starts-with/implement.js | 7 + .../test/string/#/starts-with/index.js | 3 + .../string/#/starts-with/is-implemented.js | 5 + .../es5-ext/test/string/#/starts-with/shim.js | 14 + .../es5-ext/test/string/#/uncapitalize.js | 10 + .../es5-ext/test/string/format-method.js | 12 + .../test/string/from-code-point/implement.js | 7 + .../test/string/from-code-point/index.js | 3 + .../string/from-code-point/is-implemented.js | 5 + .../test/string/from-code-point/shim.js | 73 + node_modules/es5-ext/test/string/is-string.js | 11 + .../es5-ext/test/string/random-uniq.js | 14 + node_modules/es5-ext/test/string/random.js | 13 + .../es5-ext/test/string/raw/implement.js | 7 + node_modules/es5-ext/test/string/raw/index.js | 3 + .../es5-ext/test/string/raw/is-implemented.js | 5 + node_modules/es5-ext/test/string/raw/shim.js | 15 + .../test/to-short-string-representation.js | 23 + .../es5-ext/to-short-string-representation.js | 16 + node_modules/es6-iterator/#/chain.js | 40 + node_modules/es6-iterator/.editorconfig | 14 + node_modules/es6-iterator/.npmignore | 12 + node_modules/es6-iterator/CHANGELOG.md | 27 + node_modules/es6-iterator/CHANGES | 42 + node_modules/es6-iterator/LICENSE | 21 + node_modules/es6-iterator/README.md | 148 + node_modules/es6-iterator/appveyor.yml | 26 + node_modules/es6-iterator/array.js | 32 + node_modules/es6-iterator/for-of.js | 47 + node_modules/es6-iterator/get.js | 15 + node_modules/es6-iterator/index.js | 106 + node_modules/es6-iterator/is-iterable.js | 16 + node_modules/es6-iterator/package.json | 76 + node_modules/es6-iterator/string.js | 39 + node_modules/es6-iterator/test/#/chain.js | 23 + node_modules/es6-iterator/test/.eslintrc.json | 5 + node_modules/es6-iterator/test/array.js | 67 + node_modules/es6-iterator/test/for-of.js | 42 + node_modules/es6-iterator/test/get.js | 27 + node_modules/es6-iterator/test/index.js | 99 + node_modules/es6-iterator/test/is-iterable.js | 23 + node_modules/es6-iterator/test/string.js | 23 + .../es6-iterator/test/valid-iterable.js | 28 + node_modules/es6-iterator/valid-iterable.js | 8 + node_modules/es6-symbol/.lint | 15 + node_modules/es6-symbol/.npmignore | 4 + node_modules/es6-symbol/.travis.yml | 11 + node_modules/es6-symbol/CHANGES | 57 + node_modules/es6-symbol/LICENSE | 19 + node_modules/es6-symbol/README.md | 71 + node_modules/es6-symbol/implement.js | 7 + node_modules/es6-symbol/index.js | 3 + node_modules/es6-symbol/is-implemented.js | 17 + .../es6-symbol/is-native-implemented.js | 5 + node_modules/es6-symbol/is-symbol.js | 9 + node_modules/es6-symbol/package.json | 70 + node_modules/es6-symbol/polyfill.js | 118 + node_modules/es6-symbol/test/implement.js | 3 + node_modules/es6-symbol/test/index.js | 12 + .../es6-symbol/test/is-implemented.js | 14 + .../es6-symbol/test/is-native-implemented.js | 3 + node_modules/es6-symbol/test/is-symbol.js | 16 + node_modules/es6-symbol/test/polyfill.js | 29 + .../es6-symbol/test/validate-symbol.js | 19 + node_modules/es6-symbol/validate-symbol.js | 8 + node_modules/es6-weak-map/.lint | 13 + node_modules/es6-weak-map/.npmignore | 4 + node_modules/es6-weak-map/.travis.yml | 13 + node_modules/es6-weak-map/CHANGES | 45 + node_modules/es6-weak-map/LICENSE | 19 + node_modules/es6-weak-map/README.md | 63 + node_modules/es6-weak-map/implement.js | 7 + node_modules/es6-weak-map/index.js | 3 + node_modules/es6-weak-map/is-implemented.js | 20 + .../es6-weak-map/is-native-implemented.js | 8 + node_modules/es6-weak-map/is-weak-map.js | 13 + node_modules/es6-weak-map/package.json | 71 + node_modules/es6-weak-map/polyfill.js | 66 + node_modules/es6-weak-map/test/implement.js | 3 + node_modules/es6-weak-map/test/index.js | 6 + .../es6-weak-map/test/is-implemented.js | 14 + .../test/is-native-implemented.js | 3 + node_modules/es6-weak-map/test/is-weak-map.js | 16 + node_modules/es6-weak-map/test/polyfill.js | 23 + .../es6-weak-map/test/valid-weak-map.js | 19 + node_modules/es6-weak-map/valid-weak-map.js | 8 + node_modules/escape-html/LICENSE | 24 + node_modules/escape-html/Readme.md | 43 + node_modules/escape-html/index.js | 78 + node_modules/escape-html/package.json | 62 + node_modules/escape-string-regexp/index.js | 11 + node_modules/escape-string-regexp/license | 21 + .../escape-string-regexp/package.json | 81 + node_modules/escape-string-regexp/readme.md | 27 + node_modules/etag/HISTORY.md | 83 + node_modules/etag/LICENSE | 22 + node_modules/etag/README.md | 159 + node_modules/etag/index.js | 131 + node_modules/etag/package.json | 89 + node_modules/event-emitter/.lint | 15 + node_modules/event-emitter/.npmignore | 3 + node_modules/event-emitter/.testignore | 1 + node_modules/event-emitter/.travis.yml | 16 + node_modules/event-emitter/CHANGES | 73 + node_modules/event-emitter/LICENSE | 19 + node_modules/event-emitter/README.md | 98 + node_modules/event-emitter/all-off.js | 19 + .../event-emitter/benchmark/many-on.js | 83 + .../event-emitter/benchmark/single-on.js | 73 + node_modules/event-emitter/emit-error.js | 13 + node_modules/event-emitter/has-listeners.js | 16 + node_modules/event-emitter/index.js | 132 + node_modules/event-emitter/package.json | 67 + node_modules/event-emitter/pipe.js | 42 + node_modules/event-emitter/test/all-off.js | 48 + node_modules/event-emitter/test/emit-error.js | 14 + .../event-emitter/test/has-listeners.js | 42 + node_modules/event-emitter/test/index.js | 107 + node_modules/event-emitter/test/pipe.js | 53 + node_modules/event-emitter/test/unify.js | 123 + node_modules/event-emitter/unify.js | 50 + node_modules/event-stream/.npmignore | 3 + node_modules/event-stream/.travis.yml | 3 + node_modules/event-stream/LICENCE | 24 + node_modules/event-stream/examples/pretty.js | 25 + node_modules/event-stream/index.js | 324 + .../node_modules/split/.npmignore | 3 + .../node_modules/split/.travis.yml | 4 + .../event-stream/node_modules/split/LICENCE | 22 + .../node_modules/split/examples/pretty.js | 26 + .../event-stream/node_modules/split/index.js | 63 + .../node_modules/split/package.json | 62 + .../node_modules/split/readme.markdown | 66 + .../node_modules/split/test/options.asynct.js | 23 + .../split/test/partitioned_unicode.js | 34 + .../node_modules/split/test/split.asynct.js | 137 + .../split/test/try_catch.asynct.js | 51 + node_modules/event-stream/package.json | 88 + node_modules/event-stream/readme.markdown | 314 + .../event-stream/test/connect.asynct.js | 86 + .../event-stream/test/helper/index.js | 12 + .../event-stream/test/merge.asynct.js | 29 + .../event-stream/test/parse.asynct.js | 32 + .../event-stream/test/pause.asynct.js | 39 + .../event-stream/test/pipeline.asynct.js | 52 + .../event-stream/test/readArray.asynct.js | 89 + .../event-stream/test/readable.asynct.js | 197 + .../event-stream/test/replace.asynct.js | 76 + .../event-stream/test/simple-map.asynct.js | 343 + node_modules/event-stream/test/spec.asynct.js | 86 + .../event-stream/test/split.asynct.js | 47 + node_modules/event-stream/test/stringify.js | 15 + .../event-stream/test/writeArray.asynct.js | 31 + node_modules/execa/index.js | 309 + node_modules/execa/lib/errname.js | 37 + node_modules/execa/lib/stdio.js | 41 + node_modules/execa/license | 9 + node_modules/execa/package.json | 108 + node_modules/execa/readme.md | 279 + node_modules/expand-brackets/LICENSE | 21 + node_modules/expand-brackets/README.md | 302 + node_modules/expand-brackets/changelog.md | 35 + node_modules/expand-brackets/index.js | 211 + node_modules/expand-brackets/lib/compilers.js | 87 + node_modules/expand-brackets/lib/parsers.js | 219 + node_modules/expand-brackets/lib/utils.js | 34 + .../node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 77 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 82 + .../node_modules/extend-shallow/LICENSE | 21 + .../node_modules/extend-shallow/README.md | 61 + .../node_modules/extend-shallow/index.js | 33 + .../node_modules/extend-shallow/package.json | 87 + .../is-accessor-descriptor/LICENSE | 21 + .../is-accessor-descriptor/README.md | 123 + .../is-accessor-descriptor/index.js | 69 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-accessor-descriptor/package.json | 94 + .../node_modules/is-data-descriptor/LICENSE | 21 + .../node_modules/is-data-descriptor/README.md | 128 + .../node_modules/is-data-descriptor/index.js | 55 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-data-descriptor/package.json | 93 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 193 + .../node_modules/is-descriptor/index.js | 22 + .../node_modules/is-descriptor/package.json | 114 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 342 + .../node_modules/kind-of/index.js | 147 + .../node_modules/kind-of/package.json | 146 + node_modules/expand-brackets/package.json | 133 + node_modules/express/History.md | 3374 + node_modules/express/LICENSE | 24 + node_modules/express/Readme.md | 153 + node_modules/express/index.js | 11 + node_modules/express/lib/application.js | 644 + node_modules/express/lib/express.js | 112 + node_modules/express/lib/middleware/init.js | 43 + node_modules/express/lib/middleware/query.js | 47 + node_modules/express/lib/request.js | 521 + node_modules/express/lib/response.js | 1137 + node_modules/express/lib/router/index.js | 662 + node_modules/express/lib/router/layer.js | 181 + node_modules/express/lib/router/route.js | 216 + node_modules/express/lib/utils.js | 306 + node_modules/express/lib/view.js | 182 + .../node_modules/setprototypeof/LICENSE | 13 + .../node_modules/setprototypeof/README.md | 26 + .../node_modules/setprototypeof/index.d.ts | 2 + .../node_modules/setprototypeof/index.js | 15 + .../node_modules/setprototypeof/package.json | 55 + .../express/node_modules/statuses/HISTORY.md | 55 + .../express/node_modules/statuses/LICENSE | 23 + .../express/node_modules/statuses/README.md | 103 + .../express/node_modules/statuses/codes.json | 65 + .../express/node_modules/statuses/index.js | 110 + .../node_modules/statuses/package.json | 86 + node_modules/express/package.json | 156 + node_modules/extend-shallow/LICENSE | 21 + node_modules/extend-shallow/README.md | 97 + node_modules/extend-shallow/index.js | 60 + .../node_modules/is-extendable/LICENSE | 21 + .../node_modules/is-extendable/README.md | 88 + .../node_modules/is-extendable/index.d.ts | 5 + .../node_modules/is-extendable/index.js | 14 + .../node_modules/is-extendable/package.json | 98 + node_modules/extend-shallow/package.json | 126 + node_modules/extglob/LICENSE | 21 + node_modules/extglob/README.md | 362 + node_modules/extglob/changelog.md | 25 + node_modules/extglob/index.js | 331 + node_modules/extglob/lib/.DS_Store | Bin 0 -> 6148 bytes node_modules/extglob/lib/compilers.js | 169 + node_modules/extglob/lib/extglob.js | 78 + node_modules/extglob/lib/parsers.js | 156 + node_modules/extglob/lib/utils.js | 69 + .../node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 95 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 93 + .../node_modules/extend-shallow/LICENSE | 21 + .../node_modules/extend-shallow/README.md | 61 + .../node_modules/extend-shallow/index.js | 33 + .../node_modules/extend-shallow/package.json | 87 + node_modules/extglob/package.json | 160 + node_modules/fill-range/LICENSE | 21 + node_modules/fill-range/README.md | 250 + node_modules/fill-range/index.js | 208 + .../node_modules/extend-shallow/LICENSE | 21 + .../node_modules/extend-shallow/README.md | 61 + .../node_modules/extend-shallow/index.js | 33 + .../node_modules/extend-shallow/package.json | 87 + node_modules/fill-range/package.json | 130 + node_modules/finalhandler/HISTORY.md | 172 + node_modules/finalhandler/LICENSE | 22 + node_modules/finalhandler/README.md | 148 + node_modules/finalhandler/index.js | 314 + .../node_modules/statuses/HISTORY.md | 55 + .../node_modules/statuses/LICENSE | 23 + .../node_modules/statuses/README.md | 103 + .../node_modules/statuses/codes.json | 65 + .../node_modules/statuses/index.js | 110 + .../node_modules/statuses/package.json | 86 + node_modules/finalhandler/package.json | 83 + node_modules/find-up/index.js | 48 + node_modules/find-up/license | 21 + node_modules/find-up/package.json | 85 + node_modules/find-up/readme.md | 85 + node_modules/for-in/LICENSE | 21 + node_modules/for-in/README.md | 85 + node_modules/for-in/index.js | 16 + node_modules/for-in/package.json | 106 + node_modules/forwarded/HISTORY.md | 16 + node_modules/forwarded/LICENSE | 22 + node_modules/forwarded/README.md | 57 + node_modules/forwarded/index.js | 76 + node_modules/forwarded/package.json | 81 + node_modules/fragment-cache/LICENSE | 21 + node_modules/fragment-cache/README.md | 156 + node_modules/fragment-cache/index.js | 128 + node_modules/fragment-cache/package.json | 93 + node_modules/fresh/HISTORY.md | 70 + node_modules/fresh/LICENSE | 23 + node_modules/fresh/README.md | 119 + node_modules/fresh/index.js | 137 + node_modules/fresh/package.json | 93 + node_modules/from/.npmignore | 1 + node_modules/from/.travis.yml | 6 + node_modules/from/LICENSE.APACHE2 | 15 + node_modules/from/LICENSE.MIT | 24 + node_modules/from/index.js | 68 + node_modules/from/package.json | 59 + node_modules/from/readme.markdown | 40 + node_modules/from/test/index.js | 210 + node_modules/fs-extra/CHANGELOG.md | 812 + node_modules/fs-extra/LICENSE | 15 + node_modules/fs-extra/README.md | 242 + node_modules/fs-extra/docs/copy-sync.md | 37 + node_modules/fs-extra/docs/copy.md | 57 + node_modules/fs-extra/docs/emptyDir-sync.md | 16 + node_modules/fs-extra/docs/emptyDir.md | 30 + node_modules/fs-extra/docs/ensureDir-sync.md | 17 + node_modules/fs-extra/docs/ensureDir.md | 29 + node_modules/fs-extra/docs/ensureFile-sync.md | 17 + node_modules/fs-extra/docs/ensureFile.md | 29 + node_modules/fs-extra/docs/ensureLink-sync.md | 17 + node_modules/fs-extra/docs/ensureLink.md | 29 + .../fs-extra/docs/ensureSymlink-sync.md | 18 + node_modules/fs-extra/docs/ensureSymlink.md | 30 + node_modules/fs-extra/docs/fs-read-write.md | 39 + node_modules/fs-extra/docs/move-sync.md | 24 + node_modules/fs-extra/docs/move.md | 41 + node_modules/fs-extra/docs/outputFile-sync.md | 19 + node_modules/fs-extra/docs/outputFile.md | 34 + node_modules/fs-extra/docs/outputJson-sync.md | 25 + node_modules/fs-extra/docs/outputJson.md | 40 + node_modules/fs-extra/docs/pathExists-sync.md | 3 + node_modules/fs-extra/docs/pathExists.md | 22 + node_modules/fs-extra/docs/readJson-sync.md | 33 + node_modules/fs-extra/docs/readJson.md | 58 + node_modules/fs-extra/docs/remove-sync.md | 16 + node_modules/fs-extra/docs/remove.md | 34 + node_modules/fs-extra/docs/writeJson-sync.md | 24 + node_modules/fs-extra/docs/writeJson.md | 39 + .../fs-extra/lib/copy-sync/copy-sync.js | 209 + node_modules/fs-extra/lib/copy-sync/index.js | 3 + node_modules/fs-extra/lib/copy/copy.js | 264 + node_modules/fs-extra/lib/copy/index.js | 4 + node_modules/fs-extra/lib/empty/index.js | 48 + node_modules/fs-extra/lib/ensure/file.js | 49 + node_modules/fs-extra/lib/ensure/index.js | 23 + node_modules/fs-extra/lib/ensure/link.js | 61 + .../fs-extra/lib/ensure/symlink-paths.js | 99 + .../fs-extra/lib/ensure/symlink-type.js | 31 + node_modules/fs-extra/lib/ensure/symlink.js | 66 + node_modules/fs-extra/lib/fs/index.js | 107 + node_modules/fs-extra/lib/index.js | 22 + node_modules/fs-extra/lib/json/index.js | 16 + node_modules/fs-extra/lib/json/jsonfile.js | 12 + .../fs-extra/lib/json/output-json-sync.js | 18 + node_modules/fs-extra/lib/json/output-json.js | 27 + node_modules/fs-extra/lib/mkdirs/index.js | 14 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 59 + node_modules/fs-extra/lib/mkdirs/mkdirs.js | 63 + node_modules/fs-extra/lib/mkdirs/win32.js | 25 + node_modules/fs-extra/lib/move-sync/index.js | 118 + node_modules/fs-extra/lib/move/index.js | 170 + node_modules/fs-extra/lib/output/index.js | 40 + .../fs-extra/lib/path-exists/index.js | 12 + node_modules/fs-extra/lib/remove/index.js | 9 + node_modules/fs-extra/lib/remove/rimraf.js | 314 + node_modules/fs-extra/lib/util/assign.js | 16 + node_modules/fs-extra/lib/util/buffer.js | 11 + node_modules/fs-extra/lib/util/utimes.js | 79 + node_modules/fs-extra/package.json | 95 + node_modules/generic-pool/.eslintignore | 1 + node_modules/generic-pool/.eslintrc.js | 8 + node_modules/generic-pool/.travis.yml | 20 + node_modules/generic-pool/CHANGELOG.md | 209 + node_modules/generic-pool/Makefile | 18 + node_modules/generic-pool/README.md | 397 + node_modules/generic-pool/index.js | 13 + .../generic-pool/lib/DefaultEvictor.js | 22 + node_modules/generic-pool/lib/Deferred.js | 49 + node_modules/generic-pool/lib/Deque.js | 106 + .../generic-pool/lib/DequeIterator.js | 20 + .../generic-pool/lib/DoublyLinkedList.js | 94 + .../lib/DoublyLinkedListIterator.js | 100 + node_modules/generic-pool/lib/Pool.js | 709 + node_modules/generic-pool/lib/PoolDefaults.js | 33 + node_modules/generic-pool/lib/PoolOptions.js | 101 + .../generic-pool/lib/PooledResource.js | 49 + .../lib/PooledResourceStateEnum.js | 11 + .../generic-pool/lib/PriorityQueue.js | 69 + node_modules/generic-pool/lib/Queue.js | 35 + node_modules/generic-pool/lib/ResourceLoan.js | 29 + .../generic-pool/lib/ResourceRequest.js | 76 + node_modules/generic-pool/lib/errors.js | 27 + .../generic-pool/lib/factoryValidator.js | 16 + node_modules/generic-pool/lib/utils.js | 13 + node_modules/generic-pool/package.json | 120 + .../test/doubly-linked-list-iterator-test.js | 144 + .../test/doubly-linked-list-test.js | 28 + .../test/generic-pool-acquiretimeout-test.js | 77 + .../generic-pool/test/generic-pool-test.js | 750 + .../test/resource-request-test.js | 60 + node_modules/generic-pool/test/utils.js | 42 + node_modules/generic-pool/tsconfig.json | 13 + node_modules/get-caller-file/README.md | 4 + node_modules/get-caller-file/index.js | 20 + node_modules/get-caller-file/package.json | 58 + node_modules/get-stream/buffer-stream.js | 51 + node_modules/get-stream/index.js | 51 + node_modules/get-stream/license | 21 + node_modules/get-stream/package.json | 81 + node_modules/get-stream/readme.md | 117 + node_modules/get-value/LICENSE | 21 + node_modules/get-value/index.js | 50 + node_modules/get-value/package.json | 113 + node_modules/glob-parent/LICENSE | 15 + node_modules/glob-parent/README.md | 109 + node_modules/glob-parent/index.js | 24 + .../glob-parent/node_modules/is-glob/LICENSE | 21 + .../node_modules/is-glob/README.md | 142 + .../glob-parent/node_modules/is-glob/index.js | 25 + .../node_modules/is-glob/package.json | 119 + node_modules/glob-parent/package.json | 72 + node_modules/global-dirs/index.js | 90 + node_modules/global-dirs/license | 9 + node_modules/global-dirs/package.json | 84 + node_modules/global-dirs/readme.md | 69 + node_modules/got/index.js | 364 + node_modules/got/license | 21 + node_modules/got/package.json | 110 + node_modules/got/readme.md | 335 + node_modules/graceful-fs/LICENSE | 15 + node_modules/graceful-fs/README.md | 133 + node_modules/graceful-fs/fs.js | 21 + node_modules/graceful-fs/graceful-fs.js | 262 + node_modules/graceful-fs/legacy-streams.js | 118 + node_modules/graceful-fs/package.json | 78 + node_modules/graceful-fs/polyfills.js | 330 + node_modules/has-flag/index.js | 8 + node_modules/has-flag/license | 9 + node_modules/has-flag/package.json | 76 + node_modules/has-flag/readme.md | 70 + node_modules/has-value/LICENSE | 21 + node_modules/has-value/README.md | 149 + node_modules/has-value/index.js | 16 + node_modules/has-value/package.json | 120 + node_modules/has-values/LICENSE | 21 + node_modules/has-values/README.md | 129 + node_modules/has-values/index.js | 60 + .../has-values/node_modules/kind-of/LICENSE | 21 + .../has-values/node_modules/kind-of/README.md | 267 + .../has-values/node_modules/kind-of/index.js | 119 + .../node_modules/kind-of/package.json | 139 + node_modules/has-values/package.json | 115 + node_modules/hosted-git-info/LICENSE | 13 + node_modules/hosted-git-info/README.md | 132 + node_modules/hosted-git-info/git-host-info.js | 68 + node_modules/hosted-git-info/git-host.js | 114 + node_modules/hosted-git-info/index.js | 121 + node_modules/hosted-git-info/package.json | 63 + node_modules/http-errors/HISTORY.md | 124 + node_modules/http-errors/LICENSE | 23 + node_modules/http-errors/README.md | 135 + node_modules/http-errors/index.js | 260 + .../http-errors/node_modules/depd/History.md | 90 + .../http-errors/node_modules/depd/LICENSE | 22 + .../http-errors/node_modules/depd/Readme.md | 283 + .../http-errors/node_modules/depd/index.js | 520 + .../node_modules/depd/lib/browser/index.js | 77 + .../depd/lib/compat/callsite-tostring.js | 103 + .../depd/lib/compat/event-listener-count.js | 22 + .../node_modules/depd/lib/compat/index.js | 79 + .../node_modules/depd/package.json | 79 + node_modules/http-errors/package.json | 95 + node_modules/iconv-lite/.npmignore | 6 + node_modules/iconv-lite/.travis.yml | 23 + node_modules/iconv-lite/Changelog.md | 134 + node_modules/iconv-lite/LICENSE | 21 + node_modules/iconv-lite/README.md | 160 + .../iconv-lite/encodings/dbcs-codec.js | 555 + .../iconv-lite/encodings/dbcs-data.js | 176 + node_modules/iconv-lite/encodings/index.js | 22 + node_modules/iconv-lite/encodings/internal.js | 188 + .../iconv-lite/encodings/sbcs-codec.js | 73 + .../encodings/sbcs-data-generated.js | 451 + .../iconv-lite/encodings/sbcs-data.js | 169 + .../encodings/tables/big5-added.json | 122 + .../iconv-lite/encodings/tables/cp936.json | 264 + .../iconv-lite/encodings/tables/cp949.json | 273 + .../iconv-lite/encodings/tables/cp950.json | 177 + .../iconv-lite/encodings/tables/eucjp.json | 182 + .../encodings/tables/gb18030-ranges.json | 1 + .../encodings/tables/gbk-added.json | 55 + .../iconv-lite/encodings/tables/shiftjis.json | 125 + node_modules/iconv-lite/encodings/utf16.js | 177 + node_modules/iconv-lite/encodings/utf7.js | 290 + node_modules/iconv-lite/lib/bom-handling.js | 52 + node_modules/iconv-lite/lib/extend-node.js | 215 + node_modules/iconv-lite/lib/index.d.ts | 24 + node_modules/iconv-lite/lib/index.js | 148 + node_modules/iconv-lite/lib/streams.js | 121 + node_modules/iconv-lite/package.json | 127 + node_modules/ignore-by-default/LICENSE | 14 + node_modules/ignore-by-default/README.md | 26 + node_modules/ignore-by-default/index.js | 12 + node_modules/ignore-by-default/package.json | 62 + node_modules/import-lazy/index.js | 53 + node_modules/import-lazy/license | 21 + node_modules/import-lazy/package.json | 76 + node_modules/import-lazy/readme.md | 64 + node_modules/imurmurhash/README.md | 122 + node_modules/imurmurhash/imurmurhash.js | 138 + node_modules/imurmurhash/imurmurhash.min.js | 12 + node_modules/imurmurhash/package.json | 63 + node_modules/inflection/.npmignore | 4 + node_modules/inflection/History.md | 232 + node_modules/inflection/Readme.md | 504 + node_modules/inflection/bower.json | 58 + node_modules/inflection/component.json | 36 + node_modules/inflection/inflection.min.js | 31 + node_modules/inflection/lib/inflection.js | 1086 + node_modules/inflection/package.json | 142 + node_modules/inherits/LICENSE | 16 + node_modules/inherits/README.md | 42 + node_modules/inherits/inherits.js | 7 + node_modules/inherits/inherits_browser.js | 23 + node_modules/inherits/package.json | 64 + node_modules/ini/LICENSE | 15 + node_modules/ini/README.md | 102 + node_modules/ini/ini.js | 194 + node_modules/ini/package.json | 64 + node_modules/invert-kv/index.js | 15 + node_modules/invert-kv/package.json | 65 + node_modules/invert-kv/readme.md | 25 + node_modules/ipaddr.js/.npmignore | 2 + node_modules/ipaddr.js/.travis.yml | 10 + node_modules/ipaddr.js/Cakefile | 14 + node_modules/ipaddr.js/LICENSE | 19 + node_modules/ipaddr.js/README.md | 233 + node_modules/ipaddr.js/bower.json | 29 + node_modules/ipaddr.js/ipaddr.min.js | 1 + node_modules/ipaddr.js/lib/ipaddr.js | 624 + node_modules/ipaddr.js/lib/ipaddr.js.d.ts | 71 + node_modules/ipaddr.js/package.json | 68 + node_modules/ipaddr.js/src/ipaddr.coffee | 554 + .../ipaddr.js/test/ipaddr.test.coffee | 491 + node_modules/is-accessor-descriptor/LICENSE | 21 + node_modules/is-accessor-descriptor/README.md | 144 + node_modules/is-accessor-descriptor/index.js | 69 + .../is-accessor-descriptor/package.json | 110 + node_modules/is-arrayish/.editorconfig | 18 + node_modules/is-arrayish/.istanbul.yml | 4 + node_modules/is-arrayish/.npmignore | 5 + node_modules/is-arrayish/.travis.yml | 17 + node_modules/is-arrayish/LICENSE | 21 + node_modules/is-arrayish/README.md | 16 + node_modules/is-arrayish/index.js | 10 + node_modules/is-arrayish/package.json | 66 + node_modules/is-binary-path/index.js | 12 + node_modules/is-binary-path/license | 21 + node_modules/is-binary-path/package.json | 71 + node_modules/is-binary-path/readme.md | 34 + node_modules/is-bluebird/License | 19 + node_modules/is-bluebird/README.md | 86 + node_modules/is-bluebird/changelog.md | 16 + node_modules/is-bluebird/lib/index.js | 79 + node_modules/is-bluebird/package.json | 78 + node_modules/is-buffer/LICENSE | 21 + node_modules/is-buffer/README.md | 53 + node_modules/is-buffer/index.js | 21 + node_modules/is-buffer/package.json | 91 + node_modules/is-buffer/test/basic.js | 24 + node_modules/is-builtin-module/index.js | 10 + node_modules/is-builtin-module/license | 21 + node_modules/is-builtin-module/package.json | 75 + node_modules/is-builtin-module/readme.md | 33 + node_modules/is-data-descriptor/LICENSE | 21 + node_modules/is-data-descriptor/README.md | 161 + node_modules/is-data-descriptor/index.js | 49 + node_modules/is-data-descriptor/package.json | 109 + node_modules/is-descriptor/LICENSE | 21 + node_modules/is-descriptor/README.md | 193 + node_modules/is-descriptor/index.js | 22 + node_modules/is-descriptor/package.json | 118 + node_modules/is-extendable/LICENSE | 21 + node_modules/is-extendable/README.md | 72 + node_modules/is-extendable/index.js | 13 + node_modules/is-extendable/package.json | 91 + node_modules/is-extglob/LICENSE | 21 + node_modules/is-extglob/README.md | 107 + node_modules/is-extglob/index.js | 20 + node_modules/is-extglob/package.json | 101 + node_modules/is-fullwidth-code-point/index.js | 46 + node_modules/is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 77 + .../is-fullwidth-code-point/readme.md | 39 + node_modules/is-glob/LICENSE | 21 + node_modules/is-glob/README.md | 190 + node_modules/is-glob/index.js | 46 + node_modules/is-glob/package.json | 121 + node_modules/is-installed-globally/index.js | 5 + node_modules/is-installed-globally/license | 9 + .../is-installed-globally/package.json | 80 + node_modules/is-installed-globally/readme.md | 39 + node_modules/is-npm/index.js | 4 + node_modules/is-npm/package.json | 64 + node_modules/is-npm/readme.md | 30 + node_modules/is-number/LICENSE | 21 + node_modules/is-number/README.md | 115 + node_modules/is-number/index.js | 22 + .../is-number/node_modules/kind-of/LICENSE | 21 + .../is-number/node_modules/kind-of/README.md | 261 + .../is-number/node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + node_modules/is-number/package.json | 125 + node_modules/is-obj/index.js | 5 + node_modules/is-obj/license | 21 + node_modules/is-obj/package.json | 65 + node_modules/is-obj/readme.md | 34 + node_modules/is-odd/LICENSE | 21 + node_modules/is-odd/README.md | 94 + node_modules/is-odd/index.js | 20 + .../is-odd/node_modules/is-number/LICENSE | 21 + .../is-odd/node_modules/is-number/README.md | 135 + .../is-odd/node_modules/is-number/index.js | 21 + .../node_modules/is-number/package.json | 113 + node_modules/is-odd/package.json | 110 + node_modules/is-path-inside/index.js | 14 + node_modules/is-path-inside/license | 21 + node_modules/is-path-inside/package.json | 69 + node_modules/is-path-inside/readme.md | 34 + node_modules/is-plain-object/LICENSE | 21 + node_modules/is-plain-object/README.md | 104 + node_modules/is-plain-object/index.d.ts | 5 + node_modules/is-plain-object/index.js | 37 + node_modules/is-plain-object/package.json | 124 + node_modules/is-promise/.npmignore | 6 + node_modules/is-promise/.travis.yml | 3 + node_modules/is-promise/LICENSE | 19 + node_modules/is-promise/index.js | 5 + node_modules/is-promise/package.json | 50 + node_modules/is-promise/readme.md | 29 + node_modules/is-redirect/index.js | 14 + node_modules/is-redirect/license | 21 + node_modules/is-redirect/package.json | 67 + node_modules/is-redirect/readme.md | 28 + node_modules/is-retry-allowed/index.js | 60 + node_modules/is-retry-allowed/license | 21 + node_modules/is-retry-allowed/package.json | 59 + node_modules/is-retry-allowed/readme.md | 42 + node_modules/is-stream/index.js | 21 + node_modules/is-stream/license | 21 + node_modules/is-stream/package.json | 71 + node_modules/is-stream/readme.md | 42 + node_modules/is-windows/LICENSE | 21 + node_modules/is-windows/README.md | 95 + node_modules/is-windows/index.js | 27 + node_modules/is-windows/package.json | 111 + node_modules/isarray/.npmignore | 1 + node_modules/isarray/.travis.yml | 4 + node_modules/isarray/Makefile | 6 + node_modules/isarray/README.md | 60 + node_modules/isarray/component.json | 19 + node_modules/isarray/index.js | 5 + node_modules/isarray/package.json | 74 + node_modules/isarray/test.js | 20 + node_modules/isexe/.npmignore | 2 + node_modules/isexe/LICENSE | 15 + node_modules/isexe/README.md | 51 + node_modules/isexe/index.js | 57 + node_modules/isexe/mode.js | 41 + node_modules/isexe/package.json | 60 + node_modules/isexe/test/basic.js | 221 + node_modules/isexe/windows.js | 42 + node_modules/isobject/LICENSE | 21 + node_modules/isobject/README.md | 122 + node_modules/isobject/index.d.ts | 5 + node_modules/isobject/index.js | 12 + node_modules/isobject/package.json | 130 + node_modules/js-beautify/CHANGELOG.md | 526 + node_modules/js-beautify/CONTRIBUTING.md | 138 + node_modules/js-beautify/LICENSE | 9 + node_modules/js-beautify/README.md | 325 + .../js-beautify/js/bin/css-beautify.js | 4 + .../js-beautify/js/bin/html-beautify.js | 4 + .../js-beautify/js/bin/js-beautify.js | 4 + .../js-beautify/js/config/defaults.json | 18 + node_modules/js-beautify/js/index.js | 81 + .../js-beautify/js/lib/beautify-css.js | 1048 + .../js-beautify/js/lib/beautify-html.js | 1387 + node_modules/js-beautify/js/lib/beautify.js | 2827 + node_modules/js-beautify/js/lib/cli.js | 635 + .../javascriptobfuscator_unpacker.js | 103 + .../js/lib/unpackers/myobfuscate_unpacker.js | 90 + .../js/lib/unpackers/p_a_c_k_e_r_unpacker.js | 83 + .../js/lib/unpackers/urlencode_unpacker.js | 73 + node_modules/js-beautify/js/src/core/acorn.js | 63 + .../js-beautify/js/src/core/inputscanner.js | 95 + .../js-beautify/js/src/core/options.js | 48 + .../js-beautify/js/src/core/output.js | 234 + node_modules/js-beautify/js/src/core/token.js | 49 + .../js-beautify/js/src/css/beautifier.js | 479 + node_modules/js-beautify/js/src/css/index.js | 36 + .../js-beautify/js/src/html/beautifier.js | 1035 + node_modules/js-beautify/js/src/html/index.js | 36 + node_modules/js-beautify/js/src/index.js | 27 + .../js/src/javascript/beautifier.js | 1456 + .../js-beautify/js/src/javascript/index.js | 36 + .../js/src/javascript/tokenizer.js | 620 + .../js-beautify/js/test/amd-beautify-tests.js | 62 + .../js/test/generated/beautify-css-tests.js | 1422 + .../js/test/generated/beautify-html-tests.js | 3212 + .../generated/beautify-javascript-tests.js | 5896 + .../js/test/node-beautify-html-perf-tests.js | 51 + .../js/test/node-beautify-perf-tests.js | 50 + .../js/test/node-beautify-tests.js | 45 + .../js/test/requirejs-html-beautify.html | 58 + .../test/resources/configerror/.jsbeautifyrc | 6 + .../configerror/subDir1/subDir2/empty.txt | 0 .../test/resources/editorconfig/.editorconfig | 6 + .../resources/editorconfig/cr/.editorconfig | 3 + .../resources/editorconfig/crlf/.editorconfig | 3 + .../editorconfig/error/.editorconfig | 1 + .../resources/editorconfig/example-base.js | 3 + .../js-beautify/js/test/resources/example1.js | 3 + .../resources/indent11chars/.jsbeautifyrc | 6 + .../indent11chars/subDir1/subDir2/empty.txt | 0 node_modules/js-beautify/js/test/run-tests | 17 + .../js-beautify/js/test/sanitytest.js | 144 + .../js-beautify/js/test/shell-smoke-test.sh | 396 + .../js-beautify/node_modules/.bin/nopt | 1 + .../js-beautify/node_modules/nopt/.npmignore | 1 + .../js-beautify/node_modules/nopt/.travis.yml | 9 + .../js-beautify/node_modules/nopt/LICENSE | 15 + .../js-beautify/node_modules/nopt/README.md | 211 + .../js-beautify/node_modules/nopt/bin/nopt.js | 54 + .../node_modules/nopt/examples/my-program.js | 30 + .../js-beautify/node_modules/nopt/lib/nopt.js | 415 + .../node_modules/nopt/package.json | 57 + .../node_modules/nopt/test/basic.js | 273 + node_modules/js-beautify/package.json | 113 + node_modules/js-string-escape/CHANGELOG.md | 13 + node_modules/js-string-escape/LICENSE | 21 + node_modules/js-string-escape/README.md | 44 + node_modules/js-string-escape/index.js | 22 + node_modules/js-string-escape/package.json | 73 + node_modules/jsonfile/CHANGELOG.md | 145 + node_modules/jsonfile/LICENSE | 15 + node_modules/jsonfile/README.md | 168 + node_modules/jsonfile/index.js | 134 + node_modules/jsonfile/package.json | 71 + node_modules/kind-of/CHANGELOG.md | 157 + node_modules/kind-of/LICENSE | 21 + node_modules/kind-of/README.md | 365 + node_modules/kind-of/index.js | 129 + node_modules/kind-of/package.json | 148 + node_modules/latest-version/index.js | 4 + node_modules/latest-version/license | 21 + node_modules/latest-version/package.json | 71 + node_modules/latest-version/readme.md | 40 + node_modules/lazy-cache/LICENSE | 21 + node_modules/lazy-cache/README.md | 195 + node_modules/lazy-cache/index.js | 73 + node_modules/lazy-cache/package.json | 108 + node_modules/lcid/index.js | 22 + node_modules/lcid/lcid.json | 203 + node_modules/lcid/license | 21 + node_modules/lcid/package.json | 78 + node_modules/lcid/readme.md | 35 + node_modules/load-json-file/index.js | 11 + node_modules/load-json-file/license | 21 + .../load-json-file/node_modules/pify/index.js | 68 + .../load-json-file/node_modules/pify/license | 21 + .../node_modules/pify/package.json | 80 + .../node_modules/pify/readme.md | 119 + node_modules/load-json-file/package.json | 75 + node_modules/load-json-file/readme.md | 45 + node_modules/locate-path/index.js | 24 + node_modules/locate-path/license | 21 + node_modules/locate-path/package.json | 79 + node_modules/locate-path/readme.md | 99 + node_modules/lodash/LICENSE | 47 + node_modules/lodash/README.md | 39 + node_modules/lodash/_DataView.js | 7 + node_modules/lodash/_Hash.js | 32 + node_modules/lodash/_LazyWrapper.js | 28 + node_modules/lodash/_ListCache.js | 32 + node_modules/lodash/_LodashWrapper.js | 22 + node_modules/lodash/_Map.js | 7 + node_modules/lodash/_MapCache.js | 32 + node_modules/lodash/_Promise.js | 7 + node_modules/lodash/_Set.js | 7 + node_modules/lodash/_SetCache.js | 27 + node_modules/lodash/_Stack.js | 27 + node_modules/lodash/_Symbol.js | 6 + node_modules/lodash/_Uint8Array.js | 6 + node_modules/lodash/_WeakMap.js | 7 + node_modules/lodash/_apply.js | 21 + node_modules/lodash/_arrayAggregator.js | 22 + node_modules/lodash/_arrayEach.js | 22 + node_modules/lodash/_arrayEachRight.js | 21 + node_modules/lodash/_arrayEvery.js | 23 + node_modules/lodash/_arrayFilter.js | 25 + node_modules/lodash/_arrayIncludes.js | 17 + node_modules/lodash/_arrayIncludesWith.js | 22 + node_modules/lodash/_arrayLikeKeys.js | 49 + node_modules/lodash/_arrayMap.js | 21 + node_modules/lodash/_arrayPush.js | 20 + node_modules/lodash/_arrayReduce.js | 26 + node_modules/lodash/_arrayReduceRight.js | 24 + node_modules/lodash/_arraySample.js | 15 + node_modules/lodash/_arraySampleSize.js | 17 + node_modules/lodash/_arrayShuffle.js | 15 + node_modules/lodash/_arraySome.js | 23 + node_modules/lodash/_asciiSize.js | 12 + node_modules/lodash/_asciiToArray.js | 12 + node_modules/lodash/_asciiWords.js | 15 + node_modules/lodash/_assignMergeValue.js | 20 + node_modules/lodash/_assignValue.js | 28 + node_modules/lodash/_assocIndexOf.js | 21 + node_modules/lodash/_baseAggregator.js | 21 + node_modules/lodash/_baseAssign.js | 17 + node_modules/lodash/_baseAssignIn.js | 17 + node_modules/lodash/_baseAssignValue.js | 25 + node_modules/lodash/_baseAt.js | 23 + node_modules/lodash/_baseClamp.js | 22 + node_modules/lodash/_baseClone.js | 171 + node_modules/lodash/_baseConforms.js | 18 + node_modules/lodash/_baseConformsTo.js | 27 + node_modules/lodash/_baseCreate.js | 30 + node_modules/lodash/_baseDelay.js | 21 + node_modules/lodash/_baseDifference.js | 67 + node_modules/lodash/_baseEach.js | 14 + node_modules/lodash/_baseEachRight.js | 14 + node_modules/lodash/_baseEvery.js | 21 + node_modules/lodash/_baseExtremum.js | 32 + node_modules/lodash/_baseFill.js | 32 + node_modules/lodash/_baseFilter.js | 21 + node_modules/lodash/_baseFindIndex.js | 24 + node_modules/lodash/_baseFindKey.js | 23 + node_modules/lodash/_baseFlatten.js | 38 + node_modules/lodash/_baseFor.js | 16 + node_modules/lodash/_baseForOwn.js | 16 + node_modules/lodash/_baseForOwnRight.js | 16 + node_modules/lodash/_baseForRight.js | 15 + node_modules/lodash/_baseFunctions.js | 19 + node_modules/lodash/_baseGet.js | 24 + node_modules/lodash/_baseGetAllKeys.js | 20 + node_modules/lodash/_baseGetTag.js | 28 + node_modules/lodash/_baseGt.js | 14 + node_modules/lodash/_baseHas.js | 19 + node_modules/lodash/_baseHasIn.js | 13 + node_modules/lodash/_baseInRange.js | 18 + node_modules/lodash/_baseIndexOf.js | 20 + node_modules/lodash/_baseIndexOfWith.js | 23 + node_modules/lodash/_baseIntersection.js | 74 + node_modules/lodash/_baseInverter.js | 21 + node_modules/lodash/_baseInvoke.js | 24 + node_modules/lodash/_baseIsArguments.js | 18 + node_modules/lodash/_baseIsArrayBuffer.js | 17 + node_modules/lodash/_baseIsDate.js | 18 + node_modules/lodash/_baseIsEqual.js | 28 + node_modules/lodash/_baseIsEqualDeep.js | 83 + node_modules/lodash/_baseIsMap.js | 18 + node_modules/lodash/_baseIsMatch.js | 62 + node_modules/lodash/_baseIsNaN.js | 12 + node_modules/lodash/_baseIsNative.js | 47 + node_modules/lodash/_baseIsRegExp.js | 18 + node_modules/lodash/_baseIsSet.js | 18 + node_modules/lodash/_baseIsTypedArray.js | 60 + node_modules/lodash/_baseIteratee.js | 31 + node_modules/lodash/_baseKeys.js | 30 + node_modules/lodash/_baseKeysIn.js | 33 + node_modules/lodash/_baseLodash.js | 10 + node_modules/lodash/_baseLt.js | 14 + node_modules/lodash/_baseMap.js | 22 + node_modules/lodash/_baseMatches.js | 22 + node_modules/lodash/_baseMatchesProperty.js | 33 + node_modules/lodash/_baseMean.js | 20 + node_modules/lodash/_baseMerge.js | 42 + node_modules/lodash/_baseMergeDeep.js | 94 + node_modules/lodash/_baseNth.js | 20 + node_modules/lodash/_baseOrderBy.js | 34 + node_modules/lodash/_basePick.js | 19 + node_modules/lodash/_basePickBy.js | 30 + node_modules/lodash/_baseProperty.js | 14 + node_modules/lodash/_basePropertyDeep.js | 16 + node_modules/lodash/_basePropertyOf.js | 14 + node_modules/lodash/_basePullAll.js | 51 + node_modules/lodash/_basePullAt.js | 37 + node_modules/lodash/_baseRandom.js | 18 + node_modules/lodash/_baseRange.js | 28 + node_modules/lodash/_baseReduce.js | 23 + node_modules/lodash/_baseRepeat.js | 35 + node_modules/lodash/_baseRest.js | 17 + node_modules/lodash/_baseSample.js | 15 + node_modules/lodash/_baseSampleSize.js | 18 + node_modules/lodash/_baseSet.js | 47 + node_modules/lodash/_baseSetData.js | 17 + node_modules/lodash/_baseSetToString.js | 22 + node_modules/lodash/_baseShuffle.js | 15 + node_modules/lodash/_baseSlice.js | 31 + node_modules/lodash/_baseSome.js | 22 + node_modules/lodash/_baseSortBy.js | 21 + node_modules/lodash/_baseSortedIndex.js | 42 + node_modules/lodash/_baseSortedIndexBy.js | 64 + node_modules/lodash/_baseSortedUniq.js | 30 + node_modules/lodash/_baseSum.js | 24 + node_modules/lodash/_baseTimes.js | 20 + node_modules/lodash/_baseToNumber.js | 24 + node_modules/lodash/_baseToPairs.js | 18 + node_modules/lodash/_baseToString.js | 37 + node_modules/lodash/_baseUnary.js | 14 + node_modules/lodash/_baseUniq.js | 72 + node_modules/lodash/_baseUnset.js | 20 + node_modules/lodash/_baseUpdate.js | 18 + node_modules/lodash/_baseValues.js | 19 + node_modules/lodash/_baseWhile.js | 26 + node_modules/lodash/_baseWrapperValue.js | 25 + node_modules/lodash/_baseXor.js | 36 + node_modules/lodash/_baseZipObject.js | 23 + node_modules/lodash/_cacheHas.js | 13 + node_modules/lodash/_castArrayLikeObject.js | 14 + node_modules/lodash/_castFunction.js | 14 + node_modules/lodash/_castPath.js | 21 + node_modules/lodash/_castRest.js | 14 + node_modules/lodash/_castSlice.js | 18 + node_modules/lodash/_charsEndIndex.js | 19 + node_modules/lodash/_charsStartIndex.js | 20 + node_modules/lodash/_cloneArrayBuffer.js | 16 + node_modules/lodash/_cloneBuffer.js | 35 + node_modules/lodash/_cloneDataView.js | 16 + node_modules/lodash/_cloneRegExp.js | 17 + node_modules/lodash/_cloneSymbol.js | 18 + node_modules/lodash/_cloneTypedArray.js | 16 + node_modules/lodash/_compareAscending.js | 41 + node_modules/lodash/_compareMultiple.js | 44 + node_modules/lodash/_composeArgs.js | 39 + node_modules/lodash/_composeArgsRight.js | 41 + node_modules/lodash/_copyArray.js | 20 + node_modules/lodash/_copyObject.js | 40 + node_modules/lodash/_copySymbols.js | 16 + node_modules/lodash/_copySymbolsIn.js | 16 + node_modules/lodash/_coreJsData.js | 6 + node_modules/lodash/_countHolders.js | 21 + node_modules/lodash/_createAggregator.js | 23 + node_modules/lodash/_createAssigner.js | 37 + node_modules/lodash/_createBaseEach.js | 32 + node_modules/lodash/_createBaseFor.js | 25 + node_modules/lodash/_createBind.js | 28 + node_modules/lodash/_createCaseFirst.js | 33 + node_modules/lodash/_createCompounder.js | 24 + node_modules/lodash/_createCtor.js | 37 + node_modules/lodash/_createCurry.js | 46 + node_modules/lodash/_createFind.js | 25 + node_modules/lodash/_createFlow.js | 78 + node_modules/lodash/_createHybrid.js | 92 + node_modules/lodash/_createInverter.js | 17 + node_modules/lodash/_createMathOperation.js | 38 + node_modules/lodash/_createOver.js | 27 + node_modules/lodash/_createPadding.js | 33 + node_modules/lodash/_createPartial.js | 43 + node_modules/lodash/_createRange.js | 30 + node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + node_modules/lodash/_createRound.js | 33 + node_modules/lodash/_createSet.js | 19 + node_modules/lodash/_createToPairs.js | 30 + node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + node_modules/lodash/_customDefaultsMerge.js | 28 + node_modules/lodash/_customOmitClone.js | 16 + node_modules/lodash/_deburrLetter.js | 71 + node_modules/lodash/_defineProperty.js | 11 + node_modules/lodash/_equalArrays.js | 83 + node_modules/lodash/_equalByTag.js | 112 + node_modules/lodash/_equalObjects.js | 89 + node_modules/lodash/_escapeHtmlChar.js | 21 + node_modules/lodash/_escapeStringChar.js | 22 + node_modules/lodash/_flatRest.js | 16 + node_modules/lodash/_freeGlobal.js | 4 + node_modules/lodash/_getAllKeys.js | 16 + node_modules/lodash/_getAllKeysIn.js | 17 + node_modules/lodash/_getData.js | 15 + node_modules/lodash/_getFuncName.js | 31 + node_modules/lodash/_getHolder.js | 13 + node_modules/lodash/_getMapData.js | 18 + node_modules/lodash/_getMatchData.js | 24 + node_modules/lodash/_getNative.js | 17 + node_modules/lodash/_getPrototype.js | 6 + node_modules/lodash/_getRawTag.js | 46 + node_modules/lodash/_getSymbols.js | 30 + node_modules/lodash/_getSymbolsIn.js | 25 + node_modules/lodash/_getTag.js | 58 + node_modules/lodash/_getValue.js | 13 + node_modules/lodash/_getView.js | 33 + node_modules/lodash/_getWrapDetails.js | 17 + node_modules/lodash/_hasPath.js | 39 + node_modules/lodash/_hasUnicode.js | 26 + node_modules/lodash/_hasUnicodeWord.js | 15 + node_modules/lodash/_hashClear.js | 15 + node_modules/lodash/_hashDelete.js | 17 + node_modules/lodash/_hashGet.js | 30 + node_modules/lodash/_hashHas.js | 23 + node_modules/lodash/_hashSet.js | 23 + node_modules/lodash/_initCloneArray.js | 26 + node_modules/lodash/_initCloneByTag.js | 77 + node_modules/lodash/_initCloneObject.js | 18 + node_modules/lodash/_insertWrapDetails.js | 23 + node_modules/lodash/_isFlattenable.js | 20 + node_modules/lodash/_isIndex.js | 25 + node_modules/lodash/_isIterateeCall.js | 30 + node_modules/lodash/_isKey.js | 29 + node_modules/lodash/_isKeyable.js | 15 + node_modules/lodash/_isLaziable.js | 28 + node_modules/lodash/_isMaskable.js | 14 + node_modules/lodash/_isMasked.js | 20 + node_modules/lodash/_isPrototype.js | 18 + node_modules/lodash/_isStrictComparable.js | 15 + node_modules/lodash/_iteratorToArray.js | 18 + node_modules/lodash/_lazyClone.js | 23 + node_modules/lodash/_lazyReverse.js | 23 + node_modules/lodash/_lazyValue.js | 69 + node_modules/lodash/_listCacheClear.js | 13 + node_modules/lodash/_listCacheDelete.js | 35 + node_modules/lodash/_listCacheGet.js | 19 + node_modules/lodash/_listCacheHas.js | 16 + node_modules/lodash/_listCacheSet.js | 26 + node_modules/lodash/_mapCacheClear.js | 21 + node_modules/lodash/_mapCacheDelete.js | 18 + node_modules/lodash/_mapCacheGet.js | 16 + node_modules/lodash/_mapCacheHas.js | 16 + node_modules/lodash/_mapCacheSet.js | 22 + node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + node_modules/lodash/_memoizeCapped.js | 26 + node_modules/lodash/_mergeData.js | 90 + node_modules/lodash/_metaMap.js | 6 + node_modules/lodash/_nativeCreate.js | 6 + node_modules/lodash/_nativeKeys.js | 6 + node_modules/lodash/_nativeKeysIn.js | 20 + node_modules/lodash/_nodeUtil.js | 22 + node_modules/lodash/_objectToString.js | 22 + node_modules/lodash/_overArg.js | 15 + node_modules/lodash/_overRest.js | 36 + node_modules/lodash/_parent.js | 16 + node_modules/lodash/_reEscape.js | 4 + node_modules/lodash/_reEvaluate.js | 4 + node_modules/lodash/_reInterpolate.js | 4 + node_modules/lodash/_realNames.js | 4 + node_modules/lodash/_reorder.js | 29 + node_modules/lodash/_replaceHolders.js | 29 + node_modules/lodash/_root.js | 9 + node_modules/lodash/_safeGet.js | 15 + node_modules/lodash/_setCacheAdd.js | 19 + node_modules/lodash/_setCacheHas.js | 14 + node_modules/lodash/_setData.js | 20 + node_modules/lodash/_setToArray.js | 18 + node_modules/lodash/_setToPairs.js | 18 + node_modules/lodash/_setToString.js | 14 + node_modules/lodash/_setWrapToString.js | 21 + node_modules/lodash/_shortOut.js | 37 + node_modules/lodash/_shuffleSelf.js | 28 + node_modules/lodash/_stackClear.js | 15 + node_modules/lodash/_stackDelete.js | 18 + node_modules/lodash/_stackGet.js | 14 + node_modules/lodash/_stackHas.js | 14 + node_modules/lodash/_stackSet.js | 34 + node_modules/lodash/_strictIndexOf.js | 23 + node_modules/lodash/_strictLastIndexOf.js | 21 + node_modules/lodash/_stringSize.js | 18 + node_modules/lodash/_stringToArray.js | 18 + node_modules/lodash/_stringToPath.js | 27 + node_modules/lodash/_toKey.js | 21 + node_modules/lodash/_toSource.js | 26 + node_modules/lodash/_unescapeHtmlChar.js | 21 + node_modules/lodash/_unicodeSize.js | 44 + node_modules/lodash/_unicodeToArray.js | 40 + node_modules/lodash/_unicodeWords.js | 69 + node_modules/lodash/_updateWrapDetails.js | 46 + node_modules/lodash/_wrapperClone.js | 23 + node_modules/lodash/add.js | 22 + node_modules/lodash/after.js | 42 + node_modules/lodash/array.js | 67 + node_modules/lodash/ary.js | 29 + node_modules/lodash/assign.js | 58 + node_modules/lodash/assignIn.js | 40 + node_modules/lodash/assignInWith.js | 38 + node_modules/lodash/assignWith.js | 37 + node_modules/lodash/at.js | 23 + node_modules/lodash/attempt.js | 35 + node_modules/lodash/before.js | 40 + node_modules/lodash/bind.js | 57 + node_modules/lodash/bindAll.js | 41 + node_modules/lodash/bindKey.js | 68 + node_modules/lodash/camelCase.js | 29 + node_modules/lodash/capitalize.js | 23 + node_modules/lodash/castArray.js | 44 + node_modules/lodash/ceil.js | 26 + node_modules/lodash/chain.js | 38 + node_modules/lodash/chunk.js | 50 + node_modules/lodash/clamp.js | 39 + node_modules/lodash/clone.js | 36 + node_modules/lodash/cloneDeep.js | 29 + node_modules/lodash/cloneDeepWith.js | 40 + node_modules/lodash/cloneWith.js | 42 + node_modules/lodash/collection.js | 30 + node_modules/lodash/commit.js | 33 + node_modules/lodash/compact.js | 31 + node_modules/lodash/concat.js | 43 + node_modules/lodash/cond.js | 60 + node_modules/lodash/conforms.js | 35 + node_modules/lodash/conformsTo.js | 32 + node_modules/lodash/constant.js | 26 + node_modules/lodash/core.js | 3854 + node_modules/lodash/core.min.js | 29 + node_modules/lodash/countBy.js | 40 + node_modules/lodash/create.js | 43 + node_modules/lodash/curry.js | 57 + node_modules/lodash/curryRight.js | 54 + node_modules/lodash/date.js | 3 + node_modules/lodash/debounce.js | 190 + node_modules/lodash/deburr.js | 45 + node_modules/lodash/defaultTo.js | 25 + node_modules/lodash/defaults.js | 64 + node_modules/lodash/defaultsDeep.js | 30 + node_modules/lodash/defer.js | 26 + node_modules/lodash/delay.js | 28 + node_modules/lodash/difference.js | 33 + node_modules/lodash/differenceBy.js | 44 + node_modules/lodash/differenceWith.js | 40 + node_modules/lodash/divide.js | 22 + node_modules/lodash/drop.js | 38 + node_modules/lodash/dropRight.js | 39 + node_modules/lodash/dropRightWhile.js | 45 + node_modules/lodash/dropWhile.js | 45 + node_modules/lodash/each.js | 1 + node_modules/lodash/eachRight.js | 1 + node_modules/lodash/endsWith.js | 43 + node_modules/lodash/entries.js | 1 + node_modules/lodash/entriesIn.js | 1 + node_modules/lodash/eq.js | 37 + node_modules/lodash/escape.js | 43 + node_modules/lodash/escapeRegExp.js | 32 + node_modules/lodash/every.js | 56 + node_modules/lodash/extend.js | 1 + node_modules/lodash/extendWith.js | 1 + node_modules/lodash/fill.js | 45 + node_modules/lodash/filter.js | 48 + node_modules/lodash/find.js | 42 + node_modules/lodash/findIndex.js | 55 + node_modules/lodash/findKey.js | 44 + node_modules/lodash/findLast.js | 25 + node_modules/lodash/findLastIndex.js | 59 + node_modules/lodash/findLastKey.js | 44 + node_modules/lodash/first.js | 1 + node_modules/lodash/flatMap.js | 29 + node_modules/lodash/flatMapDeep.js | 31 + node_modules/lodash/flatMapDepth.js | 31 + node_modules/lodash/flatten.js | 22 + node_modules/lodash/flattenDeep.js | 25 + node_modules/lodash/flattenDepth.js | 33 + node_modules/lodash/flip.js | 28 + node_modules/lodash/floor.js | 26 + node_modules/lodash/flow.js | 27 + node_modules/lodash/flowRight.js | 26 + node_modules/lodash/forEach.js | 41 + node_modules/lodash/forEachRight.js | 31 + node_modules/lodash/forIn.js | 39 + node_modules/lodash/forInRight.js | 37 + node_modules/lodash/forOwn.js | 36 + node_modules/lodash/forOwnRight.js | 34 + node_modules/lodash/fp.js | 2 + node_modules/lodash/fp/F.js | 1 + node_modules/lodash/fp/T.js | 1 + node_modules/lodash/fp/__.js | 1 + node_modules/lodash/fp/_baseConvert.js | 573 + node_modules/lodash/fp/_convertBrowser.js | 18 + node_modules/lodash/fp/_falseOptions.js | 7 + node_modules/lodash/fp/_mapping.js | 368 + node_modules/lodash/fp/_util.js | 16 + node_modules/lodash/fp/add.js | 5 + node_modules/lodash/fp/after.js | 5 + node_modules/lodash/fp/all.js | 1 + node_modules/lodash/fp/allPass.js | 1 + node_modules/lodash/fp/always.js | 1 + node_modules/lodash/fp/any.js | 1 + node_modules/lodash/fp/anyPass.js | 1 + node_modules/lodash/fp/apply.js | 1 + node_modules/lodash/fp/array.js | 2 + node_modules/lodash/fp/ary.js | 5 + node_modules/lodash/fp/assign.js | 5 + node_modules/lodash/fp/assignAll.js | 5 + node_modules/lodash/fp/assignAllWith.js | 5 + node_modules/lodash/fp/assignIn.js | 5 + node_modules/lodash/fp/assignInAll.js | 5 + node_modules/lodash/fp/assignInAllWith.js | 5 + node_modules/lodash/fp/assignInWith.js | 5 + node_modules/lodash/fp/assignWith.js | 5 + node_modules/lodash/fp/assoc.js | 1 + node_modules/lodash/fp/assocPath.js | 1 + node_modules/lodash/fp/at.js | 5 + node_modules/lodash/fp/attempt.js | 5 + node_modules/lodash/fp/before.js | 5 + node_modules/lodash/fp/bind.js | 5 + node_modules/lodash/fp/bindAll.js | 5 + node_modules/lodash/fp/bindKey.js | 5 + node_modules/lodash/fp/camelCase.js | 5 + node_modules/lodash/fp/capitalize.js | 5 + node_modules/lodash/fp/castArray.js | 5 + node_modules/lodash/fp/ceil.js | 5 + node_modules/lodash/fp/chain.js | 5 + node_modules/lodash/fp/chunk.js | 5 + node_modules/lodash/fp/clamp.js | 5 + node_modules/lodash/fp/clone.js | 5 + node_modules/lodash/fp/cloneDeep.js | 5 + node_modules/lodash/fp/cloneDeepWith.js | 5 + node_modules/lodash/fp/cloneWith.js | 5 + node_modules/lodash/fp/collection.js | 2 + node_modules/lodash/fp/commit.js | 5 + node_modules/lodash/fp/compact.js | 5 + node_modules/lodash/fp/complement.js | 1 + node_modules/lodash/fp/compose.js | 1 + node_modules/lodash/fp/concat.js | 5 + node_modules/lodash/fp/cond.js | 5 + node_modules/lodash/fp/conforms.js | 1 + node_modules/lodash/fp/conformsTo.js | 5 + node_modules/lodash/fp/constant.js | 5 + node_modules/lodash/fp/contains.js | 1 + node_modules/lodash/fp/convert.js | 18 + node_modules/lodash/fp/countBy.js | 5 + node_modules/lodash/fp/create.js | 5 + node_modules/lodash/fp/curry.js | 5 + node_modules/lodash/fp/curryN.js | 5 + node_modules/lodash/fp/curryRight.js | 5 + node_modules/lodash/fp/curryRightN.js | 5 + node_modules/lodash/fp/date.js | 2 + node_modules/lodash/fp/debounce.js | 5 + node_modules/lodash/fp/deburr.js | 5 + node_modules/lodash/fp/defaultTo.js | 5 + node_modules/lodash/fp/defaults.js | 5 + node_modules/lodash/fp/defaultsAll.js | 5 + node_modules/lodash/fp/defaultsDeep.js | 5 + node_modules/lodash/fp/defaultsDeepAll.js | 5 + node_modules/lodash/fp/defer.js | 5 + node_modules/lodash/fp/delay.js | 5 + node_modules/lodash/fp/difference.js | 5 + node_modules/lodash/fp/differenceBy.js | 5 + node_modules/lodash/fp/differenceWith.js | 5 + node_modules/lodash/fp/dissoc.js | 1 + node_modules/lodash/fp/dissocPath.js | 1 + node_modules/lodash/fp/divide.js | 5 + node_modules/lodash/fp/drop.js | 5 + node_modules/lodash/fp/dropLast.js | 1 + node_modules/lodash/fp/dropLastWhile.js | 1 + node_modules/lodash/fp/dropRight.js | 5 + node_modules/lodash/fp/dropRightWhile.js | 5 + node_modules/lodash/fp/dropWhile.js | 5 + node_modules/lodash/fp/each.js | 1 + node_modules/lodash/fp/eachRight.js | 1 + node_modules/lodash/fp/endsWith.js | 5 + node_modules/lodash/fp/entries.js | 1 + node_modules/lodash/fp/entriesIn.js | 1 + node_modules/lodash/fp/eq.js | 5 + node_modules/lodash/fp/equals.js | 1 + node_modules/lodash/fp/escape.js | 5 + node_modules/lodash/fp/escapeRegExp.js | 5 + node_modules/lodash/fp/every.js | 5 + node_modules/lodash/fp/extend.js | 1 + node_modules/lodash/fp/extendAll.js | 1 + node_modules/lodash/fp/extendAllWith.js | 1 + node_modules/lodash/fp/extendWith.js | 1 + node_modules/lodash/fp/fill.js | 5 + node_modules/lodash/fp/filter.js | 5 + node_modules/lodash/fp/find.js | 5 + node_modules/lodash/fp/findFrom.js | 5 + node_modules/lodash/fp/findIndex.js | 5 + node_modules/lodash/fp/findIndexFrom.js | 5 + node_modules/lodash/fp/findKey.js | 5 + node_modules/lodash/fp/findLast.js | 5 + node_modules/lodash/fp/findLastFrom.js | 5 + node_modules/lodash/fp/findLastIndex.js | 5 + node_modules/lodash/fp/findLastIndexFrom.js | 5 + node_modules/lodash/fp/findLastKey.js | 5 + node_modules/lodash/fp/first.js | 1 + node_modules/lodash/fp/flatMap.js | 5 + node_modules/lodash/fp/flatMapDeep.js | 5 + node_modules/lodash/fp/flatMapDepth.js | 5 + node_modules/lodash/fp/flatten.js | 5 + node_modules/lodash/fp/flattenDeep.js | 5 + node_modules/lodash/fp/flattenDepth.js | 5 + node_modules/lodash/fp/flip.js | 5 + node_modules/lodash/fp/floor.js | 5 + node_modules/lodash/fp/flow.js | 5 + node_modules/lodash/fp/flowRight.js | 5 + node_modules/lodash/fp/forEach.js | 5 + node_modules/lodash/fp/forEachRight.js | 5 + node_modules/lodash/fp/forIn.js | 5 + node_modules/lodash/fp/forInRight.js | 5 + node_modules/lodash/fp/forOwn.js | 5 + node_modules/lodash/fp/forOwnRight.js | 5 + node_modules/lodash/fp/fromPairs.js | 5 + node_modules/lodash/fp/function.js | 2 + node_modules/lodash/fp/functions.js | 5 + node_modules/lodash/fp/functionsIn.js | 5 + node_modules/lodash/fp/get.js | 5 + node_modules/lodash/fp/getOr.js | 5 + node_modules/lodash/fp/groupBy.js | 5 + node_modules/lodash/fp/gt.js | 5 + node_modules/lodash/fp/gte.js | 5 + node_modules/lodash/fp/has.js | 5 + node_modules/lodash/fp/hasIn.js | 5 + node_modules/lodash/fp/head.js | 5 + node_modules/lodash/fp/identical.js | 1 + node_modules/lodash/fp/identity.js | 5 + node_modules/lodash/fp/inRange.js | 5 + node_modules/lodash/fp/includes.js | 5 + node_modules/lodash/fp/includesFrom.js | 5 + node_modules/lodash/fp/indexBy.js | 1 + node_modules/lodash/fp/indexOf.js | 5 + node_modules/lodash/fp/indexOfFrom.js | 5 + node_modules/lodash/fp/init.js | 1 + node_modules/lodash/fp/initial.js | 5 + node_modules/lodash/fp/intersection.js | 5 + node_modules/lodash/fp/intersectionBy.js | 5 + node_modules/lodash/fp/intersectionWith.js | 5 + node_modules/lodash/fp/invert.js | 5 + node_modules/lodash/fp/invertBy.js | 5 + node_modules/lodash/fp/invertObj.js | 1 + node_modules/lodash/fp/invoke.js | 5 + node_modules/lodash/fp/invokeArgs.js | 5 + node_modules/lodash/fp/invokeArgsMap.js | 5 + node_modules/lodash/fp/invokeMap.js | 5 + node_modules/lodash/fp/isArguments.js | 5 + node_modules/lodash/fp/isArray.js | 5 + node_modules/lodash/fp/isArrayBuffer.js | 5 + node_modules/lodash/fp/isArrayLike.js | 5 + node_modules/lodash/fp/isArrayLikeObject.js | 5 + node_modules/lodash/fp/isBoolean.js | 5 + node_modules/lodash/fp/isBuffer.js | 5 + node_modules/lodash/fp/isDate.js | 5 + node_modules/lodash/fp/isElement.js | 5 + node_modules/lodash/fp/isEmpty.js | 5 + node_modules/lodash/fp/isEqual.js | 5 + node_modules/lodash/fp/isEqualWith.js | 5 + node_modules/lodash/fp/isError.js | 5 + node_modules/lodash/fp/isFinite.js | 5 + node_modules/lodash/fp/isFunction.js | 5 + node_modules/lodash/fp/isInteger.js | 5 + node_modules/lodash/fp/isLength.js | 5 + node_modules/lodash/fp/isMap.js | 5 + node_modules/lodash/fp/isMatch.js | 5 + node_modules/lodash/fp/isMatchWith.js | 5 + node_modules/lodash/fp/isNaN.js | 5 + node_modules/lodash/fp/isNative.js | 5 + node_modules/lodash/fp/isNil.js | 5 + node_modules/lodash/fp/isNull.js | 5 + node_modules/lodash/fp/isNumber.js | 5 + node_modules/lodash/fp/isObject.js | 5 + node_modules/lodash/fp/isObjectLike.js | 5 + node_modules/lodash/fp/isPlainObject.js | 5 + node_modules/lodash/fp/isRegExp.js | 5 + node_modules/lodash/fp/isSafeInteger.js | 5 + node_modules/lodash/fp/isSet.js | 5 + node_modules/lodash/fp/isString.js | 5 + node_modules/lodash/fp/isSymbol.js | 5 + node_modules/lodash/fp/isTypedArray.js | 5 + node_modules/lodash/fp/isUndefined.js | 5 + node_modules/lodash/fp/isWeakMap.js | 5 + node_modules/lodash/fp/isWeakSet.js | 5 + node_modules/lodash/fp/iteratee.js | 5 + node_modules/lodash/fp/join.js | 5 + node_modules/lodash/fp/juxt.js | 1 + node_modules/lodash/fp/kebabCase.js | 5 + node_modules/lodash/fp/keyBy.js | 5 + node_modules/lodash/fp/keys.js | 5 + node_modules/lodash/fp/keysIn.js | 5 + node_modules/lodash/fp/lang.js | 2 + node_modules/lodash/fp/last.js | 5 + node_modules/lodash/fp/lastIndexOf.js | 5 + node_modules/lodash/fp/lastIndexOfFrom.js | 5 + node_modules/lodash/fp/lowerCase.js | 5 + node_modules/lodash/fp/lowerFirst.js | 5 + node_modules/lodash/fp/lt.js | 5 + node_modules/lodash/fp/lte.js | 5 + node_modules/lodash/fp/map.js | 5 + node_modules/lodash/fp/mapKeys.js | 5 + node_modules/lodash/fp/mapValues.js | 5 + node_modules/lodash/fp/matches.js | 1 + node_modules/lodash/fp/matchesProperty.js | 5 + node_modules/lodash/fp/math.js | 2 + node_modules/lodash/fp/max.js | 5 + node_modules/lodash/fp/maxBy.js | 5 + node_modules/lodash/fp/mean.js | 5 + node_modules/lodash/fp/meanBy.js | 5 + node_modules/lodash/fp/memoize.js | 5 + node_modules/lodash/fp/merge.js | 5 + node_modules/lodash/fp/mergeAll.js | 5 + node_modules/lodash/fp/mergeAllWith.js | 5 + node_modules/lodash/fp/mergeWith.js | 5 + node_modules/lodash/fp/method.js | 5 + node_modules/lodash/fp/methodOf.js | 5 + node_modules/lodash/fp/min.js | 5 + node_modules/lodash/fp/minBy.js | 5 + node_modules/lodash/fp/mixin.js | 5 + node_modules/lodash/fp/multiply.js | 5 + node_modules/lodash/fp/nAry.js | 1 + node_modules/lodash/fp/negate.js | 5 + node_modules/lodash/fp/next.js | 5 + node_modules/lodash/fp/noop.js | 5 + node_modules/lodash/fp/now.js | 5 + node_modules/lodash/fp/nth.js | 5 + node_modules/lodash/fp/nthArg.js | 5 + node_modules/lodash/fp/number.js | 2 + node_modules/lodash/fp/object.js | 2 + node_modules/lodash/fp/omit.js | 5 + node_modules/lodash/fp/omitAll.js | 1 + node_modules/lodash/fp/omitBy.js | 5 + node_modules/lodash/fp/once.js | 5 + node_modules/lodash/fp/orderBy.js | 5 + node_modules/lodash/fp/over.js | 5 + node_modules/lodash/fp/overArgs.js | 5 + node_modules/lodash/fp/overEvery.js | 5 + node_modules/lodash/fp/overSome.js | 5 + node_modules/lodash/fp/pad.js | 5 + node_modules/lodash/fp/padChars.js | 5 + node_modules/lodash/fp/padCharsEnd.js | 5 + node_modules/lodash/fp/padCharsStart.js | 5 + node_modules/lodash/fp/padEnd.js | 5 + node_modules/lodash/fp/padStart.js | 5 + node_modules/lodash/fp/parseInt.js | 5 + node_modules/lodash/fp/partial.js | 5 + node_modules/lodash/fp/partialRight.js | 5 + node_modules/lodash/fp/partition.js | 5 + node_modules/lodash/fp/path.js | 1 + node_modules/lodash/fp/pathEq.js | 1 + node_modules/lodash/fp/pathOr.js | 1 + node_modules/lodash/fp/paths.js | 1 + node_modules/lodash/fp/pick.js | 5 + node_modules/lodash/fp/pickAll.js | 1 + node_modules/lodash/fp/pickBy.js | 5 + node_modules/lodash/fp/pipe.js | 1 + node_modules/lodash/fp/placeholder.js | 6 + node_modules/lodash/fp/plant.js | 5 + node_modules/lodash/fp/pluck.js | 1 + node_modules/lodash/fp/prop.js | 1 + node_modules/lodash/fp/propEq.js | 1 + node_modules/lodash/fp/propOr.js | 1 + node_modules/lodash/fp/property.js | 1 + node_modules/lodash/fp/propertyOf.js | 5 + node_modules/lodash/fp/props.js | 1 + node_modules/lodash/fp/pull.js | 5 + node_modules/lodash/fp/pullAll.js | 5 + node_modules/lodash/fp/pullAllBy.js | 5 + node_modules/lodash/fp/pullAllWith.js | 5 + node_modules/lodash/fp/pullAt.js | 5 + node_modules/lodash/fp/random.js | 5 + node_modules/lodash/fp/range.js | 5 + node_modules/lodash/fp/rangeRight.js | 5 + node_modules/lodash/fp/rangeStep.js | 5 + node_modules/lodash/fp/rangeStepRight.js | 5 + node_modules/lodash/fp/rearg.js | 5 + node_modules/lodash/fp/reduce.js | 5 + node_modules/lodash/fp/reduceRight.js | 5 + node_modules/lodash/fp/reject.js | 5 + node_modules/lodash/fp/remove.js | 5 + node_modules/lodash/fp/repeat.js | 5 + node_modules/lodash/fp/replace.js | 5 + node_modules/lodash/fp/rest.js | 5 + node_modules/lodash/fp/restFrom.js | 5 + node_modules/lodash/fp/result.js | 5 + node_modules/lodash/fp/reverse.js | 5 + node_modules/lodash/fp/round.js | 5 + node_modules/lodash/fp/sample.js | 5 + node_modules/lodash/fp/sampleSize.js | 5 + node_modules/lodash/fp/seq.js | 2 + node_modules/lodash/fp/set.js | 5 + node_modules/lodash/fp/setWith.js | 5 + node_modules/lodash/fp/shuffle.js | 5 + node_modules/lodash/fp/size.js | 5 + node_modules/lodash/fp/slice.js | 5 + node_modules/lodash/fp/snakeCase.js | 5 + node_modules/lodash/fp/some.js | 5 + node_modules/lodash/fp/sortBy.js | 5 + node_modules/lodash/fp/sortedIndex.js | 5 + node_modules/lodash/fp/sortedIndexBy.js | 5 + node_modules/lodash/fp/sortedIndexOf.js | 5 + node_modules/lodash/fp/sortedLastIndex.js | 5 + node_modules/lodash/fp/sortedLastIndexBy.js | 5 + node_modules/lodash/fp/sortedLastIndexOf.js | 5 + node_modules/lodash/fp/sortedUniq.js | 5 + node_modules/lodash/fp/sortedUniqBy.js | 5 + node_modules/lodash/fp/split.js | 5 + node_modules/lodash/fp/spread.js | 5 + node_modules/lodash/fp/spreadFrom.js | 5 + node_modules/lodash/fp/startCase.js | 5 + node_modules/lodash/fp/startsWith.js | 5 + node_modules/lodash/fp/string.js | 2 + node_modules/lodash/fp/stubArray.js | 5 + node_modules/lodash/fp/stubFalse.js | 5 + node_modules/lodash/fp/stubObject.js | 5 + node_modules/lodash/fp/stubString.js | 5 + node_modules/lodash/fp/stubTrue.js | 5 + node_modules/lodash/fp/subtract.js | 5 + node_modules/lodash/fp/sum.js | 5 + node_modules/lodash/fp/sumBy.js | 5 + node_modules/lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + node_modules/lodash/fp/tail.js | 5 + node_modules/lodash/fp/take.js | 5 + node_modules/lodash/fp/takeLast.js | 1 + node_modules/lodash/fp/takeLastWhile.js | 1 + node_modules/lodash/fp/takeRight.js | 5 + node_modules/lodash/fp/takeRightWhile.js | 5 + node_modules/lodash/fp/takeWhile.js | 5 + node_modules/lodash/fp/tap.js | 5 + node_modules/lodash/fp/template.js | 5 + node_modules/lodash/fp/templateSettings.js | 5 + node_modules/lodash/fp/throttle.js | 5 + node_modules/lodash/fp/thru.js | 5 + node_modules/lodash/fp/times.js | 5 + node_modules/lodash/fp/toArray.js | 5 + node_modules/lodash/fp/toFinite.js | 5 + node_modules/lodash/fp/toInteger.js | 5 + node_modules/lodash/fp/toIterator.js | 5 + node_modules/lodash/fp/toJSON.js | 5 + node_modules/lodash/fp/toLength.js | 5 + node_modules/lodash/fp/toLower.js | 5 + node_modules/lodash/fp/toNumber.js | 5 + node_modules/lodash/fp/toPairs.js | 5 + node_modules/lodash/fp/toPairsIn.js | 5 + node_modules/lodash/fp/toPath.js | 5 + node_modules/lodash/fp/toPlainObject.js | 5 + node_modules/lodash/fp/toSafeInteger.js | 5 + node_modules/lodash/fp/toString.js | 5 + node_modules/lodash/fp/toUpper.js | 5 + node_modules/lodash/fp/transform.js | 5 + node_modules/lodash/fp/trim.js | 5 + node_modules/lodash/fp/trimChars.js | 5 + node_modules/lodash/fp/trimCharsEnd.js | 5 + node_modules/lodash/fp/trimCharsStart.js | 5 + node_modules/lodash/fp/trimEnd.js | 5 + node_modules/lodash/fp/trimStart.js | 5 + node_modules/lodash/fp/truncate.js | 5 + node_modules/lodash/fp/unapply.js | 1 + node_modules/lodash/fp/unary.js | 5 + node_modules/lodash/fp/unescape.js | 5 + node_modules/lodash/fp/union.js | 5 + node_modules/lodash/fp/unionBy.js | 5 + node_modules/lodash/fp/unionWith.js | 5 + node_modules/lodash/fp/uniq.js | 5 + node_modules/lodash/fp/uniqBy.js | 5 + node_modules/lodash/fp/uniqWith.js | 5 + node_modules/lodash/fp/uniqueId.js | 5 + node_modules/lodash/fp/unnest.js | 1 + node_modules/lodash/fp/unset.js | 5 + node_modules/lodash/fp/unzip.js | 5 + node_modules/lodash/fp/unzipWith.js | 5 + node_modules/lodash/fp/update.js | 5 + node_modules/lodash/fp/updateWith.js | 5 + node_modules/lodash/fp/upperCase.js | 5 + node_modules/lodash/fp/upperFirst.js | 5 + node_modules/lodash/fp/useWith.js | 1 + node_modules/lodash/fp/util.js | 2 + node_modules/lodash/fp/value.js | 5 + node_modules/lodash/fp/valueOf.js | 5 + node_modules/lodash/fp/values.js | 5 + node_modules/lodash/fp/valuesIn.js | 5 + node_modules/lodash/fp/where.js | 1 + node_modules/lodash/fp/whereEq.js | 1 + node_modules/lodash/fp/without.js | 5 + node_modules/lodash/fp/words.js | 5 + node_modules/lodash/fp/wrap.js | 5 + node_modules/lodash/fp/wrapperAt.js | 5 + node_modules/lodash/fp/wrapperChain.js | 5 + node_modules/lodash/fp/wrapperLodash.js | 5 + node_modules/lodash/fp/wrapperReverse.js | 5 + node_modules/lodash/fp/wrapperValue.js | 5 + node_modules/lodash/fp/xor.js | 5 + node_modules/lodash/fp/xorBy.js | 5 + node_modules/lodash/fp/xorWith.js | 5 + node_modules/lodash/fp/zip.js | 5 + node_modules/lodash/fp/zipAll.js | 5 + node_modules/lodash/fp/zipObj.js | 1 + node_modules/lodash/fp/zipObject.js | 5 + node_modules/lodash/fp/zipObjectDeep.js | 5 + node_modules/lodash/fp/zipWith.js | 5 + node_modules/lodash/fromPairs.js | 28 + node_modules/lodash/function.js | 25 + node_modules/lodash/functions.js | 31 + node_modules/lodash/functionsIn.js | 31 + node_modules/lodash/get.js | 33 + node_modules/lodash/groupBy.js | 41 + node_modules/lodash/gt.js | 29 + node_modules/lodash/gte.js | 30 + node_modules/lodash/has.js | 35 + node_modules/lodash/hasIn.js | 34 + node_modules/lodash/head.js | 23 + node_modules/lodash/identity.js | 21 + node_modules/lodash/inRange.js | 55 + node_modules/lodash/includes.js | 53 + node_modules/lodash/index.js | 1 + node_modules/lodash/indexOf.js | 42 + node_modules/lodash/initial.js | 22 + node_modules/lodash/intersection.js | 30 + node_modules/lodash/intersectionBy.js | 45 + node_modules/lodash/intersectionWith.js | 41 + node_modules/lodash/invert.js | 42 + node_modules/lodash/invertBy.js | 56 + node_modules/lodash/invoke.js | 24 + node_modules/lodash/invokeMap.js | 41 + node_modules/lodash/isArguments.js | 36 + node_modules/lodash/isArray.js | 26 + node_modules/lodash/isArrayBuffer.js | 27 + node_modules/lodash/isArrayLike.js | 33 + node_modules/lodash/isArrayLikeObject.js | 33 + node_modules/lodash/isBoolean.js | 29 + node_modules/lodash/isBuffer.js | 38 + node_modules/lodash/isDate.js | 27 + node_modules/lodash/isElement.js | 25 + node_modules/lodash/isEmpty.js | 77 + node_modules/lodash/isEqual.js | 35 + node_modules/lodash/isEqualWith.js | 41 + node_modules/lodash/isError.js | 36 + node_modules/lodash/isFinite.js | 36 + node_modules/lodash/isFunction.js | 37 + node_modules/lodash/isInteger.js | 33 + node_modules/lodash/isLength.js | 35 + node_modules/lodash/isMap.js | 27 + node_modules/lodash/isMatch.js | 36 + node_modules/lodash/isMatchWith.js | 41 + node_modules/lodash/isNaN.js | 38 + node_modules/lodash/isNative.js | 40 + node_modules/lodash/isNil.js | 25 + node_modules/lodash/isNull.js | 22 + node_modules/lodash/isNumber.js | 38 + node_modules/lodash/isObject.js | 31 + node_modules/lodash/isObjectLike.js | 29 + node_modules/lodash/isPlainObject.js | 62 + node_modules/lodash/isRegExp.js | 27 + node_modules/lodash/isSafeInteger.js | 37 + node_modules/lodash/isSet.js | 27 + node_modules/lodash/isString.js | 30 + node_modules/lodash/isSymbol.js | 29 + node_modules/lodash/isTypedArray.js | 27 + node_modules/lodash/isUndefined.js | 22 + node_modules/lodash/isWeakMap.js | 28 + node_modules/lodash/isWeakSet.js | 28 + node_modules/lodash/iteratee.js | 53 + node_modules/lodash/join.js | 26 + node_modules/lodash/kebabCase.js | 28 + node_modules/lodash/keyBy.js | 36 + node_modules/lodash/keys.js | 37 + node_modules/lodash/keysIn.js | 32 + node_modules/lodash/lang.js | 58 + node_modules/lodash/last.js | 20 + node_modules/lodash/lastIndexOf.js | 46 + node_modules/lodash/lodash.js | 17097 ++ node_modules/lodash/lodash.min.js | 137 + node_modules/lodash/lowerCase.js | 27 + node_modules/lodash/lowerFirst.js | 22 + node_modules/lodash/lt.js | 29 + node_modules/lodash/lte.js | 30 + node_modules/lodash/map.js | 53 + node_modules/lodash/mapKeys.js | 36 + node_modules/lodash/mapValues.js | 43 + node_modules/lodash/matches.js | 39 + node_modules/lodash/matchesProperty.js | 37 + node_modules/lodash/math.js | 17 + node_modules/lodash/max.js | 29 + node_modules/lodash/maxBy.js | 34 + node_modules/lodash/mean.js | 22 + node_modules/lodash/meanBy.js | 31 + node_modules/lodash/memoize.js | 73 + node_modules/lodash/merge.js | 39 + node_modules/lodash/mergeWith.js | 39 + node_modules/lodash/method.js | 34 + node_modules/lodash/methodOf.js | 33 + node_modules/lodash/min.js | 29 + node_modules/lodash/minBy.js | 34 + node_modules/lodash/mixin.js | 74 + node_modules/lodash/multiply.js | 22 + node_modules/lodash/negate.js | 40 + node_modules/lodash/next.js | 35 + node_modules/lodash/noop.js | 17 + node_modules/lodash/now.js | 23 + node_modules/lodash/nth.js | 29 + node_modules/lodash/nthArg.js | 32 + node_modules/lodash/number.js | 5 + node_modules/lodash/object.js | 49 + node_modules/lodash/omit.js | 57 + node_modules/lodash/omitBy.js | 29 + node_modules/lodash/once.js | 25 + node_modules/lodash/orderBy.js | 47 + node_modules/lodash/over.js | 24 + node_modules/lodash/overArgs.js | 61 + node_modules/lodash/overEvery.js | 30 + node_modules/lodash/overSome.js | 30 + node_modules/lodash/package.json | 69 + node_modules/lodash/pad.js | 49 + node_modules/lodash/padEnd.js | 39 + node_modules/lodash/padStart.js | 39 + node_modules/lodash/parseInt.js | 43 + node_modules/lodash/partial.js | 50 + node_modules/lodash/partialRight.js | 49 + node_modules/lodash/partition.js | 43 + node_modules/lodash/pick.js | 25 + node_modules/lodash/pickBy.js | 37 + node_modules/lodash/plant.js | 48 + node_modules/lodash/property.js | 32 + node_modules/lodash/propertyOf.js | 30 + node_modules/lodash/pull.js | 29 + node_modules/lodash/pullAll.js | 29 + node_modules/lodash/pullAllBy.js | 33 + node_modules/lodash/pullAllWith.js | 32 + node_modules/lodash/pullAt.js | 43 + node_modules/lodash/random.js | 82 + node_modules/lodash/range.js | 46 + node_modules/lodash/rangeRight.js | 41 + node_modules/lodash/rearg.js | 33 + node_modules/lodash/reduce.js | 51 + node_modules/lodash/reduceRight.js | 36 + node_modules/lodash/reject.js | 46 + node_modules/lodash/remove.js | 53 + node_modules/lodash/repeat.js | 37 + node_modules/lodash/replace.js | 29 + node_modules/lodash/rest.js | 40 + node_modules/lodash/result.js | 56 + node_modules/lodash/reverse.js | 34 + node_modules/lodash/round.js | 26 + node_modules/lodash/sample.js | 24 + node_modules/lodash/sampleSize.js | 37 + node_modules/lodash/seq.js | 16 + node_modules/lodash/set.js | 35 + node_modules/lodash/setWith.js | 32 + node_modules/lodash/shuffle.js | 25 + node_modules/lodash/size.js | 46 + node_modules/lodash/slice.js | 37 + node_modules/lodash/snakeCase.js | 28 + node_modules/lodash/some.js | 51 + node_modules/lodash/sortBy.js | 48 + node_modules/lodash/sortedIndex.js | 24 + node_modules/lodash/sortedIndexBy.js | 33 + node_modules/lodash/sortedIndexOf.js | 31 + node_modules/lodash/sortedLastIndex.js | 25 + node_modules/lodash/sortedLastIndexBy.js | 33 + node_modules/lodash/sortedLastIndexOf.js | 31 + node_modules/lodash/sortedUniq.js | 24 + node_modules/lodash/sortedUniqBy.js | 26 + node_modules/lodash/split.js | 52 + node_modules/lodash/spread.js | 63 + node_modules/lodash/startCase.js | 29 + node_modules/lodash/startsWith.js | 39 + node_modules/lodash/string.js | 33 + node_modules/lodash/stubArray.js | 23 + node_modules/lodash/stubFalse.js | 18 + node_modules/lodash/stubObject.js | 23 + node_modules/lodash/stubString.js | 18 + node_modules/lodash/stubTrue.js | 18 + node_modules/lodash/subtract.js | 22 + node_modules/lodash/sum.js | 24 + node_modules/lodash/sumBy.js | 33 + node_modules/lodash/tail.js | 22 + node_modules/lodash/take.js | 37 + node_modules/lodash/takeRight.js | 39 + node_modules/lodash/takeRightWhile.js | 45 + node_modules/lodash/takeWhile.js | 45 + node_modules/lodash/tap.js | 29 + node_modules/lodash/template.js | 238 + node_modules/lodash/templateSettings.js | 67 + node_modules/lodash/throttle.js | 69 + node_modules/lodash/thru.js | 28 + node_modules/lodash/times.js | 51 + node_modules/lodash/toArray.js | 58 + node_modules/lodash/toFinite.js | 42 + node_modules/lodash/toInteger.js | 36 + node_modules/lodash/toIterator.js | 23 + node_modules/lodash/toJSON.js | 1 + node_modules/lodash/toLength.js | 38 + node_modules/lodash/toLower.js | 28 + node_modules/lodash/toNumber.js | 66 + node_modules/lodash/toPairs.js | 30 + node_modules/lodash/toPairsIn.js | 30 + node_modules/lodash/toPath.js | 33 + node_modules/lodash/toPlainObject.js | 32 + node_modules/lodash/toSafeInteger.js | 37 + node_modules/lodash/toString.js | 28 + node_modules/lodash/toUpper.js | 28 + node_modules/lodash/transform.js | 65 + node_modules/lodash/trim.js | 49 + node_modules/lodash/trimEnd.js | 43 + node_modules/lodash/trimStart.js | 43 + node_modules/lodash/truncate.js | 111 + node_modules/lodash/unary.js | 22 + node_modules/lodash/unescape.js | 34 + node_modules/lodash/union.js | 26 + node_modules/lodash/unionBy.js | 39 + node_modules/lodash/unionWith.js | 34 + node_modules/lodash/uniq.js | 25 + node_modules/lodash/uniqBy.js | 31 + node_modules/lodash/uniqWith.js | 28 + node_modules/lodash/uniqueId.js | 28 + node_modules/lodash/unset.js | 34 + node_modules/lodash/unzip.js | 45 + node_modules/lodash/unzipWith.js | 39 + node_modules/lodash/update.js | 35 + node_modules/lodash/updateWith.js | 33 + node_modules/lodash/upperCase.js | 27 + node_modules/lodash/upperFirst.js | 22 + node_modules/lodash/util.js | 34 + node_modules/lodash/value.js | 1 + node_modules/lodash/valueOf.js | 1 + node_modules/lodash/values.js | 34 + node_modules/lodash/valuesIn.js | 32 + node_modules/lodash/without.js | 31 + node_modules/lodash/words.js | 35 + node_modules/lodash/wrap.js | 30 + node_modules/lodash/wrapperAt.js | 48 + node_modules/lodash/wrapperChain.js | 34 + node_modules/lodash/wrapperLodash.js | 147 + node_modules/lodash/wrapperReverse.js | 44 + node_modules/lodash/wrapperValue.js | 21 + node_modules/lodash/xor.js | 28 + node_modules/lodash/xorBy.js | 39 + node_modules/lodash/xorWith.js | 34 + node_modules/lodash/zip.js | 22 + node_modules/lodash/zipObject.js | 24 + node_modules/lodash/zipObjectDeep.js | 23 + node_modules/lodash/zipWith.js | 32 + node_modules/lowercase-keys/index.js | 11 + node_modules/lowercase-keys/package.json | 67 + node_modules/lowercase-keys/readme.md | 33 + node_modules/lru-cache/LICENSE | 15 + node_modules/lru-cache/README.md | 152 + node_modules/lru-cache/index.js | 467 + node_modules/lru-cache/package.json | 68 + node_modules/lru-queue/.lint | 11 + node_modules/lru-queue/.npmignore | 4 + node_modules/lru-queue/.travis.yml | 9 + node_modules/lru-queue/CHANGES | 3 + node_modules/lru-queue/LICENCE | 19 + node_modules/lru-queue/README.md | 65 + node_modules/lru-queue/index.js | 48 + node_modules/lru-queue/package.json | 58 + node_modules/lru-queue/test/index.js | 29 + node_modules/make-dir/index.js | 83 + node_modules/make-dir/license | 9 + node_modules/make-dir/package.json | 86 + node_modules/make-dir/readme.md | 116 + node_modules/map-cache/LICENSE | 21 + node_modules/map-cache/README.md | 145 + node_modules/map-cache/index.js | 100 + node_modules/map-cache/package.json | 91 + node_modules/map-stream/.npmignore | 3 + node_modules/map-stream/.travis.yml | 4 + node_modules/map-stream/LICENCE | 22 + node_modules/map-stream/examples/pretty.js | 26 + node_modules/map-stream/index.js | 145 + node_modules/map-stream/package.json | 55 + node_modules/map-stream/readme.markdown | 37 + .../map-stream/test/simple-map.asynct.js | 318 + node_modules/map-visit/LICENSE | 21 + node_modules/map-visit/README.md | 155 + node_modules/map-visit/index.js | 37 + node_modules/map-visit/package.json | 113 + node_modules/media-typer/HISTORY.md | 22 + node_modules/media-typer/LICENSE | 22 + node_modules/media-typer/README.md | 81 + node_modules/media-typer/index.js | 270 + node_modules/media-typer/package.json | 64 + node_modules/mem/index.js | 55 + node_modules/mem/license | 21 + node_modules/mem/package.json | 77 + node_modules/mem/readme.md | 147 + node_modules/memoizee/.editorconfig | 14 + node_modules/memoizee/.testignore | 1 + node_modules/memoizee/CHANGELOG.md | 71 + node_modules/memoizee/CHANGES | 124 + node_modules/memoizee/LICENSE | 15 + node_modules/memoizee/README.md | 483 + node_modules/memoizee/benchmark/fibonacci.js | 140 + node_modules/memoizee/ext/async.js | 160 + node_modules/memoizee/ext/dispose.js | 33 + node_modules/memoizee/ext/max-age.js | 96 + node_modules/memoizee/ext/max.js | 27 + node_modules/memoizee/ext/promise.js | 154 + node_modules/memoizee/ext/ref-counter.js | 48 + node_modules/memoizee/index.js | 34 + node_modules/memoizee/lib/configure-map.js | 188 + node_modules/memoizee/lib/methods.js | 32 + .../memoizee/lib/registered-extensions.js | 1 + node_modules/memoizee/lib/resolve-length.js | 15 + .../memoizee/lib/resolve-normalize.js | 17 + node_modules/memoizee/lib/resolve-resolve.js | 21 + node_modules/memoizee/lib/weak.js | 135 + node_modules/memoizee/methods-plain.js | 3 + node_modules/memoizee/methods.js | 3 + node_modules/memoizee/normalizers/get-1.js | 29 + .../memoizee/normalizers/get-fixed.js | 71 + .../normalizers/get-primitive-fixed.js | 16 + node_modules/memoizee/normalizers/get.js | 90 + .../memoizee/normalizers/primitive.js | 9 + node_modules/memoizee/package.json | 90 + node_modules/memoizee/plain.js | 37 + node_modules/memoizee/profile.js | 111 + node_modules/memoizee/test/ext/async.js | 413 + node_modules/memoizee/test/ext/dispose.js | 298 + node_modules/memoizee/test/ext/max-age.js | 935 + node_modules/memoizee/test/ext/max.js | 1677 + node_modules/memoizee/test/ext/promise.js | 285 + node_modules/memoizee/test/ext/ref-counter.js | 380 + node_modules/memoizee/test/index.js | 2474 + .../memoizee/test/lib/configure-map.js | 156 + node_modules/memoizee/test/lib/methods.js | 50 + .../test/lib/registered-extensions.js | 6 + .../memoizee/test/lib/resolve-length.js | 10 + .../memoizee/test/lib/resolve-normalize.js | 9 + .../memoizee/test/lib/resolve-resolve.js | 5 + node_modules/memoizee/test/lib/weak.js | 53 + node_modules/memoizee/test/methods-plain.js | 48 + node_modules/memoizee/test/methods.js | 45 + .../memoizee/test/normalizers/get-1.js | 62 + .../memoizee/test/normalizers/get-fixed.js | 98 + .../test/normalizers/get-primitive-fixed.js | 70 + node_modules/memoizee/test/normalizers/get.js | 66 + .../memoizee/test/normalizers/primitive.js | 28 + node_modules/memoizee/test/plain.js | 56 + node_modules/memoizee/test/profile.js | 14 + node_modules/memoizee/test/weak-plain.js | 50 + node_modules/memoizee/test/weak.js | 62 + node_modules/memoizee/weak-plain.js | 3 + node_modules/memoizee/weak.js | 3 + node_modules/merge-descriptors/HISTORY.md | 21 + node_modules/merge-descriptors/LICENSE | 23 + node_modules/merge-descriptors/README.md | 48 + node_modules/merge-descriptors/index.js | 60 + node_modules/merge-descriptors/package.json | 72 + node_modules/methods/HISTORY.md | 29 + node_modules/methods/LICENSE | 24 + node_modules/methods/README.md | 51 + node_modules/methods/index.js | 69 + node_modules/methods/package.json | 82 + node_modules/micromatch/CHANGELOG.md | 37 + node_modules/micromatch/LICENSE | 21 + node_modules/micromatch/README.md | 1150 + node_modules/micromatch/index.js | 877 + node_modules/micromatch/lib/.DS_Store | Bin 0 -> 6148 bytes node_modules/micromatch/lib/cache.js | 1 + node_modules/micromatch/lib/compilers.js | 77 + node_modules/micromatch/lib/parsers.js | 83 + node_modules/micromatch/lib/utils.js | 309 + node_modules/micromatch/package.json | 216 + node_modules/mime-db/HISTORY.md | 368 + node_modules/mime-db/LICENSE | 22 + node_modules/mime-db/README.md | 94 + node_modules/mime-db/db.json | 7088 + node_modules/mime-db/index.js | 11 + node_modules/mime-db/package.json | 103 + node_modules/mime-types/HISTORY.md | 260 + node_modules/mime-types/LICENSE | 23 + node_modules/mime-types/README.md | 108 + node_modules/mime-types/index.js | 188 + node_modules/mime-types/package.json | 90 + node_modules/mime/LICENSE | 21 + node_modules/mime/README.md | 90 + node_modules/mime/build/build.js | 11 + node_modules/mime/build/test.js | 60 + node_modules/mime/cli.js | 8 + node_modules/mime/mime.js | 108 + node_modules/mime/package.json | 70 + node_modules/mime/types.json | 1 + node_modules/mimic-fn/index.js | 9 + node_modules/mimic-fn/license | 9 + node_modules/mimic-fn/package.json | 72 + node_modules/mimic-fn/readme.md | 68 + node_modules/minimatch/LICENSE | 15 + node_modules/minimatch/README.md | 209 + node_modules/minimatch/minimatch.js | 923 + node_modules/minimatch/package.json | 64 + node_modules/minimist/.travis.yml | 8 + node_modules/minimist/LICENSE | 18 + node_modules/minimist/example/parse.js | 2 + node_modules/minimist/index.js | 236 + node_modules/minimist/package.json | 73 + node_modules/minimist/readme.markdown | 91 + node_modules/minimist/test/all_bool.js | 32 + node_modules/minimist/test/bool.js | 166 + node_modules/minimist/test/dash.js | 31 + node_modules/minimist/test/default_bool.js | 35 + node_modules/minimist/test/dotted.js | 22 + node_modules/minimist/test/kv_short.js | 16 + node_modules/minimist/test/long.js | 31 + node_modules/minimist/test/num.js | 36 + node_modules/minimist/test/parse.js | 197 + node_modules/minimist/test/parse_modified.js | 9 + node_modules/minimist/test/short.js | 67 + node_modules/minimist/test/stop_early.js | 15 + node_modules/minimist/test/unknown.js | 102 + node_modules/minimist/test/whitespace.js | 8 + node_modules/mixin-deep/LICENSE | 21 + node_modules/mixin-deep/README.md | 80 + node_modules/mixin-deep/index.js | 53 + .../node_modules/is-extendable/LICENSE | 21 + .../node_modules/is-extendable/README.md | 88 + .../node_modules/is-extendable/index.d.ts | 5 + .../node_modules/is-extendable/index.js | 14 + .../node_modules/is-extendable/package.json | 98 + node_modules/mixin-deep/package.json | 98 + node_modules/mkdirp/.travis.yml | 8 + node_modules/mkdirp/LICENSE | 21 + node_modules/mkdirp/bin/cmd.js | 33 + node_modules/mkdirp/bin/usage.txt | 12 + node_modules/mkdirp/examples/pow.js | 6 + node_modules/mkdirp/index.js | 98 + .../mkdirp/node_modules/minimist/.travis.yml | 4 + .../mkdirp/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../mkdirp/node_modules/minimist/index.js | 187 + .../mkdirp/node_modules/minimist/package.json | 71 + .../node_modules/minimist/readme.markdown | 73 + .../mkdirp/node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../mkdirp/node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/mkdirp/package.json | 62 + node_modules/mkdirp/readme.markdown | 100 + node_modules/mkdirp/test/chmod.js | 41 + node_modules/mkdirp/test/clobber.js | 38 + node_modules/mkdirp/test/mkdirp.js | 28 + node_modules/mkdirp/test/opts_fs.js | 29 + node_modules/mkdirp/test/opts_fs_sync.js | 27 + node_modules/mkdirp/test/perm.js | 32 + node_modules/mkdirp/test/perm_sync.js | 36 + node_modules/mkdirp/test/race.js | 37 + node_modules/mkdirp/test/rel.js | 32 + node_modules/mkdirp/test/return.js | 25 + node_modules/mkdirp/test/return_sync.js | 24 + node_modules/mkdirp/test/root.js | 19 + node_modules/mkdirp/test/sync.js | 32 + node_modules/mkdirp/test/umask.js | 28 + node_modules/mkdirp/test/umask_sync.js | 32 + node_modules/moment-timezone/.npmignore | 19 + node_modules/moment-timezone/LICENSE | 20 + node_modules/moment-timezone/README.md | 36 + .../moment-timezone-with-data-2012-2022.js | 1204 + ...moment-timezone-with-data-2012-2022.min.js | 1 + .../builds/moment-timezone-with-data.js | 1204 + .../builds/moment-timezone-with-data.min.js | 1 + .../builds/moment-timezone.min.js | 1 + node_modules/moment-timezone/changelog.md | 144 + node_modules/moment-timezone/composer.json | 43 + .../moment-timezone/data/meta/latest.json | 5110 + .../moment-timezone/data/packed/latest.json | 599 + .../moment-timezone/data/unpacked/latest.json | 125188 +++++++++++++++ node_modules/moment-timezone/index.js | 2 + .../moment-timezone/moment-timezone-utils.js | 316 + .../moment-timezone/moment-timezone.js | 605 + node_modules/moment-timezone/package.json | 84 + node_modules/moment/CHANGELOG.md | 841 + node_modules/moment/LICENSE | 22 + node_modules/moment/README.md | 61 + node_modules/moment/ender.js | 1 + node_modules/moment/locale/af.js | 74 + node_modules/moment/locale/ar-dz.js | 60 + node_modules/moment/locale/ar-kw.js | 60 + node_modules/moment/locale/ar-ly.js | 127 + node_modules/moment/locale/ar-ma.js | 61 + node_modules/moment/locale/ar-sa.js | 106 + node_modules/moment/locale/ar-tn.js | 60 + node_modules/moment/locale/ar.js | 143 + node_modules/moment/locale/az.js | 106 + node_modules/moment/locale/be.js | 135 + node_modules/moment/locale/bg.js | 91 + node_modules/moment/locale/bm.js | 60 + node_modules/moment/locale/bn.js | 120 + node_modules/moment/locale/bo.js | 120 + node_modules/moment/locale/br.js | 109 + node_modules/moment/locale/bs.js | 153 + node_modules/moment/locale/ca.js | 89 + node_modules/moment/locale/cs.js | 180 + node_modules/moment/locale/cv.js | 64 + node_modules/moment/locale/cy.js | 82 + node_modules/moment/locale/da.js | 61 + node_modules/moment/locale/de-at.js | 80 + node_modules/moment/locale/de-ch.js | 79 + node_modules/moment/locale/de.js | 79 + node_modules/moment/locale/dv.js | 101 + node_modules/moment/locale/el.js | 101 + node_modules/moment/locale/en-au.js | 68 + node_modules/moment/locale/en-ca.js | 64 + node_modules/moment/locale/en-gb.js | 68 + node_modules/moment/locale/en-ie.js | 68 + node_modules/moment/locale/en-nz.js | 68 + node_modules/moment/locale/eo.js | 74 + node_modules/moment/locale/es-do.js | 92 + node_modules/moment/locale/es-us.js | 84 + node_modules/moment/locale/es.js | 93 + node_modules/moment/locale/et.js | 82 + node_modules/moment/locale/eu.js | 67 + node_modules/moment/locale/fa.js | 108 + node_modules/moment/locale/fi.js | 110 + node_modules/moment/locale/fo.js | 61 + node_modules/moment/locale/fr-ca.js | 75 + node_modules/moment/locale/fr-ch.js | 79 + node_modules/moment/locale/fr.js | 84 + node_modules/moment/locale/fy.js | 76 + node_modules/moment/locale/gd.js | 77 + node_modules/moment/locale/gl.js | 78 + node_modules/moment/locale/gom-latn.js | 124 + node_modules/moment/locale/gu.js | 125 + node_modules/moment/locale/he.js | 100 + node_modules/moment/locale/hi.js | 125 + node_modules/moment/locale/hr.js | 155 + node_modules/moment/locale/hu.js | 111 + node_modules/moment/locale/hy-am.js | 96 + node_modules/moment/locale/id.js | 84 + node_modules/moment/locale/is.js | 133 + node_modules/moment/locale/it.js | 71 + node_modules/moment/locale/ja.js | 81 + node_modules/moment/locale/jv.js | 84 + node_modules/moment/locale/ka.js | 90 + node_modules/moment/locale/kk.js | 88 + node_modules/moment/locale/km.js | 59 + node_modules/moment/locale/kn.js | 127 + node_modules/moment/locale/ko.js | 83 + node_modules/moment/locale/ky.js | 89 + node_modules/moment/locale/lb.js | 138 + node_modules/moment/locale/lo.js | 71 + node_modules/moment/locale/lt.js | 119 + node_modules/moment/locale/lv.js | 99 + node_modules/moment/locale/me.js | 113 + node_modules/moment/locale/mi.js | 65 + node_modules/moment/locale/mk.js | 91 + node_modules/moment/locale/ml.js | 82 + node_modules/moment/locale/mr.js | 162 + node_modules/moment/locale/ms-my.js | 84 + node_modules/moment/locale/ms.js | 83 + node_modules/moment/locale/mt.js | 61 + node_modules/moment/locale/my.js | 97 + node_modules/moment/locale/nb.js | 64 + node_modules/moment/locale/ne.js | 124 + node_modules/moment/locale/nl-be.js | 89 + node_modules/moment/locale/nl.js | 89 + node_modules/moment/locale/nn.js | 61 + node_modules/moment/locale/pa-in.js | 125 + node_modules/moment/locale/pl.js | 127 + node_modules/moment/locale/pt-br.js | 62 + node_modules/moment/locale/pt.js | 66 + node_modules/moment/locale/ro.js | 77 + node_modules/moment/locale/ru.js | 185 + node_modules/moment/locale/sd.js | 99 + node_modules/moment/locale/se.js | 62 + node_modules/moment/locale/si.js | 72 + node_modules/moment/locale/sk.js | 158 + node_modules/moment/locale/sl.js | 174 + node_modules/moment/locale/sq.js | 71 + node_modules/moment/locale/sr-cyrl.js | 112 + node_modules/moment/locale/sr.js | 112 + node_modules/moment/locale/ss.js | 90 + node_modules/moment/locale/sv.js | 70 + node_modules/moment/locale/sw.js | 60 + node_modules/moment/locale/ta.js | 131 + node_modules/moment/locale/te.js | 90 + node_modules/moment/locale/tet.js | 69 + node_modules/moment/locale/th.js | 68 + node_modules/moment/locale/tl-ph.js | 63 + node_modules/moment/locale/tlh.js | 123 + node_modules/moment/locale/tr.js | 91 + node_modules/moment/locale/tzl.js | 93 + node_modules/moment/locale/tzm-latn.js | 59 + node_modules/moment/locale/tzm.js | 59 + node_modules/moment/locale/uk.js | 153 + node_modules/moment/locale/ur.js | 100 + node_modules/moment/locale/uz-latn.js | 59 + node_modules/moment/locale/uz.js | 59 + node_modules/moment/locale/vi.js | 80 + node_modules/moment/locale/x-pseudo.js | 69 + node_modules/moment/locale/yo.js | 61 + node_modules/moment/locale/zh-cn.js | 112 + node_modules/moment/locale/zh-hk.js | 106 + node_modules/moment/locale/zh-tw.js | 105 + node_modules/moment/min/locales.js | 9769 ++ node_modules/moment/min/locales.min.js | 1 + .../moment/min/moment-with-locales.js | 14289 ++ .../moment/min/moment-with-locales.min.js | 1 + node_modules/moment/min/moment.min.js | 1 + node_modules/moment/moment.d.ts | 717 + node_modules/moment/moment.js | 4535 + node_modules/moment/package.js | 11 + node_modules/moment/package.json | 151 + .../moment/src/lib/create/check-overflow.js | 34 + .../moment/src/lib/create/date-from-array.js | 21 + .../moment/src/lib/create/from-anything.js | 110 + .../moment/src/lib/create/from-array.js | 147 + .../moment/src/lib/create/from-object.js | 16 + .../src/lib/create/from-string-and-array.js | 50 + .../src/lib/create/from-string-and-format.js | 113 + .../moment/src/lib/create/from-string.js | 230 + node_modules/moment/src/lib/create/local.js | 5 + .../moment/src/lib/create/parsing-flags.js | 26 + node_modules/moment/src/lib/create/utc.js | 5 + node_modules/moment/src/lib/create/valid.js | 50 + node_modules/moment/src/lib/duration/abs.js | 18 + .../moment/src/lib/duration/add-subtract.js | 21 + node_modules/moment/src/lib/duration/as.js | 61 + .../moment/src/lib/duration/bubble.js | 61 + node_modules/moment/src/lib/duration/clone.js | 6 + .../moment/src/lib/duration/constructor.js | 44 + .../moment/src/lib/duration/create.js | 122 + .../moment/src/lib/duration/duration.js | 16 + node_modules/moment/src/lib/duration/get.js | 25 + .../moment/src/lib/duration/humanize.js | 85 + .../moment/src/lib/duration/iso-string.js | 64 + .../moment/src/lib/duration/prototype.js | 52 + node_modules/moment/src/lib/duration/valid.js | 36 + node_modules/moment/src/lib/format/format.js | 92 + .../moment/src/lib/locale/base-config.js | 44 + .../moment/src/lib/locale/calendar.js | 15 + .../moment/src/lib/locale/constructor.js | 5 + node_modules/moment/src/lib/locale/en.js | 15 + node_modules/moment/src/lib/locale/formats.js | 23 + node_modules/moment/src/lib/locale/invalid.js | 5 + node_modules/moment/src/lib/locale/lists.js | 93 + node_modules/moment/src/lib/locale/locale.js | 39 + node_modules/moment/src/lib/locale/locales.js | 186 + node_modules/moment/src/lib/locale/ordinal.js | 7 + .../moment/src/lib/locale/pre-post-format.js | 3 + .../moment/src/lib/locale/prototype.js | 69 + .../moment/src/lib/locale/relative.js | 30 + node_modules/moment/src/lib/locale/set.js | 49 + .../moment/src/lib/moment/add-subtract.js | 55 + .../moment/src/lib/moment/calendar.js | 26 + node_modules/moment/src/lib/moment/clone.js | 5 + node_modules/moment/src/lib/moment/compare.js | 59 + .../moment/src/lib/moment/constructor.js | 77 + .../moment/src/lib/moment/creation-data.js | 9 + node_modules/moment/src/lib/moment/diff.js | 58 + node_modules/moment/src/lib/moment/format.js | 62 + node_modules/moment/src/lib/moment/from.js | 17 + node_modules/moment/src/lib/moment/get-set.js | 61 + node_modules/moment/src/lib/moment/locale.js | 34 + node_modules/moment/src/lib/moment/min-max.js | 63 + node_modules/moment/src/lib/moment/moment.js | 28 + node_modules/moment/src/lib/moment/now.js | 3 + .../moment/src/lib/moment/prototype.js | 150 + .../moment/src/lib/moment/start-end-of.js | 59 + node_modules/moment/src/lib/moment/to-type.js | 34 + node_modules/moment/src/lib/moment/to.js | 17 + node_modules/moment/src/lib/moment/valid.js | 15 + node_modules/moment/src/lib/parse/regex.js | 54 + node_modules/moment/src/lib/parse/token.js | 33 + node_modules/moment/src/lib/units/aliases.js | 30 + .../moment/src/lib/units/constants.js | 9 + .../moment/src/lib/units/day-of-month.js | 39 + .../moment/src/lib/units/day-of-week.js | 364 + .../moment/src/lib/units/day-of-year.js | 36 + node_modules/moment/src/lib/units/hour.js | 144 + .../moment/src/lib/units/millisecond.js | 69 + node_modules/moment/src/lib/units/minute.js | 29 + node_modules/moment/src/lib/units/month.js | 290 + node_modules/moment/src/lib/units/offset.js | 235 + .../moment/src/lib/units/priorities.js | 16 + node_modules/moment/src/lib/units/quarter.js | 32 + node_modules/moment/src/lib/units/second.js | 29 + .../moment/src/lib/units/timestamp.js | 20 + node_modules/moment/src/lib/units/timezone.js | 16 + node_modules/moment/src/lib/units/units.js | 20 + .../src/lib/units/week-calendar-utils.js | 65 + .../moment/src/lib/units/week-year.js | 107 + node_modules/moment/src/lib/units/week.js | 67 + node_modules/moment/src/lib/units/year.js | 75 + node_modules/moment/src/lib/utils/abs-ceil.js | 7 + .../moment/src/lib/utils/abs-floor.js | 8 + .../moment/src/lib/utils/abs-round.js | 7 + .../moment/src/lib/utils/compare-arrays.js | 16 + node_modules/moment/src/lib/utils/defaults.js | 10 + .../moment/src/lib/utils/deprecate.js | 55 + node_modules/moment/src/lib/utils/extend.js | 19 + .../moment/src/lib/utils/has-own-prop.js | 3 + node_modules/moment/src/lib/utils/hooks.js | 13 + node_modules/moment/src/lib/utils/index-of.js | 18 + node_modules/moment/src/lib/utils/is-array.js | 3 + node_modules/moment/src/lib/utils/is-date.js | 3 + .../moment/src/lib/utils/is-function.js | 3 + .../moment/src/lib/utils/is-number.js | 3 + .../moment/src/lib/utils/is-object-empty.js | 13 + .../moment/src/lib/utils/is-object.js | 5 + .../moment/src/lib/utils/is-undefined.js | 3 + node_modules/moment/src/lib/utils/keys.js | 19 + node_modules/moment/src/lib/utils/map.js | 7 + node_modules/moment/src/lib/utils/mod.js | 3 + node_modules/moment/src/lib/utils/some.js | 19 + node_modules/moment/src/lib/utils/to-int.js | 12 + .../moment/src/lib/utils/zero-fill.js | 7 + node_modules/moment/src/locale/af.js | 64 + node_modules/moment/src/locale/ar-dz.js | 51 + node_modules/moment/src/locale/ar-kw.js | 50 + node_modules/moment/src/locale/ar-ly.js | 113 + node_modules/moment/src/locale/ar-ma.js | 52 + node_modules/moment/src/locale/ar-sa.js | 96 + node_modules/moment/src/locale/ar-tn.js | 51 + node_modules/moment/src/locale/ar.js | 128 + node_modules/moment/src/locale/az.js | 97 + node_modules/moment/src/locale/be.js | 126 + node_modules/moment/src/locale/bg.js | 82 + node_modules/moment/src/locale/bm.js | 50 + node_modules/moment/src/locale/bn.js | 110 + node_modules/moment/src/locale/bo.js | 111 + node_modules/moment/src/locale/br.js | 100 + node_modules/moment/src/locale/bs.js | 143 + node_modules/moment/src/locale/ca.js | 80 + node_modules/moment/src/locale/cs.js | 171 + node_modules/moment/src/locale/cv.js | 54 + node_modules/moment/src/locale/cy.js | 73 + node_modules/moment/src/locale/da.js | 51 + node_modules/moment/src/locale/de-at.js | 70 + node_modules/moment/src/locale/de-ch.js | 69 + node_modules/moment/src/locale/de.js | 69 + node_modules/moment/src/locale/dv.js | 90 + node_modules/moment/src/locale/el.js | 89 + node_modules/moment/src/locale/en-au.js | 59 + node_modules/moment/src/locale/en-ca.js | 54 + node_modules/moment/src/locale/en-gb.js | 59 + node_modules/moment/src/locale/en-ie.js | 59 + node_modules/moment/src/locale/en-nz.js | 58 + node_modules/moment/src/locale/eo.js | 65 + node_modules/moment/src/locale/es-do.js | 83 + node_modules/moment/src/locale/es-us.js | 74 + node_modules/moment/src/locale/es.js | 83 + node_modules/moment/src/locale/et.js | 73 + node_modules/moment/src/locale/eu.js | 58 + node_modules/moment/src/locale/fa.js | 98 + node_modules/moment/src/locale/fi.js | 101 + node_modules/moment/src/locale/fo.js | 52 + node_modules/moment/src/locale/fr-ca.js | 66 + node_modules/moment/src/locale/fr-ch.js | 70 + node_modules/moment/src/locale/fr.js | 75 + node_modules/moment/src/locale/fy.js | 67 + node_modules/moment/src/locale/gd.js | 68 + node_modules/moment/src/locale/gl.js | 69 + node_modules/moment/src/locale/gom-latn.js | 114 + node_modules/moment/src/locale/gu.js | 115 + node_modules/moment/src/locale/he.js | 91 + node_modules/moment/src/locale/hi.js | 116 + node_modules/moment/src/locale/hr.js | 145 + node_modules/moment/src/locale/hu.js | 103 + node_modules/moment/src/locale/hy-am.js | 87 + node_modules/moment/src/locale/id.js | 75 + node_modules/moment/src/locale/is.js | 124 + node_modules/moment/src/locale/it.js | 62 + node_modules/moment/src/locale/ja.js | 72 + node_modules/moment/src/locale/jv.js | 74 + node_modules/moment/src/locale/ka.js | 81 + node_modules/moment/src/locale/kk.js | 78 + node_modules/moment/src/locale/km.js | 50 + node_modules/moment/src/locale/kn.js | 117 + node_modules/moment/src/locale/ko.js | 74 + node_modules/moment/src/locale/ky.js | 79 + node_modules/moment/src/locale/lb.js | 129 + node_modules/moment/src/locale/lo.js | 62 + node_modules/moment/src/locale/lt.js | 110 + node_modules/moment/src/locale/lv.js | 90 + node_modules/moment/src/locale/me.js | 103 + node_modules/moment/src/locale/mi.js | 55 + node_modules/moment/src/locale/mk.js | 82 + node_modules/moment/src/locale/ml.js | 73 + node_modules/moment/src/locale/mr.js | 153 + node_modules/moment/src/locale/ms-my.js | 75 + node_modules/moment/src/locale/ms.js | 74 + node_modules/moment/src/locale/mt.js | 51 + node_modules/moment/src/locale/my.js | 87 + node_modules/moment/src/locale/nb.js | 55 + node_modules/moment/src/locale/ne.js | 115 + node_modules/moment/src/locale/nl-be.js | 80 + node_modules/moment/src/locale/nl.js | 80 + node_modules/moment/src/locale/nn.js | 52 + node_modules/moment/src/locale/pa-in.js | 116 + node_modules/moment/src/locale/pl.js | 117 + node_modules/moment/src/locale/pt-br.js | 53 + node_modules/moment/src/locale/pt.js | 57 + node_modules/moment/src/locale/ro.js | 68 + node_modules/moment/src/locale/ru.js | 175 + node_modules/moment/src/locale/sd.js | 89 + node_modules/moment/src/locale/se.js | 52 + node_modules/moment/src/locale/si.js | 62 + node_modules/moment/src/locale/sk.js | 149 + node_modules/moment/src/locale/sl.js | 164 + node_modules/moment/src/locale/sq.js | 62 + node_modules/moment/src/locale/sr-cyrl.js | 102 + node_modules/moment/src/locale/sr.js | 102 + node_modules/moment/src/locale/ss.js | 81 + node_modules/moment/src/locale/sv.js | 61 + node_modules/moment/src/locale/sw.js | 51 + node_modules/moment/src/locale/ta.js | 121 + node_modules/moment/src/locale/te.js | 80 + node_modules/moment/src/locale/tet.js | 59 + node_modules/moment/src/locale/th.js | 58 + node_modules/moment/src/locale/tl-ph.js | 54 + node_modules/moment/src/locale/tlh.js | 113 + node_modules/moment/src/locale/tr.js | 82 + node_modules/moment/src/locale/tzl.js | 84 + node_modules/moment/src/locale/tzm-latn.js | 50 + node_modules/moment/src/locale/tzm.js | 50 + node_modules/moment/src/locale/uk.js | 144 + node_modules/moment/src/locale/ur.js | 90 + node_modules/moment/src/locale/uz-latn.js | 50 + node_modules/moment/src/locale/uz.js | 50 + node_modules/moment/src/locale/vi.js | 71 + node_modules/moment/src/locale/x-pseudo.js | 59 + node_modules/moment/src/locale/yo.js | 51 + node_modules/moment/src/locale/zh-cn.js | 102 + node_modules/moment/src/locale/zh-hk.js | 96 + node_modules/moment/src/locale/zh-tw.js | 95 + node_modules/moment/src/moment.js | 95 + node_modules/ms/index.js | 152 + node_modules/ms/license.md | 21 + node_modules/ms/package.json | 74 + node_modules/ms/readme.md | 51 + node_modules/nanomatch/CHANGELOG.md | 57 + node_modules/nanomatch/LICENSE | 21 + node_modules/nanomatch/README.md | 1148 + node_modules/nanomatch/index.js | 838 + node_modules/nanomatch/lib/.DS_Store | Bin 0 -> 6148 bytes node_modules/nanomatch/lib/cache.js | 1 + node_modules/nanomatch/lib/compiler2.js | 320 + node_modules/nanomatch/lib/compilers.js | 339 + node_modules/nanomatch/lib/parsers.js | 387 + node_modules/nanomatch/lib/utils.js | 379 + node_modules/nanomatch/package.json | 172 + node_modules/negotiator/HISTORY.md | 98 + node_modules/negotiator/LICENSE | 24 + node_modules/negotiator/README.md | 203 + node_modules/negotiator/index.js | 124 + node_modules/negotiator/lib/charset.js | 169 + node_modules/negotiator/lib/encoding.js | 184 + node_modules/negotiator/lib/language.js | 179 + node_modules/negotiator/lib/mediaType.js | 294 + node_modules/negotiator/package.json | 84 + node_modules/next-tick/.lint | 14 + node_modules/next-tick/.npmignore | 4 + node_modules/next-tick/.travis.yml | 16 + node_modules/next-tick/CHANGES | 24 + node_modules/next-tick/LICENSE | 21 + node_modules/next-tick/README.md | 24 + node_modules/next-tick/index.js | 71 + node_modules/next-tick/package.json | 61 + node_modules/next-tick/test/index.js | 22 + node_modules/nodemon/.github/CONTRIBUTING.md | 35 + .../nodemon/.github/ISSUE_TEMPLATE.md | 18 + node_modules/nodemon/.github/no-response.yml | 13 + node_modules/nodemon/.github/oliver.yml | 12 + node_modules/nodemon/.github/stale.yml | 20 + node_modules/nodemon/.jscsrc | 13 + node_modules/nodemon/.jshintrc | 16 + node_modules/nodemon/.travis.yml | 18 + node_modules/nodemon/CODE_OF_CONDUCT.md | 22 + node_modules/nodemon/README.md | 343 + node_modules/nodemon/bin/nodemon.js | 16 + node_modules/nodemon/commitlint.config.js | 7 + node_modules/nodemon/doc/arch.md | 41 + node_modules/nodemon/doc/cli/authors.txt | 8 + node_modules/nodemon/doc/cli/config.txt | 44 + node_modules/nodemon/doc/cli/help.txt | 29 + node_modules/nodemon/doc/cli/logo.txt | 20 + node_modules/nodemon/doc/cli/options.txt | 36 + node_modules/nodemon/doc/cli/topics.txt | 8 + node_modules/nodemon/doc/cli/usage.txt | 3 + node_modules/nodemon/doc/cli/whoami.txt | 9 + node_modules/nodemon/doc/events.md | 79 + .../nodemon/doc/option-parsing-logic.md | 8 + node_modules/nodemon/doc/requireable.md | 56 + node_modules/nodemon/doc/rules.md | 34 + node_modules/nodemon/doc/sample-nodemon.md | 28 + node_modules/nodemon/faq.md | 234 + node_modules/nodemon/lib/cli/index.js | 49 + node_modules/nodemon/lib/cli/parse.js | 230 + node_modules/nodemon/lib/config/command.js | 43 + node_modules/nodemon/lib/config/defaults.js | 27 + node_modules/nodemon/lib/config/exec.js | 225 + node_modules/nodemon/lib/config/index.js | 93 + node_modules/nodemon/lib/config/load.js | 251 + node_modules/nodemon/lib/help/index.js | 27 + node_modules/nodemon/lib/index.js | 1 + node_modules/nodemon/lib/monitor/index.js | 4 + node_modules/nodemon/lib/monitor/match.js | 265 + node_modules/nodemon/lib/monitor/run.js | 413 + node_modules/nodemon/lib/monitor/signals.js | 34 + node_modules/nodemon/lib/monitor/watch.js | 227 + node_modules/nodemon/lib/nodemon.js | 292 + node_modules/nodemon/lib/rules/add.js | 89 + node_modules/nodemon/lib/rules/index.js | 53 + node_modules/nodemon/lib/rules/parse.js | 43 + node_modules/nodemon/lib/spawn.js | 55 + node_modules/nodemon/lib/utils/bus.js | 44 + node_modules/nodemon/lib/utils/clone.js | 40 + node_modules/nodemon/lib/utils/colour.js | 26 + node_modules/nodemon/lib/utils/index.js | 102 + node_modules/nodemon/lib/utils/log.js | 79 + node_modules/nodemon/lib/utils/merge.js | 47 + node_modules/nodemon/lib/version.js | 100 + node_modules/nodemon/node_modules/.bin/semver | 1 + .../nodemon/node_modules/debug/.coveralls.yml | 1 + .../nodemon/node_modules/debug/.eslintrc | 14 + .../nodemon/node_modules/debug/.npmignore | 9 + .../nodemon/node_modules/debug/.travis.yml | 20 + .../nodemon/node_modules/debug/CHANGELOG.md | 395 + .../nodemon/node_modules/debug/LICENSE | 19 + .../nodemon/node_modules/debug/Makefile | 58 + .../nodemon/node_modules/debug/README.md | 368 + .../nodemon/node_modules/debug/karma.conf.js | 70 + .../nodemon/node_modules/debug/node.js | 1 + .../nodemon/node_modules/debug/package.json | 82 + .../nodemon/node_modules/debug/src/browser.js | 195 + .../nodemon/node_modules/debug/src/debug.js | 225 + .../nodemon/node_modules/debug/src/index.js | 10 + .../nodemon/node_modules/debug/src/node.js | 186 + .../nodemon/node_modules/semver/LICENSE | 15 + .../nodemon/node_modules/semver/README.md | 388 + .../nodemon/node_modules/semver/bin/semver | 143 + .../nodemon/node_modules/semver/package.json | 54 + .../nodemon/node_modules/semver/range.bnf | 16 + .../nodemon/node_modules/semver/semver.js | 1324 + node_modules/nodemon/package.json | 101 + node_modules/nodemon/website/index.html | 188 + node_modules/nodemon/website/mixmax.png | Bin 0 -> 7319 bytes node_modules/nodemon/website/nodemon.png | Bin 0 -> 16333 bytes node_modules/nodemon/website/nodemon.svg | 1 + node_modules/nodemon/website/sparkpost.png | Bin 0 -> 22321 bytes node_modules/nodemon/website/sparkpost.svg | 44 + node_modules/nopt/.npmignore | 0 node_modules/nopt/LICENSE | 23 + node_modules/nopt/README.md | 208 + node_modules/nopt/bin/nopt.js | 44 + node_modules/nopt/examples/my-program.js | 30 + node_modules/nopt/lib/nopt.js | 552 + node_modules/nopt/package.json | 60 + node_modules/normalize-package-data/AUTHORS | 4 + node_modules/normalize-package-data/LICENSE | 30 + node_modules/normalize-package-data/README.md | 106 + .../lib/extract_description.js | 14 + .../normalize-package-data/lib/fixer.js | 417 + .../lib/make_warning.js | 23 + .../normalize-package-data/lib/normalize.js | 39 + .../normalize-package-data/lib/safe_format.js | 9 + .../normalize-package-data/lib/typos.json | 25 + .../lib/warning_messages.json | 30 + .../normalize-package-data/package.json | 77 + node_modules/normalize-path/LICENSE | 21 + node_modules/normalize-path/README.md | 92 + node_modules/normalize-path/index.js | 19 + node_modules/normalize-path/package.json | 118 + node_modules/npm-run-path/index.js | 39 + node_modules/npm-run-path/license | 21 + node_modules/npm-run-path/package.json | 77 + node_modules/npm-run-path/readme.md | 81 + node_modules/number-is-nan/index.js | 4 + node_modules/number-is-nan/license | 21 + node_modules/number-is-nan/package.json | 68 + node_modules/number-is-nan/readme.md | 28 + node_modules/object-copy/LICENSE | 21 + node_modules/object-copy/index.js | 174 + .../node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 77 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 82 + .../is-accessor-descriptor/LICENSE | 21 + .../is-accessor-descriptor/README.md | 123 + .../is-accessor-descriptor/index.js | 69 + .../is-accessor-descriptor/package.json | 92 + .../node_modules/is-data-descriptor/LICENSE | 21 + .../node_modules/is-data-descriptor/README.md | 128 + .../node_modules/is-data-descriptor/index.js | 55 + .../is-data-descriptor/package.json | 91 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 193 + .../node_modules/is-descriptor/index.js | 22 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 342 + .../node_modules/kind-of/index.js | 147 + .../node_modules/kind-of/package.json | 146 + .../node_modules/is-descriptor/package.json | 114 + .../object-copy/node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../object-copy/node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 141 + node_modules/object-copy/package.json | 80 + node_modules/object-visit/LICENSE | 21 + node_modules/object-visit/README.md | 83 + node_modules/object-visit/index.js | 33 + node_modules/object-visit/package.json | 97 + node_modules/object.pick/LICENSE | 21 + node_modules/object.pick/README.md | 76 + node_modules/object.pick/index.js | 35 + node_modules/object.pick/package.json | 92 + node_modules/on-finished/HISTORY.md | 88 + node_modules/on-finished/LICENSE | 23 + node_modules/on-finished/README.md | 154 + node_modules/on-finished/index.js | 196 + node_modules/on-finished/package.json | 76 + node_modules/os-locale/index.js | 101 + node_modules/os-locale/license | 21 + node_modules/os-locale/package.json | 77 + node_modules/os-locale/readme.md | 53 + node_modules/p-finally/index.js | 15 + node_modules/p-finally/license | 21 + node_modules/p-finally/package.json | 74 + node_modules/p-finally/readme.md | 47 + node_modules/p-limit/index.js | 42 + node_modules/p-limit/license | 9 + node_modules/p-limit/package.json | 81 + node_modules/p-limit/readme.md | 69 + node_modules/p-locate/index.js | 31 + node_modules/p-locate/license | 21 + node_modules/p-locate/package.json | 86 + node_modules/p-locate/readme.md | 86 + node_modules/p-try/index.js | 4 + node_modules/p-try/license | 21 + node_modules/p-try/package.json | 75 + node_modules/p-try/readme.md | 38 + node_modules/package-json/index.js | 67 + node_modules/package-json/license | 21 + .../package-json/node_modules/.bin/semver | 1 + .../package-json/node_modules/semver/LICENSE | 15 + .../node_modules/semver/README.md | 388 + .../node_modules/semver/bin/semver | 143 + .../node_modules/semver/package.json | 54 + .../node_modules/semver/range.bnf | 16 + .../node_modules/semver/semver.js | 1324 + node_modules/package-json/package.json | 75 + node_modules/package-json/readme.md | 91 + node_modules/packet-reader/.npmignore | 1 + node_modules/packet-reader/README.md | 87 + node_modules/packet-reader/index.js | 65 + node_modules/packet-reader/package.json | 55 + node_modules/packet-reader/test/index.js | 148 + node_modules/parse-json/index.js | 35 + node_modules/parse-json/license | 21 + node_modules/parse-json/package.json | 78 + node_modules/parse-json/readme.md | 83 + node_modules/parse-json/vendor/parse.js | 752 + node_modules/parse-json/vendor/unicode.js | 71 + node_modules/parseurl/HISTORY.md | 53 + node_modules/parseurl/LICENSE | 24 + node_modules/parseurl/README.md | 124 + node_modules/parseurl/index.js | 154 + node_modules/parseurl/package.json | 84 + node_modules/pascalcase/LICENSE | 21 + node_modules/pascalcase/README.md | 80 + node_modules/pascalcase/index.js | 21 + node_modules/pascalcase/package.json | 77 + node_modules/path-dirname/index.js | 143 + node_modules/path-dirname/license | 22 + node_modules/path-dirname/package.json | 63 + node_modules/path-dirname/readme.md | 53 + node_modules/path-exists/index.js | 17 + node_modules/path-exists/license | 21 + node_modules/path-exists/package.json | 72 + node_modules/path-exists/readme.md | 50 + node_modules/path-is-absolute/index.js | 20 + node_modules/path-is-absolute/license | 21 + node_modules/path-is-absolute/package.json | 75 + node_modules/path-is-absolute/readme.md | 59 + node_modules/path-is-inside/LICENSE.txt | 47 + .../path-is-inside/lib/path-is-inside.js | 28 + node_modules/path-is-inside/package.json | 63 + node_modules/path-key/index.js | 13 + node_modules/path-key/license | 21 + node_modules/path-key/package.json | 71 + node_modules/path-key/readme.md | 51 + node_modules/path-parse/.travis.yml | 9 + node_modules/path-parse/README.md | 44 + node_modules/path-parse/index.js | 93 + node_modules/path-parse/index.min.js | 1 + node_modules/path-parse/package.json | 61 + node_modules/path-parse/test.js | 77 + node_modules/path-parse/test.min.js | 1 + node_modules/path-to-regexp/History.md | 36 + node_modules/path-to-regexp/LICENSE | 21 + node_modules/path-to-regexp/Readme.md | 35 + node_modules/path-to-regexp/index.js | 129 + node_modules/path-to-regexp/package.json | 62 + node_modules/path-type/index.js | 26 + node_modules/path-type/license | 21 + .../path-type/node_modules/pify/index.js | 68 + .../path-type/node_modules/pify/license | 21 + .../path-type/node_modules/pify/package.json | 80 + .../path-type/node_modules/pify/readme.md | 119 + node_modules/path-type/package.json | 80 + node_modules/path-type/readme.md | 42 + node_modules/pause-stream/.npmignore | 3 + node_modules/pause-stream/LICENSE | 231 + node_modules/pause-stream/index.js | 3 + node_modules/pause-stream/package.json | 68 + node_modules/pause-stream/readme.markdown | 29 + node_modules/pause-stream/test/index.js | 17 + node_modules/pause-stream/test/pause-end.js | 33 + node_modules/pg-connection-string/.npmignore | 25 + node_modules/pg-connection-string/.travis.yml | 3 + node_modules/pg-connection-string/LICENSE | 21 + node_modules/pg-connection-string/README.md | 18 + node_modules/pg-connection-string/index.js | 62 + .../pg-connection-string/package.json | 61 + .../pg-connection-string/test/parse.js | 126 + node_modules/pg-pool/.npmignore | 2 + node_modules/pg-pool/.travis.yml | 10 + node_modules/pg-pool/LICENSE | 21 + node_modules/pg-pool/Makefile | 14 + node_modules/pg-pool/README.md | 351 + node_modules/pg-pool/index.js | 294 + node_modules/pg-pool/package.json | 73 + .../pg-pool/test/bring-your-own-promise.js | 36 + .../pg-pool/test/connection-strings.js | 30 + .../pg-pool/test/connection-timeout.js | 107 + node_modules/pg-pool/test/ending.js | 34 + node_modules/pg-pool/test/error-handling.js | 146 + node_modules/pg-pool/test/events.js | 87 + node_modules/pg-pool/test/idle-timeout.js | 79 + node_modules/pg-pool/test/index.js | 229 + node_modules/pg-pool/test/logging.js | 20 + node_modules/pg-pool/test/mocha.opts | 4 + node_modules/pg-pool/test/setup.js | 10 + node_modules/pg-pool/test/sizing.js | 44 + node_modules/pg-pool/test/submittable.js | 19 + node_modules/pg-pool/test/timeout.js | 0 node_modules/pg-pool/test/verify.js | 25 + node_modules/pg-types/.npmignore | 1 + node_modules/pg-types/.travis.yml | 7 + node_modules/pg-types/Makefile | 14 + node_modules/pg-types/README.md | 77 + node_modules/pg-types/index.js | 45 + node_modules/pg-types/lib/arrayParser.js | 11 + node_modules/pg-types/lib/binaryParsers.js | 254 + node_modules/pg-types/lib/textParsers.js | 205 + node_modules/pg-types/package.json | 65 + node_modules/pg-types/test/index.js | 24 + node_modules/pg-types/test/types.js | 553 + node_modules/pg/.eslintrc | 6 + node_modules/pg/.travis.yml | 35 + node_modules/pg/CHANGELOG.md | 274 + node_modules/pg/LICENSE | 21 + node_modules/pg/Makefile | 65 + node_modules/pg/README.md | 88 + node_modules/pg/SPONSORS.md | 14 + node_modules/pg/lib/client.js | 419 + node_modules/pg/lib/connection-parameters.js | 119 + node_modules/pg/lib/connection.js | 646 + node_modules/pg/lib/defaults.js | 70 + node_modules/pg/lib/index.js | 57 + node_modules/pg/lib/native/client.js | 226 + node_modules/pg/lib/native/index.js | 2 + node_modules/pg/lib/native/query.js | 160 + node_modules/pg/lib/query.js | 232 + node_modules/pg/lib/result.js | 117 + node_modules/pg/lib/type-overrides.js | 39 + node_modules/pg/lib/utils.js | 164 + node_modules/pg/package.json | 84 + node_modules/pgpass/.npmignore | 10 + node_modules/pgpass/README.md | 74 + node_modules/pgpass/lib/helper.js | 233 + node_modules/pgpass/lib/index.js | 23 + node_modules/pgpass/package.json | 74 + node_modules/pify/index.js | 84 + node_modules/pify/license | 9 + node_modules/pify/package.json | 83 + node_modules/pify/readme.md | 131 + node_modules/posix-character-classes/LICENSE | 21 + .../posix-character-classes/README.md | 103 + node_modules/posix-character-classes/index.js | 22 + .../posix-character-classes/package.json | 85 + node_modules/postgres-array/index.js | 85 + node_modules/postgres-array/license | 21 + node_modules/postgres-array/package.json | 69 + node_modules/postgres-array/readme.md | 43 + node_modules/postgres-bytea/index.js | 31 + node_modules/postgres-bytea/license | 21 + node_modules/postgres-bytea/package.json | 69 + node_modules/postgres-bytea/readme.md | 34 + node_modules/postgres-date/index.js | 82 + node_modules/postgres-date/license | 21 + node_modules/postgres-date/package.json | 68 + node_modules/postgres-date/readme.md | 34 + node_modules/postgres-interval/index.js | 126 + node_modules/postgres-interval/license | 21 + node_modules/postgres-interval/package.json | 70 + node_modules/postgres-interval/readme.md | 46 + node_modules/prepend-http/index.js | 14 + node_modules/prepend-http/license | 21 + node_modules/prepend-http/package.json | 67 + node_modules/prepend-http/readme.md | 31 + node_modules/process-nextick-args/index.js | 44 + node_modules/process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 50 + node_modules/process-nextick-args/readme.md | 18 + node_modules/proto-list/LICENSE | 15 + node_modules/proto-list/README.md | 3 + node_modules/proto-list/package.json | 51 + node_modules/proto-list/proto-list.js | 88 + node_modules/proto-list/test/basic.js | 61 + node_modules/proxy-addr/HISTORY.md | 140 + node_modules/proxy-addr/LICENSE | 22 + node_modules/proxy-addr/README.md | 156 + node_modules/proxy-addr/index.js | 327 + node_modules/proxy-addr/package.json | 84 + node_modules/ps-tree/.appveyor.yml | 41 + node_modules/ps-tree/.npmignore | 28 + node_modules/ps-tree/.travis.yml | 22 + node_modules/ps-tree/LICENSE | 21 + node_modules/ps-tree/README.md | 83 + node_modules/ps-tree/bin/ps-tree.js | 16 + node_modules/ps-tree/index.js | 118 + node_modules/ps-tree/package.json | 79 + node_modules/ps-tree/test/direct.js | 20 + node_modules/ps-tree/test/exec/child.js | 7 + node_modules/ps-tree/test/exec/parent.js | 18 + node_modules/ps-tree/test/test.js | 70 + node_modules/pseudomap/LICENSE | 15 + node_modules/pseudomap/README.md | 60 + node_modules/pseudomap/map.js | 9 + node_modules/pseudomap/package.json | 54 + node_modules/pseudomap/pseudomap.js | 113 + node_modules/pseudomap/test/basic.js | 86 + node_modules/pstree.remy/.travis.yml | 8 + node_modules/pstree.remy/lib/index.js | 28 + node_modules/pstree.remy/lib/utils.js | 56 + node_modules/pstree.remy/package.json | 52 + node_modules/pstree.remy/tests/fixtures/out1 | 10 + node_modules/pstree.remy/tests/fixtures/out2 | 29 + node_modules/pstree.remy/tests/index.test.js | 46 + node_modules/qs/.editorconfig | 30 + node_modules/qs/.eslintignore | 1 + node_modules/qs/.eslintrc | 19 + node_modules/qs/CHANGELOG.md | 221 + node_modules/qs/LICENSE | 28 + node_modules/qs/README.md | 475 + node_modules/qs/dist/qs.js | 627 + node_modules/qs/lib/formats.js | 18 + node_modules/qs/lib/index.js | 11 + node_modules/qs/lib/parse.js | 174 + node_modules/qs/lib/stringify.js | 210 + node_modules/qs/lib/utils.js | 202 + node_modules/qs/package.json | 83 + node_modules/qs/test/.eslintrc | 15 + node_modules/qs/test/index.js | 7 + node_modules/qs/test/parse.js | 573 + node_modules/qs/test/stringify.js | 596 + node_modules/qs/test/utils.js | 34 + node_modules/range-parser/HISTORY.md | 51 + node_modules/range-parser/LICENSE | 23 + node_modules/range-parser/README.md | 75 + node_modules/range-parser/index.js | 158 + node_modules/range-parser/package.json | 90 + node_modules/raw-body/HISTORY.md | 247 + node_modules/raw-body/LICENSE | 22 + node_modules/raw-body/README.md | 219 + node_modules/raw-body/index.d.ts | 87 + node_modules/raw-body/index.js | 286 + node_modules/raw-body/package.json | 93 + node_modules/rc/.npmignore | 3 + node_modules/rc/LICENSE.APACHE2 | 15 + node_modules/rc/LICENSE.BSD | 26 + node_modules/rc/LICENSE.MIT | 24 + node_modules/rc/README.md | 225 + node_modules/rc/browser.js | 7 + node_modules/rc/cli.js | 4 + node_modules/rc/index.js | 53 + node_modules/rc/lib/utils.js | 104 + node_modules/rc/package.json | 65 + node_modules/rc/test/ini.js | 16 + node_modules/rc/test/nested-env-vars.js | 50 + node_modules/rc/test/test.js | 59 + node_modules/read-pkg-up/index.js | 26 + node_modules/read-pkg-up/license | 21 + node_modules/read-pkg-up/package.json | 94 + node_modules/read-pkg-up/readme.md | 80 + node_modules/read-pkg/index.js | 47 + node_modules/read-pkg/license | 21 + node_modules/read-pkg/package.json | 77 + node_modules/read-pkg/readme.md | 79 + node_modules/readable-stream/.travis.yml | 55 + node_modules/readable-stream/CONTRIBUTING.md | 38 + node_modules/readable-stream/GOVERNANCE.md | 136 + node_modules/readable-stream/LICENSE | 47 + node_modules/readable-stream/README.md | 58 + .../doc/wg-meetings/2015-01-30.md | 60 + .../readable-stream/duplex-browser.js | 1 + node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 124 + .../lib/_stream_passthrough.js | 47 + .../readable-stream/lib/_stream_readable.js | 1015 + .../readable-stream/lib/_stream_transform.js | 214 + .../readable-stream/lib/_stream_writable.js | 677 + .../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/readable-stream/package.json | 83 + node_modules/readable-stream/passthrough.js | 1 + .../readable-stream/readable-browser.js | 7 + node_modules/readable-stream/readable.js | 19 + node_modules/readable-stream/transform.js | 1 + .../readable-stream/writable-browser.js | 1 + node_modules/readable-stream/writable.js | 8 + node_modules/readdirp/.npmignore | 15 + node_modules/readdirp/.travis.yml | 6 + node_modules/readdirp/LICENSE | 20 + node_modules/readdirp/README.md | 233 + node_modules/readdirp/examples/Readme.md | 37 + .../readdirp/examples/callback-api.js | 10 + node_modules/readdirp/examples/grep.js | 71 + node_modules/readdirp/examples/package.json | 9 + .../readdirp/examples/stream-api-pipe.js | 19 + node_modules/readdirp/examples/stream-api.js | 15 + node_modules/readdirp/package.json | 79 + node_modules/readdirp/readdirp.js | 300 + node_modules/readdirp/stream-api.js | 99 + .../test/bed/root_dir1/root_dir1_file1.ext1 | 0 .../test/bed/root_dir1/root_dir1_file2.ext2 | 0 .../test/bed/root_dir1/root_dir1_file3.ext3 | 0 .../root1_dir1_subdir1_file1.ext1 | 0 .../test/bed/root_dir2/root_dir2_file1.ext1 | 0 .../test/bed/root_dir2/root_dir2_file2.ext2 | 0 .../readdirp/test/bed/root_file1.ext1 | 0 .../readdirp/test/bed/root_file2.ext2 | 0 .../readdirp/test/bed/root_file3.ext3 | 0 node_modules/readdirp/test/readdirp-stream.js | 338 + node_modules/readdirp/test/readdirp.js | 289 + node_modules/regenerator-runtime/README.md | 31 + node_modules/regenerator-runtime/package.json | 46 + node_modules/regenerator-runtime/path.js | 11 + .../regenerator-runtime/runtime-module.js | 35 + node_modules/regenerator-runtime/runtime.js | 727 + node_modules/regex-not/LICENSE | 21 + node_modules/regex-not/README.md | 133 + node_modules/regex-not/index.js | 72 + node_modules/regex-not/package.json | 98 + node_modules/registry-auth-token/CHANGELOG.md | 106 + node_modules/registry-auth-token/LICENSE | 21 + node_modules/registry-auth-token/README.md | 65 + node_modules/registry-auth-token/base64.js | 14 + node_modules/registry-auth-token/index.js | 118 + node_modules/registry-auth-token/package.json | 74 + .../registry-auth-token/registry-url.js | 5 + .../test/auth-token.test.js | 419 + .../test/registry-url.test.js | 64 + node_modules/registry-auth-token/yarn.lock | 1512 + node_modules/registry-url/index.js | 6 + node_modules/registry-url/license | 21 + node_modules/registry-url/package.json | 72 + node_modules/registry-url/readme.md | 50 + .../remove-trailing-separator/history.md | 17 + .../remove-trailing-separator/index.js | 17 + .../remove-trailing-separator/license | 3 + .../remove-trailing-separator/package.json | 64 + .../remove-trailing-separator/readme.md | 51 + node_modules/repeat-element/LICENSE | 21 + node_modules/repeat-element/README.md | 71 + node_modules/repeat-element/index.js | 18 + node_modules/repeat-element/package.json | 69 + node_modules/repeat-string/LICENSE | 21 + node_modules/repeat-string/README.md | 136 + node_modules/repeat-string/index.js | 70 + node_modules/repeat-string/package.json | 129 + node_modules/require-directory/.jshintrc | 67 + node_modules/require-directory/.npmignore | 1 + node_modules/require-directory/.travis.yml | 3 + node_modules/require-directory/LICENSE | 22 + .../require-directory/README.markdown | 184 + node_modules/require-directory/index.js | 86 + node_modules/require-directory/package.json | 69 + node_modules/require-main-filename/.npmignore | 3 + .../require-main-filename/.travis.yml | 8 + .../require-main-filename/LICENSE.txt | 14 + node_modules/require-main-filename/README.md | 26 + node_modules/require-main-filename/index.js | 18 + .../require-main-filename/package.json | 58 + node_modules/require-main-filename/test.js | 36 + node_modules/resolve-url/.jshintrc | 44 + node_modules/resolve-url/LICENSE | 21 + node_modules/resolve-url/bower.json | 15 + node_modules/resolve-url/changelog.md | 15 + node_modules/resolve-url/component.json | 15 + node_modules/resolve-url/package.json | 68 + node_modules/resolve-url/readme.md | 83 + node_modules/resolve-url/resolve-url.js | 47 + node_modules/resolve-url/test/resolve-url.js | 70 + node_modules/resolve/.editorconfig | 20 + node_modules/resolve/.eslintignore | 1 + node_modules/resolve/.eslintrc | 30 + node_modules/resolve/.travis.yml | 173 + node_modules/resolve/LICENSE | 18 + node_modules/resolve/appveyor.yml | 44 + node_modules/resolve/example/async.js | 5 + node_modules/resolve/example/sync.js | 3 + node_modules/resolve/index.js | 8 + node_modules/resolve/lib/async.js | 203 + node_modules/resolve/lib/caller.js | 8 + node_modules/resolve/lib/core.js | 34 + node_modules/resolve/lib/core.json | 43 + .../resolve/lib/node-modules-paths.js | 45 + node_modules/resolve/lib/sync.js | 93 + node_modules/resolve/package.json | 70 + node_modules/resolve/readme.markdown | 160 + node_modules/resolve/test/core.js | 36 + node_modules/resolve/test/dotdot.js | 29 + node_modules/resolve/test/dotdot/abc/index.js | 2 + node_modules/resolve/test/dotdot/index.js | 1 + node_modules/resolve/test/faulty_basedir.js | 13 + node_modules/resolve/test/filter.js | 19 + node_modules/resolve/test/filter_sync.js | 16 + node_modules/resolve/test/mock.js | 143 + node_modules/resolve/test/mock_sync.js | 67 + node_modules/resolve/test/module_dir.js | 56 + .../test/module_dir/xmodules/aaa/index.js | 1 + .../test/module_dir/ymodules/aaa/index.js | 1 + .../test/module_dir/zmodules/bbb/main.js | 1 + .../test/module_dir/zmodules/bbb/package.json | 3 + .../resolve/test/node-modules-paths.js | 93 + node_modules/resolve/test/node_path.js | 49 + .../resolve/test/node_path/x/aaa/index.js | 1 + .../resolve/test/node_path/x/ccc/index.js | 1 + .../resolve/test/node_path/y/bbb/index.js | 1 + .../resolve/test/node_path/y/ccc/index.js | 1 + node_modules/resolve/test/nonstring.js | 9 + node_modules/resolve/test/pathfilter.js | 42 + .../resolve/test/pathfilter/deep_ref/main.js | 0 node_modules/resolve/test/precedence.js | 23 + node_modules/resolve/test/precedence/aaa.js | 1 + .../resolve/test/precedence/aaa/index.js | 1 + .../resolve/test/precedence/aaa/main.js | 1 + node_modules/resolve/test/precedence/bbb.js | 1 + .../resolve/test/precedence/bbb/main.js | 1 + node_modules/resolve/test/resolver.js | 349 + .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 3 + .../resolve/test/resolver/baz/quux.js | 1 + node_modules/resolve/test/resolver/cup.coffee | 1 + .../resolve/test/resolver/dot_main/index.js | 1 + .../test/resolver/dot_main/package.json | 3 + .../test/resolver/dot_slash_main/index.js | 1 + .../test/resolver/dot_slash_main/package.json | 3 + node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + node_modules/resolve/test/resolver/mug.coffee | 0 node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 + .../resolve/test/resolver/same_names/foo.js | 1 + .../test/resolver/same_names/foo/index.js | 1 + .../symlinked/_/symlink_target/.gitkeep | 0 .../test/resolver/without_basedir/main.js | 5 + node_modules/resolve/test/resolver_sync.js | 267 + node_modules/resolve/test/subdirs.js | 13 + node_modules/resolve/test/symlinks.js | 54 + node_modules/ret/LICENSE | 19 + node_modules/ret/README.md | 183 + node_modules/ret/lib/index.js | 282 + node_modules/ret/lib/positions.js | 17 + node_modules/ret/lib/sets.js | 82 + node_modules/ret/lib/types.js | 10 + node_modules/ret/lib/util.js | 111 + node_modules/ret/package.json | 67 + node_modules/retry-as-promised/.npmignore | 27 + node_modules/retry-as-promised/LICENSE | 23 + node_modules/retry-as-promised/README.md | 34 + node_modules/retry-as-promised/index.js | 88 + node_modules/retry-as-promised/package.json | 70 + .../retry-as-promised/test/bluebird.test.js | 207 + node_modules/safe-buffer/.travis.yml | 7 + node_modules/safe-buffer/LICENSE | 21 + node_modules/safe-buffer/README.md | 584 + node_modules/safe-buffer/index.js | 62 + node_modules/safe-buffer/package.json | 65 + node_modules/safe-buffer/test.js | 101 + node_modules/safe-regex/.travis.yml | 4 + node_modules/safe-regex/LICENSE | 18 + node_modules/safe-regex/example/safe.js | 3 + node_modules/safe-regex/index.js | 43 + node_modules/safe-regex/package.json | 74 + node_modules/safe-regex/readme.markdown | 65 + node_modules/safe-regex/test/regex.js | 50 + node_modules/semver-diff/index.js | 27 + node_modules/semver-diff/license | 21 + .../semver-diff/node_modules/.bin/semver | 1 + .../semver-diff/node_modules/semver/LICENSE | 15 + .../semver-diff/node_modules/semver/README.md | 388 + .../node_modules/semver/bin/semver | 143 + .../node_modules/semver/package.json | 54 + .../semver-diff/node_modules/semver/range.bnf | 16 + .../semver-diff/node_modules/semver/semver.js | 1324 + node_modules/semver-diff/package.json | 66 + node_modules/semver-diff/readme.md | 52 + node_modules/semver/.npmignore | 1 + node_modules/semver/LICENSE | 27 + node_modules/semver/Makefile | 24 + node_modules/semver/README.md | 303 + node_modules/semver/bin/semver | 133 + node_modules/semver/foot.js.txt | 6 + node_modules/semver/head.js.txt | 2 + node_modules/semver/package.json | 56 + node_modules/semver/semver.browser.js | 1187 + node_modules/semver/semver.browser.js.gz | Bin 0 -> 7938 bytes node_modules/semver/semver.js | 1191 + node_modules/semver/semver.min.js | 1 + node_modules/semver/semver.min.js.gz | Bin 0 -> 3756 bytes node_modules/semver/test/amd.js | 15 + node_modules/semver/test/big-numbers.js | 24 + node_modules/semver/test/clean.js | 29 + node_modules/semver/test/gtr.js | 173 + node_modules/semver/test/index.js | 684 + node_modules/semver/test/ltr.js | 181 + node_modules/semver/test/major-minor-patch.js | 72 + node_modules/semver/test/no-module.js | 19 + node_modules/send/HISTORY.md | 452 + node_modules/send/LICENSE | 23 + node_modules/send/README.md | 309 + node_modules/send/index.js | 1130 + .../send/node_modules/statuses/HISTORY.md | 55 + .../send/node_modules/statuses/LICENSE | 23 + .../send/node_modules/statuses/README.md | 103 + .../send/node_modules/statuses/codes.json | 65 + .../send/node_modules/statuses/index.js | 110 + .../send/node_modules/statuses/package.json | 86 + node_modules/send/package.json | 109 + node_modules/sequelize-cli/.babelrc | 24 + node_modules/sequelize-cli/.editorconfig | 21 + node_modules/sequelize-cli/.eslintrc.json | 49 + .../sequelize-cli/.github/ISSUE_TEMPLATE.md | 29 + node_modules/sequelize-cli/.npmignore | 20 + node_modules/sequelize-cli/.travis.yml | 26 + node_modules/sequelize-cli/CHANGELOG.md | 379 + node_modules/sequelize-cli/CONTRIBUTING.md | 64 + node_modules/sequelize-cli/LICENSE | 21 + node_modules/sequelize-cli/README.md | 79 + node_modules/sequelize-cli/docker-compose.yml | 22 + node_modules/sequelize-cli/docs/FAQ.md | 44 + node_modules/sequelize-cli/docs/README.md | 242 + .../lib/assets/migrations/create-table.js | 35 + .../lib/assets/migrations/skeleton.js | 23 + .../sequelize-cli/lib/assets/models/index.js | 36 + .../sequelize-cli/lib/assets/models/model.js | 18 + .../lib/assets/seeders/skeleton.js | 26 + .../sequelize-cli/lib/commands/database.js | 102 + .../sequelize-cli/lib/commands/init.js | 79 + .../sequelize-cli/lib/commands/migrate.js | 124 + .../lib/commands/migrate_undo.js | 56 + .../lib/commands/migrate_undo_all.js | 53 + .../lib/commands/migration_generate.js | 37 + .../lib/commands/model_generate.js | 59 + .../sequelize-cli/lib/commands/seed.js | 75 + .../lib/commands/seed_generate.js | 37 + .../sequelize-cli/lib/commands/seed_one.js | 65 + .../sequelize-cli/lib/core/migrator.js | 153 + node_modules/sequelize-cli/lib/core/yargs.js | 75 + .../sequelize-cli/lib/helpers/asset-helper.js | 41 + .../lib/helpers/config-helper.js | 210 + .../lib/helpers/generic-helper.js | 53 + .../sequelize-cli/lib/helpers/index.js | 21 + .../sequelize-cli/lib/helpers/init-helper.js | 83 + .../lib/helpers/migration-helper.js | 39 + .../sequelize-cli/lib/helpers/model-helper.js | 68 + .../sequelize-cli/lib/helpers/path-helper.js | 100 + .../lib/helpers/template-helper.js | 34 + .../sequelize-cli/lib/helpers/umzug-helper.js | 62 + .../lib/helpers/version-helper.js | 50 + .../sequelize-cli/lib/helpers/view-helper.js | 73 + node_modules/sequelize-cli/lib/sequelize | 89 + node_modules/sequelize-cli/package.json | 108 + .../sequelize-cli/scripts/mocha-bootload.js | 1 + .../src/assets/migrations/create-table.js | 35 + .../src/assets/migrations/skeleton.js | 23 + .../sequelize-cli/src/assets/models/index.js | 36 + .../sequelize-cli/src/assets/models/model.js | 18 + .../src/assets/seeders/skeleton.js | 26 + .../sequelize-cli/src/commands/database.js | 85 + .../sequelize-cli/src/commands/init.js | 65 + .../sequelize-cli/src/commands/migrate.js | 97 + .../src/commands/migrate_undo.js | 42 + .../src/commands/migrate_undo_all.js | 37 + .../src/commands/migration_generate.js | 37 + .../src/commands/model_generate.js | 72 + .../sequelize-cli/src/commands/seed.js | 55 + .../src/commands/seed_generate.js | 35 + .../sequelize-cli/src/commands/seed_one.js | 46 + .../sequelize-cli/src/core/migrator.js | 139 + node_modules/sequelize-cli/src/core/yargs.js | 68 + .../sequelize-cli/src/helpers/asset-helper.js | 32 + .../src/helpers/config-helper.js | 200 + .../src/helpers/generic-helper.js | 44 + .../sequelize-cli/src/helpers/index.js | 13 + .../sequelize-cli/src/helpers/init-helper.js | 80 + .../src/helpers/migration-helper.js | 30 + .../sequelize-cli/src/helpers/model-helper.js | 62 + .../sequelize-cli/src/helpers/path-helper.js | 103 + .../src/helpers/template-helper.js | 22 + .../sequelize-cli/src/helpers/umzug-helper.js | 50 + .../src/helpers/version-helper.js | 41 + .../sequelize-cli/src/helpers/view-helper.js | 67 + node_modules/sequelize-cli/src/sequelize.js | 67 + .../sequelize-cli/test/db/db-create.test.js | 100 + .../sequelize-cli/test/db/db-drop.test.js | 65 + .../test/db/migrate-json.test.js | 120 + .../sequelize-cli/test/db/migrate.test.js | 407 + .../db/migrate/schema/add_timestamps.test.js | 110 + .../test/db/migrate/status.test.js | 26 + .../test/db/migrate/undo.test.js | 97 + .../test/db/migrate/undo/all.test.js | 69 + .../test/db/migrate/undo/all_to.test.js | 81 + .../sequelize-cli/test/db/seed-json.test.js | 96 + .../sequelize-cli/test/db/seed.test.js | 115 + .../sequelize-cli/test/db/seed/all.test.js | 106 + .../sequelize-cli/test/db/seed/undo.test.js | 59 + .../test/db/seed/undo/all.test.js | 89 + .../test/environment-variable.test.js | 32 + node_modules/sequelize-cli/test/help.test.js | 17 + node_modules/sequelize-cli/test/init.test.js | 129 + .../test/migration/create.test.js | 56 + .../sequelize-cli/test/model/create.test.js | 247 + .../sequelize-cli/test/options.test.js | 60 + .../sequelize-cli/test/seed/create.test.js | 58 + .../migrations/20111117063700-createPerson.js | 21 + .../20111130161100-emptyMigration.js | 10 + .../20111205064000-renamePersonToUser.js | 13 + ...20111205162700-addSignatureColumnToUser.js | 50 + ...0111205167000-addUniqueNameColumnToUser.js | 25 + ...111206061400-removeShopIdColumnFromUser.js | 16 + ...-changeSignatureColumnOfUserToMendatory.js | 17 + ...163300-renameSignatureColumnOfUserToSig.js | 13 + ...0130909174103-createFunctionGetAnAnswer.js | 12 + ...3-renameFunctionGetAnAnswerGetTheAnswer.js | 12 + ...130909175000-deleteFunctionGetTheAnswer.js | 12 + ...0130909175939-createTestTableForTrigger.js | 23 + ...9180846-createTriggerOnTriggerTestTable.js | 22 + ...renameTriggerUpdatedAtToUpdateUpdatedAt.js | 12 + ...0909185621-deleteTriggerUpdateUpdatedAt.js | 23 + .../migrations/20170526153000-createPost.js | 17 + .../invalid/20141208213500-createPerson.js | 13 + .../new/20141208213500-createPerson.js | 17 + .../test/support/assets/project.js | 7 + .../seeders/20111117063700-seedPerson.js | 18 + .../seeders/20111117063900-seedPerson2.js | 19 + .../seeders/new/20141208213500-seedPerson.js | 16 + .../test/support/config/config.js | 56 + .../test/support/config/options.js | 8 + .../sequelize-cli/test/support/helpers.js | 210 + .../sequelize-cli/test/support/index.js | 245 + .../sequelize-cli/test/support/tmp/.gitkeep | 0 node_modules/sequelize-cli/test/url.test.js | 61 + .../sequelize-cli/test/version.test.js | 21 + node_modules/sequelize/.esdoc.json | 52 + node_modules/sequelize/.eslintrc.json | 100 + node_modules/sequelize/CONTACT.md | 21 + node_modules/sequelize/CONTRIBUTING.DOCS.md | 17 + node_modules/sequelize/CONTRIBUTING.md | 130 + node_modules/sequelize/Dockerfile | 8 + node_modules/sequelize/LICENSE | 21 + node_modules/sequelize/README.md | 77 + node_modules/sequelize/index.js | 8 + .../sequelize/lib/associations/base.js | 130 + .../lib/associations/belongs-to-many.js | 733 + .../sequelize/lib/associations/belongs-to.js | 237 + .../sequelize/lib/associations/has-many.js | 465 + .../sequelize/lib/associations/has-one.js | 257 + .../sequelize/lib/associations/helpers.js | 74 + .../sequelize/lib/associations/index.js | 11 + .../sequelize/lib/associations/mixin.js | 108 + node_modules/sequelize/lib/data-types.js | 942 + node_modules/sequelize/lib/deferrable.js | 123 + .../dialects/abstract/connection-manager.js | 353 + .../sequelize/lib/dialects/abstract/index.js | 71 + .../lib/dialects/abstract/query-generator.js | 2492 + .../sequelize/lib/dialects/abstract/query.js | 708 + .../lib/dialects/mssql/connection-manager.js | 169 + .../lib/dialects/mssql/data-types.js | 292 + .../sequelize/lib/dialects/mssql/index.js | 65 + .../lib/dialects/mssql/query-generator.js | 886 + .../lib/dialects/mssql/query-interface.js | 68 + .../sequelize/lib/dialects/mssql/query.js | 389 + .../lib/dialects/mssql/resource-lock.js | 25 + .../lib/dialects/mysql/connection-manager.js | 183 + .../lib/dialects/mysql/data-types.js | 212 + .../sequelize/lib/dialects/mysql/index.js | 58 + .../lib/dialects/mysql/query-generator.js | 560 + .../lib/dialects/mysql/query-interface.js | 78 + .../sequelize/lib/dialects/mysql/query.js | 282 + .../sequelize/lib/dialects/parserStore.js | 23 + .../dialects/postgres/connection-manager.js | 250 + .../lib/dialects/postgres/data-types.js | 638 + .../sequelize/lib/dialects/postgres/hstore.js | 15 + .../sequelize/lib/dialects/postgres/index.js | 66 + .../lib/dialects/postgres/query-generator.js | 964 + .../sequelize/lib/dialects/postgres/query.js | 379 + .../sequelize/lib/dialects/postgres/range.js | 76 + .../lib/dialects/sqlite/connection-manager.js | 100 + .../lib/dialects/sqlite/data-types.js | 274 + .../sequelize/lib/dialects/sqlite/index.js | 56 + .../lib/dialects/sqlite/query-generator.js | 516 + .../lib/dialects/sqlite/query-interface.js | 194 + .../sequelize/lib/dialects/sqlite/query.js | 462 + node_modules/sequelize/lib/errors.js | 3 + node_modules/sequelize/lib/errors/index.js | 526 + node_modules/sequelize/lib/hooks.js | 547 + .../sequelize/lib/instance-validator.js | 410 + node_modules/sequelize/lib/model-manager.js | 98 + node_modules/sequelize/lib/model.js | 4179 + node_modules/sequelize/lib/operators.js | 151 + node_modules/sequelize/lib/promise.js | 7 + node_modules/sequelize/lib/query-interface.js | 1459 + node_modules/sequelize/lib/query-types.js | 38 + node_modules/sequelize/lib/sequelize.js | 1267 + node_modules/sequelize/lib/sql-string.js | 124 + node_modules/sequelize/lib/table-hints.js | 38 + node_modules/sequelize/lib/transaction.js | 298 + node_modules/sequelize/lib/utils.js | 683 + node_modules/sequelize/lib/utils/inherits.js | 17 + node_modules/sequelize/lib/utils/logger.js | 47 + .../lib/utils/parameter-validator.js | 59 + .../sequelize/lib/utils/validator-extras.js | 111 + .../sequelize/node_modules/.bin/semver | 1 + .../node_modules/debug/.coveralls.yml | 1 + .../sequelize/node_modules/debug/.eslintrc | 14 + .../sequelize/node_modules/debug/.npmignore | 9 + .../sequelize/node_modules/debug/.travis.yml | 20 + .../sequelize/node_modules/debug/CHANGELOG.md | 395 + .../sequelize/node_modules/debug/LICENSE | 19 + .../sequelize/node_modules/debug/Makefile | 58 + .../sequelize/node_modules/debug/README.md | 368 + .../node_modules/debug/karma.conf.js | 70 + .../sequelize/node_modules/debug/node.js | 1 + .../sequelize/node_modules/debug/package.json | 85 + .../node_modules/debug/src/browser.js | 195 + .../sequelize/node_modules/debug/src/debug.js | 225 + .../sequelize/node_modules/debug/src/index.js | 10 + .../sequelize/node_modules/debug/src/node.js | 186 + .../sequelize/node_modules/semver/LICENSE | 15 + .../sequelize/node_modules/semver/README.md | 388 + .../sequelize/node_modules/semver/bin/semver | 143 + .../node_modules/semver/package.json | 57 + .../sequelize/node_modules/semver/range.bnf | 16 + .../sequelize/node_modules/semver/semver.js | 1324 + node_modules/sequelize/package.json | 192 + node_modules/sequelize/sscce_template.js | 10 + node_modules/serve-static/HISTORY.md | 422 + node_modules/serve-static/LICENSE | 25 + node_modules/serve-static/README.md | 261 + node_modules/serve-static/index.js | 209 + node_modules/serve-static/package.json | 78 + node_modules/set-blocking/CHANGELOG.md | 26 + node_modules/set-blocking/LICENSE.txt | 14 + node_modules/set-blocking/README.md | 31 + node_modules/set-blocking/index.js | 7 + node_modules/set-blocking/package.json | 70 + node_modules/set-getter/LICENSE | 21 + node_modules/set-getter/README.md | 109 + node_modules/set-getter/index.js | 83 + node_modules/set-getter/package.json | 78 + node_modules/set-immediate-shim/index.js | 7 + node_modules/set-immediate-shim/package.json | 66 + node_modules/set-immediate-shim/readme.md | 31 + node_modules/set-value/LICENSE | 21 + node_modules/set-value/README.md | 150 + node_modules/set-value/index.js | 51 + .../node_modules/extend-shallow/LICENSE | 21 + .../node_modules/extend-shallow/README.md | 61 + .../node_modules/extend-shallow/index.js | 33 + .../node_modules/extend-shallow/package.json | 87 + node_modules/set-value/package.json | 120 + node_modules/setprototypeof/LICENSE | 13 + node_modules/setprototypeof/README.md | 21 + node_modules/setprototypeof/index.js | 15 + node_modules/setprototypeof/package.json | 54 + node_modules/shebang-command/index.js | 19 + node_modules/shebang-command/license | 21 + node_modules/shebang-command/package.json | 71 + node_modules/shebang-command/readme.md | 39 + node_modules/shebang-regex/index.js | 2 + node_modules/shebang-regex/license | 21 + node_modules/shebang-regex/package.json | 64 + node_modules/shebang-regex/readme.md | 29 + node_modules/shimmer/.travis.yml | 7 + node_modules/shimmer/README.md | 80 + node_modules/shimmer/index.js | 121 + node_modules/shimmer/package.json | 63 + node_modules/shimmer/test/init.tap.js | 48 + node_modules/shimmer/test/massUnwrap.tap.js | 121 + node_modules/shimmer/test/massWrap.tap.js | 174 + node_modules/shimmer/test/unwrap.tap.js | 101 + node_modules/shimmer/test/wrap.tap.js | 148 + node_modules/sigmund/LICENSE | 15 + node_modules/sigmund/README.md | 53 + node_modules/sigmund/bench.js | 283 + node_modules/sigmund/package.json | 63 + node_modules/sigmund/sigmund.js | 39 + node_modules/sigmund/test/basic.js | 24 + node_modules/signal-exit/CHANGELOG.md | 27 + node_modules/signal-exit/LICENSE.txt | 16 + node_modules/signal-exit/README.md | 40 + node_modules/signal-exit/index.js | 157 + node_modules/signal-exit/package.json | 67 + node_modules/signal-exit/signals.js | 53 + node_modules/snapdragon-node/LICENSE | 21 + node_modules/snapdragon-node/README.md | 453 + node_modules/snapdragon-node/index.js | 492 + .../node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 95 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 93 + node_modules/snapdragon-node/package.json | 109 + node_modules/snapdragon-util/LICENSE | 21 + node_modules/snapdragon-util/README.md | 807 + node_modules/snapdragon-util/index.js | 1019 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + node_modules/snapdragon-util/package.json | 98 + node_modules/snapdragon/LICENSE | 21 + node_modules/snapdragon/README.md | 321 + node_modules/snapdragon/index.js | 174 + node_modules/snapdragon/lib/compiler.js | 177 + node_modules/snapdragon/lib/parser.js | 533 + node_modules/snapdragon/lib/position.js | 14 + node_modules/snapdragon/lib/source-maps.js | 145 + node_modules/snapdragon/lib/utils.js | 48 + .../node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 77 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 82 + .../node_modules/extend-shallow/LICENSE | 21 + .../node_modules/extend-shallow/README.md | 61 + .../node_modules/extend-shallow/index.js | 33 + .../node_modules/extend-shallow/package.json | 87 + .../is-accessor-descriptor/LICENSE | 21 + .../is-accessor-descriptor/README.md | 123 + .../is-accessor-descriptor/index.js | 69 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-accessor-descriptor/package.json | 94 + .../node_modules/is-data-descriptor/LICENSE | 21 + .../node_modules/is-data-descriptor/README.md | 128 + .../node_modules/is-data-descriptor/index.js | 55 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-data-descriptor/package.json | 93 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 193 + .../node_modules/is-descriptor/index.js | 22 + .../node_modules/is-descriptor/package.json | 114 + .../snapdragon/node_modules/kind-of/LICENSE | 21 + .../snapdragon/node_modules/kind-of/README.md | 342 + .../snapdragon/node_modules/kind-of/index.js | 147 + .../node_modules/kind-of/package.json | 146 + node_modules/snapdragon/package.json | 124 + node_modules/source-map-resolve/.jshintrc | 46 + node_modules/source-map-resolve/.travis.yml | 3 + node_modules/source-map-resolve/LICENSE | 21 + node_modules/source-map-resolve/bower.json | 30 + node_modules/source-map-resolve/changelog.md | 94 + .../source-map-resolve/component.json | 29 + .../generate-source-map-resolve.js | 28 + .../lib/decode-uri-component.js | 11 + .../source-map-resolve/lib/resolve-url.js | 12 + .../lib/source-map-resolve-node.js | 302 + node_modules/source-map-resolve/package.json | 90 + node_modules/source-map-resolve/readme.md | 236 + .../source-map-resolve/source-map-resolve.js | 309 + .../source-map-resolve.js.template | 22 + .../source-map-resolve/x-package.json5 | 83 + node_modules/source-map-url/.jshintrc | 43 + node_modules/source-map-url/LICENSE | 21 + node_modules/source-map-url/bower.json | 20 + node_modules/source-map-url/changelog.md | 52 + node_modules/source-map-url/component.json | 18 + node_modules/source-map-url/package.json | 73 + node_modules/source-map-url/readme.md | 97 + node_modules/source-map-url/source-map-url.js | 57 + .../source-map-url/test/source-map-url.js | 402 + node_modules/source-map-url/x-package.json5 | 55 + node_modules/source-map/CHANGELOG.md | 301 + node_modules/source-map/LICENSE | 28 + node_modules/source-map/README.md | 729 + .../source-map/dist/source-map.debug.js | 3091 + node_modules/source-map/dist/source-map.js | 3090 + .../source-map/dist/source-map.min.js | 2 + .../source-map/dist/source-map.min.js.map | 1 + node_modules/source-map/lib/array-set.js | 121 + node_modules/source-map/lib/base64-vlq.js | 140 + node_modules/source-map/lib/base64.js | 67 + node_modules/source-map/lib/binary-search.js | 111 + node_modules/source-map/lib/mapping-list.js | 79 + node_modules/source-map/lib/quick-sort.js | 114 + .../source-map/lib/source-map-consumer.js | 1082 + .../source-map/lib/source-map-generator.js | 416 + node_modules/source-map/lib/source-node.js | 413 + node_modules/source-map/lib/util.js | 417 + node_modules/source-map/package.json | 211 + node_modules/source-map/source-map.js | 8 + node_modules/spdx-correct/LICENSE | 202 + node_modules/spdx-correct/README.md | 10 + node_modules/spdx-correct/index.js | 326 + node_modules/spdx-correct/package.json | 80 + node_modules/spdx-exceptions/README.md | 36 + node_modules/spdx-exceptions/index.json | 29 + node_modules/spdx-exceptions/package.json | 49 + node_modules/spdx-expression-parse/AUTHORS | 4 + node_modules/spdx-expression-parse/LICENSE | 22 + node_modules/spdx-expression-parse/README.md | 91 + node_modules/spdx-expression-parse/index.js | 8 + .../spdx-expression-parse/package.json | 97 + node_modules/spdx-expression-parse/parse.js | 138 + node_modules/spdx-expression-parse/scan.js | 131 + node_modules/spdx-license-ids/README.md | 52 + node_modules/spdx-license-ids/deprecated.json | 23 + node_modules/spdx-license-ids/index.json | 344 + node_modules/spdx-license-ids/package.json | 78 + node_modules/split-string/LICENSE | 21 + node_modules/split-string/README.md | 321 + node_modules/split-string/index.js | 171 + node_modules/split-string/package.json | 103 + node_modules/split/.npmignore | 3 + node_modules/split/.travis.yml | 3 + node_modules/split/LICENCE | 22 + node_modules/split/examples/pretty.js | 26 + node_modules/split/index.js | 63 + node_modules/split/package.json | 65 + node_modules/split/readme.markdown | 72 + node_modules/split/test/options.asynct.js | 46 + .../split/test/partitioned_unicode.js | 34 + node_modules/split/test/split.asynct.js | 137 + node_modules/split/test/try_catch.asynct.js | 51 + node_modules/static-extend/LICENSE | 21 + node_modules/static-extend/index.js | 90 + .../node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 77 + .../node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 82 + .../is-accessor-descriptor/LICENSE | 21 + .../is-accessor-descriptor/README.md | 123 + .../is-accessor-descriptor/index.js | 69 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-accessor-descriptor/package.json | 94 + .../node_modules/is-data-descriptor/LICENSE | 21 + .../node_modules/is-data-descriptor/README.md | 128 + .../node_modules/is-data-descriptor/index.js | 55 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-data-descriptor/package.json | 93 + .../node_modules/is-descriptor/LICENSE | 21 + .../node_modules/is-descriptor/README.md | 193 + .../node_modules/is-descriptor/index.js | 22 + .../node_modules/is-descriptor/package.json | 114 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 342 + .../node_modules/kind-of/index.js | 147 + .../node_modules/kind-of/package.json | 146 + node_modules/static-extend/package.json | 96 + node_modules/statuses/HISTORY.md | 60 + node_modules/statuses/LICENSE | 23 + node_modules/statuses/README.md | 127 + node_modules/statuses/codes.json | 65 + node_modules/statuses/index.js | 113 + node_modules/statuses/package.json | 90 + node_modules/stream-combiner/.npmignore | 3 + node_modules/stream-combiner/.travis.yml | 4 + node_modules/stream-combiner/LICENSE | 22 + node_modules/stream-combiner/README.md | 29 + node_modules/stream-combiner/index.js | 39 + node_modules/stream-combiner/package.json | 54 + node_modules/stream-combiner/test/index.js | 52 + node_modules/string-width/index.js | 36 + node_modules/string-width/license | 9 + node_modules/string-width/package.json | 89 + node_modules/string-width/readme.md | 42 + node_modules/string_decoder/.npmignore | 2 + node_modules/string_decoder/LICENSE | 48 + node_modules/string_decoder/README.md | 28 + .../string_decoder/lib/string_decoder.js | 272 + node_modules/string_decoder/package.json | 56 + node_modules/strip-ansi/index.js | 4 + node_modules/strip-ansi/license | 9 + node_modules/strip-ansi/package.json | 84 + node_modules/strip-ansi/readme.md | 39 + node_modules/strip-bom/index.js | 14 + node_modules/strip-bom/license | 21 + node_modules/strip-bom/package.json | 72 + node_modules/strip-bom/readme.md | 36 + node_modules/strip-eof/index.js | 15 + node_modules/strip-eof/license | 21 + node_modules/strip-eof/package.json | 71 + node_modules/strip-eof/readme.md | 28 + node_modules/strip-json-comments/index.js | 70 + node_modules/strip-json-comments/license | 21 + node_modules/strip-json-comments/package.json | 74 + node_modules/strip-json-comments/readme.md | 64 + node_modules/supports-color/browser.js | 5 + node_modules/supports-color/index.js | 129 + node_modules/supports-color/license | 9 + node_modules/supports-color/package.json | 86 + node_modules/supports-color/readme.md | 66 + node_modules/term-size/index.js | 70 + node_modules/term-size/license | 21 + node_modules/term-size/package.json | 75 + node_modules/term-size/readme.md | 41 + node_modules/term-size/vendor/macos/term-size | Bin 0 -> 8760 bytes .../term-size/vendor/windows/term-size.exe | Bin 0 -> 17408 bytes .../terraformer-wkt-parser/.npmignore | 1 + .../terraformer-wkt-parser/.travis.yml | 8 + node_modules/terraformer-wkt-parser/AUTHORS | 2 + .../terraformer-wkt-parser/CHANGELOG.md | 38 + .../terraformer-wkt-parser/Gruntfile.js | 135 + node_modules/terraformer-wkt-parser/LICENSE | 7 + node_modules/terraformer-wkt-parser/README.md | 68 + .../terraformer-wkt-parser/bower.json | 8 + .../coverage/__root__/index.html | 93 + .../__root__/terraformer-wkt-parser.js.html | 2348 + .../terraformer-wkt-parser/coverage/base.css | 213 + .../coverage/coverage.json | 1 + .../coverage/dist/index.html | 93 + .../dist/terraformer-wkt-parser.js.html | 2348 + .../coverage/index.html | 93 + .../coverage/prettify.css | 1 + .../coverage/prettify.js | 1 + .../coverage/sort-arrow-sprite.png | Bin 0 -> 209 bytes .../terraformer-wkt-parser/coverage/sorter.js | 158 + .../dist/terraformer-wkt-parser.js | 761 + .../dist/terraformer-wkt-parser.min.js | 4 + .../examples/feature_collection.json | 48 + .../examples/linestring.json | 7 + .../examples/linestring.wkt | 1 + .../examples/multi_linestring.json | 13 + .../examples/multi_linestring.wkt | 2 + .../examples/multi_polygon.json | 30 + .../examples/multi_polygon.wkt | 2 + .../examples/multi_polygon_with_hole.wkt | 3 + .../examples/multipoint.json | 7 + .../examples/multipoint.wkt | 1 + .../examples/multipoint_alternate.wkt | 1 + .../examples/point.json | 4 + .../terraformer-wkt-parser/examples/point.wkt | 1 + .../examples/polygon.json | 12 + .../examples/polygon.wkt | 1 + .../examples/polygon_with_dots.wkt | 1 + .../examples/polygon_with_hole.json | 19 + .../examples/polygon_with_hole.wkt | 2 + .../terraformer-wkt-parser/package.json | 88 + .../terraformer-wkt-parser/spec/wktSpec.js | 718 + .../src/module-source.js | 320 + .../terraformer-wkt-parser/src/wkt.yy | 178 + .../terraformer-wkt-parser.d.ts | 8 + .../terraformer-wkt-parser.js | 761 + .../terraformer-wkt-parser.min.js | 4 + node_modules/terraformer-wkt-parser/test.js | 10 + node_modules/terraformer-wkt-parser/test.ts | 12 + .../test/convert-test.js | 121 + .../test/terraformer-parse-test.js | 93 + .../test/wkt-parse-test.js | 290 + .../terraformer-wkt-parser/tsconfig.json | 11 + .../terraformer-wkt-parser/typings.json | 8 + .../typings/globals/geojson/index.d.ts | 129 + .../typings/globals/geojson/typings.json | 8 + .../terraformer-wkt-parser/typings/index.d.ts | 1 + .../terraformer/.coverage/__root__/index.html | 93 + .../.coverage/__root__/terraformer.js.html | 4319 + node_modules/terraformer/.coverage/base.css | 213 + .../terraformer/.coverage/coverage.json | 1 + node_modules/terraformer/.coverage/index.html | 93 + .../terraformer/.coverage/prettify.css | 1 + .../terraformer/.coverage/prettify.js | 1 + .../.coverage/sort-arrow-sprite.png | Bin 0 -> 209 bytes node_modules/terraformer/.coverage/sorter.js | 158 + node_modules/terraformer/.npmignore | 14 + node_modules/terraformer/.travis.yml | 9 + node_modules/terraformer/CHANGELOG.md | 78 + node_modules/terraformer/Gemfile | 7 + node_modules/terraformer/Gemfile.lock | 101 + node_modules/terraformer/LICENSE | 7 + node_modules/terraformer/README.md | 125 + node_modules/terraformer/bower.json | 13 + node_modules/terraformer/docs-build/CNAME | 1 + .../docs-build/arcgis-parser/index.html | 197 + .../assets/css/terraformer-02847305.css | 1 + .../assets/fonts/esri-logo-3a94862e.svg | 283 + .../assets/fonts/esri-logo-71163913.ttf | Bin 0 -> 7860 bytes .../assets/fonts/esri-logo-80bed756.woff | Bin 0 -> 14468 bytes .../assets/fonts/esri-logo-fc93d7bf.eot | Bin 0 -> 8026 bytes .../assets/fonts/esri-logo.dev-aed9f839.svg | 283 + .../images/terraformer-arcparser-a0228324.png | Bin 0 -> 39315 bytes .../images/terraformer-core-93b83c36.png | Bin 0 -> 44547 bytes .../images/terraformer-geostore-9e09ce2c.png | Bin 0 -> 50945 bytes .../images/terraformer-parser-a57c9c2d.png | Bin 0 -> 24986 bytes .../images/terraformer-wktparser-b18bc9d9.png | Bin 0 -> 38482 bytes .../assets/javascripts/all-da39a3ee.js | 0 .../assets/javascripts/classie-b6db1f70.js | 1 + .../assets/javascripts/drawer-3a1490eb.js | 1 + .../javascripts/modernizr.custom-cadc78a2.js | 1 + .../terraformer/docs-build/core/index.html | 795 + .../terraformer/docs-build/favicon.ico | Bin 0 -> 6518 bytes .../geostore/alternate-indexes/index.html | 210 + .../geostore/core-concepts/index.html | 97 + .../geostore/data-stores/index.html | 251 + .../docs-build/geostore/index.html | 409 + .../geostore/spatial-indexes/index.html | 250 + .../docs-build/getting-started/index.html | 177 + .../docs-build/glossary/index.html | 449 + .../terraformer/docs-build/index.html | 172 + .../terraformer/docs-build/install/index.html | 155 + .../docs-build/partials/cover/index.html | 10 + .../docs-build/partials/doctoc/index.html | 23 + .../docs-build/partials/footer/index.html | 5 + .../index_partials/arcgis_parser/index.html | 25 + .../index_partials/geostore/index.html | 20 + .../terraformer_core/index.html | 18 + .../index_partials/wkt_parser/index.html | 22 + .../docs-build/partials/nav/index.html | 16 + .../docs-build/partials/subnav/index.html | 30 + .../docs-build/wkt-parser/index.html | 147 + node_modules/terraformer/gruntfile.js | 161 + node_modules/terraformer/package.json | 89 + node_modules/terraformer/release.sh | 37 + .../terraformer/spec/geojsonHelpers.js | 392 + .../terraformer/spec/spatialReferenceSpec.js | 537 + .../terraformer/spec/terraformerSpec.js | 1145 + .../terraformer/terraformer-1.0.8.min.js | 4 + node_modules/terraformer/terraformer.d.ts | 324 + node_modules/terraformer/terraformer.js | 1418 + node_modules/terraformer/test.js | 95 + node_modules/terraformer/test.ts | 121 + node_modules/terraformer/tsconfig.json | 12 + node_modules/terraformer/tslint.json | 17 + node_modules/through/.travis.yml | 5 + node_modules/through/LICENSE.APACHE2 | 15 + node_modules/through/LICENSE.MIT | 24 + node_modules/through/index.js | 108 + node_modules/through/package.json | 71 + node_modules/through/readme.markdown | 64 + node_modules/through/test/async.js | 28 + node_modules/through/test/auto-destroy.js | 30 + node_modules/through/test/buffering.js | 71 + node_modules/through/test/end.js | 45 + node_modules/through/test/index.js | 133 + node_modules/timed-out/index.js | 55 + node_modules/timed-out/license | 21 + node_modules/timed-out/package.json | 68 + node_modules/timed-out/readme.md | 42 + node_modules/timers-ext/.lint | 17 + node_modules/timers-ext/.npmignore | 4 + node_modules/timers-ext/.travis.yml | 12 + node_modules/timers-ext/CHANGES | 21 + node_modules/timers-ext/LICENSE | 21 + node_modules/timers-ext/README.md | 55 + node_modules/timers-ext/delay.js | 19 + node_modules/timers-ext/max-timeout.js | 3 + node_modules/timers-ext/once.js | 41 + node_modules/timers-ext/package.json | 67 + node_modules/timers-ext/test/delay.js | 23 + node_modules/timers-ext/test/max-timeout.js | 11 + node_modules/timers-ext/test/once.js | 38 + node_modules/timers-ext/test/throttle.js | 33 + node_modules/timers-ext/test/valid-timeout.js | 8 + node_modules/timers-ext/throttle.js | 33 + node_modules/timers-ext/valid-timeout.js | 10 + node_modules/to-object-path/LICENSE | 21 + node_modules/to-object-path/README.md | 71 + node_modules/to-object-path/index.js | 33 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + node_modules/to-object-path/package.json | 83 + node_modules/to-regex-range/LICENSE | 21 + node_modules/to-regex-range/README.md | 281 + node_modules/to-regex-range/index.js | 294 + node_modules/to-regex-range/package.json | 117 + node_modules/to-regex/LICENSE | 21 + node_modules/to-regex/README.md | 205 + node_modules/to-regex/index.js | 155 + node_modules/to-regex/package.json | 97 + node_modules/toposort-class/.eslintrc | 35 + node_modules/toposort-class/.gitattributes | 1 + node_modules/toposort-class/.npmignore | 44 + node_modules/toposort-class/LICENSE | 21 + node_modules/toposort-class/README.md | 93 + .../benchmark/0.3.1/toposort.js | 128 + .../toposort-class/benchmark/README.md | 11 + .../toposort-class/benchmark/general.js | 56 + .../toposort-class/benchmark/results.csv | 4 + node_modules/toposort-class/build/toposort.js | 281 + .../toposort-class/build/toposort.min.js | 1 + node_modules/toposort-class/index.js | 1 + node_modules/toposort-class/package.json | 73 + node_modules/touch/LICENSE | 15 + node_modules/touch/README.md | 52 + node_modules/touch/bin/nodetouch.js | 112 + node_modules/touch/index.js | 224 + node_modules/touch/package.json | 64 + node_modules/type-is/HISTORY.md | 236 + node_modules/type-is/LICENSE | 23 + node_modules/type-is/README.md | 146 + node_modules/type-is/index.js | 262 + node_modules/type-is/package.json | 88 + node_modules/umzug/.babelrc | 15 + node_modules/umzug/.eslintrc.json | 28 + node_modules/umzug/.idea/misc.xml | 9 + node_modules/umzug/.idea/modules.xml | 8 + node_modules/umzug/.idea/vcs.xml | 6 + node_modules/umzug/.idea/workspace.xml | 1242 + node_modules/umzug/.travis.yml | 22 + node_modules/umzug/CHANGELOG.md | 107 + node_modules/umzug/LICENSE | 21 + node_modules/umzug/README.md | 379 + node_modules/umzug/gulpfile.js | 50 + node_modules/umzug/lib/helper.js | 29 + node_modules/umzug/lib/index.js | 676 + node_modules/umzug/lib/migration.js | 192 + .../umzug/lib/storages/JSONStorage.js | 150 + .../umzug/lib/storages/MongoDBStorage.js | 118 + .../umzug/lib/storages/SequelizeStorage.js | 214 + node_modules/umzug/lib/storages/Storage.js | 70 + node_modules/umzug/lib/storages/json.js | 11 + node_modules/umzug/lib/storages/none.js | 11 + node_modules/umzug/lib/storages/sequelize.js | 11 + node_modules/umzug/package.json | 97 + node_modules/umzug/src/helper.js | 27 + node_modules/umzug/src/index.js | 612 + node_modules/umzug/src/migration.js | 114 + .../umzug/src/storages/JSONStorage.js | 78 + .../umzug/src/storages/MongoDBStorage.js | 63 + .../umzug/src/storages/SequelizeStorage.js | 167 + node_modules/umzug/src/storages/Storage.js | 35 + node_modules/umzug/src/storages/json.js | 9 + node_modules/umzug/src/storages/none.js | 9 + node_modules/umzug/src/storages/sequelize.js | 9 + node_modules/umzug/umzug.iml | 9 + node_modules/umzug/yarn.lock | 3544 + node_modules/undefsafe/.jscsrc | 13 + node_modules/undefsafe/.jshintrc | 16 + node_modules/undefsafe/.npmignore | 2 + node_modules/undefsafe/.travis.yml | 18 + node_modules/undefsafe/LICENSE | 22 + node_modules/undefsafe/README.md | 63 + node_modules/undefsafe/example.js | 14 + node_modules/undefsafe/lib/undefsafe.js | 113 + node_modules/undefsafe/package.json | 63 + node_modules/union-value/LICENSE | 21 + node_modules/union-value/README.md | 73 + node_modules/union-value/index.js | 30 + .../node_modules/extend-shallow/LICENSE | 21 + .../node_modules/extend-shallow/README.md | 61 + .../node_modules/extend-shallow/index.js | 33 + .../node_modules/extend-shallow/package.json | 87 + .../node_modules/set-value/LICENSE | 21 + .../node_modules/set-value/README.md | 81 + .../node_modules/set-value/index.js | 63 + .../node_modules/set-value/package.json | 121 + node_modules/union-value/package.json | 105 + node_modules/unique-string/index.js | 4 + node_modules/unique-string/license | 21 + node_modules/unique-string/package.json | 76 + node_modules/unique-string/readme.md | 32 + node_modules/universalify/LICENSE | 20 + node_modules/universalify/README.md | 73 + node_modules/universalify/index.js | 25 + node_modules/universalify/package.json | 60 + node_modules/unpipe/HISTORY.md | 4 + node_modules/unpipe/LICENSE | 22 + node_modules/unpipe/README.md | 43 + node_modules/unpipe/index.js | 69 + node_modules/unpipe/package.json | 66 + node_modules/unset-value/LICENSE | 21 + node_modules/unset-value/README.md | 131 + node_modules/unset-value/index.js | 32 + .../node_modules/has-value/LICENSE | 21 + .../node_modules/has-value/README.md | 130 + .../node_modules/has-value/index.js | 19 + .../has-value/node_modules/isobject/LICENSE | 21 + .../has-value/node_modules/isobject/README.md | 112 + .../has-value/node_modules/isobject/index.js | 14 + .../node_modules/isobject/package.json | 98 + .../node_modules/has-value/package.json | 114 + .../node_modules/has-values/LICENSE | 21 + .../node_modules/has-values/README.md | 114 + .../node_modules/has-values/index.js | 36 + .../node_modules/has-values/package.json | 106 + node_modules/unset-value/package.json | 112 + node_modules/unzip-response/index.js | 36 + node_modules/unzip-response/license | 21 + node_modules/unzip-response/package.json | 81 + node_modules/unzip-response/readme.md | 29 + node_modules/upath/LICENSE | 22 + node_modules/upath/build/code/upath.js | 169 + node_modules/upath/package.json | 84 + node_modules/upath/readme.md | 331 + node_modules/upath/upath.d.ts | 239 + node_modules/update-notifier/check.js | 22 + node_modules/update-notifier/index.js | 151 + node_modules/update-notifier/package.json | 85 + node_modules/update-notifier/readme.md | 184 + node_modules/urix/.jshintrc | 42 + node_modules/urix/LICENSE | 21 + node_modules/urix/index.js | 17 + node_modules/urix/package.json | 59 + node_modules/urix/readme.md | 46 + node_modules/urix/test/index.js | 43 + node_modules/url-parse-lax/index.js | 14 + node_modules/url-parse-lax/license | 21 + node_modules/url-parse-lax/package.json | 73 + node_modules/url-parse-lax/readme.md | 100 + node_modules/use/LICENSE | 21 + node_modules/use/README.md | 76 + node_modules/use/index.js | 121 + .../use/node_modules/define-property/LICENSE | 21 + .../node_modules/define-property/README.md | 77 + .../use/node_modules/define-property/index.js | 31 + .../node_modules/define-property/package.json | 82 + .../is-accessor-descriptor/LICENSE | 21 + .../is-accessor-descriptor/README.md | 123 + .../is-accessor-descriptor/index.js | 69 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-accessor-descriptor/package.json | 94 + .../node_modules/is-data-descriptor/LICENSE | 21 + .../node_modules/is-data-descriptor/README.md | 128 + .../node_modules/is-data-descriptor/index.js | 55 + .../node_modules/kind-of/LICENSE | 21 + .../node_modules/kind-of/README.md | 261 + .../node_modules/kind-of/index.js | 116 + .../node_modules/kind-of/package.json | 139 + .../is-data-descriptor/package.json | 93 + .../use/node_modules/is-descriptor/LICENSE | 21 + .../use/node_modules/is-descriptor/README.md | 193 + .../use/node_modules/is-descriptor/index.js | 22 + .../node_modules/is-descriptor/package.json | 114 + node_modules/use/node_modules/kind-of/LICENSE | 21 + .../use/node_modules/kind-of/README.md | 342 + .../use/node_modules/kind-of/index.js | 147 + .../use/node_modules/kind-of/package.json | 146 + node_modules/use/package.json | 118 + node_modules/use/utils.js | 23 + node_modules/util-deprecate/History.md | 16 + node_modules/util-deprecate/LICENSE | 24 + node_modules/util-deprecate/README.md | 53 + node_modules/util-deprecate/browser.js | 67 + node_modules/util-deprecate/node.js | 6 + node_modules/util-deprecate/package.json | 56 + node_modules/utils-merge/.npmignore | 9 + node_modules/utils-merge/LICENSE | 20 + node_modules/utils-merge/README.md | 34 + node_modules/utils-merge/index.js | 23 + node_modules/utils-merge/package.json | 69 + node_modules/uuid/.eslintrc.json | 47 + node_modules/uuid/AUTHORS | 5 + node_modules/uuid/CHANGELOG.md | 57 + node_modules/uuid/LICENSE.md | 21 + node_modules/uuid/README.md | 293 + node_modules/uuid/README_js.md | 280 + node_modules/uuid/bin/uuid | 65 + node_modules/uuid/index.js | 8 + node_modules/uuid/lib/bytesToUuid.js | 23 + node_modules/uuid/lib/md5-browser.js | 216 + node_modules/uuid/lib/md5.js | 25 + node_modules/uuid/lib/rng-browser.js | 32 + node_modules/uuid/lib/rng.js | 8 + node_modules/uuid/lib/sha1-browser.js | 89 + node_modules/uuid/lib/sha1.js | 25 + node_modules/uuid/lib/v35.js | 53 + node_modules/uuid/package.json | 90 + node_modules/uuid/v1.js | 109 + node_modules/uuid/v3.js | 4 + node_modules/uuid/v4.js | 29 + node_modules/uuid/v5.js | 3 + .../validate-npm-package-license/LICENSE | 202 + .../validate-npm-package-license/README.md | 113 + .../validate-npm-package-license/index.js | 84 + .../validate-npm-package-license/package.json | 61 + .../validate-npm-package-license/test.log | 4 + node_modules/validator/CHANGELOG.md | 419 + node_modules/validator/LICENSE | 20 + node_modules/validator/README.md | 209 + node_modules/validator/index.js | 351 + node_modules/validator/lib/alpha.js | 96 + node_modules/validator/lib/blacklist.js | 18 + node_modules/validator/lib/contains.js | 22 + node_modules/validator/lib/equals.js | 18 + node_modules/validator/lib/escape.js | 18 + node_modules/validator/lib/isAfter.js | 26 + node_modules/validator/lib/isAlpha.js | 25 + node_modules/validator/lib/isAlphanumeric.js | 25 + node_modules/validator/lib/isAscii.js | 22 + node_modules/validator/lib/isBase64.js | 25 + node_modules/validator/lib/isBefore.js | 26 + node_modules/validator/lib/isBoolean.js | 18 + node_modules/validator/lib/isByteLength.js | 33 + node_modules/validator/lib/isCreditCard.js | 45 + node_modules/validator/lib/isCurrency.js | 92 + node_modules/validator/lib/isDataURI.js | 49 + node_modules/validator/lib/isDecimal.js | 41 + node_modules/validator/lib/isDivisibleBy.js | 22 + node_modules/validator/lib/isEmail.js | 89 + node_modules/validator/lib/isEmpty.js | 18 + node_modules/validator/lib/isFQDN.js | 61 + node_modules/validator/lib/isFloat.js | 25 + node_modules/validator/lib/isFullWidth.js | 20 + node_modules/validator/lib/isHalfWidth.js | 20 + node_modules/validator/lib/isHash.js | 35 + node_modules/validator/lib/isHexColor.js | 20 + node_modules/validator/lib/isHexadecimal.js | 20 + node_modules/validator/lib/isIP.js | 81 + node_modules/validator/lib/isISBN.js | 57 + node_modules/validator/lib/isISIN.js | 48 + .../validator/lib/isISO31661Alpha2.js | 21 + node_modules/validator/lib/isISO8601.js | 23 + node_modules/validator/lib/isISRC.js | 21 + node_modules/validator/lib/isISSN.js | 58 + node_modules/validator/lib/isIn.js | 39 + node_modules/validator/lib/isInt.js | 33 + node_modules/validator/lib/isJSON.js | 25 + node_modules/validator/lib/isLatLong.js | 23 + node_modules/validator/lib/isLength.js | 34 + node_modules/validator/lib/isLowercase.js | 18 + node_modules/validator/lib/isMACAddress.js | 20 + node_modules/validator/lib/isMD5.js | 20 + node_modules/validator/lib/isMimeType.js | 52 + node_modules/validator/lib/isMobilePhone.js | 103 + node_modules/validator/lib/isMongoId.js | 22 + node_modules/validator/lib/isMultibyte.js | 22 + node_modules/validator/lib/isNumeric.js | 20 + node_modules/validator/lib/isPort.js | 17 + node_modules/validator/lib/isPostalCode.js | 76 + node_modules/validator/lib/isSurrogatePair.js | 20 + node_modules/validator/lib/isURL.js | 147 + node_modules/validator/lib/isUUID.js | 28 + node_modules/validator/lib/isUppercase.js | 18 + node_modules/validator/lib/isVariableWidth.js | 22 + node_modules/validator/lib/isWhitelisted.js | 23 + node_modules/validator/lib/ltrim.js | 19 + node_modules/validator/lib/matches.js | 21 + node_modules/validator/lib/normalizeEmail.js | 129 + node_modules/validator/lib/rtrim.js | 25 + node_modules/validator/lib/stripLow.js | 23 + node_modules/validator/lib/toBoolean.js | 21 + node_modules/validator/lib/toDate.js | 19 + node_modules/validator/lib/toFloat.js | 18 + node_modules/validator/lib/toInt.js | 18 + node_modules/validator/lib/trim.js | 21 + node_modules/validator/lib/unescape.js | 18 + .../validator/lib/util/assertString.js | 14 + node_modules/validator/lib/util/merge.js | 18 + node_modules/validator/lib/util/toString.js | 22 + node_modules/validator/lib/whitelist.js | 18 + node_modules/validator/package.json | 94 + node_modules/validator/validator.js | 1560 + node_modules/validator/validator.min.js | 23 + node_modules/vary/HISTORY.md | 39 + node_modules/vary/LICENSE | 22 + node_modules/vary/README.md | 101 + node_modules/vary/index.js | 149 + node_modules/vary/package.json | 81 + node_modules/which-module/CHANGELOG.md | 26 + node_modules/which-module/LICENSE | 13 + node_modules/which-module/README.md | 55 + node_modules/which-module/index.js | 9 + node_modules/which-module/package.json | 68 + node_modules/which/CHANGELOG.md | 147 + node_modules/which/LICENSE | 15 + node_modules/which/README.md | 51 + node_modules/which/bin/which | 52 + node_modules/which/package.json | 65 + node_modules/which/which.js | 135 + node_modules/widest-line/index.js | 5 + node_modules/widest-line/license | 9 + node_modules/widest-line/package.json | 86 + node_modules/widest-line/readme.md | 34 + node_modules/wkx/LICENSE.txt | 20 + node_modules/wkx/README.md | 92 + node_modules/wkx/dist/wkx.js | 4912 + node_modules/wkx/dist/wkx.min.js | 1 + node_modules/wkx/lib/binaryreader.js | 47 + node_modules/wkx/lib/binarywriter.js | 65 + node_modules/wkx/lib/geometry.js | 384 + node_modules/wkx/lib/geometrycollection.js | 169 + node_modules/wkx/lib/linestring.js | 178 + node_modules/wkx/lib/multilinestring.js | 189 + node_modules/wkx/lib/multipoint.js | 172 + node_modules/wkx/lib/multipolygon.js | 226 + node_modules/wkx/lib/point.js | 217 + node_modules/wkx/lib/polygon.js | 288 + node_modules/wkx/lib/types.js | 29 + node_modules/wkx/lib/wktparser.js | 124 + node_modules/wkx/lib/wkx.d.ts | 100 + node_modules/wkx/lib/wkx.js | 9 + node_modules/wkx/lib/zigzag.js | 8 + node_modules/wkx/package.json | 84 + node_modules/wrap-ansi/index.js | 168 + node_modules/wrap-ansi/license | 21 + .../node_modules/ansi-regex/index.js | 4 + .../wrap-ansi/node_modules/ansi-regex/license | 21 + .../node_modules/ansi-regex/package.json | 108 + .../node_modules/ansi-regex/readme.md | 39 + .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 77 + .../is-fullwidth-code-point/readme.md | 39 + .../node_modules/string-width/index.js | 37 + .../node_modules/string-width/license | 21 + .../node_modules/string-width/package.json | 88 + .../node_modules/string-width/readme.md | 42 + .../node_modules/strip-ansi/index.js | 6 + .../wrap-ansi/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 102 + .../node_modules/strip-ansi/readme.md | 33 + node_modules/wrap-ansi/package.json | 119 + node_modules/wrap-ansi/readme.md | 73 + node_modules/write-file-atomic/LICENSE | 6 + node_modules/write-file-atomic/README.md | 49 + node_modules/write-file-atomic/index.js | 199 + node_modules/write-file-atomic/package.json | 67 + node_modules/xdg-basedir/index.js | 28 + node_modules/xdg-basedir/license | 21 + node_modules/xdg-basedir/package.json | 73 + node_modules/xdg-basedir/readme.md | 60 + node_modules/xtend/.jshintrc | 30 + node_modules/xtend/.npmignore | 1 + node_modules/xtend/LICENCE | 19 + node_modules/xtend/Makefile | 4 + node_modules/xtend/README.md | 32 + node_modules/xtend/immutable.js | 19 + node_modules/xtend/mutable.js | 17 + node_modules/xtend/package.json | 89 + node_modules/xtend/test.js | 83 + node_modules/y18n/LICENSE | 13 + node_modules/y18n/README.md | 91 + node_modules/y18n/index.js | 172 + node_modules/y18n/package.json | 65 + node_modules/yallist/LICENSE | 15 + node_modules/yallist/README.md | 204 + node_modules/yallist/iterator.js | 7 + node_modules/yallist/package.json | 62 + node_modules/yallist/yallist.js | 370 + node_modules/yargs-parser/CHANGELOG.md | 223 + node_modules/yargs-parser/LICENSE.txt | 14 + node_modules/yargs-parser/README.md | 281 + node_modules/yargs-parser/index.js | 764 + .../yargs-parser/lib/tokenize-arg-string.js | 34 + node_modules/yargs-parser/package.json | 75 + node_modules/yargs/CHANGELOG.md | 961 + node_modules/yargs/LICENSE | 22 + node_modules/yargs/README.md | 103 + node_modules/yargs/completion.sh.hbs | 28 + node_modules/yargs/index.js | 31 + node_modules/yargs/lib/apply-extends.js | 52 + node_modules/yargs/lib/argsert.js | 72 + node_modules/yargs/lib/assign.js | 15 + node_modules/yargs/lib/command.js | 336 + node_modules/yargs/lib/completion.js | 104 + node_modules/yargs/lib/levenshtein.js | 47 + node_modules/yargs/lib/obj-filter.js | 10 + node_modules/yargs/lib/usage.js | 489 + node_modules/yargs/lib/validation.js | 364 + node_modules/yargs/lib/yerror.js | 10 + node_modules/yargs/locales/be.json | 39 + node_modules/yargs/locales/de.json | 39 + node_modules/yargs/locales/en.json | 40 + node_modules/yargs/locales/es.json | 39 + node_modules/yargs/locales/fr.json | 37 + node_modules/yargs/locales/hi.json | 39 + node_modules/yargs/locales/hu.json | 39 + node_modules/yargs/locales/id.json | 40 + node_modules/yargs/locales/it.json | 39 + node_modules/yargs/locales/ja.json | 39 + node_modules/yargs/locales/ko.json | 39 + node_modules/yargs/locales/nb.json | 37 + node_modules/yargs/locales/nl.json | 39 + node_modules/yargs/locales/pirate.json | 12 + node_modules/yargs/locales/pl.json | 39 + node_modules/yargs/locales/pt.json | 38 + node_modules/yargs/locales/pt_BR.json | 40 + node_modules/yargs/locales/ru.json | 39 + node_modules/yargs/locales/th.json | 39 + node_modules/yargs/locales/tr.json | 39 + node_modules/yargs/locales/zh_CN.json | 37 + node_modules/yargs/locales/zh_TW.json | 40 + node_modules/yargs/package.json | 102 + node_modules/yargs/yargs.js | 1127 + package-lock.json | 2700 +- package.json | 4 +- routes/menu.js | 69 + routes/restaurant.js | 33 + seeders/20180301023613-restaurant.js | 42 + views/editmenu.ejs | 19 + views/index.ejs | 16 + views/menu.ejs | 53 + views/restaurant.ejs | 29 + views/view_menu.ejs | 36 + 7305 files changed, 700741 insertions(+), 19 deletions(-) create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 app.js create mode 100644 config/config.json create mode 100644 helper/help.js create mode 100644 migrations/20180301022239-create-restaurant.js create mode 100644 migrations/20180301022338-create-menu.js create mode 100644 migrations/20180301022812-addforeignkey.js create mode 100644 models/index.js create mode 100644 models/menu.js create mode 100644 models/restaurant.js create mode 120000 node_modules/.bin/atob create mode 120000 node_modules/.bin/css-beautify create mode 120000 node_modules/.bin/editorconfig create mode 120000 node_modules/.bin/html-beautify create mode 120000 node_modules/.bin/js-beautify create mode 120000 node_modules/.bin/mime create mode 120000 node_modules/.bin/mkdirp create mode 120000 node_modules/.bin/nodemon create mode 120000 node_modules/.bin/nodetouch create mode 120000 node_modules/.bin/nopt create mode 120000 node_modules/.bin/rc create mode 120000 node_modules/.bin/semver create mode 120000 node_modules/.bin/sequelize create mode 120000 node_modules/.bin/uuid create mode 120000 node_modules/.bin/which create mode 100644 node_modules/@types/geojson/LICENSE create mode 100644 node_modules/@types/geojson/README.md create mode 100644 node_modules/@types/geojson/index.d.ts create mode 100644 node_modules/@types/geojson/package.json create mode 100644 node_modules/@types/node/LICENSE create mode 100644 node_modules/@types/node/README.md create mode 100644 node_modules/@types/node/index.d.ts create mode 100644 node_modules/@types/node/inspector.d.ts create mode 100644 node_modules/@types/node/package.json create mode 100644 node_modules/abbrev/LICENSE create mode 100644 node_modules/abbrev/README.md create mode 100644 node_modules/abbrev/abbrev.js create mode 100644 node_modules/abbrev/package.json create mode 100644 node_modules/accepts/HISTORY.md create mode 100644 node_modules/accepts/LICENSE create mode 100644 node_modules/accepts/README.md create mode 100644 node_modules/accepts/index.js create mode 100644 node_modules/accepts/package.json create mode 100644 node_modules/ansi-align/CHANGELOG.md create mode 100644 node_modules/ansi-align/LICENSE create mode 100644 node_modules/ansi-align/README.md create mode 100644 node_modules/ansi-align/index.js create mode 100644 node_modules/ansi-align/package.json create mode 100644 node_modules/ansi-regex/index.js create mode 100644 node_modules/ansi-regex/license create mode 100644 node_modules/ansi-regex/package.json create mode 100644 node_modules/ansi-regex/readme.md create mode 100644 node_modules/ansi-styles/index.js create mode 100644 node_modules/ansi-styles/license create mode 100644 node_modules/ansi-styles/package.json create mode 100644 node_modules/ansi-styles/readme.md create mode 100644 node_modules/anymatch/LICENSE create mode 100644 node_modules/anymatch/README.md create mode 100644 node_modules/anymatch/index.js create mode 100644 node_modules/anymatch/package.json create mode 100755 node_modules/arr-diff/LICENSE create mode 100644 node_modules/arr-diff/README.md create mode 100644 node_modules/arr-diff/index.js create mode 100644 node_modules/arr-diff/package.json create mode 100755 node_modules/arr-flatten/LICENSE create mode 100755 node_modules/arr-flatten/README.md create mode 100644 node_modules/arr-flatten/index.js create mode 100644 node_modules/arr-flatten/package.json create mode 100644 node_modules/arr-union/LICENSE create mode 100644 node_modules/arr-union/README.md create mode 100644 node_modules/arr-union/index.js create mode 100644 node_modules/arr-union/package.json create mode 100644 node_modules/array-flatten/LICENSE create mode 100644 node_modules/array-flatten/README.md create mode 100644 node_modules/array-flatten/array-flatten.js create mode 100644 node_modules/array-flatten/package.json create mode 100755 node_modules/array-unique/LICENSE create mode 100755 node_modules/array-unique/README.md create mode 100644 node_modules/array-unique/index.js create mode 100644 node_modules/array-unique/package.json create mode 100644 node_modules/assign-symbols/LICENSE create mode 100644 node_modules/assign-symbols/README.md create mode 100644 node_modules/assign-symbols/index.js create mode 100644 node_modules/assign-symbols/package.json create mode 100644 node_modules/async-each/.npmignore create mode 100644 node_modules/async-each/CHANGELOG.md create mode 100644 node_modules/async-each/README.md create mode 100644 node_modules/async-each/index.js create mode 100644 node_modules/async-each/package.json create mode 100644 node_modules/atob/LICENSE create mode 100644 node_modules/atob/LICENSE.DOCS create mode 100644 node_modules/atob/README.md create mode 100755 node_modules/atob/bin/atob.js create mode 100644 node_modules/atob/bower.json create mode 100644 node_modules/atob/browser-atob.js create mode 100644 node_modules/atob/node-atob.js create mode 100644 node_modules/atob/package.json create mode 100644 node_modules/atob/test.js create mode 100644 node_modules/babel-runtime/.npmignore create mode 100644 node_modules/babel-runtime/README.md create mode 100644 node_modules/babel-runtime/core-js.js create mode 100644 node_modules/babel-runtime/core-js/array/concat.js create mode 100644 node_modules/babel-runtime/core-js/array/copy-within.js create mode 100644 node_modules/babel-runtime/core-js/array/entries.js create mode 100644 node_modules/babel-runtime/core-js/array/every.js create mode 100644 node_modules/babel-runtime/core-js/array/fill.js create mode 100644 node_modules/babel-runtime/core-js/array/filter.js create mode 100644 node_modules/babel-runtime/core-js/array/find-index.js create mode 100644 node_modules/babel-runtime/core-js/array/find.js create mode 100644 node_modules/babel-runtime/core-js/array/for-each.js create mode 100644 node_modules/babel-runtime/core-js/array/from.js create mode 100644 node_modules/babel-runtime/core-js/array/includes.js create mode 100644 node_modules/babel-runtime/core-js/array/index-of.js create mode 100644 node_modules/babel-runtime/core-js/array/join.js create mode 100644 node_modules/babel-runtime/core-js/array/keys.js create mode 100644 node_modules/babel-runtime/core-js/array/last-index-of.js create mode 100644 node_modules/babel-runtime/core-js/array/map.js create mode 100644 node_modules/babel-runtime/core-js/array/of.js create mode 100644 node_modules/babel-runtime/core-js/array/pop.js create mode 100644 node_modules/babel-runtime/core-js/array/push.js create mode 100644 node_modules/babel-runtime/core-js/array/reduce-right.js create mode 100644 node_modules/babel-runtime/core-js/array/reduce.js create mode 100644 node_modules/babel-runtime/core-js/array/reverse.js create mode 100644 node_modules/babel-runtime/core-js/array/shift.js create mode 100644 node_modules/babel-runtime/core-js/array/slice.js create mode 100644 node_modules/babel-runtime/core-js/array/some.js create mode 100644 node_modules/babel-runtime/core-js/array/sort.js create mode 100644 node_modules/babel-runtime/core-js/array/splice.js create mode 100644 node_modules/babel-runtime/core-js/array/unshift.js create mode 100644 node_modules/babel-runtime/core-js/array/values.js create mode 100644 node_modules/babel-runtime/core-js/asap.js create mode 100644 node_modules/babel-runtime/core-js/clear-immediate.js create mode 100644 node_modules/babel-runtime/core-js/error/is-error.js create mode 100644 node_modules/babel-runtime/core-js/get-iterator.js create mode 100644 node_modules/babel-runtime/core-js/is-iterable.js create mode 100644 node_modules/babel-runtime/core-js/json/stringify.js create mode 100644 node_modules/babel-runtime/core-js/map.js create mode 100644 node_modules/babel-runtime/core-js/math/acosh.js create mode 100644 node_modules/babel-runtime/core-js/math/asinh.js create mode 100644 node_modules/babel-runtime/core-js/math/atanh.js create mode 100644 node_modules/babel-runtime/core-js/math/cbrt.js create mode 100644 node_modules/babel-runtime/core-js/math/clz32.js create mode 100644 node_modules/babel-runtime/core-js/math/cosh.js create mode 100644 node_modules/babel-runtime/core-js/math/expm1.js create mode 100644 node_modules/babel-runtime/core-js/math/fround.js create mode 100644 node_modules/babel-runtime/core-js/math/hypot.js create mode 100644 node_modules/babel-runtime/core-js/math/iaddh.js create mode 100644 node_modules/babel-runtime/core-js/math/imul.js create mode 100644 node_modules/babel-runtime/core-js/math/imulh.js create mode 100644 node_modules/babel-runtime/core-js/math/isubh.js create mode 100644 node_modules/babel-runtime/core-js/math/log10.js create mode 100644 node_modules/babel-runtime/core-js/math/log1p.js create mode 100644 node_modules/babel-runtime/core-js/math/log2.js create mode 100644 node_modules/babel-runtime/core-js/math/sign.js create mode 100644 node_modules/babel-runtime/core-js/math/sinh.js create mode 100644 node_modules/babel-runtime/core-js/math/tanh.js create mode 100644 node_modules/babel-runtime/core-js/math/trunc.js create mode 100644 node_modules/babel-runtime/core-js/math/umulh.js create mode 100644 node_modules/babel-runtime/core-js/number/epsilon.js create mode 100644 node_modules/babel-runtime/core-js/number/is-finite.js create mode 100644 node_modules/babel-runtime/core-js/number/is-integer.js create mode 100644 node_modules/babel-runtime/core-js/number/is-nan.js create mode 100644 node_modules/babel-runtime/core-js/number/is-safe-integer.js create mode 100644 node_modules/babel-runtime/core-js/number/max-safe-integer.js create mode 100644 node_modules/babel-runtime/core-js/number/min-safe-integer.js create mode 100644 node_modules/babel-runtime/core-js/number/parse-float.js create mode 100644 node_modules/babel-runtime/core-js/number/parse-int.js create mode 100644 node_modules/babel-runtime/core-js/object/assign.js create mode 100644 node_modules/babel-runtime/core-js/object/create.js create mode 100644 node_modules/babel-runtime/core-js/object/define-properties.js create mode 100644 node_modules/babel-runtime/core-js/object/define-property.js create mode 100644 node_modules/babel-runtime/core-js/object/entries.js create mode 100644 node_modules/babel-runtime/core-js/object/freeze.js create mode 100644 node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js create mode 100644 node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js create mode 100644 node_modules/babel-runtime/core-js/object/get-own-property-names.js create mode 100644 node_modules/babel-runtime/core-js/object/get-own-property-symbols.js create mode 100644 node_modules/babel-runtime/core-js/object/get-prototype-of.js create mode 100644 node_modules/babel-runtime/core-js/object/is-extensible.js create mode 100644 node_modules/babel-runtime/core-js/object/is-frozen.js create mode 100644 node_modules/babel-runtime/core-js/object/is-sealed.js create mode 100644 node_modules/babel-runtime/core-js/object/is.js create mode 100644 node_modules/babel-runtime/core-js/object/keys.js create mode 100644 node_modules/babel-runtime/core-js/object/prevent-extensions.js create mode 100644 node_modules/babel-runtime/core-js/object/seal.js create mode 100644 node_modules/babel-runtime/core-js/object/set-prototype-of.js create mode 100644 node_modules/babel-runtime/core-js/object/values.js create mode 100644 node_modules/babel-runtime/core-js/observable.js create mode 100644 node_modules/babel-runtime/core-js/promise.js create mode 100644 node_modules/babel-runtime/core-js/reflect/apply.js create mode 100644 node_modules/babel-runtime/core-js/reflect/construct.js create mode 100644 node_modules/babel-runtime/core-js/reflect/define-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/define-property.js create mode 100644 node_modules/babel-runtime/core-js/reflect/delete-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/delete-property.js create mode 100644 node_modules/babel-runtime/core-js/reflect/enumerate.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-own-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-prototype-of.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get.js create mode 100644 node_modules/babel-runtime/core-js/reflect/has-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/has-own-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/has.js create mode 100644 node_modules/babel-runtime/core-js/reflect/is-extensible.js create mode 100644 node_modules/babel-runtime/core-js/reflect/metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/own-keys.js create mode 100644 node_modules/babel-runtime/core-js/reflect/prevent-extensions.js create mode 100644 node_modules/babel-runtime/core-js/reflect/set-prototype-of.js create mode 100644 node_modules/babel-runtime/core-js/reflect/set.js create mode 100644 node_modules/babel-runtime/core-js/regexp/escape.js create mode 100644 node_modules/babel-runtime/core-js/set-immediate.js create mode 100644 node_modules/babel-runtime/core-js/set.js create mode 100644 node_modules/babel-runtime/core-js/string/at.js create mode 100644 node_modules/babel-runtime/core-js/string/code-point-at.js create mode 100644 node_modules/babel-runtime/core-js/string/ends-with.js create mode 100644 node_modules/babel-runtime/core-js/string/from-code-point.js create mode 100644 node_modules/babel-runtime/core-js/string/includes.js create mode 100644 node_modules/babel-runtime/core-js/string/match-all.js create mode 100644 node_modules/babel-runtime/core-js/string/pad-end.js create mode 100644 node_modules/babel-runtime/core-js/string/pad-left.js create mode 100644 node_modules/babel-runtime/core-js/string/pad-right.js create mode 100644 node_modules/babel-runtime/core-js/string/pad-start.js create mode 100644 node_modules/babel-runtime/core-js/string/raw.js create mode 100644 node_modules/babel-runtime/core-js/string/repeat.js create mode 100644 node_modules/babel-runtime/core-js/string/starts-with.js create mode 100644 node_modules/babel-runtime/core-js/string/trim-end.js create mode 100644 node_modules/babel-runtime/core-js/string/trim-left.js create mode 100644 node_modules/babel-runtime/core-js/string/trim-right.js create mode 100644 node_modules/babel-runtime/core-js/string/trim-start.js create mode 100644 node_modules/babel-runtime/core-js/string/trim.js create mode 100644 node_modules/babel-runtime/core-js/symbol.js create mode 100644 node_modules/babel-runtime/core-js/symbol/async-iterator.js create mode 100644 node_modules/babel-runtime/core-js/symbol/for.js create mode 100644 node_modules/babel-runtime/core-js/symbol/has-instance.js create mode 100644 node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js create mode 100644 node_modules/babel-runtime/core-js/symbol/iterator.js create mode 100644 node_modules/babel-runtime/core-js/symbol/key-for.js create mode 100644 node_modules/babel-runtime/core-js/symbol/match.js create mode 100644 node_modules/babel-runtime/core-js/symbol/observable.js create mode 100644 node_modules/babel-runtime/core-js/symbol/replace.js create mode 100644 node_modules/babel-runtime/core-js/symbol/search.js create mode 100644 node_modules/babel-runtime/core-js/symbol/species.js create mode 100644 node_modules/babel-runtime/core-js/symbol/split.js create mode 100644 node_modules/babel-runtime/core-js/symbol/to-primitive.js create mode 100644 node_modules/babel-runtime/core-js/symbol/to-string-tag.js create mode 100644 node_modules/babel-runtime/core-js/symbol/unscopables.js create mode 100644 node_modules/babel-runtime/core-js/system/global.js create mode 100644 node_modules/babel-runtime/core-js/weak-map.js create mode 100644 node_modules/babel-runtime/core-js/weak-set.js create mode 100644 node_modules/babel-runtime/helpers/_async-generator-delegate.js create mode 100644 node_modules/babel-runtime/helpers/_async-generator.js create mode 100644 node_modules/babel-runtime/helpers/_async-iterator.js create mode 100644 node_modules/babel-runtime/helpers/_async-to-generator.js create mode 100644 node_modules/babel-runtime/helpers/_class-call-check.js create mode 100644 node_modules/babel-runtime/helpers/_create-class.js create mode 100644 node_modules/babel-runtime/helpers/_defaults.js create mode 100644 node_modules/babel-runtime/helpers/_define-enumerable-properties.js create mode 100644 node_modules/babel-runtime/helpers/_define-property.js create mode 100644 node_modules/babel-runtime/helpers/_extends.js create mode 100644 node_modules/babel-runtime/helpers/_get.js create mode 100644 node_modules/babel-runtime/helpers/_inherits.js create mode 100644 node_modules/babel-runtime/helpers/_instanceof.js create mode 100644 node_modules/babel-runtime/helpers/_interop-require-default.js create mode 100644 node_modules/babel-runtime/helpers/_interop-require-wildcard.js create mode 100644 node_modules/babel-runtime/helpers/_jsx.js create mode 100644 node_modules/babel-runtime/helpers/_new-arrow-check.js create mode 100644 node_modules/babel-runtime/helpers/_object-destructuring-empty.js create mode 100644 node_modules/babel-runtime/helpers/_object-without-properties.js create mode 100644 node_modules/babel-runtime/helpers/_possible-constructor-return.js create mode 100644 node_modules/babel-runtime/helpers/_self-global.js create mode 100644 node_modules/babel-runtime/helpers/_set.js create mode 100644 node_modules/babel-runtime/helpers/_sliced-to-array-loose.js create mode 100644 node_modules/babel-runtime/helpers/_sliced-to-array.js create mode 100644 node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js create mode 100644 node_modules/babel-runtime/helpers/_tagged-template-literal.js create mode 100644 node_modules/babel-runtime/helpers/_temporal-ref.js create mode 100644 node_modules/babel-runtime/helpers/_temporal-undefined.js create mode 100644 node_modules/babel-runtime/helpers/_to-array.js create mode 100644 node_modules/babel-runtime/helpers/_to-consumable-array.js create mode 100644 node_modules/babel-runtime/helpers/_typeof.js create mode 100644 node_modules/babel-runtime/helpers/async-generator-delegate.js create mode 100644 node_modules/babel-runtime/helpers/async-generator.js create mode 100644 node_modules/babel-runtime/helpers/async-iterator.js create mode 100644 node_modules/babel-runtime/helpers/async-to-generator.js create mode 100644 node_modules/babel-runtime/helpers/asyncGenerator.js create mode 100644 node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js create mode 100644 node_modules/babel-runtime/helpers/asyncIterator.js create mode 100644 node_modules/babel-runtime/helpers/asyncToGenerator.js create mode 100644 node_modules/babel-runtime/helpers/class-call-check.js create mode 100644 node_modules/babel-runtime/helpers/classCallCheck.js create mode 100644 node_modules/babel-runtime/helpers/create-class.js create mode 100644 node_modules/babel-runtime/helpers/createClass.js create mode 100644 node_modules/babel-runtime/helpers/defaults.js create mode 100644 node_modules/babel-runtime/helpers/define-enumerable-properties.js create mode 100644 node_modules/babel-runtime/helpers/define-property.js create mode 100644 node_modules/babel-runtime/helpers/defineEnumerableProperties.js create mode 100644 node_modules/babel-runtime/helpers/defineProperty.js create mode 100644 node_modules/babel-runtime/helpers/extends.js create mode 100644 node_modules/babel-runtime/helpers/get.js create mode 100644 node_modules/babel-runtime/helpers/inherits.js create mode 100644 node_modules/babel-runtime/helpers/instanceof.js create mode 100644 node_modules/babel-runtime/helpers/interop-require-default.js create mode 100644 node_modules/babel-runtime/helpers/interop-require-wildcard.js create mode 100644 node_modules/babel-runtime/helpers/interopRequireDefault.js create mode 100644 node_modules/babel-runtime/helpers/interopRequireWildcard.js create mode 100644 node_modules/babel-runtime/helpers/jsx.js create mode 100644 node_modules/babel-runtime/helpers/new-arrow-check.js create mode 100644 node_modules/babel-runtime/helpers/newArrowCheck.js create mode 100644 node_modules/babel-runtime/helpers/object-destructuring-empty.js create mode 100644 node_modules/babel-runtime/helpers/object-without-properties.js create mode 100644 node_modules/babel-runtime/helpers/objectDestructuringEmpty.js create mode 100644 node_modules/babel-runtime/helpers/objectWithoutProperties.js create mode 100644 node_modules/babel-runtime/helpers/possible-constructor-return.js create mode 100644 node_modules/babel-runtime/helpers/possibleConstructorReturn.js create mode 100644 node_modules/babel-runtime/helpers/self-global.js create mode 100644 node_modules/babel-runtime/helpers/selfGlobal.js create mode 100644 node_modules/babel-runtime/helpers/set.js create mode 100644 node_modules/babel-runtime/helpers/sliced-to-array-loose.js create mode 100644 node_modules/babel-runtime/helpers/sliced-to-array.js create mode 100644 node_modules/babel-runtime/helpers/slicedToArray.js create mode 100644 node_modules/babel-runtime/helpers/slicedToArrayLoose.js create mode 100644 node_modules/babel-runtime/helpers/tagged-template-literal-loose.js create mode 100644 node_modules/babel-runtime/helpers/tagged-template-literal.js create mode 100644 node_modules/babel-runtime/helpers/taggedTemplateLiteral.js create mode 100644 node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js create mode 100644 node_modules/babel-runtime/helpers/temporal-ref.js create mode 100644 node_modules/babel-runtime/helpers/temporal-undefined.js create mode 100644 node_modules/babel-runtime/helpers/temporalRef.js create mode 100644 node_modules/babel-runtime/helpers/temporalUndefined.js create mode 100644 node_modules/babel-runtime/helpers/to-array.js create mode 100644 node_modules/babel-runtime/helpers/to-consumable-array.js create mode 100644 node_modules/babel-runtime/helpers/toArray.js create mode 100644 node_modules/babel-runtime/helpers/toConsumableArray.js create mode 100644 node_modules/babel-runtime/helpers/typeof.js create mode 100644 node_modules/babel-runtime/package-lock.json create mode 100644 node_modules/babel-runtime/package.json create mode 100644 node_modules/babel-runtime/regenerator/index.js create mode 100644 node_modules/balanced-match/.npmignore create mode 100644 node_modules/balanced-match/LICENSE.md create mode 100644 node_modules/balanced-match/README.md create mode 100644 node_modules/balanced-match/index.js create mode 100644 node_modules/balanced-match/package.json create mode 100644 node_modules/base/LICENSE create mode 100644 node_modules/base/README.md create mode 100644 node_modules/base/index.js create mode 100644 node_modules/base/node_modules/define-property/LICENSE create mode 100644 node_modules/base/node_modules/define-property/README.md create mode 100644 node_modules/base/node_modules/define-property/index.js create mode 100644 node_modules/base/node_modules/define-property/package.json create mode 100644 node_modules/base/package.json create mode 100644 node_modules/binary-extensions/binary-extensions.json create mode 100644 node_modules/binary-extensions/license create mode 100644 node_modules/binary-extensions/package.json create mode 100644 node_modules/binary-extensions/readme.md create mode 100644 node_modules/bluebird/LICENSE create mode 100644 node_modules/bluebird/README.md create mode 100644 node_modules/bluebird/changelog.md create mode 100644 node_modules/bluebird/js/browser/bluebird.core.js create mode 100644 node_modules/bluebird/js/browser/bluebird.core.min.js create mode 100644 node_modules/bluebird/js/browser/bluebird.js create mode 100644 node_modules/bluebird/js/browser/bluebird.min.js create mode 100644 node_modules/bluebird/js/release/any.js create mode 100644 node_modules/bluebird/js/release/assert.js create mode 100644 node_modules/bluebird/js/release/async.js create mode 100644 node_modules/bluebird/js/release/bind.js create mode 100644 node_modules/bluebird/js/release/bluebird.js create mode 100644 node_modules/bluebird/js/release/call_get.js create mode 100644 node_modules/bluebird/js/release/cancel.js create mode 100644 node_modules/bluebird/js/release/catch_filter.js create mode 100644 node_modules/bluebird/js/release/context.js create mode 100644 node_modules/bluebird/js/release/debuggability.js create mode 100644 node_modules/bluebird/js/release/direct_resolve.js create mode 100644 node_modules/bluebird/js/release/each.js create mode 100644 node_modules/bluebird/js/release/errors.js create mode 100644 node_modules/bluebird/js/release/es5.js create mode 100644 node_modules/bluebird/js/release/filter.js create mode 100644 node_modules/bluebird/js/release/finally.js create mode 100644 node_modules/bluebird/js/release/generators.js create mode 100644 node_modules/bluebird/js/release/join.js create mode 100644 node_modules/bluebird/js/release/map.js create mode 100644 node_modules/bluebird/js/release/method.js create mode 100644 node_modules/bluebird/js/release/nodeback.js create mode 100644 node_modules/bluebird/js/release/nodeify.js create mode 100644 node_modules/bluebird/js/release/promise.js create mode 100644 node_modules/bluebird/js/release/promise_array.js create mode 100644 node_modules/bluebird/js/release/promisify.js create mode 100644 node_modules/bluebird/js/release/props.js create mode 100644 node_modules/bluebird/js/release/queue.js create mode 100644 node_modules/bluebird/js/release/race.js create mode 100644 node_modules/bluebird/js/release/reduce.js create mode 100644 node_modules/bluebird/js/release/schedule.js create mode 100644 node_modules/bluebird/js/release/settle.js create mode 100644 node_modules/bluebird/js/release/some.js create mode 100644 node_modules/bluebird/js/release/synchronous_inspection.js create mode 100644 node_modules/bluebird/js/release/thenables.js create mode 100644 node_modules/bluebird/js/release/timers.js create mode 100644 node_modules/bluebird/js/release/using.js create mode 100644 node_modules/bluebird/js/release/util.js create mode 100644 node_modules/bluebird/package.json create mode 100644 node_modules/body-parser/HISTORY.md create mode 100644 node_modules/body-parser/LICENSE create mode 100644 node_modules/body-parser/README.md create mode 100644 node_modules/body-parser/index.js create mode 100644 node_modules/body-parser/lib/read.js create mode 100644 node_modules/body-parser/lib/types/json.js create mode 100644 node_modules/body-parser/lib/types/raw.js create mode 100644 node_modules/body-parser/lib/types/text.js create mode 100644 node_modules/body-parser/lib/types/urlencoded.js create mode 100644 node_modules/body-parser/package.json create mode 100644 node_modules/boxen/index.js create mode 100644 node_modules/boxen/license create mode 100644 node_modules/boxen/package.json create mode 100644 node_modules/boxen/readme.md create mode 100644 node_modules/brace-expansion/LICENSE create mode 100644 node_modules/brace-expansion/README.md create mode 100644 node_modules/brace-expansion/index.js create mode 100644 node_modules/brace-expansion/package.json create mode 100644 node_modules/braces/LICENSE create mode 100644 node_modules/braces/README.md create mode 100644 node_modules/braces/index.js create mode 100644 node_modules/braces/lib/.DS_Store create mode 100644 node_modules/braces/lib/braces.js create mode 100644 node_modules/braces/lib/compilers.js create mode 100644 node_modules/braces/lib/parsers-new.js create mode 100644 node_modules/braces/lib/parsers-orig.js create mode 100644 node_modules/braces/lib/parsers-parens.js create mode 100644 node_modules/braces/lib/parsers.js create mode 100644 node_modules/braces/lib/utils.js create mode 100644 node_modules/braces/node_modules/define-property/LICENSE create mode 100644 node_modules/braces/node_modules/define-property/README.md create mode 100644 node_modules/braces/node_modules/define-property/index.js create mode 100644 node_modules/braces/node_modules/define-property/package.json create mode 100644 node_modules/braces/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/braces/node_modules/extend-shallow/README.md create mode 100644 node_modules/braces/node_modules/extend-shallow/index.js create mode 100644 node_modules/braces/node_modules/extend-shallow/package.json create mode 100644 node_modules/braces/package.json create mode 100644 node_modules/buffer-writer/.npmignore create mode 100644 node_modules/buffer-writer/.travis.yml create mode 100644 node_modules/buffer-writer/LICENSE create mode 100644 node_modules/buffer-writer/README.md create mode 100644 node_modules/buffer-writer/benchmark/index.js create mode 100644 node_modules/buffer-writer/benchmark/int-16-benchmark.js create mode 100644 node_modules/buffer-writer/benchmark/int-32-benchmark.js create mode 100644 node_modules/buffer-writer/benchmark/join-benchmark.js create mode 100644 node_modules/buffer-writer/benchmark/resize-benchmark.js create mode 100644 node_modules/buffer-writer/benchmark/small-benchmark.js create mode 100644 node_modules/buffer-writer/index.js create mode 100644 node_modules/buffer-writer/package.json create mode 100644 node_modules/buffer-writer/test/mocha.opts create mode 100644 node_modules/buffer-writer/test/writer-tests.js create mode 100644 node_modules/builtin-modules/builtin-modules.json create mode 100644 node_modules/builtin-modules/index.js create mode 100644 node_modules/builtin-modules/license create mode 100644 node_modules/builtin-modules/package.json create mode 100644 node_modules/builtin-modules/readme.md create mode 100644 node_modules/builtin-modules/static.js create mode 100644 node_modules/bytes/History.md create mode 100644 node_modules/bytes/LICENSE create mode 100644 node_modules/bytes/Readme.md create mode 100644 node_modules/bytes/index.js create mode 100644 node_modules/bytes/package.json create mode 100644 node_modules/cache-base/LICENSE create mode 100644 node_modules/cache-base/README.md create mode 100644 node_modules/cache-base/index.js create mode 100644 node_modules/cache-base/package.json create mode 100644 node_modules/camelcase/index.js create mode 100644 node_modules/camelcase/license create mode 100644 node_modules/camelcase/package.json create mode 100644 node_modules/camelcase/readme.md create mode 100644 node_modules/capture-stack-trace/index.js create mode 100644 node_modules/capture-stack-trace/package.json create mode 100644 node_modules/capture-stack-trace/readme.md create mode 100644 node_modules/chalk/index.js create mode 100644 node_modules/chalk/license create mode 100644 node_modules/chalk/package.json create mode 100644 node_modules/chalk/readme.md create mode 100644 node_modules/chalk/templates.js create mode 100644 node_modules/chalk/types/index.d.ts create mode 100644 node_modules/chokidar/CHANGELOG.md create mode 100644 node_modules/chokidar/README.md create mode 100644 node_modules/chokidar/index.js create mode 100644 node_modules/chokidar/lib/fsevents-handler.js create mode 100644 node_modules/chokidar/lib/nodefs-handler.js create mode 100644 node_modules/chokidar/package.json create mode 100644 node_modules/class-utils/LICENSE create mode 100644 node_modules/class-utils/README.md create mode 100644 node_modules/class-utils/index.js create mode 100644 node_modules/class-utils/node_modules/define-property/LICENSE create mode 100644 node_modules/class-utils/node_modules/define-property/README.md create mode 100644 node_modules/class-utils/node_modules/define-property/index.js create mode 100644 node_modules/class-utils/node_modules/define-property/package.json create mode 100644 node_modules/class-utils/node_modules/is-accessor-descriptor/LICENSE create mode 100644 node_modules/class-utils/node_modules/is-accessor-descriptor/README.md create mode 100644 node_modules/class-utils/node_modules/is-accessor-descriptor/index.js create mode 100644 node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/class-utils/node_modules/is-accessor-descriptor/package.json create mode 100644 node_modules/class-utils/node_modules/is-data-descriptor/LICENSE create mode 100644 node_modules/class-utils/node_modules/is-data-descriptor/README.md create mode 100644 node_modules/class-utils/node_modules/is-data-descriptor/index.js create mode 100644 node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/class-utils/node_modules/is-data-descriptor/package.json create mode 100644 node_modules/class-utils/node_modules/is-descriptor/LICENSE create mode 100644 node_modules/class-utils/node_modules/is-descriptor/README.md create mode 100644 node_modules/class-utils/node_modules/is-descriptor/index.js create mode 100644 node_modules/class-utils/node_modules/is-descriptor/package.json create mode 100644 node_modules/class-utils/node_modules/kind-of/LICENSE create mode 100644 node_modules/class-utils/node_modules/kind-of/README.md create mode 100644 node_modules/class-utils/node_modules/kind-of/index.js create mode 100644 node_modules/class-utils/node_modules/kind-of/package.json create mode 100644 node_modules/class-utils/package.json create mode 100644 node_modules/cli-boxes/boxes.json create mode 100644 node_modules/cli-boxes/index.js create mode 100644 node_modules/cli-boxes/license create mode 100644 node_modules/cli-boxes/package.json create mode 100644 node_modules/cli-boxes/readme.md create mode 100644 node_modules/cli-color/.lint create mode 100644 node_modules/cli-color/.npmignore create mode 100644 node_modules/cli-color/.travis.yml create mode 100644 node_modules/cli-color/CHANGES create mode 100644 node_modules/cli-color/LICENSE create mode 100644 node_modules/cli-color/README.md create mode 100644 node_modules/cli-color/art.js create mode 100644 node_modules/cli-color/bare.js create mode 100644 node_modules/cli-color/beep.js create mode 100755 node_modules/cli-color/bin/generate-color-images create mode 100644 node_modules/cli-color/columns.js create mode 100644 node_modules/cli-color/erase.js create mode 100644 node_modules/cli-color/examples/art.js create mode 100644 node_modules/cli-color/examples/basic.js create mode 100644 node_modules/cli-color/examples/erase.js create mode 100644 node_modules/cli-color/examples/styles.js create mode 100644 node_modules/cli-color/examples/throbber.js create mode 100644 node_modules/cli-color/examples/xterm.js create mode 100644 node_modules/cli-color/get-stripped-length.js create mode 100644 node_modules/cli-color/index.js create mode 100644 node_modules/cli-color/lib/sgr.js create mode 100644 node_modules/cli-color/lib/xterm-colors.js create mode 100644 node_modules/cli-color/lib/xterm-match.js create mode 100644 node_modules/cli-color/move.js create mode 100644 node_modules/cli-color/node_modules/ansi-regex/index.js create mode 100644 node_modules/cli-color/node_modules/ansi-regex/license create mode 100644 node_modules/cli-color/node_modules/ansi-regex/package.json create mode 100644 node_modules/cli-color/node_modules/ansi-regex/readme.md create mode 100644 node_modules/cli-color/package.json create mode 100644 node_modules/cli-color/reset.js create mode 100644 node_modules/cli-color/slice.js create mode 100644 node_modules/cli-color/strip.js create mode 100755 node_modules/cli-color/test/__playground/throbber.formatted.js create mode 100755 node_modules/cli-color/test/__playground/throbber.js create mode 100644 node_modules/cli-color/test/art.js create mode 100644 node_modules/cli-color/test/bare.js create mode 100644 node_modules/cli-color/test/beep.js create mode 100644 node_modules/cli-color/test/columns.js create mode 100644 node_modules/cli-color/test/erase.js create mode 100644 node_modules/cli-color/test/get-stripped-length.js create mode 100644 node_modules/cli-color/test/index.js create mode 100644 node_modules/cli-color/test/lib/sgr.js create mode 100644 node_modules/cli-color/test/lib/xterm-colors.js create mode 100644 node_modules/cli-color/test/lib/xterm-match.js create mode 100644 node_modules/cli-color/test/move.js create mode 100644 node_modules/cli-color/test/reset.js create mode 100644 node_modules/cli-color/test/slice.js create mode 100644 node_modules/cli-color/test/strip.js create mode 100644 node_modules/cli-color/test/throbber.js create mode 100644 node_modules/cli-color/test/visual.js create mode 100644 node_modules/cli-color/test/window-size.js create mode 100644 node_modules/cli-color/throbber.js create mode 100644 node_modules/cli-color/window-size.js create mode 100644 node_modules/cliui/CHANGELOG.md create mode 100644 node_modules/cliui/LICENSE.txt create mode 100644 node_modules/cliui/README.md create mode 100644 node_modules/cliui/index.js create mode 100644 node_modules/cliui/node_modules/ansi-regex/index.js create mode 100644 node_modules/cliui/node_modules/ansi-regex/license create mode 100644 node_modules/cliui/node_modules/ansi-regex/package.json create mode 100644 node_modules/cliui/node_modules/ansi-regex/readme.md create mode 100644 node_modules/cliui/node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/cliui/node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/cliui/node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/cliui/node_modules/string-width/index.js create mode 100644 node_modules/cliui/node_modules/string-width/license create mode 100644 node_modules/cliui/node_modules/string-width/package.json create mode 100644 node_modules/cliui/node_modules/string-width/readme.md create mode 100644 node_modules/cliui/node_modules/strip-ansi/index.js create mode 100644 node_modules/cliui/node_modules/strip-ansi/license create mode 100644 node_modules/cliui/node_modules/strip-ansi/package.json create mode 100644 node_modules/cliui/node_modules/strip-ansi/readme.md create mode 100644 node_modules/cliui/package.json create mode 100644 node_modules/cls-bluebird/README.md create mode 100644 node_modules/cls-bluebird/changelog.md create mode 100644 node_modules/cls-bluebird/lib/index.js create mode 100644 node_modules/cls-bluebird/lib/shimCall.js create mode 100644 node_modules/cls-bluebird/lib/shimCoroutine.js create mode 100644 node_modules/cls-bluebird/lib/shimMethod.js create mode 100644 node_modules/cls-bluebird/lib/shimOnCancel.js create mode 100644 node_modules/cls-bluebird/lib/shimUsing.js create mode 100644 node_modules/cls-bluebird/package.json create mode 100644 node_modules/code-point-at/index.js create mode 100644 node_modules/code-point-at/license create mode 100644 node_modules/code-point-at/package.json create mode 100644 node_modules/code-point-at/readme.md create mode 100644 node_modules/collection-visit/LICENSE create mode 100644 node_modules/collection-visit/README.md create mode 100644 node_modules/collection-visit/index.js create mode 100644 node_modules/collection-visit/package.json create mode 100644 node_modules/color-convert/CHANGELOG.md create mode 100644 node_modules/color-convert/LICENSE create mode 100644 node_modules/color-convert/README.md create mode 100644 node_modules/color-convert/conversions.js create mode 100644 node_modules/color-convert/index.js create mode 100644 node_modules/color-convert/package.json create mode 100644 node_modules/color-convert/route.js create mode 100644 node_modules/color-name/.eslintrc.json create mode 100644 node_modules/color-name/.npmignore create mode 100644 node_modules/color-name/LICENSE create mode 100644 node_modules/color-name/README.md create mode 100644 node_modules/color-name/index.js create mode 100644 node_modules/color-name/package.json create mode 100644 node_modules/color-name/test.js create mode 100644 node_modules/commander/CHANGELOG.md create mode 100644 node_modules/commander/LICENSE create mode 100644 node_modules/commander/Readme.md create mode 100644 node_modules/commander/index.js create mode 100644 node_modules/commander/package.json create mode 100644 node_modules/commander/typings/index.d.ts create mode 100644 node_modules/component-emitter/History.md create mode 100644 node_modules/component-emitter/LICENSE create mode 100644 node_modules/component-emitter/Readme.md create mode 100644 node_modules/component-emitter/index.js create mode 100644 node_modules/component-emitter/package.json create mode 100644 node_modules/concat-map/.travis.yml create mode 100644 node_modules/concat-map/LICENSE create mode 100644 node_modules/concat-map/README.markdown create mode 100644 node_modules/concat-map/example/map.js create mode 100644 node_modules/concat-map/index.js create mode 100644 node_modules/concat-map/package.json create mode 100644 node_modules/concat-map/test/map.js create mode 100644 node_modules/config-chain/.npmignore create mode 100644 node_modules/config-chain/LICENCE create mode 100755 node_modules/config-chain/index.js create mode 100644 node_modules/config-chain/package.json create mode 100644 node_modules/config-chain/readme.markdown create mode 100644 node_modules/config-chain/test/broken.js create mode 100644 node_modules/config-chain/test/broken.json create mode 100644 node_modules/config-chain/test/chain-class.js create mode 100644 node_modules/config-chain/test/env.js create mode 100644 node_modules/config-chain/test/find-file.js create mode 100644 node_modules/config-chain/test/get.js create mode 100644 node_modules/config-chain/test/ignore-unfound-file.js create mode 100644 node_modules/config-chain/test/ini.js create mode 100644 node_modules/config-chain/test/save.js create mode 100644 node_modules/configstore/index.js create mode 100644 node_modules/configstore/package.json create mode 100644 node_modules/configstore/readme.md create mode 100644 node_modules/content-disposition/HISTORY.md create mode 100644 node_modules/content-disposition/LICENSE create mode 100644 node_modules/content-disposition/README.md create mode 100644 node_modules/content-disposition/index.js create mode 100644 node_modules/content-disposition/package.json create mode 100644 node_modules/content-type/HISTORY.md create mode 100644 node_modules/content-type/LICENSE create mode 100644 node_modules/content-type/README.md create mode 100644 node_modules/content-type/index.js create mode 100644 node_modules/content-type/package.json create mode 100644 node_modules/cookie-signature/.npmignore create mode 100644 node_modules/cookie-signature/History.md create mode 100644 node_modules/cookie-signature/Readme.md create mode 100644 node_modules/cookie-signature/index.js create mode 100644 node_modules/cookie-signature/package.json create mode 100644 node_modules/cookie/HISTORY.md create mode 100644 node_modules/cookie/LICENSE create mode 100644 node_modules/cookie/README.md create mode 100644 node_modules/cookie/index.js create mode 100644 node_modules/cookie/package.json create mode 100644 node_modules/copy-descriptor/LICENSE create mode 100644 node_modules/copy-descriptor/index.js create mode 100644 node_modules/copy-descriptor/package.json create mode 100644 node_modules/core-js/CHANGELOG.md create mode 100644 node_modules/core-js/Gruntfile.js create mode 100644 node_modules/core-js/LICENSE create mode 100644 node_modules/core-js/README.md create mode 100644 node_modules/core-js/bower.json create mode 100644 node_modules/core-js/build/Gruntfile.ls create mode 100644 node_modules/core-js/build/build.ls create mode 100644 node_modules/core-js/build/config.js create mode 100644 node_modules/core-js/build/index.js create mode 100644 node_modules/core-js/client/core.js create mode 100644 node_modules/core-js/client/core.min.js create mode 100644 node_modules/core-js/client/core.min.js.map create mode 100644 node_modules/core-js/client/library.js create mode 100644 node_modules/core-js/client/library.min.js create mode 100644 node_modules/core-js/client/library.min.js.map create mode 100644 node_modules/core-js/client/shim.js create mode 100644 node_modules/core-js/client/shim.min.js create mode 100644 node_modules/core-js/client/shim.min.js.map create mode 100644 node_modules/core-js/core/_.js create mode 100644 node_modules/core-js/core/delay.js create mode 100644 node_modules/core-js/core/dict.js create mode 100644 node_modules/core-js/core/function.js create mode 100644 node_modules/core-js/core/index.js create mode 100644 node_modules/core-js/core/number.js create mode 100644 node_modules/core-js/core/object.js create mode 100644 node_modules/core-js/core/regexp.js create mode 100644 node_modules/core-js/core/string.js create mode 100644 node_modules/core-js/es5/index.js create mode 100644 node_modules/core-js/es6/array.js create mode 100644 node_modules/core-js/es6/date.js create mode 100644 node_modules/core-js/es6/function.js create mode 100644 node_modules/core-js/es6/index.js create mode 100644 node_modules/core-js/es6/map.js create mode 100644 node_modules/core-js/es6/math.js create mode 100644 node_modules/core-js/es6/number.js create mode 100644 node_modules/core-js/es6/object.js create mode 100644 node_modules/core-js/es6/parse-float.js create mode 100644 node_modules/core-js/es6/parse-int.js create mode 100644 node_modules/core-js/es6/promise.js create mode 100644 node_modules/core-js/es6/reflect.js create mode 100644 node_modules/core-js/es6/regexp.js create mode 100644 node_modules/core-js/es6/set.js create mode 100644 node_modules/core-js/es6/string.js create mode 100644 node_modules/core-js/es6/symbol.js create mode 100644 node_modules/core-js/es6/typed.js create mode 100644 node_modules/core-js/es6/weak-map.js create mode 100644 node_modules/core-js/es6/weak-set.js create mode 100644 node_modules/core-js/es7/array.js create mode 100644 node_modules/core-js/es7/asap.js create mode 100644 node_modules/core-js/es7/error.js create mode 100644 node_modules/core-js/es7/global.js create mode 100644 node_modules/core-js/es7/index.js create mode 100644 node_modules/core-js/es7/map.js create mode 100644 node_modules/core-js/es7/math.js create mode 100644 node_modules/core-js/es7/object.js create mode 100644 node_modules/core-js/es7/observable.js create mode 100644 node_modules/core-js/es7/promise.js create mode 100644 node_modules/core-js/es7/reflect.js create mode 100644 node_modules/core-js/es7/set.js create mode 100644 node_modules/core-js/es7/string.js create mode 100644 node_modules/core-js/es7/symbol.js create mode 100644 node_modules/core-js/es7/system.js create mode 100644 node_modules/core-js/es7/weak-map.js create mode 100644 node_modules/core-js/es7/weak-set.js create mode 100644 node_modules/core-js/fn/_.js create mode 100644 node_modules/core-js/fn/array/concat.js create mode 100644 node_modules/core-js/fn/array/copy-within.js create mode 100644 node_modules/core-js/fn/array/entries.js create mode 100644 node_modules/core-js/fn/array/every.js create mode 100644 node_modules/core-js/fn/array/fill.js create mode 100644 node_modules/core-js/fn/array/filter.js create mode 100644 node_modules/core-js/fn/array/find-index.js create mode 100644 node_modules/core-js/fn/array/find.js create mode 100644 node_modules/core-js/fn/array/flat-map.js create mode 100644 node_modules/core-js/fn/array/flatten.js create mode 100644 node_modules/core-js/fn/array/for-each.js create mode 100644 node_modules/core-js/fn/array/from.js create mode 100644 node_modules/core-js/fn/array/includes.js create mode 100644 node_modules/core-js/fn/array/index-of.js create mode 100644 node_modules/core-js/fn/array/index.js create mode 100644 node_modules/core-js/fn/array/is-array.js create mode 100644 node_modules/core-js/fn/array/iterator.js create mode 100644 node_modules/core-js/fn/array/join.js create mode 100644 node_modules/core-js/fn/array/keys.js create mode 100644 node_modules/core-js/fn/array/last-index-of.js create mode 100644 node_modules/core-js/fn/array/map.js create mode 100644 node_modules/core-js/fn/array/of.js create mode 100644 node_modules/core-js/fn/array/pop.js create mode 100644 node_modules/core-js/fn/array/push.js create mode 100644 node_modules/core-js/fn/array/reduce-right.js create mode 100644 node_modules/core-js/fn/array/reduce.js create mode 100644 node_modules/core-js/fn/array/reverse.js create mode 100644 node_modules/core-js/fn/array/shift.js create mode 100644 node_modules/core-js/fn/array/slice.js create mode 100644 node_modules/core-js/fn/array/some.js create mode 100644 node_modules/core-js/fn/array/sort.js create mode 100644 node_modules/core-js/fn/array/splice.js create mode 100644 node_modules/core-js/fn/array/unshift.js create mode 100644 node_modules/core-js/fn/array/values.js create mode 100644 node_modules/core-js/fn/array/virtual/copy-within.js create mode 100644 node_modules/core-js/fn/array/virtual/entries.js create mode 100644 node_modules/core-js/fn/array/virtual/every.js create mode 100644 node_modules/core-js/fn/array/virtual/fill.js create mode 100644 node_modules/core-js/fn/array/virtual/filter.js create mode 100644 node_modules/core-js/fn/array/virtual/find-index.js create mode 100644 node_modules/core-js/fn/array/virtual/find.js create mode 100644 node_modules/core-js/fn/array/virtual/flat-map.js create mode 100644 node_modules/core-js/fn/array/virtual/flatten.js create mode 100644 node_modules/core-js/fn/array/virtual/for-each.js create mode 100644 node_modules/core-js/fn/array/virtual/includes.js create mode 100644 node_modules/core-js/fn/array/virtual/index-of.js create mode 100644 node_modules/core-js/fn/array/virtual/index.js create mode 100644 node_modules/core-js/fn/array/virtual/iterator.js create mode 100644 node_modules/core-js/fn/array/virtual/join.js create mode 100644 node_modules/core-js/fn/array/virtual/keys.js create mode 100644 node_modules/core-js/fn/array/virtual/last-index-of.js create mode 100644 node_modules/core-js/fn/array/virtual/map.js create mode 100644 node_modules/core-js/fn/array/virtual/reduce-right.js create mode 100644 node_modules/core-js/fn/array/virtual/reduce.js create mode 100644 node_modules/core-js/fn/array/virtual/slice.js create mode 100644 node_modules/core-js/fn/array/virtual/some.js create mode 100644 node_modules/core-js/fn/array/virtual/sort.js create mode 100644 node_modules/core-js/fn/array/virtual/values.js create mode 100644 node_modules/core-js/fn/asap.js create mode 100644 node_modules/core-js/fn/clear-immediate.js create mode 100644 node_modules/core-js/fn/date/index.js create mode 100644 node_modules/core-js/fn/date/now.js create mode 100644 node_modules/core-js/fn/date/to-iso-string.js create mode 100644 node_modules/core-js/fn/date/to-json.js create mode 100644 node_modules/core-js/fn/date/to-primitive.js create mode 100644 node_modules/core-js/fn/date/to-string.js create mode 100644 node_modules/core-js/fn/delay.js create mode 100644 node_modules/core-js/fn/dict.js create mode 100644 node_modules/core-js/fn/dom-collections/index.js create mode 100644 node_modules/core-js/fn/dom-collections/iterator.js create mode 100644 node_modules/core-js/fn/error/index.js create mode 100644 node_modules/core-js/fn/error/is-error.js create mode 100644 node_modules/core-js/fn/function/bind.js create mode 100644 node_modules/core-js/fn/function/has-instance.js create mode 100644 node_modules/core-js/fn/function/index.js create mode 100644 node_modules/core-js/fn/function/name.js create mode 100644 node_modules/core-js/fn/function/part.js create mode 100644 node_modules/core-js/fn/function/virtual/bind.js create mode 100644 node_modules/core-js/fn/function/virtual/index.js create mode 100644 node_modules/core-js/fn/function/virtual/part.js create mode 100644 node_modules/core-js/fn/get-iterator-method.js create mode 100644 node_modules/core-js/fn/get-iterator.js create mode 100644 node_modules/core-js/fn/global.js create mode 100644 node_modules/core-js/fn/is-iterable.js create mode 100644 node_modules/core-js/fn/json/index.js create mode 100644 node_modules/core-js/fn/json/stringify.js create mode 100644 node_modules/core-js/fn/map.js create mode 100644 node_modules/core-js/fn/map/from.js create mode 100644 node_modules/core-js/fn/map/index.js create mode 100644 node_modules/core-js/fn/map/of.js create mode 100644 node_modules/core-js/fn/math/acosh.js create mode 100644 node_modules/core-js/fn/math/asinh.js create mode 100644 node_modules/core-js/fn/math/atanh.js create mode 100644 node_modules/core-js/fn/math/cbrt.js create mode 100644 node_modules/core-js/fn/math/clamp.js create mode 100644 node_modules/core-js/fn/math/clz32.js create mode 100644 node_modules/core-js/fn/math/cosh.js create mode 100644 node_modules/core-js/fn/math/deg-per-rad.js create mode 100644 node_modules/core-js/fn/math/degrees.js create mode 100644 node_modules/core-js/fn/math/expm1.js create mode 100644 node_modules/core-js/fn/math/fround.js create mode 100644 node_modules/core-js/fn/math/fscale.js create mode 100644 node_modules/core-js/fn/math/hypot.js create mode 100644 node_modules/core-js/fn/math/iaddh.js create mode 100644 node_modules/core-js/fn/math/imul.js create mode 100644 node_modules/core-js/fn/math/imulh.js create mode 100644 node_modules/core-js/fn/math/index.js create mode 100644 node_modules/core-js/fn/math/isubh.js create mode 100644 node_modules/core-js/fn/math/log10.js create mode 100644 node_modules/core-js/fn/math/log1p.js create mode 100644 node_modules/core-js/fn/math/log2.js create mode 100644 node_modules/core-js/fn/math/rad-per-deg.js create mode 100644 node_modules/core-js/fn/math/radians.js create mode 100644 node_modules/core-js/fn/math/scale.js create mode 100644 node_modules/core-js/fn/math/sign.js create mode 100644 node_modules/core-js/fn/math/signbit.js create mode 100644 node_modules/core-js/fn/math/sinh.js create mode 100644 node_modules/core-js/fn/math/tanh.js create mode 100644 node_modules/core-js/fn/math/trunc.js create mode 100644 node_modules/core-js/fn/math/umulh.js create mode 100644 node_modules/core-js/fn/number/constructor.js create mode 100644 node_modules/core-js/fn/number/epsilon.js create mode 100644 node_modules/core-js/fn/number/index.js create mode 100644 node_modules/core-js/fn/number/is-finite.js create mode 100644 node_modules/core-js/fn/number/is-integer.js create mode 100644 node_modules/core-js/fn/number/is-nan.js create mode 100644 node_modules/core-js/fn/number/is-safe-integer.js create mode 100644 node_modules/core-js/fn/number/iterator.js create mode 100644 node_modules/core-js/fn/number/max-safe-integer.js create mode 100644 node_modules/core-js/fn/number/min-safe-integer.js create mode 100644 node_modules/core-js/fn/number/parse-float.js create mode 100644 node_modules/core-js/fn/number/parse-int.js create mode 100644 node_modules/core-js/fn/number/to-fixed.js create mode 100644 node_modules/core-js/fn/number/to-precision.js create mode 100644 node_modules/core-js/fn/number/virtual/index.js create mode 100644 node_modules/core-js/fn/number/virtual/iterator.js create mode 100644 node_modules/core-js/fn/number/virtual/to-fixed.js create mode 100644 node_modules/core-js/fn/number/virtual/to-precision.js create mode 100644 node_modules/core-js/fn/object/assign.js create mode 100644 node_modules/core-js/fn/object/classof.js create mode 100644 node_modules/core-js/fn/object/create.js create mode 100644 node_modules/core-js/fn/object/define-getter.js create mode 100644 node_modules/core-js/fn/object/define-properties.js create mode 100644 node_modules/core-js/fn/object/define-property.js create mode 100644 node_modules/core-js/fn/object/define-setter.js create mode 100644 node_modules/core-js/fn/object/define.js create mode 100644 node_modules/core-js/fn/object/entries.js create mode 100644 node_modules/core-js/fn/object/freeze.js create mode 100644 node_modules/core-js/fn/object/get-own-property-descriptor.js create mode 100644 node_modules/core-js/fn/object/get-own-property-descriptors.js create mode 100644 node_modules/core-js/fn/object/get-own-property-names.js create mode 100644 node_modules/core-js/fn/object/get-own-property-symbols.js create mode 100644 node_modules/core-js/fn/object/get-prototype-of.js create mode 100644 node_modules/core-js/fn/object/index.js create mode 100644 node_modules/core-js/fn/object/is-extensible.js create mode 100644 node_modules/core-js/fn/object/is-frozen.js create mode 100644 node_modules/core-js/fn/object/is-object.js create mode 100644 node_modules/core-js/fn/object/is-sealed.js create mode 100644 node_modules/core-js/fn/object/is.js create mode 100644 node_modules/core-js/fn/object/keys.js create mode 100644 node_modules/core-js/fn/object/lookup-getter.js create mode 100644 node_modules/core-js/fn/object/lookup-setter.js create mode 100644 node_modules/core-js/fn/object/make.js create mode 100644 node_modules/core-js/fn/object/prevent-extensions.js create mode 100644 node_modules/core-js/fn/object/seal.js create mode 100644 node_modules/core-js/fn/object/set-prototype-of.js create mode 100644 node_modules/core-js/fn/object/values.js create mode 100644 node_modules/core-js/fn/observable.js create mode 100644 node_modules/core-js/fn/parse-float.js create mode 100644 node_modules/core-js/fn/parse-int.js create mode 100644 node_modules/core-js/fn/promise.js create mode 100644 node_modules/core-js/fn/promise/finally.js create mode 100644 node_modules/core-js/fn/promise/index.js create mode 100644 node_modules/core-js/fn/promise/try.js create mode 100644 node_modules/core-js/fn/reflect/apply.js create mode 100644 node_modules/core-js/fn/reflect/construct.js create mode 100644 node_modules/core-js/fn/reflect/define-metadata.js create mode 100644 node_modules/core-js/fn/reflect/define-property.js create mode 100644 node_modules/core-js/fn/reflect/delete-metadata.js create mode 100644 node_modules/core-js/fn/reflect/delete-property.js create mode 100644 node_modules/core-js/fn/reflect/enumerate.js create mode 100644 node_modules/core-js/fn/reflect/get-metadata-keys.js create mode 100644 node_modules/core-js/fn/reflect/get-metadata.js create mode 100644 node_modules/core-js/fn/reflect/get-own-metadata-keys.js create mode 100644 node_modules/core-js/fn/reflect/get-own-metadata.js create mode 100644 node_modules/core-js/fn/reflect/get-own-property-descriptor.js create mode 100644 node_modules/core-js/fn/reflect/get-prototype-of.js create mode 100644 node_modules/core-js/fn/reflect/get.js create mode 100644 node_modules/core-js/fn/reflect/has-metadata.js create mode 100644 node_modules/core-js/fn/reflect/has-own-metadata.js create mode 100644 node_modules/core-js/fn/reflect/has.js create mode 100644 node_modules/core-js/fn/reflect/index.js create mode 100644 node_modules/core-js/fn/reflect/is-extensible.js create mode 100644 node_modules/core-js/fn/reflect/metadata.js create mode 100644 node_modules/core-js/fn/reflect/own-keys.js create mode 100644 node_modules/core-js/fn/reflect/prevent-extensions.js create mode 100644 node_modules/core-js/fn/reflect/set-prototype-of.js create mode 100644 node_modules/core-js/fn/reflect/set.js create mode 100644 node_modules/core-js/fn/regexp/constructor.js create mode 100644 node_modules/core-js/fn/regexp/escape.js create mode 100644 node_modules/core-js/fn/regexp/flags.js create mode 100644 node_modules/core-js/fn/regexp/index.js create mode 100644 node_modules/core-js/fn/regexp/match.js create mode 100644 node_modules/core-js/fn/regexp/replace.js create mode 100644 node_modules/core-js/fn/regexp/search.js create mode 100644 node_modules/core-js/fn/regexp/split.js create mode 100644 node_modules/core-js/fn/regexp/to-string.js create mode 100644 node_modules/core-js/fn/set-immediate.js create mode 100644 node_modules/core-js/fn/set-interval.js create mode 100644 node_modules/core-js/fn/set-timeout.js create mode 100644 node_modules/core-js/fn/set.js create mode 100644 node_modules/core-js/fn/set/from.js create mode 100644 node_modules/core-js/fn/set/index.js create mode 100644 node_modules/core-js/fn/set/of.js create mode 100644 node_modules/core-js/fn/string/anchor.js create mode 100644 node_modules/core-js/fn/string/at.js create mode 100644 node_modules/core-js/fn/string/big.js create mode 100644 node_modules/core-js/fn/string/blink.js create mode 100644 node_modules/core-js/fn/string/bold.js create mode 100644 node_modules/core-js/fn/string/code-point-at.js create mode 100644 node_modules/core-js/fn/string/ends-with.js create mode 100644 node_modules/core-js/fn/string/escape-html.js create mode 100644 node_modules/core-js/fn/string/fixed.js create mode 100644 node_modules/core-js/fn/string/fontcolor.js create mode 100644 node_modules/core-js/fn/string/fontsize.js create mode 100644 node_modules/core-js/fn/string/from-code-point.js create mode 100644 node_modules/core-js/fn/string/includes.js create mode 100644 node_modules/core-js/fn/string/index.js create mode 100644 node_modules/core-js/fn/string/italics.js create mode 100644 node_modules/core-js/fn/string/iterator.js create mode 100644 node_modules/core-js/fn/string/link.js create mode 100644 node_modules/core-js/fn/string/match-all.js create mode 100644 node_modules/core-js/fn/string/pad-end.js create mode 100644 node_modules/core-js/fn/string/pad-start.js create mode 100644 node_modules/core-js/fn/string/raw.js create mode 100644 node_modules/core-js/fn/string/repeat.js create mode 100644 node_modules/core-js/fn/string/small.js create mode 100644 node_modules/core-js/fn/string/starts-with.js create mode 100644 node_modules/core-js/fn/string/strike.js create mode 100644 node_modules/core-js/fn/string/sub.js create mode 100644 node_modules/core-js/fn/string/sup.js create mode 100644 node_modules/core-js/fn/string/trim-end.js create mode 100644 node_modules/core-js/fn/string/trim-left.js create mode 100644 node_modules/core-js/fn/string/trim-right.js create mode 100644 node_modules/core-js/fn/string/trim-start.js create mode 100644 node_modules/core-js/fn/string/trim.js create mode 100644 node_modules/core-js/fn/string/unescape-html.js create mode 100644 node_modules/core-js/fn/string/virtual/anchor.js create mode 100644 node_modules/core-js/fn/string/virtual/at.js create mode 100644 node_modules/core-js/fn/string/virtual/big.js create mode 100644 node_modules/core-js/fn/string/virtual/blink.js create mode 100644 node_modules/core-js/fn/string/virtual/bold.js create mode 100644 node_modules/core-js/fn/string/virtual/code-point-at.js create mode 100644 node_modules/core-js/fn/string/virtual/ends-with.js create mode 100644 node_modules/core-js/fn/string/virtual/escape-html.js create mode 100644 node_modules/core-js/fn/string/virtual/fixed.js create mode 100644 node_modules/core-js/fn/string/virtual/fontcolor.js create mode 100644 node_modules/core-js/fn/string/virtual/fontsize.js create mode 100644 node_modules/core-js/fn/string/virtual/includes.js create mode 100644 node_modules/core-js/fn/string/virtual/index.js create mode 100644 node_modules/core-js/fn/string/virtual/italics.js create mode 100644 node_modules/core-js/fn/string/virtual/iterator.js create mode 100644 node_modules/core-js/fn/string/virtual/link.js create mode 100644 node_modules/core-js/fn/string/virtual/match-all.js create mode 100644 node_modules/core-js/fn/string/virtual/pad-end.js create mode 100644 node_modules/core-js/fn/string/virtual/pad-start.js create mode 100644 node_modules/core-js/fn/string/virtual/repeat.js create mode 100644 node_modules/core-js/fn/string/virtual/small.js create mode 100644 node_modules/core-js/fn/string/virtual/starts-with.js create mode 100644 node_modules/core-js/fn/string/virtual/strike.js create mode 100644 node_modules/core-js/fn/string/virtual/sub.js create mode 100644 node_modules/core-js/fn/string/virtual/sup.js create mode 100644 node_modules/core-js/fn/string/virtual/trim-end.js create mode 100644 node_modules/core-js/fn/string/virtual/trim-left.js create mode 100644 node_modules/core-js/fn/string/virtual/trim-right.js create mode 100644 node_modules/core-js/fn/string/virtual/trim-start.js create mode 100644 node_modules/core-js/fn/string/virtual/trim.js create mode 100644 node_modules/core-js/fn/string/virtual/unescape-html.js create mode 100644 node_modules/core-js/fn/symbol/async-iterator.js create mode 100644 node_modules/core-js/fn/symbol/for.js create mode 100644 node_modules/core-js/fn/symbol/has-instance.js create mode 100644 node_modules/core-js/fn/symbol/index.js create mode 100644 node_modules/core-js/fn/symbol/is-concat-spreadable.js create mode 100644 node_modules/core-js/fn/symbol/iterator.js create mode 100644 node_modules/core-js/fn/symbol/key-for.js create mode 100644 node_modules/core-js/fn/symbol/match.js create mode 100644 node_modules/core-js/fn/symbol/observable.js create mode 100644 node_modules/core-js/fn/symbol/replace.js create mode 100644 node_modules/core-js/fn/symbol/search.js create mode 100644 node_modules/core-js/fn/symbol/species.js create mode 100644 node_modules/core-js/fn/symbol/split.js create mode 100644 node_modules/core-js/fn/symbol/to-primitive.js create mode 100644 node_modules/core-js/fn/symbol/to-string-tag.js create mode 100644 node_modules/core-js/fn/symbol/unscopables.js create mode 100644 node_modules/core-js/fn/system/global.js create mode 100644 node_modules/core-js/fn/system/index.js create mode 100644 node_modules/core-js/fn/typed/array-buffer.js create mode 100644 node_modules/core-js/fn/typed/data-view.js create mode 100644 node_modules/core-js/fn/typed/float32-array.js create mode 100644 node_modules/core-js/fn/typed/float64-array.js create mode 100644 node_modules/core-js/fn/typed/index.js create mode 100644 node_modules/core-js/fn/typed/int16-array.js create mode 100644 node_modules/core-js/fn/typed/int32-array.js create mode 100644 node_modules/core-js/fn/typed/int8-array.js create mode 100644 node_modules/core-js/fn/typed/uint16-array.js create mode 100644 node_modules/core-js/fn/typed/uint32-array.js create mode 100644 node_modules/core-js/fn/typed/uint8-array.js create mode 100644 node_modules/core-js/fn/typed/uint8-clamped-array.js create mode 100644 node_modules/core-js/fn/weak-map.js create mode 100644 node_modules/core-js/fn/weak-map/from.js create mode 100644 node_modules/core-js/fn/weak-map/index.js create mode 100644 node_modules/core-js/fn/weak-map/of.js create mode 100644 node_modules/core-js/fn/weak-set.js create mode 100644 node_modules/core-js/fn/weak-set/from.js create mode 100644 node_modules/core-js/fn/weak-set/index.js create mode 100644 node_modules/core-js/fn/weak-set/of.js create mode 100644 node_modules/core-js/index.js create mode 100644 node_modules/core-js/library/core/_.js create mode 100644 node_modules/core-js/library/core/delay.js create mode 100644 node_modules/core-js/library/core/dict.js create mode 100644 node_modules/core-js/library/core/function.js create mode 100644 node_modules/core-js/library/core/index.js create mode 100644 node_modules/core-js/library/core/number.js create mode 100644 node_modules/core-js/library/core/object.js create mode 100644 node_modules/core-js/library/core/regexp.js create mode 100644 node_modules/core-js/library/core/string.js create mode 100644 node_modules/core-js/library/es5/index.js create mode 100644 node_modules/core-js/library/es6/array.js create mode 100644 node_modules/core-js/library/es6/date.js create mode 100644 node_modules/core-js/library/es6/function.js create mode 100644 node_modules/core-js/library/es6/index.js create mode 100644 node_modules/core-js/library/es6/map.js create mode 100644 node_modules/core-js/library/es6/math.js create mode 100644 node_modules/core-js/library/es6/number.js create mode 100644 node_modules/core-js/library/es6/object.js create mode 100644 node_modules/core-js/library/es6/parse-float.js create mode 100644 node_modules/core-js/library/es6/parse-int.js create mode 100644 node_modules/core-js/library/es6/promise.js create mode 100644 node_modules/core-js/library/es6/reflect.js create mode 100644 node_modules/core-js/library/es6/regexp.js create mode 100644 node_modules/core-js/library/es6/set.js create mode 100644 node_modules/core-js/library/es6/string.js create mode 100644 node_modules/core-js/library/es6/symbol.js create mode 100644 node_modules/core-js/library/es6/typed.js create mode 100644 node_modules/core-js/library/es6/weak-map.js create mode 100644 node_modules/core-js/library/es6/weak-set.js create mode 100644 node_modules/core-js/library/es7/array.js create mode 100644 node_modules/core-js/library/es7/asap.js create mode 100644 node_modules/core-js/library/es7/error.js create mode 100644 node_modules/core-js/library/es7/global.js create mode 100644 node_modules/core-js/library/es7/index.js create mode 100644 node_modules/core-js/library/es7/map.js create mode 100644 node_modules/core-js/library/es7/math.js create mode 100644 node_modules/core-js/library/es7/object.js create mode 100644 node_modules/core-js/library/es7/observable.js create mode 100644 node_modules/core-js/library/es7/promise.js create mode 100644 node_modules/core-js/library/es7/reflect.js create mode 100644 node_modules/core-js/library/es7/set.js create mode 100644 node_modules/core-js/library/es7/string.js create mode 100644 node_modules/core-js/library/es7/symbol.js create mode 100644 node_modules/core-js/library/es7/system.js create mode 100644 node_modules/core-js/library/es7/weak-map.js create mode 100644 node_modules/core-js/library/es7/weak-set.js create mode 100644 node_modules/core-js/library/fn/_.js create mode 100644 node_modules/core-js/library/fn/array/concat.js create mode 100644 node_modules/core-js/library/fn/array/copy-within.js create mode 100644 node_modules/core-js/library/fn/array/entries.js create mode 100644 node_modules/core-js/library/fn/array/every.js create mode 100644 node_modules/core-js/library/fn/array/fill.js create mode 100644 node_modules/core-js/library/fn/array/filter.js create mode 100644 node_modules/core-js/library/fn/array/find-index.js create mode 100644 node_modules/core-js/library/fn/array/find.js create mode 100644 node_modules/core-js/library/fn/array/flat-map.js create mode 100644 node_modules/core-js/library/fn/array/flatten.js create mode 100644 node_modules/core-js/library/fn/array/for-each.js create mode 100644 node_modules/core-js/library/fn/array/from.js create mode 100644 node_modules/core-js/library/fn/array/includes.js create mode 100644 node_modules/core-js/library/fn/array/index-of.js create mode 100644 node_modules/core-js/library/fn/array/index.js create mode 100644 node_modules/core-js/library/fn/array/is-array.js create mode 100644 node_modules/core-js/library/fn/array/iterator.js create mode 100644 node_modules/core-js/library/fn/array/join.js create mode 100644 node_modules/core-js/library/fn/array/keys.js create mode 100644 node_modules/core-js/library/fn/array/last-index-of.js create mode 100644 node_modules/core-js/library/fn/array/map.js create mode 100644 node_modules/core-js/library/fn/array/of.js create mode 100644 node_modules/core-js/library/fn/array/pop.js create mode 100644 node_modules/core-js/library/fn/array/push.js create mode 100644 node_modules/core-js/library/fn/array/reduce-right.js create mode 100644 node_modules/core-js/library/fn/array/reduce.js create mode 100644 node_modules/core-js/library/fn/array/reverse.js create mode 100644 node_modules/core-js/library/fn/array/shift.js create mode 100644 node_modules/core-js/library/fn/array/slice.js create mode 100644 node_modules/core-js/library/fn/array/some.js create mode 100644 node_modules/core-js/library/fn/array/sort.js create mode 100644 node_modules/core-js/library/fn/array/splice.js create mode 100644 node_modules/core-js/library/fn/array/unshift.js create mode 100644 node_modules/core-js/library/fn/array/values.js create mode 100644 node_modules/core-js/library/fn/array/virtual/copy-within.js create mode 100644 node_modules/core-js/library/fn/array/virtual/entries.js create mode 100644 node_modules/core-js/library/fn/array/virtual/every.js create mode 100644 node_modules/core-js/library/fn/array/virtual/fill.js create mode 100644 node_modules/core-js/library/fn/array/virtual/filter.js create mode 100644 node_modules/core-js/library/fn/array/virtual/find-index.js create mode 100644 node_modules/core-js/library/fn/array/virtual/find.js create mode 100644 node_modules/core-js/library/fn/array/virtual/flat-map.js create mode 100644 node_modules/core-js/library/fn/array/virtual/flatten.js create mode 100644 node_modules/core-js/library/fn/array/virtual/for-each.js create mode 100644 node_modules/core-js/library/fn/array/virtual/includes.js create mode 100644 node_modules/core-js/library/fn/array/virtual/index-of.js create mode 100644 node_modules/core-js/library/fn/array/virtual/index.js create mode 100644 node_modules/core-js/library/fn/array/virtual/iterator.js create mode 100644 node_modules/core-js/library/fn/array/virtual/join.js create mode 100644 node_modules/core-js/library/fn/array/virtual/keys.js create mode 100644 node_modules/core-js/library/fn/array/virtual/last-index-of.js create mode 100644 node_modules/core-js/library/fn/array/virtual/map.js create mode 100644 node_modules/core-js/library/fn/array/virtual/reduce-right.js create mode 100644 node_modules/core-js/library/fn/array/virtual/reduce.js create mode 100644 node_modules/core-js/library/fn/array/virtual/slice.js create mode 100644 node_modules/core-js/library/fn/array/virtual/some.js create mode 100644 node_modules/core-js/library/fn/array/virtual/sort.js create mode 100644 node_modules/core-js/library/fn/array/virtual/values.js create mode 100644 node_modules/core-js/library/fn/asap.js create mode 100644 node_modules/core-js/library/fn/clear-immediate.js create mode 100644 node_modules/core-js/library/fn/date/index.js create mode 100644 node_modules/core-js/library/fn/date/now.js create mode 100644 node_modules/core-js/library/fn/date/to-iso-string.js create mode 100644 node_modules/core-js/library/fn/date/to-json.js create mode 100644 node_modules/core-js/library/fn/date/to-primitive.js create mode 100644 node_modules/core-js/library/fn/date/to-string.js create mode 100644 node_modules/core-js/library/fn/delay.js create mode 100644 node_modules/core-js/library/fn/dict.js create mode 100644 node_modules/core-js/library/fn/dom-collections/index.js create mode 100644 node_modules/core-js/library/fn/dom-collections/iterator.js create mode 100644 node_modules/core-js/library/fn/error/index.js create mode 100644 node_modules/core-js/library/fn/error/is-error.js create mode 100644 node_modules/core-js/library/fn/function/bind.js create mode 100644 node_modules/core-js/library/fn/function/has-instance.js create mode 100644 node_modules/core-js/library/fn/function/index.js create mode 100644 node_modules/core-js/library/fn/function/name.js create mode 100644 node_modules/core-js/library/fn/function/part.js create mode 100644 node_modules/core-js/library/fn/function/virtual/bind.js create mode 100644 node_modules/core-js/library/fn/function/virtual/index.js create mode 100644 node_modules/core-js/library/fn/function/virtual/part.js create mode 100644 node_modules/core-js/library/fn/get-iterator-method.js create mode 100644 node_modules/core-js/library/fn/get-iterator.js create mode 100644 node_modules/core-js/library/fn/global.js create mode 100644 node_modules/core-js/library/fn/is-iterable.js create mode 100644 node_modules/core-js/library/fn/json/index.js create mode 100644 node_modules/core-js/library/fn/json/stringify.js create mode 100644 node_modules/core-js/library/fn/map.js create mode 100644 node_modules/core-js/library/fn/map/from.js create mode 100644 node_modules/core-js/library/fn/map/index.js create mode 100644 node_modules/core-js/library/fn/map/of.js create mode 100644 node_modules/core-js/library/fn/math/acosh.js create mode 100644 node_modules/core-js/library/fn/math/asinh.js create mode 100644 node_modules/core-js/library/fn/math/atanh.js create mode 100644 node_modules/core-js/library/fn/math/cbrt.js create mode 100644 node_modules/core-js/library/fn/math/clamp.js create mode 100644 node_modules/core-js/library/fn/math/clz32.js create mode 100644 node_modules/core-js/library/fn/math/cosh.js create mode 100644 node_modules/core-js/library/fn/math/deg-per-rad.js create mode 100644 node_modules/core-js/library/fn/math/degrees.js create mode 100644 node_modules/core-js/library/fn/math/expm1.js create mode 100644 node_modules/core-js/library/fn/math/fround.js create mode 100644 node_modules/core-js/library/fn/math/fscale.js create mode 100644 node_modules/core-js/library/fn/math/hypot.js create mode 100644 node_modules/core-js/library/fn/math/iaddh.js create mode 100644 node_modules/core-js/library/fn/math/imul.js create mode 100644 node_modules/core-js/library/fn/math/imulh.js create mode 100644 node_modules/core-js/library/fn/math/index.js create mode 100644 node_modules/core-js/library/fn/math/isubh.js create mode 100644 node_modules/core-js/library/fn/math/log10.js create mode 100644 node_modules/core-js/library/fn/math/log1p.js create mode 100644 node_modules/core-js/library/fn/math/log2.js create mode 100644 node_modules/core-js/library/fn/math/rad-per-deg.js create mode 100644 node_modules/core-js/library/fn/math/radians.js create mode 100644 node_modules/core-js/library/fn/math/scale.js create mode 100644 node_modules/core-js/library/fn/math/sign.js create mode 100644 node_modules/core-js/library/fn/math/signbit.js create mode 100644 node_modules/core-js/library/fn/math/sinh.js create mode 100644 node_modules/core-js/library/fn/math/tanh.js create mode 100644 node_modules/core-js/library/fn/math/trunc.js create mode 100644 node_modules/core-js/library/fn/math/umulh.js create mode 100644 node_modules/core-js/library/fn/number/constructor.js create mode 100644 node_modules/core-js/library/fn/number/epsilon.js create mode 100644 node_modules/core-js/library/fn/number/index.js create mode 100644 node_modules/core-js/library/fn/number/is-finite.js create mode 100644 node_modules/core-js/library/fn/number/is-integer.js create mode 100644 node_modules/core-js/library/fn/number/is-nan.js create mode 100644 node_modules/core-js/library/fn/number/is-safe-integer.js create mode 100644 node_modules/core-js/library/fn/number/iterator.js create mode 100644 node_modules/core-js/library/fn/number/max-safe-integer.js create mode 100644 node_modules/core-js/library/fn/number/min-safe-integer.js create mode 100644 node_modules/core-js/library/fn/number/parse-float.js create mode 100644 node_modules/core-js/library/fn/number/parse-int.js create mode 100644 node_modules/core-js/library/fn/number/to-fixed.js create mode 100644 node_modules/core-js/library/fn/number/to-precision.js create mode 100644 node_modules/core-js/library/fn/number/virtual/index.js create mode 100644 node_modules/core-js/library/fn/number/virtual/iterator.js create mode 100644 node_modules/core-js/library/fn/number/virtual/to-fixed.js create mode 100644 node_modules/core-js/library/fn/number/virtual/to-precision.js create mode 100644 node_modules/core-js/library/fn/object/assign.js create mode 100644 node_modules/core-js/library/fn/object/classof.js create mode 100644 node_modules/core-js/library/fn/object/create.js create mode 100644 node_modules/core-js/library/fn/object/define-getter.js create mode 100644 node_modules/core-js/library/fn/object/define-properties.js create mode 100644 node_modules/core-js/library/fn/object/define-property.js create mode 100644 node_modules/core-js/library/fn/object/define-setter.js create mode 100644 node_modules/core-js/library/fn/object/define.js create mode 100644 node_modules/core-js/library/fn/object/entries.js create mode 100644 node_modules/core-js/library/fn/object/freeze.js create mode 100644 node_modules/core-js/library/fn/object/get-own-property-descriptor.js create mode 100644 node_modules/core-js/library/fn/object/get-own-property-descriptors.js create mode 100644 node_modules/core-js/library/fn/object/get-own-property-names.js create mode 100644 node_modules/core-js/library/fn/object/get-own-property-symbols.js create mode 100644 node_modules/core-js/library/fn/object/get-prototype-of.js create mode 100644 node_modules/core-js/library/fn/object/index.js create mode 100644 node_modules/core-js/library/fn/object/is-extensible.js create mode 100644 node_modules/core-js/library/fn/object/is-frozen.js create mode 100644 node_modules/core-js/library/fn/object/is-object.js create mode 100644 node_modules/core-js/library/fn/object/is-sealed.js create mode 100644 node_modules/core-js/library/fn/object/is.js create mode 100644 node_modules/core-js/library/fn/object/keys.js create mode 100644 node_modules/core-js/library/fn/object/lookup-getter.js create mode 100644 node_modules/core-js/library/fn/object/lookup-setter.js create mode 100644 node_modules/core-js/library/fn/object/make.js create mode 100644 node_modules/core-js/library/fn/object/prevent-extensions.js create mode 100644 node_modules/core-js/library/fn/object/seal.js create mode 100644 node_modules/core-js/library/fn/object/set-prototype-of.js create mode 100644 node_modules/core-js/library/fn/object/values.js create mode 100644 node_modules/core-js/library/fn/observable.js create mode 100644 node_modules/core-js/library/fn/parse-float.js create mode 100644 node_modules/core-js/library/fn/parse-int.js create mode 100644 node_modules/core-js/library/fn/promise.js create mode 100644 node_modules/core-js/library/fn/promise/finally.js create mode 100644 node_modules/core-js/library/fn/promise/index.js create mode 100644 node_modules/core-js/library/fn/promise/try.js create mode 100644 node_modules/core-js/library/fn/reflect/apply.js create mode 100644 node_modules/core-js/library/fn/reflect/construct.js create mode 100644 node_modules/core-js/library/fn/reflect/define-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/define-property.js create mode 100644 node_modules/core-js/library/fn/reflect/delete-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/delete-property.js create mode 100644 node_modules/core-js/library/fn/reflect/enumerate.js create mode 100644 node_modules/core-js/library/fn/reflect/get-metadata-keys.js create mode 100644 node_modules/core-js/library/fn/reflect/get-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js create mode 100644 node_modules/core-js/library/fn/reflect/get-own-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js create mode 100644 node_modules/core-js/library/fn/reflect/get-prototype-of.js create mode 100644 node_modules/core-js/library/fn/reflect/get.js create mode 100644 node_modules/core-js/library/fn/reflect/has-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/has-own-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/has.js create mode 100644 node_modules/core-js/library/fn/reflect/index.js create mode 100644 node_modules/core-js/library/fn/reflect/is-extensible.js create mode 100644 node_modules/core-js/library/fn/reflect/metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/own-keys.js create mode 100644 node_modules/core-js/library/fn/reflect/prevent-extensions.js create mode 100644 node_modules/core-js/library/fn/reflect/set-prototype-of.js create mode 100644 node_modules/core-js/library/fn/reflect/set.js create mode 100644 node_modules/core-js/library/fn/regexp/constructor.js create mode 100644 node_modules/core-js/library/fn/regexp/escape.js create mode 100644 node_modules/core-js/library/fn/regexp/flags.js create mode 100644 node_modules/core-js/library/fn/regexp/index.js create mode 100644 node_modules/core-js/library/fn/regexp/match.js create mode 100644 node_modules/core-js/library/fn/regexp/replace.js create mode 100644 node_modules/core-js/library/fn/regexp/search.js create mode 100644 node_modules/core-js/library/fn/regexp/split.js create mode 100644 node_modules/core-js/library/fn/regexp/to-string.js create mode 100644 node_modules/core-js/library/fn/set-immediate.js create mode 100644 node_modules/core-js/library/fn/set-interval.js create mode 100644 node_modules/core-js/library/fn/set-timeout.js create mode 100644 node_modules/core-js/library/fn/set.js create mode 100644 node_modules/core-js/library/fn/set/from.js create mode 100644 node_modules/core-js/library/fn/set/index.js create mode 100644 node_modules/core-js/library/fn/set/of.js create mode 100644 node_modules/core-js/library/fn/string/anchor.js create mode 100644 node_modules/core-js/library/fn/string/at.js create mode 100644 node_modules/core-js/library/fn/string/big.js create mode 100644 node_modules/core-js/library/fn/string/blink.js create mode 100644 node_modules/core-js/library/fn/string/bold.js create mode 100644 node_modules/core-js/library/fn/string/code-point-at.js create mode 100644 node_modules/core-js/library/fn/string/ends-with.js create mode 100644 node_modules/core-js/library/fn/string/escape-html.js create mode 100644 node_modules/core-js/library/fn/string/fixed.js create mode 100644 node_modules/core-js/library/fn/string/fontcolor.js create mode 100644 node_modules/core-js/library/fn/string/fontsize.js create mode 100644 node_modules/core-js/library/fn/string/from-code-point.js create mode 100644 node_modules/core-js/library/fn/string/includes.js create mode 100644 node_modules/core-js/library/fn/string/index.js create mode 100644 node_modules/core-js/library/fn/string/italics.js create mode 100644 node_modules/core-js/library/fn/string/iterator.js create mode 100644 node_modules/core-js/library/fn/string/link.js create mode 100644 node_modules/core-js/library/fn/string/match-all.js create mode 100644 node_modules/core-js/library/fn/string/pad-end.js create mode 100644 node_modules/core-js/library/fn/string/pad-start.js create mode 100644 node_modules/core-js/library/fn/string/raw.js create mode 100644 node_modules/core-js/library/fn/string/repeat.js create mode 100644 node_modules/core-js/library/fn/string/small.js create mode 100644 node_modules/core-js/library/fn/string/starts-with.js create mode 100644 node_modules/core-js/library/fn/string/strike.js create mode 100644 node_modules/core-js/library/fn/string/sub.js create mode 100644 node_modules/core-js/library/fn/string/sup.js create mode 100644 node_modules/core-js/library/fn/string/trim-end.js create mode 100644 node_modules/core-js/library/fn/string/trim-left.js create mode 100644 node_modules/core-js/library/fn/string/trim-right.js create mode 100644 node_modules/core-js/library/fn/string/trim-start.js create mode 100644 node_modules/core-js/library/fn/string/trim.js create mode 100644 node_modules/core-js/library/fn/string/unescape-html.js create mode 100644 node_modules/core-js/library/fn/string/virtual/anchor.js create mode 100644 node_modules/core-js/library/fn/string/virtual/at.js create mode 100644 node_modules/core-js/library/fn/string/virtual/big.js create mode 100644 node_modules/core-js/library/fn/string/virtual/blink.js create mode 100644 node_modules/core-js/library/fn/string/virtual/bold.js create mode 100644 node_modules/core-js/library/fn/string/virtual/code-point-at.js create mode 100644 node_modules/core-js/library/fn/string/virtual/ends-with.js create mode 100644 node_modules/core-js/library/fn/string/virtual/escape-html.js create mode 100644 node_modules/core-js/library/fn/string/virtual/fixed.js create mode 100644 node_modules/core-js/library/fn/string/virtual/fontcolor.js create mode 100644 node_modules/core-js/library/fn/string/virtual/fontsize.js create mode 100644 node_modules/core-js/library/fn/string/virtual/includes.js create mode 100644 node_modules/core-js/library/fn/string/virtual/index.js create mode 100644 node_modules/core-js/library/fn/string/virtual/italics.js create mode 100644 node_modules/core-js/library/fn/string/virtual/iterator.js create mode 100644 node_modules/core-js/library/fn/string/virtual/link.js create mode 100644 node_modules/core-js/library/fn/string/virtual/match-all.js create mode 100644 node_modules/core-js/library/fn/string/virtual/pad-end.js create mode 100644 node_modules/core-js/library/fn/string/virtual/pad-start.js create mode 100644 node_modules/core-js/library/fn/string/virtual/repeat.js create mode 100644 node_modules/core-js/library/fn/string/virtual/small.js create mode 100644 node_modules/core-js/library/fn/string/virtual/starts-with.js create mode 100644 node_modules/core-js/library/fn/string/virtual/strike.js create mode 100644 node_modules/core-js/library/fn/string/virtual/sub.js create mode 100644 node_modules/core-js/library/fn/string/virtual/sup.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim-end.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim-left.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim-right.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim-start.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim.js create mode 100644 node_modules/core-js/library/fn/string/virtual/unescape-html.js create mode 100644 node_modules/core-js/library/fn/symbol/async-iterator.js create mode 100644 node_modules/core-js/library/fn/symbol/for.js create mode 100644 node_modules/core-js/library/fn/symbol/has-instance.js create mode 100644 node_modules/core-js/library/fn/symbol/index.js create mode 100644 node_modules/core-js/library/fn/symbol/is-concat-spreadable.js create mode 100644 node_modules/core-js/library/fn/symbol/iterator.js create mode 100644 node_modules/core-js/library/fn/symbol/key-for.js create mode 100644 node_modules/core-js/library/fn/symbol/match.js create mode 100644 node_modules/core-js/library/fn/symbol/observable.js create mode 100644 node_modules/core-js/library/fn/symbol/replace.js create mode 100644 node_modules/core-js/library/fn/symbol/search.js create mode 100644 node_modules/core-js/library/fn/symbol/species.js create mode 100644 node_modules/core-js/library/fn/symbol/split.js create mode 100644 node_modules/core-js/library/fn/symbol/to-primitive.js create mode 100644 node_modules/core-js/library/fn/symbol/to-string-tag.js create mode 100644 node_modules/core-js/library/fn/symbol/unscopables.js create mode 100644 node_modules/core-js/library/fn/system/global.js create mode 100644 node_modules/core-js/library/fn/system/index.js create mode 100644 node_modules/core-js/library/fn/typed/array-buffer.js create mode 100644 node_modules/core-js/library/fn/typed/data-view.js create mode 100644 node_modules/core-js/library/fn/typed/float32-array.js create mode 100644 node_modules/core-js/library/fn/typed/float64-array.js create mode 100644 node_modules/core-js/library/fn/typed/index.js create mode 100644 node_modules/core-js/library/fn/typed/int16-array.js create mode 100644 node_modules/core-js/library/fn/typed/int32-array.js create mode 100644 node_modules/core-js/library/fn/typed/int8-array.js create mode 100644 node_modules/core-js/library/fn/typed/uint16-array.js create mode 100644 node_modules/core-js/library/fn/typed/uint32-array.js create mode 100644 node_modules/core-js/library/fn/typed/uint8-array.js create mode 100644 node_modules/core-js/library/fn/typed/uint8-clamped-array.js create mode 100644 node_modules/core-js/library/fn/weak-map.js create mode 100644 node_modules/core-js/library/fn/weak-map/from.js create mode 100644 node_modules/core-js/library/fn/weak-map/index.js create mode 100644 node_modules/core-js/library/fn/weak-map/of.js create mode 100644 node_modules/core-js/library/fn/weak-set.js create mode 100644 node_modules/core-js/library/fn/weak-set/from.js create mode 100644 node_modules/core-js/library/fn/weak-set/index.js create mode 100644 node_modules/core-js/library/fn/weak-set/of.js create mode 100644 node_modules/core-js/library/index.js create mode 100644 node_modules/core-js/library/modules/_a-function.js create mode 100644 node_modules/core-js/library/modules/_a-number-value.js create mode 100644 node_modules/core-js/library/modules/_add-to-unscopables.js create mode 100644 node_modules/core-js/library/modules/_an-instance.js create mode 100644 node_modules/core-js/library/modules/_an-object.js create mode 100644 node_modules/core-js/library/modules/_array-copy-within.js create mode 100644 node_modules/core-js/library/modules/_array-fill.js create mode 100644 node_modules/core-js/library/modules/_array-from-iterable.js create mode 100644 node_modules/core-js/library/modules/_array-includes.js create mode 100644 node_modules/core-js/library/modules/_array-methods.js create mode 100644 node_modules/core-js/library/modules/_array-reduce.js create mode 100644 node_modules/core-js/library/modules/_array-species-constructor.js create mode 100644 node_modules/core-js/library/modules/_array-species-create.js create mode 100644 node_modules/core-js/library/modules/_bind.js create mode 100644 node_modules/core-js/library/modules/_classof.js create mode 100644 node_modules/core-js/library/modules/_cof.js create mode 100644 node_modules/core-js/library/modules/_collection-strong.js create mode 100644 node_modules/core-js/library/modules/_collection-to-json.js create mode 100644 node_modules/core-js/library/modules/_collection-weak.js create mode 100644 node_modules/core-js/library/modules/_collection.js create mode 100644 node_modules/core-js/library/modules/_core.js create mode 100644 node_modules/core-js/library/modules/_create-property.js create mode 100644 node_modules/core-js/library/modules/_ctx.js create mode 100644 node_modules/core-js/library/modules/_date-to-iso-string.js create mode 100644 node_modules/core-js/library/modules/_date-to-primitive.js create mode 100644 node_modules/core-js/library/modules/_defined.js create mode 100644 node_modules/core-js/library/modules/_descriptors.js create mode 100644 node_modules/core-js/library/modules/_dom-create.js create mode 100644 node_modules/core-js/library/modules/_entry-virtual.js create mode 100644 node_modules/core-js/library/modules/_enum-bug-keys.js create mode 100644 node_modules/core-js/library/modules/_enum-keys.js create mode 100644 node_modules/core-js/library/modules/_export.js create mode 100644 node_modules/core-js/library/modules/_fails-is-regexp.js create mode 100644 node_modules/core-js/library/modules/_fails.js create mode 100644 node_modules/core-js/library/modules/_fix-re-wks.js create mode 100644 node_modules/core-js/library/modules/_flags.js create mode 100644 node_modules/core-js/library/modules/_flatten-into-array.js create mode 100644 node_modules/core-js/library/modules/_for-of.js create mode 100644 node_modules/core-js/library/modules/_global.js create mode 100644 node_modules/core-js/library/modules/_has.js create mode 100644 node_modules/core-js/library/modules/_hide.js create mode 100644 node_modules/core-js/library/modules/_html.js create mode 100644 node_modules/core-js/library/modules/_ie8-dom-define.js create mode 100644 node_modules/core-js/library/modules/_inherit-if-required.js create mode 100644 node_modules/core-js/library/modules/_invoke.js create mode 100644 node_modules/core-js/library/modules/_iobject.js create mode 100644 node_modules/core-js/library/modules/_is-array-iter.js create mode 100644 node_modules/core-js/library/modules/_is-array.js create mode 100644 node_modules/core-js/library/modules/_is-integer.js create mode 100644 node_modules/core-js/library/modules/_is-object.js create mode 100644 node_modules/core-js/library/modules/_is-regexp.js create mode 100644 node_modules/core-js/library/modules/_iter-call.js create mode 100644 node_modules/core-js/library/modules/_iter-create.js create mode 100644 node_modules/core-js/library/modules/_iter-define.js create mode 100644 node_modules/core-js/library/modules/_iter-detect.js create mode 100644 node_modules/core-js/library/modules/_iter-step.js create mode 100644 node_modules/core-js/library/modules/_iterators.js create mode 100644 node_modules/core-js/library/modules/_keyof.js create mode 100644 node_modules/core-js/library/modules/_library.js create mode 100644 node_modules/core-js/library/modules/_math-expm1.js create mode 100644 node_modules/core-js/library/modules/_math-fround.js create mode 100644 node_modules/core-js/library/modules/_math-log1p.js create mode 100644 node_modules/core-js/library/modules/_math-scale.js create mode 100644 node_modules/core-js/library/modules/_math-sign.js create mode 100644 node_modules/core-js/library/modules/_meta.js create mode 100644 node_modules/core-js/library/modules/_metadata.js create mode 100644 node_modules/core-js/library/modules/_microtask.js create mode 100644 node_modules/core-js/library/modules/_new-promise-capability.js create mode 100644 node_modules/core-js/library/modules/_object-assign.js create mode 100644 node_modules/core-js/library/modules/_object-create.js create mode 100644 node_modules/core-js/library/modules/_object-define.js create mode 100644 node_modules/core-js/library/modules/_object-dp.js create mode 100644 node_modules/core-js/library/modules/_object-dps.js create mode 100644 node_modules/core-js/library/modules/_object-forced-pam.js create mode 100644 node_modules/core-js/library/modules/_object-gopd.js create mode 100644 node_modules/core-js/library/modules/_object-gopn-ext.js create mode 100644 node_modules/core-js/library/modules/_object-gopn.js create mode 100644 node_modules/core-js/library/modules/_object-gops.js create mode 100644 node_modules/core-js/library/modules/_object-gpo.js create mode 100644 node_modules/core-js/library/modules/_object-keys-internal.js create mode 100644 node_modules/core-js/library/modules/_object-keys.js create mode 100644 node_modules/core-js/library/modules/_object-pie.js create mode 100644 node_modules/core-js/library/modules/_object-sap.js create mode 100644 node_modules/core-js/library/modules/_object-to-array.js create mode 100644 node_modules/core-js/library/modules/_own-keys.js create mode 100644 node_modules/core-js/library/modules/_parse-float.js create mode 100644 node_modules/core-js/library/modules/_parse-int.js create mode 100644 node_modules/core-js/library/modules/_partial.js create mode 100644 node_modules/core-js/library/modules/_path.js create mode 100644 node_modules/core-js/library/modules/_perform.js create mode 100644 node_modules/core-js/library/modules/_promise-resolve.js create mode 100644 node_modules/core-js/library/modules/_property-desc.js create mode 100644 node_modules/core-js/library/modules/_redefine-all.js create mode 100644 node_modules/core-js/library/modules/_redefine.js create mode 100644 node_modules/core-js/library/modules/_replacer.js create mode 100644 node_modules/core-js/library/modules/_same-value.js create mode 100644 node_modules/core-js/library/modules/_set-collection-from.js create mode 100644 node_modules/core-js/library/modules/_set-collection-of.js create mode 100644 node_modules/core-js/library/modules/_set-proto.js create mode 100644 node_modules/core-js/library/modules/_set-species.js create mode 100644 node_modules/core-js/library/modules/_set-to-string-tag.js create mode 100644 node_modules/core-js/library/modules/_shared-key.js create mode 100644 node_modules/core-js/library/modules/_shared.js create mode 100644 node_modules/core-js/library/modules/_species-constructor.js create mode 100644 node_modules/core-js/library/modules/_strict-method.js create mode 100644 node_modules/core-js/library/modules/_string-at.js create mode 100644 node_modules/core-js/library/modules/_string-context.js create mode 100644 node_modules/core-js/library/modules/_string-html.js create mode 100644 node_modules/core-js/library/modules/_string-pad.js create mode 100644 node_modules/core-js/library/modules/_string-repeat.js create mode 100644 node_modules/core-js/library/modules/_string-trim.js create mode 100644 node_modules/core-js/library/modules/_string-ws.js create mode 100644 node_modules/core-js/library/modules/_task.js create mode 100644 node_modules/core-js/library/modules/_to-absolute-index.js create mode 100644 node_modules/core-js/library/modules/_to-index.js create mode 100644 node_modules/core-js/library/modules/_to-integer.js create mode 100644 node_modules/core-js/library/modules/_to-iobject.js create mode 100644 node_modules/core-js/library/modules/_to-length.js create mode 100644 node_modules/core-js/library/modules/_to-object.js create mode 100644 node_modules/core-js/library/modules/_to-primitive.js create mode 100644 node_modules/core-js/library/modules/_typed-array.js create mode 100644 node_modules/core-js/library/modules/_typed-buffer.js create mode 100644 node_modules/core-js/library/modules/_typed.js create mode 100644 node_modules/core-js/library/modules/_uid.js create mode 100644 node_modules/core-js/library/modules/_user-agent.js create mode 100644 node_modules/core-js/library/modules/_validate-collection.js create mode 100644 node_modules/core-js/library/modules/_wks-define.js create mode 100644 node_modules/core-js/library/modules/_wks-ext.js create mode 100644 node_modules/core-js/library/modules/_wks.js create mode 100644 node_modules/core-js/library/modules/core.delay.js create mode 100644 node_modules/core-js/library/modules/core.dict.js create mode 100644 node_modules/core-js/library/modules/core.function.part.js create mode 100644 node_modules/core-js/library/modules/core.get-iterator-method.js create mode 100644 node_modules/core-js/library/modules/core.get-iterator.js create mode 100644 node_modules/core-js/library/modules/core.is-iterable.js create mode 100644 node_modules/core-js/library/modules/core.number.iterator.js create mode 100644 node_modules/core-js/library/modules/core.object.classof.js create mode 100644 node_modules/core-js/library/modules/core.object.define.js create mode 100644 node_modules/core-js/library/modules/core.object.is-object.js create mode 100644 node_modules/core-js/library/modules/core.object.make.js create mode 100644 node_modules/core-js/library/modules/core.regexp.escape.js create mode 100644 node_modules/core-js/library/modules/core.string.escape-html.js create mode 100644 node_modules/core-js/library/modules/core.string.unescape-html.js create mode 100644 node_modules/core-js/library/modules/es5.js create mode 100644 node_modules/core-js/library/modules/es6.array.copy-within.js create mode 100644 node_modules/core-js/library/modules/es6.array.every.js create mode 100644 node_modules/core-js/library/modules/es6.array.fill.js create mode 100644 node_modules/core-js/library/modules/es6.array.filter.js create mode 100644 node_modules/core-js/library/modules/es6.array.find-index.js create mode 100644 node_modules/core-js/library/modules/es6.array.find.js create mode 100644 node_modules/core-js/library/modules/es6.array.for-each.js create mode 100644 node_modules/core-js/library/modules/es6.array.from.js create mode 100644 node_modules/core-js/library/modules/es6.array.index-of.js create mode 100644 node_modules/core-js/library/modules/es6.array.is-array.js create mode 100644 node_modules/core-js/library/modules/es6.array.iterator.js create mode 100644 node_modules/core-js/library/modules/es6.array.join.js create mode 100644 node_modules/core-js/library/modules/es6.array.last-index-of.js create mode 100644 node_modules/core-js/library/modules/es6.array.map.js create mode 100644 node_modules/core-js/library/modules/es6.array.of.js create mode 100644 node_modules/core-js/library/modules/es6.array.reduce-right.js create mode 100644 node_modules/core-js/library/modules/es6.array.reduce.js create mode 100644 node_modules/core-js/library/modules/es6.array.slice.js create mode 100644 node_modules/core-js/library/modules/es6.array.some.js create mode 100644 node_modules/core-js/library/modules/es6.array.sort.js create mode 100644 node_modules/core-js/library/modules/es6.array.species.js create mode 100644 node_modules/core-js/library/modules/es6.date.now.js create mode 100644 node_modules/core-js/library/modules/es6.date.to-iso-string.js create mode 100644 node_modules/core-js/library/modules/es6.date.to-json.js create mode 100644 node_modules/core-js/library/modules/es6.date.to-primitive.js create mode 100644 node_modules/core-js/library/modules/es6.date.to-string.js create mode 100644 node_modules/core-js/library/modules/es6.function.bind.js create mode 100644 node_modules/core-js/library/modules/es6.function.has-instance.js create mode 100644 node_modules/core-js/library/modules/es6.function.name.js create mode 100644 node_modules/core-js/library/modules/es6.map.js create mode 100644 node_modules/core-js/library/modules/es6.math.acosh.js create mode 100644 node_modules/core-js/library/modules/es6.math.asinh.js create mode 100644 node_modules/core-js/library/modules/es6.math.atanh.js create mode 100644 node_modules/core-js/library/modules/es6.math.cbrt.js create mode 100644 node_modules/core-js/library/modules/es6.math.clz32.js create mode 100644 node_modules/core-js/library/modules/es6.math.cosh.js create mode 100644 node_modules/core-js/library/modules/es6.math.expm1.js create mode 100644 node_modules/core-js/library/modules/es6.math.fround.js create mode 100644 node_modules/core-js/library/modules/es6.math.hypot.js create mode 100644 node_modules/core-js/library/modules/es6.math.imul.js create mode 100644 node_modules/core-js/library/modules/es6.math.log10.js create mode 100644 node_modules/core-js/library/modules/es6.math.log1p.js create mode 100644 node_modules/core-js/library/modules/es6.math.log2.js create mode 100644 node_modules/core-js/library/modules/es6.math.sign.js create mode 100644 node_modules/core-js/library/modules/es6.math.sinh.js create mode 100644 node_modules/core-js/library/modules/es6.math.tanh.js create mode 100644 node_modules/core-js/library/modules/es6.math.trunc.js create mode 100644 node_modules/core-js/library/modules/es6.number.constructor.js create mode 100644 node_modules/core-js/library/modules/es6.number.epsilon.js create mode 100644 node_modules/core-js/library/modules/es6.number.is-finite.js create mode 100644 node_modules/core-js/library/modules/es6.number.is-integer.js create mode 100644 node_modules/core-js/library/modules/es6.number.is-nan.js create mode 100644 node_modules/core-js/library/modules/es6.number.is-safe-integer.js create mode 100644 node_modules/core-js/library/modules/es6.number.max-safe-integer.js create mode 100644 node_modules/core-js/library/modules/es6.number.min-safe-integer.js create mode 100644 node_modules/core-js/library/modules/es6.number.parse-float.js create mode 100644 node_modules/core-js/library/modules/es6.number.parse-int.js create mode 100644 node_modules/core-js/library/modules/es6.number.to-fixed.js create mode 100644 node_modules/core-js/library/modules/es6.number.to-precision.js create mode 100644 node_modules/core-js/library/modules/es6.object.assign.js create mode 100644 node_modules/core-js/library/modules/es6.object.create.js create mode 100644 node_modules/core-js/library/modules/es6.object.define-properties.js create mode 100644 node_modules/core-js/library/modules/es6.object.define-property.js create mode 100644 node_modules/core-js/library/modules/es6.object.freeze.js create mode 100644 node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js create mode 100644 node_modules/core-js/library/modules/es6.object.get-own-property-names.js create mode 100644 node_modules/core-js/library/modules/es6.object.get-prototype-of.js create mode 100644 node_modules/core-js/library/modules/es6.object.is-extensible.js create mode 100644 node_modules/core-js/library/modules/es6.object.is-frozen.js create mode 100644 node_modules/core-js/library/modules/es6.object.is-sealed.js create mode 100644 node_modules/core-js/library/modules/es6.object.is.js create mode 100644 node_modules/core-js/library/modules/es6.object.keys.js create mode 100644 node_modules/core-js/library/modules/es6.object.prevent-extensions.js create mode 100644 node_modules/core-js/library/modules/es6.object.seal.js create mode 100644 node_modules/core-js/library/modules/es6.object.set-prototype-of.js create mode 100644 node_modules/core-js/library/modules/es6.object.to-string.js create mode 100644 node_modules/core-js/library/modules/es6.parse-float.js create mode 100644 node_modules/core-js/library/modules/es6.parse-int.js create mode 100644 node_modules/core-js/library/modules/es6.promise.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.apply.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.construct.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.define-property.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.delete-property.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.enumerate.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.get.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.has.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.is-extensible.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.own-keys.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.set.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.constructor.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.flags.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.match.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.replace.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.search.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.split.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.to-string.js create mode 100644 node_modules/core-js/library/modules/es6.set.js create mode 100644 node_modules/core-js/library/modules/es6.string.anchor.js create mode 100644 node_modules/core-js/library/modules/es6.string.big.js create mode 100644 node_modules/core-js/library/modules/es6.string.blink.js create mode 100644 node_modules/core-js/library/modules/es6.string.bold.js create mode 100644 node_modules/core-js/library/modules/es6.string.code-point-at.js create mode 100644 node_modules/core-js/library/modules/es6.string.ends-with.js create mode 100644 node_modules/core-js/library/modules/es6.string.fixed.js create mode 100644 node_modules/core-js/library/modules/es6.string.fontcolor.js create mode 100644 node_modules/core-js/library/modules/es6.string.fontsize.js create mode 100644 node_modules/core-js/library/modules/es6.string.from-code-point.js create mode 100644 node_modules/core-js/library/modules/es6.string.includes.js create mode 100644 node_modules/core-js/library/modules/es6.string.italics.js create mode 100644 node_modules/core-js/library/modules/es6.string.iterator.js create mode 100644 node_modules/core-js/library/modules/es6.string.link.js create mode 100644 node_modules/core-js/library/modules/es6.string.raw.js create mode 100644 node_modules/core-js/library/modules/es6.string.repeat.js create mode 100644 node_modules/core-js/library/modules/es6.string.small.js create mode 100644 node_modules/core-js/library/modules/es6.string.starts-with.js create mode 100644 node_modules/core-js/library/modules/es6.string.strike.js create mode 100644 node_modules/core-js/library/modules/es6.string.sub.js create mode 100644 node_modules/core-js/library/modules/es6.string.sup.js create mode 100644 node_modules/core-js/library/modules/es6.string.trim.js create mode 100644 node_modules/core-js/library/modules/es6.symbol.js create mode 100644 node_modules/core-js/library/modules/es6.typed.array-buffer.js create mode 100644 node_modules/core-js/library/modules/es6.typed.data-view.js create mode 100644 node_modules/core-js/library/modules/es6.typed.float32-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.float64-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.int16-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.int32-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.int8-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.uint16-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.uint32-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.uint8-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js create mode 100644 node_modules/core-js/library/modules/es6.weak-map.js create mode 100644 node_modules/core-js/library/modules/es6.weak-set.js create mode 100644 node_modules/core-js/library/modules/es7.array.flat-map.js create mode 100644 node_modules/core-js/library/modules/es7.array.flatten.js create mode 100644 node_modules/core-js/library/modules/es7.array.includes.js create mode 100644 node_modules/core-js/library/modules/es7.asap.js create mode 100644 node_modules/core-js/library/modules/es7.error.is-error.js create mode 100644 node_modules/core-js/library/modules/es7.global.js create mode 100644 node_modules/core-js/library/modules/es7.map.from.js create mode 100644 node_modules/core-js/library/modules/es7.map.of.js create mode 100644 node_modules/core-js/library/modules/es7.map.to-json.js create mode 100644 node_modules/core-js/library/modules/es7.math.clamp.js create mode 100644 node_modules/core-js/library/modules/es7.math.deg-per-rad.js create mode 100644 node_modules/core-js/library/modules/es7.math.degrees.js create mode 100644 node_modules/core-js/library/modules/es7.math.fscale.js create mode 100644 node_modules/core-js/library/modules/es7.math.iaddh.js create mode 100644 node_modules/core-js/library/modules/es7.math.imulh.js create mode 100644 node_modules/core-js/library/modules/es7.math.isubh.js create mode 100644 node_modules/core-js/library/modules/es7.math.rad-per-deg.js create mode 100644 node_modules/core-js/library/modules/es7.math.radians.js create mode 100644 node_modules/core-js/library/modules/es7.math.scale.js create mode 100644 node_modules/core-js/library/modules/es7.math.signbit.js create mode 100644 node_modules/core-js/library/modules/es7.math.umulh.js create mode 100644 node_modules/core-js/library/modules/es7.object.define-getter.js create mode 100644 node_modules/core-js/library/modules/es7.object.define-setter.js create mode 100644 node_modules/core-js/library/modules/es7.object.entries.js create mode 100644 node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js create mode 100644 node_modules/core-js/library/modules/es7.object.lookup-getter.js create mode 100644 node_modules/core-js/library/modules/es7.object.lookup-setter.js create mode 100644 node_modules/core-js/library/modules/es7.object.values.js create mode 100644 node_modules/core-js/library/modules/es7.observable.js create mode 100644 node_modules/core-js/library/modules/es7.promise.finally.js create mode 100644 node_modules/core-js/library/modules/es7.promise.try.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.define-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.delete-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.get-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.has-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.metadata.js create mode 100644 node_modules/core-js/library/modules/es7.set.from.js create mode 100644 node_modules/core-js/library/modules/es7.set.of.js create mode 100644 node_modules/core-js/library/modules/es7.set.to-json.js create mode 100644 node_modules/core-js/library/modules/es7.string.at.js create mode 100644 node_modules/core-js/library/modules/es7.string.match-all.js create mode 100644 node_modules/core-js/library/modules/es7.string.pad-end.js create mode 100644 node_modules/core-js/library/modules/es7.string.pad-start.js create mode 100644 node_modules/core-js/library/modules/es7.string.trim-left.js create mode 100644 node_modules/core-js/library/modules/es7.string.trim-right.js create mode 100644 node_modules/core-js/library/modules/es7.symbol.async-iterator.js create mode 100644 node_modules/core-js/library/modules/es7.symbol.observable.js create mode 100644 node_modules/core-js/library/modules/es7.system.global.js create mode 100644 node_modules/core-js/library/modules/es7.weak-map.from.js create mode 100644 node_modules/core-js/library/modules/es7.weak-map.of.js create mode 100644 node_modules/core-js/library/modules/es7.weak-set.from.js create mode 100644 node_modules/core-js/library/modules/es7.weak-set.of.js create mode 100644 node_modules/core-js/library/modules/web.dom.iterable.js create mode 100644 node_modules/core-js/library/modules/web.immediate.js create mode 100644 node_modules/core-js/library/modules/web.timers.js create mode 100644 node_modules/core-js/library/shim.js create mode 100644 node_modules/core-js/library/stage/0.js create mode 100644 node_modules/core-js/library/stage/1.js create mode 100644 node_modules/core-js/library/stage/2.js create mode 100644 node_modules/core-js/library/stage/3.js create mode 100644 node_modules/core-js/library/stage/4.js create mode 100644 node_modules/core-js/library/stage/index.js create mode 100644 node_modules/core-js/library/stage/pre.js create mode 100644 node_modules/core-js/library/web/dom-collections.js create mode 100644 node_modules/core-js/library/web/immediate.js create mode 100644 node_modules/core-js/library/web/index.js create mode 100644 node_modules/core-js/library/web/timers.js create mode 100644 node_modules/core-js/modules/_a-function.js create mode 100644 node_modules/core-js/modules/_a-number-value.js create mode 100644 node_modules/core-js/modules/_add-to-unscopables.js create mode 100644 node_modules/core-js/modules/_an-instance.js create mode 100644 node_modules/core-js/modules/_an-object.js create mode 100644 node_modules/core-js/modules/_array-copy-within.js create mode 100644 node_modules/core-js/modules/_array-fill.js create mode 100644 node_modules/core-js/modules/_array-from-iterable.js create mode 100644 node_modules/core-js/modules/_array-includes.js create mode 100644 node_modules/core-js/modules/_array-methods.js create mode 100644 node_modules/core-js/modules/_array-reduce.js create mode 100644 node_modules/core-js/modules/_array-species-constructor.js create mode 100644 node_modules/core-js/modules/_array-species-create.js create mode 100644 node_modules/core-js/modules/_bind.js create mode 100644 node_modules/core-js/modules/_classof.js create mode 100644 node_modules/core-js/modules/_cof.js create mode 100644 node_modules/core-js/modules/_collection-strong.js create mode 100644 node_modules/core-js/modules/_collection-to-json.js create mode 100644 node_modules/core-js/modules/_collection-weak.js create mode 100644 node_modules/core-js/modules/_collection.js create mode 100644 node_modules/core-js/modules/_core.js create mode 100644 node_modules/core-js/modules/_create-property.js create mode 100644 node_modules/core-js/modules/_ctx.js create mode 100644 node_modules/core-js/modules/_date-to-iso-string.js create mode 100644 node_modules/core-js/modules/_date-to-primitive.js create mode 100644 node_modules/core-js/modules/_defined.js create mode 100644 node_modules/core-js/modules/_descriptors.js create mode 100644 node_modules/core-js/modules/_dom-create.js create mode 100644 node_modules/core-js/modules/_entry-virtual.js create mode 100644 node_modules/core-js/modules/_enum-bug-keys.js create mode 100644 node_modules/core-js/modules/_enum-keys.js create mode 100644 node_modules/core-js/modules/_export.js create mode 100644 node_modules/core-js/modules/_fails-is-regexp.js create mode 100644 node_modules/core-js/modules/_fails.js create mode 100644 node_modules/core-js/modules/_fix-re-wks.js create mode 100644 node_modules/core-js/modules/_flags.js create mode 100644 node_modules/core-js/modules/_flatten-into-array.js create mode 100644 node_modules/core-js/modules/_for-of.js create mode 100644 node_modules/core-js/modules/_global.js create mode 100644 node_modules/core-js/modules/_has.js create mode 100644 node_modules/core-js/modules/_hide.js create mode 100644 node_modules/core-js/modules/_html.js create mode 100644 node_modules/core-js/modules/_ie8-dom-define.js create mode 100644 node_modules/core-js/modules/_inherit-if-required.js create mode 100644 node_modules/core-js/modules/_invoke.js create mode 100644 node_modules/core-js/modules/_iobject.js create mode 100644 node_modules/core-js/modules/_is-array-iter.js create mode 100644 node_modules/core-js/modules/_is-array.js create mode 100644 node_modules/core-js/modules/_is-integer.js create mode 100644 node_modules/core-js/modules/_is-object.js create mode 100644 node_modules/core-js/modules/_is-regexp.js create mode 100644 node_modules/core-js/modules/_iter-call.js create mode 100644 node_modules/core-js/modules/_iter-create.js create mode 100644 node_modules/core-js/modules/_iter-define.js create mode 100644 node_modules/core-js/modules/_iter-detect.js create mode 100644 node_modules/core-js/modules/_iter-step.js create mode 100644 node_modules/core-js/modules/_iterators.js create mode 100644 node_modules/core-js/modules/_keyof.js create mode 100644 node_modules/core-js/modules/_library.js create mode 100644 node_modules/core-js/modules/_math-expm1.js create mode 100644 node_modules/core-js/modules/_math-fround.js create mode 100644 node_modules/core-js/modules/_math-log1p.js create mode 100644 node_modules/core-js/modules/_math-scale.js create mode 100644 node_modules/core-js/modules/_math-sign.js create mode 100644 node_modules/core-js/modules/_meta.js create mode 100644 node_modules/core-js/modules/_metadata.js create mode 100644 node_modules/core-js/modules/_microtask.js create mode 100644 node_modules/core-js/modules/_new-promise-capability.js create mode 100644 node_modules/core-js/modules/_object-assign.js create mode 100644 node_modules/core-js/modules/_object-create.js create mode 100644 node_modules/core-js/modules/_object-define.js create mode 100644 node_modules/core-js/modules/_object-dp.js create mode 100644 node_modules/core-js/modules/_object-dps.js create mode 100644 node_modules/core-js/modules/_object-forced-pam.js create mode 100644 node_modules/core-js/modules/_object-gopd.js create mode 100644 node_modules/core-js/modules/_object-gopn-ext.js create mode 100644 node_modules/core-js/modules/_object-gopn.js create mode 100644 node_modules/core-js/modules/_object-gops.js create mode 100644 node_modules/core-js/modules/_object-gpo.js create mode 100644 node_modules/core-js/modules/_object-keys-internal.js create mode 100644 node_modules/core-js/modules/_object-keys.js create mode 100644 node_modules/core-js/modules/_object-pie.js create mode 100644 node_modules/core-js/modules/_object-sap.js create mode 100644 node_modules/core-js/modules/_object-to-array.js create mode 100644 node_modules/core-js/modules/_own-keys.js create mode 100644 node_modules/core-js/modules/_parse-float.js create mode 100644 node_modules/core-js/modules/_parse-int.js create mode 100644 node_modules/core-js/modules/_partial.js create mode 100644 node_modules/core-js/modules/_path.js create mode 100644 node_modules/core-js/modules/_perform.js create mode 100644 node_modules/core-js/modules/_promise-resolve.js create mode 100644 node_modules/core-js/modules/_property-desc.js create mode 100644 node_modules/core-js/modules/_redefine-all.js create mode 100644 node_modules/core-js/modules/_redefine.js create mode 100644 node_modules/core-js/modules/_replacer.js create mode 100644 node_modules/core-js/modules/_same-value.js create mode 100644 node_modules/core-js/modules/_set-collection-from.js create mode 100644 node_modules/core-js/modules/_set-collection-of.js create mode 100644 node_modules/core-js/modules/_set-proto.js create mode 100644 node_modules/core-js/modules/_set-species.js create mode 100644 node_modules/core-js/modules/_set-to-string-tag.js create mode 100644 node_modules/core-js/modules/_shared-key.js create mode 100644 node_modules/core-js/modules/_shared.js create mode 100644 node_modules/core-js/modules/_species-constructor.js create mode 100644 node_modules/core-js/modules/_strict-method.js create mode 100644 node_modules/core-js/modules/_string-at.js create mode 100644 node_modules/core-js/modules/_string-context.js create mode 100644 node_modules/core-js/modules/_string-html.js create mode 100644 node_modules/core-js/modules/_string-pad.js create mode 100644 node_modules/core-js/modules/_string-repeat.js create mode 100644 node_modules/core-js/modules/_string-trim.js create mode 100644 node_modules/core-js/modules/_string-ws.js create mode 100644 node_modules/core-js/modules/_task.js create mode 100644 node_modules/core-js/modules/_to-absolute-index.js create mode 100644 node_modules/core-js/modules/_to-index.js create mode 100644 node_modules/core-js/modules/_to-integer.js create mode 100644 node_modules/core-js/modules/_to-iobject.js create mode 100644 node_modules/core-js/modules/_to-length.js create mode 100644 node_modules/core-js/modules/_to-object.js create mode 100644 node_modules/core-js/modules/_to-primitive.js create mode 100644 node_modules/core-js/modules/_typed-array.js create mode 100644 node_modules/core-js/modules/_typed-buffer.js create mode 100644 node_modules/core-js/modules/_typed.js create mode 100644 node_modules/core-js/modules/_uid.js create mode 100644 node_modules/core-js/modules/_user-agent.js create mode 100644 node_modules/core-js/modules/_validate-collection.js create mode 100644 node_modules/core-js/modules/_wks-define.js create mode 100644 node_modules/core-js/modules/_wks-ext.js create mode 100644 node_modules/core-js/modules/_wks.js create mode 100644 node_modules/core-js/modules/core.delay.js create mode 100644 node_modules/core-js/modules/core.dict.js create mode 100644 node_modules/core-js/modules/core.function.part.js create mode 100644 node_modules/core-js/modules/core.get-iterator-method.js create mode 100644 node_modules/core-js/modules/core.get-iterator.js create mode 100644 node_modules/core-js/modules/core.is-iterable.js create mode 100644 node_modules/core-js/modules/core.number.iterator.js create mode 100644 node_modules/core-js/modules/core.object.classof.js create mode 100644 node_modules/core-js/modules/core.object.define.js create mode 100644 node_modules/core-js/modules/core.object.is-object.js create mode 100644 node_modules/core-js/modules/core.object.make.js create mode 100644 node_modules/core-js/modules/core.regexp.escape.js create mode 100644 node_modules/core-js/modules/core.string.escape-html.js create mode 100644 node_modules/core-js/modules/core.string.unescape-html.js create mode 100644 node_modules/core-js/modules/es5.js create mode 100644 node_modules/core-js/modules/es6.array.copy-within.js create mode 100644 node_modules/core-js/modules/es6.array.every.js create mode 100644 node_modules/core-js/modules/es6.array.fill.js create mode 100644 node_modules/core-js/modules/es6.array.filter.js create mode 100644 node_modules/core-js/modules/es6.array.find-index.js create mode 100644 node_modules/core-js/modules/es6.array.find.js create mode 100644 node_modules/core-js/modules/es6.array.for-each.js create mode 100644 node_modules/core-js/modules/es6.array.from.js create mode 100644 node_modules/core-js/modules/es6.array.index-of.js create mode 100644 node_modules/core-js/modules/es6.array.is-array.js create mode 100644 node_modules/core-js/modules/es6.array.iterator.js create mode 100644 node_modules/core-js/modules/es6.array.join.js create mode 100644 node_modules/core-js/modules/es6.array.last-index-of.js create mode 100644 node_modules/core-js/modules/es6.array.map.js create mode 100644 node_modules/core-js/modules/es6.array.of.js create mode 100644 node_modules/core-js/modules/es6.array.reduce-right.js create mode 100644 node_modules/core-js/modules/es6.array.reduce.js create mode 100644 node_modules/core-js/modules/es6.array.slice.js create mode 100644 node_modules/core-js/modules/es6.array.some.js create mode 100644 node_modules/core-js/modules/es6.array.sort.js create mode 100644 node_modules/core-js/modules/es6.array.species.js create mode 100644 node_modules/core-js/modules/es6.date.now.js create mode 100644 node_modules/core-js/modules/es6.date.to-iso-string.js create mode 100644 node_modules/core-js/modules/es6.date.to-json.js create mode 100644 node_modules/core-js/modules/es6.date.to-primitive.js create mode 100644 node_modules/core-js/modules/es6.date.to-string.js create mode 100644 node_modules/core-js/modules/es6.function.bind.js create mode 100644 node_modules/core-js/modules/es6.function.has-instance.js create mode 100644 node_modules/core-js/modules/es6.function.name.js create mode 100644 node_modules/core-js/modules/es6.map.js create mode 100644 node_modules/core-js/modules/es6.math.acosh.js create mode 100644 node_modules/core-js/modules/es6.math.asinh.js create mode 100644 node_modules/core-js/modules/es6.math.atanh.js create mode 100644 node_modules/core-js/modules/es6.math.cbrt.js create mode 100644 node_modules/core-js/modules/es6.math.clz32.js create mode 100644 node_modules/core-js/modules/es6.math.cosh.js create mode 100644 node_modules/core-js/modules/es6.math.expm1.js create mode 100644 node_modules/core-js/modules/es6.math.fround.js create mode 100644 node_modules/core-js/modules/es6.math.hypot.js create mode 100644 node_modules/core-js/modules/es6.math.imul.js create mode 100644 node_modules/core-js/modules/es6.math.log10.js create mode 100644 node_modules/core-js/modules/es6.math.log1p.js create mode 100644 node_modules/core-js/modules/es6.math.log2.js create mode 100644 node_modules/core-js/modules/es6.math.sign.js create mode 100644 node_modules/core-js/modules/es6.math.sinh.js create mode 100644 node_modules/core-js/modules/es6.math.tanh.js create mode 100644 node_modules/core-js/modules/es6.math.trunc.js create mode 100644 node_modules/core-js/modules/es6.number.constructor.js create mode 100644 node_modules/core-js/modules/es6.number.epsilon.js create mode 100644 node_modules/core-js/modules/es6.number.is-finite.js create mode 100644 node_modules/core-js/modules/es6.number.is-integer.js create mode 100644 node_modules/core-js/modules/es6.number.is-nan.js create mode 100644 node_modules/core-js/modules/es6.number.is-safe-integer.js create mode 100644 node_modules/core-js/modules/es6.number.max-safe-integer.js create mode 100644 node_modules/core-js/modules/es6.number.min-safe-integer.js create mode 100644 node_modules/core-js/modules/es6.number.parse-float.js create mode 100644 node_modules/core-js/modules/es6.number.parse-int.js create mode 100644 node_modules/core-js/modules/es6.number.to-fixed.js create mode 100644 node_modules/core-js/modules/es6.number.to-precision.js create mode 100644 node_modules/core-js/modules/es6.object.assign.js create mode 100644 node_modules/core-js/modules/es6.object.create.js create mode 100644 node_modules/core-js/modules/es6.object.define-properties.js create mode 100644 node_modules/core-js/modules/es6.object.define-property.js create mode 100644 node_modules/core-js/modules/es6.object.freeze.js create mode 100644 node_modules/core-js/modules/es6.object.get-own-property-descriptor.js create mode 100644 node_modules/core-js/modules/es6.object.get-own-property-names.js create mode 100644 node_modules/core-js/modules/es6.object.get-prototype-of.js create mode 100644 node_modules/core-js/modules/es6.object.is-extensible.js create mode 100644 node_modules/core-js/modules/es6.object.is-frozen.js create mode 100644 node_modules/core-js/modules/es6.object.is-sealed.js create mode 100644 node_modules/core-js/modules/es6.object.is.js create mode 100644 node_modules/core-js/modules/es6.object.keys.js create mode 100644 node_modules/core-js/modules/es6.object.prevent-extensions.js create mode 100644 node_modules/core-js/modules/es6.object.seal.js create mode 100644 node_modules/core-js/modules/es6.object.set-prototype-of.js create mode 100644 node_modules/core-js/modules/es6.object.to-string.js create mode 100644 node_modules/core-js/modules/es6.parse-float.js create mode 100644 node_modules/core-js/modules/es6.parse-int.js create mode 100644 node_modules/core-js/modules/es6.promise.js create mode 100644 node_modules/core-js/modules/es6.reflect.apply.js create mode 100644 node_modules/core-js/modules/es6.reflect.construct.js create mode 100644 node_modules/core-js/modules/es6.reflect.define-property.js create mode 100644 node_modules/core-js/modules/es6.reflect.delete-property.js create mode 100644 node_modules/core-js/modules/es6.reflect.enumerate.js create mode 100644 node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js create mode 100644 node_modules/core-js/modules/es6.reflect.get-prototype-of.js create mode 100644 node_modules/core-js/modules/es6.reflect.get.js create mode 100644 node_modules/core-js/modules/es6.reflect.has.js create mode 100644 node_modules/core-js/modules/es6.reflect.is-extensible.js create mode 100644 node_modules/core-js/modules/es6.reflect.own-keys.js create mode 100644 node_modules/core-js/modules/es6.reflect.prevent-extensions.js create mode 100644 node_modules/core-js/modules/es6.reflect.set-prototype-of.js create mode 100644 node_modules/core-js/modules/es6.reflect.set.js create mode 100644 node_modules/core-js/modules/es6.regexp.constructor.js create mode 100644 node_modules/core-js/modules/es6.regexp.flags.js create mode 100644 node_modules/core-js/modules/es6.regexp.match.js create mode 100644 node_modules/core-js/modules/es6.regexp.replace.js create mode 100644 node_modules/core-js/modules/es6.regexp.search.js create mode 100644 node_modules/core-js/modules/es6.regexp.split.js create mode 100644 node_modules/core-js/modules/es6.regexp.to-string.js create mode 100644 node_modules/core-js/modules/es6.set.js create mode 100644 node_modules/core-js/modules/es6.string.anchor.js create mode 100644 node_modules/core-js/modules/es6.string.big.js create mode 100644 node_modules/core-js/modules/es6.string.blink.js create mode 100644 node_modules/core-js/modules/es6.string.bold.js create mode 100644 node_modules/core-js/modules/es6.string.code-point-at.js create mode 100644 node_modules/core-js/modules/es6.string.ends-with.js create mode 100644 node_modules/core-js/modules/es6.string.fixed.js create mode 100644 node_modules/core-js/modules/es6.string.fontcolor.js create mode 100644 node_modules/core-js/modules/es6.string.fontsize.js create mode 100644 node_modules/core-js/modules/es6.string.from-code-point.js create mode 100644 node_modules/core-js/modules/es6.string.includes.js create mode 100644 node_modules/core-js/modules/es6.string.italics.js create mode 100644 node_modules/core-js/modules/es6.string.iterator.js create mode 100644 node_modules/core-js/modules/es6.string.link.js create mode 100644 node_modules/core-js/modules/es6.string.raw.js create mode 100644 node_modules/core-js/modules/es6.string.repeat.js create mode 100644 node_modules/core-js/modules/es6.string.small.js create mode 100644 node_modules/core-js/modules/es6.string.starts-with.js create mode 100644 node_modules/core-js/modules/es6.string.strike.js create mode 100644 node_modules/core-js/modules/es6.string.sub.js create mode 100644 node_modules/core-js/modules/es6.string.sup.js create mode 100644 node_modules/core-js/modules/es6.string.trim.js create mode 100644 node_modules/core-js/modules/es6.symbol.js create mode 100644 node_modules/core-js/modules/es6.typed.array-buffer.js create mode 100644 node_modules/core-js/modules/es6.typed.data-view.js create mode 100644 node_modules/core-js/modules/es6.typed.float32-array.js create mode 100644 node_modules/core-js/modules/es6.typed.float64-array.js create mode 100644 node_modules/core-js/modules/es6.typed.int16-array.js create mode 100644 node_modules/core-js/modules/es6.typed.int32-array.js create mode 100644 node_modules/core-js/modules/es6.typed.int8-array.js create mode 100644 node_modules/core-js/modules/es6.typed.uint16-array.js create mode 100644 node_modules/core-js/modules/es6.typed.uint32-array.js create mode 100644 node_modules/core-js/modules/es6.typed.uint8-array.js create mode 100644 node_modules/core-js/modules/es6.typed.uint8-clamped-array.js create mode 100644 node_modules/core-js/modules/es6.weak-map.js create mode 100644 node_modules/core-js/modules/es6.weak-set.js create mode 100644 node_modules/core-js/modules/es7.array.flat-map.js create mode 100644 node_modules/core-js/modules/es7.array.flatten.js create mode 100644 node_modules/core-js/modules/es7.array.includes.js create mode 100644 node_modules/core-js/modules/es7.asap.js create mode 100644 node_modules/core-js/modules/es7.error.is-error.js create mode 100644 node_modules/core-js/modules/es7.global.js create mode 100644 node_modules/core-js/modules/es7.map.from.js create mode 100644 node_modules/core-js/modules/es7.map.of.js create mode 100644 node_modules/core-js/modules/es7.map.to-json.js create mode 100644 node_modules/core-js/modules/es7.math.clamp.js create mode 100644 node_modules/core-js/modules/es7.math.deg-per-rad.js create mode 100644 node_modules/core-js/modules/es7.math.degrees.js create mode 100644 node_modules/core-js/modules/es7.math.fscale.js create mode 100644 node_modules/core-js/modules/es7.math.iaddh.js create mode 100644 node_modules/core-js/modules/es7.math.imulh.js create mode 100644 node_modules/core-js/modules/es7.math.isubh.js create mode 100644 node_modules/core-js/modules/es7.math.rad-per-deg.js create mode 100644 node_modules/core-js/modules/es7.math.radians.js create mode 100644 node_modules/core-js/modules/es7.math.scale.js create mode 100644 node_modules/core-js/modules/es7.math.signbit.js create mode 100644 node_modules/core-js/modules/es7.math.umulh.js create mode 100644 node_modules/core-js/modules/es7.object.define-getter.js create mode 100644 node_modules/core-js/modules/es7.object.define-setter.js create mode 100644 node_modules/core-js/modules/es7.object.entries.js create mode 100644 node_modules/core-js/modules/es7.object.get-own-property-descriptors.js create mode 100644 node_modules/core-js/modules/es7.object.lookup-getter.js create mode 100644 node_modules/core-js/modules/es7.object.lookup-setter.js create mode 100644 node_modules/core-js/modules/es7.object.values.js create mode 100644 node_modules/core-js/modules/es7.observable.js create mode 100644 node_modules/core-js/modules/es7.promise.finally.js create mode 100644 node_modules/core-js/modules/es7.promise.try.js create mode 100644 node_modules/core-js/modules/es7.reflect.define-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.delete-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.get-metadata-keys.js create mode 100644 node_modules/core-js/modules/es7.reflect.get-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js create mode 100644 node_modules/core-js/modules/es7.reflect.get-own-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.has-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.has-own-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.metadata.js create mode 100644 node_modules/core-js/modules/es7.set.from.js create mode 100644 node_modules/core-js/modules/es7.set.of.js create mode 100644 node_modules/core-js/modules/es7.set.to-json.js create mode 100644 node_modules/core-js/modules/es7.string.at.js create mode 100644 node_modules/core-js/modules/es7.string.match-all.js create mode 100644 node_modules/core-js/modules/es7.string.pad-end.js create mode 100644 node_modules/core-js/modules/es7.string.pad-start.js create mode 100644 node_modules/core-js/modules/es7.string.trim-left.js create mode 100644 node_modules/core-js/modules/es7.string.trim-right.js create mode 100644 node_modules/core-js/modules/es7.symbol.async-iterator.js create mode 100644 node_modules/core-js/modules/es7.symbol.observable.js create mode 100644 node_modules/core-js/modules/es7.system.global.js create mode 100644 node_modules/core-js/modules/es7.weak-map.from.js create mode 100644 node_modules/core-js/modules/es7.weak-map.of.js create mode 100644 node_modules/core-js/modules/es7.weak-set.from.js create mode 100644 node_modules/core-js/modules/es7.weak-set.of.js create mode 100644 node_modules/core-js/modules/library/_add-to-unscopables.js create mode 100644 node_modules/core-js/modules/library/_collection.js create mode 100644 node_modules/core-js/modules/library/_export.js create mode 100644 node_modules/core-js/modules/library/_library.js create mode 100644 node_modules/core-js/modules/library/_path.js create mode 100644 node_modules/core-js/modules/library/_redefine-all.js create mode 100644 node_modules/core-js/modules/library/_redefine.js create mode 100644 node_modules/core-js/modules/library/_set-species.js create mode 100644 node_modules/core-js/modules/library/es6.date.to-json.js create mode 100644 node_modules/core-js/modules/library/es6.date.to-primitive.js create mode 100644 node_modules/core-js/modules/library/es6.date.to-string.js create mode 100644 node_modules/core-js/modules/library/es6.function.name.js create mode 100644 node_modules/core-js/modules/library/es6.number.constructor.js create mode 100644 node_modules/core-js/modules/library/es6.object.to-string.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.constructor.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.flags.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.match.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.replace.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.search.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.split.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.to-string.js create mode 100644 node_modules/core-js/modules/library/web.dom.iterable.js create mode 100644 node_modules/core-js/modules/web.dom.iterable.js create mode 100644 node_modules/core-js/modules/web.immediate.js create mode 100644 node_modules/core-js/modules/web.timers.js create mode 100644 node_modules/core-js/package.json create mode 100644 node_modules/core-js/shim.js create mode 100644 node_modules/core-js/stage/0.js create mode 100644 node_modules/core-js/stage/1.js create mode 100644 node_modules/core-js/stage/2.js create mode 100644 node_modules/core-js/stage/3.js create mode 100644 node_modules/core-js/stage/4.js create mode 100644 node_modules/core-js/stage/index.js create mode 100644 node_modules/core-js/stage/pre.js create mode 100644 node_modules/core-js/web/dom-collections.js create mode 100644 node_modules/core-js/web/immediate.js create mode 100644 node_modules/core-js/web/index.js create mode 100644 node_modules/core-js/web/timers.js create mode 100644 node_modules/core-util-is/LICENSE create mode 100644 node_modules/core-util-is/README.md create mode 100644 node_modules/core-util-is/float.patch create mode 100644 node_modules/core-util-is/lib/util.js create mode 100644 node_modules/core-util-is/package.json create mode 100644 node_modules/core-util-is/test.js create mode 100644 node_modules/create-error-class/index.js create mode 100644 node_modules/create-error-class/license create mode 100644 node_modules/create-error-class/package.json create mode 100644 node_modules/create-error-class/readme.md create mode 100644 node_modules/cross-spawn/CHANGELOG.md create mode 100644 node_modules/cross-spawn/LICENSE create mode 100644 node_modules/cross-spawn/README.md create mode 100644 node_modules/cross-spawn/index.js create mode 100644 node_modules/cross-spawn/lib/enoent.js create mode 100644 node_modules/cross-spawn/lib/parse.js create mode 100644 node_modules/cross-spawn/lib/util/escapeArgument.js create mode 100644 node_modules/cross-spawn/lib/util/escapeCommand.js create mode 100644 node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js create mode 100644 node_modules/cross-spawn/lib/util/readShebang.js create mode 100644 node_modules/cross-spawn/lib/util/resolveCommand.js create mode 100644 node_modules/cross-spawn/package.json create mode 100644 node_modules/crypto-random-string/index.js create mode 100644 node_modules/crypto-random-string/license create mode 100644 node_modules/crypto-random-string/package.json create mode 100644 node_modules/crypto-random-string/readme.md create mode 100644 node_modules/d/.lint create mode 100644 node_modules/d/.npmignore create mode 100644 node_modules/d/.travis.yml create mode 100644 node_modules/d/CHANGES create mode 100644 node_modules/d/LICENSE create mode 100644 node_modules/d/README.md create mode 100644 node_modules/d/auto-bind.js create mode 100644 node_modules/d/index.js create mode 100644 node_modules/d/lazy.js create mode 100644 node_modules/d/package.json create mode 100644 node_modules/d/test/auto-bind.js create mode 100644 node_modules/d/test/index.js create mode 100644 node_modules/d/test/lazy.js create mode 100644 node_modules/debug/.coveralls.yml create mode 100644 node_modules/debug/.eslintrc create mode 100644 node_modules/debug/.npmignore create mode 100644 node_modules/debug/.travis.yml create mode 100644 node_modules/debug/CHANGELOG.md create mode 100644 node_modules/debug/LICENSE create mode 100644 node_modules/debug/Makefile create mode 100644 node_modules/debug/README.md create mode 100644 node_modules/debug/component.json create mode 100644 node_modules/debug/karma.conf.js create mode 100644 node_modules/debug/node.js create mode 100644 node_modules/debug/package.json create mode 100644 node_modules/debug/src/browser.js create mode 100644 node_modules/debug/src/debug.js create mode 100644 node_modules/debug/src/index.js create mode 100644 node_modules/debug/src/inspector-log.js create mode 100644 node_modules/debug/src/node.js create mode 100644 node_modules/decamelize/index.js create mode 100644 node_modules/decamelize/license create mode 100644 node_modules/decamelize/package.json create mode 100644 node_modules/decamelize/readme.md create mode 100644 node_modules/decode-uri-component/index.js create mode 100644 node_modules/decode-uri-component/license create mode 100644 node_modules/decode-uri-component/package.json create mode 100644 node_modules/decode-uri-component/readme.md create mode 100644 node_modules/deep-extend/CHANGELOG.md create mode 100644 node_modules/deep-extend/LICENSE create mode 100644 node_modules/deep-extend/README.md create mode 100644 node_modules/deep-extend/index.js create mode 100644 node_modules/deep-extend/lib/deep-extend.js create mode 100644 node_modules/deep-extend/package.json create mode 100644 node_modules/define-property/CHANGELOG.md create mode 100644 node_modules/define-property/LICENSE create mode 100644 node_modules/define-property/README.md create mode 100644 node_modules/define-property/index.js create mode 100644 node_modules/define-property/package.json create mode 100644 node_modules/depd/History.md create mode 100644 node_modules/depd/LICENSE create mode 100644 node_modules/depd/Readme.md create mode 100644 node_modules/depd/index.js create mode 100644 node_modules/depd/lib/browser/index.js create mode 100644 node_modules/depd/lib/compat/callsite-tostring.js create mode 100644 node_modules/depd/lib/compat/event-listener-count.js create mode 100644 node_modules/depd/lib/compat/index.js create mode 100644 node_modules/depd/package.json create mode 100644 node_modules/destroy/LICENSE create mode 100644 node_modules/destroy/README.md create mode 100644 node_modules/destroy/index.js create mode 100644 node_modules/destroy/package.json create mode 100644 node_modules/dot-prop/index.js create mode 100644 node_modules/dot-prop/license create mode 100644 node_modules/dot-prop/package.json create mode 100644 node_modules/dot-prop/readme.md create mode 100644 node_modules/dottie/.npmignore create mode 100644 node_modules/dottie/.travis.yml create mode 100644 node_modules/dottie/LICENSE create mode 100644 node_modules/dottie/README.md create mode 100644 node_modules/dottie/dottie.js create mode 100644 node_modules/dottie/package.json create mode 100644 node_modules/dottie/test/find.test.js create mode 100644 node_modules/dottie/test/flatten.test.js create mode 100644 node_modules/dottie/test/get.test.js create mode 100644 node_modules/dottie/test/paths.test.js create mode 100644 node_modules/dottie/test/set.test.js create mode 100644 node_modules/dottie/test/transform.test.js create mode 100644 node_modules/duplexer/.npmignore create mode 100644 node_modules/duplexer/.travis.yml create mode 100644 node_modules/duplexer/LICENCE create mode 100644 node_modules/duplexer/README.md create mode 100644 node_modules/duplexer/index.js create mode 100644 node_modules/duplexer/package.json create mode 100644 node_modules/duplexer/test/index.js create mode 100644 node_modules/duplexer3/LICENSE.md create mode 100644 node_modules/duplexer3/README.md create mode 100644 node_modules/duplexer3/index.js create mode 100644 node_modules/duplexer3/package.json create mode 100644 node_modules/editorconfig/.gitmodules create mode 100644 node_modules/editorconfig/LICENSE create mode 100644 node_modules/editorconfig/README.md create mode 100755 node_modules/editorconfig/bin/editorconfig create mode 100644 node_modules/editorconfig/editorconfig.js create mode 100644 node_modules/editorconfig/lib/fnmatch.js create mode 100644 node_modules/editorconfig/lib/ini.js create mode 120000 node_modules/editorconfig/node_modules/.bin/semver create mode 100644 node_modules/editorconfig/node_modules/lru-cache/.npmignore create mode 100644 node_modules/editorconfig/node_modules/lru-cache/.travis.yml create mode 100644 node_modules/editorconfig/node_modules/lru-cache/CONTRIBUTORS create mode 100644 node_modules/editorconfig/node_modules/lru-cache/LICENSE create mode 100644 node_modules/editorconfig/node_modules/lru-cache/README.md create mode 100644 node_modules/editorconfig/node_modules/lru-cache/lib/lru-cache.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/package.json create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/basic.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/foreach.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/memory-leak.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/overflow.js create mode 100644 node_modules/editorconfig/node_modules/lru-cache/test/serialize.js create mode 100644 node_modules/editorconfig/node_modules/semver/LICENSE create mode 100644 node_modules/editorconfig/node_modules/semver/README.md create mode 100755 node_modules/editorconfig/node_modules/semver/bin/semver create mode 100644 node_modules/editorconfig/node_modules/semver/package.json create mode 100644 node_modules/editorconfig/node_modules/semver/range.bnf create mode 100644 node_modules/editorconfig/node_modules/semver/semver.js create mode 100644 node_modules/editorconfig/package.json create mode 100644 node_modules/ee-first/LICENSE create mode 100644 node_modules/ee-first/README.md create mode 100644 node_modules/ee-first/index.js create mode 100644 node_modules/ee-first/package.json create mode 100644 node_modules/ejs/Jakefile create mode 100644 node_modules/ejs/LICENSE create mode 100644 node_modules/ejs/README.md create mode 100644 node_modules/ejs/ejs.js create mode 100644 node_modules/ejs/ejs.min.js create mode 100644 node_modules/ejs/lib/ejs.js create mode 100644 node_modules/ejs/lib/utils.js create mode 100644 node_modules/ejs/package.json create mode 100644 node_modules/encodeurl/HISTORY.md create mode 100644 node_modules/encodeurl/LICENSE create mode 100644 node_modules/encodeurl/README.md create mode 100644 node_modules/encodeurl/index.js create mode 100644 node_modules/encodeurl/package.json create mode 100644 node_modules/error-ex/LICENSE create mode 100644 node_modules/error-ex/README.md create mode 100644 node_modules/error-ex/index.js create mode 100644 node_modules/error-ex/package.json create mode 100644 node_modules/es5-ext/.editorconfig create mode 100644 node_modules/es5-ext/CHANGELOG.md create mode 100644 node_modules/es5-ext/CHANGES create mode 100644 node_modules/es5-ext/LICENSE create mode 100644 node_modules/es5-ext/README.md create mode 100644 node_modules/es5-ext/array/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/array/#/_compare-by-length.js create mode 100644 node_modules/es5-ext/array/#/binary-search.js create mode 100644 node_modules/es5-ext/array/#/clear.js create mode 100644 node_modules/es5-ext/array/#/compact.js create mode 100644 node_modules/es5-ext/array/#/concat/implement.js create mode 100644 node_modules/es5-ext/array/#/concat/index.js create mode 100644 node_modules/es5-ext/array/#/concat/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/concat/shim.js create mode 100644 node_modules/es5-ext/array/#/contains.js create mode 100644 node_modules/es5-ext/array/#/copy-within/implement.js create mode 100644 node_modules/es5-ext/array/#/copy-within/index.js create mode 100644 node_modules/es5-ext/array/#/copy-within/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/copy-within/shim.js create mode 100644 node_modules/es5-ext/array/#/diff.js create mode 100644 node_modules/es5-ext/array/#/e-index-of.js create mode 100644 node_modules/es5-ext/array/#/e-last-index-of.js create mode 100644 node_modules/es5-ext/array/#/entries/implement.js create mode 100644 node_modules/es5-ext/array/#/entries/index.js create mode 100644 node_modules/es5-ext/array/#/entries/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/entries/shim.js create mode 100644 node_modules/es5-ext/array/#/exclusion.js create mode 100644 node_modules/es5-ext/array/#/fill/implement.js create mode 100644 node_modules/es5-ext/array/#/fill/index.js create mode 100644 node_modules/es5-ext/array/#/fill/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/fill/shim.js create mode 100644 node_modules/es5-ext/array/#/filter/implement.js create mode 100644 node_modules/es5-ext/array/#/filter/index.js create mode 100644 node_modules/es5-ext/array/#/filter/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/filter/shim.js create mode 100644 node_modules/es5-ext/array/#/find-index/implement.js create mode 100644 node_modules/es5-ext/array/#/find-index/index.js create mode 100644 node_modules/es5-ext/array/#/find-index/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/find-index/shim.js create mode 100644 node_modules/es5-ext/array/#/find/implement.js create mode 100644 node_modules/es5-ext/array/#/find/index.js create mode 100644 node_modules/es5-ext/array/#/find/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/find/shim.js create mode 100644 node_modules/es5-ext/array/#/first-index.js create mode 100644 node_modules/es5-ext/array/#/first.js create mode 100644 node_modules/es5-ext/array/#/flatten.js create mode 100644 node_modules/es5-ext/array/#/for-each-right.js create mode 100644 node_modules/es5-ext/array/#/group.js create mode 100644 node_modules/es5-ext/array/#/index.js create mode 100644 node_modules/es5-ext/array/#/indexes-of.js create mode 100644 node_modules/es5-ext/array/#/intersection.js create mode 100644 node_modules/es5-ext/array/#/is-copy.js create mode 100644 node_modules/es5-ext/array/#/is-empty.js create mode 100644 node_modules/es5-ext/array/#/is-uniq.js create mode 100644 node_modules/es5-ext/array/#/keys/implement.js create mode 100644 node_modules/es5-ext/array/#/keys/index.js create mode 100644 node_modules/es5-ext/array/#/keys/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/keys/shim.js create mode 100644 node_modules/es5-ext/array/#/last-index.js create mode 100644 node_modules/es5-ext/array/#/last.js create mode 100644 node_modules/es5-ext/array/#/map/implement.js create mode 100644 node_modules/es5-ext/array/#/map/index.js create mode 100644 node_modules/es5-ext/array/#/map/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/map/shim.js create mode 100644 node_modules/es5-ext/array/#/remove.js create mode 100644 node_modules/es5-ext/array/#/separate.js create mode 100644 node_modules/es5-ext/array/#/slice/implement.js create mode 100644 node_modules/es5-ext/array/#/slice/index.js create mode 100644 node_modules/es5-ext/array/#/slice/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/slice/shim.js create mode 100644 node_modules/es5-ext/array/#/some-right.js create mode 100644 node_modules/es5-ext/array/#/splice/implement.js create mode 100644 node_modules/es5-ext/array/#/splice/index.js create mode 100644 node_modules/es5-ext/array/#/splice/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/splice/shim.js create mode 100644 node_modules/es5-ext/array/#/uniq.js create mode 100644 node_modules/es5-ext/array/#/values/implement.js create mode 100644 node_modules/es5-ext/array/#/values/index.js create mode 100644 node_modules/es5-ext/array/#/values/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/values/shim.js create mode 100644 node_modules/es5-ext/array/_is-extensible.js create mode 100644 node_modules/es5-ext/array/_sub-array-dummy-safe.js create mode 100644 node_modules/es5-ext/array/_sub-array-dummy.js create mode 100644 node_modules/es5-ext/array/from/implement.js create mode 100644 node_modules/es5-ext/array/from/index.js create mode 100644 node_modules/es5-ext/array/from/is-implemented.js create mode 100644 node_modules/es5-ext/array/from/shim.js create mode 100644 node_modules/es5-ext/array/generate.js create mode 100644 node_modules/es5-ext/array/index.js create mode 100644 node_modules/es5-ext/array/is-plain-array.js create mode 100644 node_modules/es5-ext/array/of/implement.js create mode 100644 node_modules/es5-ext/array/of/index.js create mode 100644 node_modules/es5-ext/array/of/is-implemented.js create mode 100644 node_modules/es5-ext/array/of/shim.js create mode 100644 node_modules/es5-ext/array/to-array.js create mode 100644 node_modules/es5-ext/array/valid-array.js create mode 100644 node_modules/es5-ext/boolean/index.js create mode 100644 node_modules/es5-ext/boolean/is-boolean.js create mode 100644 node_modules/es5-ext/date/#/copy.js create mode 100644 node_modules/es5-ext/date/#/days-in-month.js create mode 100644 node_modules/es5-ext/date/#/floor-day.js create mode 100644 node_modules/es5-ext/date/#/floor-month.js create mode 100644 node_modules/es5-ext/date/#/floor-year.js create mode 100644 node_modules/es5-ext/date/#/format.js create mode 100644 node_modules/es5-ext/date/#/index.js create mode 100644 node_modules/es5-ext/date/ensure-time-value.js create mode 100644 node_modules/es5-ext/date/index.js create mode 100644 node_modules/es5-ext/date/is-date.js create mode 100644 node_modules/es5-ext/date/is-time-value.js create mode 100644 node_modules/es5-ext/date/valid-date.js create mode 100644 node_modules/es5-ext/error/#/index.js create mode 100644 node_modules/es5-ext/error/#/throw.js create mode 100644 node_modules/es5-ext/error/custom.js create mode 100644 node_modules/es5-ext/error/index.js create mode 100644 node_modules/es5-ext/error/is-error.js create mode 100644 node_modules/es5-ext/error/valid-error.js create mode 100644 node_modules/es5-ext/function/#/compose.js create mode 100644 node_modules/es5-ext/function/#/copy.js create mode 100644 node_modules/es5-ext/function/#/curry.js create mode 100644 node_modules/es5-ext/function/#/index.js create mode 100644 node_modules/es5-ext/function/#/lock.js create mode 100644 node_modules/es5-ext/function/#/not.js create mode 100644 node_modules/es5-ext/function/#/partial.js create mode 100644 node_modules/es5-ext/function/#/spread.js create mode 100644 node_modules/es5-ext/function/#/to-string-tokens.js create mode 100644 node_modules/es5-ext/function/_define-length.js create mode 100644 node_modules/es5-ext/function/constant.js create mode 100644 node_modules/es5-ext/function/identity.js create mode 100644 node_modules/es5-ext/function/index.js create mode 100644 node_modules/es5-ext/function/invoke.js create mode 100644 node_modules/es5-ext/function/is-arguments.js create mode 100644 node_modules/es5-ext/function/is-function.js create mode 100644 node_modules/es5-ext/function/noop.js create mode 100644 node_modules/es5-ext/function/pluck.js create mode 100644 node_modules/es5-ext/function/valid-function.js create mode 100644 node_modules/es5-ext/global.js create mode 100644 node_modules/es5-ext/index.js create mode 100644 node_modules/es5-ext/iterable/for-each.js create mode 100644 node_modules/es5-ext/iterable/index.js create mode 100644 node_modules/es5-ext/iterable/is.js create mode 100644 node_modules/es5-ext/iterable/validate-object.js create mode 100644 node_modules/es5-ext/iterable/validate.js create mode 100644 node_modules/es5-ext/json/index.js create mode 100644 node_modules/es5-ext/json/safe-stringify.js create mode 100644 node_modules/es5-ext/math/_pack-ieee754.js create mode 100644 node_modules/es5-ext/math/_unpack-ieee754.js create mode 100644 node_modules/es5-ext/math/acosh/implement.js create mode 100644 node_modules/es5-ext/math/acosh/index.js create mode 100644 node_modules/es5-ext/math/acosh/is-implemented.js create mode 100644 node_modules/es5-ext/math/acosh/shim.js create mode 100644 node_modules/es5-ext/math/asinh/implement.js create mode 100644 node_modules/es5-ext/math/asinh/index.js create mode 100644 node_modules/es5-ext/math/asinh/is-implemented.js create mode 100644 node_modules/es5-ext/math/asinh/shim.js create mode 100644 node_modules/es5-ext/math/atanh/implement.js create mode 100644 node_modules/es5-ext/math/atanh/index.js create mode 100644 node_modules/es5-ext/math/atanh/is-implemented.js create mode 100644 node_modules/es5-ext/math/atanh/shim.js create mode 100644 node_modules/es5-ext/math/cbrt/implement.js create mode 100644 node_modules/es5-ext/math/cbrt/index.js create mode 100644 node_modules/es5-ext/math/cbrt/is-implemented.js create mode 100644 node_modules/es5-ext/math/cbrt/shim.js create mode 100644 node_modules/es5-ext/math/clz32/implement.js create mode 100644 node_modules/es5-ext/math/clz32/index.js create mode 100644 node_modules/es5-ext/math/clz32/is-implemented.js create mode 100644 node_modules/es5-ext/math/clz32/shim.js create mode 100644 node_modules/es5-ext/math/cosh/implement.js create mode 100644 node_modules/es5-ext/math/cosh/index.js create mode 100644 node_modules/es5-ext/math/cosh/is-implemented.js create mode 100644 node_modules/es5-ext/math/cosh/shim.js create mode 100644 node_modules/es5-ext/math/expm1/implement.js create mode 100644 node_modules/es5-ext/math/expm1/index.js create mode 100644 node_modules/es5-ext/math/expm1/is-implemented.js create mode 100644 node_modules/es5-ext/math/expm1/shim.js create mode 100644 node_modules/es5-ext/math/fround/implement.js create mode 100644 node_modules/es5-ext/math/fround/index.js create mode 100644 node_modules/es5-ext/math/fround/is-implemented.js create mode 100644 node_modules/es5-ext/math/fround/shim.js create mode 100644 node_modules/es5-ext/math/hypot/implement.js create mode 100644 node_modules/es5-ext/math/hypot/index.js create mode 100644 node_modules/es5-ext/math/hypot/is-implemented.js create mode 100644 node_modules/es5-ext/math/hypot/shim.js create mode 100644 node_modules/es5-ext/math/imul/implement.js create mode 100644 node_modules/es5-ext/math/imul/index.js create mode 100644 node_modules/es5-ext/math/imul/is-implemented.js create mode 100644 node_modules/es5-ext/math/imul/shim.js create mode 100644 node_modules/es5-ext/math/index.js create mode 100644 node_modules/es5-ext/math/log10/implement.js create mode 100644 node_modules/es5-ext/math/log10/index.js create mode 100644 node_modules/es5-ext/math/log10/is-implemented.js create mode 100644 node_modules/es5-ext/math/log10/shim.js create mode 100644 node_modules/es5-ext/math/log1p/implement.js create mode 100644 node_modules/es5-ext/math/log1p/index.js create mode 100644 node_modules/es5-ext/math/log1p/is-implemented.js create mode 100644 node_modules/es5-ext/math/log1p/shim.js create mode 100644 node_modules/es5-ext/math/log2/implement.js create mode 100644 node_modules/es5-ext/math/log2/index.js create mode 100644 node_modules/es5-ext/math/log2/is-implemented.js create mode 100644 node_modules/es5-ext/math/log2/shim.js create mode 100644 node_modules/es5-ext/math/sign/implement.js create mode 100644 node_modules/es5-ext/math/sign/index.js create mode 100644 node_modules/es5-ext/math/sign/is-implemented.js create mode 100644 node_modules/es5-ext/math/sign/shim.js create mode 100644 node_modules/es5-ext/math/sinh/implement.js create mode 100644 node_modules/es5-ext/math/sinh/index.js create mode 100644 node_modules/es5-ext/math/sinh/is-implemented.js create mode 100644 node_modules/es5-ext/math/sinh/shim.js create mode 100644 node_modules/es5-ext/math/tanh/implement.js create mode 100644 node_modules/es5-ext/math/tanh/index.js create mode 100644 node_modules/es5-ext/math/tanh/is-implemented.js create mode 100644 node_modules/es5-ext/math/tanh/shim.js create mode 100644 node_modules/es5-ext/math/trunc/implement.js create mode 100644 node_modules/es5-ext/math/trunc/index.js create mode 100644 node_modules/es5-ext/math/trunc/is-implemented.js create mode 100644 node_modules/es5-ext/math/trunc/shim.js create mode 100644 node_modules/es5-ext/number/#/index.js create mode 100644 node_modules/es5-ext/number/#/pad.js create mode 100644 node_modules/es5-ext/number/epsilon/implement.js create mode 100644 node_modules/es5-ext/number/epsilon/index.js create mode 100644 node_modules/es5-ext/number/epsilon/is-implemented.js create mode 100644 node_modules/es5-ext/number/index.js create mode 100644 node_modules/es5-ext/number/is-finite/implement.js create mode 100644 node_modules/es5-ext/number/is-finite/index.js create mode 100644 node_modules/es5-ext/number/is-finite/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-finite/shim.js create mode 100644 node_modules/es5-ext/number/is-integer/implement.js create mode 100644 node_modules/es5-ext/number/is-integer/index.js create mode 100644 node_modules/es5-ext/number/is-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-integer/shim.js create mode 100644 node_modules/es5-ext/number/is-nan/implement.js create mode 100644 node_modules/es5-ext/number/is-nan/index.js create mode 100644 node_modules/es5-ext/number/is-nan/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-nan/shim.js create mode 100644 node_modules/es5-ext/number/is-natural.js create mode 100644 node_modules/es5-ext/number/is-number.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/shim.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/to-integer.js create mode 100644 node_modules/es5-ext/number/to-pos-integer.js create mode 100644 node_modules/es5-ext/number/to-uint32.js create mode 100644 node_modules/es5-ext/object/_iterate.js create mode 100644 node_modules/es5-ext/object/assign-deep.js create mode 100644 node_modules/es5-ext/object/assign/implement.js create mode 100644 node_modules/es5-ext/object/assign/index.js create mode 100644 node_modules/es5-ext/object/assign/is-implemented.js create mode 100644 node_modules/es5-ext/object/assign/shim.js create mode 100644 node_modules/es5-ext/object/clear.js create mode 100644 node_modules/es5-ext/object/compact.js create mode 100644 node_modules/es5-ext/object/compare.js create mode 100644 node_modules/es5-ext/object/copy-deep.js create mode 100644 node_modules/es5-ext/object/copy.js create mode 100644 node_modules/es5-ext/object/count.js create mode 100644 node_modules/es5-ext/object/create.js create mode 100644 node_modules/es5-ext/object/ensure-array.js create mode 100644 node_modules/es5-ext/object/ensure-finite-number.js create mode 100644 node_modules/es5-ext/object/ensure-natural-number-value.js create mode 100644 node_modules/es5-ext/object/ensure-natural-number.js create mode 100644 node_modules/es5-ext/object/ensure-promise.js create mode 100644 node_modules/es5-ext/object/eq.js create mode 100644 node_modules/es5-ext/object/every.js create mode 100644 node_modules/es5-ext/object/filter.js create mode 100644 node_modules/es5-ext/object/find-key.js create mode 100644 node_modules/es5-ext/object/find.js create mode 100644 node_modules/es5-ext/object/first-key.js create mode 100644 node_modules/es5-ext/object/flatten.js create mode 100644 node_modules/es5-ext/object/for-each.js create mode 100644 node_modules/es5-ext/object/get-property-names.js create mode 100644 node_modules/es5-ext/object/index.js create mode 100644 node_modules/es5-ext/object/is-array-like.js create mode 100644 node_modules/es5-ext/object/is-callable.js create mode 100644 node_modules/es5-ext/object/is-copy-deep.js create mode 100644 node_modules/es5-ext/object/is-copy.js create mode 100644 node_modules/es5-ext/object/is-empty.js create mode 100644 node_modules/es5-ext/object/is-finite-number.js create mode 100644 node_modules/es5-ext/object/is-natural-number-value.js create mode 100644 node_modules/es5-ext/object/is-natural-number.js create mode 100644 node_modules/es5-ext/object/is-number-value.js create mode 100644 node_modules/es5-ext/object/is-object.js create mode 100644 node_modules/es5-ext/object/is-plain-function.js create mode 100644 node_modules/es5-ext/object/is-plain-object.js create mode 100644 node_modules/es5-ext/object/is-promise.js create mode 100644 node_modules/es5-ext/object/is-value.js create mode 100644 node_modules/es5-ext/object/is.js create mode 100644 node_modules/es5-ext/object/key-of.js create mode 100644 node_modules/es5-ext/object/keys/implement.js create mode 100644 node_modules/es5-ext/object/keys/index.js create mode 100644 node_modules/es5-ext/object/keys/is-implemented.js create mode 100644 node_modules/es5-ext/object/keys/shim.js create mode 100644 node_modules/es5-ext/object/map-keys.js create mode 100644 node_modules/es5-ext/object/map.js create mode 100644 node_modules/es5-ext/object/mixin-prototypes.js create mode 100644 node_modules/es5-ext/object/mixin.js create mode 100644 node_modules/es5-ext/object/normalize-options.js create mode 100644 node_modules/es5-ext/object/primitive-set.js create mode 100644 node_modules/es5-ext/object/safe-traverse.js create mode 100644 node_modules/es5-ext/object/serialize.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/implement.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/index.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/is-implemented.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/shim.js create mode 100644 node_modules/es5-ext/object/some.js create mode 100644 node_modules/es5-ext/object/to-array.js create mode 100644 node_modules/es5-ext/object/unserialize.js create mode 100644 node_modules/es5-ext/object/valid-callable.js create mode 100644 node_modules/es5-ext/object/valid-object.js create mode 100644 node_modules/es5-ext/object/valid-value.js create mode 100644 node_modules/es5-ext/object/validate-array-like-object.js create mode 100644 node_modules/es5-ext/object/validate-array-like.js create mode 100644 node_modules/es5-ext/object/validate-stringifiable-value.js create mode 100644 node_modules/es5-ext/object/validate-stringifiable.js create mode 100644 node_modules/es5-ext/optional-chaining.js create mode 100644 node_modules/es5-ext/package.json create mode 100644 node_modules/es5-ext/promise/.eslintrc.json create mode 100644 node_modules/es5-ext/promise/index.js create mode 100644 node_modules/es5-ext/promise/lazy.js create mode 100644 node_modules/es5-ext/reg-exp/#/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/is-sticky.js create mode 100644 node_modules/es5-ext/reg-exp/#/is-unicode.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/sticky/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/unicode/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/escape.js create mode 100644 node_modules/es5-ext/reg-exp/index.js create mode 100644 node_modules/es5-ext/reg-exp/is-reg-exp.js create mode 100644 node_modules/es5-ext/reg-exp/valid-reg-exp.js create mode 100644 node_modules/es5-ext/safe-to-string.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/string/#/at.js create mode 100644 node_modules/es5-ext/string/#/camel-to-hyphen.js create mode 100644 node_modules/es5-ext/string/#/capitalize.js create mode 100644 node_modules/es5-ext/string/#/case-insensitive-compare.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/implement.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/index.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/shim.js create mode 100644 node_modules/es5-ext/string/#/contains/implement.js create mode 100644 node_modules/es5-ext/string/#/contains/index.js create mode 100644 node_modules/es5-ext/string/#/contains/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/contains/shim.js create mode 100644 node_modules/es5-ext/string/#/count.js create mode 100644 node_modules/es5-ext/string/#/ends-with/implement.js create mode 100644 node_modules/es5-ext/string/#/ends-with/index.js create mode 100644 node_modules/es5-ext/string/#/ends-with/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/ends-with/shim.js create mode 100644 node_modules/es5-ext/string/#/hyphen-to-camel.js create mode 100644 node_modules/es5-ext/string/#/indent.js create mode 100644 node_modules/es5-ext/string/#/index.js create mode 100644 node_modules/es5-ext/string/#/last.js create mode 100644 node_modules/es5-ext/string/#/normalize/_data.js create mode 100644 node_modules/es5-ext/string/#/normalize/implement.js create mode 100644 node_modules/es5-ext/string/#/normalize/index.js create mode 100644 node_modules/es5-ext/string/#/normalize/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/normalize/shim.js create mode 100644 node_modules/es5-ext/string/#/pad.js create mode 100644 node_modules/es5-ext/string/#/plain-replace-all.js create mode 100644 node_modules/es5-ext/string/#/plain-replace.js create mode 100644 node_modules/es5-ext/string/#/repeat/implement.js create mode 100644 node_modules/es5-ext/string/#/repeat/index.js create mode 100644 node_modules/es5-ext/string/#/repeat/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/repeat/shim.js create mode 100644 node_modules/es5-ext/string/#/starts-with/implement.js create mode 100644 node_modules/es5-ext/string/#/starts-with/index.js create mode 100644 node_modules/es5-ext/string/#/starts-with/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/starts-with/shim.js create mode 100644 node_modules/es5-ext/string/#/uncapitalize.js create mode 100644 node_modules/es5-ext/string/format-method.js create mode 100644 node_modules/es5-ext/string/from-code-point/implement.js create mode 100644 node_modules/es5-ext/string/from-code-point/index.js create mode 100644 node_modules/es5-ext/string/from-code-point/is-implemented.js create mode 100644 node_modules/es5-ext/string/from-code-point/shim.js create mode 100644 node_modules/es5-ext/string/index.js create mode 100644 node_modules/es5-ext/string/is-string.js create mode 100644 node_modules/es5-ext/string/random-uniq.js create mode 100644 node_modules/es5-ext/string/random.js create mode 100644 node_modules/es5-ext/string/raw/implement.js create mode 100644 node_modules/es5-ext/string/raw/index.js create mode 100644 node_modules/es5-ext/string/raw/is-implemented.js create mode 100644 node_modules/es5-ext/string/raw/shim.js create mode 100644 node_modules/es5-ext/test/.eslintrc.json create mode 100644 node_modules/es5-ext/test/__tad.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/test/array/#/_compare-by-length.js create mode 100644 node_modules/es5-ext/test/array/#/binary-search.js create mode 100644 node_modules/es5-ext/test/array/#/clear.js create mode 100644 node_modules/es5-ext/test/array/#/compact.js create mode 100644 node_modules/es5-ext/test/array/#/concat/implement.js create mode 100644 node_modules/es5-ext/test/array/#/concat/index.js create mode 100644 node_modules/es5-ext/test/array/#/concat/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/concat/shim.js create mode 100644 node_modules/es5-ext/test/array/#/contains.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/implement.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/index.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/shim.js create mode 100644 node_modules/es5-ext/test/array/#/diff.js create mode 100644 node_modules/es5-ext/test/array/#/e-index-of.js create mode 100644 node_modules/es5-ext/test/array/#/e-last-index-of.js create mode 100644 node_modules/es5-ext/test/array/#/entries/implement.js create mode 100644 node_modules/es5-ext/test/array/#/entries/index.js create mode 100644 node_modules/es5-ext/test/array/#/entries/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/entries/shim.js create mode 100644 node_modules/es5-ext/test/array/#/exclusion.js create mode 100644 node_modules/es5-ext/test/array/#/fill/implement.js create mode 100644 node_modules/es5-ext/test/array/#/fill/index.js create mode 100644 node_modules/es5-ext/test/array/#/fill/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/fill/shim.js create mode 100644 node_modules/es5-ext/test/array/#/filter/implement.js create mode 100644 node_modules/es5-ext/test/array/#/filter/index.js create mode 100644 node_modules/es5-ext/test/array/#/filter/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/filter/shim.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/implement.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/index.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/shim.js create mode 100644 node_modules/es5-ext/test/array/#/find/implement.js create mode 100644 node_modules/es5-ext/test/array/#/find/index.js create mode 100644 node_modules/es5-ext/test/array/#/find/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/find/shim.js create mode 100644 node_modules/es5-ext/test/array/#/first-index.js create mode 100644 node_modules/es5-ext/test/array/#/first.js create mode 100644 node_modules/es5-ext/test/array/#/flatten.js create mode 100644 node_modules/es5-ext/test/array/#/for-each-right.js create mode 100644 node_modules/es5-ext/test/array/#/group.js create mode 100644 node_modules/es5-ext/test/array/#/indexes-of.js create mode 100644 node_modules/es5-ext/test/array/#/intersection.js create mode 100644 node_modules/es5-ext/test/array/#/is-copy.js create mode 100644 node_modules/es5-ext/test/array/#/is-empty.js create mode 100644 node_modules/es5-ext/test/array/#/is-uniq.js create mode 100644 node_modules/es5-ext/test/array/#/keys/implement.js create mode 100644 node_modules/es5-ext/test/array/#/keys/index.js create mode 100644 node_modules/es5-ext/test/array/#/keys/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/keys/shim.js create mode 100644 node_modules/es5-ext/test/array/#/last-index.js create mode 100644 node_modules/es5-ext/test/array/#/last.js create mode 100644 node_modules/es5-ext/test/array/#/map/implement.js create mode 100644 node_modules/es5-ext/test/array/#/map/index.js create mode 100644 node_modules/es5-ext/test/array/#/map/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/map/shim.js create mode 100644 node_modules/es5-ext/test/array/#/remove.js create mode 100644 node_modules/es5-ext/test/array/#/separate.js create mode 100644 node_modules/es5-ext/test/array/#/slice/implement.js create mode 100644 node_modules/es5-ext/test/array/#/slice/index.js create mode 100644 node_modules/es5-ext/test/array/#/slice/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/slice/shim.js create mode 100644 node_modules/es5-ext/test/array/#/some-right.js create mode 100644 node_modules/es5-ext/test/array/#/splice/implement.js create mode 100644 node_modules/es5-ext/test/array/#/splice/index.js create mode 100644 node_modules/es5-ext/test/array/#/splice/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/splice/shim.js create mode 100644 node_modules/es5-ext/test/array/#/uniq.js create mode 100644 node_modules/es5-ext/test/array/#/values/implement.js create mode 100644 node_modules/es5-ext/test/array/#/values/index.js create mode 100644 node_modules/es5-ext/test/array/#/values/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/values/shim.js create mode 100644 node_modules/es5-ext/test/array/__scopes.js create mode 100644 node_modules/es5-ext/test/array/_is-extensible.js create mode 100644 node_modules/es5-ext/test/array/_sub-array-dummy-safe.js create mode 100644 node_modules/es5-ext/test/array/_sub-array-dummy.js create mode 100644 node_modules/es5-ext/test/array/from/implement.js create mode 100644 node_modules/es5-ext/test/array/from/index.js create mode 100644 node_modules/es5-ext/test/array/from/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/from/shim.js create mode 100644 node_modules/es5-ext/test/array/generate.js create mode 100644 node_modules/es5-ext/test/array/is-plain-array.js create mode 100644 node_modules/es5-ext/test/array/of/implement.js create mode 100644 node_modules/es5-ext/test/array/of/index.js create mode 100644 node_modules/es5-ext/test/array/of/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/of/shim.js create mode 100644 node_modules/es5-ext/test/array/to-array.js create mode 100644 node_modules/es5-ext/test/array/valid-array.js create mode 100644 node_modules/es5-ext/test/boolean/is-boolean.js create mode 100644 node_modules/es5-ext/test/date/#/copy.js create mode 100644 node_modules/es5-ext/test/date/#/days-in-month.js create mode 100644 node_modules/es5-ext/test/date/#/floor-day.js create mode 100644 node_modules/es5-ext/test/date/#/floor-month.js create mode 100644 node_modules/es5-ext/test/date/#/floor-year.js create mode 100644 node_modules/es5-ext/test/date/#/format.js create mode 100644 node_modules/es5-ext/test/date/ensure-time-value.js create mode 100644 node_modules/es5-ext/test/date/is-date.js create mode 100644 node_modules/es5-ext/test/date/is-time-value.js create mode 100644 node_modules/es5-ext/test/date/valid-date.js create mode 100644 node_modules/es5-ext/test/error/#/throw.js create mode 100644 node_modules/es5-ext/test/error/custom.js create mode 100644 node_modules/es5-ext/test/error/is-error.js create mode 100644 node_modules/es5-ext/test/error/valid-error.js create mode 100644 node_modules/es5-ext/test/function/#/compose.js create mode 100644 node_modules/es5-ext/test/function/#/copy.js create mode 100644 node_modules/es5-ext/test/function/#/curry.js create mode 100644 node_modules/es5-ext/test/function/#/lock.js create mode 100644 node_modules/es5-ext/test/function/#/not.js create mode 100644 node_modules/es5-ext/test/function/#/partial.js create mode 100644 node_modules/es5-ext/test/function/#/spread.js create mode 100644 node_modules/es5-ext/test/function/#/to-string-tokens.js create mode 100644 node_modules/es5-ext/test/function/_define-length.js create mode 100644 node_modules/es5-ext/test/function/constant.js create mode 100644 node_modules/es5-ext/test/function/identity.js create mode 100644 node_modules/es5-ext/test/function/invoke.js create mode 100644 node_modules/es5-ext/test/function/is-arguments.js create mode 100644 node_modules/es5-ext/test/function/is-function.js create mode 100644 node_modules/es5-ext/test/function/noop.js create mode 100644 node_modules/es5-ext/test/function/pluck.js create mode 100644 node_modules/es5-ext/test/function/valid-function.js create mode 100644 node_modules/es5-ext/test/global.js create mode 100644 node_modules/es5-ext/test/iterable/for-each.js create mode 100644 node_modules/es5-ext/test/iterable/is.js create mode 100644 node_modules/es5-ext/test/iterable/validate-object.js create mode 100644 node_modules/es5-ext/test/iterable/validate.js create mode 100644 node_modules/es5-ext/test/json/safe-stringify.js create mode 100644 node_modules/es5-ext/test/math/_pack-ieee754.js create mode 100644 node_modules/es5-ext/test/math/_unpack-ieee754.js create mode 100644 node_modules/es5-ext/test/math/acosh/implement.js create mode 100644 node_modules/es5-ext/test/math/acosh/index.js create mode 100644 node_modules/es5-ext/test/math/acosh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/acosh/shim.js create mode 100644 node_modules/es5-ext/test/math/asinh/implement.js create mode 100644 node_modules/es5-ext/test/math/asinh/index.js create mode 100644 node_modules/es5-ext/test/math/asinh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/asinh/shim.js create mode 100644 node_modules/es5-ext/test/math/atanh/implement.js create mode 100644 node_modules/es5-ext/test/math/atanh/index.js create mode 100644 node_modules/es5-ext/test/math/atanh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/atanh/shim.js create mode 100644 node_modules/es5-ext/test/math/cbrt/implement.js create mode 100644 node_modules/es5-ext/test/math/cbrt/index.js create mode 100644 node_modules/es5-ext/test/math/cbrt/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/cbrt/shim.js create mode 100644 node_modules/es5-ext/test/math/clz32/implement.js create mode 100644 node_modules/es5-ext/test/math/clz32/index.js create mode 100644 node_modules/es5-ext/test/math/clz32/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/clz32/shim.js create mode 100644 node_modules/es5-ext/test/math/cosh/implement.js create mode 100644 node_modules/es5-ext/test/math/cosh/index.js create mode 100644 node_modules/es5-ext/test/math/cosh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/cosh/shim.js create mode 100644 node_modules/es5-ext/test/math/expm1/implement.js create mode 100644 node_modules/es5-ext/test/math/expm1/index.js create mode 100644 node_modules/es5-ext/test/math/expm1/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/expm1/shim.js create mode 100644 node_modules/es5-ext/test/math/fround/implement.js create mode 100644 node_modules/es5-ext/test/math/fround/index.js create mode 100644 node_modules/es5-ext/test/math/fround/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/fround/shim.js create mode 100644 node_modules/es5-ext/test/math/hypot/implement.js create mode 100644 node_modules/es5-ext/test/math/hypot/index.js create mode 100644 node_modules/es5-ext/test/math/hypot/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/hypot/shim.js create mode 100644 node_modules/es5-ext/test/math/imul/implement.js create mode 100644 node_modules/es5-ext/test/math/imul/index.js create mode 100644 node_modules/es5-ext/test/math/imul/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/imul/shim.js create mode 100644 node_modules/es5-ext/test/math/log10/implement.js create mode 100644 node_modules/es5-ext/test/math/log10/index.js create mode 100644 node_modules/es5-ext/test/math/log10/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log10/shim.js create mode 100644 node_modules/es5-ext/test/math/log1p/implement.js create mode 100644 node_modules/es5-ext/test/math/log1p/index.js create mode 100644 node_modules/es5-ext/test/math/log1p/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log1p/shim.js create mode 100644 node_modules/es5-ext/test/math/log2/implement.js create mode 100644 node_modules/es5-ext/test/math/log2/index.js create mode 100644 node_modules/es5-ext/test/math/log2/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log2/shim.js create mode 100644 node_modules/es5-ext/test/math/sign/implement.js create mode 100644 node_modules/es5-ext/test/math/sign/index.js create mode 100644 node_modules/es5-ext/test/math/sign/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/sign/shim.js create mode 100644 node_modules/es5-ext/test/math/sinh/implement.js create mode 100644 node_modules/es5-ext/test/math/sinh/index.js create mode 100644 node_modules/es5-ext/test/math/sinh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/sinh/shim.js create mode 100644 node_modules/es5-ext/test/math/tanh/implement.js create mode 100644 node_modules/es5-ext/test/math/tanh/index.js create mode 100644 node_modules/es5-ext/test/math/tanh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/tanh/shim.js create mode 100644 node_modules/es5-ext/test/math/trunc/implement.js create mode 100644 node_modules/es5-ext/test/math/trunc/index.js create mode 100644 node_modules/es5-ext/test/math/trunc/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/trunc/shim.js create mode 100644 node_modules/es5-ext/test/number/#/pad.js create mode 100644 node_modules/es5-ext/test/number/epsilon/implement.js create mode 100644 node_modules/es5-ext/test/number/epsilon/index.js create mode 100644 node_modules/es5-ext/test/number/epsilon/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-finite/implement.js create mode 100644 node_modules/es5-ext/test/number/is-finite/index.js create mode 100644 node_modules/es5-ext/test/number/is-finite/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-finite/shim.js create mode 100644 node_modules/es5-ext/test/number/is-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/is-integer/index.js create mode 100644 node_modules/es5-ext/test/number/is-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-integer/shim.js create mode 100644 node_modules/es5-ext/test/number/is-nan/implement.js create mode 100644 node_modules/es5-ext/test/number/is-nan/index.js create mode 100644 node_modules/es5-ext/test/number/is-nan/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-nan/shim.js create mode 100644 node_modules/es5-ext/test/number/is-natural.js create mode 100644 node_modules/es5-ext/test/number/is-number.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/shim.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/to-integer.js create mode 100644 node_modules/es5-ext/test/number/to-pos-integer.js create mode 100644 node_modules/es5-ext/test/number/to-uint32.js create mode 100644 node_modules/es5-ext/test/object/_iterate.js create mode 100644 node_modules/es5-ext/test/object/assign-deep.js create mode 100644 node_modules/es5-ext/test/object/assign/implement.js create mode 100644 node_modules/es5-ext/test/object/assign/index.js create mode 100644 node_modules/es5-ext/test/object/assign/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/assign/shim.js create mode 100644 node_modules/es5-ext/test/object/clear.js create mode 100644 node_modules/es5-ext/test/object/compact.js create mode 100644 node_modules/es5-ext/test/object/compare.js create mode 100644 node_modules/es5-ext/test/object/copy-deep.js create mode 100644 node_modules/es5-ext/test/object/copy.js create mode 100644 node_modules/es5-ext/test/object/count.js create mode 100644 node_modules/es5-ext/test/object/create.js create mode 100644 node_modules/es5-ext/test/object/ensure-array.js create mode 100644 node_modules/es5-ext/test/object/ensure-finite-number.js create mode 100644 node_modules/es5-ext/test/object/ensure-natural-number-value.js create mode 100644 node_modules/es5-ext/test/object/ensure-natural-number.js create mode 100644 node_modules/es5-ext/test/object/ensure-promise.js create mode 100644 node_modules/es5-ext/test/object/eq.js create mode 100644 node_modules/es5-ext/test/object/every.js create mode 100644 node_modules/es5-ext/test/object/filter.js create mode 100644 node_modules/es5-ext/test/object/find-key.js create mode 100644 node_modules/es5-ext/test/object/find.js create mode 100644 node_modules/es5-ext/test/object/first-key.js create mode 100644 node_modules/es5-ext/test/object/flatten.js create mode 100644 node_modules/es5-ext/test/object/for-each.js create mode 100644 node_modules/es5-ext/test/object/get-property-names.js create mode 100644 node_modules/es5-ext/test/object/is-array-like.js create mode 100644 node_modules/es5-ext/test/object/is-callable.js create mode 100644 node_modules/es5-ext/test/object/is-copy-deep.js create mode 100644 node_modules/es5-ext/test/object/is-copy.js create mode 100644 node_modules/es5-ext/test/object/is-empty.js create mode 100644 node_modules/es5-ext/test/object/is-finite-number.js create mode 100644 node_modules/es5-ext/test/object/is-natural-number-value.js create mode 100644 node_modules/es5-ext/test/object/is-natural-number.js create mode 100644 node_modules/es5-ext/test/object/is-number-value.js create mode 100644 node_modules/es5-ext/test/object/is-object.js create mode 100644 node_modules/es5-ext/test/object/is-plain-function.js create mode 100644 node_modules/es5-ext/test/object/is-plain-object.js create mode 100644 node_modules/es5-ext/test/object/is-promise.js create mode 100644 node_modules/es5-ext/test/object/is-value.js create mode 100644 node_modules/es5-ext/test/object/is.js create mode 100644 node_modules/es5-ext/test/object/key-of.js create mode 100644 node_modules/es5-ext/test/object/keys/implement.js create mode 100644 node_modules/es5-ext/test/object/keys/index.js create mode 100644 node_modules/es5-ext/test/object/keys/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/keys/shim.js create mode 100644 node_modules/es5-ext/test/object/map-keys.js create mode 100644 node_modules/es5-ext/test/object/map.js create mode 100644 node_modules/es5-ext/test/object/mixin-prototypes.js create mode 100644 node_modules/es5-ext/test/object/mixin.js create mode 100644 node_modules/es5-ext/test/object/normalize-options.js create mode 100644 node_modules/es5-ext/test/object/primitive-set.js create mode 100644 node_modules/es5-ext/test/object/safe-traverse.js create mode 100644 node_modules/es5-ext/test/object/serialize.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/implement.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/index.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/shim.js create mode 100644 node_modules/es5-ext/test/object/some.js create mode 100644 node_modules/es5-ext/test/object/to-array.js create mode 100644 node_modules/es5-ext/test/object/unserialize.js create mode 100644 node_modules/es5-ext/test/object/valid-callable.js create mode 100644 node_modules/es5-ext/test/object/valid-object.js create mode 100644 node_modules/es5-ext/test/object/valid-value.js create mode 100644 node_modules/es5-ext/test/object/validate-array-like-object.js create mode 100644 node_modules/es5-ext/test/object/validate-array-like.js create mode 100644 node_modules/es5-ext/test/object/validate-stringifiable-value.js create mode 100644 node_modules/es5-ext/test/object/validate-stringifiable.js create mode 100644 node_modules/es5-ext/test/optional-chaining.js create mode 100644 node_modules/es5-ext/test/promise/.eslintrc.json create mode 100644 node_modules/es5-ext/test/promise/lazy.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/is-sticky.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/is-unicode.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/sticky/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/unicode/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/escape.js create mode 100644 node_modules/es5-ext/test/reg-exp/is-reg-exp.js create mode 100644 node_modules/es5-ext/test/reg-exp/valid-reg-exp.js create mode 100644 node_modules/es5-ext/test/safe-to-string.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/test/string/#/at.js create mode 100644 node_modules/es5-ext/test/string/#/camel-to-hyphen.js create mode 100644 node_modules/es5-ext/test/string/#/capitalize.js create mode 100644 node_modules/es5-ext/test/string/#/case-insensitive-compare.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/implement.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/index.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/shim.js create mode 100644 node_modules/es5-ext/test/string/#/contains/implement.js create mode 100644 node_modules/es5-ext/test/string/#/contains/index.js create mode 100644 node_modules/es5-ext/test/string/#/contains/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/contains/shim.js create mode 100644 node_modules/es5-ext/test/string/#/count.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/implement.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/index.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/shim.js create mode 100644 node_modules/es5-ext/test/string/#/hyphen-to-camel.js create mode 100644 node_modules/es5-ext/test/string/#/indent.js create mode 100644 node_modules/es5-ext/test/string/#/last.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/_data.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/implement.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/index.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/shim.js create mode 100644 node_modules/es5-ext/test/string/#/pad.js create mode 100644 node_modules/es5-ext/test/string/#/plain-replace-all.js create mode 100644 node_modules/es5-ext/test/string/#/plain-replace.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/implement.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/index.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/shim.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/implement.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/index.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/shim.js create mode 100644 node_modules/es5-ext/test/string/#/uncapitalize.js create mode 100644 node_modules/es5-ext/test/string/format-method.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/implement.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/index.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/shim.js create mode 100644 node_modules/es5-ext/test/string/is-string.js create mode 100644 node_modules/es5-ext/test/string/random-uniq.js create mode 100644 node_modules/es5-ext/test/string/random.js create mode 100644 node_modules/es5-ext/test/string/raw/implement.js create mode 100644 node_modules/es5-ext/test/string/raw/index.js create mode 100644 node_modules/es5-ext/test/string/raw/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/raw/shim.js create mode 100644 node_modules/es5-ext/test/to-short-string-representation.js create mode 100644 node_modules/es5-ext/to-short-string-representation.js create mode 100644 node_modules/es6-iterator/#/chain.js create mode 100644 node_modules/es6-iterator/.editorconfig create mode 100644 node_modules/es6-iterator/.npmignore create mode 100644 node_modules/es6-iterator/CHANGELOG.md create mode 100644 node_modules/es6-iterator/CHANGES create mode 100644 node_modules/es6-iterator/LICENSE create mode 100644 node_modules/es6-iterator/README.md create mode 100644 node_modules/es6-iterator/appveyor.yml create mode 100644 node_modules/es6-iterator/array.js create mode 100644 node_modules/es6-iterator/for-of.js create mode 100644 node_modules/es6-iterator/get.js create mode 100644 node_modules/es6-iterator/index.js create mode 100644 node_modules/es6-iterator/is-iterable.js create mode 100644 node_modules/es6-iterator/package.json create mode 100644 node_modules/es6-iterator/string.js create mode 100644 node_modules/es6-iterator/test/#/chain.js create mode 100644 node_modules/es6-iterator/test/.eslintrc.json create mode 100644 node_modules/es6-iterator/test/array.js create mode 100644 node_modules/es6-iterator/test/for-of.js create mode 100644 node_modules/es6-iterator/test/get.js create mode 100644 node_modules/es6-iterator/test/index.js create mode 100644 node_modules/es6-iterator/test/is-iterable.js create mode 100644 node_modules/es6-iterator/test/string.js create mode 100644 node_modules/es6-iterator/test/valid-iterable.js create mode 100644 node_modules/es6-iterator/valid-iterable.js create mode 100644 node_modules/es6-symbol/.lint create mode 100644 node_modules/es6-symbol/.npmignore create mode 100644 node_modules/es6-symbol/.travis.yml create mode 100644 node_modules/es6-symbol/CHANGES create mode 100644 node_modules/es6-symbol/LICENSE create mode 100644 node_modules/es6-symbol/README.md create mode 100644 node_modules/es6-symbol/implement.js create mode 100644 node_modules/es6-symbol/index.js create mode 100644 node_modules/es6-symbol/is-implemented.js create mode 100644 node_modules/es6-symbol/is-native-implemented.js create mode 100644 node_modules/es6-symbol/is-symbol.js create mode 100644 node_modules/es6-symbol/package.json create mode 100644 node_modules/es6-symbol/polyfill.js create mode 100644 node_modules/es6-symbol/test/implement.js create mode 100644 node_modules/es6-symbol/test/index.js create mode 100644 node_modules/es6-symbol/test/is-implemented.js create mode 100644 node_modules/es6-symbol/test/is-native-implemented.js create mode 100644 node_modules/es6-symbol/test/is-symbol.js create mode 100644 node_modules/es6-symbol/test/polyfill.js create mode 100644 node_modules/es6-symbol/test/validate-symbol.js create mode 100644 node_modules/es6-symbol/validate-symbol.js create mode 100644 node_modules/es6-weak-map/.lint create mode 100644 node_modules/es6-weak-map/.npmignore create mode 100644 node_modules/es6-weak-map/.travis.yml create mode 100644 node_modules/es6-weak-map/CHANGES create mode 100644 node_modules/es6-weak-map/LICENSE create mode 100644 node_modules/es6-weak-map/README.md create mode 100644 node_modules/es6-weak-map/implement.js create mode 100644 node_modules/es6-weak-map/index.js create mode 100644 node_modules/es6-weak-map/is-implemented.js create mode 100644 node_modules/es6-weak-map/is-native-implemented.js create mode 100644 node_modules/es6-weak-map/is-weak-map.js create mode 100644 node_modules/es6-weak-map/package.json create mode 100644 node_modules/es6-weak-map/polyfill.js create mode 100644 node_modules/es6-weak-map/test/implement.js create mode 100644 node_modules/es6-weak-map/test/index.js create mode 100644 node_modules/es6-weak-map/test/is-implemented.js create mode 100644 node_modules/es6-weak-map/test/is-native-implemented.js create mode 100644 node_modules/es6-weak-map/test/is-weak-map.js create mode 100644 node_modules/es6-weak-map/test/polyfill.js create mode 100644 node_modules/es6-weak-map/test/valid-weak-map.js create mode 100644 node_modules/es6-weak-map/valid-weak-map.js create mode 100644 node_modules/escape-html/LICENSE create mode 100644 node_modules/escape-html/Readme.md create mode 100644 node_modules/escape-html/index.js create mode 100644 node_modules/escape-html/package.json create mode 100644 node_modules/escape-string-regexp/index.js create mode 100644 node_modules/escape-string-regexp/license create mode 100644 node_modules/escape-string-regexp/package.json create mode 100644 node_modules/escape-string-regexp/readme.md create mode 100644 node_modules/etag/HISTORY.md create mode 100644 node_modules/etag/LICENSE create mode 100644 node_modules/etag/README.md create mode 100644 node_modules/etag/index.js create mode 100644 node_modules/etag/package.json create mode 100644 node_modules/event-emitter/.lint create mode 100644 node_modules/event-emitter/.npmignore create mode 100644 node_modules/event-emitter/.testignore create mode 100644 node_modules/event-emitter/.travis.yml create mode 100644 node_modules/event-emitter/CHANGES create mode 100644 node_modules/event-emitter/LICENSE create mode 100644 node_modules/event-emitter/README.md create mode 100644 node_modules/event-emitter/all-off.js create mode 100644 node_modules/event-emitter/benchmark/many-on.js create mode 100644 node_modules/event-emitter/benchmark/single-on.js create mode 100644 node_modules/event-emitter/emit-error.js create mode 100644 node_modules/event-emitter/has-listeners.js create mode 100644 node_modules/event-emitter/index.js create mode 100644 node_modules/event-emitter/package.json create mode 100644 node_modules/event-emitter/pipe.js create mode 100644 node_modules/event-emitter/test/all-off.js create mode 100644 node_modules/event-emitter/test/emit-error.js create mode 100644 node_modules/event-emitter/test/has-listeners.js create mode 100644 node_modules/event-emitter/test/index.js create mode 100644 node_modules/event-emitter/test/pipe.js create mode 100644 node_modules/event-emitter/test/unify.js create mode 100644 node_modules/event-emitter/unify.js create mode 100644 node_modules/event-stream/.npmignore create mode 100644 node_modules/event-stream/.travis.yml create mode 100644 node_modules/event-stream/LICENCE create mode 100644 node_modules/event-stream/examples/pretty.js create mode 100644 node_modules/event-stream/index.js create mode 100644 node_modules/event-stream/node_modules/split/.npmignore create mode 100644 node_modules/event-stream/node_modules/split/.travis.yml create mode 100644 node_modules/event-stream/node_modules/split/LICENCE create mode 100644 node_modules/event-stream/node_modules/split/examples/pretty.js create mode 100644 node_modules/event-stream/node_modules/split/index.js create mode 100644 node_modules/event-stream/node_modules/split/package.json create mode 100644 node_modules/event-stream/node_modules/split/readme.markdown create mode 100644 node_modules/event-stream/node_modules/split/test/options.asynct.js create mode 100644 node_modules/event-stream/node_modules/split/test/partitioned_unicode.js create mode 100644 node_modules/event-stream/node_modules/split/test/split.asynct.js create mode 100644 node_modules/event-stream/node_modules/split/test/try_catch.asynct.js create mode 100644 node_modules/event-stream/package.json create mode 100644 node_modules/event-stream/readme.markdown create mode 100644 node_modules/event-stream/test/connect.asynct.js create mode 100644 node_modules/event-stream/test/helper/index.js create mode 100644 node_modules/event-stream/test/merge.asynct.js create mode 100644 node_modules/event-stream/test/parse.asynct.js create mode 100644 node_modules/event-stream/test/pause.asynct.js create mode 100644 node_modules/event-stream/test/pipeline.asynct.js create mode 100644 node_modules/event-stream/test/readArray.asynct.js create mode 100644 node_modules/event-stream/test/readable.asynct.js create mode 100644 node_modules/event-stream/test/replace.asynct.js create mode 100644 node_modules/event-stream/test/simple-map.asynct.js create mode 100644 node_modules/event-stream/test/spec.asynct.js create mode 100644 node_modules/event-stream/test/split.asynct.js create mode 100644 node_modules/event-stream/test/stringify.js create mode 100644 node_modules/event-stream/test/writeArray.asynct.js create mode 100644 node_modules/execa/index.js create mode 100644 node_modules/execa/lib/errname.js create mode 100644 node_modules/execa/lib/stdio.js create mode 100644 node_modules/execa/license create mode 100644 node_modules/execa/package.json create mode 100644 node_modules/execa/readme.md create mode 100644 node_modules/expand-brackets/LICENSE create mode 100644 node_modules/expand-brackets/README.md create mode 100644 node_modules/expand-brackets/changelog.md create mode 100644 node_modules/expand-brackets/index.js create mode 100644 node_modules/expand-brackets/lib/compilers.js create mode 100644 node_modules/expand-brackets/lib/parsers.js create mode 100644 node_modules/expand-brackets/lib/utils.js create mode 100644 node_modules/expand-brackets/node_modules/define-property/LICENSE create mode 100644 node_modules/expand-brackets/node_modules/define-property/README.md create mode 100644 node_modules/expand-brackets/node_modules/define-property/index.js create mode 100644 node_modules/expand-brackets/node_modules/define-property/package.json create mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/README.md create mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/index.js create mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/package.json create mode 100644 node_modules/expand-brackets/node_modules/is-accessor-descriptor/LICENSE create mode 100644 node_modules/expand-brackets/node_modules/is-accessor-descriptor/README.md create mode 100644 node_modules/expand-brackets/node_modules/is-accessor-descriptor/index.js create mode 100644 node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/expand-brackets/node_modules/is-accessor-descriptor/package.json create mode 100644 node_modules/expand-brackets/node_modules/is-data-descriptor/LICENSE create mode 100644 node_modules/expand-brackets/node_modules/is-data-descriptor/README.md create mode 100644 node_modules/expand-brackets/node_modules/is-data-descriptor/index.js create mode 100644 node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/expand-brackets/node_modules/is-data-descriptor/package.json create mode 100644 node_modules/expand-brackets/node_modules/is-descriptor/LICENSE create mode 100644 node_modules/expand-brackets/node_modules/is-descriptor/README.md create mode 100644 node_modules/expand-brackets/node_modules/is-descriptor/index.js create mode 100644 node_modules/expand-brackets/node_modules/is-descriptor/package.json create mode 100644 node_modules/expand-brackets/node_modules/kind-of/LICENSE create mode 100644 node_modules/expand-brackets/node_modules/kind-of/README.md create mode 100644 node_modules/expand-brackets/node_modules/kind-of/index.js create mode 100644 node_modules/expand-brackets/node_modules/kind-of/package.json create mode 100644 node_modules/expand-brackets/package.json create mode 100644 node_modules/express/History.md create mode 100644 node_modules/express/LICENSE create mode 100644 node_modules/express/Readme.md create mode 100644 node_modules/express/index.js create mode 100644 node_modules/express/lib/application.js create mode 100644 node_modules/express/lib/express.js create mode 100644 node_modules/express/lib/middleware/init.js create mode 100644 node_modules/express/lib/middleware/query.js create mode 100644 node_modules/express/lib/request.js create mode 100644 node_modules/express/lib/response.js create mode 100644 node_modules/express/lib/router/index.js create mode 100644 node_modules/express/lib/router/layer.js create mode 100644 node_modules/express/lib/router/route.js create mode 100644 node_modules/express/lib/utils.js create mode 100644 node_modules/express/lib/view.js create mode 100644 node_modules/express/node_modules/setprototypeof/LICENSE create mode 100644 node_modules/express/node_modules/setprototypeof/README.md create mode 100644 node_modules/express/node_modules/setprototypeof/index.d.ts create mode 100644 node_modules/express/node_modules/setprototypeof/index.js create mode 100644 node_modules/express/node_modules/setprototypeof/package.json create mode 100644 node_modules/express/node_modules/statuses/HISTORY.md create mode 100644 node_modules/express/node_modules/statuses/LICENSE create mode 100644 node_modules/express/node_modules/statuses/README.md create mode 100644 node_modules/express/node_modules/statuses/codes.json create mode 100644 node_modules/express/node_modules/statuses/index.js create mode 100644 node_modules/express/node_modules/statuses/package.json create mode 100644 node_modules/express/package.json create mode 100644 node_modules/extend-shallow/LICENSE create mode 100644 node_modules/extend-shallow/README.md create mode 100644 node_modules/extend-shallow/index.js create mode 100644 node_modules/extend-shallow/node_modules/is-extendable/LICENSE create mode 100644 node_modules/extend-shallow/node_modules/is-extendable/README.md create mode 100644 node_modules/extend-shallow/node_modules/is-extendable/index.d.ts create mode 100644 node_modules/extend-shallow/node_modules/is-extendable/index.js create mode 100644 node_modules/extend-shallow/node_modules/is-extendable/package.json create mode 100644 node_modules/extend-shallow/package.json create mode 100644 node_modules/extglob/LICENSE create mode 100644 node_modules/extglob/README.md create mode 100644 node_modules/extglob/changelog.md create mode 100644 node_modules/extglob/index.js create mode 100644 node_modules/extglob/lib/.DS_Store create mode 100644 node_modules/extglob/lib/compilers.js create mode 100644 node_modules/extglob/lib/extglob.js create mode 100644 node_modules/extglob/lib/parsers.js create mode 100644 node_modules/extglob/lib/utils.js create mode 100644 node_modules/extglob/node_modules/define-property/LICENSE create mode 100644 node_modules/extglob/node_modules/define-property/README.md create mode 100644 node_modules/extglob/node_modules/define-property/index.js create mode 100644 node_modules/extglob/node_modules/define-property/package.json create mode 100644 node_modules/extglob/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/extglob/node_modules/extend-shallow/README.md create mode 100644 node_modules/extglob/node_modules/extend-shallow/index.js create mode 100644 node_modules/extglob/node_modules/extend-shallow/package.json create mode 100644 node_modules/extglob/package.json create mode 100644 node_modules/fill-range/LICENSE create mode 100644 node_modules/fill-range/README.md create mode 100644 node_modules/fill-range/index.js create mode 100644 node_modules/fill-range/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/fill-range/node_modules/extend-shallow/README.md create mode 100644 node_modules/fill-range/node_modules/extend-shallow/index.js create mode 100644 node_modules/fill-range/node_modules/extend-shallow/package.json create mode 100644 node_modules/fill-range/package.json create mode 100644 node_modules/finalhandler/HISTORY.md create mode 100644 node_modules/finalhandler/LICENSE create mode 100644 node_modules/finalhandler/README.md create mode 100644 node_modules/finalhandler/index.js create mode 100644 node_modules/finalhandler/node_modules/statuses/HISTORY.md create mode 100644 node_modules/finalhandler/node_modules/statuses/LICENSE create mode 100644 node_modules/finalhandler/node_modules/statuses/README.md create mode 100644 node_modules/finalhandler/node_modules/statuses/codes.json create mode 100644 node_modules/finalhandler/node_modules/statuses/index.js create mode 100644 node_modules/finalhandler/node_modules/statuses/package.json create mode 100644 node_modules/finalhandler/package.json create mode 100644 node_modules/find-up/index.js create mode 100644 node_modules/find-up/license create mode 100644 node_modules/find-up/package.json create mode 100644 node_modules/find-up/readme.md create mode 100644 node_modules/for-in/LICENSE create mode 100644 node_modules/for-in/README.md create mode 100644 node_modules/for-in/index.js create mode 100644 node_modules/for-in/package.json create mode 100644 node_modules/forwarded/HISTORY.md create mode 100644 node_modules/forwarded/LICENSE create mode 100644 node_modules/forwarded/README.md create mode 100644 node_modules/forwarded/index.js create mode 100644 node_modules/forwarded/package.json create mode 100644 node_modules/fragment-cache/LICENSE create mode 100644 node_modules/fragment-cache/README.md create mode 100644 node_modules/fragment-cache/index.js create mode 100644 node_modules/fragment-cache/package.json create mode 100644 node_modules/fresh/HISTORY.md create mode 100644 node_modules/fresh/LICENSE create mode 100644 node_modules/fresh/README.md create mode 100644 node_modules/fresh/index.js create mode 100644 node_modules/fresh/package.json create mode 100644 node_modules/from/.npmignore create mode 100644 node_modules/from/.travis.yml create mode 100644 node_modules/from/LICENSE.APACHE2 create mode 100644 node_modules/from/LICENSE.MIT create mode 100644 node_modules/from/index.js create mode 100644 node_modules/from/package.json create mode 100644 node_modules/from/readme.markdown create mode 100644 node_modules/from/test/index.js create mode 100644 node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/fs-extra/LICENSE create mode 100644 node_modules/fs-extra/README.md create mode 100644 node_modules/fs-extra/docs/copy-sync.md create mode 100644 node_modules/fs-extra/docs/copy.md create mode 100644 node_modules/fs-extra/docs/emptyDir-sync.md create mode 100644 node_modules/fs-extra/docs/emptyDir.md create mode 100644 node_modules/fs-extra/docs/ensureDir-sync.md create mode 100644 node_modules/fs-extra/docs/ensureDir.md create mode 100644 node_modules/fs-extra/docs/ensureFile-sync.md create mode 100644 node_modules/fs-extra/docs/ensureFile.md create mode 100644 node_modules/fs-extra/docs/ensureLink-sync.md create mode 100644 node_modules/fs-extra/docs/ensureLink.md create mode 100644 node_modules/fs-extra/docs/ensureSymlink-sync.md create mode 100644 node_modules/fs-extra/docs/ensureSymlink.md create mode 100644 node_modules/fs-extra/docs/fs-read-write.md create mode 100644 node_modules/fs-extra/docs/move-sync.md create mode 100644 node_modules/fs-extra/docs/move.md create mode 100644 node_modules/fs-extra/docs/outputFile-sync.md create mode 100644 node_modules/fs-extra/docs/outputFile.md create mode 100644 node_modules/fs-extra/docs/outputJson-sync.md create mode 100644 node_modules/fs-extra/docs/outputJson.md create mode 100644 node_modules/fs-extra/docs/pathExists-sync.md create mode 100644 node_modules/fs-extra/docs/pathExists.md create mode 100644 node_modules/fs-extra/docs/readJson-sync.md create mode 100644 node_modules/fs-extra/docs/readJson.md create mode 100644 node_modules/fs-extra/docs/remove-sync.md create mode 100644 node_modules/fs-extra/docs/remove.md create mode 100644 node_modules/fs-extra/docs/writeJson-sync.md create mode 100644 node_modules/fs-extra/docs/writeJson.md create mode 100644 node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/fs-extra/lib/fs/index.js create mode 100644 node_modules/fs-extra/lib/index.js create mode 100644 node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 node_modules/fs-extra/lib/mkdirs/win32.js create mode 100644 node_modules/fs-extra/lib/move-sync/index.js create mode 100644 node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/fs-extra/lib/path-exists/index.js create mode 100644 node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/fs-extra/lib/util/assign.js create mode 100644 node_modules/fs-extra/lib/util/buffer.js create mode 100644 node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/fs-extra/package.json create mode 100644 node_modules/generic-pool/.eslintignore create mode 100644 node_modules/generic-pool/.eslintrc.js create mode 100644 node_modules/generic-pool/.travis.yml create mode 100644 node_modules/generic-pool/CHANGELOG.md create mode 100644 node_modules/generic-pool/Makefile create mode 100644 node_modules/generic-pool/README.md create mode 100644 node_modules/generic-pool/index.js create mode 100644 node_modules/generic-pool/lib/DefaultEvictor.js create mode 100644 node_modules/generic-pool/lib/Deferred.js create mode 100644 node_modules/generic-pool/lib/Deque.js create mode 100644 node_modules/generic-pool/lib/DequeIterator.js create mode 100644 node_modules/generic-pool/lib/DoublyLinkedList.js create mode 100644 node_modules/generic-pool/lib/DoublyLinkedListIterator.js create mode 100644 node_modules/generic-pool/lib/Pool.js create mode 100644 node_modules/generic-pool/lib/PoolDefaults.js create mode 100644 node_modules/generic-pool/lib/PoolOptions.js create mode 100644 node_modules/generic-pool/lib/PooledResource.js create mode 100644 node_modules/generic-pool/lib/PooledResourceStateEnum.js create mode 100644 node_modules/generic-pool/lib/PriorityQueue.js create mode 100644 node_modules/generic-pool/lib/Queue.js create mode 100644 node_modules/generic-pool/lib/ResourceLoan.js create mode 100644 node_modules/generic-pool/lib/ResourceRequest.js create mode 100644 node_modules/generic-pool/lib/errors.js create mode 100644 node_modules/generic-pool/lib/factoryValidator.js create mode 100644 node_modules/generic-pool/lib/utils.js create mode 100644 node_modules/generic-pool/package.json create mode 100644 node_modules/generic-pool/test/doubly-linked-list-iterator-test.js create mode 100644 node_modules/generic-pool/test/doubly-linked-list-test.js create mode 100644 node_modules/generic-pool/test/generic-pool-acquiretimeout-test.js create mode 100644 node_modules/generic-pool/test/generic-pool-test.js create mode 100644 node_modules/generic-pool/test/resource-request-test.js create mode 100644 node_modules/generic-pool/test/utils.js create mode 100644 node_modules/generic-pool/tsconfig.json create mode 100644 node_modules/get-caller-file/README.md create mode 100644 node_modules/get-caller-file/index.js create mode 100644 node_modules/get-caller-file/package.json create mode 100644 node_modules/get-stream/buffer-stream.js create mode 100644 node_modules/get-stream/index.js create mode 100644 node_modules/get-stream/license create mode 100644 node_modules/get-stream/package.json create mode 100644 node_modules/get-stream/readme.md create mode 100644 node_modules/get-value/LICENSE create mode 100644 node_modules/get-value/index.js create mode 100644 node_modules/get-value/package.json create mode 100644 node_modules/glob-parent/LICENSE create mode 100644 node_modules/glob-parent/README.md create mode 100644 node_modules/glob-parent/index.js create mode 100644 node_modules/glob-parent/node_modules/is-glob/LICENSE create mode 100644 node_modules/glob-parent/node_modules/is-glob/README.md create mode 100644 node_modules/glob-parent/node_modules/is-glob/index.js create mode 100644 node_modules/glob-parent/node_modules/is-glob/package.json create mode 100644 node_modules/glob-parent/package.json create mode 100644 node_modules/global-dirs/index.js create mode 100644 node_modules/global-dirs/license create mode 100644 node_modules/global-dirs/package.json create mode 100644 node_modules/global-dirs/readme.md create mode 100644 node_modules/got/index.js create mode 100644 node_modules/got/license create mode 100644 node_modules/got/package.json create mode 100644 node_modules/got/readme.md create mode 100644 node_modules/graceful-fs/LICENSE create mode 100644 node_modules/graceful-fs/README.md create mode 100644 node_modules/graceful-fs/fs.js create mode 100644 node_modules/graceful-fs/graceful-fs.js create mode 100644 node_modules/graceful-fs/legacy-streams.js create mode 100644 node_modules/graceful-fs/package.json create mode 100644 node_modules/graceful-fs/polyfills.js create mode 100644 node_modules/has-flag/index.js create mode 100644 node_modules/has-flag/license create mode 100644 node_modules/has-flag/package.json create mode 100644 node_modules/has-flag/readme.md create mode 100644 node_modules/has-value/LICENSE create mode 100644 node_modules/has-value/README.md create mode 100644 node_modules/has-value/index.js create mode 100644 node_modules/has-value/package.json create mode 100644 node_modules/has-values/LICENSE create mode 100644 node_modules/has-values/README.md create mode 100644 node_modules/has-values/index.js create mode 100644 node_modules/has-values/node_modules/kind-of/LICENSE create mode 100644 node_modules/has-values/node_modules/kind-of/README.md create mode 100644 node_modules/has-values/node_modules/kind-of/index.js create mode 100644 node_modules/has-values/node_modules/kind-of/package.json create mode 100644 node_modules/has-values/package.json create mode 100644 node_modules/hosted-git-info/LICENSE create mode 100644 node_modules/hosted-git-info/README.md create mode 100644 node_modules/hosted-git-info/git-host-info.js create mode 100644 node_modules/hosted-git-info/git-host.js create mode 100644 node_modules/hosted-git-info/index.js create mode 100644 node_modules/hosted-git-info/package.json create mode 100644 node_modules/http-errors/HISTORY.md create mode 100644 node_modules/http-errors/LICENSE create mode 100644 node_modules/http-errors/README.md create mode 100644 node_modules/http-errors/index.js create mode 100644 node_modules/http-errors/node_modules/depd/History.md create mode 100644 node_modules/http-errors/node_modules/depd/LICENSE create mode 100644 node_modules/http-errors/node_modules/depd/Readme.md create mode 100644 node_modules/http-errors/node_modules/depd/index.js create mode 100644 node_modules/http-errors/node_modules/depd/lib/browser/index.js create mode 100644 node_modules/http-errors/node_modules/depd/lib/compat/callsite-tostring.js create mode 100644 node_modules/http-errors/node_modules/depd/lib/compat/event-listener-count.js create mode 100644 node_modules/http-errors/node_modules/depd/lib/compat/index.js create mode 100644 node_modules/http-errors/node_modules/depd/package.json create mode 100644 node_modules/http-errors/package.json create mode 100644 node_modules/iconv-lite/.npmignore create mode 100644 node_modules/iconv-lite/.travis.yml create mode 100644 node_modules/iconv-lite/Changelog.md create mode 100644 node_modules/iconv-lite/LICENSE create mode 100644 node_modules/iconv-lite/README.md create mode 100644 node_modules/iconv-lite/encodings/dbcs-codec.js create mode 100644 node_modules/iconv-lite/encodings/dbcs-data.js create mode 100644 node_modules/iconv-lite/encodings/index.js create mode 100644 node_modules/iconv-lite/encodings/internal.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-codec.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-data-generated.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-data.js create mode 100644 node_modules/iconv-lite/encodings/tables/big5-added.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp936.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp949.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp950.json create mode 100644 node_modules/iconv-lite/encodings/tables/eucjp.json create mode 100644 node_modules/iconv-lite/encodings/tables/gb18030-ranges.json create mode 100644 node_modules/iconv-lite/encodings/tables/gbk-added.json create mode 100644 node_modules/iconv-lite/encodings/tables/shiftjis.json create mode 100644 node_modules/iconv-lite/encodings/utf16.js create mode 100644 node_modules/iconv-lite/encodings/utf7.js create mode 100644 node_modules/iconv-lite/lib/bom-handling.js create mode 100644 node_modules/iconv-lite/lib/extend-node.js create mode 100644 node_modules/iconv-lite/lib/index.d.ts create mode 100644 node_modules/iconv-lite/lib/index.js create mode 100644 node_modules/iconv-lite/lib/streams.js create mode 100644 node_modules/iconv-lite/package.json create mode 100644 node_modules/ignore-by-default/LICENSE create mode 100644 node_modules/ignore-by-default/README.md create mode 100644 node_modules/ignore-by-default/index.js create mode 100644 node_modules/ignore-by-default/package.json create mode 100644 node_modules/import-lazy/index.js create mode 100644 node_modules/import-lazy/license create mode 100644 node_modules/import-lazy/package.json create mode 100644 node_modules/import-lazy/readme.md create mode 100644 node_modules/imurmurhash/README.md create mode 100644 node_modules/imurmurhash/imurmurhash.js create mode 100644 node_modules/imurmurhash/imurmurhash.min.js create mode 100644 node_modules/imurmurhash/package.json create mode 100644 node_modules/inflection/.npmignore create mode 100644 node_modules/inflection/History.md create mode 100644 node_modules/inflection/Readme.md create mode 100644 node_modules/inflection/bower.json create mode 100644 node_modules/inflection/component.json create mode 100644 node_modules/inflection/inflection.min.js create mode 100644 node_modules/inflection/lib/inflection.js create mode 100644 node_modules/inflection/package.json create mode 100644 node_modules/inherits/LICENSE create mode 100644 node_modules/inherits/README.md create mode 100644 node_modules/inherits/inherits.js create mode 100644 node_modules/inherits/inherits_browser.js create mode 100644 node_modules/inherits/package.json create mode 100644 node_modules/ini/LICENSE create mode 100644 node_modules/ini/README.md create mode 100644 node_modules/ini/ini.js create mode 100644 node_modules/ini/package.json create mode 100644 node_modules/invert-kv/index.js create mode 100644 node_modules/invert-kv/package.json create mode 100644 node_modules/invert-kv/readme.md create mode 100644 node_modules/ipaddr.js/.npmignore create mode 100644 node_modules/ipaddr.js/.travis.yml create mode 100644 node_modules/ipaddr.js/Cakefile create mode 100644 node_modules/ipaddr.js/LICENSE create mode 100644 node_modules/ipaddr.js/README.md create mode 100644 node_modules/ipaddr.js/bower.json create mode 100644 node_modules/ipaddr.js/ipaddr.min.js create mode 100644 node_modules/ipaddr.js/lib/ipaddr.js create mode 100644 node_modules/ipaddr.js/lib/ipaddr.js.d.ts create mode 100644 node_modules/ipaddr.js/package.json create mode 100644 node_modules/ipaddr.js/src/ipaddr.coffee create mode 100644 node_modules/ipaddr.js/test/ipaddr.test.coffee create mode 100644 node_modules/is-accessor-descriptor/LICENSE create mode 100644 node_modules/is-accessor-descriptor/README.md create mode 100644 node_modules/is-accessor-descriptor/index.js create mode 100644 node_modules/is-accessor-descriptor/package.json create mode 100644 node_modules/is-arrayish/.editorconfig create mode 100644 node_modules/is-arrayish/.istanbul.yml create mode 100644 node_modules/is-arrayish/.npmignore create mode 100644 node_modules/is-arrayish/.travis.yml create mode 100644 node_modules/is-arrayish/LICENSE create mode 100644 node_modules/is-arrayish/README.md create mode 100644 node_modules/is-arrayish/index.js create mode 100644 node_modules/is-arrayish/package.json create mode 100644 node_modules/is-binary-path/index.js create mode 100644 node_modules/is-binary-path/license create mode 100644 node_modules/is-binary-path/package.json create mode 100644 node_modules/is-binary-path/readme.md create mode 100644 node_modules/is-bluebird/License create mode 100644 node_modules/is-bluebird/README.md create mode 100644 node_modules/is-bluebird/changelog.md create mode 100644 node_modules/is-bluebird/lib/index.js create mode 100644 node_modules/is-bluebird/package.json create mode 100644 node_modules/is-buffer/LICENSE create mode 100644 node_modules/is-buffer/README.md create mode 100644 node_modules/is-buffer/index.js create mode 100644 node_modules/is-buffer/package.json create mode 100644 node_modules/is-buffer/test/basic.js create mode 100644 node_modules/is-builtin-module/index.js create mode 100644 node_modules/is-builtin-module/license create mode 100644 node_modules/is-builtin-module/package.json create mode 100644 node_modules/is-builtin-module/readme.md create mode 100644 node_modules/is-data-descriptor/LICENSE create mode 100644 node_modules/is-data-descriptor/README.md create mode 100644 node_modules/is-data-descriptor/index.js create mode 100644 node_modules/is-data-descriptor/package.json create mode 100644 node_modules/is-descriptor/LICENSE create mode 100644 node_modules/is-descriptor/README.md create mode 100644 node_modules/is-descriptor/index.js create mode 100644 node_modules/is-descriptor/package.json create mode 100644 node_modules/is-extendable/LICENSE create mode 100644 node_modules/is-extendable/README.md create mode 100644 node_modules/is-extendable/index.js create mode 100644 node_modules/is-extendable/package.json create mode 100644 node_modules/is-extglob/LICENSE create mode 100644 node_modules/is-extglob/README.md create mode 100644 node_modules/is-extglob/index.js create mode 100644 node_modules/is-extglob/package.json create mode 100644 node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/is-glob/LICENSE create mode 100644 node_modules/is-glob/README.md create mode 100644 node_modules/is-glob/index.js create mode 100644 node_modules/is-glob/package.json create mode 100644 node_modules/is-installed-globally/index.js create mode 100644 node_modules/is-installed-globally/license create mode 100644 node_modules/is-installed-globally/package.json create mode 100644 node_modules/is-installed-globally/readme.md create mode 100644 node_modules/is-npm/index.js create mode 100644 node_modules/is-npm/package.json create mode 100644 node_modules/is-npm/readme.md create mode 100644 node_modules/is-number/LICENSE create mode 100644 node_modules/is-number/README.md create mode 100644 node_modules/is-number/index.js create mode 100644 node_modules/is-number/node_modules/kind-of/LICENSE create mode 100644 node_modules/is-number/node_modules/kind-of/README.md create mode 100644 node_modules/is-number/node_modules/kind-of/index.js create mode 100644 node_modules/is-number/node_modules/kind-of/package.json create mode 100644 node_modules/is-number/package.json create mode 100644 node_modules/is-obj/index.js create mode 100644 node_modules/is-obj/license create mode 100644 node_modules/is-obj/package.json create mode 100644 node_modules/is-obj/readme.md create mode 100644 node_modules/is-odd/LICENSE create mode 100644 node_modules/is-odd/README.md create mode 100644 node_modules/is-odd/index.js create mode 100644 node_modules/is-odd/node_modules/is-number/LICENSE create mode 100644 node_modules/is-odd/node_modules/is-number/README.md create mode 100644 node_modules/is-odd/node_modules/is-number/index.js create mode 100644 node_modules/is-odd/node_modules/is-number/package.json create mode 100644 node_modules/is-odd/package.json create mode 100644 node_modules/is-path-inside/index.js create mode 100644 node_modules/is-path-inside/license create mode 100644 node_modules/is-path-inside/package.json create mode 100644 node_modules/is-path-inside/readme.md create mode 100644 node_modules/is-plain-object/LICENSE create mode 100644 node_modules/is-plain-object/README.md create mode 100644 node_modules/is-plain-object/index.d.ts create mode 100644 node_modules/is-plain-object/index.js create mode 100644 node_modules/is-plain-object/package.json create mode 100644 node_modules/is-promise/.npmignore create mode 100644 node_modules/is-promise/.travis.yml create mode 100644 node_modules/is-promise/LICENSE create mode 100644 node_modules/is-promise/index.js create mode 100644 node_modules/is-promise/package.json create mode 100644 node_modules/is-promise/readme.md create mode 100644 node_modules/is-redirect/index.js create mode 100644 node_modules/is-redirect/license create mode 100644 node_modules/is-redirect/package.json create mode 100644 node_modules/is-redirect/readme.md create mode 100644 node_modules/is-retry-allowed/index.js create mode 100644 node_modules/is-retry-allowed/license create mode 100644 node_modules/is-retry-allowed/package.json create mode 100644 node_modules/is-retry-allowed/readme.md create mode 100644 node_modules/is-stream/index.js create mode 100644 node_modules/is-stream/license create mode 100644 node_modules/is-stream/package.json create mode 100644 node_modules/is-stream/readme.md create mode 100644 node_modules/is-windows/LICENSE create mode 100644 node_modules/is-windows/README.md create mode 100644 node_modules/is-windows/index.js create mode 100644 node_modules/is-windows/package.json create mode 100644 node_modules/isarray/.npmignore create mode 100644 node_modules/isarray/.travis.yml create mode 100644 node_modules/isarray/Makefile create mode 100644 node_modules/isarray/README.md create mode 100644 node_modules/isarray/component.json create mode 100644 node_modules/isarray/index.js create mode 100644 node_modules/isarray/package.json create mode 100644 node_modules/isarray/test.js create mode 100644 node_modules/isexe/.npmignore create mode 100644 node_modules/isexe/LICENSE create mode 100644 node_modules/isexe/README.md create mode 100644 node_modules/isexe/index.js create mode 100644 node_modules/isexe/mode.js create mode 100644 node_modules/isexe/package.json create mode 100644 node_modules/isexe/test/basic.js create mode 100644 node_modules/isexe/windows.js create mode 100644 node_modules/isobject/LICENSE create mode 100644 node_modules/isobject/README.md create mode 100644 node_modules/isobject/index.d.ts create mode 100644 node_modules/isobject/index.js create mode 100644 node_modules/isobject/package.json create mode 100644 node_modules/js-beautify/CHANGELOG.md create mode 100644 node_modules/js-beautify/CONTRIBUTING.md create mode 100644 node_modules/js-beautify/LICENSE create mode 100644 node_modules/js-beautify/README.md create mode 100755 node_modules/js-beautify/js/bin/css-beautify.js create mode 100755 node_modules/js-beautify/js/bin/html-beautify.js create mode 100755 node_modules/js-beautify/js/bin/js-beautify.js create mode 100644 node_modules/js-beautify/js/config/defaults.json create mode 100644 node_modules/js-beautify/js/index.js create mode 100644 node_modules/js-beautify/js/lib/beautify-css.js create mode 100644 node_modules/js-beautify/js/lib/beautify-html.js create mode 100644 node_modules/js-beautify/js/lib/beautify.js create mode 100755 node_modules/js-beautify/js/lib/cli.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/javascriptobfuscator_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/myobfuscate_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js create mode 100644 node_modules/js-beautify/js/src/core/acorn.js create mode 100644 node_modules/js-beautify/js/src/core/inputscanner.js create mode 100644 node_modules/js-beautify/js/src/core/options.js create mode 100644 node_modules/js-beautify/js/src/core/output.js create mode 100644 node_modules/js-beautify/js/src/core/token.js create mode 100644 node_modules/js-beautify/js/src/css/beautifier.js create mode 100644 node_modules/js-beautify/js/src/css/index.js create mode 100644 node_modules/js-beautify/js/src/html/beautifier.js create mode 100644 node_modules/js-beautify/js/src/html/index.js create mode 100644 node_modules/js-beautify/js/src/index.js create mode 100644 node_modules/js-beautify/js/src/javascript/beautifier.js create mode 100644 node_modules/js-beautify/js/src/javascript/index.js create mode 100644 node_modules/js-beautify/js/src/javascript/tokenizer.js create mode 100755 node_modules/js-beautify/js/test/amd-beautify-tests.js create mode 100644 node_modules/js-beautify/js/test/generated/beautify-css-tests.js create mode 100644 node_modules/js-beautify/js/test/generated/beautify-html-tests.js create mode 100644 node_modules/js-beautify/js/test/generated/beautify-javascript-tests.js create mode 100644 node_modules/js-beautify/js/test/node-beautify-html-perf-tests.js create mode 100644 node_modules/js-beautify/js/test/node-beautify-perf-tests.js create mode 100755 node_modules/js-beautify/js/test/node-beautify-tests.js create mode 100644 node_modules/js-beautify/js/test/requirejs-html-beautify.html create mode 100644 node_modules/js-beautify/js/test/resources/configerror/.jsbeautifyrc create mode 100644 node_modules/js-beautify/js/test/resources/configerror/subDir1/subDir2/empty.txt create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/.editorconfig create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/cr/.editorconfig create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/crlf/.editorconfig create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/error/.editorconfig create mode 100644 node_modules/js-beautify/js/test/resources/editorconfig/example-base.js create mode 100644 node_modules/js-beautify/js/test/resources/example1.js create mode 100644 node_modules/js-beautify/js/test/resources/indent11chars/.jsbeautifyrc create mode 100644 node_modules/js-beautify/js/test/resources/indent11chars/subDir1/subDir2/empty.txt create mode 100755 node_modules/js-beautify/js/test/run-tests create mode 100644 node_modules/js-beautify/js/test/sanitytest.js create mode 100755 node_modules/js-beautify/js/test/shell-smoke-test.sh create mode 120000 node_modules/js-beautify/node_modules/.bin/nopt create mode 100644 node_modules/js-beautify/node_modules/nopt/.npmignore create mode 100644 node_modules/js-beautify/node_modules/nopt/.travis.yml create mode 100644 node_modules/js-beautify/node_modules/nopt/LICENSE create mode 100644 node_modules/js-beautify/node_modules/nopt/README.md create mode 100755 node_modules/js-beautify/node_modules/nopt/bin/nopt.js create mode 100755 node_modules/js-beautify/node_modules/nopt/examples/my-program.js create mode 100644 node_modules/js-beautify/node_modules/nopt/lib/nopt.js create mode 100644 node_modules/js-beautify/node_modules/nopt/package.json create mode 100644 node_modules/js-beautify/node_modules/nopt/test/basic.js create mode 100644 node_modules/js-beautify/package.json create mode 100644 node_modules/js-string-escape/CHANGELOG.md create mode 100644 node_modules/js-string-escape/LICENSE create mode 100644 node_modules/js-string-escape/README.md create mode 100644 node_modules/js-string-escape/index.js create mode 100644 node_modules/js-string-escape/package.json create mode 100644 node_modules/jsonfile/CHANGELOG.md create mode 100644 node_modules/jsonfile/LICENSE create mode 100644 node_modules/jsonfile/README.md create mode 100644 node_modules/jsonfile/index.js create mode 100644 node_modules/jsonfile/package.json create mode 100644 node_modules/kind-of/CHANGELOG.md create mode 100644 node_modules/kind-of/LICENSE create mode 100644 node_modules/kind-of/README.md create mode 100644 node_modules/kind-of/index.js create mode 100644 node_modules/kind-of/package.json create mode 100644 node_modules/latest-version/index.js create mode 100644 node_modules/latest-version/license create mode 100644 node_modules/latest-version/package.json create mode 100644 node_modules/latest-version/readme.md create mode 100644 node_modules/lazy-cache/LICENSE create mode 100644 node_modules/lazy-cache/README.md create mode 100644 node_modules/lazy-cache/index.js create mode 100644 node_modules/lazy-cache/package.json create mode 100644 node_modules/lcid/index.js create mode 100644 node_modules/lcid/lcid.json create mode 100644 node_modules/lcid/license create mode 100644 node_modules/lcid/package.json create mode 100644 node_modules/lcid/readme.md create mode 100644 node_modules/load-json-file/index.js create mode 100644 node_modules/load-json-file/license create mode 100644 node_modules/load-json-file/node_modules/pify/index.js create mode 100644 node_modules/load-json-file/node_modules/pify/license create mode 100644 node_modules/load-json-file/node_modules/pify/package.json create mode 100644 node_modules/load-json-file/node_modules/pify/readme.md create mode 100644 node_modules/load-json-file/package.json create mode 100644 node_modules/load-json-file/readme.md create mode 100644 node_modules/locate-path/index.js create mode 100644 node_modules/locate-path/license create mode 100644 node_modules/locate-path/package.json create mode 100644 node_modules/locate-path/readme.md create mode 100644 node_modules/lodash/LICENSE create mode 100644 node_modules/lodash/README.md create mode 100644 node_modules/lodash/_DataView.js create mode 100644 node_modules/lodash/_Hash.js create mode 100644 node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/lodash/_ListCache.js create mode 100644 node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/lodash/_Map.js create mode 100644 node_modules/lodash/_MapCache.js create mode 100644 node_modules/lodash/_Promise.js create mode 100644 node_modules/lodash/_Set.js create mode 100644 node_modules/lodash/_SetCache.js create mode 100644 node_modules/lodash/_Stack.js create mode 100644 node_modules/lodash/_Symbol.js create mode 100644 node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/lodash/_WeakMap.js create mode 100644 node_modules/lodash/_apply.js create mode 100644 node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/lodash/_arrayEach.js create mode 100644 node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/lodash/_arrayMap.js create mode 100644 node_modules/lodash/_arrayPush.js create mode 100644 node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/lodash/_arraySample.js create mode 100644 node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/lodash/_arraySome.js create mode 100644 node_modules/lodash/_asciiSize.js create mode 100644 node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/lodash/_asciiWords.js create mode 100644 node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/lodash/_assignValue.js create mode 100644 node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/lodash/_baseAssign.js create mode 100644 node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/lodash/_baseAt.js create mode 100644 node_modules/lodash/_baseClamp.js create mode 100644 node_modules/lodash/_baseClone.js create mode 100644 node_modules/lodash/_baseConforms.js create mode 100644 node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/lodash/_baseCreate.js create mode 100644 node_modules/lodash/_baseDelay.js create mode 100644 node_modules/lodash/_baseDifference.js create mode 100644 node_modules/lodash/_baseEach.js create mode 100644 node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/lodash/_baseEvery.js create mode 100644 node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/lodash/_baseFill.js create mode 100644 node_modules/lodash/_baseFilter.js create mode 100644 node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/lodash/_baseFor.js create mode 100644 node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/lodash/_baseForRight.js create mode 100644 node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/lodash/_baseGet.js create mode 100644 node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/lodash/_baseGt.js create mode 100644 node_modules/lodash/_baseHas.js create mode 100644 node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/lodash/_baseInRange.js create mode 100644 node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/lodash/_baseInverter.js create mode 100644 node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/lodash/_baseKeys.js create mode 100644 node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/lodash/_baseLodash.js create mode 100644 node_modules/lodash/_baseLt.js create mode 100644 node_modules/lodash/_baseMap.js create mode 100644 node_modules/lodash/_baseMatches.js create mode 100644 node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/lodash/_baseMean.js create mode 100644 node_modules/lodash/_baseMerge.js create mode 100644 node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/lodash/_baseNth.js create mode 100644 node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/lodash/_basePick.js create mode 100644 node_modules/lodash/_basePickBy.js create mode 100644 node_modules/lodash/_baseProperty.js create mode 100644 node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/lodash/_basePullAll.js create mode 100644 node_modules/lodash/_basePullAt.js create mode 100644 node_modules/lodash/_baseRandom.js create mode 100644 node_modules/lodash/_baseRange.js create mode 100644 node_modules/lodash/_baseReduce.js create mode 100644 node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/lodash/_baseRest.js create mode 100644 node_modules/lodash/_baseSample.js create mode 100644 node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/lodash/_baseSet.js create mode 100644 node_modules/lodash/_baseSetData.js create mode 100644 node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/lodash/_baseSlice.js create mode 100644 node_modules/lodash/_baseSome.js create mode 100644 node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/lodash/_baseSum.js create mode 100644 node_modules/lodash/_baseTimes.js create mode 100644 node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/lodash/_baseToString.js create mode 100644 node_modules/lodash/_baseUnary.js create mode 100644 node_modules/lodash/_baseUniq.js create mode 100644 node_modules/lodash/_baseUnset.js create mode 100644 node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/lodash/_baseValues.js create mode 100644 node_modules/lodash/_baseWhile.js create mode 100644 node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/lodash/_baseXor.js create mode 100644 node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/lodash/_cacheHas.js create mode 100644 node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/lodash/_castFunction.js create mode 100644 node_modules/lodash/_castPath.js create mode 100644 node_modules/lodash/_castRest.js create mode 100644 node_modules/lodash/_castSlice.js create mode 100644 node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/lodash/_compareAscending.js create mode 100644 node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/lodash/_composeArgs.js create mode 100644 node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/lodash/_copyArray.js create mode 100644 node_modules/lodash/_copyObject.js create mode 100644 node_modules/lodash/_copySymbols.js create mode 100644 node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/lodash/_coreJsData.js create mode 100644 node_modules/lodash/_countHolders.js create mode 100644 node_modules/lodash/_createAggregator.js create mode 100644 node_modules/lodash/_createAssigner.js create mode 100644 node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/lodash/_createBind.js create mode 100644 node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/lodash/_createCompounder.js create mode 100644 node_modules/lodash/_createCtor.js create mode 100644 node_modules/lodash/_createCurry.js create mode 100644 node_modules/lodash/_createFind.js create mode 100644 node_modules/lodash/_createFlow.js create mode 100644 node_modules/lodash/_createHybrid.js create mode 100644 node_modules/lodash/_createInverter.js create mode 100644 node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/lodash/_createOver.js create mode 100644 node_modules/lodash/_createPadding.js create mode 100644 node_modules/lodash/_createPartial.js create mode 100644 node_modules/lodash/_createRange.js create mode 100644 node_modules/lodash/_createRecurry.js create mode 100644 node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/lodash/_createRound.js create mode 100644 node_modules/lodash/_createSet.js create mode 100644 node_modules/lodash/_createToPairs.js create mode 100644 node_modules/lodash/_createWrap.js create mode 100644 node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/lodash/_defineProperty.js create mode 100644 node_modules/lodash/_equalArrays.js create mode 100644 node_modules/lodash/_equalByTag.js create mode 100644 node_modules/lodash/_equalObjects.js create mode 100644 node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/lodash/_flatRest.js create mode 100644 node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/lodash/_getData.js create mode 100644 node_modules/lodash/_getFuncName.js create mode 100644 node_modules/lodash/_getHolder.js create mode 100644 node_modules/lodash/_getMapData.js create mode 100644 node_modules/lodash/_getMatchData.js create mode 100644 node_modules/lodash/_getNative.js create mode 100644 node_modules/lodash/_getPrototype.js create mode 100644 node_modules/lodash/_getRawTag.js create mode 100644 node_modules/lodash/_getSymbols.js create mode 100644 node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/lodash/_getTag.js create mode 100644 node_modules/lodash/_getValue.js create mode 100644 node_modules/lodash/_getView.js create mode 100644 node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/lodash/_hasPath.js create mode 100644 node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/lodash/_hashClear.js create mode 100644 node_modules/lodash/_hashDelete.js create mode 100644 node_modules/lodash/_hashGet.js create mode 100644 node_modules/lodash/_hashHas.js create mode 100644 node_modules/lodash/_hashSet.js create mode 100644 node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/lodash/_isIndex.js create mode 100644 node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/lodash/_isKey.js create mode 100644 node_modules/lodash/_isKeyable.js create mode 100644 node_modules/lodash/_isLaziable.js create mode 100644 node_modules/lodash/_isMaskable.js create mode 100644 node_modules/lodash/_isMasked.js create mode 100644 node_modules/lodash/_isPrototype.js create mode 100644 node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/lodash/_lazyClone.js create mode 100644 node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/lodash/_lazyValue.js create mode 100644 node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/lodash/_mapToArray.js create mode 100644 node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/lodash/_mergeData.js create mode 100644 node_modules/lodash/_metaMap.js create mode 100644 node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/lodash/_objectToString.js create mode 100644 node_modules/lodash/_overArg.js create mode 100644 node_modules/lodash/_overRest.js create mode 100644 node_modules/lodash/_parent.js create mode 100644 node_modules/lodash/_reEscape.js create mode 100644 node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/lodash/_realNames.js create mode 100644 node_modules/lodash/_reorder.js create mode 100644 node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/lodash/_root.js create mode 100644 node_modules/lodash/_safeGet.js create mode 100644 node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/lodash/_setData.js create mode 100644 node_modules/lodash/_setToArray.js create mode 100644 node_modules/lodash/_setToPairs.js create mode 100644 node_modules/lodash/_setToString.js create mode 100644 node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/lodash/_shortOut.js create mode 100644 node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/lodash/_stackClear.js create mode 100644 node_modules/lodash/_stackDelete.js create mode 100644 node_modules/lodash/_stackGet.js create mode 100644 node_modules/lodash/_stackHas.js create mode 100644 node_modules/lodash/_stackSet.js create mode 100644 node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/lodash/_stringSize.js create mode 100644 node_modules/lodash/_stringToArray.js create mode 100644 node_modules/lodash/_stringToPath.js create mode 100644 node_modules/lodash/_toKey.js create mode 100644 node_modules/lodash/_toSource.js create mode 100644 node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/lodash/add.js create mode 100644 node_modules/lodash/after.js create mode 100644 node_modules/lodash/array.js create mode 100644 node_modules/lodash/ary.js create mode 100644 node_modules/lodash/assign.js create mode 100644 node_modules/lodash/assignIn.js create mode 100644 node_modules/lodash/assignInWith.js create mode 100644 node_modules/lodash/assignWith.js create mode 100644 node_modules/lodash/at.js create mode 100644 node_modules/lodash/attempt.js create mode 100644 node_modules/lodash/before.js create mode 100644 node_modules/lodash/bind.js create mode 100644 node_modules/lodash/bindAll.js create mode 100644 node_modules/lodash/bindKey.js create mode 100644 node_modules/lodash/camelCase.js create mode 100644 node_modules/lodash/capitalize.js create mode 100644 node_modules/lodash/castArray.js create mode 100644 node_modules/lodash/ceil.js create mode 100644 node_modules/lodash/chain.js create mode 100644 node_modules/lodash/chunk.js create mode 100644 node_modules/lodash/clamp.js create mode 100644 node_modules/lodash/clone.js create mode 100644 node_modules/lodash/cloneDeep.js create mode 100644 node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/lodash/cloneWith.js create mode 100644 node_modules/lodash/collection.js create mode 100644 node_modules/lodash/commit.js create mode 100644 node_modules/lodash/compact.js create mode 100644 node_modules/lodash/concat.js create mode 100644 node_modules/lodash/cond.js create mode 100644 node_modules/lodash/conforms.js create mode 100644 node_modules/lodash/conformsTo.js create mode 100644 node_modules/lodash/constant.js create mode 100644 node_modules/lodash/core.js create mode 100644 node_modules/lodash/core.min.js create mode 100644 node_modules/lodash/countBy.js create mode 100644 node_modules/lodash/create.js create mode 100644 node_modules/lodash/curry.js create mode 100644 node_modules/lodash/curryRight.js create mode 100644 node_modules/lodash/date.js create mode 100644 node_modules/lodash/debounce.js create mode 100644 node_modules/lodash/deburr.js create mode 100644 node_modules/lodash/defaultTo.js create mode 100644 node_modules/lodash/defaults.js create mode 100644 node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/lodash/defer.js create mode 100644 node_modules/lodash/delay.js create mode 100644 node_modules/lodash/difference.js create mode 100644 node_modules/lodash/differenceBy.js create mode 100644 node_modules/lodash/differenceWith.js create mode 100644 node_modules/lodash/divide.js create mode 100644 node_modules/lodash/drop.js create mode 100644 node_modules/lodash/dropRight.js create mode 100644 node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/lodash/dropWhile.js create mode 100644 node_modules/lodash/each.js create mode 100644 node_modules/lodash/eachRight.js create mode 100644 node_modules/lodash/endsWith.js create mode 100644 node_modules/lodash/entries.js create mode 100644 node_modules/lodash/entriesIn.js create mode 100644 node_modules/lodash/eq.js create mode 100644 node_modules/lodash/escape.js create mode 100644 node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/lodash/every.js create mode 100644 node_modules/lodash/extend.js create mode 100644 node_modules/lodash/extendWith.js create mode 100644 node_modules/lodash/fill.js create mode 100644 node_modules/lodash/filter.js create mode 100644 node_modules/lodash/find.js create mode 100644 node_modules/lodash/findIndex.js create mode 100644 node_modules/lodash/findKey.js create mode 100644 node_modules/lodash/findLast.js create mode 100644 node_modules/lodash/findLastIndex.js create mode 100644 node_modules/lodash/findLastKey.js create mode 100644 node_modules/lodash/first.js create mode 100644 node_modules/lodash/flatMap.js create mode 100644 node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/lodash/flatten.js create mode 100644 node_modules/lodash/flattenDeep.js create mode 100644 node_modules/lodash/flattenDepth.js create mode 100644 node_modules/lodash/flip.js create mode 100644 node_modules/lodash/floor.js create mode 100644 node_modules/lodash/flow.js create mode 100644 node_modules/lodash/flowRight.js create mode 100644 node_modules/lodash/forEach.js create mode 100644 node_modules/lodash/forEachRight.js create mode 100644 node_modules/lodash/forIn.js create mode 100644 node_modules/lodash/forInRight.js create mode 100644 node_modules/lodash/forOwn.js create mode 100644 node_modules/lodash/forOwnRight.js create mode 100644 node_modules/lodash/fp.js create mode 100644 node_modules/lodash/fp/F.js create mode 100644 node_modules/lodash/fp/T.js create mode 100644 node_modules/lodash/fp/__.js create mode 100644 node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/lodash/fp/_util.js create mode 100644 node_modules/lodash/fp/add.js create mode 100644 node_modules/lodash/fp/after.js create mode 100644 node_modules/lodash/fp/all.js create mode 100644 node_modules/lodash/fp/allPass.js create mode 100644 node_modules/lodash/fp/always.js create mode 100644 node_modules/lodash/fp/any.js create mode 100644 node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/lodash/fp/apply.js create mode 100644 node_modules/lodash/fp/array.js create mode 100644 node_modules/lodash/fp/ary.js create mode 100644 node_modules/lodash/fp/assign.js create mode 100644 node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/lodash/fp/assoc.js create mode 100644 node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/lodash/fp/at.js create mode 100644 node_modules/lodash/fp/attempt.js create mode 100644 node_modules/lodash/fp/before.js create mode 100644 node_modules/lodash/fp/bind.js create mode 100644 node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/lodash/fp/castArray.js create mode 100644 node_modules/lodash/fp/ceil.js create mode 100644 node_modules/lodash/fp/chain.js create mode 100644 node_modules/lodash/fp/chunk.js create mode 100644 node_modules/lodash/fp/clamp.js create mode 100644 node_modules/lodash/fp/clone.js create mode 100644 node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/lodash/fp/collection.js create mode 100644 node_modules/lodash/fp/commit.js create mode 100644 node_modules/lodash/fp/compact.js create mode 100644 node_modules/lodash/fp/complement.js create mode 100644 node_modules/lodash/fp/compose.js create mode 100644 node_modules/lodash/fp/concat.js create mode 100644 node_modules/lodash/fp/cond.js create mode 100644 node_modules/lodash/fp/conforms.js create mode 100644 node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/lodash/fp/constant.js create mode 100644 node_modules/lodash/fp/contains.js create mode 100644 node_modules/lodash/fp/convert.js create mode 100644 node_modules/lodash/fp/countBy.js create mode 100644 node_modules/lodash/fp/create.js create mode 100644 node_modules/lodash/fp/curry.js create mode 100644 node_modules/lodash/fp/curryN.js create mode 100644 node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/lodash/fp/date.js create mode 100644 node_modules/lodash/fp/debounce.js create mode 100644 node_modules/lodash/fp/deburr.js create mode 100644 node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/lodash/fp/defaults.js create mode 100644 node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/lodash/fp/defer.js create mode 100644 node_modules/lodash/fp/delay.js create mode 100644 node_modules/lodash/fp/difference.js create mode 100644 node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/lodash/fp/divide.js create mode 100644 node_modules/lodash/fp/drop.js create mode 100644 node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/lodash/fp/each.js create mode 100644 node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/lodash/fp/entries.js create mode 100644 node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/lodash/fp/eq.js create mode 100644 node_modules/lodash/fp/equals.js create mode 100644 node_modules/lodash/fp/escape.js create mode 100644 node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/lodash/fp/every.js create mode 100644 node_modules/lodash/fp/extend.js create mode 100644 node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/lodash/fp/fill.js create mode 100644 node_modules/lodash/fp/filter.js create mode 100644 node_modules/lodash/fp/find.js create mode 100644 node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/lodash/fp/findKey.js create mode 100644 node_modules/lodash/fp/findLast.js create mode 100644 node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/lodash/fp/first.js create mode 100644 node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/lodash/fp/flatten.js create mode 100644 node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/lodash/fp/flip.js create mode 100644 node_modules/lodash/fp/floor.js create mode 100644 node_modules/lodash/fp/flow.js create mode 100644 node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/lodash/fp/forEach.js create mode 100644 node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/lodash/fp/forIn.js create mode 100644 node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/lodash/fp/function.js create mode 100644 node_modules/lodash/fp/functions.js create mode 100644 node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/lodash/fp/get.js create mode 100644 node_modules/lodash/fp/getOr.js create mode 100644 node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/lodash/fp/gt.js create mode 100644 node_modules/lodash/fp/gte.js create mode 100644 node_modules/lodash/fp/has.js create mode 100644 node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/lodash/fp/head.js create mode 100644 node_modules/lodash/fp/identical.js create mode 100644 node_modules/lodash/fp/identity.js create mode 100644 node_modules/lodash/fp/inRange.js create mode 100644 node_modules/lodash/fp/includes.js create mode 100644 node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/lodash/fp/init.js create mode 100644 node_modules/lodash/fp/initial.js create mode 100644 node_modules/lodash/fp/intersection.js create mode 100644 node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/lodash/fp/invert.js create mode 100644 node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/lodash/fp/invoke.js create mode 100644 node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/lodash/fp/isArray.js create mode 100644 node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/lodash/fp/isDate.js create mode 100644 node_modules/lodash/fp/isElement.js create mode 100644 node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/lodash/fp/isError.js create mode 100644 node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/lodash/fp/isLength.js create mode 100644 node_modules/lodash/fp/isMap.js create mode 100644 node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/lodash/fp/isNative.js create mode 100644 node_modules/lodash/fp/isNil.js create mode 100644 node_modules/lodash/fp/isNull.js create mode 100644 node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/lodash/fp/isObject.js create mode 100644 node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/lodash/fp/isSet.js create mode 100644 node_modules/lodash/fp/isString.js create mode 100644 node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/lodash/fp/join.js create mode 100644 node_modules/lodash/fp/juxt.js create mode 100644 node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/lodash/fp/keys.js create mode 100644 node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/lodash/fp/lang.js create mode 100644 node_modules/lodash/fp/last.js create mode 100644 node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/lodash/fp/lt.js create mode 100644 node_modules/lodash/fp/lte.js create mode 100644 node_modules/lodash/fp/map.js create mode 100644 node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/lodash/fp/matches.js create mode 100644 node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/lodash/fp/math.js create mode 100644 node_modules/lodash/fp/max.js create mode 100644 node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/lodash/fp/mean.js create mode 100644 node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/lodash/fp/memoize.js create mode 100644 node_modules/lodash/fp/merge.js create mode 100644 node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/lodash/fp/method.js create mode 100644 node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/lodash/fp/min.js create mode 100644 node_modules/lodash/fp/minBy.js create mode 100644 node_modules/lodash/fp/mixin.js create mode 100644 node_modules/lodash/fp/multiply.js create mode 100644 node_modules/lodash/fp/nAry.js create mode 100644 node_modules/lodash/fp/negate.js create mode 100644 node_modules/lodash/fp/next.js create mode 100644 node_modules/lodash/fp/noop.js create mode 100644 node_modules/lodash/fp/now.js create mode 100644 node_modules/lodash/fp/nth.js create mode 100644 node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/lodash/fp/number.js create mode 100644 node_modules/lodash/fp/object.js create mode 100644 node_modules/lodash/fp/omit.js create mode 100644 node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/lodash/fp/once.js create mode 100644 node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/lodash/fp/over.js create mode 100644 node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/lodash/fp/overSome.js create mode 100644 node_modules/lodash/fp/pad.js create mode 100644 node_modules/lodash/fp/padChars.js create mode 100644 node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/lodash/fp/padStart.js create mode 100644 node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/lodash/fp/partial.js create mode 100644 node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/lodash/fp/partition.js create mode 100644 node_modules/lodash/fp/path.js create mode 100644 node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/lodash/fp/paths.js create mode 100644 node_modules/lodash/fp/pick.js create mode 100644 node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/lodash/fp/pipe.js create mode 100644 node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/lodash/fp/plant.js create mode 100644 node_modules/lodash/fp/pluck.js create mode 100644 node_modules/lodash/fp/prop.js create mode 100644 node_modules/lodash/fp/propEq.js create mode 100644 node_modules/lodash/fp/propOr.js create mode 100644 node_modules/lodash/fp/property.js create mode 100644 node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/lodash/fp/props.js create mode 100644 node_modules/lodash/fp/pull.js create mode 100644 node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/lodash/fp/random.js create mode 100644 node_modules/lodash/fp/range.js create mode 100644 node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/lodash/fp/rearg.js create mode 100644 node_modules/lodash/fp/reduce.js create mode 100644 node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/lodash/fp/reject.js create mode 100644 node_modules/lodash/fp/remove.js create mode 100644 node_modules/lodash/fp/repeat.js create mode 100644 node_modules/lodash/fp/replace.js create mode 100644 node_modules/lodash/fp/rest.js create mode 100644 node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/lodash/fp/result.js create mode 100644 node_modules/lodash/fp/reverse.js create mode 100644 node_modules/lodash/fp/round.js create mode 100644 node_modules/lodash/fp/sample.js create mode 100644 node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/lodash/fp/seq.js create mode 100644 node_modules/lodash/fp/set.js create mode 100644 node_modules/lodash/fp/setWith.js create mode 100644 node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/lodash/fp/size.js create mode 100644 node_modules/lodash/fp/slice.js create mode 100644 node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/lodash/fp/some.js create mode 100644 node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/lodash/fp/split.js create mode 100644 node_modules/lodash/fp/spread.js create mode 100644 node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/lodash/fp/startCase.js create mode 100644 node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/lodash/fp/string.js create mode 100644 node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/lodash/fp/stubString.js create mode 100644 node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/lodash/fp/subtract.js create mode 100644 node_modules/lodash/fp/sum.js create mode 100644 node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/lodash/fp/tail.js create mode 100644 node_modules/lodash/fp/take.js create mode 100644 node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/lodash/fp/tap.js create mode 100644 node_modules/lodash/fp/template.js create mode 100644 node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/lodash/fp/throttle.js create mode 100644 node_modules/lodash/fp/thru.js create mode 100644 node_modules/lodash/fp/times.js create mode 100644 node_modules/lodash/fp/toArray.js create mode 100644 node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/lodash/fp/toLength.js create mode 100644 node_modules/lodash/fp/toLower.js create mode 100644 node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/lodash/fp/toPath.js create mode 100644 node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/lodash/fp/toString.js create mode 100644 node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/lodash/fp/transform.js create mode 100644 node_modules/lodash/fp/trim.js create mode 100644 node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/lodash/fp/truncate.js create mode 100644 node_modules/lodash/fp/unapply.js create mode 100644 node_modules/lodash/fp/unary.js create mode 100644 node_modules/lodash/fp/unescape.js create mode 100644 node_modules/lodash/fp/union.js create mode 100644 node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/lodash/fp/uniq.js create mode 100644 node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/lodash/fp/unnest.js create mode 100644 node_modules/lodash/fp/unset.js create mode 100644 node_modules/lodash/fp/unzip.js create mode 100644 node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/lodash/fp/update.js create mode 100644 node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/lodash/fp/useWith.js create mode 100644 node_modules/lodash/fp/util.js create mode 100644 node_modules/lodash/fp/value.js create mode 100644 node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/lodash/fp/values.js create mode 100644 node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/lodash/fp/where.js create mode 100644 node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/lodash/fp/without.js create mode 100644 node_modules/lodash/fp/words.js create mode 100644 node_modules/lodash/fp/wrap.js create mode 100644 node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/lodash/fp/xor.js create mode 100644 node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/lodash/fp/zip.js create mode 100644 node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/lodash/fromPairs.js create mode 100644 node_modules/lodash/function.js create mode 100644 node_modules/lodash/functions.js create mode 100644 node_modules/lodash/functionsIn.js create mode 100644 node_modules/lodash/get.js create mode 100644 node_modules/lodash/groupBy.js create mode 100644 node_modules/lodash/gt.js create mode 100644 node_modules/lodash/gte.js create mode 100644 node_modules/lodash/has.js create mode 100644 node_modules/lodash/hasIn.js create mode 100644 node_modules/lodash/head.js create mode 100644 node_modules/lodash/identity.js create mode 100644 node_modules/lodash/inRange.js create mode 100644 node_modules/lodash/includes.js create mode 100644 node_modules/lodash/index.js create mode 100644 node_modules/lodash/indexOf.js create mode 100644 node_modules/lodash/initial.js create mode 100644 node_modules/lodash/intersection.js create mode 100644 node_modules/lodash/intersectionBy.js create mode 100644 node_modules/lodash/intersectionWith.js create mode 100644 node_modules/lodash/invert.js create mode 100644 node_modules/lodash/invertBy.js create mode 100644 node_modules/lodash/invoke.js create mode 100644 node_modules/lodash/invokeMap.js create mode 100644 node_modules/lodash/isArguments.js create mode 100644 node_modules/lodash/isArray.js create mode 100644 node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/lodash/isArrayLike.js create mode 100644 node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/lodash/isBoolean.js create mode 100644 node_modules/lodash/isBuffer.js create mode 100644 node_modules/lodash/isDate.js create mode 100644 node_modules/lodash/isElement.js create mode 100644 node_modules/lodash/isEmpty.js create mode 100644 node_modules/lodash/isEqual.js create mode 100644 node_modules/lodash/isEqualWith.js create mode 100644 node_modules/lodash/isError.js create mode 100644 node_modules/lodash/isFinite.js create mode 100644 node_modules/lodash/isFunction.js create mode 100644 node_modules/lodash/isInteger.js create mode 100644 node_modules/lodash/isLength.js create mode 100644 node_modules/lodash/isMap.js create mode 100644 node_modules/lodash/isMatch.js create mode 100644 node_modules/lodash/isMatchWith.js create mode 100644 node_modules/lodash/isNaN.js create mode 100644 node_modules/lodash/isNative.js create mode 100644 node_modules/lodash/isNil.js create mode 100644 node_modules/lodash/isNull.js create mode 100644 node_modules/lodash/isNumber.js create mode 100644 node_modules/lodash/isObject.js create mode 100644 node_modules/lodash/isObjectLike.js create mode 100644 node_modules/lodash/isPlainObject.js create mode 100644 node_modules/lodash/isRegExp.js create mode 100644 node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/lodash/isSet.js create mode 100644 node_modules/lodash/isString.js create mode 100644 node_modules/lodash/isSymbol.js create mode 100644 node_modules/lodash/isTypedArray.js create mode 100644 node_modules/lodash/isUndefined.js create mode 100644 node_modules/lodash/isWeakMap.js create mode 100644 node_modules/lodash/isWeakSet.js create mode 100644 node_modules/lodash/iteratee.js create mode 100644 node_modules/lodash/join.js create mode 100644 node_modules/lodash/kebabCase.js create mode 100644 node_modules/lodash/keyBy.js create mode 100644 node_modules/lodash/keys.js create mode 100644 node_modules/lodash/keysIn.js create mode 100644 node_modules/lodash/lang.js create mode 100644 node_modules/lodash/last.js create mode 100644 node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/lodash/lodash.js create mode 100644 node_modules/lodash/lodash.min.js create mode 100644 node_modules/lodash/lowerCase.js create mode 100644 node_modules/lodash/lowerFirst.js create mode 100644 node_modules/lodash/lt.js create mode 100644 node_modules/lodash/lte.js create mode 100644 node_modules/lodash/map.js create mode 100644 node_modules/lodash/mapKeys.js create mode 100644 node_modules/lodash/mapValues.js create mode 100644 node_modules/lodash/matches.js create mode 100644 node_modules/lodash/matchesProperty.js create mode 100644 node_modules/lodash/math.js create mode 100644 node_modules/lodash/max.js create mode 100644 node_modules/lodash/maxBy.js create mode 100644 node_modules/lodash/mean.js create mode 100644 node_modules/lodash/meanBy.js create mode 100644 node_modules/lodash/memoize.js create mode 100644 node_modules/lodash/merge.js create mode 100644 node_modules/lodash/mergeWith.js create mode 100644 node_modules/lodash/method.js create mode 100644 node_modules/lodash/methodOf.js create mode 100644 node_modules/lodash/min.js create mode 100644 node_modules/lodash/minBy.js create mode 100644 node_modules/lodash/mixin.js create mode 100644 node_modules/lodash/multiply.js create mode 100644 node_modules/lodash/negate.js create mode 100644 node_modules/lodash/next.js create mode 100644 node_modules/lodash/noop.js create mode 100644 node_modules/lodash/now.js create mode 100644 node_modules/lodash/nth.js create mode 100644 node_modules/lodash/nthArg.js create mode 100644 node_modules/lodash/number.js create mode 100644 node_modules/lodash/object.js create mode 100644 node_modules/lodash/omit.js create mode 100644 node_modules/lodash/omitBy.js create mode 100644 node_modules/lodash/once.js create mode 100644 node_modules/lodash/orderBy.js create mode 100644 node_modules/lodash/over.js create mode 100644 node_modules/lodash/overArgs.js create mode 100644 node_modules/lodash/overEvery.js create mode 100644 node_modules/lodash/overSome.js create mode 100644 node_modules/lodash/package.json create mode 100644 node_modules/lodash/pad.js create mode 100644 node_modules/lodash/padEnd.js create mode 100644 node_modules/lodash/padStart.js create mode 100644 node_modules/lodash/parseInt.js create mode 100644 node_modules/lodash/partial.js create mode 100644 node_modules/lodash/partialRight.js create mode 100644 node_modules/lodash/partition.js create mode 100644 node_modules/lodash/pick.js create mode 100644 node_modules/lodash/pickBy.js create mode 100644 node_modules/lodash/plant.js create mode 100644 node_modules/lodash/property.js create mode 100644 node_modules/lodash/propertyOf.js create mode 100644 node_modules/lodash/pull.js create mode 100644 node_modules/lodash/pullAll.js create mode 100644 node_modules/lodash/pullAllBy.js create mode 100644 node_modules/lodash/pullAllWith.js create mode 100644 node_modules/lodash/pullAt.js create mode 100644 node_modules/lodash/random.js create mode 100644 node_modules/lodash/range.js create mode 100644 node_modules/lodash/rangeRight.js create mode 100644 node_modules/lodash/rearg.js create mode 100644 node_modules/lodash/reduce.js create mode 100644 node_modules/lodash/reduceRight.js create mode 100644 node_modules/lodash/reject.js create mode 100644 node_modules/lodash/remove.js create mode 100644 node_modules/lodash/repeat.js create mode 100644 node_modules/lodash/replace.js create mode 100644 node_modules/lodash/rest.js create mode 100644 node_modules/lodash/result.js create mode 100644 node_modules/lodash/reverse.js create mode 100644 node_modules/lodash/round.js create mode 100644 node_modules/lodash/sample.js create mode 100644 node_modules/lodash/sampleSize.js create mode 100644 node_modules/lodash/seq.js create mode 100644 node_modules/lodash/set.js create mode 100644 node_modules/lodash/setWith.js create mode 100644 node_modules/lodash/shuffle.js create mode 100644 node_modules/lodash/size.js create mode 100644 node_modules/lodash/slice.js create mode 100644 node_modules/lodash/snakeCase.js create mode 100644 node_modules/lodash/some.js create mode 100644 node_modules/lodash/sortBy.js create mode 100644 node_modules/lodash/sortedIndex.js create mode 100644 node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/lodash/sortedUniq.js create mode 100644 node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/lodash/split.js create mode 100644 node_modules/lodash/spread.js create mode 100644 node_modules/lodash/startCase.js create mode 100644 node_modules/lodash/startsWith.js create mode 100644 node_modules/lodash/string.js create mode 100644 node_modules/lodash/stubArray.js create mode 100644 node_modules/lodash/stubFalse.js create mode 100644 node_modules/lodash/stubObject.js create mode 100644 node_modules/lodash/stubString.js create mode 100644 node_modules/lodash/stubTrue.js create mode 100644 node_modules/lodash/subtract.js create mode 100644 node_modules/lodash/sum.js create mode 100644 node_modules/lodash/sumBy.js create mode 100644 node_modules/lodash/tail.js create mode 100644 node_modules/lodash/take.js create mode 100644 node_modules/lodash/takeRight.js create mode 100644 node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/lodash/takeWhile.js create mode 100644 node_modules/lodash/tap.js create mode 100644 node_modules/lodash/template.js create mode 100644 node_modules/lodash/templateSettings.js create mode 100644 node_modules/lodash/throttle.js create mode 100644 node_modules/lodash/thru.js create mode 100644 node_modules/lodash/times.js create mode 100644 node_modules/lodash/toArray.js create mode 100644 node_modules/lodash/toFinite.js create mode 100644 node_modules/lodash/toInteger.js create mode 100644 node_modules/lodash/toIterator.js create mode 100644 node_modules/lodash/toJSON.js create mode 100644 node_modules/lodash/toLength.js create mode 100644 node_modules/lodash/toLower.js create mode 100644 node_modules/lodash/toNumber.js create mode 100644 node_modules/lodash/toPairs.js create mode 100644 node_modules/lodash/toPairsIn.js create mode 100644 node_modules/lodash/toPath.js create mode 100644 node_modules/lodash/toPlainObject.js create mode 100644 node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/lodash/toString.js create mode 100644 node_modules/lodash/toUpper.js create mode 100644 node_modules/lodash/transform.js create mode 100644 node_modules/lodash/trim.js create mode 100644 node_modules/lodash/trimEnd.js create mode 100644 node_modules/lodash/trimStart.js create mode 100644 node_modules/lodash/truncate.js create mode 100644 node_modules/lodash/unary.js create mode 100644 node_modules/lodash/unescape.js create mode 100644 node_modules/lodash/union.js create mode 100644 node_modules/lodash/unionBy.js create mode 100644 node_modules/lodash/unionWith.js create mode 100644 node_modules/lodash/uniq.js create mode 100644 node_modules/lodash/uniqBy.js create mode 100644 node_modules/lodash/uniqWith.js create mode 100644 node_modules/lodash/uniqueId.js create mode 100644 node_modules/lodash/unset.js create mode 100644 node_modules/lodash/unzip.js create mode 100644 node_modules/lodash/unzipWith.js create mode 100644 node_modules/lodash/update.js create mode 100644 node_modules/lodash/updateWith.js create mode 100644 node_modules/lodash/upperCase.js create mode 100644 node_modules/lodash/upperFirst.js create mode 100644 node_modules/lodash/util.js create mode 100644 node_modules/lodash/value.js create mode 100644 node_modules/lodash/valueOf.js create mode 100644 node_modules/lodash/values.js create mode 100644 node_modules/lodash/valuesIn.js create mode 100644 node_modules/lodash/without.js create mode 100644 node_modules/lodash/words.js create mode 100644 node_modules/lodash/wrap.js create mode 100644 node_modules/lodash/wrapperAt.js create mode 100644 node_modules/lodash/wrapperChain.js create mode 100644 node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/lodash/wrapperValue.js create mode 100644 node_modules/lodash/xor.js create mode 100644 node_modules/lodash/xorBy.js create mode 100644 node_modules/lodash/xorWith.js create mode 100644 node_modules/lodash/zip.js create mode 100644 node_modules/lodash/zipObject.js create mode 100644 node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/lodash/zipWith.js create mode 100644 node_modules/lowercase-keys/index.js create mode 100644 node_modules/lowercase-keys/package.json create mode 100644 node_modules/lowercase-keys/readme.md create mode 100644 node_modules/lru-cache/LICENSE create mode 100644 node_modules/lru-cache/README.md create mode 100644 node_modules/lru-cache/index.js create mode 100644 node_modules/lru-cache/package.json create mode 100644 node_modules/lru-queue/.lint create mode 100644 node_modules/lru-queue/.npmignore create mode 100644 node_modules/lru-queue/.travis.yml create mode 100644 node_modules/lru-queue/CHANGES create mode 100644 node_modules/lru-queue/LICENCE create mode 100644 node_modules/lru-queue/README.md create mode 100644 node_modules/lru-queue/index.js create mode 100644 node_modules/lru-queue/package.json create mode 100644 node_modules/lru-queue/test/index.js create mode 100644 node_modules/make-dir/index.js create mode 100644 node_modules/make-dir/license create mode 100644 node_modules/make-dir/package.json create mode 100644 node_modules/make-dir/readme.md create mode 100644 node_modules/map-cache/LICENSE create mode 100644 node_modules/map-cache/README.md create mode 100644 node_modules/map-cache/index.js create mode 100644 node_modules/map-cache/package.json create mode 100644 node_modules/map-stream/.npmignore create mode 100644 node_modules/map-stream/.travis.yml create mode 100644 node_modules/map-stream/LICENCE create mode 100644 node_modules/map-stream/examples/pretty.js create mode 100644 node_modules/map-stream/index.js create mode 100644 node_modules/map-stream/package.json create mode 100644 node_modules/map-stream/readme.markdown create mode 100644 node_modules/map-stream/test/simple-map.asynct.js create mode 100644 node_modules/map-visit/LICENSE create mode 100644 node_modules/map-visit/README.md create mode 100644 node_modules/map-visit/index.js create mode 100644 node_modules/map-visit/package.json create mode 100644 node_modules/media-typer/HISTORY.md create mode 100644 node_modules/media-typer/LICENSE create mode 100644 node_modules/media-typer/README.md create mode 100644 node_modules/media-typer/index.js create mode 100644 node_modules/media-typer/package.json create mode 100644 node_modules/mem/index.js create mode 100644 node_modules/mem/license create mode 100644 node_modules/mem/package.json create mode 100644 node_modules/mem/readme.md create mode 100644 node_modules/memoizee/.editorconfig create mode 100644 node_modules/memoizee/.testignore create mode 100644 node_modules/memoizee/CHANGELOG.md create mode 100644 node_modules/memoizee/CHANGES create mode 100644 node_modules/memoizee/LICENSE create mode 100644 node_modules/memoizee/README.md create mode 100644 node_modules/memoizee/benchmark/fibonacci.js create mode 100644 node_modules/memoizee/ext/async.js create mode 100644 node_modules/memoizee/ext/dispose.js create mode 100644 node_modules/memoizee/ext/max-age.js create mode 100644 node_modules/memoizee/ext/max.js create mode 100644 node_modules/memoizee/ext/promise.js create mode 100644 node_modules/memoizee/ext/ref-counter.js create mode 100644 node_modules/memoizee/index.js create mode 100644 node_modules/memoizee/lib/configure-map.js create mode 100644 node_modules/memoizee/lib/methods.js create mode 100644 node_modules/memoizee/lib/registered-extensions.js create mode 100644 node_modules/memoizee/lib/resolve-length.js create mode 100644 node_modules/memoizee/lib/resolve-normalize.js create mode 100644 node_modules/memoizee/lib/resolve-resolve.js create mode 100644 node_modules/memoizee/lib/weak.js create mode 100644 node_modules/memoizee/methods-plain.js create mode 100644 node_modules/memoizee/methods.js create mode 100644 node_modules/memoizee/normalizers/get-1.js create mode 100644 node_modules/memoizee/normalizers/get-fixed.js create mode 100644 node_modules/memoizee/normalizers/get-primitive-fixed.js create mode 100644 node_modules/memoizee/normalizers/get.js create mode 100644 node_modules/memoizee/normalizers/primitive.js create mode 100644 node_modules/memoizee/package.json create mode 100644 node_modules/memoizee/plain.js create mode 100644 node_modules/memoizee/profile.js create mode 100644 node_modules/memoizee/test/ext/async.js create mode 100644 node_modules/memoizee/test/ext/dispose.js create mode 100644 node_modules/memoizee/test/ext/max-age.js create mode 100644 node_modules/memoizee/test/ext/max.js create mode 100644 node_modules/memoizee/test/ext/promise.js create mode 100644 node_modules/memoizee/test/ext/ref-counter.js create mode 100644 node_modules/memoizee/test/index.js create mode 100644 node_modules/memoizee/test/lib/configure-map.js create mode 100644 node_modules/memoizee/test/lib/methods.js create mode 100644 node_modules/memoizee/test/lib/registered-extensions.js create mode 100644 node_modules/memoizee/test/lib/resolve-length.js create mode 100644 node_modules/memoizee/test/lib/resolve-normalize.js create mode 100644 node_modules/memoizee/test/lib/resolve-resolve.js create mode 100644 node_modules/memoizee/test/lib/weak.js create mode 100644 node_modules/memoizee/test/methods-plain.js create mode 100644 node_modules/memoizee/test/methods.js create mode 100644 node_modules/memoizee/test/normalizers/get-1.js create mode 100644 node_modules/memoizee/test/normalizers/get-fixed.js create mode 100644 node_modules/memoizee/test/normalizers/get-primitive-fixed.js create mode 100644 node_modules/memoizee/test/normalizers/get.js create mode 100644 node_modules/memoizee/test/normalizers/primitive.js create mode 100644 node_modules/memoizee/test/plain.js create mode 100644 node_modules/memoizee/test/profile.js create mode 100644 node_modules/memoizee/test/weak-plain.js create mode 100644 node_modules/memoizee/test/weak.js create mode 100644 node_modules/memoizee/weak-plain.js create mode 100644 node_modules/memoizee/weak.js create mode 100644 node_modules/merge-descriptors/HISTORY.md create mode 100644 node_modules/merge-descriptors/LICENSE create mode 100644 node_modules/merge-descriptors/README.md create mode 100644 node_modules/merge-descriptors/index.js create mode 100644 node_modules/merge-descriptors/package.json create mode 100644 node_modules/methods/HISTORY.md create mode 100644 node_modules/methods/LICENSE create mode 100644 node_modules/methods/README.md create mode 100644 node_modules/methods/index.js create mode 100644 node_modules/methods/package.json create mode 100644 node_modules/micromatch/CHANGELOG.md create mode 100755 node_modules/micromatch/LICENSE create mode 100644 node_modules/micromatch/README.md create mode 100644 node_modules/micromatch/index.js create mode 100644 node_modules/micromatch/lib/.DS_Store create mode 100644 node_modules/micromatch/lib/cache.js create mode 100644 node_modules/micromatch/lib/compilers.js create mode 100644 node_modules/micromatch/lib/parsers.js create mode 100644 node_modules/micromatch/lib/utils.js create mode 100644 node_modules/micromatch/package.json create mode 100644 node_modules/mime-db/HISTORY.md create mode 100644 node_modules/mime-db/LICENSE create mode 100644 node_modules/mime-db/README.md create mode 100644 node_modules/mime-db/db.json create mode 100644 node_modules/mime-db/index.js create mode 100644 node_modules/mime-db/package.json create mode 100644 node_modules/mime-types/HISTORY.md create mode 100644 node_modules/mime-types/LICENSE create mode 100644 node_modules/mime-types/README.md create mode 100644 node_modules/mime-types/index.js create mode 100644 node_modules/mime-types/package.json create mode 100644 node_modules/mime/LICENSE create mode 100644 node_modules/mime/README.md create mode 100644 node_modules/mime/build/build.js create mode 100644 node_modules/mime/build/test.js create mode 100755 node_modules/mime/cli.js create mode 100644 node_modules/mime/mime.js create mode 100644 node_modules/mime/package.json create mode 100644 node_modules/mime/types.json create mode 100644 node_modules/mimic-fn/index.js create mode 100644 node_modules/mimic-fn/license create mode 100644 node_modules/mimic-fn/package.json create mode 100644 node_modules/mimic-fn/readme.md create mode 100644 node_modules/minimatch/LICENSE create mode 100644 node_modules/minimatch/README.md create mode 100644 node_modules/minimatch/minimatch.js create mode 100644 node_modules/minimatch/package.json create mode 100644 node_modules/minimist/.travis.yml create mode 100644 node_modules/minimist/LICENSE create mode 100644 node_modules/minimist/example/parse.js create mode 100644 node_modules/minimist/index.js create mode 100644 node_modules/minimist/package.json create mode 100644 node_modules/minimist/readme.markdown create mode 100644 node_modules/minimist/test/all_bool.js create mode 100644 node_modules/minimist/test/bool.js create mode 100644 node_modules/minimist/test/dash.js create mode 100644 node_modules/minimist/test/default_bool.js create mode 100644 node_modules/minimist/test/dotted.js create mode 100644 node_modules/minimist/test/kv_short.js create mode 100644 node_modules/minimist/test/long.js create mode 100644 node_modules/minimist/test/num.js create mode 100644 node_modules/minimist/test/parse.js create mode 100644 node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/minimist/test/short.js create mode 100644 node_modules/minimist/test/stop_early.js create mode 100644 node_modules/minimist/test/unknown.js create mode 100644 node_modules/minimist/test/whitespace.js create mode 100644 node_modules/mixin-deep/LICENSE create mode 100644 node_modules/mixin-deep/README.md create mode 100644 node_modules/mixin-deep/index.js create mode 100644 node_modules/mixin-deep/node_modules/is-extendable/LICENSE create mode 100644 node_modules/mixin-deep/node_modules/is-extendable/README.md create mode 100644 node_modules/mixin-deep/node_modules/is-extendable/index.d.ts create mode 100644 node_modules/mixin-deep/node_modules/is-extendable/index.js create mode 100644 node_modules/mixin-deep/node_modules/is-extendable/package.json create mode 100644 node_modules/mixin-deep/package.json create mode 100644 node_modules/mkdirp/.travis.yml create mode 100644 node_modules/mkdirp/LICENSE create mode 100755 node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/mkdirp/bin/usage.txt create mode 100644 node_modules/mkdirp/examples/pow.js create mode 100644 node_modules/mkdirp/index.js create mode 100644 node_modules/mkdirp/node_modules/minimist/.travis.yml create mode 100644 node_modules/mkdirp/node_modules/minimist/LICENSE create mode 100644 node_modules/mkdirp/node_modules/minimist/example/parse.js create mode 100644 node_modules/mkdirp/node_modules/minimist/index.js create mode 100644 node_modules/mkdirp/node_modules/minimist/package.json create mode 100644 node_modules/mkdirp/node_modules/minimist/readme.markdown create mode 100644 node_modules/mkdirp/node_modules/minimist/test/dash.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/dotted.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/long.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/short.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/mkdirp/package.json create mode 100644 node_modules/mkdirp/readme.markdown create mode 100644 node_modules/mkdirp/test/chmod.js create mode 100644 node_modules/mkdirp/test/clobber.js create mode 100644 node_modules/mkdirp/test/mkdirp.js create mode 100644 node_modules/mkdirp/test/opts_fs.js create mode 100644 node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 node_modules/mkdirp/test/perm.js create mode 100644 node_modules/mkdirp/test/perm_sync.js create mode 100644 node_modules/mkdirp/test/race.js create mode 100644 node_modules/mkdirp/test/rel.js create mode 100644 node_modules/mkdirp/test/return.js create mode 100644 node_modules/mkdirp/test/return_sync.js create mode 100644 node_modules/mkdirp/test/root.js create mode 100644 node_modules/mkdirp/test/sync.js create mode 100644 node_modules/mkdirp/test/umask.js create mode 100644 node_modules/mkdirp/test/umask_sync.js create mode 100644 node_modules/moment-timezone/.npmignore create mode 100644 node_modules/moment-timezone/LICENSE create mode 100644 node_modules/moment-timezone/README.md create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data.min.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone.min.js create mode 100644 node_modules/moment-timezone/changelog.md create mode 100644 node_modules/moment-timezone/composer.json create mode 100644 node_modules/moment-timezone/data/meta/latest.json create mode 100644 node_modules/moment-timezone/data/packed/latest.json create mode 100644 node_modules/moment-timezone/data/unpacked/latest.json create mode 100644 node_modules/moment-timezone/index.js create mode 100644 node_modules/moment-timezone/moment-timezone-utils.js create mode 100644 node_modules/moment-timezone/moment-timezone.js create mode 100644 node_modules/moment-timezone/package.json create mode 100644 node_modules/moment/CHANGELOG.md create mode 100644 node_modules/moment/LICENSE create mode 100644 node_modules/moment/README.md create mode 100644 node_modules/moment/ender.js create mode 100644 node_modules/moment/locale/af.js create mode 100644 node_modules/moment/locale/ar-dz.js create mode 100644 node_modules/moment/locale/ar-kw.js create mode 100644 node_modules/moment/locale/ar-ly.js create mode 100644 node_modules/moment/locale/ar-ma.js create mode 100644 node_modules/moment/locale/ar-sa.js create mode 100644 node_modules/moment/locale/ar-tn.js create mode 100644 node_modules/moment/locale/ar.js create mode 100644 node_modules/moment/locale/az.js create mode 100644 node_modules/moment/locale/be.js create mode 100644 node_modules/moment/locale/bg.js create mode 100644 node_modules/moment/locale/bm.js create mode 100644 node_modules/moment/locale/bn.js create mode 100644 node_modules/moment/locale/bo.js create mode 100644 node_modules/moment/locale/br.js create mode 100644 node_modules/moment/locale/bs.js create mode 100644 node_modules/moment/locale/ca.js create mode 100644 node_modules/moment/locale/cs.js create mode 100644 node_modules/moment/locale/cv.js create mode 100644 node_modules/moment/locale/cy.js create mode 100644 node_modules/moment/locale/da.js create mode 100644 node_modules/moment/locale/de-at.js create mode 100644 node_modules/moment/locale/de-ch.js create mode 100644 node_modules/moment/locale/de.js create mode 100644 node_modules/moment/locale/dv.js create mode 100644 node_modules/moment/locale/el.js create mode 100644 node_modules/moment/locale/en-au.js create mode 100644 node_modules/moment/locale/en-ca.js create mode 100644 node_modules/moment/locale/en-gb.js create mode 100644 node_modules/moment/locale/en-ie.js create mode 100644 node_modules/moment/locale/en-nz.js create mode 100644 node_modules/moment/locale/eo.js create mode 100644 node_modules/moment/locale/es-do.js create mode 100644 node_modules/moment/locale/es-us.js create mode 100644 node_modules/moment/locale/es.js create mode 100644 node_modules/moment/locale/et.js create mode 100644 node_modules/moment/locale/eu.js create mode 100644 node_modules/moment/locale/fa.js create mode 100644 node_modules/moment/locale/fi.js create mode 100644 node_modules/moment/locale/fo.js create mode 100644 node_modules/moment/locale/fr-ca.js create mode 100644 node_modules/moment/locale/fr-ch.js create mode 100644 node_modules/moment/locale/fr.js create mode 100644 node_modules/moment/locale/fy.js create mode 100644 node_modules/moment/locale/gd.js create mode 100644 node_modules/moment/locale/gl.js create mode 100644 node_modules/moment/locale/gom-latn.js create mode 100644 node_modules/moment/locale/gu.js create mode 100644 node_modules/moment/locale/he.js create mode 100644 node_modules/moment/locale/hi.js create mode 100644 node_modules/moment/locale/hr.js create mode 100644 node_modules/moment/locale/hu.js create mode 100644 node_modules/moment/locale/hy-am.js create mode 100644 node_modules/moment/locale/id.js create mode 100644 node_modules/moment/locale/is.js create mode 100644 node_modules/moment/locale/it.js create mode 100644 node_modules/moment/locale/ja.js create mode 100644 node_modules/moment/locale/jv.js create mode 100644 node_modules/moment/locale/ka.js create mode 100644 node_modules/moment/locale/kk.js create mode 100644 node_modules/moment/locale/km.js create mode 100644 node_modules/moment/locale/kn.js create mode 100644 node_modules/moment/locale/ko.js create mode 100644 node_modules/moment/locale/ky.js create mode 100644 node_modules/moment/locale/lb.js create mode 100644 node_modules/moment/locale/lo.js create mode 100644 node_modules/moment/locale/lt.js create mode 100644 node_modules/moment/locale/lv.js create mode 100644 node_modules/moment/locale/me.js create mode 100644 node_modules/moment/locale/mi.js create mode 100644 node_modules/moment/locale/mk.js create mode 100644 node_modules/moment/locale/ml.js create mode 100644 node_modules/moment/locale/mr.js create mode 100644 node_modules/moment/locale/ms-my.js create mode 100644 node_modules/moment/locale/ms.js create mode 100644 node_modules/moment/locale/mt.js create mode 100644 node_modules/moment/locale/my.js create mode 100644 node_modules/moment/locale/nb.js create mode 100644 node_modules/moment/locale/ne.js create mode 100644 node_modules/moment/locale/nl-be.js create mode 100644 node_modules/moment/locale/nl.js create mode 100644 node_modules/moment/locale/nn.js create mode 100644 node_modules/moment/locale/pa-in.js create mode 100644 node_modules/moment/locale/pl.js create mode 100644 node_modules/moment/locale/pt-br.js create mode 100644 node_modules/moment/locale/pt.js create mode 100644 node_modules/moment/locale/ro.js create mode 100644 node_modules/moment/locale/ru.js create mode 100644 node_modules/moment/locale/sd.js create mode 100644 node_modules/moment/locale/se.js create mode 100644 node_modules/moment/locale/si.js create mode 100644 node_modules/moment/locale/sk.js create mode 100644 node_modules/moment/locale/sl.js create mode 100644 node_modules/moment/locale/sq.js create mode 100644 node_modules/moment/locale/sr-cyrl.js create mode 100644 node_modules/moment/locale/sr.js create mode 100644 node_modules/moment/locale/ss.js create mode 100644 node_modules/moment/locale/sv.js create mode 100644 node_modules/moment/locale/sw.js create mode 100644 node_modules/moment/locale/ta.js create mode 100644 node_modules/moment/locale/te.js create mode 100644 node_modules/moment/locale/tet.js create mode 100644 node_modules/moment/locale/th.js create mode 100644 node_modules/moment/locale/tl-ph.js create mode 100644 node_modules/moment/locale/tlh.js create mode 100644 node_modules/moment/locale/tr.js create mode 100644 node_modules/moment/locale/tzl.js create mode 100644 node_modules/moment/locale/tzm-latn.js create mode 100644 node_modules/moment/locale/tzm.js create mode 100644 node_modules/moment/locale/uk.js create mode 100644 node_modules/moment/locale/ur.js create mode 100644 node_modules/moment/locale/uz-latn.js create mode 100644 node_modules/moment/locale/uz.js create mode 100644 node_modules/moment/locale/vi.js create mode 100644 node_modules/moment/locale/x-pseudo.js create mode 100644 node_modules/moment/locale/yo.js create mode 100644 node_modules/moment/locale/zh-cn.js create mode 100644 node_modules/moment/locale/zh-hk.js create mode 100644 node_modules/moment/locale/zh-tw.js create mode 100644 node_modules/moment/min/locales.js create mode 100644 node_modules/moment/min/locales.min.js create mode 100644 node_modules/moment/min/moment-with-locales.js create mode 100644 node_modules/moment/min/moment-with-locales.min.js create mode 100644 node_modules/moment/min/moment.min.js create mode 100644 node_modules/moment/moment.d.ts create mode 100644 node_modules/moment/moment.js create mode 100644 node_modules/moment/package.js create mode 100644 node_modules/moment/package.json create mode 100644 node_modules/moment/src/lib/create/check-overflow.js create mode 100644 node_modules/moment/src/lib/create/date-from-array.js create mode 100644 node_modules/moment/src/lib/create/from-anything.js create mode 100644 node_modules/moment/src/lib/create/from-array.js create mode 100644 node_modules/moment/src/lib/create/from-object.js create mode 100644 node_modules/moment/src/lib/create/from-string-and-array.js create mode 100644 node_modules/moment/src/lib/create/from-string-and-format.js create mode 100644 node_modules/moment/src/lib/create/from-string.js create mode 100644 node_modules/moment/src/lib/create/local.js create mode 100644 node_modules/moment/src/lib/create/parsing-flags.js create mode 100644 node_modules/moment/src/lib/create/utc.js create mode 100644 node_modules/moment/src/lib/create/valid.js create mode 100644 node_modules/moment/src/lib/duration/abs.js create mode 100644 node_modules/moment/src/lib/duration/add-subtract.js create mode 100644 node_modules/moment/src/lib/duration/as.js create mode 100644 node_modules/moment/src/lib/duration/bubble.js create mode 100644 node_modules/moment/src/lib/duration/clone.js create mode 100644 node_modules/moment/src/lib/duration/constructor.js create mode 100644 node_modules/moment/src/lib/duration/create.js create mode 100644 node_modules/moment/src/lib/duration/duration.js create mode 100644 node_modules/moment/src/lib/duration/get.js create mode 100644 node_modules/moment/src/lib/duration/humanize.js create mode 100644 node_modules/moment/src/lib/duration/iso-string.js create mode 100644 node_modules/moment/src/lib/duration/prototype.js create mode 100644 node_modules/moment/src/lib/duration/valid.js create mode 100644 node_modules/moment/src/lib/format/format.js create mode 100644 node_modules/moment/src/lib/locale/base-config.js create mode 100644 node_modules/moment/src/lib/locale/calendar.js create mode 100644 node_modules/moment/src/lib/locale/constructor.js create mode 100644 node_modules/moment/src/lib/locale/en.js create mode 100644 node_modules/moment/src/lib/locale/formats.js create mode 100644 node_modules/moment/src/lib/locale/invalid.js create mode 100644 node_modules/moment/src/lib/locale/lists.js create mode 100644 node_modules/moment/src/lib/locale/locale.js create mode 100644 node_modules/moment/src/lib/locale/locales.js create mode 100644 node_modules/moment/src/lib/locale/ordinal.js create mode 100644 node_modules/moment/src/lib/locale/pre-post-format.js create mode 100644 node_modules/moment/src/lib/locale/prototype.js create mode 100644 node_modules/moment/src/lib/locale/relative.js create mode 100644 node_modules/moment/src/lib/locale/set.js create mode 100644 node_modules/moment/src/lib/moment/add-subtract.js create mode 100644 node_modules/moment/src/lib/moment/calendar.js create mode 100644 node_modules/moment/src/lib/moment/clone.js create mode 100644 node_modules/moment/src/lib/moment/compare.js create mode 100644 node_modules/moment/src/lib/moment/constructor.js create mode 100644 node_modules/moment/src/lib/moment/creation-data.js create mode 100644 node_modules/moment/src/lib/moment/diff.js create mode 100644 node_modules/moment/src/lib/moment/format.js create mode 100644 node_modules/moment/src/lib/moment/from.js create mode 100644 node_modules/moment/src/lib/moment/get-set.js create mode 100644 node_modules/moment/src/lib/moment/locale.js create mode 100644 node_modules/moment/src/lib/moment/min-max.js create mode 100644 node_modules/moment/src/lib/moment/moment.js create mode 100644 node_modules/moment/src/lib/moment/now.js create mode 100644 node_modules/moment/src/lib/moment/prototype.js create mode 100644 node_modules/moment/src/lib/moment/start-end-of.js create mode 100644 node_modules/moment/src/lib/moment/to-type.js create mode 100644 node_modules/moment/src/lib/moment/to.js create mode 100644 node_modules/moment/src/lib/moment/valid.js create mode 100644 node_modules/moment/src/lib/parse/regex.js create mode 100644 node_modules/moment/src/lib/parse/token.js create mode 100644 node_modules/moment/src/lib/units/aliases.js create mode 100644 node_modules/moment/src/lib/units/constants.js create mode 100644 node_modules/moment/src/lib/units/day-of-month.js create mode 100644 node_modules/moment/src/lib/units/day-of-week.js create mode 100644 node_modules/moment/src/lib/units/day-of-year.js create mode 100644 node_modules/moment/src/lib/units/hour.js create mode 100644 node_modules/moment/src/lib/units/millisecond.js create mode 100644 node_modules/moment/src/lib/units/minute.js create mode 100644 node_modules/moment/src/lib/units/month.js create mode 100644 node_modules/moment/src/lib/units/offset.js create mode 100644 node_modules/moment/src/lib/units/priorities.js create mode 100644 node_modules/moment/src/lib/units/quarter.js create mode 100644 node_modules/moment/src/lib/units/second.js create mode 100644 node_modules/moment/src/lib/units/timestamp.js create mode 100644 node_modules/moment/src/lib/units/timezone.js create mode 100644 node_modules/moment/src/lib/units/units.js create mode 100644 node_modules/moment/src/lib/units/week-calendar-utils.js create mode 100644 node_modules/moment/src/lib/units/week-year.js create mode 100644 node_modules/moment/src/lib/units/week.js create mode 100644 node_modules/moment/src/lib/units/year.js create mode 100644 node_modules/moment/src/lib/utils/abs-ceil.js create mode 100644 node_modules/moment/src/lib/utils/abs-floor.js create mode 100644 node_modules/moment/src/lib/utils/abs-round.js create mode 100644 node_modules/moment/src/lib/utils/compare-arrays.js create mode 100644 node_modules/moment/src/lib/utils/defaults.js create mode 100644 node_modules/moment/src/lib/utils/deprecate.js create mode 100644 node_modules/moment/src/lib/utils/extend.js create mode 100644 node_modules/moment/src/lib/utils/has-own-prop.js create mode 100644 node_modules/moment/src/lib/utils/hooks.js create mode 100644 node_modules/moment/src/lib/utils/index-of.js create mode 100644 node_modules/moment/src/lib/utils/is-array.js create mode 100644 node_modules/moment/src/lib/utils/is-date.js create mode 100644 node_modules/moment/src/lib/utils/is-function.js create mode 100644 node_modules/moment/src/lib/utils/is-number.js create mode 100644 node_modules/moment/src/lib/utils/is-object-empty.js create mode 100644 node_modules/moment/src/lib/utils/is-object.js create mode 100644 node_modules/moment/src/lib/utils/is-undefined.js create mode 100644 node_modules/moment/src/lib/utils/keys.js create mode 100644 node_modules/moment/src/lib/utils/map.js create mode 100644 node_modules/moment/src/lib/utils/mod.js create mode 100644 node_modules/moment/src/lib/utils/some.js create mode 100644 node_modules/moment/src/lib/utils/to-int.js create mode 100644 node_modules/moment/src/lib/utils/zero-fill.js create mode 100644 node_modules/moment/src/locale/af.js create mode 100644 node_modules/moment/src/locale/ar-dz.js create mode 100644 node_modules/moment/src/locale/ar-kw.js create mode 100644 node_modules/moment/src/locale/ar-ly.js create mode 100644 node_modules/moment/src/locale/ar-ma.js create mode 100644 node_modules/moment/src/locale/ar-sa.js create mode 100644 node_modules/moment/src/locale/ar-tn.js create mode 100644 node_modules/moment/src/locale/ar.js create mode 100644 node_modules/moment/src/locale/az.js create mode 100644 node_modules/moment/src/locale/be.js create mode 100644 node_modules/moment/src/locale/bg.js create mode 100644 node_modules/moment/src/locale/bm.js create mode 100644 node_modules/moment/src/locale/bn.js create mode 100644 node_modules/moment/src/locale/bo.js create mode 100644 node_modules/moment/src/locale/br.js create mode 100644 node_modules/moment/src/locale/bs.js create mode 100644 node_modules/moment/src/locale/ca.js create mode 100644 node_modules/moment/src/locale/cs.js create mode 100644 node_modules/moment/src/locale/cv.js create mode 100644 node_modules/moment/src/locale/cy.js create mode 100644 node_modules/moment/src/locale/da.js create mode 100644 node_modules/moment/src/locale/de-at.js create mode 100644 node_modules/moment/src/locale/de-ch.js create mode 100644 node_modules/moment/src/locale/de.js create mode 100644 node_modules/moment/src/locale/dv.js create mode 100644 node_modules/moment/src/locale/el.js create mode 100644 node_modules/moment/src/locale/en-au.js create mode 100644 node_modules/moment/src/locale/en-ca.js create mode 100644 node_modules/moment/src/locale/en-gb.js create mode 100644 node_modules/moment/src/locale/en-ie.js create mode 100644 node_modules/moment/src/locale/en-nz.js create mode 100644 node_modules/moment/src/locale/eo.js create mode 100644 node_modules/moment/src/locale/es-do.js create mode 100644 node_modules/moment/src/locale/es-us.js create mode 100644 node_modules/moment/src/locale/es.js create mode 100644 node_modules/moment/src/locale/et.js create mode 100644 node_modules/moment/src/locale/eu.js create mode 100644 node_modules/moment/src/locale/fa.js create mode 100644 node_modules/moment/src/locale/fi.js create mode 100644 node_modules/moment/src/locale/fo.js create mode 100644 node_modules/moment/src/locale/fr-ca.js create mode 100644 node_modules/moment/src/locale/fr-ch.js create mode 100644 node_modules/moment/src/locale/fr.js create mode 100644 node_modules/moment/src/locale/fy.js create mode 100644 node_modules/moment/src/locale/gd.js create mode 100644 node_modules/moment/src/locale/gl.js create mode 100644 node_modules/moment/src/locale/gom-latn.js create mode 100644 node_modules/moment/src/locale/gu.js create mode 100644 node_modules/moment/src/locale/he.js create mode 100644 node_modules/moment/src/locale/hi.js create mode 100644 node_modules/moment/src/locale/hr.js create mode 100644 node_modules/moment/src/locale/hu.js create mode 100644 node_modules/moment/src/locale/hy-am.js create mode 100644 node_modules/moment/src/locale/id.js create mode 100644 node_modules/moment/src/locale/is.js create mode 100644 node_modules/moment/src/locale/it.js create mode 100644 node_modules/moment/src/locale/ja.js create mode 100644 node_modules/moment/src/locale/jv.js create mode 100644 node_modules/moment/src/locale/ka.js create mode 100644 node_modules/moment/src/locale/kk.js create mode 100644 node_modules/moment/src/locale/km.js create mode 100644 node_modules/moment/src/locale/kn.js create mode 100644 node_modules/moment/src/locale/ko.js create mode 100644 node_modules/moment/src/locale/ky.js create mode 100644 node_modules/moment/src/locale/lb.js create mode 100644 node_modules/moment/src/locale/lo.js create mode 100644 node_modules/moment/src/locale/lt.js create mode 100644 node_modules/moment/src/locale/lv.js create mode 100644 node_modules/moment/src/locale/me.js create mode 100644 node_modules/moment/src/locale/mi.js create mode 100644 node_modules/moment/src/locale/mk.js create mode 100644 node_modules/moment/src/locale/ml.js create mode 100644 node_modules/moment/src/locale/mr.js create mode 100644 node_modules/moment/src/locale/ms-my.js create mode 100644 node_modules/moment/src/locale/ms.js create mode 100644 node_modules/moment/src/locale/mt.js create mode 100644 node_modules/moment/src/locale/my.js create mode 100644 node_modules/moment/src/locale/nb.js create mode 100644 node_modules/moment/src/locale/ne.js create mode 100644 node_modules/moment/src/locale/nl-be.js create mode 100644 node_modules/moment/src/locale/nl.js create mode 100644 node_modules/moment/src/locale/nn.js create mode 100644 node_modules/moment/src/locale/pa-in.js create mode 100644 node_modules/moment/src/locale/pl.js create mode 100644 node_modules/moment/src/locale/pt-br.js create mode 100644 node_modules/moment/src/locale/pt.js create mode 100644 node_modules/moment/src/locale/ro.js create mode 100644 node_modules/moment/src/locale/ru.js create mode 100644 node_modules/moment/src/locale/sd.js create mode 100644 node_modules/moment/src/locale/se.js create mode 100644 node_modules/moment/src/locale/si.js create mode 100644 node_modules/moment/src/locale/sk.js create mode 100644 node_modules/moment/src/locale/sl.js create mode 100644 node_modules/moment/src/locale/sq.js create mode 100644 node_modules/moment/src/locale/sr-cyrl.js create mode 100644 node_modules/moment/src/locale/sr.js create mode 100644 node_modules/moment/src/locale/ss.js create mode 100644 node_modules/moment/src/locale/sv.js create mode 100644 node_modules/moment/src/locale/sw.js create mode 100644 node_modules/moment/src/locale/ta.js create mode 100644 node_modules/moment/src/locale/te.js create mode 100644 node_modules/moment/src/locale/tet.js create mode 100644 node_modules/moment/src/locale/th.js create mode 100644 node_modules/moment/src/locale/tl-ph.js create mode 100644 node_modules/moment/src/locale/tlh.js create mode 100644 node_modules/moment/src/locale/tr.js create mode 100644 node_modules/moment/src/locale/tzl.js create mode 100644 node_modules/moment/src/locale/tzm-latn.js create mode 100644 node_modules/moment/src/locale/tzm.js create mode 100644 node_modules/moment/src/locale/uk.js create mode 100644 node_modules/moment/src/locale/ur.js create mode 100644 node_modules/moment/src/locale/uz-latn.js create mode 100644 node_modules/moment/src/locale/uz.js create mode 100644 node_modules/moment/src/locale/vi.js create mode 100644 node_modules/moment/src/locale/x-pseudo.js create mode 100644 node_modules/moment/src/locale/yo.js create mode 100644 node_modules/moment/src/locale/zh-cn.js create mode 100644 node_modules/moment/src/locale/zh-hk.js create mode 100644 node_modules/moment/src/locale/zh-tw.js create mode 100644 node_modules/moment/src/moment.js create mode 100644 node_modules/ms/index.js create mode 100644 node_modules/ms/license.md create mode 100644 node_modules/ms/package.json create mode 100644 node_modules/ms/readme.md create mode 100644 node_modules/nanomatch/CHANGELOG.md create mode 100644 node_modules/nanomatch/LICENSE create mode 100644 node_modules/nanomatch/README.md create mode 100644 node_modules/nanomatch/index.js create mode 100644 node_modules/nanomatch/lib/.DS_Store create mode 100644 node_modules/nanomatch/lib/cache.js create mode 100644 node_modules/nanomatch/lib/compiler2.js create mode 100644 node_modules/nanomatch/lib/compilers.js create mode 100644 node_modules/nanomatch/lib/parsers.js create mode 100644 node_modules/nanomatch/lib/utils.js create mode 100644 node_modules/nanomatch/package.json create mode 100644 node_modules/negotiator/HISTORY.md create mode 100644 node_modules/negotiator/LICENSE create mode 100644 node_modules/negotiator/README.md create mode 100644 node_modules/negotiator/index.js create mode 100644 node_modules/negotiator/lib/charset.js create mode 100644 node_modules/negotiator/lib/encoding.js create mode 100644 node_modules/negotiator/lib/language.js create mode 100644 node_modules/negotiator/lib/mediaType.js create mode 100644 node_modules/negotiator/package.json create mode 100644 node_modules/next-tick/.lint create mode 100644 node_modules/next-tick/.npmignore create mode 100644 node_modules/next-tick/.travis.yml create mode 100644 node_modules/next-tick/CHANGES create mode 100644 node_modules/next-tick/LICENSE create mode 100644 node_modules/next-tick/README.md create mode 100644 node_modules/next-tick/index.js create mode 100644 node_modules/next-tick/package.json create mode 100644 node_modules/next-tick/test/index.js create mode 100644 node_modules/nodemon/.github/CONTRIBUTING.md create mode 100644 node_modules/nodemon/.github/ISSUE_TEMPLATE.md create mode 100644 node_modules/nodemon/.github/no-response.yml create mode 100644 node_modules/nodemon/.github/oliver.yml create mode 100644 node_modules/nodemon/.github/stale.yml create mode 100644 node_modules/nodemon/.jscsrc create mode 100644 node_modules/nodemon/.jshintrc create mode 100644 node_modules/nodemon/.travis.yml create mode 100644 node_modules/nodemon/CODE_OF_CONDUCT.md create mode 100644 node_modules/nodemon/README.md create mode 100755 node_modules/nodemon/bin/nodemon.js create mode 100644 node_modules/nodemon/commitlint.config.js create mode 100644 node_modules/nodemon/doc/arch.md create mode 100644 node_modules/nodemon/doc/cli/authors.txt create mode 100644 node_modules/nodemon/doc/cli/config.txt create mode 100644 node_modules/nodemon/doc/cli/help.txt create mode 100644 node_modules/nodemon/doc/cli/logo.txt create mode 100644 node_modules/nodemon/doc/cli/options.txt create mode 100644 node_modules/nodemon/doc/cli/topics.txt create mode 100644 node_modules/nodemon/doc/cli/usage.txt create mode 100644 node_modules/nodemon/doc/cli/whoami.txt create mode 100644 node_modules/nodemon/doc/events.md create mode 100644 node_modules/nodemon/doc/option-parsing-logic.md create mode 100644 node_modules/nodemon/doc/requireable.md create mode 100644 node_modules/nodemon/doc/rules.md create mode 100644 node_modules/nodemon/doc/sample-nodemon.md create mode 100644 node_modules/nodemon/faq.md create mode 100644 node_modules/nodemon/lib/cli/index.js create mode 100644 node_modules/nodemon/lib/cli/parse.js create mode 100644 node_modules/nodemon/lib/config/command.js create mode 100644 node_modules/nodemon/lib/config/defaults.js create mode 100644 node_modules/nodemon/lib/config/exec.js create mode 100644 node_modules/nodemon/lib/config/index.js create mode 100644 node_modules/nodemon/lib/config/load.js create mode 100644 node_modules/nodemon/lib/help/index.js create mode 100644 node_modules/nodemon/lib/index.js create mode 100644 node_modules/nodemon/lib/monitor/index.js create mode 100644 node_modules/nodemon/lib/monitor/match.js create mode 100644 node_modules/nodemon/lib/monitor/run.js create mode 100644 node_modules/nodemon/lib/monitor/signals.js create mode 100644 node_modules/nodemon/lib/monitor/watch.js create mode 100644 node_modules/nodemon/lib/nodemon.js create mode 100644 node_modules/nodemon/lib/rules/add.js create mode 100644 node_modules/nodemon/lib/rules/index.js create mode 100644 node_modules/nodemon/lib/rules/parse.js create mode 100644 node_modules/nodemon/lib/spawn.js create mode 100644 node_modules/nodemon/lib/utils/bus.js create mode 100644 node_modules/nodemon/lib/utils/clone.js create mode 100644 node_modules/nodemon/lib/utils/colour.js create mode 100644 node_modules/nodemon/lib/utils/index.js create mode 100644 node_modules/nodemon/lib/utils/log.js create mode 100644 node_modules/nodemon/lib/utils/merge.js create mode 100644 node_modules/nodemon/lib/version.js create mode 120000 node_modules/nodemon/node_modules/.bin/semver create mode 100644 node_modules/nodemon/node_modules/debug/.coveralls.yml create mode 100644 node_modules/nodemon/node_modules/debug/.eslintrc create mode 100644 node_modules/nodemon/node_modules/debug/.npmignore create mode 100644 node_modules/nodemon/node_modules/debug/.travis.yml create mode 100644 node_modules/nodemon/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/nodemon/node_modules/debug/LICENSE create mode 100644 node_modules/nodemon/node_modules/debug/Makefile create mode 100644 node_modules/nodemon/node_modules/debug/README.md create mode 100644 node_modules/nodemon/node_modules/debug/karma.conf.js create mode 100644 node_modules/nodemon/node_modules/debug/node.js create mode 100644 node_modules/nodemon/node_modules/debug/package.json create mode 100644 node_modules/nodemon/node_modules/debug/src/browser.js create mode 100644 node_modules/nodemon/node_modules/debug/src/debug.js create mode 100644 node_modules/nodemon/node_modules/debug/src/index.js create mode 100644 node_modules/nodemon/node_modules/debug/src/node.js create mode 100644 node_modules/nodemon/node_modules/semver/LICENSE create mode 100644 node_modules/nodemon/node_modules/semver/README.md create mode 100755 node_modules/nodemon/node_modules/semver/bin/semver create mode 100644 node_modules/nodemon/node_modules/semver/package.json create mode 100644 node_modules/nodemon/node_modules/semver/range.bnf create mode 100644 node_modules/nodemon/node_modules/semver/semver.js create mode 100644 node_modules/nodemon/package.json create mode 100644 node_modules/nodemon/website/index.html create mode 100644 node_modules/nodemon/website/mixmax.png create mode 100644 node_modules/nodemon/website/nodemon.png create mode 100644 node_modules/nodemon/website/nodemon.svg create mode 100644 node_modules/nodemon/website/sparkpost.png create mode 100644 node_modules/nodemon/website/sparkpost.svg create mode 100644 node_modules/nopt/.npmignore create mode 100644 node_modules/nopt/LICENSE create mode 100644 node_modules/nopt/README.md create mode 100755 node_modules/nopt/bin/nopt.js create mode 100755 node_modules/nopt/examples/my-program.js create mode 100644 node_modules/nopt/lib/nopt.js create mode 100644 node_modules/nopt/package.json create mode 100644 node_modules/normalize-package-data/AUTHORS create mode 100644 node_modules/normalize-package-data/LICENSE create mode 100644 node_modules/normalize-package-data/README.md create mode 100644 node_modules/normalize-package-data/lib/extract_description.js create mode 100644 node_modules/normalize-package-data/lib/fixer.js create mode 100644 node_modules/normalize-package-data/lib/make_warning.js create mode 100644 node_modules/normalize-package-data/lib/normalize.js create mode 100644 node_modules/normalize-package-data/lib/safe_format.js create mode 100644 node_modules/normalize-package-data/lib/typos.json create mode 100644 node_modules/normalize-package-data/lib/warning_messages.json create mode 100644 node_modules/normalize-package-data/package.json create mode 100644 node_modules/normalize-path/LICENSE create mode 100644 node_modules/normalize-path/README.md create mode 100644 node_modules/normalize-path/index.js create mode 100644 node_modules/normalize-path/package.json create mode 100644 node_modules/npm-run-path/index.js create mode 100644 node_modules/npm-run-path/license create mode 100644 node_modules/npm-run-path/package.json create mode 100644 node_modules/npm-run-path/readme.md create mode 100644 node_modules/number-is-nan/index.js create mode 100644 node_modules/number-is-nan/license create mode 100644 node_modules/number-is-nan/package.json create mode 100644 node_modules/number-is-nan/readme.md create mode 100644 node_modules/object-copy/LICENSE create mode 100644 node_modules/object-copy/index.js create mode 100644 node_modules/object-copy/node_modules/define-property/LICENSE create mode 100644 node_modules/object-copy/node_modules/define-property/README.md create mode 100644 node_modules/object-copy/node_modules/define-property/index.js create mode 100644 node_modules/object-copy/node_modules/define-property/package.json create mode 100644 node_modules/object-copy/node_modules/is-accessor-descriptor/LICENSE create mode 100644 node_modules/object-copy/node_modules/is-accessor-descriptor/README.md create mode 100644 node_modules/object-copy/node_modules/is-accessor-descriptor/index.js create mode 100644 node_modules/object-copy/node_modules/is-accessor-descriptor/package.json create mode 100644 node_modules/object-copy/node_modules/is-data-descriptor/LICENSE create mode 100644 node_modules/object-copy/node_modules/is-data-descriptor/README.md create mode 100644 node_modules/object-copy/node_modules/is-data-descriptor/index.js create mode 100644 node_modules/object-copy/node_modules/is-data-descriptor/package.json create mode 100644 node_modules/object-copy/node_modules/is-descriptor/LICENSE create mode 100644 node_modules/object-copy/node_modules/is-descriptor/README.md create mode 100644 node_modules/object-copy/node_modules/is-descriptor/index.js create mode 100644 node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/object-copy/node_modules/is-descriptor/package.json create mode 100644 node_modules/object-copy/node_modules/kind-of/LICENSE create mode 100644 node_modules/object-copy/node_modules/kind-of/README.md create mode 100644 node_modules/object-copy/node_modules/kind-of/index.js create mode 100644 node_modules/object-copy/node_modules/kind-of/package.json create mode 100644 node_modules/object-copy/package.json create mode 100644 node_modules/object-visit/LICENSE create mode 100644 node_modules/object-visit/README.md create mode 100644 node_modules/object-visit/index.js create mode 100644 node_modules/object-visit/package.json create mode 100644 node_modules/object.pick/LICENSE create mode 100644 node_modules/object.pick/README.md create mode 100644 node_modules/object.pick/index.js create mode 100644 node_modules/object.pick/package.json create mode 100644 node_modules/on-finished/HISTORY.md create mode 100644 node_modules/on-finished/LICENSE create mode 100644 node_modules/on-finished/README.md create mode 100644 node_modules/on-finished/index.js create mode 100644 node_modules/on-finished/package.json create mode 100644 node_modules/os-locale/index.js create mode 100644 node_modules/os-locale/license create mode 100644 node_modules/os-locale/package.json create mode 100644 node_modules/os-locale/readme.md create mode 100644 node_modules/p-finally/index.js create mode 100644 node_modules/p-finally/license create mode 100644 node_modules/p-finally/package.json create mode 100644 node_modules/p-finally/readme.md create mode 100644 node_modules/p-limit/index.js create mode 100644 node_modules/p-limit/license create mode 100644 node_modules/p-limit/package.json create mode 100644 node_modules/p-limit/readme.md create mode 100644 node_modules/p-locate/index.js create mode 100644 node_modules/p-locate/license create mode 100644 node_modules/p-locate/package.json create mode 100644 node_modules/p-locate/readme.md create mode 100644 node_modules/p-try/index.js create mode 100644 node_modules/p-try/license create mode 100644 node_modules/p-try/package.json create mode 100644 node_modules/p-try/readme.md create mode 100644 node_modules/package-json/index.js create mode 100644 node_modules/package-json/license create mode 120000 node_modules/package-json/node_modules/.bin/semver create mode 100644 node_modules/package-json/node_modules/semver/LICENSE create mode 100644 node_modules/package-json/node_modules/semver/README.md create mode 100755 node_modules/package-json/node_modules/semver/bin/semver create mode 100644 node_modules/package-json/node_modules/semver/package.json create mode 100644 node_modules/package-json/node_modules/semver/range.bnf create mode 100644 node_modules/package-json/node_modules/semver/semver.js create mode 100644 node_modules/package-json/package.json create mode 100644 node_modules/package-json/readme.md create mode 100644 node_modules/packet-reader/.npmignore create mode 100644 node_modules/packet-reader/README.md create mode 100644 node_modules/packet-reader/index.js create mode 100644 node_modules/packet-reader/package.json create mode 100644 node_modules/packet-reader/test/index.js create mode 100644 node_modules/parse-json/index.js create mode 100644 node_modules/parse-json/license create mode 100644 node_modules/parse-json/package.json create mode 100644 node_modules/parse-json/readme.md create mode 100644 node_modules/parse-json/vendor/parse.js create mode 100644 node_modules/parse-json/vendor/unicode.js create mode 100644 node_modules/parseurl/HISTORY.md create mode 100644 node_modules/parseurl/LICENSE create mode 100644 node_modules/parseurl/README.md create mode 100644 node_modules/parseurl/index.js create mode 100644 node_modules/parseurl/package.json create mode 100644 node_modules/pascalcase/LICENSE create mode 100644 node_modules/pascalcase/README.md create mode 100644 node_modules/pascalcase/index.js create mode 100644 node_modules/pascalcase/package.json create mode 100644 node_modules/path-dirname/index.js create mode 100644 node_modules/path-dirname/license create mode 100644 node_modules/path-dirname/package.json create mode 100644 node_modules/path-dirname/readme.md create mode 100644 node_modules/path-exists/index.js create mode 100644 node_modules/path-exists/license create mode 100644 node_modules/path-exists/package.json create mode 100644 node_modules/path-exists/readme.md create mode 100644 node_modules/path-is-absolute/index.js create mode 100644 node_modules/path-is-absolute/license create mode 100644 node_modules/path-is-absolute/package.json create mode 100644 node_modules/path-is-absolute/readme.md create mode 100644 node_modules/path-is-inside/LICENSE.txt create mode 100644 node_modules/path-is-inside/lib/path-is-inside.js create mode 100644 node_modules/path-is-inside/package.json create mode 100644 node_modules/path-key/index.js create mode 100644 node_modules/path-key/license create mode 100644 node_modules/path-key/package.json create mode 100644 node_modules/path-key/readme.md create mode 100644 node_modules/path-parse/.travis.yml create mode 100644 node_modules/path-parse/README.md create mode 100644 node_modules/path-parse/index.js create mode 100644 node_modules/path-parse/index.min.js create mode 100644 node_modules/path-parse/package.json create mode 100644 node_modules/path-parse/test.js create mode 100644 node_modules/path-parse/test.min.js create mode 100644 node_modules/path-to-regexp/History.md create mode 100644 node_modules/path-to-regexp/LICENSE create mode 100644 node_modules/path-to-regexp/Readme.md create mode 100644 node_modules/path-to-regexp/index.js create mode 100644 node_modules/path-to-regexp/package.json create mode 100644 node_modules/path-type/index.js create mode 100644 node_modules/path-type/license create mode 100644 node_modules/path-type/node_modules/pify/index.js create mode 100644 node_modules/path-type/node_modules/pify/license create mode 100644 node_modules/path-type/node_modules/pify/package.json create mode 100644 node_modules/path-type/node_modules/pify/readme.md create mode 100644 node_modules/path-type/package.json create mode 100644 node_modules/path-type/readme.md create mode 100644 node_modules/pause-stream/.npmignore create mode 100644 node_modules/pause-stream/LICENSE create mode 100644 node_modules/pause-stream/index.js create mode 100644 node_modules/pause-stream/package.json create mode 100644 node_modules/pause-stream/readme.markdown create mode 100644 node_modules/pause-stream/test/index.js create mode 100644 node_modules/pause-stream/test/pause-end.js create mode 100644 node_modules/pg-connection-string/.npmignore create mode 100644 node_modules/pg-connection-string/.travis.yml create mode 100644 node_modules/pg-connection-string/LICENSE create mode 100644 node_modules/pg-connection-string/README.md create mode 100644 node_modules/pg-connection-string/index.js create mode 100644 node_modules/pg-connection-string/package.json create mode 100644 node_modules/pg-connection-string/test/parse.js create mode 100644 node_modules/pg-pool/.npmignore create mode 100644 node_modules/pg-pool/.travis.yml create mode 100644 node_modules/pg-pool/LICENSE create mode 100644 node_modules/pg-pool/Makefile create mode 100644 node_modules/pg-pool/README.md create mode 100644 node_modules/pg-pool/index.js create mode 100644 node_modules/pg-pool/package.json create mode 100644 node_modules/pg-pool/test/bring-your-own-promise.js create mode 100644 node_modules/pg-pool/test/connection-strings.js create mode 100644 node_modules/pg-pool/test/connection-timeout.js create mode 100644 node_modules/pg-pool/test/ending.js create mode 100644 node_modules/pg-pool/test/error-handling.js create mode 100644 node_modules/pg-pool/test/events.js create mode 100644 node_modules/pg-pool/test/idle-timeout.js create mode 100644 node_modules/pg-pool/test/index.js create mode 100644 node_modules/pg-pool/test/logging.js create mode 100644 node_modules/pg-pool/test/mocha.opts create mode 100644 node_modules/pg-pool/test/setup.js create mode 100644 node_modules/pg-pool/test/sizing.js create mode 100644 node_modules/pg-pool/test/submittable.js create mode 100644 node_modules/pg-pool/test/timeout.js create mode 100644 node_modules/pg-pool/test/verify.js create mode 100644 node_modules/pg-types/.npmignore create mode 100644 node_modules/pg-types/.travis.yml create mode 100644 node_modules/pg-types/Makefile create mode 100644 node_modules/pg-types/README.md create mode 100644 node_modules/pg-types/index.js create mode 100644 node_modules/pg-types/lib/arrayParser.js create mode 100644 node_modules/pg-types/lib/binaryParsers.js create mode 100644 node_modules/pg-types/lib/textParsers.js create mode 100644 node_modules/pg-types/package.json create mode 100644 node_modules/pg-types/test/index.js create mode 100644 node_modules/pg-types/test/types.js create mode 100644 node_modules/pg/.eslintrc create mode 100644 node_modules/pg/.travis.yml create mode 100644 node_modules/pg/CHANGELOG.md create mode 100644 node_modules/pg/LICENSE create mode 100644 node_modules/pg/Makefile create mode 100644 node_modules/pg/README.md create mode 100644 node_modules/pg/SPONSORS.md create mode 100644 node_modules/pg/lib/client.js create mode 100644 node_modules/pg/lib/connection-parameters.js create mode 100644 node_modules/pg/lib/connection.js create mode 100644 node_modules/pg/lib/defaults.js create mode 100644 node_modules/pg/lib/index.js create mode 100644 node_modules/pg/lib/native/client.js create mode 100644 node_modules/pg/lib/native/index.js create mode 100644 node_modules/pg/lib/native/query.js create mode 100644 node_modules/pg/lib/query.js create mode 100644 node_modules/pg/lib/result.js create mode 100644 node_modules/pg/lib/type-overrides.js create mode 100644 node_modules/pg/lib/utils.js create mode 100644 node_modules/pg/package.json create mode 100644 node_modules/pgpass/.npmignore create mode 100644 node_modules/pgpass/README.md create mode 100644 node_modules/pgpass/lib/helper.js create mode 100644 node_modules/pgpass/lib/index.js create mode 100644 node_modules/pgpass/package.json create mode 100644 node_modules/pify/index.js create mode 100644 node_modules/pify/license create mode 100644 node_modules/pify/package.json create mode 100644 node_modules/pify/readme.md create mode 100644 node_modules/posix-character-classes/LICENSE create mode 100644 node_modules/posix-character-classes/README.md create mode 100644 node_modules/posix-character-classes/index.js create mode 100644 node_modules/posix-character-classes/package.json create mode 100644 node_modules/postgres-array/index.js create mode 100644 node_modules/postgres-array/license create mode 100644 node_modules/postgres-array/package.json create mode 100644 node_modules/postgres-array/readme.md create mode 100644 node_modules/postgres-bytea/index.js create mode 100644 node_modules/postgres-bytea/license create mode 100644 node_modules/postgres-bytea/package.json create mode 100644 node_modules/postgres-bytea/readme.md create mode 100644 node_modules/postgres-date/index.js create mode 100644 node_modules/postgres-date/license create mode 100644 node_modules/postgres-date/package.json create mode 100644 node_modules/postgres-date/readme.md create mode 100644 node_modules/postgres-interval/index.js create mode 100644 node_modules/postgres-interval/license create mode 100644 node_modules/postgres-interval/package.json create mode 100644 node_modules/postgres-interval/readme.md create mode 100644 node_modules/prepend-http/index.js create mode 100644 node_modules/prepend-http/license create mode 100644 node_modules/prepend-http/package.json create mode 100644 node_modules/prepend-http/readme.md create mode 100644 node_modules/process-nextick-args/index.js create mode 100644 node_modules/process-nextick-args/license.md create mode 100644 node_modules/process-nextick-args/package.json create mode 100644 node_modules/process-nextick-args/readme.md create mode 100644 node_modules/proto-list/LICENSE create mode 100644 node_modules/proto-list/README.md create mode 100644 node_modules/proto-list/package.json create mode 100644 node_modules/proto-list/proto-list.js create mode 100644 node_modules/proto-list/test/basic.js create mode 100644 node_modules/proxy-addr/HISTORY.md create mode 100644 node_modules/proxy-addr/LICENSE create mode 100644 node_modules/proxy-addr/README.md create mode 100644 node_modules/proxy-addr/index.js create mode 100644 node_modules/proxy-addr/package.json create mode 100644 node_modules/ps-tree/.appveyor.yml create mode 100644 node_modules/ps-tree/.npmignore create mode 100644 node_modules/ps-tree/.travis.yml create mode 100644 node_modules/ps-tree/LICENSE create mode 100644 node_modules/ps-tree/README.md create mode 100644 node_modules/ps-tree/bin/ps-tree.js create mode 100755 node_modules/ps-tree/index.js create mode 100644 node_modules/ps-tree/package.json create mode 100644 node_modules/ps-tree/test/direct.js create mode 100644 node_modules/ps-tree/test/exec/child.js create mode 100644 node_modules/ps-tree/test/exec/parent.js create mode 100644 node_modules/ps-tree/test/test.js create mode 100644 node_modules/pseudomap/LICENSE create mode 100644 node_modules/pseudomap/README.md create mode 100644 node_modules/pseudomap/map.js create mode 100644 node_modules/pseudomap/package.json create mode 100644 node_modules/pseudomap/pseudomap.js create mode 100644 node_modules/pseudomap/test/basic.js create mode 100644 node_modules/pstree.remy/.travis.yml create mode 100644 node_modules/pstree.remy/lib/index.js create mode 100644 node_modules/pstree.remy/lib/utils.js create mode 100644 node_modules/pstree.remy/package.json create mode 100644 node_modules/pstree.remy/tests/fixtures/out1 create mode 100644 node_modules/pstree.remy/tests/fixtures/out2 create mode 100644 node_modules/pstree.remy/tests/index.test.js create mode 100644 node_modules/qs/.editorconfig create mode 100644 node_modules/qs/.eslintignore create mode 100644 node_modules/qs/.eslintrc create mode 100644 node_modules/qs/CHANGELOG.md create mode 100644 node_modules/qs/LICENSE create mode 100644 node_modules/qs/README.md create mode 100644 node_modules/qs/dist/qs.js create mode 100644 node_modules/qs/lib/formats.js create mode 100644 node_modules/qs/lib/index.js create mode 100644 node_modules/qs/lib/parse.js create mode 100644 node_modules/qs/lib/stringify.js create mode 100644 node_modules/qs/lib/utils.js create mode 100644 node_modules/qs/package.json create mode 100644 node_modules/qs/test/.eslintrc create mode 100644 node_modules/qs/test/index.js create mode 100644 node_modules/qs/test/parse.js create mode 100644 node_modules/qs/test/stringify.js create mode 100644 node_modules/qs/test/utils.js create mode 100644 node_modules/range-parser/HISTORY.md create mode 100644 node_modules/range-parser/LICENSE create mode 100644 node_modules/range-parser/README.md create mode 100644 node_modules/range-parser/index.js create mode 100644 node_modules/range-parser/package.json create mode 100644 node_modules/raw-body/HISTORY.md create mode 100644 node_modules/raw-body/LICENSE create mode 100644 node_modules/raw-body/README.md create mode 100644 node_modules/raw-body/index.d.ts create mode 100644 node_modules/raw-body/index.js create mode 100644 node_modules/raw-body/package.json create mode 100644 node_modules/rc/.npmignore create mode 100644 node_modules/rc/LICENSE.APACHE2 create mode 100644 node_modules/rc/LICENSE.BSD create mode 100644 node_modules/rc/LICENSE.MIT create mode 100644 node_modules/rc/README.md create mode 100644 node_modules/rc/browser.js create mode 100755 node_modules/rc/cli.js create mode 100755 node_modules/rc/index.js create mode 100644 node_modules/rc/lib/utils.js create mode 100644 node_modules/rc/package.json create mode 100644 node_modules/rc/test/ini.js create mode 100644 node_modules/rc/test/nested-env-vars.js create mode 100644 node_modules/rc/test/test.js create mode 100644 node_modules/read-pkg-up/index.js create mode 100644 node_modules/read-pkg-up/license create mode 100644 node_modules/read-pkg-up/package.json create mode 100644 node_modules/read-pkg-up/readme.md create mode 100644 node_modules/read-pkg/index.js create mode 100644 node_modules/read-pkg/license create mode 100644 node_modules/read-pkg/package.json create mode 100644 node_modules/read-pkg/readme.md create mode 100644 node_modules/readable-stream/.travis.yml create mode 100644 node_modules/readable-stream/CONTRIBUTING.md create mode 100644 node_modules/readable-stream/GOVERNANCE.md create mode 100644 node_modules/readable-stream/LICENSE create mode 100644 node_modules/readable-stream/README.md create mode 100644 node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 node_modules/readable-stream/duplex-browser.js create mode 100644 node_modules/readable-stream/duplex.js create mode 100644 node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 node_modules/readable-stream/lib/_stream_readable.js create mode 100644 node_modules/readable-stream/lib/_stream_transform.js create mode 100644 node_modules/readable-stream/lib/_stream_writable.js create mode 100644 node_modules/readable-stream/lib/internal/streams/BufferList.js create mode 100644 node_modules/readable-stream/lib/internal/streams/destroy.js create mode 100644 node_modules/readable-stream/lib/internal/streams/stream-browser.js create mode 100644 node_modules/readable-stream/lib/internal/streams/stream.js create mode 100644 node_modules/readable-stream/package.json create mode 100644 node_modules/readable-stream/passthrough.js create mode 100644 node_modules/readable-stream/readable-browser.js create mode 100644 node_modules/readable-stream/readable.js create mode 100644 node_modules/readable-stream/transform.js create mode 100644 node_modules/readable-stream/writable-browser.js create mode 100644 node_modules/readable-stream/writable.js create mode 100644 node_modules/readdirp/.npmignore create mode 100644 node_modules/readdirp/.travis.yml create mode 100644 node_modules/readdirp/LICENSE create mode 100644 node_modules/readdirp/README.md create mode 100644 node_modules/readdirp/examples/Readme.md create mode 100644 node_modules/readdirp/examples/callback-api.js create mode 100644 node_modules/readdirp/examples/grep.js create mode 100644 node_modules/readdirp/examples/package.json create mode 100644 node_modules/readdirp/examples/stream-api-pipe.js create mode 100644 node_modules/readdirp/examples/stream-api.js create mode 100644 node_modules/readdirp/package.json create mode 100644 node_modules/readdirp/readdirp.js create mode 100644 node_modules/readdirp/stream-api.js create mode 100644 node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 create mode 100644 node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 create mode 100644 node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 create mode 100644 node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 create mode 100644 node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 create mode 100644 node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 create mode 100644 node_modules/readdirp/test/bed/root_file1.ext1 create mode 100644 node_modules/readdirp/test/bed/root_file2.ext2 create mode 100644 node_modules/readdirp/test/bed/root_file3.ext3 create mode 100644 node_modules/readdirp/test/readdirp-stream.js create mode 100644 node_modules/readdirp/test/readdirp.js create mode 100644 node_modules/regenerator-runtime/README.md create mode 100644 node_modules/regenerator-runtime/package.json create mode 100644 node_modules/regenerator-runtime/path.js create mode 100644 node_modules/regenerator-runtime/runtime-module.js create mode 100644 node_modules/regenerator-runtime/runtime.js create mode 100644 node_modules/regex-not/LICENSE create mode 100644 node_modules/regex-not/README.md create mode 100644 node_modules/regex-not/index.js create mode 100644 node_modules/regex-not/package.json create mode 100644 node_modules/registry-auth-token/CHANGELOG.md create mode 100644 node_modules/registry-auth-token/LICENSE create mode 100644 node_modules/registry-auth-token/README.md create mode 100644 node_modules/registry-auth-token/base64.js create mode 100644 node_modules/registry-auth-token/index.js create mode 100644 node_modules/registry-auth-token/package.json create mode 100644 node_modules/registry-auth-token/registry-url.js create mode 100644 node_modules/registry-auth-token/test/auth-token.test.js create mode 100644 node_modules/registry-auth-token/test/registry-url.test.js create mode 100644 node_modules/registry-auth-token/yarn.lock create mode 100644 node_modules/registry-url/index.js create mode 100644 node_modules/registry-url/license create mode 100644 node_modules/registry-url/package.json create mode 100644 node_modules/registry-url/readme.md create mode 100644 node_modules/remove-trailing-separator/history.md create mode 100644 node_modules/remove-trailing-separator/index.js create mode 100644 node_modules/remove-trailing-separator/license create mode 100644 node_modules/remove-trailing-separator/package.json create mode 100644 node_modules/remove-trailing-separator/readme.md create mode 100644 node_modules/repeat-element/LICENSE create mode 100644 node_modules/repeat-element/README.md create mode 100644 node_modules/repeat-element/index.js create mode 100644 node_modules/repeat-element/package.json create mode 100644 node_modules/repeat-string/LICENSE create mode 100644 node_modules/repeat-string/README.md create mode 100644 node_modules/repeat-string/index.js create mode 100644 node_modules/repeat-string/package.json create mode 100644 node_modules/require-directory/.jshintrc create mode 100644 node_modules/require-directory/.npmignore create mode 100644 node_modules/require-directory/.travis.yml create mode 100644 node_modules/require-directory/LICENSE create mode 100644 node_modules/require-directory/README.markdown create mode 100644 node_modules/require-directory/index.js create mode 100644 node_modules/require-directory/package.json create mode 100644 node_modules/require-main-filename/.npmignore create mode 100644 node_modules/require-main-filename/.travis.yml create mode 100644 node_modules/require-main-filename/LICENSE.txt create mode 100644 node_modules/require-main-filename/README.md create mode 100644 node_modules/require-main-filename/index.js create mode 100644 node_modules/require-main-filename/package.json create mode 100644 node_modules/require-main-filename/test.js create mode 100644 node_modules/resolve-url/.jshintrc create mode 100644 node_modules/resolve-url/LICENSE create mode 100644 node_modules/resolve-url/bower.json create mode 100644 node_modules/resolve-url/changelog.md create mode 100644 node_modules/resolve-url/component.json create mode 100644 node_modules/resolve-url/package.json create mode 100644 node_modules/resolve-url/readme.md create mode 100644 node_modules/resolve-url/resolve-url.js create mode 100644 node_modules/resolve-url/test/resolve-url.js create mode 100644 node_modules/resolve/.editorconfig create mode 100644 node_modules/resolve/.eslintignore create mode 100644 node_modules/resolve/.eslintrc create mode 100644 node_modules/resolve/.travis.yml create mode 100644 node_modules/resolve/LICENSE create mode 100644 node_modules/resolve/appveyor.yml create mode 100644 node_modules/resolve/example/async.js create mode 100644 node_modules/resolve/example/sync.js create mode 100644 node_modules/resolve/index.js create mode 100644 node_modules/resolve/lib/async.js create mode 100644 node_modules/resolve/lib/caller.js create mode 100644 node_modules/resolve/lib/core.js create mode 100644 node_modules/resolve/lib/core.json create mode 100644 node_modules/resolve/lib/node-modules-paths.js create mode 100644 node_modules/resolve/lib/sync.js create mode 100644 node_modules/resolve/package.json create mode 100644 node_modules/resolve/readme.markdown create mode 100644 node_modules/resolve/test/core.js create mode 100644 node_modules/resolve/test/dotdot.js create mode 100644 node_modules/resolve/test/dotdot/abc/index.js create mode 100644 node_modules/resolve/test/dotdot/index.js create mode 100644 node_modules/resolve/test/faulty_basedir.js create mode 100644 node_modules/resolve/test/filter.js create mode 100644 node_modules/resolve/test/filter_sync.js create mode 100644 node_modules/resolve/test/mock.js create mode 100644 node_modules/resolve/test/mock_sync.js create mode 100644 node_modules/resolve/test/module_dir.js create mode 100644 node_modules/resolve/test/module_dir/xmodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/ymodules/aaa/index.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/main.js create mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/package.json create mode 100644 node_modules/resolve/test/node-modules-paths.js create mode 100644 node_modules/resolve/test/node_path.js create mode 100644 node_modules/resolve/test/node_path/x/aaa/index.js create mode 100644 node_modules/resolve/test/node_path/x/ccc/index.js create mode 100644 node_modules/resolve/test/node_path/y/bbb/index.js create mode 100644 node_modules/resolve/test/node_path/y/ccc/index.js create mode 100644 node_modules/resolve/test/nonstring.js create mode 100644 node_modules/resolve/test/pathfilter.js create mode 100644 node_modules/resolve/test/pathfilter/deep_ref/main.js create mode 100644 node_modules/resolve/test/precedence.js create mode 100644 node_modules/resolve/test/precedence/aaa.js create mode 100644 node_modules/resolve/test/precedence/aaa/index.js create mode 100644 node_modules/resolve/test/precedence/aaa/main.js create mode 100644 node_modules/resolve/test/precedence/bbb.js create mode 100644 node_modules/resolve/test/precedence/bbb/main.js create mode 100644 node_modules/resolve/test/resolver.js create mode 100644 node_modules/resolve/test/resolver/baz/doom.js create mode 100644 node_modules/resolve/test/resolver/baz/package.json create mode 100644 node_modules/resolve/test/resolver/baz/quux.js create mode 100644 node_modules/resolve/test/resolver/cup.coffee create mode 100644 node_modules/resolve/test/resolver/dot_main/index.js create mode 100644 node_modules/resolve/test/resolver/dot_main/package.json create mode 100644 node_modules/resolve/test/resolver/dot_slash_main/index.js create mode 100644 node_modules/resolve/test/resolver/dot_slash_main/package.json create mode 100644 node_modules/resolve/test/resolver/foo.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/index.js create mode 100644 node_modules/resolve/test/resolver/incorrect_main/package.json create mode 100644 node_modules/resolve/test/resolver/mug.coffee create mode 100644 node_modules/resolve/test/resolver/mug.js create mode 100644 node_modules/resolve/test/resolver/other_path/lib/other-lib.js create mode 100644 node_modules/resolve/test/resolver/other_path/root.js create mode 100644 node_modules/resolve/test/resolver/quux/foo/index.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo.js create mode 100644 node_modules/resolve/test/resolver/same_names/foo/index.js create mode 100644 node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep create mode 100644 node_modules/resolve/test/resolver/without_basedir/main.js create mode 100644 node_modules/resolve/test/resolver_sync.js create mode 100644 node_modules/resolve/test/subdirs.js create mode 100644 node_modules/resolve/test/symlinks.js create mode 100644 node_modules/ret/LICENSE create mode 100644 node_modules/ret/README.md create mode 100644 node_modules/ret/lib/index.js create mode 100644 node_modules/ret/lib/positions.js create mode 100644 node_modules/ret/lib/sets.js create mode 100644 node_modules/ret/lib/types.js create mode 100644 node_modules/ret/lib/util.js create mode 100644 node_modules/ret/package.json create mode 100644 node_modules/retry-as-promised/.npmignore create mode 100644 node_modules/retry-as-promised/LICENSE create mode 100644 node_modules/retry-as-promised/README.md create mode 100644 node_modules/retry-as-promised/index.js create mode 100644 node_modules/retry-as-promised/package.json create mode 100644 node_modules/retry-as-promised/test/bluebird.test.js create mode 100644 node_modules/safe-buffer/.travis.yml create mode 100644 node_modules/safe-buffer/LICENSE create mode 100644 node_modules/safe-buffer/README.md create mode 100644 node_modules/safe-buffer/index.js create mode 100644 node_modules/safe-buffer/package.json create mode 100644 node_modules/safe-buffer/test.js create mode 100644 node_modules/safe-regex/.travis.yml create mode 100644 node_modules/safe-regex/LICENSE create mode 100644 node_modules/safe-regex/example/safe.js create mode 100644 node_modules/safe-regex/index.js create mode 100644 node_modules/safe-regex/package.json create mode 100644 node_modules/safe-regex/readme.markdown create mode 100644 node_modules/safe-regex/test/regex.js create mode 100644 node_modules/semver-diff/index.js create mode 100644 node_modules/semver-diff/license create mode 120000 node_modules/semver-diff/node_modules/.bin/semver create mode 100644 node_modules/semver-diff/node_modules/semver/LICENSE create mode 100644 node_modules/semver-diff/node_modules/semver/README.md create mode 100755 node_modules/semver-diff/node_modules/semver/bin/semver create mode 100644 node_modules/semver-diff/node_modules/semver/package.json create mode 100644 node_modules/semver-diff/node_modules/semver/range.bnf create mode 100644 node_modules/semver-diff/node_modules/semver/semver.js create mode 100644 node_modules/semver-diff/package.json create mode 100644 node_modules/semver-diff/readme.md create mode 100644 node_modules/semver/.npmignore create mode 100644 node_modules/semver/LICENSE create mode 100644 node_modules/semver/Makefile create mode 100644 node_modules/semver/README.md create mode 100755 node_modules/semver/bin/semver create mode 100644 node_modules/semver/foot.js.txt create mode 100644 node_modules/semver/head.js.txt create mode 100644 node_modules/semver/package.json create mode 100644 node_modules/semver/semver.browser.js create mode 100644 node_modules/semver/semver.browser.js.gz create mode 100644 node_modules/semver/semver.js create mode 100644 node_modules/semver/semver.min.js create mode 100644 node_modules/semver/semver.min.js.gz create mode 100644 node_modules/semver/test/amd.js create mode 100644 node_modules/semver/test/big-numbers.js create mode 100644 node_modules/semver/test/clean.js create mode 100644 node_modules/semver/test/gtr.js create mode 100644 node_modules/semver/test/index.js create mode 100644 node_modules/semver/test/ltr.js create mode 100644 node_modules/semver/test/major-minor-patch.js create mode 100644 node_modules/semver/test/no-module.js create mode 100644 node_modules/send/HISTORY.md create mode 100644 node_modules/send/LICENSE create mode 100644 node_modules/send/README.md create mode 100644 node_modules/send/index.js create mode 100644 node_modules/send/node_modules/statuses/HISTORY.md create mode 100644 node_modules/send/node_modules/statuses/LICENSE create mode 100644 node_modules/send/node_modules/statuses/README.md create mode 100644 node_modules/send/node_modules/statuses/codes.json create mode 100644 node_modules/send/node_modules/statuses/index.js create mode 100644 node_modules/send/node_modules/statuses/package.json create mode 100644 node_modules/send/package.json create mode 100644 node_modules/sequelize-cli/.babelrc create mode 100644 node_modules/sequelize-cli/.editorconfig create mode 100644 node_modules/sequelize-cli/.eslintrc.json create mode 100644 node_modules/sequelize-cli/.github/ISSUE_TEMPLATE.md create mode 100644 node_modules/sequelize-cli/.npmignore create mode 100644 node_modules/sequelize-cli/.travis.yml create mode 100644 node_modules/sequelize-cli/CHANGELOG.md create mode 100644 node_modules/sequelize-cli/CONTRIBUTING.md create mode 100644 node_modules/sequelize-cli/LICENSE create mode 100644 node_modules/sequelize-cli/README.md create mode 100644 node_modules/sequelize-cli/docker-compose.yml create mode 100644 node_modules/sequelize-cli/docs/FAQ.md create mode 100644 node_modules/sequelize-cli/docs/README.md create mode 100644 node_modules/sequelize-cli/lib/assets/migrations/create-table.js create mode 100644 node_modules/sequelize-cli/lib/assets/migrations/skeleton.js create mode 100644 node_modules/sequelize-cli/lib/assets/models/index.js create mode 100644 node_modules/sequelize-cli/lib/assets/models/model.js create mode 100644 node_modules/sequelize-cli/lib/assets/seeders/skeleton.js create mode 100644 node_modules/sequelize-cli/lib/commands/database.js create mode 100644 node_modules/sequelize-cli/lib/commands/init.js create mode 100644 node_modules/sequelize-cli/lib/commands/migrate.js create mode 100644 node_modules/sequelize-cli/lib/commands/migrate_undo.js create mode 100644 node_modules/sequelize-cli/lib/commands/migrate_undo_all.js create mode 100644 node_modules/sequelize-cli/lib/commands/migration_generate.js create mode 100644 node_modules/sequelize-cli/lib/commands/model_generate.js create mode 100644 node_modules/sequelize-cli/lib/commands/seed.js create mode 100644 node_modules/sequelize-cli/lib/commands/seed_generate.js create mode 100644 node_modules/sequelize-cli/lib/commands/seed_one.js create mode 100644 node_modules/sequelize-cli/lib/core/migrator.js create mode 100644 node_modules/sequelize-cli/lib/core/yargs.js create mode 100644 node_modules/sequelize-cli/lib/helpers/asset-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/config-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/generic-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/index.js create mode 100644 node_modules/sequelize-cli/lib/helpers/init-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/migration-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/model-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/path-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/template-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/umzug-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/version-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/view-helper.js create mode 100755 node_modules/sequelize-cli/lib/sequelize create mode 100644 node_modules/sequelize-cli/package.json create mode 100644 node_modules/sequelize-cli/scripts/mocha-bootload.js create mode 100644 node_modules/sequelize-cli/src/assets/migrations/create-table.js create mode 100644 node_modules/sequelize-cli/src/assets/migrations/skeleton.js create mode 100644 node_modules/sequelize-cli/src/assets/models/index.js create mode 100644 node_modules/sequelize-cli/src/assets/models/model.js create mode 100644 node_modules/sequelize-cli/src/assets/seeders/skeleton.js create mode 100644 node_modules/sequelize-cli/src/commands/database.js create mode 100644 node_modules/sequelize-cli/src/commands/init.js create mode 100644 node_modules/sequelize-cli/src/commands/migrate.js create mode 100644 node_modules/sequelize-cli/src/commands/migrate_undo.js create mode 100644 node_modules/sequelize-cli/src/commands/migrate_undo_all.js create mode 100644 node_modules/sequelize-cli/src/commands/migration_generate.js create mode 100644 node_modules/sequelize-cli/src/commands/model_generate.js create mode 100644 node_modules/sequelize-cli/src/commands/seed.js create mode 100644 node_modules/sequelize-cli/src/commands/seed_generate.js create mode 100644 node_modules/sequelize-cli/src/commands/seed_one.js create mode 100644 node_modules/sequelize-cli/src/core/migrator.js create mode 100644 node_modules/sequelize-cli/src/core/yargs.js create mode 100644 node_modules/sequelize-cli/src/helpers/asset-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/config-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/generic-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/index.js create mode 100644 node_modules/sequelize-cli/src/helpers/init-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/migration-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/model-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/path-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/template-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/umzug-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/version-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/view-helper.js create mode 100644 node_modules/sequelize-cli/src/sequelize.js create mode 100644 node_modules/sequelize-cli/test/db/db-create.test.js create mode 100644 node_modules/sequelize-cli/test/db/db-drop.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate-json.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/schema/add_timestamps.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/status.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/undo.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/undo/all.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/undo/all_to.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed-json.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/all.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/undo.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/undo/all.test.js create mode 100644 node_modules/sequelize-cli/test/environment-variable.test.js create mode 100644 node_modules/sequelize-cli/test/help.test.js create mode 100644 node_modules/sequelize-cli/test/init.test.js create mode 100644 node_modules/sequelize-cli/test/migration/create.test.js create mode 100644 node_modules/sequelize-cli/test/model/create.test.js create mode 100644 node_modules/sequelize-cli/test/options.test.js create mode 100644 node_modules/sequelize-cli/test/seed/create.test.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111117063700-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111130161100-emptyMigration.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205064000-renamePersonToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205162700-addSignatureColumnToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205167000-addUniqueNameColumnToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206061400-removeShopIdColumnFromUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206063000-changeSignatureColumnOfUserToMendatory.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206163300-renameSignatureColumnOfUserToSig.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909174103-createFunctionGetAnAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909174253-renameFunctionGetAnAnswerGetTheAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909175000-deleteFunctionGetTheAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909175939-createTestTableForTrigger.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909180846-createTriggerOnTriggerTestTable.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909181148-renameTriggerUpdatedAtToUpdateUpdatedAt.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909185621-deleteTriggerUpdateUpdatedAt.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20170526153000-createPost.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/invalid/20141208213500-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/new/20141208213500-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/project.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/20111117063700-seedPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/20111117063900-seedPerson2.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/new/20141208213500-seedPerson.js create mode 100644 node_modules/sequelize-cli/test/support/config/config.js create mode 100644 node_modules/sequelize-cli/test/support/config/options.js create mode 100644 node_modules/sequelize-cli/test/support/helpers.js create mode 100644 node_modules/sequelize-cli/test/support/index.js create mode 100644 node_modules/sequelize-cli/test/support/tmp/.gitkeep create mode 100644 node_modules/sequelize-cli/test/url.test.js create mode 100644 node_modules/sequelize-cli/test/version.test.js create mode 100644 node_modules/sequelize/.esdoc.json create mode 100644 node_modules/sequelize/.eslintrc.json create mode 100644 node_modules/sequelize/CONTACT.md create mode 100644 node_modules/sequelize/CONTRIBUTING.DOCS.md create mode 100644 node_modules/sequelize/CONTRIBUTING.md create mode 100644 node_modules/sequelize/Dockerfile create mode 100644 node_modules/sequelize/LICENSE create mode 100644 node_modules/sequelize/README.md create mode 100644 node_modules/sequelize/index.js create mode 100644 node_modules/sequelize/lib/associations/base.js create mode 100644 node_modules/sequelize/lib/associations/belongs-to-many.js create mode 100644 node_modules/sequelize/lib/associations/belongs-to.js create mode 100644 node_modules/sequelize/lib/associations/has-many.js create mode 100644 node_modules/sequelize/lib/associations/has-one.js create mode 100644 node_modules/sequelize/lib/associations/helpers.js create mode 100644 node_modules/sequelize/lib/associations/index.js create mode 100644 node_modules/sequelize/lib/associations/mixin.js create mode 100644 node_modules/sequelize/lib/data-types.js create mode 100644 node_modules/sequelize/lib/deferrable.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/index.js create mode 100755 node_modules/sequelize/lib/dialects/abstract/query-generator.js create mode 100755 node_modules/sequelize/lib/dialects/abstract/query.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/index.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/resource-lock.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/index.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query.js create mode 100644 node_modules/sequelize/lib/dialects/parserStore.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/hstore.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/index.js create mode 100755 node_modules/sequelize/lib/dialects/postgres/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/query.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/range.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/index.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query.js create mode 100644 node_modules/sequelize/lib/errors.js create mode 100644 node_modules/sequelize/lib/errors/index.js create mode 100644 node_modules/sequelize/lib/hooks.js create mode 100644 node_modules/sequelize/lib/instance-validator.js create mode 100644 node_modules/sequelize/lib/model-manager.js create mode 100644 node_modules/sequelize/lib/model.js create mode 100644 node_modules/sequelize/lib/operators.js create mode 100644 node_modules/sequelize/lib/promise.js create mode 100644 node_modules/sequelize/lib/query-interface.js create mode 100644 node_modules/sequelize/lib/query-types.js create mode 100755 node_modules/sequelize/lib/sequelize.js create mode 100644 node_modules/sequelize/lib/sql-string.js create mode 100644 node_modules/sequelize/lib/table-hints.js create mode 100644 node_modules/sequelize/lib/transaction.js create mode 100644 node_modules/sequelize/lib/utils.js create mode 100644 node_modules/sequelize/lib/utils/inherits.js create mode 100644 node_modules/sequelize/lib/utils/logger.js create mode 100644 node_modules/sequelize/lib/utils/parameter-validator.js create mode 100644 node_modules/sequelize/lib/utils/validator-extras.js create mode 120000 node_modules/sequelize/node_modules/.bin/semver create mode 100644 node_modules/sequelize/node_modules/debug/.coveralls.yml create mode 100644 node_modules/sequelize/node_modules/debug/.eslintrc create mode 100644 node_modules/sequelize/node_modules/debug/.npmignore create mode 100644 node_modules/sequelize/node_modules/debug/.travis.yml create mode 100644 node_modules/sequelize/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/sequelize/node_modules/debug/LICENSE create mode 100644 node_modules/sequelize/node_modules/debug/Makefile create mode 100644 node_modules/sequelize/node_modules/debug/README.md create mode 100644 node_modules/sequelize/node_modules/debug/karma.conf.js create mode 100644 node_modules/sequelize/node_modules/debug/node.js create mode 100644 node_modules/sequelize/node_modules/debug/package.json create mode 100644 node_modules/sequelize/node_modules/debug/src/browser.js create mode 100644 node_modules/sequelize/node_modules/debug/src/debug.js create mode 100644 node_modules/sequelize/node_modules/debug/src/index.js create mode 100644 node_modules/sequelize/node_modules/debug/src/node.js create mode 100644 node_modules/sequelize/node_modules/semver/LICENSE create mode 100644 node_modules/sequelize/node_modules/semver/README.md create mode 100755 node_modules/sequelize/node_modules/semver/bin/semver create mode 100644 node_modules/sequelize/node_modules/semver/package.json create mode 100644 node_modules/sequelize/node_modules/semver/range.bnf create mode 100644 node_modules/sequelize/node_modules/semver/semver.js create mode 100644 node_modules/sequelize/package.json create mode 100644 node_modules/sequelize/sscce_template.js create mode 100644 node_modules/serve-static/HISTORY.md create mode 100644 node_modules/serve-static/LICENSE create mode 100644 node_modules/serve-static/README.md create mode 100644 node_modules/serve-static/index.js create mode 100644 node_modules/serve-static/package.json create mode 100644 node_modules/set-blocking/CHANGELOG.md create mode 100644 node_modules/set-blocking/LICENSE.txt create mode 100644 node_modules/set-blocking/README.md create mode 100644 node_modules/set-blocking/index.js create mode 100644 node_modules/set-blocking/package.json create mode 100644 node_modules/set-getter/LICENSE create mode 100644 node_modules/set-getter/README.md create mode 100644 node_modules/set-getter/index.js create mode 100644 node_modules/set-getter/package.json create mode 100644 node_modules/set-immediate-shim/index.js create mode 100644 node_modules/set-immediate-shim/package.json create mode 100644 node_modules/set-immediate-shim/readme.md create mode 100644 node_modules/set-value/LICENSE create mode 100644 node_modules/set-value/README.md create mode 100644 node_modules/set-value/index.js create mode 100644 node_modules/set-value/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/set-value/node_modules/extend-shallow/README.md create mode 100644 node_modules/set-value/node_modules/extend-shallow/index.js create mode 100644 node_modules/set-value/node_modules/extend-shallow/package.json create mode 100644 node_modules/set-value/package.json create mode 100644 node_modules/setprototypeof/LICENSE create mode 100644 node_modules/setprototypeof/README.md create mode 100644 node_modules/setprototypeof/index.js create mode 100644 node_modules/setprototypeof/package.json create mode 100644 node_modules/shebang-command/index.js create mode 100644 node_modules/shebang-command/license create mode 100644 node_modules/shebang-command/package.json create mode 100644 node_modules/shebang-command/readme.md create mode 100644 node_modules/shebang-regex/index.js create mode 100644 node_modules/shebang-regex/license create mode 100644 node_modules/shebang-regex/package.json create mode 100644 node_modules/shebang-regex/readme.md create mode 100644 node_modules/shimmer/.travis.yml create mode 100644 node_modules/shimmer/README.md create mode 100644 node_modules/shimmer/index.js create mode 100644 node_modules/shimmer/package.json create mode 100644 node_modules/shimmer/test/init.tap.js create mode 100644 node_modules/shimmer/test/massUnwrap.tap.js create mode 100644 node_modules/shimmer/test/massWrap.tap.js create mode 100644 node_modules/shimmer/test/unwrap.tap.js create mode 100644 node_modules/shimmer/test/wrap.tap.js create mode 100644 node_modules/sigmund/LICENSE create mode 100644 node_modules/sigmund/README.md create mode 100644 node_modules/sigmund/bench.js create mode 100644 node_modules/sigmund/package.json create mode 100644 node_modules/sigmund/sigmund.js create mode 100644 node_modules/sigmund/test/basic.js create mode 100644 node_modules/signal-exit/CHANGELOG.md create mode 100644 node_modules/signal-exit/LICENSE.txt create mode 100644 node_modules/signal-exit/README.md create mode 100644 node_modules/signal-exit/index.js create mode 100644 node_modules/signal-exit/package.json create mode 100644 node_modules/signal-exit/signals.js create mode 100644 node_modules/snapdragon-node/LICENSE create mode 100644 node_modules/snapdragon-node/README.md create mode 100644 node_modules/snapdragon-node/index.js create mode 100644 node_modules/snapdragon-node/node_modules/define-property/LICENSE create mode 100644 node_modules/snapdragon-node/node_modules/define-property/README.md create mode 100644 node_modules/snapdragon-node/node_modules/define-property/index.js create mode 100644 node_modules/snapdragon-node/node_modules/define-property/package.json create mode 100644 node_modules/snapdragon-node/package.json create mode 100644 node_modules/snapdragon-util/LICENSE create mode 100644 node_modules/snapdragon-util/README.md create mode 100644 node_modules/snapdragon-util/index.js create mode 100644 node_modules/snapdragon-util/node_modules/kind-of/LICENSE create mode 100644 node_modules/snapdragon-util/node_modules/kind-of/README.md create mode 100644 node_modules/snapdragon-util/node_modules/kind-of/index.js create mode 100644 node_modules/snapdragon-util/node_modules/kind-of/package.json create mode 100644 node_modules/snapdragon-util/package.json create mode 100644 node_modules/snapdragon/LICENSE create mode 100644 node_modules/snapdragon/README.md create mode 100644 node_modules/snapdragon/index.js create mode 100644 node_modules/snapdragon/lib/compiler.js create mode 100644 node_modules/snapdragon/lib/parser.js create mode 100644 node_modules/snapdragon/lib/position.js create mode 100644 node_modules/snapdragon/lib/source-maps.js create mode 100644 node_modules/snapdragon/lib/utils.js create mode 100644 node_modules/snapdragon/node_modules/define-property/LICENSE create mode 100644 node_modules/snapdragon/node_modules/define-property/README.md create mode 100644 node_modules/snapdragon/node_modules/define-property/index.js create mode 100644 node_modules/snapdragon/node_modules/define-property/package.json create mode 100644 node_modules/snapdragon/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/snapdragon/node_modules/extend-shallow/README.md create mode 100644 node_modules/snapdragon/node_modules/extend-shallow/index.js create mode 100644 node_modules/snapdragon/node_modules/extend-shallow/package.json create mode 100644 node_modules/snapdragon/node_modules/is-accessor-descriptor/LICENSE create mode 100644 node_modules/snapdragon/node_modules/is-accessor-descriptor/README.md create mode 100644 node_modules/snapdragon/node_modules/is-accessor-descriptor/index.js create mode 100644 node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/snapdragon/node_modules/is-accessor-descriptor/package.json create mode 100644 node_modules/snapdragon/node_modules/is-data-descriptor/LICENSE create mode 100644 node_modules/snapdragon/node_modules/is-data-descriptor/README.md create mode 100644 node_modules/snapdragon/node_modules/is-data-descriptor/index.js create mode 100644 node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/snapdragon/node_modules/is-data-descriptor/package.json create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/LICENSE create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/README.md create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/index.js create mode 100644 node_modules/snapdragon/node_modules/is-descriptor/package.json create mode 100644 node_modules/snapdragon/node_modules/kind-of/LICENSE create mode 100644 node_modules/snapdragon/node_modules/kind-of/README.md create mode 100644 node_modules/snapdragon/node_modules/kind-of/index.js create mode 100644 node_modules/snapdragon/node_modules/kind-of/package.json create mode 100644 node_modules/snapdragon/package.json create mode 100644 node_modules/source-map-resolve/.jshintrc create mode 100644 node_modules/source-map-resolve/.travis.yml create mode 100644 node_modules/source-map-resolve/LICENSE create mode 100644 node_modules/source-map-resolve/bower.json create mode 100644 node_modules/source-map-resolve/changelog.md create mode 100644 node_modules/source-map-resolve/component.json create mode 100644 node_modules/source-map-resolve/generate-source-map-resolve.js create mode 100644 node_modules/source-map-resolve/lib/decode-uri-component.js create mode 100644 node_modules/source-map-resolve/lib/resolve-url.js create mode 100644 node_modules/source-map-resolve/lib/source-map-resolve-node.js create mode 100644 node_modules/source-map-resolve/package.json create mode 100644 node_modules/source-map-resolve/readme.md create mode 100644 node_modules/source-map-resolve/source-map-resolve.js create mode 100644 node_modules/source-map-resolve/source-map-resolve.js.template create mode 100644 node_modules/source-map-resolve/x-package.json5 create mode 100644 node_modules/source-map-url/.jshintrc create mode 100644 node_modules/source-map-url/LICENSE create mode 100644 node_modules/source-map-url/bower.json create mode 100644 node_modules/source-map-url/changelog.md create mode 100644 node_modules/source-map-url/component.json create mode 100644 node_modules/source-map-url/package.json create mode 100644 node_modules/source-map-url/readme.md create mode 100644 node_modules/source-map-url/source-map-url.js create mode 100644 node_modules/source-map-url/test/source-map-url.js create mode 100644 node_modules/source-map-url/x-package.json5 create mode 100644 node_modules/source-map/CHANGELOG.md create mode 100644 node_modules/source-map/LICENSE create mode 100644 node_modules/source-map/README.md create mode 100644 node_modules/source-map/dist/source-map.debug.js create mode 100644 node_modules/source-map/dist/source-map.js create mode 100644 node_modules/source-map/dist/source-map.min.js create mode 100644 node_modules/source-map/dist/source-map.min.js.map create mode 100644 node_modules/source-map/lib/array-set.js create mode 100644 node_modules/source-map/lib/base64-vlq.js create mode 100644 node_modules/source-map/lib/base64.js create mode 100644 node_modules/source-map/lib/binary-search.js create mode 100644 node_modules/source-map/lib/mapping-list.js create mode 100644 node_modules/source-map/lib/quick-sort.js create mode 100644 node_modules/source-map/lib/source-map-consumer.js create mode 100644 node_modules/source-map/lib/source-map-generator.js create mode 100644 node_modules/source-map/lib/source-node.js create mode 100644 node_modules/source-map/lib/util.js create mode 100644 node_modules/source-map/package.json create mode 100644 node_modules/source-map/source-map.js create mode 100644 node_modules/spdx-correct/LICENSE create mode 100644 node_modules/spdx-correct/README.md create mode 100644 node_modules/spdx-correct/index.js create mode 100644 node_modules/spdx-correct/package.json create mode 100644 node_modules/spdx-exceptions/README.md create mode 100644 node_modules/spdx-exceptions/index.json create mode 100644 node_modules/spdx-exceptions/package.json create mode 100644 node_modules/spdx-expression-parse/AUTHORS create mode 100644 node_modules/spdx-expression-parse/LICENSE create mode 100644 node_modules/spdx-expression-parse/README.md create mode 100644 node_modules/spdx-expression-parse/index.js create mode 100644 node_modules/spdx-expression-parse/package.json create mode 100644 node_modules/spdx-expression-parse/parse.js create mode 100644 node_modules/spdx-expression-parse/scan.js create mode 100644 node_modules/spdx-license-ids/README.md create mode 100644 node_modules/spdx-license-ids/deprecated.json create mode 100644 node_modules/spdx-license-ids/index.json create mode 100644 node_modules/spdx-license-ids/package.json create mode 100644 node_modules/split-string/LICENSE create mode 100644 node_modules/split-string/README.md create mode 100644 node_modules/split-string/index.js create mode 100644 node_modules/split-string/package.json create mode 100644 node_modules/split/.npmignore create mode 100644 node_modules/split/.travis.yml create mode 100644 node_modules/split/LICENCE create mode 100644 node_modules/split/examples/pretty.js create mode 100644 node_modules/split/index.js create mode 100644 node_modules/split/package.json create mode 100644 node_modules/split/readme.markdown create mode 100644 node_modules/split/test/options.asynct.js create mode 100644 node_modules/split/test/partitioned_unicode.js create mode 100644 node_modules/split/test/split.asynct.js create mode 100644 node_modules/split/test/try_catch.asynct.js create mode 100644 node_modules/static-extend/LICENSE create mode 100644 node_modules/static-extend/index.js create mode 100644 node_modules/static-extend/node_modules/define-property/LICENSE create mode 100644 node_modules/static-extend/node_modules/define-property/README.md create mode 100644 node_modules/static-extend/node_modules/define-property/index.js create mode 100644 node_modules/static-extend/node_modules/define-property/package.json create mode 100644 node_modules/static-extend/node_modules/is-accessor-descriptor/LICENSE create mode 100644 node_modules/static-extend/node_modules/is-accessor-descriptor/README.md create mode 100644 node_modules/static-extend/node_modules/is-accessor-descriptor/index.js create mode 100644 node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/static-extend/node_modules/is-accessor-descriptor/package.json create mode 100644 node_modules/static-extend/node_modules/is-data-descriptor/LICENSE create mode 100644 node_modules/static-extend/node_modules/is-data-descriptor/README.md create mode 100644 node_modules/static-extend/node_modules/is-data-descriptor/index.js create mode 100644 node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/static-extend/node_modules/is-data-descriptor/package.json create mode 100644 node_modules/static-extend/node_modules/is-descriptor/LICENSE create mode 100644 node_modules/static-extend/node_modules/is-descriptor/README.md create mode 100644 node_modules/static-extend/node_modules/is-descriptor/index.js create mode 100644 node_modules/static-extend/node_modules/is-descriptor/package.json create mode 100644 node_modules/static-extend/node_modules/kind-of/LICENSE create mode 100644 node_modules/static-extend/node_modules/kind-of/README.md create mode 100644 node_modules/static-extend/node_modules/kind-of/index.js create mode 100644 node_modules/static-extend/node_modules/kind-of/package.json create mode 100644 node_modules/static-extend/package.json create mode 100644 node_modules/statuses/HISTORY.md create mode 100644 node_modules/statuses/LICENSE create mode 100644 node_modules/statuses/README.md create mode 100644 node_modules/statuses/codes.json create mode 100644 node_modules/statuses/index.js create mode 100644 node_modules/statuses/package.json create mode 100644 node_modules/stream-combiner/.npmignore create mode 100644 node_modules/stream-combiner/.travis.yml create mode 100644 node_modules/stream-combiner/LICENSE create mode 100644 node_modules/stream-combiner/README.md create mode 100644 node_modules/stream-combiner/index.js create mode 100644 node_modules/stream-combiner/package.json create mode 100644 node_modules/stream-combiner/test/index.js create mode 100644 node_modules/string-width/index.js create mode 100644 node_modules/string-width/license create mode 100644 node_modules/string-width/package.json create mode 100644 node_modules/string-width/readme.md create mode 100644 node_modules/string_decoder/.npmignore create mode 100644 node_modules/string_decoder/LICENSE create mode 100644 node_modules/string_decoder/README.md create mode 100644 node_modules/string_decoder/lib/string_decoder.js create mode 100644 node_modules/string_decoder/package.json create mode 100644 node_modules/strip-ansi/index.js create mode 100644 node_modules/strip-ansi/license create mode 100644 node_modules/strip-ansi/package.json create mode 100644 node_modules/strip-ansi/readme.md create mode 100644 node_modules/strip-bom/index.js create mode 100644 node_modules/strip-bom/license create mode 100644 node_modules/strip-bom/package.json create mode 100644 node_modules/strip-bom/readme.md create mode 100644 node_modules/strip-eof/index.js create mode 100644 node_modules/strip-eof/license create mode 100644 node_modules/strip-eof/package.json create mode 100644 node_modules/strip-eof/readme.md create mode 100644 node_modules/strip-json-comments/index.js create mode 100644 node_modules/strip-json-comments/license create mode 100644 node_modules/strip-json-comments/package.json create mode 100644 node_modules/strip-json-comments/readme.md create mode 100644 node_modules/supports-color/browser.js create mode 100644 node_modules/supports-color/index.js create mode 100644 node_modules/supports-color/license create mode 100644 node_modules/supports-color/package.json create mode 100644 node_modules/supports-color/readme.md create mode 100644 node_modules/term-size/index.js create mode 100644 node_modules/term-size/license create mode 100644 node_modules/term-size/package.json create mode 100644 node_modules/term-size/readme.md create mode 100755 node_modules/term-size/vendor/macos/term-size create mode 100644 node_modules/term-size/vendor/windows/term-size.exe create mode 100644 node_modules/terraformer-wkt-parser/.npmignore create mode 100644 node_modules/terraformer-wkt-parser/.travis.yml create mode 100644 node_modules/terraformer-wkt-parser/AUTHORS create mode 100644 node_modules/terraformer-wkt-parser/CHANGELOG.md create mode 100644 node_modules/terraformer-wkt-parser/Gruntfile.js create mode 100644 node_modules/terraformer-wkt-parser/LICENSE create mode 100644 node_modules/terraformer-wkt-parser/README.md create mode 100644 node_modules/terraformer-wkt-parser/bower.json create mode 100644 node_modules/terraformer-wkt-parser/coverage/__root__/index.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/__root__/terraformer-wkt-parser.js.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/base.css create mode 100644 node_modules/terraformer-wkt-parser/coverage/coverage.json create mode 100644 node_modules/terraformer-wkt-parser/coverage/dist/index.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/dist/terraformer-wkt-parser.js.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/index.html create mode 100644 node_modules/terraformer-wkt-parser/coverage/prettify.css create mode 100644 node_modules/terraformer-wkt-parser/coverage/prettify.js create mode 100644 node_modules/terraformer-wkt-parser/coverage/sort-arrow-sprite.png create mode 100644 node_modules/terraformer-wkt-parser/coverage/sorter.js create mode 100644 node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.js create mode 100644 node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.min.js create mode 100644 node_modules/terraformer-wkt-parser/examples/feature_collection.json create mode 100644 node_modules/terraformer-wkt-parser/examples/linestring.json create mode 100644 node_modules/terraformer-wkt-parser/examples/linestring.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_linestring.json create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_linestring.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_polygon.json create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_polygon.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multi_polygon_with_hole.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multipoint.json create mode 100644 node_modules/terraformer-wkt-parser/examples/multipoint.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/multipoint_alternate.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/point.json create mode 100644 node_modules/terraformer-wkt-parser/examples/point.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon.json create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon_with_dots.wkt create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon_with_hole.json create mode 100644 node_modules/terraformer-wkt-parser/examples/polygon_with_hole.wkt create mode 100644 node_modules/terraformer-wkt-parser/package.json create mode 100644 node_modules/terraformer-wkt-parser/spec/wktSpec.js create mode 100644 node_modules/terraformer-wkt-parser/src/module-source.js create mode 100644 node_modules/terraformer-wkt-parser/src/wkt.yy create mode 100644 node_modules/terraformer-wkt-parser/terraformer-wkt-parser.d.ts create mode 100644 node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js create mode 100644 node_modules/terraformer-wkt-parser/terraformer-wkt-parser.min.js create mode 100644 node_modules/terraformer-wkt-parser/test.js create mode 100644 node_modules/terraformer-wkt-parser/test.ts create mode 100644 node_modules/terraformer-wkt-parser/test/convert-test.js create mode 100644 node_modules/terraformer-wkt-parser/test/terraformer-parse-test.js create mode 100644 node_modules/terraformer-wkt-parser/test/wkt-parse-test.js create mode 100644 node_modules/terraformer-wkt-parser/tsconfig.json create mode 100644 node_modules/terraformer-wkt-parser/typings.json create mode 100644 node_modules/terraformer-wkt-parser/typings/globals/geojson/index.d.ts create mode 100644 node_modules/terraformer-wkt-parser/typings/globals/geojson/typings.json create mode 100644 node_modules/terraformer-wkt-parser/typings/index.d.ts create mode 100644 node_modules/terraformer/.coverage/__root__/index.html create mode 100644 node_modules/terraformer/.coverage/__root__/terraformer.js.html create mode 100644 node_modules/terraformer/.coverage/base.css create mode 100644 node_modules/terraformer/.coverage/coverage.json create mode 100644 node_modules/terraformer/.coverage/index.html create mode 100644 node_modules/terraformer/.coverage/prettify.css create mode 100644 node_modules/terraformer/.coverage/prettify.js create mode 100644 node_modules/terraformer/.coverage/sort-arrow-sprite.png create mode 100644 node_modules/terraformer/.coverage/sorter.js create mode 100644 node_modules/terraformer/.npmignore create mode 100755 node_modules/terraformer/.travis.yml create mode 100644 node_modules/terraformer/CHANGELOG.md create mode 100644 node_modules/terraformer/Gemfile create mode 100644 node_modules/terraformer/Gemfile.lock create mode 100755 node_modules/terraformer/LICENSE create mode 100755 node_modules/terraformer/README.md create mode 100644 node_modules/terraformer/bower.json create mode 100644 node_modules/terraformer/docs-build/CNAME create mode 100644 node_modules/terraformer/docs-build/arcgis-parser/index.html create mode 100644 node_modules/terraformer/docs-build/assets/css/terraformer-02847305.css create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo-3a94862e.svg create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo-71163913.ttf create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo-80bed756.woff create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo-fc93d7bf.eot create mode 100644 node_modules/terraformer/docs-build/assets/fonts/esri-logo.dev-aed9f839.svg create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-arcparser-a0228324.png create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-core-93b83c36.png create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-geostore-9e09ce2c.png create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-parser-a57c9c2d.png create mode 100644 node_modules/terraformer/docs-build/assets/images/terraformer-wktparser-b18bc9d9.png create mode 100644 node_modules/terraformer/docs-build/assets/javascripts/all-da39a3ee.js create mode 100644 node_modules/terraformer/docs-build/assets/javascripts/classie-b6db1f70.js create mode 100644 node_modules/terraformer/docs-build/assets/javascripts/drawer-3a1490eb.js create mode 100644 node_modules/terraformer/docs-build/assets/javascripts/modernizr.custom-cadc78a2.js create mode 100644 node_modules/terraformer/docs-build/core/index.html create mode 100644 node_modules/terraformer/docs-build/favicon.ico create mode 100644 node_modules/terraformer/docs-build/geostore/alternate-indexes/index.html create mode 100644 node_modules/terraformer/docs-build/geostore/core-concepts/index.html create mode 100644 node_modules/terraformer/docs-build/geostore/data-stores/index.html create mode 100644 node_modules/terraformer/docs-build/geostore/index.html create mode 100644 node_modules/terraformer/docs-build/geostore/spatial-indexes/index.html create mode 100644 node_modules/terraformer/docs-build/getting-started/index.html create mode 100644 node_modules/terraformer/docs-build/glossary/index.html create mode 100644 node_modules/terraformer/docs-build/index.html create mode 100644 node_modules/terraformer/docs-build/install/index.html create mode 100644 node_modules/terraformer/docs-build/partials/cover/index.html create mode 100644 node_modules/terraformer/docs-build/partials/doctoc/index.html create mode 100644 node_modules/terraformer/docs-build/partials/footer/index.html create mode 100644 node_modules/terraformer/docs-build/partials/index_partials/arcgis_parser/index.html create mode 100644 node_modules/terraformer/docs-build/partials/index_partials/geostore/index.html create mode 100644 node_modules/terraformer/docs-build/partials/index_partials/terraformer_core/index.html create mode 100644 node_modules/terraformer/docs-build/partials/index_partials/wkt_parser/index.html create mode 100644 node_modules/terraformer/docs-build/partials/nav/index.html create mode 100644 node_modules/terraformer/docs-build/partials/subnav/index.html create mode 100644 node_modules/terraformer/docs-build/wkt-parser/index.html create mode 100755 node_modules/terraformer/gruntfile.js create mode 100644 node_modules/terraformer/package.json create mode 100755 node_modules/terraformer/release.sh create mode 100755 node_modules/terraformer/spec/geojsonHelpers.js create mode 100755 node_modules/terraformer/spec/spatialReferenceSpec.js create mode 100755 node_modules/terraformer/spec/terraformerSpec.js create mode 100644 node_modules/terraformer/terraformer-1.0.8.min.js create mode 100644 node_modules/terraformer/terraformer.d.ts create mode 100755 node_modules/terraformer/terraformer.js create mode 100644 node_modules/terraformer/test.js create mode 100644 node_modules/terraformer/test.ts create mode 100644 node_modules/terraformer/tsconfig.json create mode 100644 node_modules/terraformer/tslint.json create mode 100644 node_modules/through/.travis.yml create mode 100644 node_modules/through/LICENSE.APACHE2 create mode 100644 node_modules/through/LICENSE.MIT create mode 100644 node_modules/through/index.js create mode 100644 node_modules/through/package.json create mode 100644 node_modules/through/readme.markdown create mode 100644 node_modules/through/test/async.js create mode 100644 node_modules/through/test/auto-destroy.js create mode 100644 node_modules/through/test/buffering.js create mode 100644 node_modules/through/test/end.js create mode 100644 node_modules/through/test/index.js create mode 100644 node_modules/timed-out/index.js create mode 100644 node_modules/timed-out/license create mode 100644 node_modules/timed-out/package.json create mode 100644 node_modules/timed-out/readme.md create mode 100644 node_modules/timers-ext/.lint create mode 100644 node_modules/timers-ext/.npmignore create mode 100644 node_modules/timers-ext/.travis.yml create mode 100644 node_modules/timers-ext/CHANGES create mode 100644 node_modules/timers-ext/LICENSE create mode 100644 node_modules/timers-ext/README.md create mode 100644 node_modules/timers-ext/delay.js create mode 100644 node_modules/timers-ext/max-timeout.js create mode 100644 node_modules/timers-ext/once.js create mode 100644 node_modules/timers-ext/package.json create mode 100644 node_modules/timers-ext/test/delay.js create mode 100644 node_modules/timers-ext/test/max-timeout.js create mode 100644 node_modules/timers-ext/test/once.js create mode 100644 node_modules/timers-ext/test/throttle.js create mode 100644 node_modules/timers-ext/test/valid-timeout.js create mode 100644 node_modules/timers-ext/throttle.js create mode 100644 node_modules/timers-ext/valid-timeout.js create mode 100644 node_modules/to-object-path/LICENSE create mode 100644 node_modules/to-object-path/README.md create mode 100644 node_modules/to-object-path/index.js create mode 100644 node_modules/to-object-path/node_modules/kind-of/LICENSE create mode 100644 node_modules/to-object-path/node_modules/kind-of/README.md create mode 100644 node_modules/to-object-path/node_modules/kind-of/index.js create mode 100644 node_modules/to-object-path/node_modules/kind-of/package.json create mode 100644 node_modules/to-object-path/package.json create mode 100644 node_modules/to-regex-range/LICENSE create mode 100644 node_modules/to-regex-range/README.md create mode 100644 node_modules/to-regex-range/index.js create mode 100644 node_modules/to-regex-range/package.json create mode 100644 node_modules/to-regex/LICENSE create mode 100644 node_modules/to-regex/README.md create mode 100644 node_modules/to-regex/index.js create mode 100644 node_modules/to-regex/package.json create mode 100644 node_modules/toposort-class/.eslintrc create mode 100644 node_modules/toposort-class/.gitattributes create mode 100644 node_modules/toposort-class/.npmignore create mode 100644 node_modules/toposort-class/LICENSE create mode 100644 node_modules/toposort-class/README.md create mode 100644 node_modules/toposort-class/benchmark/0.3.1/toposort.js create mode 100644 node_modules/toposort-class/benchmark/README.md create mode 100644 node_modules/toposort-class/benchmark/general.js create mode 100644 node_modules/toposort-class/benchmark/results.csv create mode 100644 node_modules/toposort-class/build/toposort.js create mode 100644 node_modules/toposort-class/build/toposort.min.js create mode 100644 node_modules/toposort-class/index.js create mode 100644 node_modules/toposort-class/package.json create mode 100644 node_modules/touch/LICENSE create mode 100644 node_modules/touch/README.md create mode 100755 node_modules/touch/bin/nodetouch.js create mode 100644 node_modules/touch/index.js create mode 100644 node_modules/touch/package.json create mode 100644 node_modules/type-is/HISTORY.md create mode 100644 node_modules/type-is/LICENSE create mode 100644 node_modules/type-is/README.md create mode 100644 node_modules/type-is/index.js create mode 100644 node_modules/type-is/package.json create mode 100644 node_modules/umzug/.babelrc create mode 100644 node_modules/umzug/.eslintrc.json create mode 100644 node_modules/umzug/.idea/misc.xml create mode 100644 node_modules/umzug/.idea/modules.xml create mode 100644 node_modules/umzug/.idea/vcs.xml create mode 100644 node_modules/umzug/.idea/workspace.xml create mode 100644 node_modules/umzug/.travis.yml create mode 100644 node_modules/umzug/CHANGELOG.md create mode 100644 node_modules/umzug/LICENSE create mode 100644 node_modules/umzug/README.md create mode 100644 node_modules/umzug/gulpfile.js create mode 100644 node_modules/umzug/lib/helper.js create mode 100644 node_modules/umzug/lib/index.js create mode 100644 node_modules/umzug/lib/migration.js create mode 100644 node_modules/umzug/lib/storages/JSONStorage.js create mode 100644 node_modules/umzug/lib/storages/MongoDBStorage.js create mode 100644 node_modules/umzug/lib/storages/SequelizeStorage.js create mode 100644 node_modules/umzug/lib/storages/Storage.js create mode 100644 node_modules/umzug/lib/storages/json.js create mode 100644 node_modules/umzug/lib/storages/none.js create mode 100644 node_modules/umzug/lib/storages/sequelize.js create mode 100644 node_modules/umzug/package.json create mode 100644 node_modules/umzug/src/helper.js create mode 100644 node_modules/umzug/src/index.js create mode 100644 node_modules/umzug/src/migration.js create mode 100644 node_modules/umzug/src/storages/JSONStorage.js create mode 100644 node_modules/umzug/src/storages/MongoDBStorage.js create mode 100644 node_modules/umzug/src/storages/SequelizeStorage.js create mode 100644 node_modules/umzug/src/storages/Storage.js create mode 100644 node_modules/umzug/src/storages/json.js create mode 100644 node_modules/umzug/src/storages/none.js create mode 100644 node_modules/umzug/src/storages/sequelize.js create mode 100644 node_modules/umzug/umzug.iml create mode 100644 node_modules/umzug/yarn.lock create mode 100644 node_modules/undefsafe/.jscsrc create mode 100644 node_modules/undefsafe/.jshintrc create mode 100644 node_modules/undefsafe/.npmignore create mode 100644 node_modules/undefsafe/.travis.yml create mode 100644 node_modules/undefsafe/LICENSE create mode 100644 node_modules/undefsafe/README.md create mode 100644 node_modules/undefsafe/example.js create mode 100644 node_modules/undefsafe/lib/undefsafe.js create mode 100644 node_modules/undefsafe/package.json create mode 100644 node_modules/union-value/LICENSE create mode 100644 node_modules/union-value/README.md create mode 100644 node_modules/union-value/index.js create mode 100644 node_modules/union-value/node_modules/extend-shallow/LICENSE create mode 100644 node_modules/union-value/node_modules/extend-shallow/README.md create mode 100644 node_modules/union-value/node_modules/extend-shallow/index.js create mode 100644 node_modules/union-value/node_modules/extend-shallow/package.json create mode 100644 node_modules/union-value/node_modules/set-value/LICENSE create mode 100644 node_modules/union-value/node_modules/set-value/README.md create mode 100644 node_modules/union-value/node_modules/set-value/index.js create mode 100644 node_modules/union-value/node_modules/set-value/package.json create mode 100644 node_modules/union-value/package.json create mode 100644 node_modules/unique-string/index.js create mode 100644 node_modules/unique-string/license create mode 100644 node_modules/unique-string/package.json create mode 100644 node_modules/unique-string/readme.md create mode 100644 node_modules/universalify/LICENSE create mode 100644 node_modules/universalify/README.md create mode 100644 node_modules/universalify/index.js create mode 100644 node_modules/universalify/package.json create mode 100644 node_modules/unpipe/HISTORY.md create mode 100644 node_modules/unpipe/LICENSE create mode 100644 node_modules/unpipe/README.md create mode 100644 node_modules/unpipe/index.js create mode 100644 node_modules/unpipe/package.json create mode 100644 node_modules/unset-value/LICENSE create mode 100644 node_modules/unset-value/README.md create mode 100644 node_modules/unset-value/index.js create mode 100644 node_modules/unset-value/node_modules/has-value/LICENSE create mode 100644 node_modules/unset-value/node_modules/has-value/README.md create mode 100644 node_modules/unset-value/node_modules/has-value/index.js create mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE create mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md create mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js create mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json create mode 100644 node_modules/unset-value/node_modules/has-value/package.json create mode 100644 node_modules/unset-value/node_modules/has-values/LICENSE create mode 100644 node_modules/unset-value/node_modules/has-values/README.md create mode 100644 node_modules/unset-value/node_modules/has-values/index.js create mode 100644 node_modules/unset-value/node_modules/has-values/package.json create mode 100644 node_modules/unset-value/package.json create mode 100644 node_modules/unzip-response/index.js create mode 100644 node_modules/unzip-response/license create mode 100644 node_modules/unzip-response/package.json create mode 100644 node_modules/unzip-response/readme.md create mode 100755 node_modules/upath/LICENSE create mode 100644 node_modules/upath/build/code/upath.js create mode 100644 node_modules/upath/package.json create mode 100644 node_modules/upath/readme.md create mode 100644 node_modules/upath/upath.d.ts create mode 100644 node_modules/update-notifier/check.js create mode 100644 node_modules/update-notifier/index.js create mode 100644 node_modules/update-notifier/package.json create mode 100644 node_modules/update-notifier/readme.md create mode 100644 node_modules/urix/.jshintrc create mode 100644 node_modules/urix/LICENSE create mode 100644 node_modules/urix/index.js create mode 100644 node_modules/urix/package.json create mode 100644 node_modules/urix/readme.md create mode 100644 node_modules/urix/test/index.js create mode 100644 node_modules/url-parse-lax/index.js create mode 100644 node_modules/url-parse-lax/license create mode 100644 node_modules/url-parse-lax/package.json create mode 100644 node_modules/url-parse-lax/readme.md create mode 100644 node_modules/use/LICENSE create mode 100644 node_modules/use/README.md create mode 100644 node_modules/use/index.js create mode 100644 node_modules/use/node_modules/define-property/LICENSE create mode 100644 node_modules/use/node_modules/define-property/README.md create mode 100644 node_modules/use/node_modules/define-property/index.js create mode 100644 node_modules/use/node_modules/define-property/package.json create mode 100644 node_modules/use/node_modules/is-accessor-descriptor/LICENSE create mode 100644 node_modules/use/node_modules/is-accessor-descriptor/README.md create mode 100644 node_modules/use/node_modules/is-accessor-descriptor/index.js create mode 100644 node_modules/use/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/use/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/use/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/use/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/use/node_modules/is-accessor-descriptor/package.json create mode 100644 node_modules/use/node_modules/is-data-descriptor/LICENSE create mode 100644 node_modules/use/node_modules/is-data-descriptor/README.md create mode 100644 node_modules/use/node_modules/is-data-descriptor/index.js create mode 100644 node_modules/use/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE create mode 100644 node_modules/use/node_modules/is-data-descriptor/node_modules/kind-of/README.md create mode 100644 node_modules/use/node_modules/is-data-descriptor/node_modules/kind-of/index.js create mode 100644 node_modules/use/node_modules/is-data-descriptor/node_modules/kind-of/package.json create mode 100644 node_modules/use/node_modules/is-data-descriptor/package.json create mode 100644 node_modules/use/node_modules/is-descriptor/LICENSE create mode 100644 node_modules/use/node_modules/is-descriptor/README.md create mode 100644 node_modules/use/node_modules/is-descriptor/index.js create mode 100644 node_modules/use/node_modules/is-descriptor/package.json create mode 100644 node_modules/use/node_modules/kind-of/LICENSE create mode 100644 node_modules/use/node_modules/kind-of/README.md create mode 100644 node_modules/use/node_modules/kind-of/index.js create mode 100644 node_modules/use/node_modules/kind-of/package.json create mode 100644 node_modules/use/package.json create mode 100644 node_modules/use/utils.js create mode 100644 node_modules/util-deprecate/History.md create mode 100644 node_modules/util-deprecate/LICENSE create mode 100644 node_modules/util-deprecate/README.md create mode 100644 node_modules/util-deprecate/browser.js create mode 100644 node_modules/util-deprecate/node.js create mode 100644 node_modules/util-deprecate/package.json create mode 100644 node_modules/utils-merge/.npmignore create mode 100644 node_modules/utils-merge/LICENSE create mode 100644 node_modules/utils-merge/README.md create mode 100644 node_modules/utils-merge/index.js create mode 100644 node_modules/utils-merge/package.json create mode 100644 node_modules/uuid/.eslintrc.json create mode 100644 node_modules/uuid/AUTHORS create mode 100644 node_modules/uuid/CHANGELOG.md create mode 100644 node_modules/uuid/LICENSE.md create mode 100644 node_modules/uuid/README.md create mode 100644 node_modules/uuid/README_js.md create mode 100755 node_modules/uuid/bin/uuid create mode 100644 node_modules/uuid/index.js create mode 100644 node_modules/uuid/lib/bytesToUuid.js create mode 100644 node_modules/uuid/lib/md5-browser.js create mode 100644 node_modules/uuid/lib/md5.js create mode 100644 node_modules/uuid/lib/rng-browser.js create mode 100644 node_modules/uuid/lib/rng.js create mode 100644 node_modules/uuid/lib/sha1-browser.js create mode 100644 node_modules/uuid/lib/sha1.js create mode 100644 node_modules/uuid/lib/v35.js create mode 100644 node_modules/uuid/package.json create mode 100644 node_modules/uuid/v1.js create mode 100644 node_modules/uuid/v3.js create mode 100644 node_modules/uuid/v4.js create mode 100644 node_modules/uuid/v5.js create mode 100644 node_modules/validate-npm-package-license/LICENSE create mode 100644 node_modules/validate-npm-package-license/README.md create mode 100644 node_modules/validate-npm-package-license/index.js create mode 100644 node_modules/validate-npm-package-license/package.json create mode 100644 node_modules/validate-npm-package-license/test.log create mode 100644 node_modules/validator/CHANGELOG.md create mode 100644 node_modules/validator/LICENSE create mode 100644 node_modules/validator/README.md create mode 100644 node_modules/validator/index.js create mode 100644 node_modules/validator/lib/alpha.js create mode 100644 node_modules/validator/lib/blacklist.js create mode 100644 node_modules/validator/lib/contains.js create mode 100644 node_modules/validator/lib/equals.js create mode 100644 node_modules/validator/lib/escape.js create mode 100644 node_modules/validator/lib/isAfter.js create mode 100644 node_modules/validator/lib/isAlpha.js create mode 100644 node_modules/validator/lib/isAlphanumeric.js create mode 100644 node_modules/validator/lib/isAscii.js create mode 100644 node_modules/validator/lib/isBase64.js create mode 100644 node_modules/validator/lib/isBefore.js create mode 100644 node_modules/validator/lib/isBoolean.js create mode 100644 node_modules/validator/lib/isByteLength.js create mode 100644 node_modules/validator/lib/isCreditCard.js create mode 100644 node_modules/validator/lib/isCurrency.js create mode 100644 node_modules/validator/lib/isDataURI.js create mode 100644 node_modules/validator/lib/isDecimal.js create mode 100644 node_modules/validator/lib/isDivisibleBy.js create mode 100644 node_modules/validator/lib/isEmail.js create mode 100644 node_modules/validator/lib/isEmpty.js create mode 100644 node_modules/validator/lib/isFQDN.js create mode 100644 node_modules/validator/lib/isFloat.js create mode 100644 node_modules/validator/lib/isFullWidth.js create mode 100644 node_modules/validator/lib/isHalfWidth.js create mode 100644 node_modules/validator/lib/isHash.js create mode 100644 node_modules/validator/lib/isHexColor.js create mode 100644 node_modules/validator/lib/isHexadecimal.js create mode 100644 node_modules/validator/lib/isIP.js create mode 100644 node_modules/validator/lib/isISBN.js create mode 100644 node_modules/validator/lib/isISIN.js create mode 100644 node_modules/validator/lib/isISO31661Alpha2.js create mode 100644 node_modules/validator/lib/isISO8601.js create mode 100644 node_modules/validator/lib/isISRC.js create mode 100644 node_modules/validator/lib/isISSN.js create mode 100644 node_modules/validator/lib/isIn.js create mode 100644 node_modules/validator/lib/isInt.js create mode 100644 node_modules/validator/lib/isJSON.js create mode 100644 node_modules/validator/lib/isLatLong.js create mode 100644 node_modules/validator/lib/isLength.js create mode 100644 node_modules/validator/lib/isLowercase.js create mode 100644 node_modules/validator/lib/isMACAddress.js create mode 100644 node_modules/validator/lib/isMD5.js create mode 100644 node_modules/validator/lib/isMimeType.js create mode 100644 node_modules/validator/lib/isMobilePhone.js create mode 100644 node_modules/validator/lib/isMongoId.js create mode 100644 node_modules/validator/lib/isMultibyte.js create mode 100644 node_modules/validator/lib/isNumeric.js create mode 100644 node_modules/validator/lib/isPort.js create mode 100644 node_modules/validator/lib/isPostalCode.js create mode 100644 node_modules/validator/lib/isSurrogatePair.js create mode 100644 node_modules/validator/lib/isURL.js create mode 100644 node_modules/validator/lib/isUUID.js create mode 100644 node_modules/validator/lib/isUppercase.js create mode 100644 node_modules/validator/lib/isVariableWidth.js create mode 100644 node_modules/validator/lib/isWhitelisted.js create mode 100644 node_modules/validator/lib/ltrim.js create mode 100644 node_modules/validator/lib/matches.js create mode 100644 node_modules/validator/lib/normalizeEmail.js create mode 100644 node_modules/validator/lib/rtrim.js create mode 100644 node_modules/validator/lib/stripLow.js create mode 100644 node_modules/validator/lib/toBoolean.js create mode 100644 node_modules/validator/lib/toDate.js create mode 100644 node_modules/validator/lib/toFloat.js create mode 100644 node_modules/validator/lib/toInt.js create mode 100644 node_modules/validator/lib/trim.js create mode 100644 node_modules/validator/lib/unescape.js create mode 100644 node_modules/validator/lib/util/assertString.js create mode 100644 node_modules/validator/lib/util/merge.js create mode 100644 node_modules/validator/lib/util/toString.js create mode 100644 node_modules/validator/lib/whitelist.js create mode 100644 node_modules/validator/package.json create mode 100644 node_modules/validator/validator.js create mode 100644 node_modules/validator/validator.min.js create mode 100644 node_modules/vary/HISTORY.md create mode 100644 node_modules/vary/LICENSE create mode 100644 node_modules/vary/README.md create mode 100644 node_modules/vary/index.js create mode 100644 node_modules/vary/package.json create mode 100644 node_modules/which-module/CHANGELOG.md create mode 100644 node_modules/which-module/LICENSE create mode 100644 node_modules/which-module/README.md create mode 100644 node_modules/which-module/index.js create mode 100644 node_modules/which-module/package.json create mode 100644 node_modules/which/CHANGELOG.md create mode 100644 node_modules/which/LICENSE create mode 100644 node_modules/which/README.md create mode 100755 node_modules/which/bin/which create mode 100644 node_modules/which/package.json create mode 100644 node_modules/which/which.js create mode 100644 node_modules/widest-line/index.js create mode 100644 node_modules/widest-line/license create mode 100644 node_modules/widest-line/package.json create mode 100644 node_modules/widest-line/readme.md create mode 100644 node_modules/wkx/LICENSE.txt create mode 100644 node_modules/wkx/README.md create mode 100644 node_modules/wkx/dist/wkx.js create mode 100644 node_modules/wkx/dist/wkx.min.js create mode 100644 node_modules/wkx/lib/binaryreader.js create mode 100644 node_modules/wkx/lib/binarywriter.js create mode 100644 node_modules/wkx/lib/geometry.js create mode 100644 node_modules/wkx/lib/geometrycollection.js create mode 100644 node_modules/wkx/lib/linestring.js create mode 100644 node_modules/wkx/lib/multilinestring.js create mode 100644 node_modules/wkx/lib/multipoint.js create mode 100644 node_modules/wkx/lib/multipolygon.js create mode 100644 node_modules/wkx/lib/point.js create mode 100644 node_modules/wkx/lib/polygon.js create mode 100644 node_modules/wkx/lib/types.js create mode 100644 node_modules/wkx/lib/wktparser.js create mode 100644 node_modules/wkx/lib/wkx.d.ts create mode 100644 node_modules/wkx/lib/wkx.js create mode 100644 node_modules/wkx/lib/zigzag.js create mode 100644 node_modules/wkx/package.json create mode 100755 node_modules/wrap-ansi/index.js create mode 100644 node_modules/wrap-ansi/license create mode 100644 node_modules/wrap-ansi/node_modules/ansi-regex/index.js create mode 100644 node_modules/wrap-ansi/node_modules/ansi-regex/license create mode 100644 node_modules/wrap-ansi/node_modules/ansi-regex/package.json create mode 100644 node_modules/wrap-ansi/node_modules/ansi-regex/readme.md create mode 100644 node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/wrap-ansi/node_modules/string-width/index.js create mode 100644 node_modules/wrap-ansi/node_modules/string-width/license create mode 100644 node_modules/wrap-ansi/node_modules/string-width/package.json create mode 100644 node_modules/wrap-ansi/node_modules/string-width/readme.md create mode 100644 node_modules/wrap-ansi/node_modules/strip-ansi/index.js create mode 100644 node_modules/wrap-ansi/node_modules/strip-ansi/license create mode 100644 node_modules/wrap-ansi/node_modules/strip-ansi/package.json create mode 100644 node_modules/wrap-ansi/node_modules/strip-ansi/readme.md create mode 100644 node_modules/wrap-ansi/package.json create mode 100644 node_modules/wrap-ansi/readme.md create mode 100644 node_modules/write-file-atomic/LICENSE create mode 100644 node_modules/write-file-atomic/README.md create mode 100644 node_modules/write-file-atomic/index.js create mode 100644 node_modules/write-file-atomic/package.json create mode 100644 node_modules/xdg-basedir/index.js create mode 100644 node_modules/xdg-basedir/license create mode 100644 node_modules/xdg-basedir/package.json create mode 100644 node_modules/xdg-basedir/readme.md create mode 100644 node_modules/xtend/.jshintrc create mode 100644 node_modules/xtend/.npmignore create mode 100644 node_modules/xtend/LICENCE create mode 100644 node_modules/xtend/Makefile create mode 100644 node_modules/xtend/README.md create mode 100644 node_modules/xtend/immutable.js create mode 100644 node_modules/xtend/mutable.js create mode 100644 node_modules/xtend/package.json create mode 100644 node_modules/xtend/test.js create mode 100644 node_modules/y18n/LICENSE create mode 100644 node_modules/y18n/README.md create mode 100644 node_modules/y18n/index.js create mode 100644 node_modules/y18n/package.json create mode 100644 node_modules/yallist/LICENSE create mode 100644 node_modules/yallist/README.md create mode 100644 node_modules/yallist/iterator.js create mode 100644 node_modules/yallist/package.json create mode 100644 node_modules/yallist/yallist.js create mode 100644 node_modules/yargs-parser/CHANGELOG.md create mode 100644 node_modules/yargs-parser/LICENSE.txt create mode 100644 node_modules/yargs-parser/README.md create mode 100644 node_modules/yargs-parser/index.js create mode 100644 node_modules/yargs-parser/lib/tokenize-arg-string.js create mode 100644 node_modules/yargs-parser/package.json create mode 100644 node_modules/yargs/CHANGELOG.md create mode 100644 node_modules/yargs/LICENSE create mode 100644 node_modules/yargs/README.md create mode 100644 node_modules/yargs/completion.sh.hbs create mode 100644 node_modules/yargs/index.js create mode 100644 node_modules/yargs/lib/apply-extends.js create mode 100644 node_modules/yargs/lib/argsert.js create mode 100644 node_modules/yargs/lib/assign.js create mode 100644 node_modules/yargs/lib/command.js create mode 100644 node_modules/yargs/lib/completion.js create mode 100644 node_modules/yargs/lib/levenshtein.js create mode 100644 node_modules/yargs/lib/obj-filter.js create mode 100644 node_modules/yargs/lib/usage.js create mode 100644 node_modules/yargs/lib/validation.js create mode 100644 node_modules/yargs/lib/yerror.js create mode 100644 node_modules/yargs/locales/be.json create mode 100644 node_modules/yargs/locales/de.json create mode 100644 node_modules/yargs/locales/en.json create mode 100644 node_modules/yargs/locales/es.json create mode 100644 node_modules/yargs/locales/fr.json create mode 100644 node_modules/yargs/locales/hi.json create mode 100644 node_modules/yargs/locales/hu.json create mode 100644 node_modules/yargs/locales/id.json create mode 100644 node_modules/yargs/locales/it.json create mode 100644 node_modules/yargs/locales/ja.json create mode 100644 node_modules/yargs/locales/ko.json create mode 100644 node_modules/yargs/locales/nb.json create mode 100644 node_modules/yargs/locales/nl.json create mode 100644 node_modules/yargs/locales/pirate.json create mode 100644 node_modules/yargs/locales/pl.json create mode 100644 node_modules/yargs/locales/pt.json create mode 100644 node_modules/yargs/locales/pt_BR.json create mode 100644 node_modules/yargs/locales/ru.json create mode 100644 node_modules/yargs/locales/th.json create mode 100644 node_modules/yargs/locales/tr.json create mode 100644 node_modules/yargs/locales/zh_CN.json create mode 100644 node_modules/yargs/locales/zh_TW.json create mode 100644 node_modules/yargs/package.json create mode 100644 node_modules/yargs/yargs.js create mode 100644 routes/menu.js create mode 100644 routes/restaurant.js create mode 100644 seeders/20180301023613-restaurant.js create mode 100644 views/editmenu.ejs create mode 100644 views/index.ejs create mode 100644 views/menu.ejs create mode 100644 views/restaurant.ejs create mode 100644 views/view_menu.ejs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3b66410 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..c93d361 --- /dev/null +++ b/app.js @@ -0,0 +1,21 @@ +const express = require('express') +const app = express() +const RouterMenu = require('./routes/menu') +const RouterRestaurant = require('./routes/restaurant') +const bodyParser = require('body-parser') + + +app.set('view engine','ejs') +app.use(bodyParser.urlencoded({extended: false})) +app.use(bodyParser.json()) + +app.use('/menus',RouterMenu) +app.use('/restaurants',RouterRestaurant) + + +//----------------Home ------------------ +app.get('/', function (req, res) { + res.render('index') +}) + +app.listen(3000,console.log('server oke bos !')) diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..e715adf --- /dev/null +++ b/config/config.json @@ -0,0 +1,23 @@ +{ + "development": { + "username": "postgres", + "password": null, + "database": "platinum_livecode4", + "host": "127.0.0.1", + "dialect": "postgres" + }, + "test": { + "username": "root", + "password": null, + "database": "database_test", + "host": "127.0.0.1", + "dialect": "mysql" + }, + "production": { + "username": "root", + "password": null, + "database": "database_production", + "host": "127.0.0.1", + "dialect": "mysql" + } +} diff --git a/helper/help.js b/helper/help.js new file mode 100644 index 0000000..5f5ef0c --- /dev/null +++ b/helper/help.js @@ -0,0 +1,16 @@ +function formatuang (number){ + reverse = number.toString().split('').reverse(); + arr= []; + for(var i = 0; i { + return queryInterface.createTable('Restaurants', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + name: { + type: Sequelize.STRING + }, + address: { + type: Sequelize.STRING + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: (queryInterface, Sequelize) => { + return queryInterface.dropTable('Restaurants'); + } +}; \ No newline at end of file diff --git a/migrations/20180301022338-create-menu.js b/migrations/20180301022338-create-menu.js new file mode 100644 index 0000000..11fb538 --- /dev/null +++ b/migrations/20180301022338-create-menu.js @@ -0,0 +1,36 @@ +'use strict'; +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.createTable('Menus', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + name: { + type: Sequelize.STRING + }, + menu_type: { + type: Sequelize.STRING + }, + rating: { + type: Sequelize.INTEGER + }, + price: { + type: Sequelize.INTEGER + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: (queryInterface, Sequelize) => { + return queryInterface.dropTable('Menus'); + } +}; \ No newline at end of file diff --git a/migrations/20180301022812-addforeignkey.js b/migrations/20180301022812-addforeignkey.js new file mode 100644 index 0000000..d284e28 --- /dev/null +++ b/migrations/20180301022812-addforeignkey.js @@ -0,0 +1,24 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + /* + Add altering commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.createTable('users', { id: Sequelize.INTEGER }); + */ + return queryInterface.addColumn('Menus', 'restaurant_id', Sequelize.INTEGER ); + }, + + down: (queryInterface, Sequelize) => { + /* + Add reverting commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.dropTable('users'); + */ + } +}; diff --git a/models/index.js b/models/index.js new file mode 100644 index 0000000..5662f10 --- /dev/null +++ b/models/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var Sequelize = require('sequelize'); +var basename = path.basename(__filename); +var env = process.env.NODE_ENV || 'development'; +var config = require(__dirname + '/../config/config.json')[env]; +var db = {}; + +if (config.use_env_variable) { + var sequelize = new Sequelize(process.env[config.use_env_variable], config); +} else { + var sequelize = new Sequelize(config.database, config.username, config.password, config); +} + +fs + .readdirSync(__dirname) + .filter(file => { + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + }) + .forEach(file => { + var model = sequelize['import'](path.join(__dirname, file)); + db[model.name] = model; + }); + +Object.keys(db).forEach(modelName => { + if (db[modelName].associate) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = db; diff --git a/models/menu.js b/models/menu.js new file mode 100644 index 0000000..5f03c89 --- /dev/null +++ b/models/menu.js @@ -0,0 +1,41 @@ +'use strict'; +module.exports = (sequelize, DataTypes) => { + var Menu = sequelize.define('Menu', { + name: DataTypes.STRING, + menu_type:{ + type: DataTypes.STRING, + validate:{ + isIn : { + args: [['food', 'drink']], + msg: "harus diisi food atau drink pada kolom menu type" + } + } + }, + rating: DataTypes.INTEGER, + price: DataTypes.INTEGER, + restaurant_id: DataTypes.INTEGER + },{ + hooks:{ + beforeCreate:(menu,option)=>{ + if(menu.menu_type === 'food' && menu.price == 0){ + menu.price = 15000 + }else if(menu.menu_type === 'drink' && menu.price == 0){ + menu.price = 10000 + } + }, + afterUpdate:(menu,option)=>{ + if(menu.menu_type === 'food' && menu.price == 0){ + menu.price = 15000 + }else if(menu.menu_type === 'drink' && menu.price == 0){ + menu.price = 10000 + } + } + } + }) + //Class Method + Menu.associate = function (models) { + Menu.belongsTo(models.Restaurant,{foreignKey:'restaurant_id'}) +}; + return Menu; +}; + diff --git a/models/restaurant.js b/models/restaurant.js new file mode 100644 index 0000000..2361c1e --- /dev/null +++ b/models/restaurant.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = (sequelize, DataTypes) => { + var Restaurant = sequelize.define('Restaurant', { + name: DataTypes.STRING, + address: DataTypes.STRING + }) + //Class Method + Restaurant.associate = function (models) { + Restaurant.hasMany(models.Menu,{foreignKey:'restaurant_id'}) +}; + + return Restaurant; +}; \ No newline at end of file diff --git a/node_modules/.bin/atob b/node_modules/.bin/atob new file mode 120000 index 0000000..a68344a --- /dev/null +++ b/node_modules/.bin/atob @@ -0,0 +1 @@ +../atob/bin/atob.js \ No newline at end of file diff --git a/node_modules/.bin/css-beautify b/node_modules/.bin/css-beautify new file mode 120000 index 0000000..d9b8ee2 --- /dev/null +++ b/node_modules/.bin/css-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/css-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/editorconfig b/node_modules/.bin/editorconfig new file mode 120000 index 0000000..a151e0b --- /dev/null +++ b/node_modules/.bin/editorconfig @@ -0,0 +1 @@ +../editorconfig/bin/editorconfig \ No newline at end of file diff --git a/node_modules/.bin/html-beautify b/node_modules/.bin/html-beautify new file mode 120000 index 0000000..c17c69c --- /dev/null +++ b/node_modules/.bin/html-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/html-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/js-beautify b/node_modules/.bin/js-beautify new file mode 120000 index 0000000..548ddf4 --- /dev/null +++ b/node_modules/.bin/js-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/js-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 120000 index 0000000..fbb7ee0 --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1 @@ +../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 0000000..017896c --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/nodemon b/node_modules/.bin/nodemon new file mode 120000 index 0000000..1056ddc --- /dev/null +++ b/node_modules/.bin/nodemon @@ -0,0 +1 @@ +../nodemon/bin/nodemon.js \ No newline at end of file diff --git a/node_modules/.bin/nodetouch b/node_modules/.bin/nodetouch new file mode 120000 index 0000000..3409fdb --- /dev/null +++ b/node_modules/.bin/nodetouch @@ -0,0 +1 @@ +../touch/bin/nodetouch.js \ No newline at end of file diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt new file mode 120000 index 0000000..6b6566e --- /dev/null +++ b/node_modules/.bin/nopt @@ -0,0 +1 @@ +../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/.bin/rc b/node_modules/.bin/rc new file mode 120000 index 0000000..48b3cda --- /dev/null +++ b/node_modules/.bin/rc @@ -0,0 +1 @@ +../rc/cli.js \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..317eb29 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/.bin/sequelize b/node_modules/.bin/sequelize new file mode 120000 index 0000000..00a40c3 --- /dev/null +++ b/node_modules/.bin/sequelize @@ -0,0 +1 @@ +../sequelize-cli/lib/sequelize \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 120000 index 0000000..b3e45bc --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 120000 index 0000000..f62471c --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1 @@ +../which/bin/which \ No newline at end of file diff --git a/node_modules/@types/geojson/LICENSE b/node_modules/@types/geojson/LICENSE new file mode 100644 index 0000000..4b1ad51 --- /dev/null +++ b/node_modules/@types/geojson/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. 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/node_modules/@types/geojson/README.md b/node_modules/@types/geojson/README.md new file mode 100644 index 0000000..cb16f29 --- /dev/null +++ b/node_modules/@types/geojson/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/geojson` + +# Summary +This package contains type definitions for GeoJSON Format Specification Revision (http://geojson.org/). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/geojson + +Additional Details + * Last updated: Wed, 01 Nov 2017 15:55:40 GMT + * Dependencies: none + * Global values: GeoJSON + +# Credits +These definitions were written by Jacob Bruun , Arne Schubert . diff --git a/node_modules/@types/geojson/index.d.ts b/node_modules/@types/geojson/index.d.ts new file mode 100644 index 0000000..32685bb --- /dev/null +++ b/node_modules/@types/geojson/index.d.ts @@ -0,0 +1,123 @@ +// Type definitions for GeoJSON Format Specification Revision 1.0 +// Project: http://geojson.org/ +// Definitions by: Jacob Bruun +// Arne Schubert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +export as namespace GeoJSON; + +/*** + * http://geojson.org/geojson-spec.html#geojson-objects + */ +export interface GeoJsonObject { + type: string; + bbox?: number[]; + crs?: CoordinateReferenceSystem; +} + +/*** + * http://geojson.org/geojson-spec.html#positions + */ +export type Position = number[]; + +/*** + * http://geojson.org/geojson-spec.html#geometry-objects + */ +export interface DirectGeometryObject extends GeoJsonObject { + coordinates: Position[][][] | Position[][] | Position[] | Position; +} +/** + * GeometryObject supports geometry collection as well + */ +export type GeometryObject = DirectGeometryObject | GeometryCollection; + +/*** + * http://geojson.org/geojson-spec.html#point + */ +export interface Point extends DirectGeometryObject { + type: "Point"; + coordinates: Position; +} + +/*** + * http://geojson.org/geojson-spec.html#multipoint + */ +export interface MultiPoint extends DirectGeometryObject { + type: "MultiPoint"; + coordinates: Position[]; +} + +/*** + * http://geojson.org/geojson-spec.html#linestring + */ +export interface LineString extends DirectGeometryObject { + type: "LineString"; + coordinates: Position[]; +} + +/*** + * http://geojson.org/geojson-spec.html#multilinestring + */ +export interface MultiLineString extends DirectGeometryObject { + type: "MultiLineString"; + coordinates: Position[][]; +} + +/*** + * http://geojson.org/geojson-spec.html#polygon + */ +export interface Polygon extends DirectGeometryObject { + type: "Polygon"; + coordinates: Position[][]; +} + +/*** + * http://geojson.org/geojson-spec.html#multipolygon + */ +export interface MultiPolygon extends DirectGeometryObject { + type: "MultiPolygon"; + coordinates: Position[][][]; +} + +/*** + * http://geojson.org/geojson-spec.html#geometry-collection + */ +export interface GeometryCollection extends GeoJsonObject { + type: "GeometryCollection"; + geometries: GeometryObject[]; +} + +/*** + * https://tools.ietf.org/html/rfc7946#section-3.2 + */ +export interface Feature extends GeoJsonObject { + type: "Feature"; + geometry: G; + properties: P; + id?: string | number; +} + +/*** + * http://geojson.org/geojson-spec.html#feature-collection-objects + */ +export interface FeatureCollection extends GeoJsonObject { + type: "FeatureCollection"; + features: Array>; +} + +/*** + * http://geojson.org/geojson-spec.html#coordinate-reference-system-objects + */ +export interface CoordinateReferenceSystem { + type: string; + properties: any; +} + +export interface NamedCoordinateReferenceSystem extends CoordinateReferenceSystem { + properties: { name: string }; +} + +export interface LinkedCoordinateReferenceSystem extends CoordinateReferenceSystem { + properties: { href: string; type: string }; +} diff --git a/node_modules/@types/geojson/package.json b/node_modules/@types/geojson/package.json new file mode 100644 index 0000000..1f42c0b --- /dev/null +++ b/node_modules/@types/geojson/package.json @@ -0,0 +1,54 @@ +{ + "_args": [ + [ + "@types/geojson@1.0.6", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "@types/geojson@1.0.6", + "_id": "@types/geojson@1.0.6", + "_inBundle": false, + "_integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w==", + "_location": "/@types/geojson", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/geojson@1.0.6", + "name": "@types/geojson", + "escapedName": "@types%2fgeojson", + "scope": "@types", + "rawSpec": "1.0.6", + "saveSpec": null, + "fetchSpec": "1.0.6" + }, + "_requiredBy": [ + "/terraformer" + ], + "_resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz", + "_spec": "1.0.6", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "contributors": [ + { + "name": "Jacob Bruun", + "url": "https://github.com/cobster" + }, + { + "name": "Arne Schubert", + "url": "https://github.com/atd-schubert" + } + ], + "dependencies": {}, + "description": "TypeScript definitions for GeoJSON Format Specification Revision", + "license": "MIT", + "main": "", + "name": "@types/geojson", + "repository": { + "type": "git", + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "typeScriptVersion": "2.3", + "typesPublisherContentHash": "2a374692a48615d90fde45b274e247a1ec98647d93fe7c7ee355386108689bcd", + "version": "1.0.6" +} diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE new file mode 100644 index 0000000..2107107 --- /dev/null +++ b/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. 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/node_modules/@types/node/README.md b/node_modules/@types/node/README.md new file mode 100644 index 0000000..d5b3ac4 --- /dev/null +++ b/node_modules/@types/node/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for Node.js (http://nodejs.org/). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node + +Additional Details + * Last updated: Tue, 13 Feb 2018 20:54:40 GMT + * Dependencies: none + * Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout + +# Credits +These definitions were written by Microsoft TypeScript , DefinitelyTyped , Parambir Singh , Christian Vaagland Tellnes , Wilco Bakker , Nicolas Voigt , Chigozirim C. , Flarna , Mariusz Wiktorczyk , wwwy3y3 , Deividas Bakanas , Kelvin Jin , Alvis HT Tang , Oliver Joseph Ash , Sebastian Silbermann , Hannes Magnusson , Alberto Schiabel , Klaus Meinhardt , Huw . diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts new file mode 100644 index 0000000..717b906 --- /dev/null +++ b/node_modules/@types/node/index.d.ts @@ -0,0 +1,7168 @@ +// Type definitions for Node.js 9.4.x +// Project: http://nodejs.org/ +// Definitions by: Microsoft TypeScript +// DefinitelyTyped +// Parambir Singh +// Christian Vaagland Tellnes +// Wilco Bakker +// Nicolas Voigt +// Chigozirim C. +// Flarna +// Mariusz Wiktorczyk +// wwwy3y3 +// Deividas Bakanas +// Kelvin Jin +// Alvis HT Tang +// Oliver Joseph Ash +// Sebastian Silbermann +// Hannes Magnusson +// Alberto Schiabel +// Klaus Meinhardt +// Huw +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** inspector module types */ +/// + +// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build +interface Console { + Console: NodeJS.ConsoleConstructor; + assert(value: any, message?: string, ...optionalParams: any[]): void; + dir(obj: any, options?: NodeJS.InspectOptions): void; + debug(message?: any, ...optionalParams: any[]): void; + error(message?: any, ...optionalParams: any[]): void; + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + time(label: string): void; + timeEnd(label: string): void; + trace(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): void; +} + +interface Error { + stack?: string; +} + +// Declare "static" methods in Error +interface ErrorConstructor { + /** Create .stack property on a target object */ + captureStackTrace(targetObject: Object, constructorOpt?: Function): void; + + /** + * Optional override for formatting stack traces + * + * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces + */ + prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any; + + stackTraceLimit: number; +} + +// compat for TypeScript 1.8 +// if you use with --target es3 or --target es5 and use below definitions, +// use the lib.es6.d.ts that is bundled with TypeScript 1.8. +interface MapConstructor { } +interface WeakMapConstructor { } +interface SetConstructor { } +interface WeakSetConstructor { } + +// Forward-declare needed types from lib.es2015.d.ts (in case users are using `--lib es5`) +interface Iterable { } +interface Iterator { + next(value?: any): IteratorResult; +} +interface IteratorResult { } +interface SymbolConstructor { + readonly iterator: symbol; +} +declare var Symbol: SymbolConstructor; + +// Node.js ESNEXT support +interface String { + /** Removes whitespace from the left end of a string. */ + trimLeft(): string; + /** Removes whitespace from the right end of a string. */ + trimRight(): string; +} + +/************************************************ +* * +* GLOBAL * +* * +************************************************/ +declare var process: NodeJS.Process; +declare var global: NodeJS.Global; +declare var console: Console; + +declare var __filename: string; +declare var __dirname: string; + +declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; +declare namespace setTimeout { + export function __promisify__(ms: number): Promise; + export function __promisify__(ms: number, value: T): Promise; +} +declare function clearTimeout(timeoutId: NodeJS.Timer): void; +declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; +declare function clearInterval(intervalId: NodeJS.Timer): void; +declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; +declare namespace setImmediate { + export function __promisify__(): Promise; + export function __promisify__(value: T): Promise; +} +declare function clearImmediate(immediateId: any): void; + +// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version. +interface NodeRequireFunction { + /* tslint:disable-next-line:callable-types */ + (id: string): any; +} + +interface NodeRequire extends NodeRequireFunction { + resolve: RequireResolve; + cache: any; + extensions: NodeExtensions; + main: NodeModule | undefined; +} + +interface RequireResolve { + (id: string, options?: { paths?: string[]; }): string; + paths(request: string): string[] | null; +} + +interface NodeExtensions { + '.js': (m: NodeModule, filename: string) => any; + '.json': (m: NodeModule, filename: string) => any; + '.node': (m: NodeModule, filename: string) => any; + [ext: string]: (m: NodeModule, filename: string) => any; +} + +declare var require: NodeRequire; + +interface NodeModule { + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: NodeModule | null; + children: NodeModule[]; + paths: string[]; +} + +declare var module: NodeModule; + +// Same as module.exports +declare var exports: any; +declare var SlowBuffer: { + new(str: string, encoding?: string): Buffer; + new(size: number): Buffer; + new(size: Uint8Array): Buffer; + new(array: any[]): Buffer; + prototype: Buffer; + isBuffer(obj: any): boolean; + byteLength(string: string, encoding?: string): number; + concat(list: Buffer[], totalLength?: number): Buffer; +}; + +// Buffer class +type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex"; +interface Buffer extends NodeBuffer { } + +/** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + */ +declare var Buffer: { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + new(str: string, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + new(array: Uint8Array): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + new(arrayBuffer: ArrayBuffer): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + new(array: any[]): Buffer; + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + new(buffer: Buffer): Buffer; + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + */ + 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() + */ + from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + */ + 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'. + */ + from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + 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. + */ + 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. (TypedArray is also allowed, but it is only available starting ES2017) + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + byteLength(string: string | Buffer | DataView | ArrayBuffer, 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. + */ + concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + 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 + */ + 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 + */ + 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 + */ + allocUnsafeSlow(size: number): Buffer; + /** + * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified. + */ + poolSize: number; +}; + +/************************************************ +* * +* GLOBAL INTERFACES * +* * +************************************************/ +declare namespace NodeJS { + export interface InspectOptions { + showHidden?: boolean; + depth?: number | null; + colors?: boolean; + customInspect?: boolean; + showProxy?: boolean; + maxArrayLength?: number | null; + breakLength?: number; + } + + export interface ConsoleConstructor { + prototype: Console; + new(stdout: WritableStream, stderr?: WritableStream): Console; + } + + export interface CallSite { + /** + * Value of "this" + */ + getThis(): any; + + /** + * Type of "this" as a string. + * This is the name of the function stored in the constructor field of + * "this", if available. Otherwise the object's [[Class]] internal + * property. + */ + getTypeName(): string | null; + + /** + * Current function + */ + getFunction(): Function | undefined; + + /** + * Name of the current function, typically its name property. + * If a name property is not available an attempt will be made to try + * to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + * Name of the property [of "this" or one of its prototypes] that holds + * the current function + */ + getMethodName(): string | null; + + /** + * Name of the script [if this function was defined in a script] + */ + getFileName(): string | null; + + /** + * Current line number [if this function was defined in a script] + */ + getLineNumber(): number | null; + + /** + * Current column number [if this function was defined in a script] + */ + getColumnNumber(): number | null; + + /** + * A call site object representing the location where eval was called + * [if this function was created using a call to eval] + */ + getEvalOrigin(): string | undefined; + + /** + * Is this a toplevel invocation, that is, is "this" the global object? + */ + isToplevel(): boolean; + + /** + * Does this call take place in code defined by a call to eval? + */ + isEval(): boolean; + + /** + * Is this call in native V8 code? + */ + isNative(): boolean; + + /** + * Is this a constructor call? + */ + isConstructor(): boolean; + } + + export interface ErrnoException extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + stack?: string; + } + + export class EventEmitter { + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + rawListeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + listenerCount(type: string | symbol): number; + // Added in Node 6... + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + eventNames(): Array; + } + + export interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): this; + unshift(chunk: string): void; + unshift(chunk: Buffer): void; + wrap(oldStream: ReadableStream): this; + } + + export interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Buffer | string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + end(cb?: Function): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + } + + export interface ReadWriteStream extends ReadableStream, WritableStream { } + + export interface Events extends EventEmitter { } + + export interface Domain extends Events { + run(fn: Function): void; + add(emitter: Events): void; + remove(emitter: Events): void; + bind(cb: (err: Error, data: any) => any): any; + intercept(cb: (data: any) => any): any; + + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string): this; + } + + export interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + } + + export interface CpuUsage { + user: number; + system: number; + } + + export interface ProcessVersions { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + + type Platform = 'aix' + | 'android' + | 'darwin' + | 'freebsd' + | 'linux' + | 'openbsd' + | 'sunos' + | 'win32' + | 'cygwin'; + + type Signals = + "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | + "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | + "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | + "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO"; + + type BeforeExitListener = (code: number) => void; + type DisconnectListener = () => void; + type ExitListener = (code: number) => void; + type RejectionHandledListener = (promise: Promise) => void; + type UncaughtExceptionListener = (error: Error) => void; + type UnhandledRejectionListener = (reason: any, promise: Promise) => void; + type WarningListener = (warning: Error) => void; + type MessageListener = (message: any, sendHandle: any) => void; + type SignalsListener = (signal: Signals) => void; + type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + + export interface Socket extends ReadWriteStream { + isTTY?: true; + } + + export interface ProcessEnv { + [key: string]: string | undefined; + } + + export interface WriteStream extends Socket { + readonly writableHighWaterMark: number; + readonly writableLength: number; + columns?: number; + rows?: number; + _write(chunk: any, encoding: string, callback: Function): void; + _destroy(err: Error, callback: Function): void; + _final(callback: Function): void; + setDefaultEncoding(encoding: string): this; + cork(): void; + uncork(): void; + destroy(error?: Error): void; + } + export interface ReadStream extends Socket { + readonly readableHighWaterMark: number; + readonly readableLength: number; + isRaw?: boolean; + setRawMode?(mode: boolean): void; + _read(size: number): void; + _destroy(err: Error, callback: Function): void; + push(chunk: any, encoding?: string): boolean; + destroy(error?: Error): void; + } + + export interface Process extends EventEmitter { + stdout: WriteStream; + stderr: WriteStream; + stdin: ReadStream; + openStdin(): Socket; + argv: string[]; + argv0: string; + execArgv: string[]; + execPath: string; + abort(): void; + chdir(directory: string): void; + cwd(): string; + emitWarning(warning: string | Error, name?: string, ctor?: Function): void; + env: ProcessEnv; + exit(code?: number): never; + exitCode: number; + getgid(): number; + setgid(id: number | string): void; + getuid(): number; + setuid(id: number | string): void; + geteuid(): number; + seteuid(id: number | string): void; + getegid(): number; + setegid(id: number | string): void; + getgroups(): number[]; + setgroups(groups: Array): void; + setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; + hasUncaughtExceptionCaptureCallback(): boolean; + version: string; + versions: ProcessVersions; + config: { + target_defaults: { + cflags: any[]; + default_configuration: string; + defines: string[]; + include_dirs: string[]; + libraries: string[]; + }; + variables: { + clang: number; + host_arch: string; + node_install_npm: boolean; + node_install_waf: boolean; + node_prefix: string; + node_shared_openssl: boolean; + node_shared_v8: boolean; + node_shared_zlib: boolean; + node_use_dtrace: boolean; + node_use_etw: boolean; + node_use_openssl: boolean; + target_arch: string; + v8_no_strict_aliasing: number; + v8_use_snapshot: boolean; + visibility: string; + }; + }; + kill(pid: number, signal?: string | number): void; + pid: number; + ppid: number; + title: string; + arch: string; + platform: Platform; + mainModule?: NodeModule; + memoryUsage(): MemoryUsage; + cpuUsage(previousValue?: CpuUsage): CpuUsage; + nextTick(callback: Function, ...args: any[]): void; + umask(mask?: number): number; + uptime(): number; + hrtime(time?: [number, number]): [number, number]; + domain: Domain; + + // Worker + send?(message: any, sendHandle?: any): void; + disconnect(): void; + connected: boolean; + + /** + * EventEmitter + * 1. beforeExit + * 2. disconnect + * 3. exit + * 4. message + * 5. rejectionHandled + * 6. uncaughtException + * 7. unhandledRejection + * 8. warning + * 9. message + * 10. + * 11. newListener/removeListener inherited from EventEmitter + */ + addListener(event: "beforeExit", listener: BeforeExitListener): this; + addListener(event: "disconnect", listener: DisconnectListener): this; + addListener(event: "exit", listener: ExitListener): this; + addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + addListener(event: "warning", listener: WarningListener): this; + addListener(event: "message", listener: MessageListener): this; + addListener(event: Signals, listener: SignalsListener): this; + addListener(event: "newListener", listener: NewListenerListener): this; + addListener(event: "removeListener", listener: RemoveListenerListener): this; + + emit(event: "beforeExit", code: number): boolean; + emit(event: "disconnect"): boolean; + emit(event: "exit", code: number): boolean; + emit(event: "rejectionHandled", promise: Promise): boolean; + emit(event: "uncaughtException", error: Error): boolean; + emit(event: "unhandledRejection", reason: any, promise: Promise): boolean; + emit(event: "warning", warning: Error): boolean; + emit(event: "message", message: any, sendHandle: any): this; + emit(event: Signals): boolean; + emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this; + + on(event: "beforeExit", listener: BeforeExitListener): this; + on(event: "disconnect", listener: DisconnectListener): this; + on(event: "exit", listener: ExitListener): this; + on(event: "rejectionHandled", listener: RejectionHandledListener): this; + on(event: "uncaughtException", listener: UncaughtExceptionListener): this; + on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + on(event: "warning", listener: WarningListener): this; + on(event: "message", listener: MessageListener): this; + on(event: Signals, listener: SignalsListener): this; + on(event: "newListener", listener: NewListenerListener): this; + on(event: "removeListener", listener: RemoveListenerListener): this; + + once(event: "beforeExit", listener: BeforeExitListener): this; + once(event: "disconnect", listener: DisconnectListener): this; + once(event: "exit", listener: ExitListener): this; + once(event: "rejectionHandled", listener: RejectionHandledListener): this; + once(event: "uncaughtException", listener: UncaughtExceptionListener): this; + once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + once(event: "warning", listener: WarningListener): this; + once(event: "message", listener: MessageListener): this; + once(event: Signals, listener: SignalsListener): this; + once(event: "newListener", listener: NewListenerListener): this; + once(event: "removeListener", listener: RemoveListenerListener): this; + + prependListener(event: "beforeExit", listener: BeforeExitListener): this; + prependListener(event: "disconnect", listener: DisconnectListener): this; + prependListener(event: "exit", listener: ExitListener): this; + prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependListener(event: "warning", listener: WarningListener): this; + prependListener(event: "message", listener: MessageListener): this; + prependListener(event: Signals, listener: SignalsListener): this; + prependListener(event: "newListener", listener: NewListenerListener): this; + prependListener(event: "removeListener", listener: RemoveListenerListener): this; + + prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; + prependOnceListener(event: "disconnect", listener: DisconnectListener): this; + prependOnceListener(event: "exit", listener: ExitListener): this; + prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependOnceListener(event: "warning", listener: WarningListener): this; + prependOnceListener(event: "message", listener: MessageListener): this; + prependOnceListener(event: Signals, listener: SignalsListener): this; + prependOnceListener(event: "newListener", listener: NewListenerListener): this; + prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this; + + listeners(event: "beforeExit"): BeforeExitListener[]; + listeners(event: "disconnect"): DisconnectListener[]; + listeners(event: "exit"): ExitListener[]; + listeners(event: "rejectionHandled"): RejectionHandledListener[]; + listeners(event: "uncaughtException"): UncaughtExceptionListener[]; + listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; + listeners(event: "warning"): WarningListener[]; + listeners(event: "message"): MessageListener[]; + listeners(event: Signals): SignalsListener[]; + listeners(event: "newListener"): NewListenerListener[]; + listeners(event: "removeListener"): RemoveListenerListener[]; + } + + export interface Global { + Array: typeof Array; + ArrayBuffer: typeof ArrayBuffer; + Boolean: typeof Boolean; + Buffer: typeof Buffer; + DataView: typeof DataView; + Date: typeof Date; + Error: typeof Error; + EvalError: typeof EvalError; + Float32Array: typeof Float32Array; + Float64Array: typeof Float64Array; + Function: typeof Function; + GLOBAL: Global; + Infinity: typeof Infinity; + Int16Array: typeof Int16Array; + Int32Array: typeof Int32Array; + Int8Array: typeof Int8Array; + Intl: typeof Intl; + JSON: typeof JSON; + Map: MapConstructor; + Math: typeof Math; + NaN: typeof NaN; + Number: typeof Number; + Object: typeof Object; + Promise: Function; + RangeError: typeof RangeError; + ReferenceError: typeof ReferenceError; + RegExp: typeof RegExp; + Set: SetConstructor; + String: typeof String; + Symbol: Function; + SyntaxError: typeof SyntaxError; + TypeError: typeof TypeError; + URIError: typeof URIError; + Uint16Array: typeof Uint16Array; + Uint32Array: typeof Uint32Array; + Uint8Array: typeof Uint8Array; + Uint8ClampedArray: Function; + WeakMap: WeakMapConstructor; + WeakSet: WeakSetConstructor; + clearImmediate: (immediateId: any) => void; + clearInterval: (intervalId: NodeJS.Timer) => void; + clearTimeout: (timeoutId: NodeJS.Timer) => void; + console: typeof console; + decodeURI: typeof decodeURI; + decodeURIComponent: typeof decodeURIComponent; + encodeURI: typeof encodeURI; + encodeURIComponent: typeof encodeURIComponent; + escape: (str: string) => string; + eval: typeof eval; + global: Global; + isFinite: typeof isFinite; + isNaN: typeof isNaN; + parseFloat: typeof parseFloat; + parseInt: typeof parseInt; + process: Process; + root: Global; + setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => any; + setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; + setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; + undefined: typeof undefined; + unescape: (str: string) => string; + gc: () => void; + v8debug?: any; + } + + export interface Timer { + ref(): void; + unref(): void; + } + + class Module { + static runMain(): void; + static wrap(code: string): string; + static builtinModules: string[]; + + static Module: typeof Module; + + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: Module | null; + children: Module[]; + paths: string[]; + + constructor(id: string, parent?: Module); + } +} + +interface IterableIterator { } + +/** + * @deprecated + */ +interface NodeBuffer extends Uint8Array { + 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; + entries(): IterableIterator<[number, number]>; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + keys(): IterableIterator; + values(): IterableIterator; +} + +/************************************************ +* * +* MODULES * +* * +************************************************/ +declare module "buffer" { + export var INSPECT_MAX_BYTES: number; + var BuffType: typeof Buffer; + var SlowBuffType: typeof SlowBuffer; + export { BuffType as Buffer, SlowBuffType as SlowBuffer }; +} + +declare module "querystring" { + export interface StringifyOptions { + encodeURIComponent?: Function; + } + + export interface ParseOptions { + maxKeys?: number; + decodeURIComponent?: Function; + } + + interface ParsedUrlQuery { [key: string]: string | string[]; } + + export function stringify(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string; + export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): T; + export function escape(str: string): string; + export function unescape(str: string): string; +} + +declare module "events" { + class internal extends NodeJS.EventEmitter { } + + namespace internal { + export class EventEmitter extends internal { + static listenerCount(emitter: EventEmitter, event: string | symbol): number; // deprecated + static defaultMaxListeners: number; + + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + rawListeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + eventNames(): Array; + listenerCount(type: string | symbol): number; + } + } + + export = internal; +} + +declare module "http" { + import * as events from "events"; + import * as net from "net"; + import * as stream from "stream"; + import { URL } from "url"; + + // incoming headers will never contain number + export interface IncomingHttpHeaders { + 'accept'?: string; + 'access-control-allow-origin'?: string; + 'access-control-allow-credentials'?: string; + 'access-control-expose-headers'?: string; + 'access-control-max-age'?: string; + 'access-control-allow-methods'?: string; + 'access-control-allow-headers'?: string; + 'accept-patch'?: string; + 'accept-ranges'?: string; + 'age'?: string; + 'allow'?: string; + 'alt-svc'?: string; + 'cache-control'?: string; + 'connection'?: string; + 'content-disposition'?: string; + 'content-encoding'?: string; + 'content-language'?: string; + 'content-length'?: string; + 'content-location'?: string; + 'content-range'?: string; + 'content-type'?: string; + 'date'?: string; + 'expires'?: string; + 'host'?: string; + 'last-modified'?: string; + 'location'?: string; + 'pragma'?: string; + 'proxy-authenticate'?: string; + 'public-key-pins'?: string; + 'retry-after'?: string; + 'set-cookie'?: string[]; + 'strict-transport-security'?: string; + 'trailer'?: string; + 'transfer-encoding'?: string; + 'tk'?: string; + 'upgrade'?: string; + 'vary'?: string; + 'via'?: string; + 'warning'?: string; + 'www-authenticate'?: string; + [header: string]: string | string[] | undefined; + } + + // outgoing headers allows numbers (as they are converted internally to strings) + export interface OutgoingHttpHeaders { + [header: string]: number | string | string[] | undefined; + } + + export interface ClientRequestArgs { + protocol?: string; + host?: string; + hostname?: string; + family?: number; + port?: number | string; + defaultPort?: number | string; + localAddress?: string; + socketPath?: string; + method?: string; + path?: string; + headers?: OutgoingHttpHeaders; + auth?: string; + agent?: Agent | boolean; + _defaultAgent?: Agent; + timeout?: number; + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 + createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: net.Socket) => void) => net.Socket; + } + + export class Server extends net.Server { + constructor(requestListener?: (req: IncomingMessage, res: ServerResponse) => void); + + setTimeout(msecs?: number, callback?: () => void): this; + setTimeout(callback: () => void): this; + maxHeadersCount: number; + timeout: number; + keepAliveTimeout: number; + } + /** + * @deprecated Use IncomingMessage + */ + export class ServerRequest extends IncomingMessage { + connection: net.Socket; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js + export class OutgoingMessage extends stream.Writable { + upgrading: boolean; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + finished: boolean; + headersSent: boolean; + connection: net.Socket; + + constructor(); + + setTimeout(msecs: number, callback?: () => void): this; + destroy(error: Error): void; + setHeader(name: string, value: number | string | string[]): void; + getHeader(name: string): number | string | string[] | undefined; + getHeaders(): OutgoingHttpHeaders; + getHeaderNames(): string[]; + hasHeader(name: string): boolean; + removeHeader(name: string): void; + addTrailers(headers: OutgoingHttpHeaders | Array<[string, string]>): void; + flushHeaders(): void; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256 + export class ServerResponse extends OutgoingMessage { + statusCode: number; + statusMessage: string; + + constructor(req: IncomingMessage); + + assignSocket(socket: net.Socket): void; + detachSocket(socket: net.Socket): void; + // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53 + // no args in writeContinue callback + writeContinue(callback?: () => void): void; + writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): void; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77 + export class ClientRequest extends OutgoingMessage { + connection: net.Socket; + socket: net.Socket; + aborted: number; + + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + + abort(): void; + onSocket(socket: net.Socket): void; + setTimeout(timeout: number, callback?: () => void): this; + setNoDelay(noDelay?: boolean): void; + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + } + + export class IncomingMessage extends stream.Readable { + constructor(socket: net.Socket); + + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + connection: net.Socket; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + trailers: { [key: string]: string | undefined }; + rawTrailers: string[]; + setTimeout(msecs: number, callback: () => void): this; + /** + * Only valid for request obtained from http.Server. + */ + method?: string; + /** + * Only valid for request obtained from http.Server. + */ + url?: string; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusCode?: number; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusMessage?: string; + socket: net.Socket; + destroy(error?: Error): void; + } + + /** + * @deprecated Use IncomingMessage + */ + export class ClientResponse extends IncomingMessage { } + + export interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number; + } + + export class Agent { + maxSockets: number; + sockets: any; + requests: any; + + constructor(opts?: AgentOptions); + + /** + * Destroy any sockets that are currently in use by the agent. + * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, + * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, + * sockets may hang open for quite a long time before the server terminates them. + */ + destroy(): void; + } + + export var METHODS: string[]; + + export var STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + + export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server; + export function createClient(port?: number, host?: string): any; + + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + export interface RequestOptions extends ClientRequestArgs { } + export function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + export function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + export var globalAgent: Agent; +} + +declare module "cluster" { + import * as child from "child_process"; + import * as events from "events"; + import * as net from "net"; + + // interfaces + export interface ClusterSettings { + execArgv?: string[]; // default: process.execArgv + exec?: string; + args?: string[]; + silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + inspectPort?: number | (() => number); + } + + export interface Address { + address: string; + port: number; + addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" + } + + export class Worker extends events.EventEmitter { + id: number; + process: child.ChildProcess; + suicide: boolean; + send(message: any, sendHandle?: any, callback?: (error: Error) => void): boolean; + kill(signal?: string): void; + destroy(signal?: string): void; + disconnect(): void; + isConnected(): boolean; + isDead(): boolean; + exitedAfterDisconnect: boolean; + + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "exit", listener: (code: number, signal: string) => void): this; + addListener(event: "listening", listener: (address: Address) => void): this; + addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "exit", code: number, signal: string): boolean; + emit(event: "listening", address: Address): boolean; + emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "exit", listener: (code: number, signal: string) => void): this; + on(event: "listening", listener: (address: Address) => void): this; + on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "exit", listener: (code: number, signal: string) => void): this; + once(event: "listening", listener: (address: Address) => void): this; + once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependListener(event: "listening", listener: (address: Address) => void): this; + prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "listening", listener: (address: Address) => void): this; + prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: () => void): this; + } + + export interface Cluster extends events.EventEmitter { + Worker: Worker; + disconnect(callback?: Function): void; + fork(env?: any): Worker; + isMaster: boolean; + isWorker: boolean; + // TODO: cluster.schedulingPolicy + settings: ClusterSettings; + setupMaster(settings?: ClusterSettings): void; + worker?: Worker; + workers?: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: (worker: Worker) => void): this; + addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: "fork", listener: (worker: Worker) => void): this; + addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: (worker: Worker) => void): this; + addListener(event: "setup", listener: (settings: any) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect", worker: Worker): boolean; + emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + emit(event: "fork", worker: Worker): boolean; + emit(event: "listening", worker: Worker, address: Address): boolean; + emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online", worker: Worker): boolean; + emit(event: "setup", settings: any): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: (worker: Worker) => void): this; + on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: "fork", listener: (worker: Worker) => void): this; + on(event: "listening", listener: (worker: Worker, address: Address) => void): this; + on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: (worker: Worker) => void): this; + on(event: "setup", listener: (settings: any) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: (worker: Worker) => void): this; + once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: "fork", listener: (worker: Worker) => void): this; + once(event: "listening", listener: (worker: Worker, address: Address) => void): this; + once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: (worker: Worker) => void): this; + once(event: "setup", listener: (settings: any) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: "fork", listener: (worker: Worker) => void): this; + prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: (worker: Worker) => void): this; + prependListener(event: "setup", listener: (settings: any) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; + prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: (worker: Worker) => void): this; + prependOnceListener(event: "setup", listener: (settings: any) => void): this; + } + + export function disconnect(callback?: Function): void; + export function fork(env?: any): Worker; + export var isMaster: boolean; + export var isWorker: boolean; + // TODO: cluster.schedulingPolicy + export var settings: ClusterSettings; + export function setupMaster(settings?: ClusterSettings): void; + export var worker: Worker; + export var workers: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + export function addListener(event: string, listener: (...args: any[]) => void): Cluster; + export function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function addListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function emit(event: string | symbol, ...args: any[]): boolean; + export function emit(event: "disconnect", worker: Worker): boolean; + export function emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + export function emit(event: "fork", worker: Worker): boolean; + export function emit(event: "listening", worker: Worker, address: Address): boolean; + export function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + export function emit(event: "online", worker: Worker): boolean; + export function emit(event: "setup", settings: any): boolean; + + export function on(event: string, listener: (...args: any[]) => void): Cluster; + export function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function on(event: "fork", listener: (worker: Worker) => void): Cluster; + export function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function on(event: "online", listener: (worker: Worker) => void): Cluster; + export function on(event: "setup", listener: (settings: any) => void): Cluster; + + export function once(event: string, listener: (...args: any[]) => void): Cluster; + export function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function once(event: "fork", listener: (worker: Worker) => void): Cluster; + export function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function once(event: "online", listener: (worker: Worker) => void): Cluster; + export function once(event: "setup", listener: (settings: any) => void): Cluster; + + export function removeListener(event: string, listener: (...args: any[]) => void): Cluster; + export function removeAllListeners(event?: string): Cluster; + export function setMaxListeners(n: number): Cluster; + export function getMaxListeners(): number; + export function listeners(event: string): Function[]; + export function listenerCount(type: string): number; + + export function prependListener(event: string, listener: (...args: any[]) => void): Cluster; + export function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster; + export function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function eventNames(): string[]; +} + +declare module "zlib" { + import * as stream from "stream"; + + export interface ZlibOptions { + flush?: number; // default: zlib.constants.Z_NO_FLUSH + finishFlush?: number; // default: zlib.constants.Z_FINISH + chunkSize?: number; // default: 16*1024 + windowBits?: number; + level?: number; // compression only + memLevel?: number; // compression only + strategy?: number; // compression only + dictionary?: any; // deflate/inflate only, empty dictionary by default + } + + export interface Zlib { + readonly bytesRead: number; + close(callback?: () => void): void; + flush(kind?: number | (() => void), callback?: () => void): void; + } + + export interface ZlibParams { + params(level: number, strategy: number, callback: () => void): void; + } + + export interface ZlibReset { + reset(): void; + } + + export interface Gzip extends stream.Transform, Zlib { } + export interface Gunzip extends stream.Transform, Zlib { } + export interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + export interface Inflate extends stream.Transform, Zlib, ZlibReset { } + export interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + export interface InflateRaw extends stream.Transform, Zlib, ZlibReset { } + export interface Unzip extends stream.Transform, Zlib { } + + export function createGzip(options?: ZlibOptions): Gzip; + export function createGunzip(options?: ZlibOptions): Gunzip; + export function createDeflate(options?: ZlibOptions): Deflate; + export function createInflate(options?: ZlibOptions): Inflate; + export function createDeflateRaw(options?: ZlibOptions): DeflateRaw; + export function createInflateRaw(options?: ZlibOptions): InflateRaw; + export function createUnzip(options?: ZlibOptions): Unzip; + + type InputType = string | Buffer | DataView | ArrayBuffer /* | TypedArray */; + export function deflate(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function deflate(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function deflateSync(buf: InputType, options?: ZlibOptions): Buffer; + export function deflateRaw(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function deflateRaw(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + export function gzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function gzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function gzipSync(buf: InputType, options?: ZlibOptions): Buffer; + export function gunzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function gunzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer; + export function inflate(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function inflate(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function inflateSync(buf: InputType, options?: ZlibOptions): Buffer; + export function inflateRaw(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function inflateRaw(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + export function unzip(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void; + export function unzip(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void; + export function unzipSync(buf: InputType, options?: ZlibOptions): Buffer; + + export namespace constants { + // Allowed flush values. + + export const Z_NO_FLUSH: number; + export const Z_PARTIAL_FLUSH: number; + export const Z_SYNC_FLUSH: number; + export const Z_FULL_FLUSH: number; + export const Z_FINISH: number; + export const Z_BLOCK: number; + export const Z_TREES: number; + + // Return codes for the compression/decompression functions. Negative values are errors, positive values are used for special but normal events. + + export const Z_OK: number; + export const Z_STREAM_END: number; + export const Z_NEED_DICT: number; + export const Z_ERRNO: number; + export const Z_STREAM_ERROR: number; + export const Z_DATA_ERROR: number; + export const Z_MEM_ERROR: number; + export const Z_BUF_ERROR: number; + export const Z_VERSION_ERROR: number; + + // Compression levels. + + export const Z_NO_COMPRESSION: number; + export const Z_BEST_SPEED: number; + export const Z_BEST_COMPRESSION: number; + export const Z_DEFAULT_COMPRESSION: number; + + // Compression strategy. + + export const Z_FILTERED: number; + export const Z_HUFFMAN_ONLY: number; + export const Z_RLE: number; + export const Z_FIXED: number; + export const Z_DEFAULT_STRATEGY: number; + } + + // Constants + export var Z_NO_FLUSH: number; + export var Z_PARTIAL_FLUSH: number; + export var Z_SYNC_FLUSH: number; + export var Z_FULL_FLUSH: number; + export var Z_FINISH: number; + export var Z_BLOCK: number; + export var Z_TREES: number; + export var Z_OK: number; + export var Z_STREAM_END: number; + export var Z_NEED_DICT: number; + export var Z_ERRNO: number; + export var Z_STREAM_ERROR: number; + export var Z_DATA_ERROR: number; + export var Z_MEM_ERROR: number; + export var Z_BUF_ERROR: number; + export var Z_VERSION_ERROR: number; + export var Z_NO_COMPRESSION: number; + export var Z_BEST_SPEED: number; + export var Z_BEST_COMPRESSION: number; + export var Z_DEFAULT_COMPRESSION: number; + export var Z_FILTERED: number; + export var Z_HUFFMAN_ONLY: number; + export var Z_RLE: number; + export var Z_FIXED: number; + export var Z_DEFAULT_STRATEGY: number; + export var Z_BINARY: number; + export var Z_TEXT: number; + export var Z_ASCII: number; + export var Z_UNKNOWN: number; + export var Z_DEFLATED: number; +} + +declare module "os" { + export interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + + export interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + } + + export interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + } + + export interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + + export type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + + export function hostname(): string; + export function loadavg(): number[]; + export function uptime(): number; + export function freemem(): number; + export function totalmem(): number; + export function cpus(): CpuInfo[]; + export function type(): string; + export function release(): string; + export function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; + export function homedir(): string; + export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string }; + export var constants: { + UV_UDP_REUSEADDR: number, + signals: { + SIGHUP: number; + SIGINT: number; + SIGQUIT: number; + SIGILL: number; + SIGTRAP: number; + SIGABRT: number; + SIGIOT: number; + SIGBUS: number; + SIGFPE: number; + SIGKILL: number; + SIGUSR1: number; + SIGSEGV: number; + SIGUSR2: number; + SIGPIPE: number; + SIGALRM: number; + SIGTERM: number; + SIGCHLD: number; + SIGSTKFLT: number; + SIGCONT: number; + SIGSTOP: number; + SIGTSTP: number; + SIGTTIN: number; + SIGTTOU: number; + SIGURG: number; + SIGXCPU: number; + SIGXFSZ: number; + SIGVTALRM: number; + SIGPROF: number; + SIGWINCH: number; + SIGIO: number; + SIGPOLL: number; + SIGPWR: number; + SIGSYS: number; + SIGUNUSED: number; + }, + errno: { + E2BIG: number; + EACCES: number; + EADDRINUSE: number; + EADDRNOTAVAIL: number; + EAFNOSUPPORT: number; + EAGAIN: number; + EALREADY: number; + EBADF: number; + EBADMSG: number; + EBUSY: number; + ECANCELED: number; + ECHILD: number; + ECONNABORTED: number; + ECONNREFUSED: number; + ECONNRESET: number; + EDEADLK: number; + EDESTADDRREQ: number; + EDOM: number; + EDQUOT: number; + EEXIST: number; + EFAULT: number; + EFBIG: number; + EHOSTUNREACH: number; + EIDRM: number; + EILSEQ: number; + EINPROGRESS: number; + EINTR: number; + EINVAL: number; + EIO: number; + EISCONN: number; + EISDIR: number; + ELOOP: number; + EMFILE: number; + EMLINK: number; + EMSGSIZE: number; + EMULTIHOP: number; + ENAMETOOLONG: number; + ENETDOWN: number; + ENETRESET: number; + ENETUNREACH: number; + ENFILE: number; + ENOBUFS: number; + ENODATA: number; + ENODEV: number; + ENOENT: number; + ENOEXEC: number; + ENOLCK: number; + ENOLINK: number; + ENOMEM: number; + ENOMSG: number; + ENOPROTOOPT: number; + ENOSPC: number; + ENOSR: number; + ENOSTR: number; + ENOSYS: number; + ENOTCONN: number; + ENOTDIR: number; + ENOTEMPTY: number; + ENOTSOCK: number; + ENOTSUP: number; + ENOTTY: number; + ENXIO: number; + EOPNOTSUPP: number; + EOVERFLOW: number; + EPERM: number; + EPIPE: number; + EPROTO: number; + EPROTONOSUPPORT: number; + EPROTOTYPE: number; + ERANGE: number; + EROFS: number; + ESPIPE: number; + ESRCH: number; + ESTALE: number; + ETIME: number; + ETIMEDOUT: number; + ETXTBSY: number; + EWOULDBLOCK: number; + EXDEV: number; + }, + }; + export function arch(): string; + export function platform(): NodeJS.Platform; + export function tmpdir(): string; + export const EOL: string; + export function endianness(): "BE" | "LE"; +} + +declare module "https" { + import * as tls from "tls"; + import * as events from "events"; + import * as http from "http"; + import { URL } from "url"; + + export type ServerOptions = tls.SecureContextOptions & tls.TlsOptions; + + export type RequestOptions = http.RequestOptions & { + rejectUnauthorized?: boolean; // Defaults to true + servername?: string; // SNI TLS Extension + pfx?: string | Buffer | Array; + key?: string | Buffer | Array; + passphrase?: string; + cert?: string | Buffer | Array; + ca?: string | Buffer | Array; + ciphers?: string; + clientCertEngine?: string; + secureProtocol?: string; // SSL Method, e.g. SSLv23_method + }; + + export interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean; + maxCachedSessions?: number; + } + + export class Agent extends http.Agent { + constructor(options?: AgentOptions); + } + + export class Server extends tls.Server { + setTimeout(callback: () => void): this; + setTimeout(msecs?: number, callback?: () => void): this; + timeout: number; + keepAliveTimeout: number; + } + + export function createServer(options: ServerOptions, requestListener?: (req: http.IncomingMessage, res: http.ServerResponse) => void): Server; + export function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + export function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + export var globalAgent: Agent; +} + +declare module "punycode" { + export function decode(string: string): string; + export function encode(string: string): string; + export function toUnicode(domain: string): string; + export function toASCII(domain: string): string; + export var ucs2: ucs2; + interface ucs2 { + decode(string: string): number[]; + encode(codePoints: number[]): string; + } + export var version: any; +} + +declare module "repl" { + import * as stream from "stream"; + import * as readline from "readline"; + + export interface ReplOptions { + prompt?: string; + input?: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + terminal?: boolean; + eval?: Function; + useColors?: boolean; + useGlobal?: boolean; + ignoreUndefined?: boolean; + writer?: Function; + completer?: Function; + replMode?: any; + breakEvalOnSigint?: any; + } + + export interface REPLServer extends readline.ReadLine { + context: any; + inputStream: NodeJS.ReadableStream; + outputStream: NodeJS.WritableStream; + + defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void; + displayPrompt(preserveCursor?: boolean): void; + + /** + * events.EventEmitter + * 1. exit + * 2. reset + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "exit", listener: () => void): this; + addListener(event: "reset", listener: (...args: any[]) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "exit"): boolean; + emit(event: "reset", context: any): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "exit", listener: () => void): this; + on(event: "reset", listener: (...args: any[]) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "exit", listener: () => void): this; + once(event: "reset", listener: (...args: any[]) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "exit", listener: () => void): this; + prependListener(event: "reset", listener: (...args: any[]) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "exit", listener: () => void): this; + prependOnceListener(event: "reset", listener: (...args: any[]) => void): this; + } + + export function start(options?: string | ReplOptions): REPLServer; + + export class Recoverable extends SyntaxError { + err: Error; + + constructor(err: Error); + } +} + +declare module "readline" { + import * as events from "events"; + import * as stream from "stream"; + + export interface Key { + sequence?: string; + name?: string; + ctrl?: boolean; + meta?: boolean; + shift?: boolean; + } + + export interface ReadLine extends events.EventEmitter { + setPrompt(prompt: string): void; + prompt(preserveCursor?: boolean): void; + question(query: string, callback: (answer: string) => void): void; + pause(): ReadLine; + resume(): ReadLine; + close(): void; + write(data: string | Buffer, key?: Key): void; + + /** + * events.EventEmitter + * 1. close + * 2. line + * 3. pause + * 4. resume + * 5. SIGCONT + * 6. SIGINT + * 7. SIGTSTP + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: any) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: any): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: any) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: any) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: any) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: any) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + } + + type Completer = (line: string) => CompleterResult; + type AsyncCompleter = (line: string, callback: (err: any, result: CompleterResult) => void) => any; + + export type CompleterResult = [string[], string]; + + export interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + completer?: Completer | AsyncCompleter; + terminal?: boolean; + historySize?: number; + } + + export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): ReadLine; + export function createInterface(options: ReadLineOptions): ReadLine; + + export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void; + export function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: ReadLine): void; + export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; + export function clearLine(stream: NodeJS.WritableStream, dir: number): void; + export function clearScreenDown(stream: NodeJS.WritableStream): void; +} + +declare module "vm" { + export interface Context { } + export interface ScriptOptions { + filename?: string; + lineOffset?: number; + columnOffset?: number; + displayErrors?: boolean; + timeout?: number; + cachedData?: Buffer; + produceCachedData?: boolean; + } + export interface RunningScriptOptions { + filename?: string; + lineOffset?: number; + columnOffset?: number; + displayErrors?: boolean; + timeout?: number; + } + export class Script { + constructor(code: string, options?: ScriptOptions); + runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; + runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; + runInThisContext(options?: RunningScriptOptions): any; + } + export function createContext(sandbox?: Context): Context; + export function isContext(sandbox: Context): boolean; + export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any; + export function runInDebugContext(code: string): any; + export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any; + export function runInThisContext(code: string, options?: RunningScriptOptions): any; +} + +declare module "child_process" { + import * as events from "events"; + import * as stream from "stream"; + import * as net from "net"; + + export interface ChildProcess extends events.EventEmitter { + stdin: stream.Writable; + stdout: stream.Readable; + stderr: stream.Readable; + stdio: [stream.Writable, stream.Readable, stream.Readable]; + killed: boolean; + pid: number; + kill(signal?: string): void; + send(message: any, callback?: (error: Error) => void): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error) => void): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error) => void): boolean; + connected: boolean; + disconnect(): void; + unref(): void; + ref(): void; + + /** + * events.EventEmitter + * 1. close + * 2. disconnect + * 3. error + * 4. exit + * 5. message + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (code: number, signal: string) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "exit", listener: (code: number, signal: string) => void): this; + addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", code: number, signal: string): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "exit", code: number, signal: string): boolean; + emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (code: number, signal: string) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "exit", listener: (code: number, signal: string) => void): this; + on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (code: number, signal: string) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "exit", listener: (code: number, signal: string) => void): this; + once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (code: number, signal: string) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + } + + export interface MessageOptions { + keepOpen?: boolean; + } + + export interface SpawnOptions { + cwd?: string; + env?: any; + stdio?: any; + detached?: boolean; + uid?: number; + gid?: number; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + } + + export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess; + + export interface ExecOptions { + cwd?: string; + env?: any; + shell?: string; + timeout?: number; + maxBuffer?: number; + killSignal?: string; + uid?: number; + gid?: number; + } + + export interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + + export interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: string | null; // specify `null`. + } + + // no `options` definitely means stdout/stderr are `string`. + export function exec(command: string, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + export function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + export function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + export function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + export function exec(command: string, options: ExecOptions, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + export function exec(command: string, options: ({ encoding?: string | null } & ExecOptions) | undefined | null, callback?: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace exec { + export function __promisify__(command: string): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): Promise<{ stdout: Buffer, stderr: Buffer }>; + export function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(command: string, options: ExecOptions): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + export interface ExecFileOptions { + cwd?: string; + env?: any; + timeout?: number; + maxBuffer?: number; + killSignal?: string; + uid?: number; + gid?: number; + windowsVerbatimArguments?: boolean; + } + export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: 'buffer' | null; + } + export interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { + encoding: string; + } + + export function execFile(file: string): ChildProcess; + export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + + // no `options` definitely means stdout/stderr are `string`. + export function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + export function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + export function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + export function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + export function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess; + export function execFile(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace execFile { + export function __promisify__(file: string): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, args: string[] | undefined | null): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>; + export function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + export function __promisify__(file: string, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>; + export function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + export function __promisify__(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + export interface ForkOptions { + cwd?: string; + env?: any; + execPath?: string; + execArgv?: string[]; + silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + windowsVerbatimArguments?: boolean; + } + export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess; + + export interface SpawnSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + } + export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding: string; // specify `null`. + } + export interface SpawnSyncReturns { + pid: number; + output: string[]; + stdout: T; + stderr: T; + status: number; + signal: string; + error: Error; + } + export function spawnSync(command: string): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns; + + export interface ExecSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + shell?: string; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + } + export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding: string; // specify `null`. + } + export function execSync(command: string): Buffer; + export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; + export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; + export function execSync(command: string, options?: ExecSyncOptions): Buffer; + + export interface ExecFileSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + } + export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding: string; // specify `null`. + } + export function execFileSync(command: string): Buffer; + export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; + export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer; +} + +declare module "url" { + import { ParsedUrlQuery } from 'querystring'; + + export interface UrlObjectCommon { + auth?: string; + hash?: string; + host?: string; + hostname?: string; + href?: string; + path?: string; + pathname?: string; + protocol?: string; + search?: string; + slashes?: boolean; + } + + // Input to `url.format` + export interface UrlObject extends UrlObjectCommon { + port?: string | number; + query?: string | null | { [key: string]: any }; + } + + // Output of `url.parse` + export interface Url extends UrlObjectCommon { + port?: string; + query?: string | null | ParsedUrlQuery; + } + + export interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + + export interface UrlWithStringQuery extends Url { + query: string | null; + } + + export function parse(urlStr: string): UrlWithStringQuery; + export function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + export function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + export function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + + export function format(URL: URL, options?: URLFormatOptions): string; + export function format(urlObject: UrlObject | string): string; + export function resolve(from: string, to: string): string; + + export interface URLFormatOptions { + auth?: boolean; + fragment?: boolean; + search?: boolean; + unicode?: boolean; + } + + export class URLSearchParams implements Iterable<[string, string]> { + constructor(init?: URLSearchParams | string | { [key: string]: string | string[] | undefined } | Iterable<[string, string]> | Array<[string, string]>); + append(name: string, value: string): void; + delete(name: string): void; + entries(): IterableIterator<[string, string]>; + forEach(callback: (value: string, name: string) => void): void; + get(name: string): string | null; + getAll(name: string): string[]; + has(name: string): boolean; + keys(): IterableIterator; + set(name: string, value: string): void; + sort(): void; + toString(): string; + values(): IterableIterator; + [Symbol.iterator](): IterableIterator<[string, string]>; + } + + export class URL { + constructor(input: string, base?: string | URL); + hash: string; + host: string; + hostname: string; + href: string; + readonly origin: string; + password: string; + pathname: string; + port: string; + protocol: string; + search: string; + readonly searchParams: URLSearchParams; + username: string; + toString(): string; + toJSON(): string; + } +} + +declare module "dns" { + // Supported getaddrinfo flags. + export const ADDRCONFIG: number; + export const V4MAPPED: number; + + export interface LookupOptions { + family?: number; + hints?: number; + all?: boolean; + } + + export interface LookupOneOptions extends LookupOptions { + all?: false; + } + + export interface LookupAllOptions extends LookupOptions { + all: true; + } + + export interface LookupAddress { + address: string; + family: number; + } + + export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; + export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void; + export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void; + export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace lookup { + export function __promisify__(hostname: string, options: LookupAllOptions): Promise<{ address: LookupAddress[] }>; + export function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<{ address: string, family: number }>; + export function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>; + } + + export interface ResolveOptions { + ttl: boolean; + } + + export interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + + export interface RecordWithTtl { + address: string; + ttl: number; + } + + export interface MxRecord { + priority: number; + exchange: string; + } + + export interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + + export interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + + export interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + + export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void; + export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void; + export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void; + export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void; + export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void; + export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace resolve { + export function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + export function __promisify__(hostname: string, rrtype: "MX"): Promise; + export function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + export function __promisify__(hostname: string, rrtype: "SOA"): Promise; + export function __promisify__(hostname: string, rrtype: "SRV"): Promise; + export function __promisify__(hostname: string, rrtype: "TXT"): Promise; + export function __promisify__(hostname: string, rrtype?: string): Promise; + } + + export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void; + export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace resolve4 { + export function __promisify__(hostname: string): Promise; + export function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + export function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void; + export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace resolve6 { + export function __promisify__(hostname: string): Promise; + export function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + export function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void; + export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void; + export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; + export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void; + export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void; + export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void; + + export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void; + export function setServers(servers: string[]): void; + + // Error codes + export var NODATA: string; + export var FORMERR: string; + export var SERVFAIL: string; + export var NOTFOUND: string; + export var NOTIMP: string; + export var REFUSED: string; + export var BADQUERY: string; + export var BADNAME: string; + export var BADFAMILY: string; + export var BADRESP: string; + export var CONNREFUSED: string; + export var TIMEOUT: string; + export var EOF: string; + export var FILE: string; + export var NOMEM: string; + export var DESTRUCTION: string; + export var BADSTR: string; + export var BADFLAGS: string; + export var NONAME: string; + export var BADHINTS: string; + export var NOTINITIALIZED: string; + export var LOADIPHLPAPI: string; + export var ADDRGETNETWORKPARAMS: string; + export var CANCELLED: string; +} + +declare module "net" { + import * as stream from "stream"; + import * as events from "events"; + import * as dns from "dns"; + + type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + + export interface SocketConstructorOpts { + fd?: number; + allowHalfOpen?: boolean; + readable?: boolean; + writable?: boolean; + } + + export interface TcpSocketConnectOpts { + port: number; + host?: string; + localAddress?: string; + localPort?: number; + hints?: number; + family?: number; + lookup?: LookupFunction; + } + + export interface IpcSocketConnectOpts { + path: string; + } + + export type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + + export class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + + // Extended base methods + write(buffer: Buffer): boolean; + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + write(str: string, encoding?: string, fd?: string): boolean; + write(data: any, encoding?: string, callback?: Function): void; + + connect(options: SocketConnectOpts, connectionListener?: Function): this; + connect(port: number, host: string, connectionListener?: Function): this; + connect(port: number, connectionListener?: Function): this; + connect(path: string, connectionListener?: Function): this; + + bufferSize: number; + setEncoding(encoding?: string): this; + destroy(err?: any): void; + pause(): this; + resume(): this; + setTimeout(timeout: number, callback?: Function): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; + address(): { port: number; family: string; address: string; }; + unref(): void; + ref(): void; + + remoteAddress?: string; + remoteFamily?: string; + remotePort?: number; + localAddress: string; + localPort: number; + bytesRead: number; + bytesWritten: number; + connecting: boolean; + destroyed: boolean; + + // Extended base methods + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + end(data?: any, encoding?: string): void; + + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. data + * 4. drain + * 5. end + * 6. error + * 7. lookup + * 8. timeout + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (had_error: boolean) => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "data", listener: (data: Buffer) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: "timeout", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", had_error: boolean): boolean; + emit(event: "connect"): boolean; + emit(event: "data", data: Buffer): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; + emit(event: "timeout"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (had_error: boolean) => void): this; + on(event: "connect", listener: () => void): this; + on(event: "data", listener: (data: Buffer) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: "timeout", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (had_error: boolean) => void): this; + once(event: "connect", listener: () => void): this; + once(event: "data", listener: (data: Buffer) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: "timeout", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (had_error: boolean) => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "data", listener: (data: Buffer) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: "timeout", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "data", listener: (data: Buffer) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + + export interface ListenOptions { + port?: number; + host?: string; + backlog?: number; + path?: string; + exclusive?: boolean; + } + + // https://github.com/nodejs/node/blob/master/lib/net.js + export class Server extends events.EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void); + + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: Function): this; + listen(port?: number, hostname?: string, listeningListener?: Function): this; + listen(port?: number, backlog?: number, listeningListener?: Function): this; + listen(port?: number, listeningListener?: Function): this; + listen(path: string, backlog?: number, listeningListener?: Function): this; + listen(path: string, listeningListener?: Function): this; + listen(options: ListenOptions, listeningListener?: Function): this; + listen(handle: any, backlog?: number, listeningListener?: Function): this; + listen(handle: any, listeningListener?: Function): this; + close(callback?: Function): this; + address(): { port: number; family: string; address: string; }; + getConnections(cb: (error: Error | null, count: number) => void): void; + ref(): this; + unref(): this; + maxConnections: number; + connections: number; + listening: boolean; + + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Socket) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Socket): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Socket) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Socket) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Socket) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + } + + export interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + export interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + export type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + + export function createServer(connectionListener?: (socket: Socket) => void): Server; + export function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server; + export function connect(options: NetConnectOpts, connectionListener?: Function): Socket; + export function connect(port: number, host?: string, connectionListener?: Function): Socket; + export function connect(path: string, connectionListener?: Function): Socket; + export function createConnection(options: NetConnectOpts, connectionListener?: Function): Socket; + export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; + export function createConnection(path: string, connectionListener?: Function): Socket; + export function isIP(input: string): number; + export function isIPv4(input: string): boolean; + export function isIPv6(input: string): boolean; +} + +declare module "dgram" { + import * as events from "events"; + import * as dns from "dns"; + + interface RemoteInfo { + address: string; + family: string; + port: number; + } + + interface AddressInfo { + address: string; + family: string; + port: number; + } + + interface BindOptions { + port: number; + address?: string; + exclusive?: boolean; + } + + type SocketType = "udp4" | "udp6"; + + interface SocketOptions { + type: SocketType; + reuseAddr?: boolean; + recvBufferSize?: number; + sendBufferSize?: number; + lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void) => void; + } + + export function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + + export class Socket extends events.EventEmitter { + send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error | null, bytes: number) => void): void; + bind(port?: number, address?: string, callback?: () => void): void; + bind(port?: number, callback?: () => void): void; + bind(callback?: () => void): void; + bind(options: BindOptions, callback?: Function): void; + close(callback?: () => void): void; + address(): AddressInfo; + setBroadcast(flag: boolean): void; + setTTL(ttl: number): void; + setMulticastTTL(ttl: number): void; + setMulticastInterface(multicastInterface: string): void; + setMulticastLoopback(flag: boolean): void; + addMembership(multicastAddress: string, multicastInterface?: string): void; + dropMembership(multicastAddress: string, multicastInterface?: string): void; + ref(): this; + unref(): this; + setRecvBufferSize(size: number): void; + setSendBufferSize(size: number): void; + getRecvBufferSize(): number; + getSendBufferSize(): number; + + /** + * events.EventEmitter + * 1. close + * 2. error + * 3. listening + * 4. message + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit(event: "message", msg: Buffer, rinfo: AddressInfo): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; + } +} + +declare module "fs" { + import * as stream from "stream"; + import * as events from "events"; + import { URL } from "url"; + + /** + * Valid types for path values in "fs". + */ + export type PathLike = string | Buffer | URL; + + export class Stats { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: number; + ino: number; + mode: number; + nlink: number; + uid: number; + gid: number; + rdev: number; + size: number; + blksize: number; + blocks: number; + atimeMs: number; + mtimeMs: number; + ctimeMs: number; + birthtimeMs: number; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + } + + export interface FSWatcher extends events.EventEmitter { + close(): void; + + /** + * events.EventEmitter + * 1. change + * 2. error + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: "error", listener: (error: Error) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: "error", listener: (error: Error) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + } + + export class ReadStream extends stream.Readable { + close(): void; + destroy(): void; + bytesRead: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + export class WriteStream extends stream.Writable { + close(): void; + bytesWritten: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + + /** + * Synchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function renameSync(oldPath: PathLike, newPath: PathLike): void; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + export function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + export function __promisify__(path: PathLike, len?: number | null): Promise; + } + + /** + * Synchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + export function truncateSync(path: PathLike, len?: number | null): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + export function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + export function __promisify__(fd: number, len?: number | null): Promise; + } + + /** + * Synchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + export function ftruncateSync(fd: number, len?: number | null): void; + + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + + /** + * Synchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function chownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number, uid: number, gid: number): Promise; + } + + /** + * Synchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + export function fchownSync(fd: number, uid: number, gid: number): void; + + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + + /** + * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function lchownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function __promisify__(path: PathLike, mode: string | number): Promise; + } + + /** + * Synchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function chmodSync(path: PathLike, mode: string | number): void; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function __promisify__(fd: number, mode: string | number): Promise; + } + + /** + * Synchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function fchmodSync(fd: number, mode: string | number): void; + + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function __promisify__(path: PathLike, mode: string | number): Promise; + } + + /** + * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + export function lchmodSync(path: PathLike, mode: string | number): void; + + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace stat { + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function statSync(path: PathLike): Stats; + + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + export function fstatSync(fd: number): Stats; + + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function lstatSync(path: PathLike): Stats; + + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function link(existingPath: PathLike, newPath: PathLike): Promise; + } + + /** + * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function linkSync(existingPath: PathLike, newPath: PathLike): void; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + export function symlink(target: PathLike, path: PathLike, type: string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + export function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + } + + /** + * Synchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + export function symlinkSync(target: PathLike, path: PathLike, type?: string | null): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, linkString: Buffer) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string | Buffer) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, resolvedPath: Buffer) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + export function native(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void; + export function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, resolvedPath: Buffer) => void): void; + export function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void; + export function native(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void; + } + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + + export namespace realpathSync { + export function native(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + export function native(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + export function native(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + } + + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function unlinkSync(path: PathLike): void; + + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function rmdirSync(path: PathLike): void; + + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function __promisify__(path: PathLike, mode?: number | string | null): Promise; + } + + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdirSync(path: PathLike, mode?: number | string | null): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException, folder: Buffer) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string | Buffer) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(prefix: string, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options?: { encoding?: string | null } | string | null): string | Buffer; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir(path: PathLike, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, files: Buffer[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[] | Buffer[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer" }): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null } | BufferEncoding | null): string[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): string[] | Buffer[]; + + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number): Promise; + } + + /** + * Synchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + export function closeSync(fd: number): void; + + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + export function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; + + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + export function __promisify__(path: PathLike, flags: string | number, mode?: string | number | null): Promise; + } + + /** + * Synchronous open(2) - open and possibly create a file, returning a file descriptor.. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + export function openSync(path: PathLike, flags: string | number, mode?: string | number | null): number; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + export function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + } + + /** + * Synchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + export function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + export function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise; + } + + /** + * Synchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + export function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + export function fsyncSync(fd: number): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + export function write(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + export function write(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + export function write(fd: number, buffer: TBuffer, offset: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + export function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function write(fd: number, string: any, position: number | undefined | null, encoding: string | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + export function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + */ + export function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + export function __promisify__(fd: number, buffer?: TBuffer, offset?: number, length?: number, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function __promisify__(fd: number, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + } + + /** + * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + export function writeSync(fd: number, buffer: Buffer | Uint8Array, offset?: number | null, length?: number | null, position?: number | null): number; + + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function writeSync(fd: number, string: any, position?: number | null, encoding?: string | null): number; + + /** + * Asynchronously reads data from the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + export function read(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + export function __promisify__(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; + } + + /** + * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read. + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + export function readSync(fd: number, buffer: Buffer | Uint8Array, offset: number, length: number, position: number | null): number; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile(path: PathLike | number, options: { encoding?: string | null; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException, data: string | Buffer) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + */ + export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function __promisify__(path: PathLike | number, options: { encoding: string; flag?: string; } | string): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function __promisify__(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): Promise; + } + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer; + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync(path: PathLike | number, options: { encoding: string; flag?: string; } | string): string; + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): string | Buffer; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + export function writeFile(path: PathLike | number, data: any, options: { encoding?: string | null; mode?: number | string; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + export function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + export function __promisify__(path: PathLike | number, data: any, options?: { encoding?: string | null; mode?: number | string; flag?: string; } | string | null): Promise; + } + + /** + * Synchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + export function writeFileSync(path: PathLike | number, data: any, options?: { encoding?: string | null; mode?: number | string; flag?: string; } | string | null): void; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + export function appendFile(file: PathLike | number, data: any, options: { encoding?: string | null, mode?: string | number, flag?: string } | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + export function __promisify__(file: PathLike | number, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string } | string | null): Promise; + } + + /** + * Synchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + export function appendFileSync(file: PathLike | number, data: any, options?: { encoding?: string | null; mode?: number | string; flag?: string; } | string | null): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + */ + export function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void; + + /** + * Stop watching for changes on `filename`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch(filename: PathLike, options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null, listener?: (event: string, filename: string) => void): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch(filename: PathLike, options: { encoding: "buffer", persistent?: boolean, recursive?: boolean } | "buffer", listener?: (event: string, filename: Buffer) => void): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch(filename: PathLike, options: { encoding?: string | null, persistent?: boolean, recursive?: boolean } | string | null, listener?: (event: string, filename: string | Buffer) => void): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function watch(filename: PathLike, listener?: (event: string, filename: string) => any): FSWatcher; + + /** + * Asynchronously tests whether or not the given path exists by checking with the file system. + * @deprecated + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function exists(path: PathLike, callback: (exists: boolean) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronously tests whether or not the given path exists by checking with the file system. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function existsSync(path: PathLike): boolean; + + export namespace constants { + // File Access Constants + + /** Constant for fs.access(). File is visible to the calling process. */ + export const F_OK: number; + + /** Constant for fs.access(). File can be read by the calling process. */ + export const R_OK: number; + + /** Constant for fs.access(). File can be written by the calling process. */ + export const W_OK: number; + + /** Constant for fs.access(). File can be executed by the calling process. */ + export const X_OK: number; + + // File Open Constants + + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + export const O_RDONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + export const O_WRONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + export const O_RDWR: number; + + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + export const O_CREAT: number; + + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + export const O_EXCL: number; + + /** Constant for fs.open(). Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one). */ + export const O_NOCTTY: number; + + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + export const O_TRUNC: number; + + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + export const O_APPEND: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + export const O_DIRECTORY: number; + + /** Constant for fs.open(). Flag indicating reading accesses to the file system will no longer result in an update to the atime information associated with the file. This flag is available on Linux operating systems only. */ + export const O_NOATIME: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + export const O_NOFOLLOW: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + export const O_SYNC: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + export const O_DSYNC: number; + + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + export const O_SYMLINK: number; + + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + export const O_DIRECT: number; + + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + export const O_NONBLOCK: number; + + // File Type Constants + + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + export const S_IFMT: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + export const S_IFREG: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + export const S_IFDIR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + export const S_IFCHR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + export const S_IFBLK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + export const S_IFIFO: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + export const S_IFLNK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + export const S_IFSOCK: number; + + // File Mode Constants + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + export const S_IRWXU: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + export const S_IRUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + export const S_IWUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + export const S_IXUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + export const S_IRWXG: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + export const S_IRGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + export const S_IWGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + export const S_IXGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + export const S_IRWXO: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + export const S_IROTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + export const S_IWOTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + export const S_IXOTH: number; + + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + export const COPYFILE_EXCL: number; + } + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException) => void): void; + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function __promisify__(path: PathLike, mode?: number): Promise; + } + + /** + * Synchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function accessSync(path: PathLike, mode?: number): void; + + /** + * Returns a new `ReadStream` object. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function createReadStream(path: PathLike, options?: string | { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + end?: number; + highWaterMark?: number; + }): ReadStream; + + /** + * Returns a new `WriteStream` object. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + export function createWriteStream(path: PathLike, options?: string | { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + }): WriteStream; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + export function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + export function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + export function fdatasyncSync(fd: number): void; + + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + */ + export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException) => void): void; + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + export namespace copyFile { + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + export function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise; + } + + /** + * Synchronously copies src to dest. By default, dest is overwritten if it already exists. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void; +} + +declare module "path" { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + export interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + export interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string; + /** + * The file extension (if any) such as '.html' + */ + ext?: string; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string; + } + + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param p string path to normalize. + */ + export function normalize(p: string): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths paths to join. + */ + export function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} paramter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param pathSegments string paths to join. Non-string arguments are ignored. + */ + export function resolve(...pathSegments: string[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * @param path path to test. + */ + export function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to}. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + */ + export function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param p the path to evaluate. + */ + export function dirname(p: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param p the path to evaluate. + * @param ext optionally, an extension to remove from the result. + */ + export function basename(p: string, ext?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * + * @param p the path to evaluate. + */ + export function extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + export var sep: string; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + export var delimiter: string; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + export function parse(pathString: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + export function format(pathObject: FormatInputPathObject): string; + + export module posix { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: FormatInputPathObject): string; + } + + export module win32 { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: FormatInputPathObject): string; + } +} + +declare module "string_decoder" { + export interface NodeStringDecoder { + write(buffer: Buffer): string; + end(buffer?: Buffer): string; + } + export var StringDecoder: { + new(encoding?: string): NodeStringDecoder; + }; +} + +declare module "tls" { + import * as crypto from "crypto"; + import * as dns from "dns"; + import * as net from "net"; + import * as stream from "stream"; + + var CLIENT_RENEG_LIMIT: number; + var CLIENT_RENEG_WINDOW: number; + + export interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + + export interface PeerCertificate { + subject: Certificate; + issuer: Certificate; + subjectaltname: string; + infoAccess: { [index: string]: string[] | undefined }; + modulus: string; + exponent: string; + valid_from: string; + valid_to: string; + fingerprint: string; + ext_key_usage: string[]; + serialNumber: string; + raw: Buffer; + } + + export interface DetailedPeerCertificate extends PeerCertificate { + issuerCertificate: DetailedPeerCertificate; + } + + export interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + } + + export class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket, options?: { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext, + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean, + /** + * An optional net.Server instance. + */ + server?: net.Server, + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean, + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. Defaults to false. + */ + rejectUnauthorized?: boolean, + /** + * An array of strings or a Buffer naming possible NPN protocols. + * (Protocols should be ordered by their priority.) + */ + NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array, + /** + * An array of strings or a Buffer naming possible ALPN protocols. + * (Protocols should be ordered by their priority.) When the server + * receives both NPN and ALPN extensions from the client, ALPN takes + * precedence over NPN and the server does not send an NPN extension + * to the client. + */ + ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array, + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void, + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer, + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication + */ + requestOCSP?: boolean + }); + + /** + * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. + */ + authorized: boolean; + /** + * The reason why the peer's certificate has not been verified. + * This property becomes available only when tlsSocket.authorized === false. + */ + authorizationError: Error; + /** + * Static boolean value, always true. + * May be used to distinguish TLS sockets from regular ones. + */ + encrypted: boolean; + /** + * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. + * @returns Returns an object representing the cipher name + * and the SSL/TLS protocol version of the current connection. + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the peer's certificate. + * The returned object has some properties corresponding to the field of the certificate. + * If detailed argument is true the full chain with issuer property will be returned, + * if false only the top certificate without issuer property. + * If the peer does not provide a certificate, it returns null or an empty object. + * @param detailed - If true; the full chain with issuer property will be returned. + * @returns An object representing the peer's certificate. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * Could be used to speed up handshake establishment when reconnecting to the server. + * @returns ASN.1 encoded TLS session or undefined if none was negotiated. + */ + getSession(): any; + /** + * NOTE: Works only with client TLS sockets. + * Useful only for debugging, for session reuse provide session option to tls.connect(). + * @returns TLS session ticket or undefined if none was negotiated. + */ + getTLSTicket(): any; + /** + * Initiate TLS renegotiation process. + * + * NOTE: Can be used to request peer's certificate after the secure connection has been established. + * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. + * @param options - The options may contain the following fields: rejectUnauthorized, + * requestCert (See tls.createServer() for details). + * @param callback - callback(err) will be executed with null as err, once the renegotiation + * is successfully completed. + */ + renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): any; + /** + * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by + * the TLS layer until the entire fragment is received and its integrity is verified; + * large fragments can span multiple roundtrips, and their processing can be delayed due to packet + * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, + * which may decrease overall server throughput. + * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * @returns Returns true on success, false otherwise. + */ + setMaxSendFragment(size: number): boolean; + + /** + * events.EventEmitter + * 1. OCSPResponse + * 2. secureConnect + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + addListener(event: "secureConnect", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "OCSPResponse", response: Buffer): boolean; + emit(event: "secureConnect"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "OCSPResponse", listener: (response: Buffer) => void): this; + on(event: "secureConnect", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "OCSPResponse", listener: (response: Buffer) => void): this; + once(event: "secureConnect", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependListener(event: "secureConnect", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependOnceListener(event: "secureConnect", listener: () => void): this; + } + + export interface TlsOptions extends SecureContextOptions { + clientCertEngine?: string; + handshakeTimeout?: number; + requestCert?: boolean; + rejectUnauthorized?: boolean; + NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array; + ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array; + SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void; + sessionTimeout?: number; + ticketKeys?: Buffer; + } + + export interface ConnectionOptions extends SecureContextOptions { + host?: string; + port?: number; + path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket + rejectUnauthorized?: boolean; // Defaults to true + NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array; + ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array; + checkServerIdentity?: typeof checkServerIdentity; + servername?: string; // SNI TLS Extension + session?: Buffer; + minDHSize?: number; + secureContext?: SecureContext; // If not provided, the entire ConnectionOptions object will be passed to tls.createSecureContext() + lookup?: net.LookupFunction; + } + + export class Server extends net.Server { + addContext(hostName: string, credentials: { + key: string; + cert: string; + ca: string; + }): void; + + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + addListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; + emit(event: "newSession", sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void): boolean; + emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: Function): boolean; + emit(event: "resumeSession", sessionId: any, callback: (err: Error, sessionData: any) => void): boolean; + emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + on(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + once(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + prependListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + prependOnceListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + } + + export interface ClearTextStream extends stream.Duplex { + authorized: boolean; + authorizationError: Error; + getPeerCertificate(): any; + getCipher: { + name: string; + version: string; + }; + address: { + port: number; + family: string; + address: string; + }; + remoteAddress: string; + remotePort: number; + } + + export interface SecurePair { + encrypted: any; + cleartext: any; + } + + export interface SecureContextOptions { + pfx?: string | Buffer | Array; + key?: string | Buffer | Array; + passphrase?: string; + cert?: string | Buffer | Array; + ca?: string | Buffer | Array; + ciphers?: string; + honorCipherOrder?: boolean; + ecdhCurve?: string; + clientCertEngine?: string; + crl?: string | Buffer | Array; + dhparam?: string | Buffer; + secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options + secureProtocol?: string; // SSL Method, e.g. SSLv23_method + sessionIdContext?: string; + } + + export interface SecureContext { + context: any; + } + + /* + * Verifies the certificate `cert` is issued to host `host`. + * @host The hostname to verify the certificate against + * @cert PeerCertificate representing the peer's certificate + * + * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined. + */ + export function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; + export function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + export function connect(options: ConnectionOptions, secureConnectionListener?: () => void): TLSSocket; + export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + export function createSecureContext(details: SecureContextOptions): SecureContext; + export function getCiphers(): string[]; + + export var DEFAULT_ECDH_CURVE: string; +} + +declare module "crypto" { + export interface Certificate { + exportChallenge(spkac: string | Buffer): Buffer; + exportPublicKey(spkac: string | Buffer): Buffer; + verifySpkac(spkac: Buffer): boolean; + } + export var Certificate: { + new(): Certificate; + (): Certificate; + }; + + export var fips: boolean; + + export interface CredentialDetails { + pfx: string; + key: string; + passphrase: string; + cert: string; + ca: string | string[]; + crl: string | string[]; + ciphers: string; + } + export interface Credentials { context?: any; } + export function createCredentials(details: CredentialDetails): Credentials; + export function createHash(algorithm: string): Hash; + export function createHmac(algorithm: string, key: string | Buffer): Hmac; + + type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; + type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; + type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; + type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + + export interface Hash extends NodeJS.ReadWriteStream { + update(data: string | Buffer | DataView): Hash; + update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Hash; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + export interface Hmac extends NodeJS.ReadWriteStream { + update(data: string | Buffer | DataView): Hmac; + update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Hmac; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + export function createCipher(algorithm: string, password: any): Cipher; + export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; + export interface Cipher extends NodeJS.ReadWriteStream { + update(data: Buffer | DataView): Buffer; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; + update(data: Buffer | DataView, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): void; + getAuthTag(): Buffer; + setAAD(buffer: Buffer): void; + } + export function createDecipher(algorithm: string, password: any): Decipher; + export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; + export interface Decipher extends NodeJS.ReadWriteStream { + update(data: Buffer | DataView): Buffer; + update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; + update(data: Buffer | DataView, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string; + update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): void; + setAuthTag(tag: Buffer): void; + setAAD(buffer: Buffer): void; + } + export function createSign(algorithm: string): Signer; + export interface Signer extends NodeJS.WritableStream { + update(data: string | Buffer | DataView): Signer; + update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Signer; + sign(private_key: string | { key: string; passphrase: string }): Buffer; + sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + } + export function createVerify(algorith: string): Verify; + export interface Verify extends NodeJS.WritableStream { + update(data: string | Buffer | DataView): Verify; + update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Verify; + verify(object: string | Object, signature: Buffer | DataView): boolean; + verify(object: string | Object, signature: string, signature_format: HexBase64Latin1Encoding): boolean; + // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format + // The signature field accepts a TypedArray type, but it is only available starting ES2017 + } + export function createDiffieHellman(prime_length: number, generator?: number): DiffieHellman; + export function createDiffieHellman(prime: Buffer): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; + export interface DiffieHellman { + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: Buffer): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrime(): Buffer; + getPrime(encoding: HexBase64Latin1Encoding): string; + getGenerator(): Buffer; + getGenerator(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + setPublicKey(public_key: Buffer): void; + setPublicKey(public_key: string, encoding: string): void; + setPrivateKey(private_key: Buffer): void; + setPrivateKey(private_key: string, encoding: string): void; + verifyError: number; + } + export function getDiffieHellman(group_name: string): DiffieHellman; + export function pbkdf2(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; + export function pbkdf2Sync(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string): Buffer; + export function randomBytes(size: number): Buffer; + export function randomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; + export function pseudoRandomBytes(size: number): Buffer; + export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; + export function randomFillSync(buffer: Buffer | Uint8Array, offset?: number, size?: number): Buffer; + export function randomFill(buffer: Buffer, callback: (err: Error, buf: Buffer) => void): void; + export function randomFill(buffer: Uint8Array, callback: (err: Error, buf: Uint8Array) => void): void; + export function randomFill(buffer: Buffer, offset: number, callback: (err: Error, buf: Buffer) => void): void; + export function randomFill(buffer: Uint8Array, offset: number, callback: (err: Error, buf: Uint8Array) => void): void; + export function randomFill(buffer: Buffer, offset: number, size: number, callback: (err: Error, buf: Buffer) => void): void; + export function randomFill(buffer: Uint8Array, offset: number, size: number, callback: (err: Error, buf: Uint8Array) => void): void; + export interface RsaPublicKey { + key: string; + padding?: number; + } + export interface RsaPrivateKey { + key: string; + passphrase?: string; + padding?: number; + } + export function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer; + export function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer; + export function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer; + export function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer; + export function getCiphers(): string[]; + export function getCurves(): string[]; + export function getHashes(): string[]; + export interface ECDH { + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; + computeSecret(other_public_key: Buffer): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; + setPrivateKey(private_key: Buffer): void; + setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; + } + export function createECDH(curve_name: string): ECDH; + export function timingSafeEqual(a: Buffer, b: Buffer): boolean; + export var DEFAULT_ENCODING: string; +} + +declare module "stream" { + import * as events from "events"; + + class internal extends events.EventEmitter { + pipe(destination: T, options?: { end?: boolean; }): T; + } + + namespace internal { + export class Stream extends internal { } + + export interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?: (this: Readable, size?: number) => any; + destroy?: (error?: Error) => any; + } + + export class Readable extends Stream implements NodeJS.ReadableStream { + readable: boolean; + readonly readableHighWaterMark: number; + readonly readableLength: number; + constructor(opts?: ReadableOptions); + _read(size: number): void; + read(size?: number): any; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + unpipe(destination?: T): this; + unshift(chunk: any): void; + wrap(oldStream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: string): boolean; + _destroy(err: Error, callback: Function): void; + destroy(error?: Error): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. readable + * 5. error + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + + removeListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + } + + export interface WritableOptions { + highWaterMark?: number; + decodeStrings?: boolean; + objectMode?: boolean; + write?: (chunk: string | Buffer, encoding: string, callback: Function) => any; + writev?: (chunks: Array<{ chunk: string | Buffer, encoding: string }>, callback: Function) => any; + destroy?: (error?: Error) => any; + final?: (callback: (error?: Error) => void) => void; + } + + export class Writable extends Stream implements NodeJS.WritableStream { + writable: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + constructor(opts?: WritableOptions); + _write(chunk: any, encoding: string, callback: (err?: Error) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void; + _destroy(err: Error, callback: Function): void; + _final(callback: Function): void; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: Function): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + cork(): void; + uncork(): void; + destroy(error?: Error): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "drain", chunk: Buffer | string): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "unpipe", src: Readable): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: Readable) => void): this; + once(event: "unpipe", listener: (src: Readable) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: Readable) => void): this; + prependListener(event: "unpipe", listener: (src: Readable) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + + removeListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "pipe", listener: (src: Readable) => void): this; + removeListener(event: "unpipe", listener: (src: Readable) => void): this; + } + + export interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean; + readableObjectMode?: boolean; + writableObjectMode?: boolean; + } + + // Note: Duplex extends both Readable and Writable. + export class Duplex extends Readable implements Writable { + writable: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + constructor(opts?: DuplexOptions); + _write(chunk: any, encoding: string, callback: (err?: Error) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void; + _destroy(err: Error, callback: Function): void; + _final(callback: Function): void; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: Function): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + cork(): void; + uncork(): void; + } + + export interface TransformOptions extends DuplexOptions { + transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any; + flush?: (callback: Function) => any; + } + + export class Transform extends Duplex { + constructor(opts?: TransformOptions); + _transform(chunk: any, encoding: string, callback: Function): void; + destroy(error?: Error): void; + } + + export class PassThrough extends Transform { } + } + + export = internal; +} + +declare module "util" { + export interface InspectOptions extends NodeJS.InspectOptions { } + export function format(format: any, ...param: any[]): string; + export function debug(string: string): void; + export function error(...param: any[]): void; + export function puts(...param: any[]): void; + export function print(...param: any[]): void; + export function log(string: string): void; + export var inspect: { + (object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + (object: any, options: InspectOptions): string; + colors: { + [color: string]: [number, number] | undefined + } + styles: { + [style: string]: string | undefined + } + defaultOptions: InspectOptions; + custom: symbol; + }; + export function isArray(object: any): object is any[]; + export function isRegExp(object: any): object is RegExp; + export function isDate(object: any): object is Date; + export function isError(object: any): object is Error; + export function inherits(constructor: any, superConstructor: any): void; + export function debuglog(key: string): (msg: string, ...param: any[]) => void; + export function isBoolean(object: any): object is boolean; + export function isBuffer(object: any): object is Buffer; + export function isFunction(object: any): boolean; + export function isNull(object: any): object is null; + export function isNullOrUndefined(object: any): object is null | undefined; + export function isNumber(object: any): object is number; + export function isObject(object: any): boolean; + export function isPrimitive(object: any): boolean; + export function isString(object: any): object is string; + export function isSymbol(object: any): object is symbol; + export function isUndefined(object: any): object is undefined; + export function deprecate(fn: T, message: string): T; + + export interface CustomPromisify extends Function { + __promisify__: TCustom; + } + + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + + export function promisify(fn: CustomPromisify): TCustom; + export function promisify(fn: (callback: (err: Error, result: TResult) => void) => void): () => Promise; + export function promisify(fn: (callback: (err: Error) => void) => void): () => Promise; + export function promisify(fn: (arg1: T1, callback: (err: Error, result: TResult) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err: Error) => void) => void): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: Function): Function; + export namespace promisify { + const custom: symbol; + } +} + +declare module "assert" { + function internal(value: any, message?: string): void; + namespace internal { + export class AssertionError implements Error { + name: string; + message: string; + actual: any; + expected: any; + operator: string; + generatedMessage: boolean; + + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFunction?: Function + }); + } + + export function fail(message: string): void; + export function fail(actual: any, expected: any, message?: string, operator?: string): void; + export function ok(value: any, message?: string): void; + export function equal(actual: any, expected: any, message?: string): void; + export function notEqual(actual: any, expected: any, message?: string): void; + export function deepEqual(actual: any, expected: any, message?: string): void; + export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function strictEqual(actual: any, expected: any, message?: string): void; + export function notStrictEqual(actual: any, expected: any, message?: string): void; + export function deepStrictEqual(actual: any, expected: any, message?: string): void; + export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; + + export function throws(block: Function, message?: string): void; + export function throws(block: Function, error: Function, message?: string): void; + export function throws(block: Function, error: RegExp, message?: string): void; + export function throws(block: Function, error: (err: any) => boolean, message?: string): void; + + export function doesNotThrow(block: Function, message?: string): void; + export function doesNotThrow(block: Function, error: Function, message?: string): void; + export function doesNotThrow(block: Function, error: RegExp, message?: string): void; + export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void; + + export function ifError(value: any): void; + } + + export = internal; +} + +declare module "tty" { + import * as net from "net"; + + export function isatty(fd: number): boolean; + export class ReadStream extends net.Socket { + isRaw: boolean; + setRawMode(mode: boolean): void; + isTTY: boolean; + } + export class WriteStream extends net.Socket { + columns: number; + rows: number; + isTTY: boolean; + } +} + +declare module "domain" { + import * as events from "events"; + + export class Domain extends events.EventEmitter implements NodeJS.Domain { + run(fn: Function): void; + add(emitter: events.EventEmitter): void; + remove(emitter: events.EventEmitter): void; + bind(cb: (err: Error, data: any) => any): any; + intercept(cb: (data: any) => any): any; + members: any[]; + enter(): void; + exit(): void; + } + + export function create(): Domain; +} + +declare module "constants" { + export var E2BIG: number; + export var EACCES: number; + export var EADDRINUSE: number; + export var EADDRNOTAVAIL: number; + export var EAFNOSUPPORT: number; + export var EAGAIN: number; + export var EALREADY: number; + export var EBADF: number; + export var EBADMSG: number; + export var EBUSY: number; + export var ECANCELED: number; + export var ECHILD: number; + export var ECONNABORTED: number; + export var ECONNREFUSED: number; + export var ECONNRESET: number; + export var EDEADLK: number; + export var EDESTADDRREQ: number; + export var EDOM: number; + export var EEXIST: number; + export var EFAULT: number; + export var EFBIG: number; + export var EHOSTUNREACH: number; + export var EIDRM: number; + export var EILSEQ: number; + export var EINPROGRESS: number; + export var EINTR: number; + export var EINVAL: number; + export var EIO: number; + export var EISCONN: number; + export var EISDIR: number; + export var ELOOP: number; + export var EMFILE: number; + export var EMLINK: number; + export var EMSGSIZE: number; + export var ENAMETOOLONG: number; + export var ENETDOWN: number; + export var ENETRESET: number; + export var ENETUNREACH: number; + export var ENFILE: number; + export var ENOBUFS: number; + export var ENODATA: number; + export var ENODEV: number; + export var ENOENT: number; + export var ENOEXEC: number; + export var ENOLCK: number; + export var ENOLINK: number; + export var ENOMEM: number; + export var ENOMSG: number; + export var ENOPROTOOPT: number; + export var ENOSPC: number; + export var ENOSR: number; + export var ENOSTR: number; + export var ENOSYS: number; + export var ENOTCONN: number; + export var ENOTDIR: number; + export var ENOTEMPTY: number; + export var ENOTSOCK: number; + export var ENOTSUP: number; + export var ENOTTY: number; + export var ENXIO: number; + export var EOPNOTSUPP: number; + export var EOVERFLOW: number; + export var EPERM: number; + export var EPIPE: number; + export var EPROTO: number; + export var EPROTONOSUPPORT: number; + export var EPROTOTYPE: number; + export var ERANGE: number; + export var EROFS: number; + export var ESPIPE: number; + export var ESRCH: number; + export var ETIME: number; + export var ETIMEDOUT: number; + export var ETXTBSY: number; + export var EWOULDBLOCK: number; + export var EXDEV: number; + export var WSAEINTR: number; + export var WSAEBADF: number; + export var WSAEACCES: number; + export var WSAEFAULT: number; + export var WSAEINVAL: number; + export var WSAEMFILE: number; + export var WSAEWOULDBLOCK: number; + export var WSAEINPROGRESS: number; + export var WSAEALREADY: number; + export var WSAENOTSOCK: number; + export var WSAEDESTADDRREQ: number; + export var WSAEMSGSIZE: number; + export var WSAEPROTOTYPE: number; + export var WSAENOPROTOOPT: number; + export var WSAEPROTONOSUPPORT: number; + export var WSAESOCKTNOSUPPORT: number; + export var WSAEOPNOTSUPP: number; + export var WSAEPFNOSUPPORT: number; + export var WSAEAFNOSUPPORT: number; + export var WSAEADDRINUSE: number; + export var WSAEADDRNOTAVAIL: number; + export var WSAENETDOWN: number; + export var WSAENETUNREACH: number; + export var WSAENETRESET: number; + export var WSAECONNABORTED: number; + export var WSAECONNRESET: number; + export var WSAENOBUFS: number; + export var WSAEISCONN: number; + export var WSAENOTCONN: number; + export var WSAESHUTDOWN: number; + export var WSAETOOMANYREFS: number; + export var WSAETIMEDOUT: number; + export var WSAECONNREFUSED: number; + export var WSAELOOP: number; + export var WSAENAMETOOLONG: number; + export var WSAEHOSTDOWN: number; + export var WSAEHOSTUNREACH: number; + export var WSAENOTEMPTY: number; + export var WSAEPROCLIM: number; + export var WSAEUSERS: number; + export var WSAEDQUOT: number; + export var WSAESTALE: number; + export var WSAEREMOTE: number; + export var WSASYSNOTREADY: number; + export var WSAVERNOTSUPPORTED: number; + export var WSANOTINITIALISED: number; + export var WSAEDISCON: number; + export var WSAENOMORE: number; + export var WSAECANCELLED: number; + export var WSAEINVALIDPROCTABLE: number; + export var WSAEINVALIDPROVIDER: number; + export var WSAEPROVIDERFAILEDINIT: number; + export var WSASYSCALLFAILURE: number; + export var WSASERVICE_NOT_FOUND: number; + export var WSATYPE_NOT_FOUND: number; + export var WSA_E_NO_MORE: number; + export var WSA_E_CANCELLED: number; + export var WSAEREFUSED: number; + export var SIGHUP: number; + export var SIGINT: number; + export var SIGILL: number; + export var SIGABRT: number; + export var SIGFPE: number; + export var SIGKILL: number; + export var SIGSEGV: number; + export var SIGTERM: number; + export var SIGBREAK: number; + export var SIGWINCH: number; + export var SSL_OP_ALL: number; + export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + export var SSL_OP_CIPHER_SERVER_PREFERENCE: number; + export var SSL_OP_CISCO_ANYCONNECT: number; + export var SSL_OP_COOKIE_EXCHANGE: number; + export var SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + export var SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + export var SSL_OP_EPHEMERAL_RSA: number; + export var SSL_OP_LEGACY_SERVER_CONNECT: number; + export var SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + export var SSL_OP_MICROSOFT_SESS_ID_BUG: number; + export var SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + export var SSL_OP_NETSCAPE_CA_DN_BUG: number; + export var SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + export var SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + export var SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + export var SSL_OP_NO_COMPRESSION: number; + export var SSL_OP_NO_QUERY_MTU: number; + export var SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + export var SSL_OP_NO_SSLv2: number; + export var SSL_OP_NO_SSLv3: number; + export var SSL_OP_NO_TICKET: number; + export var SSL_OP_NO_TLSv1: number; + export var SSL_OP_NO_TLSv1_1: number; + export var SSL_OP_NO_TLSv1_2: number; + export var SSL_OP_PKCS1_CHECK_1: number; + export var SSL_OP_PKCS1_CHECK_2: number; + export var SSL_OP_SINGLE_DH_USE: number; + export var SSL_OP_SINGLE_ECDH_USE: number; + export var SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + export var SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + export var SSL_OP_TLS_BLOCK_PADDING_BUG: number; + export var SSL_OP_TLS_D5_BUG: number; + export var SSL_OP_TLS_ROLLBACK_BUG: number; + export var ENGINE_METHOD_DSA: number; + export var ENGINE_METHOD_DH: number; + export var ENGINE_METHOD_RAND: number; + export var ENGINE_METHOD_ECDH: number; + export var ENGINE_METHOD_ECDSA: number; + export var ENGINE_METHOD_CIPHERS: number; + export var ENGINE_METHOD_DIGESTS: number; + export var ENGINE_METHOD_STORE: number; + export var ENGINE_METHOD_PKEY_METHS: number; + export var ENGINE_METHOD_PKEY_ASN1_METHS: number; + export var ENGINE_METHOD_ALL: number; + export var ENGINE_METHOD_NONE: number; + export var DH_CHECK_P_NOT_SAFE_PRIME: number; + export var DH_CHECK_P_NOT_PRIME: number; + export var DH_UNABLE_TO_CHECK_GENERATOR: number; + export var DH_NOT_SUITABLE_GENERATOR: number; + export var NPN_ENABLED: number; + export var RSA_PKCS1_PADDING: number; + export var RSA_SSLV23_PADDING: number; + export var RSA_NO_PADDING: number; + export var RSA_PKCS1_OAEP_PADDING: number; + export var RSA_X931_PADDING: number; + export var RSA_PKCS1_PSS_PADDING: number; + export var POINT_CONVERSION_COMPRESSED: number; + export var POINT_CONVERSION_UNCOMPRESSED: number; + export var POINT_CONVERSION_HYBRID: number; + export var O_RDONLY: number; + export var O_WRONLY: number; + export var O_RDWR: number; + export var S_IFMT: number; + export var S_IFREG: number; + export var S_IFDIR: number; + export var S_IFCHR: number; + export var S_IFBLK: number; + export var S_IFIFO: number; + export var S_IFSOCK: number; + export var S_IRWXU: number; + export var S_IRUSR: number; + export var S_IWUSR: number; + export var S_IXUSR: number; + export var S_IRWXG: number; + export var S_IRGRP: number; + export var S_IWGRP: number; + export var S_IXGRP: number; + export var S_IRWXO: number; + export var S_IROTH: number; + export var S_IWOTH: number; + export var S_IXOTH: number; + export var S_IFLNK: number; + export var O_CREAT: number; + export var O_EXCL: number; + export var O_NOCTTY: number; + export var O_DIRECTORY: number; + export var O_NOATIME: number; + export var O_NOFOLLOW: number; + export var O_SYNC: number; + export var O_DSYNC: number; + export var O_SYMLINK: number; + export var O_DIRECT: number; + export var O_NONBLOCK: number; + export var O_TRUNC: number; + export var O_APPEND: number; + export var F_OK: number; + export var R_OK: number; + export var W_OK: number; + export var X_OK: number; + export var UV_UDP_REUSEADDR: number; + export var SIGQUIT: number; + export var SIGTRAP: number; + export var SIGIOT: number; + export var SIGBUS: number; + export var SIGUSR1: number; + export var SIGUSR2: number; + export var SIGPIPE: number; + export var SIGALRM: number; + export var SIGCHLD: number; + export var SIGSTKFLT: number; + export var SIGCONT: number; + export var SIGSTOP: number; + export var SIGTSTP: number; + export var SIGTTIN: number; + export var SIGTTOU: number; + export var SIGURG: number; + export var SIGXCPU: number; + export var SIGXFSZ: number; + export var SIGVTALRM: number; + export var SIGPROF: number; + export var SIGIO: number; + export var SIGPOLL: number; + export var SIGPWR: number; + export var SIGSYS: number; + export var SIGUNUSED: number; + export var defaultCoreCipherList: string; + export var defaultCipherList: string; + export var ENGINE_METHOD_RSA: number; + export var ALPN_ENABLED: number; +} + +declare module "module" { + export = NodeJS.Module; +} + +declare module "process" { + export = process; +} + +declare module "v8" { + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + } + + export function getHeapStatistics(): HeapInfo; + export function getHeapSpaceStatistics(): HeapSpaceInfo[]; + export function setFlagsFromString(flags: string): void; +} + +declare module "timers" { + export function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export namespace setTimeout { + export function __promisify__(ms: number): Promise; + export function __promisify__(ms: number, value: T): Promise; + } + export function clearTimeout(timeoutId: NodeJS.Timer): void; + export function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export function clearInterval(intervalId: NodeJS.Timer): void; + export function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; + export namespace setImmediate { + export function __promisify__(): Promise; + export function __promisify__(value: T): Promise; + } + export function clearImmediate(immediateId: any): void; +} + +declare module "console" { + export = console; +} + +/** + * Async Hooks module: https://nodejs.org/api/async_hooks.html + */ +declare module "async_hooks" { + /** + * Returns the asyncId of the current execution context. + */ + export function executionAsyncId(): number; + /// @deprecated - replaced by executionAsyncId() + export function currentId(): number; + + /** + * Returns the ID of the resource responsible for calling the callback that is currently being executed. + */ + export function triggerAsyncId(): number; + /// @deprecated - replaced by triggerAsyncId() + export function triggerId(): number; + + export interface HookCallbacks { + /** + * Called when a class is constructed that has the possibility to emit an asynchronous event. + * @param asyncId a unique ID for the async resource + * @param type the type of the async resource + * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created + * @param resource reference to the resource representing the async operation, needs to be released during destroy + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: Object): void; + + /** + * When an asynchronous operation is initiated or completes a callback is called to notify the user. + * The before callback is called just before said callback is executed. + * @param asyncId the unique identifier assigned to the resource about to execute the callback. + */ + before?(asyncId: number): void; + + /** + * Called immediately after the callback specified in before is completed. + * @param asyncId the unique identifier assigned to the resource which has executed the callback. + */ + after?(asyncId: number): void; + + /** + * Called when a promise has resolve() called. This may not be in the same execution id + * as the promise itself. + * @param asyncId the unique id for the promise that was resolve()d. + */ + promiseResolve?(asyncId: number): void; + + /** + * Called after the resource corresponding to asyncId is destroyed + * @param asyncId a unique ID for the async resource + */ + destroy?(asyncId: number): void; + } + + export interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + + /** + * Registers functions to be called for different lifetime events of each async operation. + * @param options the callbacks to register + * @return an AsyncHooks instance used for disabling and enabling hooks + */ + export function createHook(options: HookCallbacks): AsyncHook; + + /** + * The class AsyncResource was designed to be extended by the embedder's async resources. + * Using this users can easily trigger the lifetime events of their own resources. + */ + export class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type the name of this async resource type + * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created + */ + constructor(type: string, triggerAsyncId?: number) + + /** + * Call AsyncHooks before callbacks. + */ + emitBefore(): void; + + /** + * Call AsyncHooks after callbacks + */ + emitAfter(): void; + + /** + * Call AsyncHooks destroy callbacks. + */ + emitDestroy(): void; + + /** + * @return the unique ID assigned to this AsyncResource instance. + */ + asyncId(): number; + + /** + * @return the trigger ID for this AsyncResource instance. + */ + triggerAsyncId(): number; + } +} + +declare module "http2" { + import * as events from "events"; + import * as fs from "fs"; + import * as net from "net"; + import * as stream from "stream"; + import * as tls from "tls"; + import * as url from "url"; + + import { IncomingHttpHeaders, OutgoingHttpHeaders } from "http"; + export { IncomingHttpHeaders, OutgoingHttpHeaders } from "http"; + + // Http2Stream + + export interface StreamPriorityOptions { + exclusive?: boolean; + parent?: number; + weight?: number; + silent?: boolean; + } + + export interface StreamState { + localWindowSize?: number; + state?: number; + streamLocalClose?: number; + streamRemoteClose?: number; + sumDependencyWeight?: number; + weight?: number; + } + + export interface ServerStreamResponseOptions { + endStream?: boolean; + getTrailers?: (trailers: OutgoingHttpHeaders) => void; + } + + export interface StatOptions { + offset: number; + length: number; + } + + export interface ServerStreamFileResponseOptions { + statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void | boolean; + getTrailers?: (trailers: OutgoingHttpHeaders) => void; + offset?: number; + length?: number; + } + + export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?: (err: NodeJS.ErrnoException) => void; + } + + export interface Http2Stream extends stream.Duplex { + readonly aborted: boolean; + close(code: number, callback?: () => void): void; + readonly closed: boolean; + readonly destroyed: boolean; + readonly pending: boolean; + priority(options: StreamPriorityOptions): void; + readonly rstCode: number; + readonly session: Http2Session; + setTimeout(msecs: number, callback?: () => void): void; + readonly state: StreamState; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "aborted", listener: () => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: "streamClosed", listener: (code: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "aborted"): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "frameError", frameType: number, errorCode: number): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: "streamClosed", code: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "aborted", listener: () => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: "streamClosed", listener: (code: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "aborted", listener: () => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: "streamClosed", listener: (code: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "aborted", listener: () => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "streamClosed", listener: (code: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "aborted", listener: () => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + } + + export interface ClientHttp2Stream extends Http2Stream { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "headers", headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "response", headers: IncomingHttpHeaders, flags: number): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + } + + export interface ServerHttp2Stream extends Http2Stream { + additionalHeaders(headers: OutgoingHttpHeaders): void; + readonly headersSent: boolean; + readonly pushAllowed: boolean; + pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; + respondWithFD(fd: number, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void; + respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void; + } + + // Http2Session + + export interface Settings { + headerTableSize?: number; + enablePush?: boolean; + initialWindowSize?: number; + maxFrameSize?: number; + maxConcurrentStreams?: number; + maxHeaderListSize?: number; + } + + export interface ClientSessionRequestOptions { + endStream?: boolean; + exclusive?: boolean; + parent?: number; + weight?: number; + getTrailers?: (trailers: OutgoingHttpHeaders, flags: number) => void; + } + + export interface SessionState { + effectiveLocalWindowSize?: number; + effectiveRecvDataLength?: number; + nextStreamID?: number; + localWindowSize?: number; + lastProcStreamID?: number; + remoteWindowSize?: number; + outboundQueueSize?: number; + deflateDynamicTableSize?: number; + inflateDynamicTableSize?: number; + } + + export interface Http2Session extends events.EventEmitter { + readonly alpnProtocol?: string; + close(callback?: () => void): void; + readonly closed: boolean; + destroy(error?: Error, code?: number): void; + readonly destroyed: boolean; + readonly encrypted?: boolean; + goaway(code?: number, lastStreamID?: number, opaqueData?: Buffer | DataView /*| TypedArray*/): void; + readonly localSettings: Settings; + readonly originSet?: string[]; + readonly pendingSettingsAck: boolean; + ref(): void; + readonly remoteSettings: Settings; + rstStream(stream: Http2Stream, code?: number): void; + setTimeout(msecs: number, callback?: () => void): void; + readonly socket: net.Socket | tls.TLSSocket; + readonly state: SessionState; + priority(stream: Http2Stream, options: StreamPriorityOptions): void; + settings(settings: Settings): void; + readonly type: number; + unref(): void; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + addListener(event: "localSettings", listener: (settings: Settings) => void): this; + addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + addListener(event: "timeout", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; + emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; + emit(event: "localSettings", settings: Settings): boolean; + emit(event: "remoteSettings", settings: Settings): boolean; + emit(event: "timeout"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + on(event: "localSettings", listener: (settings: Settings) => void): this; + on(event: "remoteSettings", listener: (settings: Settings) => void): this; + on(event: "timeout", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + once(event: "localSettings", listener: (settings: Settings) => void): this; + once(event: "remoteSettings", listener: (settings: Settings) => void): this; + once(event: "timeout", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependListener(event: "timeout", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + + export interface ClientHttp2Session extends Http2Session { + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; + emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + } + + export interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + + export interface ServerHttp2Session extends Http2Session { + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + readonly server: Http2Server | Http2SecureServer; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + } + + // Http2Server + + export interface SessionOptions { + maxDeflateDynamicTableSize?: number; + maxReservedRemoteStreams?: number; + maxSendHeaderBlockLength?: number; + paddingStrategy?: number; + peerMaxConcurrentStreams?: number; + selectPadding?: (frameLen: number, maxFrameLen: number) => number; + settings?: Settings; + } + + export type ClientSessionOptions = SessionOptions; + export type ServerSessionOptions = SessionOptions; + + export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { } + export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { } + + export interface ServerOptions extends ServerSessionOptions { + allowHTTP1?: boolean; + } + + export interface SecureServerOptions extends SecureServerSessionOptions { + allowHTTP1?: boolean; + } + + export interface Http2Server extends net.Server { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "timeout", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "timeout", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + + export interface Http2SecureServer extends tls.Server { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + } + + export interface Http2ServerRequest extends stream.Readable { + headers: IncomingHttpHeaders; + httpVersion: string; + method: string; + rawHeaders: string[]; + rawTrailers: string[]; + setTimeout(msecs: number, callback?: () => void): void; + socket: net.Socket | tls.TLSSocket; + stream: ServerHttp2Stream; + trailers: IncomingHttpHeaders; + url: string; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "aborted", hadError: boolean, code: number): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + } + + export interface Http2ServerResponse extends events.EventEmitter { + addTrailers(trailers: OutgoingHttpHeaders): void; + connection: net.Socket | tls.TLSSocket; + end(callback?: () => void): void; + end(data?: string | Buffer, callback?: () => void): void; + end(data?: string | Buffer, encoding?: string, callback?: () => void): void; + readonly finished: boolean; + getHeader(name: string): string; + getHeaderNames(): string[]; + getHeaders(): OutgoingHttpHeaders; + hasHeader(name: string): boolean; + readonly headersSent: boolean; + removeHeader(name: string): void; + sendDate: boolean; + setHeader(name: string, value: number | string | string[]): void; + setTimeout(msecs: number, callback?: () => void): void; + socket: net.Socket | tls.TLSSocket; + statusCode: number; + statusMessage: ''; + stream: ServerHttp2Stream; + write(chunk: string | Buffer, callback?: (err: Error) => void): boolean; + write(chunk: string | Buffer, encoding?: string, callback?: (err: Error) => void): boolean; + writeContinue(): void; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void; + writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders): void; + createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "aborted", hadError: boolean, code: number): boolean; + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "finish"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "finish", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "finish", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + } + + // Public API + + export namespace constants { + export const NGHTTP2_SESSION_SERVER: number; + export const NGHTTP2_SESSION_CLIENT: number; + export const NGHTTP2_STREAM_STATE_IDLE: number; + export const NGHTTP2_STREAM_STATE_OPEN: number; + export const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + export const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + export const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + export const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + export const NGHTTP2_STREAM_STATE_CLOSED: number; + export const NGHTTP2_NO_ERROR: number; + export const NGHTTP2_PROTOCOL_ERROR: number; + export const NGHTTP2_INTERNAL_ERROR: number; + export const NGHTTP2_FLOW_CONTROL_ERROR: number; + export const NGHTTP2_SETTINGS_TIMEOUT: number; + export const NGHTTP2_STREAM_CLOSED: number; + export const NGHTTP2_FRAME_SIZE_ERROR: number; + export const NGHTTP2_REFUSED_STREAM: number; + export const NGHTTP2_CANCEL: number; + export const NGHTTP2_COMPRESSION_ERROR: number; + export const NGHTTP2_CONNECT_ERROR: number; + export const NGHTTP2_ENHANCE_YOUR_CALM: number; + export const NGHTTP2_INADEQUATE_SECURITY: number; + export const NGHTTP2_HTTP_1_1_REQUIRED: number; + export const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + export const NGHTTP2_FLAG_NONE: number; + export const NGHTTP2_FLAG_END_STREAM: number; + export const NGHTTP2_FLAG_END_HEADERS: number; + export const NGHTTP2_FLAG_ACK: number; + export const NGHTTP2_FLAG_PADDED: number; + export const NGHTTP2_FLAG_PRIORITY: number; + export const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + export const DEFAULT_SETTINGS_ENABLE_PUSH: number; + export const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + export const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + export const MAX_MAX_FRAME_SIZE: number; + export const MIN_MAX_FRAME_SIZE: number; + export const MAX_INITIAL_WINDOW_SIZE: number; + export const NGHTTP2_DEFAULT_WEIGHT: number; + export const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + export const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + export const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + export const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + export const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + export const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + export const PADDING_STRATEGY_NONE: number; + export const PADDING_STRATEGY_MAX: number; + export const PADDING_STRATEGY_CALLBACK: number; + export const HTTP2_HEADER_STATUS: string; + export const HTTP2_HEADER_METHOD: string; + export const HTTP2_HEADER_AUTHORITY: string; + export const HTTP2_HEADER_SCHEME: string; + export const HTTP2_HEADER_PATH: string; + export const HTTP2_HEADER_ACCEPT_CHARSET: string; + export const HTTP2_HEADER_ACCEPT_ENCODING: string; + export const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + export const HTTP2_HEADER_ACCEPT_RANGES: string; + export const HTTP2_HEADER_ACCEPT: string; + export const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + export const HTTP2_HEADER_AGE: string; + export const HTTP2_HEADER_ALLOW: string; + export const HTTP2_HEADER_AUTHORIZATION: string; + export const HTTP2_HEADER_CACHE_CONTROL: string; + export const HTTP2_HEADER_CONNECTION: string; + export const HTTP2_HEADER_CONTENT_DISPOSITION: string; + export const HTTP2_HEADER_CONTENT_ENCODING: string; + export const HTTP2_HEADER_CONTENT_LANGUAGE: string; + export const HTTP2_HEADER_CONTENT_LENGTH: string; + export const HTTP2_HEADER_CONTENT_LOCATION: string; + export const HTTP2_HEADER_CONTENT_MD5: string; + export const HTTP2_HEADER_CONTENT_RANGE: string; + export const HTTP2_HEADER_CONTENT_TYPE: string; + export const HTTP2_HEADER_COOKIE: string; + export const HTTP2_HEADER_DATE: string; + export const HTTP2_HEADER_ETAG: string; + export const HTTP2_HEADER_EXPECT: string; + export const HTTP2_HEADER_EXPIRES: string; + export const HTTP2_HEADER_FROM: string; + export const HTTP2_HEADER_HOST: string; + export const HTTP2_HEADER_IF_MATCH: string; + export const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + export const HTTP2_HEADER_IF_NONE_MATCH: string; + export const HTTP2_HEADER_IF_RANGE: string; + export const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + export const HTTP2_HEADER_LAST_MODIFIED: string; + export const HTTP2_HEADER_LINK: string; + export const HTTP2_HEADER_LOCATION: string; + export const HTTP2_HEADER_MAX_FORWARDS: string; + export const HTTP2_HEADER_PREFER: string; + export const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + export const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + export const HTTP2_HEADER_RANGE: string; + export const HTTP2_HEADER_REFERER: string; + export const HTTP2_HEADER_REFRESH: string; + export const HTTP2_HEADER_RETRY_AFTER: string; + export const HTTP2_HEADER_SERVER: string; + export const HTTP2_HEADER_SET_COOKIE: string; + export const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + export const HTTP2_HEADER_TRANSFER_ENCODING: string; + export const HTTP2_HEADER_TE: string; + export const HTTP2_HEADER_UPGRADE: string; + export const HTTP2_HEADER_USER_AGENT: string; + export const HTTP2_HEADER_VARY: string; + export const HTTP2_HEADER_VIA: string; + export const HTTP2_HEADER_WWW_AUTHENTICATE: string; + export const HTTP2_HEADER_HTTP2_SETTINGS: string; + export const HTTP2_HEADER_KEEP_ALIVE: string; + export const HTTP2_HEADER_PROXY_CONNECTION: string; + export const HTTP2_METHOD_ACL: string; + export const HTTP2_METHOD_BASELINE_CONTROL: string; + export const HTTP2_METHOD_BIND: string; + export const HTTP2_METHOD_CHECKIN: string; + export const HTTP2_METHOD_CHECKOUT: string; + export const HTTP2_METHOD_CONNECT: string; + export const HTTP2_METHOD_COPY: string; + export const HTTP2_METHOD_DELETE: string; + export const HTTP2_METHOD_GET: string; + export const HTTP2_METHOD_HEAD: string; + export const HTTP2_METHOD_LABEL: string; + export const HTTP2_METHOD_LINK: string; + export const HTTP2_METHOD_LOCK: string; + export const HTTP2_METHOD_MERGE: string; + export const HTTP2_METHOD_MKACTIVITY: string; + export const HTTP2_METHOD_MKCALENDAR: string; + export const HTTP2_METHOD_MKCOL: string; + export const HTTP2_METHOD_MKREDIRECTREF: string; + export const HTTP2_METHOD_MKWORKSPACE: string; + export const HTTP2_METHOD_MOVE: string; + export const HTTP2_METHOD_OPTIONS: string; + export const HTTP2_METHOD_ORDERPATCH: string; + export const HTTP2_METHOD_PATCH: string; + export const HTTP2_METHOD_POST: string; + export const HTTP2_METHOD_PRI: string; + export const HTTP2_METHOD_PROPFIND: string; + export const HTTP2_METHOD_PROPPATCH: string; + export const HTTP2_METHOD_PUT: string; + export const HTTP2_METHOD_REBIND: string; + export const HTTP2_METHOD_REPORT: string; + export const HTTP2_METHOD_SEARCH: string; + export const HTTP2_METHOD_TRACE: string; + export const HTTP2_METHOD_UNBIND: string; + export const HTTP2_METHOD_UNCHECKOUT: string; + export const HTTP2_METHOD_UNLINK: string; + export const HTTP2_METHOD_UNLOCK: string; + export const HTTP2_METHOD_UPDATE: string; + export const HTTP2_METHOD_UPDATEREDIRECTREF: string; + export const HTTP2_METHOD_VERSION_CONTROL: string; + export const HTTP_STATUS_CONTINUE: number; + export const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + export const HTTP_STATUS_PROCESSING: number; + export const HTTP_STATUS_OK: number; + export const HTTP_STATUS_CREATED: number; + export const HTTP_STATUS_ACCEPTED: number; + export const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + export const HTTP_STATUS_NO_CONTENT: number; + export const HTTP_STATUS_RESET_CONTENT: number; + export const HTTP_STATUS_PARTIAL_CONTENT: number; + export const HTTP_STATUS_MULTI_STATUS: number; + export const HTTP_STATUS_ALREADY_REPORTED: number; + export const HTTP_STATUS_IM_USED: number; + export const HTTP_STATUS_MULTIPLE_CHOICES: number; + export const HTTP_STATUS_MOVED_PERMANENTLY: number; + export const HTTP_STATUS_FOUND: number; + export const HTTP_STATUS_SEE_OTHER: number; + export const HTTP_STATUS_NOT_MODIFIED: number; + export const HTTP_STATUS_USE_PROXY: number; + export const HTTP_STATUS_TEMPORARY_REDIRECT: number; + export const HTTP_STATUS_PERMANENT_REDIRECT: number; + export const HTTP_STATUS_BAD_REQUEST: number; + export const HTTP_STATUS_UNAUTHORIZED: number; + export const HTTP_STATUS_PAYMENT_REQUIRED: number; + export const HTTP_STATUS_FORBIDDEN: number; + export const HTTP_STATUS_NOT_FOUND: number; + export const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + export const HTTP_STATUS_NOT_ACCEPTABLE: number; + export const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + export const HTTP_STATUS_REQUEST_TIMEOUT: number; + export const HTTP_STATUS_CONFLICT: number; + export const HTTP_STATUS_GONE: number; + export const HTTP_STATUS_LENGTH_REQUIRED: number; + export const HTTP_STATUS_PRECONDITION_FAILED: number; + export const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + export const HTTP_STATUS_URI_TOO_LONG: number; + export const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + export const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + export const HTTP_STATUS_EXPECTATION_FAILED: number; + export const HTTP_STATUS_TEAPOT: number; + export const HTTP_STATUS_MISDIRECTED_REQUEST: number; + export const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + export const HTTP_STATUS_LOCKED: number; + export const HTTP_STATUS_FAILED_DEPENDENCY: number; + export const HTTP_STATUS_UNORDERED_COLLECTION: number; + export const HTTP_STATUS_UPGRADE_REQUIRED: number; + export const HTTP_STATUS_PRECONDITION_REQUIRED: number; + export const HTTP_STATUS_TOO_MANY_REQUESTS: number; + export const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + export const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + export const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + export const HTTP_STATUS_NOT_IMPLEMENTED: number; + export const HTTP_STATUS_BAD_GATEWAY: number; + export const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + export const HTTP_STATUS_GATEWAY_TIMEOUT: number; + export const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + export const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + export const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + export const HTTP_STATUS_LOOP_DETECTED: number; + export const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + export const HTTP_STATUS_NOT_EXTENDED: number; + export const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + + export function getDefaultSettings(): Settings; + export function getPackedSettings(settings: Settings): Settings; + export function getUnpackedSettings(buf: Buffer | Uint8Array): Settings; + + export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + + export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + + export function connect(authority: string | url.URL, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; + export function connect(authority: string | url.URL, options?: ClientSessionOptions | SecureClientSessionOptions, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; +} + +declare module "perf_hooks" { + export interface PerformanceEntry { + /** + * The total number of milliseconds elapsed for this entry. + * This value will not be meaningful for all Performance Entry types. + */ + readonly duration: number; + + /** + * The name of the performance entry. + */ + readonly name: string; + + /** + * The high resolution millisecond timestamp marking the starting time of the Performance Entry. + */ + readonly startTime: number; + + /** + * The type of the performance entry. + * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'. + */ + readonly entryType: string; + + /** + * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies + * the type of garbage collection operation that occurred. + * The value may be one of perf_hooks.constants. + */ + readonly kind?: number; + } + + export interface PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process completed bootstrap. + */ + readonly bootstrapComplete: number; + + /** + * The high resolution millisecond timestamp at which cluster processing ended. + */ + readonly clusterSetupEnd: number; + + /** + * The high resolution millisecond timestamp at which cluster processing started. + */ + readonly clusterSetupStart: number; + + /** + * The high resolution millisecond timestamp at which the Node.js event loop exited. + */ + readonly loopExit: number; + + /** + * The high resolution millisecond timestamp at which the Node.js event loop started. + */ + readonly loopStart: number; + + /** + * The high resolution millisecond timestamp at which main module load ended. + */ + readonly moduleLoadEnd: number; + + /** + * The high resolution millisecond timestamp at which main module load started. + */ + readonly moduleLoadStart: number; + + /** + * The high resolution millisecond timestamp at which the Node.js process was initialized. + */ + readonly nodeStart: number; + + /** + * The high resolution millisecond timestamp at which preload module load ended. + */ + readonly preloadModuleLoadEnd: number; + + /** + * The high resolution millisecond timestamp at which preload module load started. + */ + readonly preloadModuleLoadStart: number; + + /** + * The high resolution millisecond timestamp at which third_party_main processing ended. + */ + readonly thirdPartyMainEnd: number; + + /** + * The high resolution millisecond timestamp at which third_party_main processing started. + */ + readonly thirdPartyMainStart: number; + + /** + * The high resolution millisecond timestamp at which the V8 platform was initialized. + */ + readonly v8Start: number; + } + + export interface Performance { + /** + * If name is not provided, removes all PerformanceFunction objects from the Performance Timeline. + * If name is provided, removes entries with name. + * @param name + */ + clearFunctions(name?: string): void; + + /** + * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. + * If name is provided, removes only the named mark. + * @param name + */ + clearMarks(name?: string): void; + + /** + * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline. + * If name is provided, removes only objects whose performanceEntry.name matches name. + */ + clearMeasures(name?: string): void; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + * @return list of all PerformanceEntry objects + */ + getEntries(): PerformanceEntry[]; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + * @param name + * @param type + * @return list of all PerformanceEntry objects + */ + getEntriesByName(name: string, type?: string): PerformanceEntry[]; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.entryType is equal to type. + * @param type + * @return list of all PerformanceEntry objects + */ + getEntriesByType(type: string): PerformanceEntry[]; + + /** + * Creates a new PerformanceMark entry in the Performance Timeline. + * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', + * and whose performanceEntry.duration is always 0. + * Performance marks are used to mark specific significant moments in the Performance Timeline. + * @param name + */ + mark(name?: string): void; + + /** + * Creates a new PerformanceMeasure entry in the Performance Timeline. + * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', + * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. + * + * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify + * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, + * then startMark is set to timeOrigin by default. + * + * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp + * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. + * @param name + * @param startMark + * @param endMark + */ + measure(name: string, startMark: string, endMark: string): void; + + /** + * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. + */ + readonly nodeTiming: PerformanceNodeTiming; + + /** + * @return the current high resolution millisecond timestamp + */ + now(): number; + + /** + * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. + */ + readonly timeOrigin: number; + + /** + * Wraps a function within a new function that measures the running time of the wrapped function. + * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. + * @param fn + */ + timerify any>(fn: T): T; + } + + export interface PerformanceObserverEntryList { + /** + * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + */ + getEntries(): PerformanceEntry[]; + + /** + * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + */ + getEntriesByName(name: string, type?: string): PerformanceEntry[]; + + /** + * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.entryType is equal to type. + */ + getEntriesByType(type: string): PerformanceEntry[]; + } + + export type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; + + export class PerformanceObserver { + constructor(callback: PerformanceObserverCallback); + + /** + * Disconnects the PerformanceObserver instance from all notifications. + */ + disconnect(): void; + + /** + * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes. + * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance. + * Property buffered defaults to false. + * @param options + */ + observe(options: { entryTypes: string[], buffered?: boolean }): void; + } + + export namespace constants { + export const NODE_PERFORMANCE_GC_MAJOR: number; + export const NODE_PERFORMANCE_GC_MINOR: number; + export const NODE_PERFORMANCE_GC_INCREMENTAL: number; + export const NODE_PERFORMANCE_GC_WEAKCB: number; + } + + const performance: Performance; +} diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts new file mode 100644 index 0000000..955239b --- /dev/null +++ b/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,2488 @@ +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module "inspector" { + import { EventEmitter } from 'events'; + + export interface InspectorNotification { + method: string; + params: T; + } + + export namespace Schema { + /** + * Description of the protocol domain. + */ + export interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + + export interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Schema.Domain[]; + } + } + + export namespace Runtime { + /** + * Unique script identifier. + */ + export type ScriptId = string; + + /** + * Unique object identifier. + */ + export type RemoteObjectId = string; + + /** + * Primitive value which cannot be JSON-stringified. + */ + export type UnserializableValue = string; + + /** + * Mirror object referencing original JavaScript object. + */ + export interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: Runtime.UnserializableValue; + /** + * String representation of the object. + */ + description?: string; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: Runtime.RemoteObjectId; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: Runtime.ObjectPreview; + /** + * @experimental + */ + customPreview?: Runtime.CustomPreview; + } + + /** + * @experimental + */ + export interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: Runtime.RemoteObjectId; + bindRemoteObjectFunctionId: Runtime.RemoteObjectId; + configObjectId?: Runtime.RemoteObjectId; + } + + /** + * Object containing abbreviated remote object value. + * @experimental + */ + export interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + /** + * String representation of the object. + */ + description?: string; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: Runtime.PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: Runtime.EntryPreview[]; + } + + /** + * @experimental + */ + export interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string; + /** + * Nested value preview. + */ + valuePreview?: Runtime.ObjectPreview; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + } + + /** + * @experimental + */ + export interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: Runtime.ObjectPreview; + /** + * Preview of the value. + */ + value: Runtime.ObjectPreview; + } + + /** + * Object property descriptor. + */ + export interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: Runtime.RemoteObject; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: Runtime.RemoteObject; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: Runtime.RemoteObject; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: Runtime.RemoteObject; + } + + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + export interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: Runtime.RemoteObject; + } + + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + export interface CallArgument { + /** + * Primitive value. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: Runtime.UnserializableValue; + /** + * Remote object handle. + */ + objectId?: Runtime.RemoteObjectId; + } + + /** + * Id of an execution context. + */ + export type ExecutionContextId = number; + + /** + * Description of an isolated world. + */ + export interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: Runtime.ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: {}; + } + + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + export interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: Runtime.ScriptId; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string; + /** + * JavaScript stack trace if available. + */ + stackTrace?: Runtime.StackTrace; + /** + * Exception object if available. + */ + exception?: Runtime.RemoteObject; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: Runtime.ExecutionContextId; + } + + /** + * Number of milliseconds since epoch. + */ + export type Timestamp = number; + + /** + * Stack entry for runtime errors and assertions. + */ + export interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + + /** + * Call frames for assertions or error messages. + */ + export interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string; + /** + * JavaScript function name. + */ + callFrames: Runtime.CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: Runtime.StackTrace; + /** + * Creation frame of the Promise which produced the next synchronous trace when resolved, if available. + * @experimental + */ + promiseCreationFrame?: Runtime.CallFrame; + } + + export interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: Runtime.ExecutionContextId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + * @experimental + */ + userGesture?: boolean; + /** + * Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: Runtime.RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + } + + export interface CallFunctionOnParameterType { + /** + * Identifier of the object to call function on. + */ + objectId: Runtime.RemoteObjectId; + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: Runtime.CallArgument[]; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + * @experimental + */ + userGesture?: boolean; + /** + * Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: Runtime.RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean; + } + + export interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: Runtime.RemoteObjectId; + } + + export interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + + export interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + + export interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: Runtime.ExecutionContextId; + } + + export interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: Runtime.ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: Runtime.ExecutionContextId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + /** + * Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: Runtime.RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: Runtime.PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: Runtime.InternalPropertyDescriptor[]; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: Runtime.ScriptId; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface RunScriptReturnType { + /** + * Run result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: Runtime.ExecutionContextDescription; + } + + export interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: Runtime.ExecutionContextId; + } + + export interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Runtime.Timestamp; + exceptionDetails: Runtime.ExceptionDetails; + } + + export interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionUnhandled. + */ + exceptionId: number; + } + + export interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: Runtime.RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Runtime.Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: Runtime.StackTrace; + /** + * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. + * @experimental + */ + context?: string; + } + + export interface InspectRequestedEventDataType { + object: Runtime.RemoteObject; + hints: {}; + } + } + + export namespace Debugger { + /** + * Breakpoint identifier. + */ + export type BreakpointId = string; + + /** + * Call frame identifier. + */ + export type CallFrameId = string; + + /** + * Location in the source code. + */ + export interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + } + + /** + * Location in the source code. + * @experimental + */ + export interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + export interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: Debugger.CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + * @experimental + */ + functionLocation?: Debugger.Location; + /** + * Location in the source code. + */ + location: Debugger.Location; + /** + * Scope chain for this call frame. + */ + scopeChain: Debugger.Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject; + } + + /** + * Scope description. + */ + export interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string; + /** + * Location in the source code where scope starts + */ + startLocation?: Debugger.Location; + /** + * Location in the source code where scope ends + */ + endLocation?: Debugger.Location; + } + + /** + * Search match for resource. + * @experimental + */ + export interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + + /** + * @experimental + */ + export interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + type?: string; + } + + export interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + + export interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + + export interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + export interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Debugger.Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + export interface RemoveBreakpointParameterType { + breakpointId: Debugger.BreakpointId; + } + + export interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Debugger.Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Debugger.Location; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean; + } + + export interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Debugger.Location; + /** + * @experimental + */ + targetCallFrames?: string; + } + + export interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean; + } + + export interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean; + } + + export interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: Debugger.CallFrameId; + } + + export interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + + export interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + + export interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: Debugger.CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + * @experimental + */ + throwOnSideEffect?: boolean; + } + + export interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: Debugger.CallFrameId; + } + + export interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + + export interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + + export interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: Debugger.ScriptPosition[]; + } + + export interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: Debugger.BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Debugger.Location[]; + } + + export interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: Debugger.BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Debugger.Location; + } + + export interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: Debugger.BreakLocation[]; + } + + export interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: Debugger.SearchMatch[]; + } + + export interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: Debugger.CallFrame[]; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: Debugger.CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + } + + export interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + + export interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + * @experimental + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + * @experimental + */ + isModule?: boolean; + /** + * This script length. + * @experimental + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + export interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + * @experimental + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + * @experimental + */ + isModule?: boolean; + /** + * This script length. + * @experimental + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + export interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: Debugger.BreakpointId; + /** + * Actual breakpoint location. + */ + location: Debugger.Location; + } + + export interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: Debugger.CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: {}; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + } + } + + export namespace Console { + /** + * Console message. + */ + export interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number; + } + + export interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: Console.ConsoleMessage; + } + } + + export namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + export interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + * @experimental + */ + hitCount?: number; + /** + * Child node ids. + */ + children?: number[]; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string; + /** + * An array of source position ticks. + * @experimental + */ + positionTicks?: Profiler.PositionTickInfo[]; + } + + /** + * Profile. + */ + export interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: Profiler.ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[]; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[]; + } + + /** + * Specifies a number of samples attributed to a certain source position. + * @experimental + */ + export interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + + /** + * Coverage data for a source range. + * @experimental + */ + export interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + + /** + * Coverage data for a JavaScript function. + * @experimental + */ + export interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: Profiler.CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + + /** + * Coverage data for a JavaScript script. + * @experimental + */ + export interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: Profiler.FunctionCoverage[]; + } + + export interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + + export interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean; + } + + export interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profiler.Profile; + } + + export interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: Profiler.ScriptCoverage[]; + } + + export interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: Profiler.ScriptCoverage[]; + } + + export interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + + export interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profiler.Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + } + + export namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + export type HeapSnapshotObjectId = string; + + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + export interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: HeapProfiler.SamplingHeapProfileNode[]; + } + + /** + * Profile. + */ + export interface SamplingHeapProfile { + head: HeapProfiler.SamplingHeapProfileNode; + } + + export interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean; + } + + export interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean; + } + + export interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean; + } + + export interface GetObjectByHeapObjectIdParameterType { + objectId: HeapProfiler.HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + } + + export interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapProfiler.HeapSnapshotObjectId; + } + + export interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + + export interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number; + } + + export interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + + export interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapProfiler.HeapSnapshotObjectId; + } + + export interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: HeapProfiler.SamplingHeapProfile; + } + + export interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + + export interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean; + } + + export interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + + export interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + + /** + * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. + */ + export class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + + /** + * Connects a session to the inspector back-end. An exception will be thrown if there is already a connected session established either through the API or by a front-end connected to the Inspector WebSocket port. + */ + connect(): void; + + /** + * Immediately close the session. All pending message callbacks will be called with an error. session.connect() will need to be called to be able to send messages again. Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + + /** + * Posts a message to the inspector back-end. callback will be notified when a response is received. callback is a function that accepts two optional arguments - error and message-specific result. + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; + + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + * @experimental + */ + post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType, callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + + /** + * Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + + /** + * Searches for given string in script content. + * @experimental + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + * @experimental + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + * @experimental + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + * @experimental + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + * @experimental + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + + // Events + + addListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + } + + // Top Level API + + /** + * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started. + * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. + * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Optional, defaults to false. + */ + export function open(port?: number, host?: string, wait?: boolean): void; + + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + export function close(): void; + + /** + * Return the URL of the active inspector, or undefined if there is none. + */ + export function url(): string; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json new file mode 100644 index 0000000..a070177 --- /dev/null +++ b/node_modules/@types/node/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + "@types/node@9.4.6", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "@types/node@9.4.6", + "_id": "@types/node@9.4.6", + "_inBundle": false, + "_integrity": "sha512-CTUtLb6WqCCgp6P59QintjHWqzf4VL1uPA27bipLAPxFqrtK1gEYllePzTICGqQ8rYsCbpnsNypXjjDzGAAjEQ==", + "_location": "/@types/node", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/node@9.4.6", + "name": "@types/node", + "escapedName": "@types%2fnode", + "scope": "@types", + "rawSpec": "9.4.6", + "saveSpec": null, + "fetchSpec": "9.4.6" + }, + "_requiredBy": [ + "/wkx" + ], + "_resolved": "https://registry.npmjs.org/@types/node/-/node-9.4.6.tgz", + "_spec": "9.4.6", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "contributors": [ + { + "name": "Microsoft TypeScript", + "url": "http://typescriptlang.org" + }, + { + "name": "DefinitelyTyped", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped" + }, + { + "name": "Parambir Singh", + "url": "https://github.com/parambirs" + }, + { + "name": "Christian Vaagland Tellnes", + "url": "https://github.com/tellnes" + }, + { + "name": "Wilco Bakker", + "url": "https://github.com/WilcoBakker" + }, + { + "name": "Nicolas Voigt", + "url": "https://github.com/octo-sniffle" + }, + { + "name": "Chigozirim C.", + "url": "https://github.com/smac89" + }, + { + "name": "Flarna", + "url": "https://github.com/Flarna" + }, + { + "name": "Mariusz Wiktorczyk", + "url": "https://github.com/mwiktorczyk" + }, + { + "name": "wwwy3y3", + "url": "https://github.com/wwwy3y3" + }, + { + "name": "Deividas Bakanas", + "url": "https://github.com/DeividasBakanas" + }, + { + "name": "Kelvin Jin", + "url": "https://github.com/kjin" + }, + { + "name": "Alvis HT Tang", + "url": "https://github.com/alvis" + }, + { + "name": "Oliver Joseph Ash", + "url": "https://github.com/OliverJAsh" + }, + { + "name": "Sebastian Silbermann", + "url": "https://github.com/eps1lon" + }, + { + "name": "Hannes Magnusson", + "url": "https://github.com/Hannes-Magnusson-CK" + }, + { + "name": "Alberto Schiabel", + "url": "https://github.com/jkomyno" + }, + { + "name": "Klaus Meinhardt", + "url": "https://github.com/ajafff" + }, + { + "name": "Huw", + "url": "https://github.com/hoo29" + } + ], + "dependencies": {}, + "description": "TypeScript definitions for Node.js", + "license": "MIT", + "main": "", + "name": "@types/node", + "repository": { + "type": "git", + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "typeScriptVersion": "2.0", + "typesPublisherContentHash": "5cc4c278e6d9971113c335d856a33737f6e4892344bf18fd3cf5c39bb3917d4b", + "version": "9.4.6" +} diff --git a/node_modules/abbrev/LICENSE b/node_modules/abbrev/LICENSE new file mode 100644 index 0000000..9bcfa9d --- /dev/null +++ b/node_modules/abbrev/LICENSE @@ -0,0 +1,46 @@ +This software is dual-licensed under the ISC and MIT licenses. +You may use this software under EITHER of the following licenses. + +---------- + +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. + +---------- + +Copyright Isaac Z. Schlueter and 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/node_modules/abbrev/README.md b/node_modules/abbrev/README.md new file mode 100644 index 0000000..99746fe --- /dev/null +++ b/node_modules/abbrev/README.md @@ -0,0 +1,23 @@ +# abbrev-js + +Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). + +Usage: + + var abbrev = require("abbrev"); + abbrev("foo", "fool", "folding", "flop"); + + // returns: + { fl: 'flop' + , flo: 'flop' + , flop: 'flop' + , fol: 'folding' + , fold: 'folding' + , foldi: 'folding' + , foldin: 'folding' + , folding: 'folding' + , foo: 'foo' + , fool: 'fool' + } + +This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/node_modules/abbrev/abbrev.js b/node_modules/abbrev/abbrev.js new file mode 100644 index 0000000..7b1dc5d --- /dev/null +++ b/node_modules/abbrev/abbrev.js @@ -0,0 +1,61 @@ +module.exports = exports = abbrev.abbrev = abbrev + +abbrev.monkeyPatch = monkeyPatch + +function monkeyPatch () { + Object.defineProperty(Array.prototype, 'abbrev', { + value: function () { return abbrev(this) }, + enumerable: false, configurable: true, writable: true + }) + + Object.defineProperty(Object.prototype, 'abbrev', { + value: function () { return abbrev(Object.keys(this)) }, + enumerable: false, configurable: true, writable: true + }) +} + +function abbrev (list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0) + } + for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { + args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) + } + + // sort them lexicographically, so that they're next to their nearest kin + args = args.sort(lexSort) + + // walk through each, seeing how much it has in common with the next and previous + var abbrevs = {} + , prev = "" + for (var i = 0, l = args.length ; i < l ; i ++) { + var current = args[i] + , next = args[i + 1] || "" + , nextMatches = true + , prevMatches = true + if (current === next) continue + for (var j = 0, cl = current.length ; j < cl ; j ++) { + var curChar = current.charAt(j) + nextMatches = nextMatches && curChar === next.charAt(j) + prevMatches = prevMatches && curChar === prev.charAt(j) + if (!nextMatches && !prevMatches) { + j ++ + break + } + } + prev = current + if (j === cl) { + abbrevs[current] = current + continue + } + for (var a = current.substr(0, j) ; j <= cl ; j ++) { + abbrevs[a] = current + a += current.charAt(j) + } + } + return abbrevs +} + +function lexSort (a, b) { + return a === b ? 0 : a > b ? 1 : -1 +} diff --git a/node_modules/abbrev/package.json b/node_modules/abbrev/package.json new file mode 100644 index 0000000..7bf063e --- /dev/null +++ b/node_modules/abbrev/package.json @@ -0,0 +1,56 @@ +{ + "_from": "abbrev@1", + "_id": "abbrev@1.1.1", + "_inBundle": false, + "_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "_location": "/abbrev", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "abbrev@1", + "name": "abbrev", + "escapedName": "abbrev", + "rawSpec": "1", + "saveSpec": null, + "fetchSpec": "1" + }, + "_requiredBy": [ + "/nopt" + ], + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8", + "_spec": "abbrev@1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/nopt", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^10.1" + }, + "files": [ + "abbrev.js" + ], + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "license": "ISC", + "main": "abbrev.js", + "name": "abbrev", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test.js --100" + }, + "version": "1.1.1" +} diff --git a/node_modules/accepts/HISTORY.md b/node_modules/accepts/HISTORY.md new file mode 100644 index 0000000..aaf5281 --- /dev/null +++ b/node_modules/accepts/HISTORY.md @@ -0,0 +1,218 @@ +1.3.4 / 2017-08-22 +================== + + * deps: mime-types@~2.1.16 + - deps: mime-db@~1.29.0 + +1.3.3 / 2016-05-02 +================== + + * deps: mime-types@~2.1.11 + - deps: mime-db@~1.23.0 + * deps: negotiator@0.6.1 + - perf: improve `Accept` parsing speed + - perf: improve `Accept-Charset` parsing speed + - perf: improve `Accept-Encoding` parsing speed + - perf: improve `Accept-Language` parsing speed + +1.3.2 / 2016-03-08 +================== + + * deps: mime-types@~2.1.10 + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + - deps: mime-db@~1.22.0 + +1.3.1 / 2016-01-19 +================== + + * deps: mime-types@~2.1.9 + - deps: mime-db@~1.21.0 + +1.3.0 / 2015-09-29 +================== + + * deps: mime-types@~2.1.7 + - deps: mime-db@~1.19.0 + * deps: negotiator@0.6.0 + - Fix including type extensions in parameters in `Accept` parsing + - Fix parsing `Accept` parameters with quoted equals + - Fix parsing `Accept` parameters with quoted semicolons + - Lazy-load modules from main entry point + - perf: delay type concatenation until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove closures getting spec properties + - perf: remove a closure from media type parsing + - perf: remove property delete from media type parsing + +1.2.13 / 2015-09-06 +=================== + + * deps: mime-types@~2.1.6 + - deps: mime-db@~1.18.0 + +1.2.12 / 2015-07-30 +=================== + + * deps: mime-types@~2.1.4 + - deps: mime-db@~1.16.0 + +1.2.11 / 2015-07-16 +=================== + + * deps: mime-types@~2.1.3 + - deps: mime-db@~1.15.0 + +1.2.10 / 2015-07-01 +=================== + + * deps: mime-types@~2.1.2 + - deps: mime-db@~1.14.0 + +1.2.9 / 2015-06-08 +================== + + * deps: mime-types@~2.1.1 + - perf: fix deopt during mapping + +1.2.8 / 2015-06-07 +================== + + * deps: mime-types@~2.1.0 + - deps: mime-db@~1.13.0 + * perf: avoid argument reassignment & argument slice + * perf: avoid negotiator recursive construction + * perf: enable strict mode + * perf: remove unnecessary bitwise operator + +1.2.7 / 2015-05-10 +================== + + * deps: negotiator@0.5.3 + - Fix media type parameter matching to be case-insensitive + +1.2.6 / 2015-05-07 +================== + + * deps: mime-types@~2.0.11 + - deps: mime-db@~1.9.1 + * deps: negotiator@0.5.2 + - Fix comparing media types with quoted values + - Fix splitting media types with quoted commas + +1.2.5 / 2015-03-13 +================== + + * deps: mime-types@~2.0.10 + - deps: mime-db@~1.8.0 + +1.2.4 / 2015-02-14 +================== + + * Support Node.js 0.6 + * deps: mime-types@~2.0.9 + - deps: mime-db@~1.7.0 + * deps: negotiator@0.5.1 + - Fix preference sorting to be stable for long acceptable lists + +1.2.3 / 2015-01-31 +================== + + * deps: mime-types@~2.0.8 + - deps: mime-db@~1.6.0 + +1.2.2 / 2014-12-30 +================== + + * deps: mime-types@~2.0.7 + - deps: mime-db@~1.5.0 + +1.2.1 / 2014-12-30 +================== + + * deps: mime-types@~2.0.5 + - deps: mime-db@~1.3.1 + +1.2.0 / 2014-12-19 +================== + + * deps: negotiator@0.5.0 + - Fix list return order when large accepted list + - Fix missing identity encoding when q=0 exists + - Remove dynamic building of Negotiator class + +1.1.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - deps: mime-db@~1.3.0 + +1.1.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - deps: mime-db@~1.2.0 + +1.1.2 / 2014-10-14 +================== + + * deps: negotiator@0.4.9 + - Fix error when media type has invalid parameter + +1.1.1 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + * deps: negotiator@0.4.8 + - Fix all negotiations to be case-insensitive + - Stable sort preferences of same quality according to client order + +1.1.0 / 2014-09-02 +================== + + * update `mime-types` + +1.0.7 / 2014-07-04 +================== + + * Fix wrong type returned from `type` when match after unknown extension + +1.0.6 / 2014-06-24 +================== + + * deps: negotiator@0.4.7 + +1.0.5 / 2014-06-20 +================== + + * fix crash when unknown extension given + +1.0.4 / 2014-06-19 +================== + + * use `mime-types` + +1.0.3 / 2014-06-11 +================== + + * deps: negotiator@0.4.6 + - Order by specificity when quality is the same + +1.0.2 / 2014-05-29 +================== + + * Fix interpretation when header not in request + * deps: pin negotiator@0.4.5 + +1.0.1 / 2014-01-18 +================== + + * Identity encoding isn't always acceptable + * deps: negotiator@~0.4.0 + +1.0.0 / 2013-12-27 +================== + + * Genesis diff --git a/node_modules/accepts/LICENSE b/node_modules/accepts/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/node_modules/accepts/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +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/node_modules/accepts/README.md b/node_modules/accepts/README.md new file mode 100644 index 0000000..6a2749a --- /dev/null +++ b/node_modules/accepts/README.md @@ -0,0 +1,143 @@ +# accepts + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). +Extracted from [koa](https://www.npmjs.com/package/koa) for general use. + +In addition to negotiator, it allows: + +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` + as well as `('text/html', 'application/json')`. +- Allows type shorthands such as `json`. +- Returns `false` when no types match +- Treats non-existent headers as `*` + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install accepts +``` + +## API + + + +```js +var accepts = require('accepts') +``` + +### accepts(req) + +Create a new `Accepts` object for the given `req`. + +#### .charset(charsets) + +Return the first accepted charset. If nothing in `charsets` is accepted, +then `false` is returned. + +#### .charsets() + +Return the charsets that the request accepts, in the order of the client's +preference (most preferred first). + +#### .encoding(encodings) + +Return the first accepted encoding. If nothing in `encodings` is accepted, +then `false` is returned. + +#### .encodings() + +Return the encodings that the request accepts, in the order of the client's +preference (most preferred first). + +#### .language(languages) + +Return the first accepted language. If nothing in `languages` is accepted, +then `false` is returned. + +#### .languages() + +Return the languages that the request accepts, in the order of the client's +preference (most preferred first). + +#### .type(types) + +Return the first accepted type (and it is returned as the same text as what +appears in the `types` array). If nothing in `types` is accepted, then `false` +is returned. + +The `types` array can contain full MIME types or file extensions. Any value +that is not a full MIME types is passed to `require('mime-types').lookup`. + +#### .types() + +Return the types that the request accepts, in the order of the client's +preference (most preferred first). + +## Examples + +### Simple type negotiation + +This simple example shows how to use `accepts` to return a different typed +respond body based on what the client wants to accept. The server lists it's +preferences in order and will get back the best match between the client and +server. + +```js +var accepts = require('accepts') +var http = require('http') + +function app (req, res) { + var accept = accepts(req) + + // the order of this list is significant; should be server preferred order + switch (accept.type(['json', 'html'])) { + case 'json': + res.setHeader('Content-Type', 'application/json') + res.write('{"hello":"world!"}') + break + case 'html': + res.setHeader('Content-Type', 'text/html') + res.write('hello, world!') + break + default: + // the fallback is text/plain, so no need to specify it above + res.setHeader('Content-Type', 'text/plain') + res.write('hello, world!') + break + } + + res.end() +} + +http.createServer(app).listen(3000) +``` + +You can test this out with the cURL program: +```sh +curl -I -H'Accept: text/html' http://localhost:3000/ +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/accepts.svg +[npm-url]: https://npmjs.org/package/accepts +[node-version-image]: https://img.shields.io/node/v/accepts.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg +[travis-url]: https://travis-ci.org/jshttp/accepts +[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/accepts +[downloads-image]: https://img.shields.io/npm/dm/accepts.svg +[downloads-url]: https://npmjs.org/package/accepts diff --git a/node_modules/accepts/index.js b/node_modules/accepts/index.js new file mode 100644 index 0000000..e9b2f63 --- /dev/null +++ b/node_modules/accepts/index.js @@ -0,0 +1,238 @@ +/*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Negotiator = require('negotiator') +var mime = require('mime-types') + +/** + * Module exports. + * @public + */ + +module.exports = Accepts + +/** + * Create a new Accepts object for the given req. + * + * @param {object} req + * @public + */ + +function Accepts (req) { + if (!(this instanceof Accepts)) { + return new Accepts(req) + } + + this.headers = req.headers + this.negotiator = new Negotiator(req) +} + +/** + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single mime type string + * such as "application/json", the extension name + * such as "json" or an array `["json", "html", "text/plain"]`. When a list + * or array is given the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * this.types('html'); + * // => "html" + * + * // Accept: text/*, application/json + * this.types('html'); + * // => "html" + * this.types('text/html'); + * // => "text/html" + * this.types('json', 'text'); + * // => "json" + * this.types('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * this.types('image/png'); + * this.types('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * this.types(['html', 'json']); + * this.types('html', 'json'); + * // => "json" + * + * @param {String|Array} types... + * @return {String|Array|Boolean} + * @public + */ + +Accepts.prototype.type = +Accepts.prototype.types = function (types_) { + var types = types_ + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i] + } + } + + // no types, return all requested types + if (!types || types.length === 0) { + return this.negotiator.mediaTypes() + } + + // no accept header, return first given type + if (!this.headers.accept) { + return types[0] + } + + var mimes = types.map(extToMime) + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) + var first = accepts[0] + + return first + ? types[mimes.indexOf(first)] + : false +} + +/** + * Return accepted encodings or best fit based on `encodings`. + * + * Given `Accept-Encoding: gzip, deflate` + * an array sorted by quality is returned: + * + * ['gzip', 'deflate'] + * + * @param {String|Array} encodings... + * @return {String|Array} + * @public + */ + +Accepts.prototype.encoding = +Accepts.prototype.encodings = function (encodings_) { + var encodings = encodings_ + + // support flattened arguments + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length) + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i] + } + } + + // no encodings, return all requested encodings + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings() + } + + return this.negotiator.encodings(encodings)[0] || false +} + +/** + * Return accepted charsets or best fit based on `charsets`. + * + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` + * an array sorted by quality is returned: + * + * ['utf-8', 'utf-7', 'iso-8859-1'] + * + * @param {String|Array} charsets... + * @return {String|Array} + * @public + */ + +Accepts.prototype.charset = +Accepts.prototype.charsets = function (charsets_) { + var charsets = charsets_ + + // support flattened arguments + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length) + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i] + } + } + + // no charsets, return all requested charsets + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets() + } + + return this.negotiator.charsets(charsets)[0] || false +} + +/** + * Return accepted languages or best fit based on `langs`. + * + * Given `Accept-Language: en;q=0.8, es, pt` + * an array sorted by quality is returned: + * + * ['es', 'pt', 'en'] + * + * @param {String|Array} langs... + * @return {Array|String} + * @public + */ + +Accepts.prototype.lang = +Accepts.prototype.langs = +Accepts.prototype.language = +Accepts.prototype.languages = function (languages_) { + var languages = languages_ + + // support flattened arguments + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length) + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i] + } + } + + // no languages, return all requested languages + if (!languages || languages.length === 0) { + return this.negotiator.languages() + } + + return this.negotiator.languages(languages)[0] || false +} + +/** + * Convert extnames to mime. + * + * @param {String} type + * @return {String} + * @private + */ + +function extToMime (type) { + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if mime is valid. + * + * @param {String} type + * @return {String} + * @private + */ + +function validMime (type) { + return typeof type === 'string' +} diff --git a/node_modules/accepts/package.json b/node_modules/accepts/package.json new file mode 100644 index 0000000..ae879d2 --- /dev/null +++ b/node_modules/accepts/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "accepts@1.3.4", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "accepts@1.3.4", + "_id": "accepts@1.3.4", + "_inBundle": false, + "_integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "_location": "/accepts", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "accepts@1.3.4", + "name": "accepts", + "escapedName": "accepts", + "rawSpec": "1.3.4", + "saveSpec": null, + "fetchSpec": "1.3.4" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "_spec": "1.3.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/jshttp/accepts/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-types": "~2.1.16", + "negotiator": "0.6.1" + }, + "description": "Higher-level content negotiation", + "devDependencies": { + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "~1.21.5" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "homepage": "https://github.com/jshttp/accepts#readme", + "keywords": [ + "content", + "negotiation", + "accept", + "accepts" + ], + "license": "MIT", + "name": "accepts", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/accepts.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.3.4" +} diff --git a/node_modules/ansi-align/CHANGELOG.md b/node_modules/ansi-align/CHANGELOG.md new file mode 100644 index 0000000..621e50a --- /dev/null +++ b/node_modules/ansi-align/CHANGELOG.md @@ -0,0 +1,36 @@ +# 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. + + +# [2.0.0](https://github.com/nexdrew/ansi-align/compare/v1.1.0...v2.0.0) (2017-05-01) + + +### Features + +* ES2015ify, dropping support for Node <4 ([#30](https://github.com/nexdrew/ansi-align/issues/30)) ([7b43f48](https://github.com/nexdrew/ansi-align/commit/7b43f48)) + + +### BREAKING CHANGES + +* Node 0.10 or 0.12 no longer supported, please update to Node 4+ or use ansi-align@1.1.0 + + + + +# [1.1.0](https://github.com/nexdrew/ansi-align/compare/v1.0.0...v1.1.0) (2016-06-06) + + +### Features + +* support left-alignment as no-op ([#3](https://github.com/nexdrew/ansi-align/issues/3)) ([e581db6](https://github.com/nexdrew/ansi-align/commit/e581db6)) + + + + +# 1.0.0 (2016-04-30) + + +### Features + +* initial commit ([1914d90](https://github.com/nexdrew/ansi-align/commit/1914d90)) diff --git a/node_modules/ansi-align/LICENSE b/node_modules/ansi-align/LICENSE new file mode 100644 index 0000000..ab601b6 --- /dev/null +++ b/node_modules/ansi-align/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2016, 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/node_modules/ansi-align/README.md b/node_modules/ansi-align/README.md new file mode 100644 index 0000000..3aafc67 --- /dev/null +++ b/node_modules/ansi-align/README.md @@ -0,0 +1,79 @@ +# ansi-align + +> align-text with ANSI support for CLIs + +[![Build Status](https://travis-ci.org/nexdrew/ansi-align.svg?branch=master)](https://travis-ci.org/nexdrew/ansi-align) +[![Coverage Status](https://coveralls.io/repos/github/nexdrew/ansi-align/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/ansi-align?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +Easily center- or right- align a block of text, carefully ignoring ANSI escape codes. + +E.g. turn this: + +ansi text block no alignment :( + +Into this: + +ansi text block center aligned! + +## Install + +```sh +npm install --save ansi-align +``` + +```js +var ansiAlign = require('ansi-align') +``` + +## API + +### `ansiAlign(text, [opts])` + +Align the given text per the line with the greatest [`string-width`](https://github.com/sindresorhus/string-width), returning a new string (or array). + +#### Arguments + +- `text`: required, string or array + + The text to align. If a string is given, it will be split using either the `opts.split` value or `'\n'` by default. If an array is given, a different array of modified strings will be returned. + +- `opts`: optional, object + + Options to change behavior, see below. + +#### Options + +- `opts.align`: string, default `'center'` + + The alignment mode. Use `'center'` for center-alignment, `'right'` for right-alignment, or `'left'` for left-alignment. Note that the given `text` is assumed to be left-aligned already, so specifying `align: 'left'` just returns the `text` as is (no-op). + +- `opts.split`: string or RegExp, default `'\n'` + + The separator to use when splitting the text. Only used if text is given as a string. + +- `opts.pad`: string, default `' '` + + The value used to left-pad (prepend to) lines of lesser width. Will be repeated as necessary to adjust alignment to the line with the greatest width. + +### `ansiAlign.center(text)` + +Alias for `ansiAlign(text, { align: 'center' })`. + +### `ansiAlign.right(text)` + +Alias for `ansiAlign(text, { align: 'right' })`. + +### `ansiAlign.left(text)` + +Alias for `ansiAlign(text, { align: 'left' })`, which is a no-op. + +## Similar Packages + +- [`center-align`](https://github.com/jonschlinkert/center-align): Very close to this package, except it doesn't support ANSI codes. +- [`left-pad`](https://github.com/camwest/left-pad): Great for left-padding but does not support center alignment or ANSI codes. +- Pretty much anything by the [chalk](https://github.com/chalk) team + +## License + +ISC © Contributors diff --git a/node_modules/ansi-align/index.js b/node_modules/ansi-align/index.js new file mode 100644 index 0000000..67fa826 --- /dev/null +++ b/node_modules/ansi-align/index.js @@ -0,0 +1,61 @@ +'use strict' + +const stringWidth = require('string-width') + +function ansiAlign (text, opts) { + if (!text) return text + + opts = opts || {} + const align = opts.align || 'center' + + // short-circuit `align: 'left'` as no-op + if (align === 'left') return text + + const split = opts.split || '\n' + const pad = opts.pad || ' ' + const widthDiffFn = align !== 'right' ? halfDiff : fullDiff + + let returnString = false + if (!Array.isArray(text)) { + returnString = true + text = String(text).split(split) + } + + let width + let maxWidth = 0 + text = text.map(function (str) { + str = String(str) + width = stringWidth(str) + maxWidth = Math.max(width, maxWidth) + return { + str, + width + } + }).map(function (obj) { + return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str + }) + + return returnString ? text.join(split) : text +} + +ansiAlign.left = function left (text) { + return ansiAlign(text, { align: 'left' }) +} + +ansiAlign.center = function center (text) { + return ansiAlign(text, { align: 'center' }) +} + +ansiAlign.right = function right (text) { + return ansiAlign(text, { align: 'right' }) +} + +module.exports = ansiAlign + +function halfDiff (maxWidth, curWidth) { + return Math.floor((maxWidth - curWidth) / 2) +} + +function fullDiff (maxWidth, curWidth) { + return maxWidth - curWidth +} diff --git a/node_modules/ansi-align/package.json b/node_modules/ansi-align/package.json new file mode 100644 index 0000000..9a2316e --- /dev/null +++ b/node_modules/ansi-align/package.json @@ -0,0 +1,70 @@ +{ + "_from": "ansi-align@^2.0.0", + "_id": "ansi-align@2.0.0", + "_inBundle": false, + "_integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "_location": "/ansi-align", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-align@^2.0.0", + "name": "ansi-align", + "escapedName": "ansi-align", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/boxen" + ], + "_resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "_shasum": "c36aeccba563b89ceb556f3690f0b1d9e3547f7f", + "_spec": "ansi-align@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/boxen", + "author": { + "name": "nexdrew" + }, + "bugs": { + "url": "https://github.com/nexdrew/ansi-align/issues" + }, + "bundleDependencies": false, + "dependencies": { + "string-width": "^2.0.0" + }, + "deprecated": false, + "description": "align-text with ANSI support for CLIs", + "devDependencies": { + "ava": "^0.19.1", + "chalk": "^1.1.3", + "coveralls": "^2.13.1", + "nyc": "^10.3.0", + "standard": "^10.0.2", + "standard-version": "^4.0.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/nexdrew/ansi-align#readme", + "keywords": [ + "ansi", + "align", + "cli", + "center", + "pad" + ], + "license": "ISC", + "main": "index.js", + "name": "ansi-align", + "repository": { + "type": "git", + "url": "git+https://github.com/nexdrew/ansi-align.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "nyc ava" + }, + "version": "2.0.0" +} diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..c4aaecf --- /dev/null +++ b/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = () => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, 'g'); +}; diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/ansi-regex/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/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..f40dd31 --- /dev/null +++ b/node_modules/ansi-regex/package.json @@ -0,0 +1,85 @@ +{ + "_from": "ansi-regex@^3.0.0", + "_id": "ansi-regex@3.0.0", + "_inBundle": false, + "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "_location": "/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^3.0.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "_shasum": "ed0317c322064f79466c02966bddb605ab37d998", + "_spec": "ansi-regex@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..22db1c3 --- /dev/null +++ b/node_modules/ansi-regex/readme.md @@ -0,0 +1,46 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] +``` + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..3d3baa6 --- /dev/null +++ b/node_modules/ansi-styles/index.js @@ -0,0 +1,152 @@ +'use strict'; +const colorConvert = require('color-convert'); + +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Fix humans + styles.color.grey = styles.color.gray; + + for (const groupName of Object.keys(styles)) { + const group = styles[groupName]; + + for (const styleName of Object.keys(group)) { + const style = group[styleName]; + + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } + + const rgb2rgb = (r, g, b) => [r, g, b]; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = {}; + styles.color.ansi256 = {}; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + + styles.bgColor.ansi = {}; + styles.bgColor.ansi256 = {}; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + for (const key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } + + const suite = colorConvert[key]; + + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/ansi-styles/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/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..763758c --- /dev/null +++ b/node_modules/ansi-styles/package.json @@ -0,0 +1,86 @@ +{ + "_from": "ansi-styles@^3.2.0", + "_id": "ansi-styles@3.2.0", + "_inBundle": false, + "_integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "_location": "/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-styles@^3.2.0", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "^3.2.0", + "saveSpec": null, + "fetchSpec": "^3.2.0" + }, + "_requiredBy": [ + "/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "_shasum": "c159b8d5be0f9e5a6f346dab94f16ce022161b88", + "_spec": "ansi-styles@^3.2.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "ava": { + "require": "babel-polyfill" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "bundleDependencies": false, + "dependencies": { + "color-convert": "^1.9.0" + }, + "deprecated": false, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "ava": "*", + "babel-polyfill": "^6.23.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.2.0" +} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..dce3687 --- /dev/null +++ b/node_modules/ansi-styles/readme.md @@ -0,0 +1,147 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install ansi-styles +``` + + +## Usage + +```js +const style = require('ansi-styles'); + +console.log(`${style.green.open}Hello world!${style.green.close}`); + + +// Color conversion between 16/256/truecolor +// NOTE: If conversion goes to 16 colors or 256 colors, the original color +// may be degraded to fit that color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); +console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); +console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); +``` + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` ("bright black") +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `style.modifier` +- `style.color` +- `style.bgColor` + +###### Example + +```js +console.log(style.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +console.log(style.codes.get(36)); +//=> 39 +``` + + +## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) + +`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. + +To use these, call the associated conversion function with the intended output, for example: + +```js +style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code +style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code + +style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code +style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code + +style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code +style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code +``` + + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/anymatch/LICENSE b/node_modules/anymatch/LICENSE new file mode 100644 index 0000000..bc42470 --- /dev/null +++ b/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2014 Elan Shanker + +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/node_modules/anymatch/README.md b/node_modules/anymatch/README.md new file mode 100644 index 0000000..f674f40 --- /dev/null +++ b/node_modules/anymatch/README.md @@ -0,0 +1,99 @@ +anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ + +[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) +[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) + +Usage +----- +```sh +npm install anymatch --save +``` + +#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. +* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a +subset out of the array of provided matchers to test against. Can be useful +with bound matcher functions (see below). When used with `returnIndex = true` +preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. +includes array members up to, but not including endIndex). + +```js +var anymatch = require('anymatch'); + +var matchers = [ + 'path/to/file.js', + 'path/anyjs/**/*.js', + /foo\.js$/, + function (string) { + return string.indexOf('bar') !== -1 && string.length > 10 + } +]; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', true); // 2 +anymatch(matchers, 'path/anyjs/foo.js', true); // 1 + +// skip matchers +anymatch(matchers, 'path/to/file.js', false, 1); // false +anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 +anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true +``` + +#### anymatch (matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array.prototype.filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 +matcher('path/anyjs/baz.js', true, 2); // -1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Change Log +---------- +[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) + +NOTE: As of v2.0.0, [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). + +NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/node_modules/anymatch/index.js b/node_modules/anymatch/index.js new file mode 100644 index 0000000..e411618 --- /dev/null +++ b/node_modules/anymatch/index.js @@ -0,0 +1,67 @@ +'use strict'; + +var micromatch = require('micromatch'); +var normalize = require('normalize-path'); +var path = require('path'); // required for tests. +var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); }; + +var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { + criteria = arrify(criteria); + value = arrify(value); + if (arguments.length === 1) { + return anymatch.bind(null, criteria.map(function(criterion) { + return typeof criterion === 'string' && criterion[0] !== '!' ? + micromatch.matcher(criterion) : criterion; + })); + } + startIndex = startIndex || 0; + var string = value[0]; + var altString, altValue; + var matched = false; + var matchIndex = -1; + function testCriteria(criterion, index) { + var result; + switch (Object.prototype.toString.call(criterion)) { + case '[object String]': + result = string === criterion || altString && altString === criterion; + result = result || micromatch.isMatch(string, criterion); + break; + case '[object RegExp]': + result = criterion.test(string) || altString && criterion.test(altString); + break; + case '[object Function]': + result = criterion.apply(null, value); + result = result || altValue && criterion.apply(null, altValue); + break; + default: + result = false; + } + if (result) { + matchIndex = index + startIndex; + } + return result; + } + var crit = criteria; + var negGlobs = crit.reduce(function(arr, criterion, index) { + if (typeof criterion === 'string' && criterion[0] === '!') { + if (crit === criteria) { + // make a copy before modifying + crit = crit.slice(); + } + crit[index] = null; + arr.push(criterion.substr(1)); + } + return arr; + }, []); + if (!negGlobs.length || !micromatch.any(string, negGlobs)) { + if (path.sep === '\\' && typeof string === 'string') { + altString = normalize(string); + altString = altString === string ? null : altString; + if (altString) altValue = [altString].concat(value.slice(1)); + } + matched = crit.slice(startIndex, endIndex).some(testCriteria); + } + return returnIndex === true ? matchIndex : matched; +}; + +module.exports = anymatch; diff --git a/node_modules/anymatch/package.json b/node_modules/anymatch/package.json new file mode 100644 index 0000000..ec2dab8 --- /dev/null +++ b/node_modules/anymatch/package.json @@ -0,0 +1,72 @@ +{ + "_from": "anymatch@^2.0.0", + "_id": "anymatch@2.0.0", + "_inBundle": false, + "_integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "_location": "/anymatch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "anymatch@^2.0.0", + "name": "anymatch", + "escapedName": "anymatch", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "_shasum": "bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb", + "_spec": "anymatch@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/chokidar", + "author": { + "name": "Elan Shanker", + "url": "http://github.com/es128" + }, + "bugs": { + "url": "https://github.com/micromatch/anymatch/issues" + }, + "bundleDependencies": false, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "deprecated": false, + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "devDependencies": { + "coveralls": "^2.7.0", + "istanbul": "^0.4.5", + "mocha": "^3.0.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/micromatch/anymatch", + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "license": "ISC", + "name": "anymatch", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/anymatch.git" + }, + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "version": "2.0.0" +} diff --git a/node_modules/arr-diff/LICENSE b/node_modules/arr-diff/LICENSE new file mode 100755 index 0000000..d734237 --- /dev/null +++ b/node_modules/arr-diff/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/arr-diff/README.md b/node_modules/arr-diff/README.md new file mode 100644 index 0000000..961f5c3 --- /dev/null +++ b/node_modules/arr-diff/README.md @@ -0,0 +1,130 @@ +# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg?style=flat)](https://www.npmjs.com/package/arr-diff) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-diff.svg?style=flat)](https://npmjs.org/package/arr-diff) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-diff.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-diff) + +> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-diff +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add arr-diff +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install arr-diff --save +``` + +## Usage + +Returns the difference between the first array and additional arrays. + +```js +var diff = require('arr-diff'); + +var a = ['a', 'b', 'c', 'd']; +var b = ['b', 'c']; + +console.log(diff(a, b)) +//=> ['a', 'd'] +``` + +## Benchmarks + +This library versus [array-differ](https://github.com/sindresorhus/array-differ), on April 14, 2017: + +``` +Benchmarking: (4 of 4) + · long-dupes + · long + · med + · short + +# benchmark/fixtures/long-dupes.js (100804 bytes) + arr-diff-3.0.0 x 822 ops/sec ±0.67% (86 runs sampled) + arr-diff-4.0.0 x 2,141 ops/sec ±0.42% (89 runs sampled) + array-differ x 708 ops/sec ±0.70% (89 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/long.js (94529 bytes) + arr-diff-3.0.0 x 882 ops/sec ±0.60% (87 runs sampled) + arr-diff-4.0.0 x 2,329 ops/sec ±0.97% (83 runs sampled) + array-differ x 769 ops/sec ±0.61% (90 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/med.js (708 bytes) + arr-diff-3.0.0 x 856,150 ops/sec ±0.42% (89 runs sampled) + arr-diff-4.0.0 x 4,665,249 ops/sec ±1.06% (89 runs sampled) + array-differ x 653,888 ops/sec ±1.02% (86 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/short.js (60 bytes) + arr-diff-3.0.0 x 3,078,467 ops/sec ±0.77% (93 runs sampled) + arr-diff-4.0.0 x 9,213,296 ops/sec ±0.65% (89 runs sampled) + array-differ x 1,337,051 ops/sec ±0.91% (92 runs sampled) + + fastest is arr-diff-4.0.0 +``` + +## About + +### Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter "Array#filter for older browsers.") +* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://github.com/jonschlinkert/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection "Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulmillr](https://github.com/paulmillr) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._ \ No newline at end of file diff --git a/node_modules/arr-diff/index.js b/node_modules/arr-diff/index.js new file mode 100644 index 0000000..90f2807 --- /dev/null +++ b/node_modules/arr-diff/index.js @@ -0,0 +1,47 @@ +/*! + * arr-diff + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function diff(arr/*, arrays*/) { + var len = arguments.length; + var idx = 0; + while (++idx < len) { + arr = diffArray(arr, arguments[idx]); + } + return arr; +}; + +function diffArray(one, two) { + if (!Array.isArray(two)) { + return one.slice(); + } + + var tlen = two.length + var olen = one.length; + var idx = -1; + var arr = []; + + while (++idx < olen) { + var ele = one[idx]; + + var hasEle = false; + for (var i = 0; i < tlen; i++) { + var val = two[i]; + + if (ele === val) { + hasEle = true; + break; + } + } + + if (hasEle === false) { + arr.push(ele); + } + } + return arr; +} diff --git a/node_modules/arr-diff/package.json b/node_modules/arr-diff/package.json new file mode 100644 index 0000000..7b6c415 --- /dev/null +++ b/node_modules/arr-diff/package.json @@ -0,0 +1,109 @@ +{ + "_from": "arr-diff@^4.0.0", + "_id": "arr-diff@4.0.0", + "_inBundle": false, + "_integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "_location": "/arr-diff", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arr-diff@^4.0.0", + "name": "arr-diff", + "escapedName": "arr-diff", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/micromatch", + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "_shasum": "d6461074febfec71e7e15235761a329a5dc7c520", + "_spec": "arr-diff@^4.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Paul Miller", + "email": "paul+gh@paulmillr.com", + "url": "paulmillr.com" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "arr-flatten": "^1.0.1", + "array-differ": "^1.0.0", + "benchmarked": "^0.2.4", + "gulp-format-md": "^0.1.9", + "minimist": "^1.2.0", + "mocha": "^2.4.5" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/arr-diff", + "keywords": [ + "arr", + "array", + "array differ", + "array-differ", + "diff", + "differ", + "difference" + ], + "license": "MIT", + "main": "index.js", + "name": "arr-diff", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-diff.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "array-filter", + "array-intersection" + ] + }, + "reflinks": [ + "array-differ", + "verb" + ], + "lint": { + "reflinks": true + } + }, + "version": "4.0.0" +} diff --git a/node_modules/arr-flatten/LICENSE b/node_modules/arr-flatten/LICENSE new file mode 100755 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/arr-flatten/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/arr-flatten/README.md b/node_modules/arr-flatten/README.md new file mode 100755 index 0000000..7dc7a97 --- /dev/null +++ b/node_modules/arr-flatten/README.md @@ -0,0 +1,86 @@ +# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![NPM total downloads](https://img.shields.io/npm/dt/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten) + +> Recursively flatten an array or arrays. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-flatten +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install arr-flatten --save +``` + +## Usage + +```js +var flatten = require('arr-flatten'); + +flatten(['a', ['b', ['c']], 'd', ['e']]); +//=> ['a', 'b', 'c', 'd', 'e'] +``` + +## Why another flatten utility? + +I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%. + +## About + +### Related projects + +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") +* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.") +* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 20 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [lukeed](https://github.com/lukeed) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._ \ No newline at end of file diff --git a/node_modules/arr-flatten/index.js b/node_modules/arr-flatten/index.js new file mode 100644 index 0000000..0cb4ea4 --- /dev/null +++ b/node_modules/arr-flatten/index.js @@ -0,0 +1,22 @@ +/*! + * arr-flatten + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function (arr) { + return flat(arr, []); +}; + +function flat(arr, res) { + var i = 0, cur; + var len = arr.length; + for (; i < len; i++) { + cur = arr[i]; + Array.isArray(cur) ? flat(cur, res) : res.push(cur); + } + return res; +} diff --git a/node_modules/arr-flatten/package.json b/node_modules/arr-flatten/package.json new file mode 100644 index 0000000..c4a9f07 --- /dev/null +++ b/node_modules/arr-flatten/package.json @@ -0,0 +1,113 @@ +{ + "_from": "arr-flatten@^1.1.0", + "_id": "arr-flatten@1.1.0", + "_inBundle": false, + "_integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "_location": "/arr-flatten", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arr-flatten@^1.1.0", + "name": "arr-flatten", + "escapedName": "arr-flatten", + "rawSpec": "^1.1.0", + "saveSpec": null, + "fetchSpec": "^1.1.0" + }, + "_requiredBy": [ + "/braces" + ], + "_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "_shasum": "36048bbff4e7b47e136644316c99669ea5ae91f1", + "_spec": "arr-flatten@^1.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-flatten/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Luke Edwards", + "url": "https://lukeed.com" + } + ], + "deprecated": false, + "description": "Recursively flatten an array or arrays.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-flatten": "^2.1.1", + "array-slice": "^1.0.0", + "benchmarked": "^1.0.0", + "compute-flatten": "^1.0.0", + "flatit": "^1.1.1", + "flatten": "^1.0.2", + "flatten-array": "^1.0.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "just-flatten-it": "^1.1.23", + "lodash.flattendeep": "^4.4.0", + "m_flattened": "^1.0.1", + "mocha": "^3.2.0", + "utils-flatten": "^1.0.0", + "write": "^0.3.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/arr-flatten", + "keywords": [ + "arr", + "array", + "elements", + "flat", + "flatten", + "nested", + "recurse", + "recursive", + "recursively" + ], + "license": "MIT", + "main": "index.js", + "name": "arr-flatten", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-flatten.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-filter", + "arr-union", + "array-each", + "array-unique" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "1.1.0" +} diff --git a/node_modules/arr-union/LICENSE b/node_modules/arr-union/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/arr-union/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +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/node_modules/arr-union/README.md b/node_modules/arr-union/README.md new file mode 100644 index 0000000..b3cd4f4 --- /dev/null +++ b/node_modules/arr-union/README.md @@ -0,0 +1,99 @@ +# arr-union [![NPM version](https://img.shields.io/npm/v/arr-union.svg)](https://www.npmjs.com/package/arr-union) [![Build Status](https://img.shields.io/travis/jonschlinkert/arr-union.svg)](https://travis-ci.org/jonschlinkert/arr-union) + +> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i arr-union --save +``` + +## Benchmarks + +This library is **10-20 times faster** and more performant than [array-union](https://github.com/sindresorhus/array-union). + +See the [benchmarks](./benchmark). + +```sh +#1: five-arrays + array-union x 511,121 ops/sec ±0.80% (96 runs sampled) + arr-union x 5,716,039 ops/sec ±0.86% (93 runs sampled) + +#2: ten-arrays + array-union x 245,196 ops/sec ±0.69% (94 runs sampled) + arr-union x 1,850,786 ops/sec ±0.84% (97 runs sampled) + +#3: two-arrays + array-union x 563,869 ops/sec ±0.97% (94 runs sampled) + arr-union x 9,602,852 ops/sec ±0.87% (92 runs sampled) +``` + +## Usage + +```js +var union = require('arr-union'); + +union(['a'], ['b', 'c'], ['d', 'e', 'f']); +//=> ['a', 'b', 'c', 'd', 'e', 'f'] +``` + +Returns only unique elements: + +```js +union(['a', 'a'], ['b', 'c']); +//=> ['a', 'b', 'c'] +``` + +## Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://www.npmjs.com/package/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff) +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter) +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten) +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map) +* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck) +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce) +* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-union/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm i verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the [MIT license](https://github.com/jonschlinkert/arr-union/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 23, 2016._ \ No newline at end of file diff --git a/node_modules/arr-union/index.js b/node_modules/arr-union/index.js new file mode 100644 index 0000000..5ae6c4a --- /dev/null +++ b/node_modules/arr-union/index.js @@ -0,0 +1,29 @@ +'use strict'; + +module.exports = function union(init) { + if (!Array.isArray(init)) { + throw new TypeError('arr-union expects the first argument to be an array.'); + } + + var len = arguments.length; + var i = 0; + + while (++i < len) { + var arg = arguments[i]; + if (!arg) continue; + + if (!Array.isArray(arg)) { + arg = [arg]; + } + + for (var j = 0; j < arg.length; j++) { + var ele = arg[j]; + + if (init.indexOf(ele) >= 0) { + continue; + } + init.push(ele); + } + } + return init; +}; diff --git a/node_modules/arr-union/package.json b/node_modules/arr-union/package.json new file mode 100644 index 0000000..f0ad3af --- /dev/null +++ b/node_modules/arr-union/package.json @@ -0,0 +1,108 @@ +{ + "_from": "arr-union@^3.1.0", + "_id": "arr-union@3.1.0", + "_inBundle": false, + "_integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "_location": "/arr-union", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arr-union@^3.1.0", + "name": "arr-union", + "escapedName": "arr-union", + "rawSpec": "^3.1.0", + "saveSpec": null, + "fetchSpec": "^3.1.0" + }, + "_requiredBy": [ + "/class-utils", + "/union-value" + ], + "_resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "_shasum": "e39b09aea9def866a8f206e288af63919bae39c4", + "_spec": "arr-union@^3.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/union-value", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-union/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-union": "^1.0.1", + "array-unique": "^0.2.1", + "benchmarked": "^0.1.4", + "gulp-format-md": "^0.1.7", + "minimist": "^1.1.1", + "mocha": "*", + "should": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/arr-union", + "keywords": [ + "add", + "append", + "array", + "arrays", + "combine", + "concat", + "extend", + "union", + "uniq", + "unique", + "util", + "utility", + "utils" + ], + "license": "MIT", + "main": "index.js", + "name": "arr-union", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-union.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-diff", + "arr-flatten", + "arr-filter", + "arr-map", + "arr-pluck", + "arr-reduce", + "array-unique" + ] + }, + "reflinks": [ + "verb", + "array-union" + ], + "lint": { + "reflinks": true + } + }, + "version": "3.1.0" +} diff --git a/node_modules/array-flatten/LICENSE b/node_modules/array-flatten/LICENSE new file mode 100644 index 0000000..983fbe8 --- /dev/null +++ b/node_modules/array-flatten/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.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/node_modules/array-flatten/README.md b/node_modules/array-flatten/README.md new file mode 100644 index 0000000..91fa5b6 --- /dev/null +++ b/node_modules/array-flatten/README.md @@ -0,0 +1,43 @@ +# Array Flatten + +[![NPM version][npm-image]][npm-url] +[![NPM downloads][downloads-image]][downloads-url] +[![Build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] + +> Flatten an array of nested arrays into a single flat array. Accepts an optional depth. + +## Installation + +``` +npm install array-flatten --save +``` + +## Usage + +```javascript +var flatten = require('array-flatten') + +flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]) +//=> [1, 2, 3, 4, 5, 6, 7, 8, 9] + +flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2) +//=> [1, 2, 3, [4, [5], 6], 7, 8, 9] + +(function () { + flatten(arguments) //=> [1, 2, 3] +})(1, [2, 3]) +``` + +## License + +MIT + +[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat +[npm-url]: https://npmjs.org/package/array-flatten +[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat +[downloads-url]: https://npmjs.org/package/array-flatten +[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat +[travis-url]: https://travis-ci.org/blakeembrey/array-flatten +[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat +[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master diff --git a/node_modules/array-flatten/array-flatten.js b/node_modules/array-flatten/array-flatten.js new file mode 100644 index 0000000..089117b --- /dev/null +++ b/node_modules/array-flatten/array-flatten.js @@ -0,0 +1,64 @@ +'use strict' + +/** + * Expose `arrayFlatten`. + */ +module.exports = arrayFlatten + +/** + * Recursive flatten function with depth. + * + * @param {Array} array + * @param {Array} result + * @param {Number} depth + * @return {Array} + */ +function flattenWithDepth (array, result, depth) { + for (var i = 0; i < array.length; i++) { + var value = array[i] + + if (depth > 0 && Array.isArray(value)) { + flattenWithDepth(value, result, depth - 1) + } else { + result.push(value) + } + } + + return result +} + +/** + * Recursive flatten function. Omitting depth is slightly faster. + * + * @param {Array} array + * @param {Array} result + * @return {Array} + */ +function flattenForever (array, result) { + for (var i = 0; i < array.length; i++) { + var value = array[i] + + if (Array.isArray(value)) { + flattenForever(value, result) + } else { + result.push(value) + } + } + + return result +} + +/** + * Flatten an array, with the ability to define a depth. + * + * @param {Array} array + * @param {Number} depth + * @return {Array} + */ +function arrayFlatten (array, depth) { + if (depth == null) { + return flattenForever(array, []) + } + + return flattenWithDepth(array, [], depth) +} diff --git a/node_modules/array-flatten/package.json b/node_modules/array-flatten/package.json new file mode 100644 index 0000000..4da1b95 --- /dev/null +++ b/node_modules/array-flatten/package.json @@ -0,0 +1,67 @@ +{ + "_args": [ + [ + "array-flatten@1.1.1", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "array-flatten@1.1.1", + "_id": "array-flatten@1.1.1", + "_inBundle": false, + "_integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "_location": "/array-flatten", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "array-flatten@1.1.1", + "name": "array-flatten", + "escapedName": "array-flatten", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "bugs": { + "url": "https://github.com/blakeembrey/array-flatten/issues" + }, + "description": "Flatten an array of nested arrays into a single flat array", + "devDependencies": { + "istanbul": "^0.3.13", + "mocha": "^2.2.4", + "pre-commit": "^1.0.7", + "standard": "^3.7.3" + }, + "files": [ + "array-flatten.js", + "LICENSE" + ], + "homepage": "https://github.com/blakeembrey/array-flatten", + "keywords": [ + "array", + "flatten", + "arguments", + "depth" + ], + "license": "MIT", + "main": "array-flatten.js", + "name": "array-flatten", + "repository": { + "type": "git", + "url": "git://github.com/blakeembrey/array-flatten.git" + }, + "scripts": { + "test": "istanbul cover _mocha -- -R spec" + }, + "version": "1.1.1" +} diff --git a/node_modules/array-unique/LICENSE b/node_modules/array-unique/LICENSE new file mode 100755 index 0000000..842218c --- /dev/null +++ b/node_modules/array-unique/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +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/node_modules/array-unique/README.md b/node_modules/array-unique/README.md new file mode 100755 index 0000000..41c8c90 --- /dev/null +++ b/node_modules/array-unique/README.md @@ -0,0 +1,77 @@ +# array-unique [![NPM version](https://img.shields.io/npm/v/array-unique.svg?style=flat)](https://www.npmjs.com/package/array-unique) [![NPM downloads](https://img.shields.io/npm/dm/array-unique.svg?style=flat)](https://npmjs.org/package/array-unique) [![Build Status](https://img.shields.io/travis/jonschlinkert/array-unique.svg?style=flat)](https://travis-ci.org/jonschlinkert/array-unique) + +Remove duplicate values from an array. Fastest ES5 implementation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-unique +``` + +## Usage + +```js +var unique = require('array-unique'); + +var arr = ['a', 'b', 'c', 'c']; +console.log(unique(arr)) //=> ['a', 'b', 'c'] +console.log(arr) //=> ['a', 'b', 'c'] + +/* The above modifies the input array. To prevent that at a slight performance cost: */ +var unique = require("array-unique").immutable; + +var arr = ['a', 'b', 'c', 'c']; +console.log(unique(arr)) //=> ['a', 'b', 'c'] +console.log(arr) //=> ['a', 'b', 'c', 'c'] +``` + +## About + +### Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.") +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck "Retrieves the value of a specified property from all elements in the collection.") +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.") +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/array-unique/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 31, 2016._ \ No newline at end of file diff --git a/node_modules/array-unique/index.js b/node_modules/array-unique/index.js new file mode 100644 index 0000000..7e481e0 --- /dev/null +++ b/node_modules/array-unique/index.js @@ -0,0 +1,43 @@ +/*! + * array-unique + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function unique(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var len = arr.length; + var i = -1; + + while (i++ < len) { + var j = i + 1; + + for (; j < arr.length; ++j) { + if (arr[i] === arr[j]) { + arr.splice(j--, 1); + } + } + } + return arr; +}; + +module.exports.immutable = function uniqueImmutable(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var arrLen = arr.length; + var newArr = new Array(arrLen); + + for (var i = 0; i < arrLen; i++) { + newArr[i] = arr[i]; + } + + return module.exports(newArr); +}; diff --git a/node_modules/array-unique/package.json b/node_modules/array-unique/package.json new file mode 100644 index 0000000..9da322c --- /dev/null +++ b/node_modules/array-unique/package.json @@ -0,0 +1,96 @@ +{ + "_from": "array-unique@^0.3.2", + "_id": "array-unique@0.3.2", + "_inBundle": false, + "_integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "_location": "/array-unique", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-unique@^0.3.2", + "name": "array-unique", + "escapedName": "array-unique", + "rawSpec": "^0.3.2", + "saveSpec": null, + "fetchSpec": "^0.3.2" + }, + "_requiredBy": [ + "/braces", + "/extglob", + "/micromatch", + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "_shasum": "a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428", + "_spec": "array-unique@^0.3.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Remove duplicate values from an array. Fastest ES5 implementation.", + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3", + "should": "^10.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/jonschlinkert/array-unique", + "keywords": [ + "array", + "unique" + ], + "license": "MIT", + "main": "index.js", + "name": "array-unique", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/array-unique.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-diff", + "arr-union", + "arr-flatten", + "arr-reduce", + "arr-map", + "arr-pluck" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "0.3.2" +} diff --git a/node_modules/assign-symbols/LICENSE b/node_modules/assign-symbols/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/assign-symbols/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/node_modules/assign-symbols/README.md b/node_modules/assign-symbols/README.md new file mode 100644 index 0000000..422729d --- /dev/null +++ b/node_modules/assign-symbols/README.md @@ -0,0 +1,73 @@ +# assign-symbols [![NPM version](https://badge.fury.io/js/assign-symbols.svg)](http://badge.fury.io/js/assign-symbols) + +> Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method. + +From the [Mozilla Developer docs for Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol): + +> A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i assign-symbols --save +``` + +## Usage + +```js +var assignSymbols = require('assign-symbols'); +var obj = {}; + +var one = {}; +var symbolOne = Symbol('aaa'); +one[symbolOne] = 'bbb'; + +var two = {}; +var symbolTwo = Symbol('ccc'); +two[symbolTwo] = 'ddd'; + +assignSymbols(obj, one, two); + +console.log(obj[symbolOne]); +//=> 'bbb' +console.log(obj[symbolTwo]); +//=> 'ddd' +``` + +## Similar projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. | [homepage](https://github.com/jonschlinkert/assign-deep) +* [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep) +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-symbols/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 06, 2015._ \ No newline at end of file diff --git a/node_modules/assign-symbols/index.js b/node_modules/assign-symbols/index.js new file mode 100644 index 0000000..c08a232 --- /dev/null +++ b/node_modules/assign-symbols/index.js @@ -0,0 +1,40 @@ +/*! + * assign-symbols + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function(receiver, objects) { + if (receiver === null || typeof receiver === 'undefined') { + throw new TypeError('expected first argument to be an object.'); + } + + if (typeof objects === 'undefined' || typeof Symbol === 'undefined') { + return receiver; + } + + if (typeof Object.getOwnPropertySymbols !== 'function') { + return receiver; + } + + var isEnumerable = Object.prototype.propertyIsEnumerable; + var target = Object(receiver); + var len = arguments.length, i = 0; + + while (++i < len) { + var provider = Object(arguments[i]); + var names = Object.getOwnPropertySymbols(provider); + + for (var j = 0; j < names.length; j++) { + var key = names[j]; + + if (isEnumerable.call(provider, key)) { + target[key] = provider[key]; + } + } + } + return target; +}; diff --git a/node_modules/assign-symbols/package.json b/node_modules/assign-symbols/package.json new file mode 100644 index 0000000..d4eb2fc --- /dev/null +++ b/node_modules/assign-symbols/package.json @@ -0,0 +1,71 @@ +{ + "_from": "assign-symbols@^1.0.0", + "_id": "assign-symbols@1.0.0", + "_inBundle": false, + "_integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "_location": "/assign-symbols", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "assign-symbols@^1.0.0", + "name": "assign-symbols", + "escapedName": "assign-symbols", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/extend-shallow" + ], + "_resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "_shasum": "59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367", + "_spec": "assign-symbols@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/extend-shallow", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/assign-symbols/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.", + "devDependencies": { + "mocha": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/assign-symbols", + "keywords": [ + "assign", + "symbols" + ], + "license": "MIT", + "main": "index.js", + "name": "assign-symbols", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/assign-symbols.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "assign-deep", + "mixin-deep", + "merge-deep", + "extend-shallow", + "clone-deep" + ] + } + }, + "version": "1.0.0" +} diff --git a/node_modules/async-each/.npmignore b/node_modules/async-each/.npmignore new file mode 100644 index 0000000..3887b2b --- /dev/null +++ b/node_modules/async-each/.npmignore @@ -0,0 +1,3 @@ +bower.json +component.json +CHANGELOG.md diff --git a/node_modules/async-each/CHANGELOG.md b/node_modules/async-each/CHANGELOG.md new file mode 100644 index 0000000..bee2548 --- /dev/null +++ b/node_modules/async-each/CHANGELOG.md @@ -0,0 +1,23 @@ +# async-each 1.0.0 (26 November 2015) +* Bumped version to 1.0.0 (no functional changes) + +# async-each 0.1.6 (5 November 2014) +* Add license to package.json + +# async-each 0.1.5 (22 October 2014) +* Clean up package.json to fix npm warning about `repo` + +# async-each 0.1.4 (12 November 2013) +* Fixed AMD definition. + +# async-each 0.1.3 (25 July 2013) +* Fixed double wrapping of errors. + +# async-each 0.1.2 (7 July 2013) +* Fixed behaviour on empty arrays. + +# async-each 0.1.1 (14 June 2013) +* Wrapped function in closure, enabled strict mode. + +# async-each 0.1.0 (14 June 2013) +* Initial release. diff --git a/node_modules/async-each/README.md b/node_modules/async-each/README.md new file mode 100644 index 0000000..a79cbd7 --- /dev/null +++ b/node_modules/async-each/README.md @@ -0,0 +1,38 @@ +# async-each + +No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach function for JavaScript. + +We don't need junky 30K async libs. Really. + +For browsers and node.js. + +## Installation +* Just include async-each before your scripts. +* `npm install async-each` if you’re using node.js. +* `bower install async-each` if you’re using [Bower](http://bower.io). + +## Usage + +* `each(array, iterator, callback);` — `Array`, `Function`, `(optional) Function` +* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments. +* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`. + +Node.js: + +```javascript +var each = require('async-each'); +each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) { + if (error) console.error(error); + console.log('Contents for a, b and c:', contents); +}); +``` + +Browser: + +```javascript +window.asyncEach(list, fn, callback); +``` + +## License + +[The MIT License](https://raw.githubusercontent.com/paulmillr/mit/master/README.md) diff --git a/node_modules/async-each/index.js b/node_modules/async-each/index.js new file mode 100644 index 0000000..1c51c95 --- /dev/null +++ b/node_modules/async-each/index.js @@ -0,0 +1,38 @@ +// async-each MIT license (by Paul Miller from http://paulmillr.com). +(function(globals) { + 'use strict'; + var each = function(items, next, callback) { + if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument'); + if (typeof next !== 'function') throw new TypeError('each() expects function as second argument'); + if (typeof callback !== 'function') callback = Function.prototype; // no-op + + if (items.length === 0) return callback(undefined, items); + + var transformed = new Array(items.length); + var count = 0; + var returned = false; + + items.forEach(function(item, index) { + next(item, function(error, transformedItem) { + if (returned) return; + if (error) { + returned = true; + return callback(error); + } + transformed[index] = transformedItem; + count += 1; + if (count === items.length) return callback(undefined, transformed); + }); + }); + }; + + if (typeof define !== 'undefined' && define.amd) { + define([], function() { + return each; + }); // RequireJS + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = each; // CommonJS + } else { + globals.asyncEach = each; // '.escapeHTML(); // => '<script>doSomething();</script>' +'<script>doSomething();</script>'.unescapeHTML(); // => '' +``` +#### delay +Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.5.3/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function). +```js +delay(ms) -> promise +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/core/delay +core-js(/library)/fn/delay +``` +[*Examples*](http://goo.gl/lbucba): +```js +delay(1e3).then(() => console.log('after 1 sec')); + +(async () => { + await delay(3e3); + console.log('after 3 sec'); + + while(await delay(3e3))console.log('each 3 sec'); +})(); +``` +#### Helpers for iterators +Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.5.3/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.5.3/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.5.3/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object: +```js +core + .isIterable(var) -> bool + .getIterator(iterable) -> iterator + .getIteratorMethod(var) -> function | undefined +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/is-iterable +core-js(/library)/fn/get-iterator +core-js(/library)/fn/get-iterator-method +``` +[*Examples*](http://goo.gl/SXsM6D): +```js +var list = (function(){ + return arguments; +})(1, 2, 3); + +console.log(core.isIterable(list)); // true; + +var iter = core.getIterator(list); +console.log(iter.next().value); // 1 +console.log(iter.next().value); // 2 +console.log(iter.next().value); // 3 +console.log(iter.next().value); // undefined + +core.getIterator({}); // TypeError: [object Object] is not iterable! + +var iterFn = core.getIteratorMethod(list); +console.log(typeof iterFn); // 'function' +var iter = iterFn.call(list); +console.log(iter.next().value); // 1 +console.log(iter.next().value); // 2 +console.log(iter.next().value); // 3 +console.log(iter.next().value); // undefined + +console.log(core.getIteratorMethod({})); // undefined +``` + +## Missing polyfills +- ES5 `JSON` is missing now only in IE7- and never will it be added to `core-js`, if you need it in these old browsers, many implementations are available, for example, [json3](https://github.com/bestiejs/json3). +- ES6 `String#normalize` is not a very useful feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/). +- ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version. +- ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause a serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines. +- ES7 `SIMD`. `core-js` doesn't add polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js). +- `window.fetch` is not a cross-platform feature, in some environments it makes no sense. For this reason, I don't think it should be in `core-js`. Looking at a large number of requests it *may be* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch). +- ECMA-402 `Intl` is missed because of size. You can use [this polyfill](https://github.com/andyearnshaw/Intl.js/). diff --git a/node_modules/core-js/bower.json b/node_modules/core-js/bower.json new file mode 100644 index 0000000..c1400ba --- /dev/null +++ b/node_modules/core-js/bower.json @@ -0,0 +1,49 @@ +{ + "name": "core.js", + "main": "client/core.js", + "version": "2.5.3", + "description": "Standard Library", + "keywords": [ + "ES3", + "ES5", + "ES6", + "ES7", + "ES2015", + "ES2016", + "ES2017", + "ECMAScript 3", + "ECMAScript 5", + "ECMAScript 6", + "ECMAScript 7", + "ECMAScript 2015", + "ECMAScript 2016", + "ECMAScript 2017", + "Harmony", + "Strawman", + "Map", + "Set", + "WeakMap", + "WeakSet", + "Promise", + "Symbol", + "TypedArray", + "setImmediate", + "Dict", + "polyfill", + "shim" + ], + "authors": [ + "Denis Pushkarev (http://zloirock.ru/)" + ], + "license": "MIT", + "homepage": "https://github.com/zloirock/core-js", + "repository": { + "type": "git", + "url": "https://github.com/zloirock/core-js.git" + }, + "ignore": [ + "build", + "node_modules", + "tests" + ] +} diff --git a/node_modules/core-js/build/Gruntfile.ls b/node_modules/core-js/build/Gruntfile.ls new file mode 100644 index 0000000..7b8e465 --- /dev/null +++ b/node_modules/core-js/build/Gruntfile.ls @@ -0,0 +1,86 @@ +require! <[./build fs ./config]> +module.exports = (grunt)-> + grunt.loadNpmTasks \grunt-contrib-clean + grunt.loadNpmTasks \grunt-contrib-copy + grunt.loadNpmTasks \grunt-contrib-uglify + grunt.loadNpmTasks \grunt-contrib-watch + grunt.loadNpmTasks \grunt-livescript + grunt.loadNpmTasks \grunt-karma + grunt.initConfig do + pkg: grunt.file.readJSON './package.json' + uglify: build: + files: '<%=grunt.option("path")%>.min.js': '<%=grunt.option("path")%>.js' + options: + mangle: {+keep_fnames} + compress: {+keep_fnames, +pure_getters} + output: {max_line_len: 32000} + ie8: on + sourceMap: on + banner: config.banner + livescript: src: files: + './tests/helpers.js': './tests/helpers/*' + './tests/tests.js': './tests/tests/*' + './tests/library.js': './tests/library/*' + './tests/es.js': './tests/tests/es*' + './tests/experimental.js': './tests/experimental/*' + './build/index.js': './build/build.ls*' + clean: <[./library]> + copy: lib: files: + * expand: on + cwd: './' + src: <[es5/** es6/** es7/** stage/** web/** core/** fn/** index.js shim.js]> + dest: './library/' + * expand: on + cwd: './' + src: <[modules/*]> + dest: './library/' + filter: \isFile + * expand: on + cwd: './modules/library/' + src: '*' + dest: './library/modules/' + watch: + core: + files: './modules/*' + tasks: \default + tests: + files: './tests/tests/*' + tasks: \livescript + karma: + 'options': + configFile: './tests/karma.conf.js' + browsers: <[PhantomJS]> + singleRun: on + 'default': {} + 'library': files: <[client/library.js tests/helpers.js tests/library.js]>map -> src: it + grunt.registerTask \build (options)-> + done = @async! + build { + modules: (options || 'es5,es6,es7,js,web,core')split \, + blacklist: (grunt.option(\blacklist) || '')split \, + library: grunt.option(\library) in <[yes on true]> + umd: grunt.option(\umd) not in <[no off false]> + } + .then !-> + grunt.option(\path) || grunt.option(\path, './custom') + fs.writeFile grunt.option(\path) + '.js', it, done + .catch !-> + console.error it + process.exit 1 + grunt.registerTask \client -> + grunt.option \library '' + grunt.option \path './client/core' + grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> + grunt.registerTask \library -> + grunt.option \library 'true' + grunt.option \path './client/library' + grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> + grunt.registerTask \shim -> + grunt.option \library '' + grunt.option \path './client/shim' + grunt.task.run <[build:es5,es6,es7,js,web uglify]> + grunt.registerTask \e -> + grunt.option \library ''> + grunt.option \path './client/core' + grunt.task.run <[build:es5,es6,es7,js,web,core,exp uglify]> + grunt.registerTask \default <[clean copy client library shim]> \ No newline at end of file diff --git a/node_modules/core-js/build/build.ls b/node_modules/core-js/build/build.ls new file mode 100644 index 0000000..6dbfa58 --- /dev/null +++ b/node_modules/core-js/build/build.ls @@ -0,0 +1,62 @@ +require! { + '../library/fn/promise': Promise + './config': {list, experimental, libraryBlacklist, es5SpecialCase, banner} + fs: {readFile, writeFile, unlink} + path: {basename, dirname, join} + webpack, temp +} + +module.exports = ({modules = [], blacklist = [], library = no, umd = on})-> + resolve, reject <~! new Promise _ + let @ = modules.reduce ((memo, it)-> memo[it] = on; memo), {} + if @exp => for experimental => @[..] = on + if @es5 => for es5SpecialCase => @[..] = on + for ns of @ + if @[ns] + for name in list + if name.indexOf("#ns.") is 0 and name not in experimental + @[name] = on + + if library => blacklist ++= libraryBlacklist + for ns in blacklist + for name in list + if name is ns or name.indexOf("#ns.") is 0 + @[name] = no + + TARGET = temp.path {suffix: '.js'} + + err, info <~! webpack do + entry: list.filter(~> @[it]).map ~> + if library => join __dirname, '..', 'library', 'modules', it + else join __dirname, '..', 'modules', it + output: + path: dirname TARGET + filename: basename "./#TARGET" + if err => return reject err + + err, script <~! readFile TARGET + if err => return reject err + + err <~! unlink TARGET + if err => return reject err + + if umd + exportScript = """ + // CommonJS export + if (typeof module != 'undefined' && module.exports) module.exports = __e; + // RequireJS export + else if (typeof define == 'function' && define.amd) define(function () { return __e; }); + // Export to global object + else __g.core = __e; + """ + else + exportScript = "" + + resolve """ + #banner + !function(__e, __g, undefined){ + 'use strict'; + #script + #exportScript + }(1, 1); + """ \ No newline at end of file diff --git a/node_modules/core-js/build/config.js b/node_modules/core-js/build/config.js new file mode 100644 index 0000000..062d810 --- /dev/null +++ b/node_modules/core-js/build/config.js @@ -0,0 +1,274 @@ +module.exports = { + list: [ + 'es6.symbol', + 'es6.object.define-property', + 'es6.object.define-properties', + 'es6.object.get-own-property-descriptor', + 'es6.object.create', + 'es6.object.get-prototype-of', + 'es6.object.keys', + 'es6.object.get-own-property-names', + 'es6.object.freeze', + 'es6.object.seal', + 'es6.object.prevent-extensions', + 'es6.object.is-frozen', + 'es6.object.is-sealed', + 'es6.object.is-extensible', + 'es6.object.assign', + 'es6.object.is', + 'es6.object.set-prototype-of', + 'es6.object.to-string', + 'es6.function.bind', + 'es6.function.name', + 'es6.function.has-instance', + 'es6.number.constructor', + 'es6.number.to-fixed', + 'es6.number.to-precision', + 'es6.number.epsilon', + 'es6.number.is-finite', + 'es6.number.is-integer', + 'es6.number.is-nan', + 'es6.number.is-safe-integer', + 'es6.number.max-safe-integer', + 'es6.number.min-safe-integer', + 'es6.number.parse-float', + 'es6.number.parse-int', + 'es6.parse-int', + 'es6.parse-float', + 'es6.math.acosh', + 'es6.math.asinh', + 'es6.math.atanh', + 'es6.math.cbrt', + 'es6.math.clz32', + 'es6.math.cosh', + 'es6.math.expm1', + 'es6.math.fround', + 'es6.math.hypot', + 'es6.math.imul', + 'es6.math.log10', + 'es6.math.log1p', + 'es6.math.log2', + 'es6.math.sign', + 'es6.math.sinh', + 'es6.math.tanh', + 'es6.math.trunc', + 'es6.string.from-code-point', + 'es6.string.raw', + 'es6.string.trim', + 'es6.string.code-point-at', + 'es6.string.ends-with', + 'es6.string.includes', + 'es6.string.repeat', + 'es6.string.starts-with', + 'es6.string.iterator', + 'es6.string.anchor', + 'es6.string.big', + 'es6.string.blink', + 'es6.string.bold', + 'es6.string.fixed', + 'es6.string.fontcolor', + 'es6.string.fontsize', + 'es6.string.italics', + 'es6.string.link', + 'es6.string.small', + 'es6.string.strike', + 'es6.string.sub', + 'es6.string.sup', + 'es6.array.is-array', + 'es6.array.from', + 'es6.array.of', + 'es6.array.join', + 'es6.array.slice', + 'es6.array.sort', + 'es6.array.for-each', + 'es6.array.map', + 'es6.array.filter', + 'es6.array.some', + 'es6.array.every', + 'es6.array.reduce', + 'es6.array.reduce-right', + 'es6.array.index-of', + 'es6.array.last-index-of', + 'es6.array.copy-within', + 'es6.array.fill', + 'es6.array.find', + 'es6.array.find-index', + 'es6.array.iterator', + 'es6.array.species', + 'es6.regexp.constructor', + 'es6.regexp.to-string', + 'es6.regexp.flags', + 'es6.regexp.match', + 'es6.regexp.replace', + 'es6.regexp.search', + 'es6.regexp.split', + 'es6.promise', + 'es6.map', + 'es6.set', + 'es6.weak-map', + 'es6.weak-set', + 'es6.reflect.apply', + 'es6.reflect.construct', + 'es6.reflect.define-property', + 'es6.reflect.delete-property', + 'es6.reflect.enumerate', + 'es6.reflect.get', + 'es6.reflect.get-own-property-descriptor', + 'es6.reflect.get-prototype-of', + 'es6.reflect.has', + 'es6.reflect.is-extensible', + 'es6.reflect.own-keys', + 'es6.reflect.prevent-extensions', + 'es6.reflect.set', + 'es6.reflect.set-prototype-of', + 'es6.date.now', + 'es6.date.to-json', + 'es6.date.to-iso-string', + 'es6.date.to-string', + 'es6.date.to-primitive', + 'es6.typed.array-buffer', + 'es6.typed.data-view', + 'es6.typed.int8-array', + 'es6.typed.uint8-array', + 'es6.typed.uint8-clamped-array', + 'es6.typed.int16-array', + 'es6.typed.uint16-array', + 'es6.typed.int32-array', + 'es6.typed.uint32-array', + 'es6.typed.float32-array', + 'es6.typed.float64-array', + 'es7.array.includes', + 'es7.array.flat-map', + 'es7.array.flatten', + 'es7.string.at', + 'es7.string.pad-start', + 'es7.string.pad-end', + 'es7.string.trim-left', + 'es7.string.trim-right', + 'es7.string.match-all', + 'es7.symbol.async-iterator', + 'es7.symbol.observable', + 'es7.object.get-own-property-descriptors', + 'es7.object.values', + 'es7.object.entries', + 'es7.object.define-getter', + 'es7.object.define-setter', + 'es7.object.lookup-getter', + 'es7.object.lookup-setter', + 'es7.map.to-json', + 'es7.set.to-json', + 'es7.map.of', + 'es7.set.of', + 'es7.weak-map.of', + 'es7.weak-set.of', + 'es7.map.from', + 'es7.set.from', + 'es7.weak-map.from', + 'es7.weak-set.from', + 'es7.global', + 'es7.system.global', + 'es7.error.is-error', + 'es7.math.clamp', + 'es7.math.deg-per-rad', + 'es7.math.degrees', + 'es7.math.fscale', + 'es7.math.iaddh', + 'es7.math.isubh', + 'es7.math.imulh', + 'es7.math.rad-per-deg', + 'es7.math.radians', + 'es7.math.scale', + 'es7.math.umulh', + 'es7.math.signbit', + 'es7.promise.finally', + 'es7.promise.try', + 'es7.reflect.define-metadata', + 'es7.reflect.delete-metadata', + 'es7.reflect.get-metadata', + 'es7.reflect.get-metadata-keys', + 'es7.reflect.get-own-metadata', + 'es7.reflect.get-own-metadata-keys', + 'es7.reflect.has-metadata', + 'es7.reflect.has-own-metadata', + 'es7.reflect.metadata', + 'es7.asap', + 'es7.observable', + 'web.immediate', + 'web.dom.iterable', + 'web.timers', + 'core.dict', + 'core.get-iterator-method', + 'core.get-iterator', + 'core.is-iterable', + 'core.delay', + 'core.function.part', + 'core.object.is-object', + 'core.object.classof', + 'core.object.define', + 'core.object.make', + 'core.number.iterator', + 'core.regexp.escape', + 'core.string.escape-html', + 'core.string.unescape-html', + ], + experimental: [ + ], + libraryBlacklist: [ + 'es6.object.to-string', + 'es6.function.name', + 'es6.regexp.constructor', + 'es6.regexp.to-string', + 'es6.regexp.flags', + 'es6.regexp.match', + 'es6.regexp.replace', + 'es6.regexp.search', + 'es6.regexp.split', + 'es6.number.constructor', + 'es6.date.to-string', + 'es6.date.to-primitive', + ], + es5SpecialCase: [ + 'es6.object.create', + 'es6.object.define-property', + 'es6.object.define-properties', + 'es6.object.get-own-property-descriptor', + 'es6.object.get-prototype-of', + 'es6.object.keys', + 'es6.object.get-own-property-names', + 'es6.object.freeze', + 'es6.object.seal', + 'es6.object.prevent-extensions', + 'es6.object.is-frozen', + 'es6.object.is-sealed', + 'es6.object.is-extensible', + 'es6.function.bind', + 'es6.array.is-array', + 'es6.array.join', + 'es6.array.slice', + 'es6.array.sort', + 'es6.array.for-each', + 'es6.array.map', + 'es6.array.filter', + 'es6.array.some', + 'es6.array.every', + 'es6.array.reduce', + 'es6.array.reduce-right', + 'es6.array.index-of', + 'es6.array.last-index-of', + 'es6.number.to-fixed', + 'es6.number.to-precision', + 'es6.date.now', + 'es6.date.to-iso-string', + 'es6.date.to-json', + 'es6.string.trim', + 'es6.regexp.to-string', + 'es6.parse-int', + 'es6.parse-float', + ], + banner: '/**\n' + + ' * core-js ' + require('../package').version + '\n' + + ' * https://github.com/zloirock/core-js\n' + + ' * License: http://rock.mit-license.org\n' + + ' * © ' + new Date().getFullYear() + ' Denis Pushkarev\n' + + ' */', +}; diff --git a/node_modules/core-js/build/index.js b/node_modules/core-js/build/index.js new file mode 100644 index 0000000..1df7f10 --- /dev/null +++ b/node_modules/core-js/build/index.js @@ -0,0 +1,104 @@ +// Generated by LiveScript 1.4.0 +(function(){ + var Promise, ref$, list, experimental, libraryBlacklist, es5SpecialCase, banner, readFile, writeFile, unlink, basename, dirname, join, webpack, temp; + Promise = require('../library/fn/promise'); + ref$ = require('./config'), list = ref$.list, experimental = ref$.experimental, libraryBlacklist = ref$.libraryBlacklist, es5SpecialCase = ref$.es5SpecialCase, banner = ref$.banner; + ref$ = require('fs'), readFile = ref$.readFile, writeFile = ref$.writeFile, unlink = ref$.unlink; + ref$ = require('path'), basename = ref$.basename, dirname = ref$.dirname, join = ref$.join; + webpack = require('webpack'); + temp = require('temp'); + module.exports = function(arg$){ + var modules, ref$, blacklist, library, umd, this$ = this; + modules = (ref$ = arg$.modules) != null + ? ref$ + : [], blacklist = (ref$ = arg$.blacklist) != null + ? ref$ + : [], library = (ref$ = arg$.library) != null ? ref$ : false, umd = (ref$ = arg$.umd) != null ? ref$ : true; + return new Promise(function(resolve, reject){ + (function(){ + var i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this; + if (this.exp) { + for (i$ = 0, len$ = (ref$ = experimental).length; i$ < len$; ++i$) { + x$ = ref$[i$]; + this[x$] = true; + } + } + if (this.es5) { + for (i$ = 0, len$ = (ref$ = es5SpecialCase).length; i$ < len$; ++i$) { + y$ = ref$[i$]; + this[y$] = true; + } + } + for (ns in this) { + if (this[ns]) { + for (i$ = 0, len$ = (ref$ = list).length; i$ < len$; ++i$) { + name = ref$[i$]; + if (name.indexOf(ns + ".") === 0 && !in$(name, experimental)) { + this[name] = true; + } + } + } + } + if (library) { + blacklist = blacklist.concat(libraryBlacklist); + } + for (i$ = 0, len$ = blacklist.length; i$ < len$; ++i$) { + ns = blacklist[i$]; + for (j$ = 0, len1$ = (ref$ = list).length; j$ < len1$; ++j$) { + name = ref$[j$]; + if (name === ns || name.indexOf(ns + ".") === 0) { + this[name] = false; + } + } + } + TARGET = temp.path({ + suffix: '.js' + }); + webpack({ + entry: list.filter(function(it){ + return this$[it]; + }).map(function(it){ + if (library) { + return join(__dirname, '..', 'library', 'modules', it); + } else { + return join(__dirname, '..', 'modules', it); + } + }), + output: { + path: dirname(TARGET), + filename: basename("./" + TARGET) + } + }, function(err, info){ + if (err) { + return reject(err); + } + readFile(TARGET, function(err, script){ + if (err) { + return reject(err); + } + unlink(TARGET, function(err){ + var exportScript; + if (err) { + return reject(err); + } + if (umd) { + exportScript = "// CommonJS export\nif (typeof module != 'undefined' && module.exports) module.exports = __e;\n// RequireJS export\nelse if (typeof define == 'function' && define.amd) define(function () { return __e; });\n// Export to global object\nelse __g.core = __e;"; + } else { + exportScript = ""; + } + resolve("" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n" + exportScript + "\n}(1, 1);"); + }); + }); + }); + }.call(modules.reduce(function(memo, it){ + memo[it] = true; + return memo; + }, {}))); + }); + }; + function in$(x, xs){ + var i = -1, l = xs.length >>> 0; + while (++i < l) if (x === xs[i]) return true; + return false; + } +}).call(this); diff --git a/node_modules/core-js/client/core.js b/node_modules/core-js/client/core.js new file mode 100644 index 0000000..6ad77e9 --- /dev/null +++ b/node_modules/core-js/client/core.js @@ -0,0 +1,8624 @@ +/** + * core-js 2.5.3 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2017 Denis Pushkarev + */ +!function(__e, __g, undefined){ +'use strict'; +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 129); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(18); +var hide = __webpack_require__(13); +var redefine = __webpack_require__(14); +var ctx = __webpack_require__(19); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; +global.core = core; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(50)('wks'); +var uid = __webpack_require__(35); +var Symbol = __webpack_require__(2).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var IE8_DOM_DEFINE = __webpack_require__(95); +var toPrimitive = __webpack_require__(22); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(7) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(4)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(24); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(23); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(47); +var defined = __webpack_require__(23); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(6); +var createDesc = __webpack_require__(31); +module.exports = __webpack_require__(7) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(13); +var has = __webpack_require__(12); +var SRC = __webpack_require__(35)('src'); +var TO_STRING = 'toString'; +var $toString = Function[TO_STRING]; +var TPL = ('' + $toString).split(TO_STRING); + +__webpack_require__(18).inspectSource = function (it) { + return $toString.call(it); +}; + +(module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || $toString.call(this); +}); + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(48); +var createDesc = __webpack_require__(31); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(22); +var has = __webpack_require__(12); +var IE8_DOM_DEFINE = __webpack_require__(95); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(7) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(12); +var toObject = __webpack_require__(9); +var IE_PROTO = __webpack_require__(68)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var fails = __webpack_require__(4); +var defined = __webpack_require__(23); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.3' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(10); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(4); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(3); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(0); +var core = __webpack_require__(18); +var fails = __webpack_require__(4); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = __webpack_require__(19); +var IObject = __webpack_require__(47); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(8); +var asc = __webpack_require__(84); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(97); +var enumBugKeys = __webpack_require__(69); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(1); +var dPs = __webpack_require__(98); +var enumBugKeys = __webpack_require__(69); +var IE_PROTO = __webpack_require__(68)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(66)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(70).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +if (__webpack_require__(7)) { + var LIBRARY = __webpack_require__(36); + var global = __webpack_require__(2); + var fails = __webpack_require__(4); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(62); + var $buffer = __webpack_require__(92); + var ctx = __webpack_require__(19); + var anInstance = __webpack_require__(42); + var propertyDesc = __webpack_require__(31); + var hide = __webpack_require__(13); + var redefineAll = __webpack_require__(43); + var toInteger = __webpack_require__(24); + var toLength = __webpack_require__(8); + var toIndex = __webpack_require__(118); + var toAbsoluteIndex = __webpack_require__(37); + var toPrimitive = __webpack_require__(22); + var has = __webpack_require__(12); + var classof = __webpack_require__(39); + var isObject = __webpack_require__(3); + var toObject = __webpack_require__(9); + var isArrayIter = __webpack_require__(82); + var create = __webpack_require__(28); + var getPrototypeOf = __webpack_require__(16); + var gOPN = __webpack_require__(38).f; + var getIterFn = __webpack_require__(49); + var uid = __webpack_require__(35); + var wks = __webpack_require__(5); + var createArrayMethod = __webpack_require__(26); + var createArrayIncludes = __webpack_require__(51); + var speciesConstructor = __webpack_require__(60); + var ArrayIterators = __webpack_require__(86); + var Iterators = __webpack_require__(40); + var $iterDetect = __webpack_require__(57); + var setSpecies = __webpack_require__(41); + var arrayFill = __webpack_require__(85); + var arrayCopyWithin = __webpack_require__(109); + var $DP = __webpack_require__(6); + var $GOPD = __webpack_require__(15); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal]; } }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function (target, key) { + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if (fails(function () { arrayToString.call({}); })) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, { toLocaleString: $toLocaleString }); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function () { /* empty */ }; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +var Map = __webpack_require__(113); +var $export = __webpack_require__(0); +var shared = __webpack_require__(50)('metadata'); +var store = shared.store || (shared.store = new (__webpack_require__(116))()); + +var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, targetMetadata = new Map()); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map()); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); + return keys; +}; +var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function (O) { + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(35)('meta'); +var isObject = __webpack_require__(3); +var has = __webpack_require__(12); +var setDesc = __webpack_require__(6).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(4)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = __webpack_require__(5)('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(13)(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(19); +var call = __webpack_require__(107); +var isArrayIter = __webpack_require__(82); +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(8); +var getIterFn = __webpack_require__(49); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +module.exports = false; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(24); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(97); +var hiddenKeys = __webpack_require__(69).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(20); +var TAG = __webpack_require__(5)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var dP = __webpack_require__(6); +var DESCRIPTORS = __webpack_require__(7); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +var redefine = __webpack_require__(14); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(6).f; +var has = __webpack_require__(12); +var TAG = __webpack_require__(5)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var defined = __webpack_require__(23); +var fails = __webpack_require__(4); +var spaces = __webpack_require__(75); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(20); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(39); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(40); +module.exports = __webpack_require__(18).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +module.exports = function (key) { + return store[key] || (store[key] = {}); +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(8); +var toAbsoluteIndex = __webpack_require__(37); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(20); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(3); +var cof = __webpack_require__(20); +var MATCH = __webpack_require__(5)('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(36); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(14); +var hide = __webpack_require__(13); +var has = __webpack_require__(12); +var Iterators = __webpack_require__(40); +var $iterCreate = __webpack_require__(56); +var setToStringTag = __webpack_require__(44); +var getPrototypeOf = __webpack_require__(16); +var ITERATOR = __webpack_require__(5)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = (!BUGGY && $native) || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(28); +var descriptor = __webpack_require__(31); +var setToStringTag = __webpack_require__(44); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(13)(IteratorPrototype, __webpack_require__(5)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(5)('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.2.5.3 get RegExp.prototype.flags +var anObject = __webpack_require__(1); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var hide = __webpack_require__(13); +var redefine = __webpack_require__(14); +var fails = __webpack_require__(4); +var defined = __webpack_require__(23); +var wks = __webpack_require__(5); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + var fns = exec(defined, SYMBOL, ''[KEY]); + var strfn = fns[0]; + var rxfn = fns[1]; + if (fails(function () { + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + })) { + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(1); +var aFunction = __webpack_require__(10); +var SPECIES = __webpack_require__(5)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(14); +var redefineAll = __webpack_require__(43); +var meta = __webpack_require__(32); +var forOf = __webpack_require__(34); +var anInstance = __webpack_require__(42); +var isObject = __webpack_require__(3); +var fails = __webpack_require__(4); +var $iterDetect = __webpack_require__(57); +var setToStringTag = __webpack_require__(44); +var inheritIfRequired = __webpack_require__(74); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(13); +var uid = __webpack_require__(35); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// Forced replacement prototype accessors methods +module.exports = __webpack_require__(36) || !__webpack_require__(4)(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete __webpack_require__(2)[K]; +}); + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(0); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var ctx = __webpack_require__(19); +var forOf = __webpack_require__(34); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var document = __webpack_require__(2).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(18); +var LIBRARY = __webpack_require__(36); +var wksExt = __webpack_require__(96); +var defineProperty = __webpack_require__(6).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(50)('keys'); +var uid = __webpack_require__(35); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(2).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(27); +var gOPS = __webpack_require__(52); +var pIE = __webpack_require__(48); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(47); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(4)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(3); +var anObject = __webpack_require__(1); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(19)(Function.call, __webpack_require__(15).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var setPrototypeOf = __webpack_require__(72).set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports) { + +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(24); +var defined = __webpack_require__(23); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports) { + +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports) { + +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(24); +var defined = __webpack_require__(23); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(54); +var defined = __webpack_require__(23); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +var MATCH = __webpack_require__(5)('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(40); +var ITERATOR = __webpack_require__(5)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(6); +var createDesc = __webpack_require__(31); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(213); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + +var toObject = __webpack_require__(9); +var toAbsoluteIndex = __webpack_require__(37); +var toLength = __webpack_require__(8); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(33); +var step = __webpack_require__(87); +var Iterators = __webpack_require__(40); +var toIObject = __webpack_require__(11); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(55)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 87 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(19); +var invoke = __webpack_require__(73); +var html = __webpack_require__(70); +var cel = __webpack_require__(66); +var global = __webpack_require__(2); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(20)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var macrotask = __webpack_require__(88).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(20)(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(10); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(38); +var gOPS = __webpack_require__(52); +var anObject = __webpack_require__(1); +var Reflect = __webpack_require__(2).Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var DESCRIPTORS = __webpack_require__(7); +var LIBRARY = __webpack_require__(36); +var $typed = __webpack_require__(62); +var hide = __webpack_require__(13); +var redefineAll = __webpack_require__(43); +var fails = __webpack_require__(4); +var anInstance = __webpack_require__(42); +var toInteger = __webpack_require__(24); +var toLength = __webpack_require__(8); +var toIndex = __webpack_require__(118); +var gOPN = __webpack_require__(38).f; +var dP = __webpack_require__(6).f; +var arrayFill = __webpack_require__(85); +var setToStringTag = __webpack_require__(44); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports) { + +module.exports = function (regExp, replace) { + var replacer = replace === Object(replace) ? function (part) { + return replace[part]; + } : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; +}; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(7) && !__webpack_require__(4)(function () { + return Object.defineProperty(__webpack_require__(66)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(5); + + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(12); +var toIObject = __webpack_require__(11); +var arrayIndexOf = __webpack_require__(51)(false); +var IE_PROTO = __webpack_require__(68)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(6); +var anObject = __webpack_require__(1); +var getKeys = __webpack_require__(27); + +module.exports = __webpack_require__(7) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(11); +var gOPN = __webpack_require__(38).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(10); +var isObject = __webpack_require__(3); +var invoke = __webpack_require__(73); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +var cof = __webpack_require__(20); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__(3); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(2).parseFloat; +var $trim = __webpack_require__(45).trim; + +module.exports = 1 / $parseFloat(__webpack_require__(75) + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(2).parseInt; +var $trim = __webpack_require__(45).trim; +var ws = __webpack_require__(75); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports) { + +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__(77); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(1); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(47); +var toLength = __webpack_require__(8); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + +var toObject = __webpack_require__(9); +var toAbsoluteIndex = __webpack_require__(37); +var toLength = __webpack_require__(8); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +// 21.2.5.3 get RegExp.prototype.flags() +if (__webpack_require__(7) && /./g.flags != 'g') __webpack_require__(6).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(58) +}); + + +/***/ }), +/* 111 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var newPromiseCapability = __webpack_require__(90); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(114); +var validate = __webpack_require__(46); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__(61)(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(6).f; +var create = __webpack_require__(28); +var redefineAll = __webpack_require__(43); +var ctx = __webpack_require__(19); +var anInstance = __webpack_require__(42); +var forOf = __webpack_require__(34); +var $iterDefine = __webpack_require__(55); +var step = __webpack_require__(87); +var setSpecies = __webpack_require__(41); +var DESCRIPTORS = __webpack_require__(7); +var fastKey = __webpack_require__(32).fastKey; +var validate = __webpack_require__(46); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(114); +var validate = __webpack_require__(46); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = __webpack_require__(61)(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var each = __webpack_require__(26)(0); +var redefine = __webpack_require__(14); +var meta = __webpack_require__(32); +var assign = __webpack_require__(71); +var weak = __webpack_require__(117); +var isObject = __webpack_require__(3); +var fails = __webpack_require__(4); +var validate = __webpack_require__(46); +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var tmp = {}; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = __webpack_require__(61)(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(43); +var getWeak = __webpack_require__(32).getWeak; +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var anInstance = __webpack_require__(42); +var forOf = __webpack_require__(34); +var createArrayMethod = __webpack_require__(26); +var $has = __webpack_require__(12); +var validate = __webpack_require__(46); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(24); +var toLength = __webpack_require__(8); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = __webpack_require__(53); +var isObject = __webpack_require__(3); +var toLength = __webpack_require__(8); +var ctx = __webpack_require__(19); +var IS_CONCAT_SPREADABLE = __webpack_require__(5)('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(8); +var repeat = __webpack_require__(76); +var defined = __webpack_require__(23); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(27); +var toIObject = __webpack_require__(11); +var isEnum = __webpack_require__(48).f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) if (isEnum.call(O, key = keys[i++])) { + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(39); +var from = __webpack_require__(123); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +var forOf = __webpack_require__(34); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports) { + +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(39); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(40); +module.exports = __webpack_require__(18).isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var path = __webpack_require__(127); +var invoke = __webpack_require__(73); +var aFunction = __webpack_require__(10); +module.exports = function (/* ...pargs */) { + var fn = aFunction(this); + var length = arguments.length; + var pargs = new Array(length); + var i = 0; + var _ = path._; + var holder = false; + while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true; + return function (/* ...args */) { + var that = this; + var aLen = arguments.length; + var j = 0; + var k = 0; + var args; + if (!holder && !aLen) return invoke(fn, pargs, that); + args = pargs.slice(); + if (holder) for (;length > j; j++) if (args[j] === _) args[j] = arguments[k++]; + while (aLen > k) args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(2); + + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(6); +var gOPD = __webpack_require__(15); +var ownKeys = __webpack_require__(91); +var toIObject = __webpack_require__(11); + +module.exports = function define(target, mixin) { + var keys = ownKeys(toIObject(mixin)); + var length = keys.length; + var i = 0; + var key; + while (length > i) dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; +}; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(130); +__webpack_require__(132); +__webpack_require__(133); +__webpack_require__(134); +__webpack_require__(135); +__webpack_require__(136); +__webpack_require__(137); +__webpack_require__(138); +__webpack_require__(139); +__webpack_require__(140); +__webpack_require__(141); +__webpack_require__(142); +__webpack_require__(143); +__webpack_require__(144); +__webpack_require__(145); +__webpack_require__(146); +__webpack_require__(148); +__webpack_require__(149); +__webpack_require__(150); +__webpack_require__(151); +__webpack_require__(152); +__webpack_require__(153); +__webpack_require__(154); +__webpack_require__(155); +__webpack_require__(156); +__webpack_require__(157); +__webpack_require__(158); +__webpack_require__(159); +__webpack_require__(160); +__webpack_require__(161); +__webpack_require__(162); +__webpack_require__(163); +__webpack_require__(164); +__webpack_require__(165); +__webpack_require__(166); +__webpack_require__(167); +__webpack_require__(168); +__webpack_require__(169); +__webpack_require__(170); +__webpack_require__(171); +__webpack_require__(172); +__webpack_require__(173); +__webpack_require__(174); +__webpack_require__(175); +__webpack_require__(176); +__webpack_require__(177); +__webpack_require__(178); +__webpack_require__(179); +__webpack_require__(180); +__webpack_require__(181); +__webpack_require__(182); +__webpack_require__(183); +__webpack_require__(184); +__webpack_require__(185); +__webpack_require__(186); +__webpack_require__(187); +__webpack_require__(188); +__webpack_require__(189); +__webpack_require__(190); +__webpack_require__(191); +__webpack_require__(192); +__webpack_require__(193); +__webpack_require__(194); +__webpack_require__(195); +__webpack_require__(196); +__webpack_require__(197); +__webpack_require__(198); +__webpack_require__(199); +__webpack_require__(200); +__webpack_require__(201); +__webpack_require__(202); +__webpack_require__(203); +__webpack_require__(204); +__webpack_require__(205); +__webpack_require__(206); +__webpack_require__(207); +__webpack_require__(208); +__webpack_require__(209); +__webpack_require__(210); +__webpack_require__(211); +__webpack_require__(212); +__webpack_require__(214); +__webpack_require__(215); +__webpack_require__(216); +__webpack_require__(217); +__webpack_require__(218); +__webpack_require__(219); +__webpack_require__(220); +__webpack_require__(221); +__webpack_require__(222); +__webpack_require__(223); +__webpack_require__(224); +__webpack_require__(225); +__webpack_require__(86); +__webpack_require__(226); +__webpack_require__(227); +__webpack_require__(228); +__webpack_require__(110); +__webpack_require__(229); +__webpack_require__(230); +__webpack_require__(231); +__webpack_require__(232); +__webpack_require__(233); +__webpack_require__(113); +__webpack_require__(115); +__webpack_require__(116); +__webpack_require__(234); +__webpack_require__(235); +__webpack_require__(236); +__webpack_require__(237); +__webpack_require__(238); +__webpack_require__(239); +__webpack_require__(240); +__webpack_require__(241); +__webpack_require__(242); +__webpack_require__(243); +__webpack_require__(244); +__webpack_require__(245); +__webpack_require__(246); +__webpack_require__(247); +__webpack_require__(248); +__webpack_require__(249); +__webpack_require__(250); +__webpack_require__(251); +__webpack_require__(253); +__webpack_require__(254); +__webpack_require__(256); +__webpack_require__(257); +__webpack_require__(258); +__webpack_require__(259); +__webpack_require__(260); +__webpack_require__(261); +__webpack_require__(262); +__webpack_require__(263); +__webpack_require__(264); +__webpack_require__(265); +__webpack_require__(266); +__webpack_require__(267); +__webpack_require__(268); +__webpack_require__(269); +__webpack_require__(270); +__webpack_require__(271); +__webpack_require__(272); +__webpack_require__(273); +__webpack_require__(274); +__webpack_require__(275); +__webpack_require__(276); +__webpack_require__(277); +__webpack_require__(278); +__webpack_require__(279); +__webpack_require__(280); +__webpack_require__(281); +__webpack_require__(282); +__webpack_require__(283); +__webpack_require__(284); +__webpack_require__(285); +__webpack_require__(286); +__webpack_require__(287); +__webpack_require__(288); +__webpack_require__(289); +__webpack_require__(290); +__webpack_require__(291); +__webpack_require__(292); +__webpack_require__(293); +__webpack_require__(294); +__webpack_require__(295); +__webpack_require__(296); +__webpack_require__(297); +__webpack_require__(298); +__webpack_require__(299); +__webpack_require__(300); +__webpack_require__(301); +__webpack_require__(302); +__webpack_require__(303); +__webpack_require__(304); +__webpack_require__(305); +__webpack_require__(306); +__webpack_require__(307); +__webpack_require__(308); +__webpack_require__(309); +__webpack_require__(310); +__webpack_require__(311); +__webpack_require__(312); +__webpack_require__(313); +__webpack_require__(314); +__webpack_require__(315); +__webpack_require__(316); +__webpack_require__(317); +__webpack_require__(318); +__webpack_require__(319); +__webpack_require__(320); +__webpack_require__(321); +__webpack_require__(322); +__webpack_require__(323); +__webpack_require__(324); +__webpack_require__(325); +__webpack_require__(326); +__webpack_require__(49); +__webpack_require__(328); +__webpack_require__(125); +__webpack_require__(329); +__webpack_require__(330); +__webpack_require__(331); +__webpack_require__(332); +__webpack_require__(333); +__webpack_require__(334); +__webpack_require__(335); +__webpack_require__(336); +__webpack_require__(337); +module.exports = __webpack_require__(338); + + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(2); +var has = __webpack_require__(12); +var DESCRIPTORS = __webpack_require__(7); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(14); +var META = __webpack_require__(32).KEY; +var $fails = __webpack_require__(4); +var shared = __webpack_require__(50); +var setToStringTag = __webpack_require__(44); +var uid = __webpack_require__(35); +var wks = __webpack_require__(5); +var wksExt = __webpack_require__(96); +var wksDefine = __webpack_require__(67); +var enumKeys = __webpack_require__(131); +var isArray = __webpack_require__(53); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(22); +var createDesc = __webpack_require__(31); +var _create = __webpack_require__(28); +var gOPNExt = __webpack_require__(99); +var $GOPD = __webpack_require__(15); +var $DP = __webpack_require__(6); +var $keys = __webpack_require__(27); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(38).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(48).f = $propertyIsEnumerable; + __webpack_require__(52).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(36)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(13)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(27); +var gOPS = __webpack_require__(52); +var pIE = __webpack_require__(48); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperty: __webpack_require__(6).f }); + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperties: __webpack_require__(98) }); + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(11); +var $getOwnPropertyDescriptor = __webpack_require__(15).f; + +__webpack_require__(25)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(28) }); + + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(9); +var $getPrototypeOf = __webpack_require__(16); + +__webpack_require__(25)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(9); +var $keys = __webpack_require__(27); + +__webpack_require__(25)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__(25)('getOwnPropertyNames', function () { + return __webpack_require__(99).f; +}); + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(32).onFreeze; + +__webpack_require__(25)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(32).onFreeze; + +__webpack_require__(25)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(32).onFreeze; + +__webpack_require__(25)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__(3); + +__webpack_require__(25)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__(3); + +__webpack_require__(25)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__(3); + +__webpack_require__(25)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(71) }); + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.10 Object.is(value1, value2) +var $export = __webpack_require__(0); +$export($export.S, 'Object', { is: __webpack_require__(147) }); + + +/***/ }), +/* 147 */ +/***/ (function(module, exports) { + +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(0); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(72).set }); + + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.3.6 Object.prototype.toString() +var classof = __webpack_require__(39); +var test = {}; +test[__webpack_require__(5)('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + __webpack_require__(14)(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = __webpack_require__(0); + +$export($export.P, 'Function', { bind: __webpack_require__(100) }); + + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(6).f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || __webpack_require__(7) && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var isObject = __webpack_require__(3); +var getPrototypeOf = __webpack_require__(16); +var HAS_INSTANCE = __webpack_require__(5)('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(6).f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var has = __webpack_require__(12); +var cof = __webpack_require__(20); +var inheritIfRequired = __webpack_require__(74); +var toPrimitive = __webpack_require__(22); +var fails = __webpack_require__(4); +var gOPN = __webpack_require__(38).f; +var gOPD = __webpack_require__(15).f; +var dP = __webpack_require__(6).f; +var $trim = __webpack_require__(45).trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(__webpack_require__(28)(proto)) == NUMBER; +var TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default: return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for (var keys = __webpack_require__(7) ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(14)(global, NUMBER, $Number); +} + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toInteger = __webpack_require__(24); +var aNumberValue = __webpack_require__(101); +var repeat = __webpack_require__(76); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !__webpack_require__(4)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); + + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $fails = __webpack_require__(4); +var aNumberValue = __webpack_require__(101); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.1 Number.EPSILON +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.2 Number.isFinite(number) +var $export = __webpack_require__(0); +var _isFinite = __webpack_require__(2).isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { isInteger: __webpack_require__(102) }); + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.4 Number.isNaN(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.5 Number.isSafeInteger(number) +var $export = __webpack_require__(0); +var isInteger = __webpack_require__(102); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(103); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(104); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(104); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(103); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.3 Math.acosh(x) +var $export = __webpack_require__(0); +var log1p = __webpack_require__(105); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); + + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.5 Math.asinh(x) +var $export = __webpack_require__(0); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.7 Math.atanh(x) +var $export = __webpack_require__(0); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.9 Math.cbrt(x) +var $export = __webpack_require__(0); +var sign = __webpack_require__(77); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.11 Math.clz32(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); + + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.12 Math.cosh(x) +var $export = __webpack_require__(0); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.14 Math.expm1(x) +var $export = __webpack_require__(0); +var $expm1 = __webpack_require__(78); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { fround: __webpack_require__(106) }); + + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = __webpack_require__(0); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); + + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.18 Math.imul(x, y) +var $export = __webpack_require__(0); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * __webpack_require__(4)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.21 Math.log10(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); + + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.20 Math.log1p(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { log1p: __webpack_require__(105) }); + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.22 Math.log2(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { sign: __webpack_require__(77) }); + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(78); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * __webpack_require__(4)(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.33 Math.tanh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(78); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.34 Math.trunc(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); + + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toAbsoluteIndex = __webpack_require__(37); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(8); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__(45)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $at = __webpack_require__(79)(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + +var $export = __webpack_require__(0); +var toLength = __webpack_require__(8); +var context = __webpack_require__(80); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(81)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.7 String.prototype.includes(searchString, position = 0) + +var $export = __webpack_require__(0); +var context = __webpack_require__(80); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(81)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(76) +}); + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + +var $export = __webpack_require__(0); +var toLength = __webpack_require__(8); +var context = __webpack_require__(80); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(81)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(79)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(55)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__(17)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__(17)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__(17)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__(17)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__(17)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__(17)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__(17)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__(17)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__(17)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__(17)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__(17)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__(17)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__(17)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = __webpack_require__(0); + +$export($export.S, 'Array', { isArray: __webpack_require__(53) }); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(19); +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var call = __webpack_require__(107); +var isArrayIter = __webpack_require__(82); +var toLength = __webpack_require__(8); +var createProperty = __webpack_require__(83); +var getIterFn = __webpack_require__(49); + +$export($export.S + $export.F * !__webpack_require__(57)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var createProperty = __webpack_require__(83); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * __webpack_require__(4)(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.13 Array.prototype.join(separator) +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (__webpack_require__(47) != Object || !__webpack_require__(21)(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var html = __webpack_require__(70); +var cof = __webpack_require__(20); +var toAbsoluteIndex = __webpack_require__(37); +var toLength = __webpack_require__(8); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * __webpack_require__(4)(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var fails = __webpack_require__(4); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !__webpack_require__(21)($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); + + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $forEach = __webpack_require__(26)(0); +var STRICT = __webpack_require__(21)([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var isArray = __webpack_require__(53); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; + + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $map = __webpack_require__(26)(1); + +$export($export.P + $export.F * !__webpack_require__(21)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $filter = __webpack_require__(26)(2); + +$export($export.P + $export.F * !__webpack_require__(21)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $some = __webpack_require__(26)(3); + +$export($export.P + $export.F * !__webpack_require__(21)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $every = __webpack_require__(26)(4); + +$export($export.P + $export.F * !__webpack_require__(21)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(108); + +$export($export.P + $export.F * !__webpack_require__(21)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); + + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(108); + +$export($export.P + $export.F * !__webpack_require__(21)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); + + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $indexOf = __webpack_require__(51)(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(21)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toInteger = __webpack_require__(24); +var toLength = __webpack_require__(8); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(21)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); + + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = __webpack_require__(0); + +$export($export.P, 'Array', { copyWithin: __webpack_require__(109) }); + +__webpack_require__(33)('copyWithin'); + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = __webpack_require__(0); + +$export($export.P, 'Array', { fill: __webpack_require__(85) }); + +__webpack_require__(33)('fill'); + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = __webpack_require__(0); +var $find = __webpack_require__(26)(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(33)(KEY); + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = __webpack_require__(0); +var $find = __webpack_require__(26)(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(33)(KEY); + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(41)('Array'); + + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var inheritIfRequired = __webpack_require__(74); +var dP = __webpack_require__(6).f; +var gOPN = __webpack_require__(38).f; +var isRegExp = __webpack_require__(54); +var $flags = __webpack_require__(58); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var CORRECT_NEW = new $RegExp(re1) !== re1; + +if (__webpack_require__(7) && (!CORRECT_NEW || __webpack_require__(4)(function () { + re2[__webpack_require__(5)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; +}))) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function (key) { + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function () { return Base[key]; }, + set: function (it) { Base[key] = it; } + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(14)(global, 'RegExp', $RegExp); +} + +__webpack_require__(41)('RegExp'); + + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(110); +var anObject = __webpack_require__(1); +var $flags = __webpack_require__(58); +var DESCRIPTORS = __webpack_require__(7); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + __webpack_require__(14)(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (__webpack_require__(4)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { + define(function toString() { + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); +// FF44- RegExp#toString has a wrong name +} else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); +} + + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +// @@match logic +__webpack_require__(59)('match', 1, function (defined, MATCH, $match) { + // 21.1.3.11 String.prototype.match(regexp) + return [function match(regexp) { + 'use strict'; + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; +}); + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +// @@replace logic +__webpack_require__(59)('replace', 2, function (defined, REPLACE, $replace) { + // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) + return [function replace(searchValue, replaceValue) { + 'use strict'; + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; +}); + + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +// @@search logic +__webpack_require__(59)('search', 1, function (defined, SEARCH, $search) { + // 21.1.3.15 String.prototype.search(regexp) + return [function search(regexp) { + 'use strict'; + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; +}); + + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +// @@split logic +__webpack_require__(59)('split', 2, function (defined, SPLIT, $split) { + 'use strict'; + var isRegExp = __webpack_require__(54); + var _split = $split; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var LAST_INDEX = 'lastIndex'; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group + // based on es5-shim implementation, need to rework it + $split = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return _split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var separator2, match, lastIndex, lastLength, i; + // Doesn't need flags gy, but they don't hurt + if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + while (match = separatorCopy.exec(string)) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0][LENGTH]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG + // eslint-disable-next-line no-loop-func + if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () { + for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined; + }); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + $split = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); + }; + } + // 21.1.3.17 String.prototype.split(separator, limit) + return [function split(separator, limit) { + var O = defined(this); + var fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; +}); + + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(36); +var global = __webpack_require__(2); +var ctx = __webpack_require__(19); +var classof = __webpack_require__(39); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(3); +var aFunction = __webpack_require__(10); +var anInstance = __webpack_require__(42); +var forOf = __webpack_require__(34); +var speciesConstructor = __webpack_require__(60); +var task = __webpack_require__(88).set; +var microtask = __webpack_require__(89)(); +var newPromiseCapabilityModule = __webpack_require__(90); +var perform = __webpack_require__(111); +var promiseResolve = __webpack_require__(112); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(5)('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(43)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(44)($Promise, PROMISE); +__webpack_require__(41)(PROMISE); +Wrapper = __webpack_require__(18)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(57)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var weak = __webpack_require__(117); +var validate = __webpack_require__(46); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +__webpack_require__(61)(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var rApply = (__webpack_require__(2).Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !__webpack_require__(4)(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = __webpack_require__(0); +var create = __webpack_require__(28); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var fails = __webpack_require__(4); +var bind = __webpack_require__(100); +var rConstruct = (__webpack_require__(2).Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = __webpack_require__(6); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(22); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * __webpack_require__(4)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = __webpack_require__(0); +var gOPD = __webpack_require__(15).f; +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); + + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 26.1.5 Reflect.enumerate(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +__webpack_require__(56)(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); + + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = __webpack_require__(15); +var getPrototypeOf = __webpack_require__(16); +var has = __webpack_require__(12); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(3); +var anObject = __webpack_require__(1); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); + + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = __webpack_require__(15); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = __webpack_require__(0); +var getProto = __webpack_require__(16); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.9 Reflect.has(target, propertyKey) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); + + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.10 Reflect.isExtensible(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__(91) }); + + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.12 Reflect.preventExtensions(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = __webpack_require__(6); +var gOPD = __webpack_require__(15); +var getPrototypeOf = __webpack_require__(16); +var has = __webpack_require__(12); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(31); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = __webpack_require__(0); +var setProto = __webpack_require__(72); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = __webpack_require__(0); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(22); + +$export($export.P + $export.F * __webpack_require__(4)(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = __webpack_require__(0); +var toISOString = __webpack_require__(252); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = __webpack_require__(4); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports, __webpack_require__) { + +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(14)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +var TO_PRIMITIVE = __webpack_require__(5)('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) __webpack_require__(13)(proto, TO_PRIMITIVE, __webpack_require__(255)); + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(22); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $typed = __webpack_require__(62); +var buffer = __webpack_require__(92); +var anObject = __webpack_require__(1); +var toAbsoluteIndex = __webpack_require__(37); +var toLength = __webpack_require__(8); +var isObject = __webpack_require__(3); +var ArrayBuffer = __webpack_require__(2).ArrayBuffer; +var speciesConstructor = __webpack_require__(60); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * __webpack_require__(4)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var final = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < final) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__(41)(ARRAY_BUFFER); + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +$export($export.G + $export.W + $export.F * !__webpack_require__(62).ABV, { + DataView: __webpack_require__(92).DataView +}); + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__(0); +var $includes = __webpack_require__(51)(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +__webpack_require__(33)('includes'); + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = __webpack_require__(0); +var flattenIntoArray = __webpack_require__(119); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(8); +var aFunction = __webpack_require__(10); +var arraySpeciesCreate = __webpack_require__(84); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +__webpack_require__(33)('flatMap'); + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = __webpack_require__(0); +var flattenIntoArray = __webpack_require__(119); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(8); +var toInteger = __webpack_require__(24); +var arraySpeciesCreate = __webpack_require__(84); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +__webpack_require__(33)('flatten'); + + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/mathiasbynens/String.prototype.at +var $export = __webpack_require__(0); +var $at = __webpack_require__(79)(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(0); +var $pad = __webpack_require__(120); +var userAgent = __webpack_require__(93); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(0); +var $pad = __webpack_require__(120); +var userAgent = __webpack_require__(93); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(45)('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(45)('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/String.prototype.matchAll/ +var $export = __webpack_require__(0); +var defined = __webpack_require__(23); +var toLength = __webpack_require__(8); +var isRegExp = __webpack_require__(54); +var getFlags = __webpack_require__(58); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +__webpack_require__(56)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(67)('asyncIterator'); + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(67)('observable'); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = __webpack_require__(0); +var ownKeys = __webpack_require__(91); +var toIObject = __webpack_require__(11); +var gOPD = __webpack_require__(15); +var createProperty = __webpack_require__(83); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $values = __webpack_require__(121)(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $entries = __webpack_require__(121)(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + + +/***/ }), +/* 281 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var aFunction = __webpack_require__(10); +var $defineProperty = __webpack_require__(6); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +__webpack_require__(7) && $export($export.P + __webpack_require__(63), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var aFunction = __webpack_require__(10); +var $defineProperty = __webpack_require__(6); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +__webpack_require__(7) && $export($export.P + __webpack_require__(63), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(22); +var getPrototypeOf = __webpack_require__(16); +var getOwnPropertyDescriptor = __webpack_require__(15).f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +__webpack_require__(7) && $export($export.P + __webpack_require__(63), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(22); +var getPrototypeOf = __webpack_require__(16); +var getOwnPropertyDescriptor = __webpack_require__(15).f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +__webpack_require__(7) && $export($export.P + __webpack_require__(63), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(0); + +$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(122)('Map') }); + + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(0); + +$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(122)('Set') }); + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +__webpack_require__(64)('Map'); + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +__webpack_require__(64)('Set'); + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +__webpack_require__(64)('WeakMap'); + + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +__webpack_require__(64)('WeakSet'); + + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +__webpack_require__(65)('Map'); + + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +__webpack_require__(65)('Set'); + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +__webpack_require__(65)('WeakMap'); + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +__webpack_require__(65)('WeakSet'); + + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.G, { global: __webpack_require__(2) }); + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.S, 'System', { global: __webpack_require__(2) }); + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/ljharb/proposal-is-error +var $export = __webpack_require__(0); +var cof = __webpack_require__(20); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var scale = __webpack_require__(124); +var fround = __webpack_require__(106); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); + + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); + + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { scale: __webpack_require__(124) }); + + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(0); +var core = __webpack_require__(18); +var global = __webpack_require__(2); +var speciesConstructor = __webpack_require__(60); +var promiseResolve = __webpack_require__(112); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(0); +var newPromiseCapability = __webpack_require__(90); +var perform = __webpack_require__(111); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +} }); + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(16); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +var Set = __webpack_require__(115); +var from = __webpack_require__(123); +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(16); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(16); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +var $metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var aFunction = __webpack_require__(10); +var toMetaKey = $metadata.key; +var ordinaryDefineOwnMetadata = $metadata.set; + +$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +} }); + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = __webpack_require__(0); +var microtask = __webpack_require__(89)(); +var process = __webpack_require__(2).process; +var isNode = __webpack_require__(20)(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/zenparsing/es-observable +var $export = __webpack_require__(0); +var global = __webpack_require__(2); +var core = __webpack_require__(18); +var microtask = __webpack_require__(89)(); +var OBSERVABLE = __webpack_require__(5)('observable'); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var anInstance = __webpack_require__(42); +var redefineAll = __webpack_require__(43); +var hide = __webpack_require__(13); +var forOf = __webpack_require__(34); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +__webpack_require__(41)('Observable'); + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $task = __webpack_require__(88); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +var $iterators = __webpack_require__(86); +var getKeys = __webpack_require__(27); +var redefine = __webpack_require__(14); +var global = __webpack_require__(2); +var hide = __webpack_require__(13); +var Iterators = __webpack_require__(40); +var wks = __webpack_require__(5); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +// ie9- setTimeout & setInterval additional parameters fix +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var userAgent = __webpack_require__(93); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(19); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(31); +var assign = __webpack_require__(71); +var create = __webpack_require__(28); +var getPrototypeOf = __webpack_require__(16); +var getKeys = __webpack_require__(27); +var dP = __webpack_require__(6); +var keyOf = __webpack_require__(327); +var aFunction = __webpack_require__(10); +var forOf = __webpack_require__(34); +var isIterable = __webpack_require__(125); +var $iterCreate = __webpack_require__(56); +var step = __webpack_require__(87); +var isObject = __webpack_require__(3); +var toIObject = __webpack_require__(11); +var DESCRIPTORS = __webpack_require__(7); +var has = __webpack_require__(12); + +// 0 -> Dict.forEach +// 1 -> Dict.map +// 2 -> Dict.filter +// 3 -> Dict.some +// 4 -> Dict.every +// 5 -> Dict.find +// 6 -> Dict.findKey +// 7 -> Dict.mapPairs +var createDictMethod = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_EVERY = TYPE == 4; + return function (object, callbackfn, that /* = undefined */) { + var f = ctx(callbackfn, that, 3); + var O = toIObject(object); + var result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict)() : undefined; + var key, val, res; + for (key in O) if (has(O, key)) { + val = O[key]; + res = f(val, key, object); + if (TYPE) { + if (IS_MAP) result[key] = res; // map + else if (res) switch (TYPE) { + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if (IS_EVERY) return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; +}; +var findKey = createDictMethod(6); + +var createDictIter = function (kind) { + return function (it) { + return new DictIterator(it, kind); + }; +}; +var DictIterator = function (iterated, kind) { + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind +}; +$iterCreate(DictIterator, 'Dict', function () { + var that = this; + var O = that._t; + var keys = that._a; + var kind = that._k; + var key; + do { + if (that._i >= keys.length) { + that._t = undefined; + return step(1); + } + } while (!has(O, key = keys[that._i++])); + if (kind == 'keys') return step(0, key); + if (kind == 'values') return step(0, O[key]); + return step(0, [key, O[key]]); +}); + +function Dict(iterable) { + var dict = create(null); + if (iterable != undefined) { + if (isIterable(iterable)) { + forOf(iterable, true, function (key, value) { + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; +} +Dict.prototype = null; + +function reduce(object, mapfn, init) { + aFunction(mapfn); + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var memo, key; + if (arguments.length < 3) { + if (!length) throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while (length > i) if (has(O, key = keys[i++])) { + memo = mapfn(memo, O[key], key, object); + } + return memo; +} + +function includes(object, el) { + // eslint-disable-next-line no-self-compare + return (el == el ? keyOf(object, el) : findKey(object, function (it) { + // eslint-disable-next-line no-self-compare + return it != it; + })) !== undefined; +} + +function get(object, key) { + if (has(object, key)) return object[key]; +} +function set(object, key, value) { + if (DESCRIPTORS && key in Object) dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; +} + +function isDict(it) { + return isObject(it) && getPrototypeOf(it) === Dict.prototype; +} + +$export($export.G + $export.F, { Dict: Dict }); + +$export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict +}); + + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(27); +var toIObject = __webpack_require__(11); +module.exports = function (object, el) { + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var index = 0; + var key; + while (length > index) if (O[key = keys[index++]] === el) return key; +}; + + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var get = __webpack_require__(49); +module.exports = __webpack_require__(18).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + + +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(18); +var $export = __webpack_require__(0); +var partial = __webpack_require__(126); +// https://esdiscuss.org/topic/promise-returning-delay-function +$export($export.G + $export.F, { + delay: function delay(time) { + return new (core.Promise || global.Promise)(function (resolve) { + setTimeout(partial.call(resolve, true), time); + }); + } +}); + + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +var path = __webpack_require__(127); +var $export = __webpack_require__(0); + +// Placeholder +__webpack_require__(18)._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: __webpack_require__(126) }); + + +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { isObject: __webpack_require__(3) }); + + +/***/ }), +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { classof: __webpack_require__(39) }); + + +/***/ }), +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(128); + +$export($export.S + $export.F, 'Object', { define: define }); + + +/***/ }), +/* 334 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(128); +var create = __webpack_require__(28); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); + + +/***/ }), +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(55)(Number, 'Number', function (iterated) { + this._l = +iterated; + this._i = 0; +}, function () { + var i = this._i++; + var done = !(i < this._l); + return { done: done, value: done ? undefined : i }; +}); + + +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/benjamingr/RexExp.escape +var $export = __webpack_require__(0); +var $re = __webpack_require__(94)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(94)(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); + + +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(94)(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } }); + + +/***/ }) +/******/ ]); +// CommonJS export +if (typeof module != 'undefined' && module.exports) module.exports = __e; +// RequireJS export +else if (typeof define == 'function' && define.amd) define(function () { return __e; }); +// Export to global object +else __g.core = __e; +}(1, 1); \ No newline at end of file diff --git a/node_modules/core-js/client/core.min.js b/node_modules/core-js/client/core.min.js new file mode 100644 index 0000000..4f7fe7a --- /dev/null +++ b/node_modules/core-js/client/core.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.5.3 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2017 Denis Pushkarev + */ +!function(t,n,r){"use strict";!function(t){function __webpack_require__(r){if(n[r])return n[r].exports;var e=n[r]={i:r,l:!1,exports:{}};return t[r].call(e.exports,e,e.exports,__webpack_require__),e.l=!0,e.exports}var n={};__webpack_require__.m=t,__webpack_require__.c=n,__webpack_require__.d=function(t,n,r){__webpack_require__.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},__webpack_require__.n=function(t){var n=t&&t.__esModule?function getDefault(){return t["default"]}:function getModuleExports(){return t};return __webpack_require__.d(n,"a",n),n},__webpack_require__.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=129)}([function(t,n,e){var i=e(2),o=e(18),u=e(13),c=e(14),f=e(19),a="prototype",s=function(t,n,e){var l,h,p,v,g=t&s.F,y=t&s.G,d=t&s.P,_=t&s.B,b=y?i:t&s.S?i[n]||(i[n]={}):(i[n]||{})[a],S=y?o:o[n]||(o[n]={}),m=S[a]||(S[a]={});y&&(e=n);for(l in e)p=((h=!g&&b&&b[l]!==r)?b:e)[l],v=_&&h?f(p,i):d&&"function"==typeof p?f(Function.call,p):p,b&&c(b,l,p,t&s.U),S[l]!=p&&u(S,l,v),d&&m[l]!=p&&(m[l]=p)};i.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,n,r){var e=r(3);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,r){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof n&&(n=e)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,r){var e=r(50)("wks"),i=r(35),o=r(2).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n,r){var e=r(1),i=r(95),o=r(22),u=Object.defineProperty;n.f=r(7)?Object.defineProperty:function defineProperty(t,n,r){if(e(t),n=o(n,!0),e(r),i)try{return u(t,n,r)}catch(c){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){t.exports=!r(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(24),i=Math.min;t.exports=function(t){return t>0?i(e(t),9007199254740991):0}},function(t,n,r){var e=r(23);t.exports=function(t){return Object(e(t))}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(47),i=r(23);t.exports=function(t){return e(i(t))}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(6),i=r(31);t.exports=r(7)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(2),i=r(13),o=r(12),u=r(35)("src"),c="toString",f=Function[c],a=(""+f).split(c);r(18).inspectSource=function(t){return f.call(t)},(t.exports=function(t,n,r,c){var f="function"==typeof r;f&&(o(r,"name")||i(r,"name",n)),t[n]!==r&&(f&&(o(r,u)||i(r,u,t[n]?""+t[n]:a.join(String(n)))),t===e?t[n]=r:c?t[n]?t[n]=r:i(t,n,r):(delete t[n],i(t,n,r)))})(Function.prototype,c,function toString(){return"function"==typeof this&&this[u]||f.call(this)})},function(t,n,r){var e=r(48),i=r(31),o=r(11),u=r(22),c=r(12),f=r(95),a=Object.getOwnPropertyDescriptor;n.f=r(7)?a:function getOwnPropertyDescriptor(t,n){if(t=o(t),n=u(n,!0),f)try{return a(t,n)}catch(r){}if(c(t,n))return i(!e.f.call(t,n),t[n])}},function(t,n,r){var e=r(12),i=r(9),o=r(68)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),e(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,r){var e=r(0),i=r(4),o=r(23),u=/"/g,c=function(t,n,r,e){var i=String(o(t)),c="<"+n;return""!==r&&(c+=" "+r+'="'+String(e).replace(u,""")+'"'),c+">"+i+""};t.exports=function(t,n){var r={};r[t]=n(c),e(e.P+e.F*i(function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3}),"String",r)}},function(n,r){var e=n.exports={version:"2.5.3"};"number"==typeof t&&(t=e)},function(t,n,e){var i=e(10);t.exports=function(t,n,e){if(i(t),n===r)return t;switch(e){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,i){return t.call(n,r,e,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(4);t.exports=function(t,n){return!!t&&e(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n,r){var e=r(3);t.exports=function(t,n){if(!e(t))return t;var r,i;if(n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!e(i=r.call(t)))return i;if(!n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t){if(t==r)throw TypeError("Can't call method on "+t);return t}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(0),i=r(18),o=r(4);t.exports=function(t,n){var r=(i.Object||{})[t]||Object[t],u={};u[t]=n(r),e(e.S+e.F*o(function(){r(1)}),"Object",u)}},function(t,n,e){var i=e(19),o=e(47),u=e(9),c=e(8),f=e(84);t.exports=function(t,n){var e=1==t,a=2==t,s=3==t,l=4==t,h=6==t,p=5==t||h,v=n||f;return function(n,f,g){for(var y,d,_=u(n),b=o(_),S=i(f,g,3),m=c(b.length),x=0,w=e?v(n,m):a?v(n,0):r;m>x;x++)if((p||x in b)&&(y=b[x],d=S(y,x,_),t))if(e)w[x]=d;else if(d)switch(t){case 3:return!0;case 5:return y;case 6:return x;case 2:w.push(y)}else if(l)return!1;return h?-1:s||l?l:w}}},function(t,n,r){var e=r(97),i=r(69);t.exports=Object.keys||function keys(t){return e(t,i)}},function(t,n,e){var i=e(1),o=e(98),u=e(69),c=e(68)("IE_PROTO"),f=function(){},a="prototype",s=function(){var t,n=e(66)("iframe"),r=u.length;for(n.style.display="none",e(70).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write(" + +``` + +### Caveats + +Most of EJS will work as expected; however, there are a few things to note: + +1. Obviously, since you do not have access to the filesystem, `ejs.renderFile()` won't work. +2. For the same reason, `include`s do not work unless you use an `IncludeCallback`. Here is an example: + ```javascript + var str = "Hello <%= include('file', {person: 'John'}); %>", + fn = ejs.compile(str, {client: true}); + + fn(data, null, function(path, d){ // IncludeCallback + // path -> 'file' + // d -> {person: 'John'} + // Put your code here + // Return the contents of file as a string + }); // returns rendered string + ``` + +## Related projects + +There are a number of implementations of EJS: + + * TJ's implementation, the v1 of this library: https://github.com/tj/ejs + * Jupiter Consulting's EJS: http://www.embeddedjs.com/ + * EJS Embedded JavaScript Framework on Google Code: https://code.google.com/p/embeddedjavascript/ + * Sam Stephenson's Ruby implementation: https://rubygems.org/gems/ejs + * Erubis, an ERB implementation which also runs JavaScript: http://www.kuwata-lab.com/erubis/users-guide.04.html#lang-javascript + +## License + +Licensed under the Apache License, Version 2.0 +() + +- - - +EJS Embedded JavaScript templates copyright 2112 +mde@fleegix.org. diff --git a/node_modules/ejs/ejs.js b/node_modules/ejs/ejs.js new file mode 100644 index 0000000..1d49e51 --- /dev/null +++ b/node_modules/ejs/ejs.js @@ -0,0 +1,1494 @@ +(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.ejs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o + * @author Tiancheng "Timothy" Gu + * @project EJS + * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0} + */ + +/** + * EJS internal functions. + * + * Technically this "module" lies in the same file as {@link module:ejs}, for + * the sake of organization all the private functions re grouped into this + * module. + * + * @module ejs-internal + * @private + */ + +/** + * Embedded JavaScript templating engine. + * + * @module ejs + * @public + */ + +var fs = require('fs'); +var path = require('path'); +var utils = require('./utils'); + +var scopeOptionWarned = false; +var _VERSION_STRING = require('../package.json').version; +var _DEFAULT_DELIMITER = '%'; +var _DEFAULT_LOCALS_NAME = 'locals'; +var _NAME = 'ejs'; +var _REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)'; +var _OPTS = ['delimiter', 'scope', 'context', 'debug', 'compileDebug', + 'client', '_with', 'rmWhitespace', 'strict', 'filename']; +// We don't allow 'cache' option to be passed in the data obj +// for the normal `render` call, but this is where Express puts it +// so we make an exception for `renderFile` +var _OPTS_EXPRESS = _OPTS.concat('cache'); +var _BOM = /^\uFEFF/; + +/** + * EJS template function cache. This can be a LRU object from lru-cache NPM + * module. By default, it is {@link module:utils.cache}, a simple in-process + * cache that grows continuously. + * + * @type {Cache} + */ + +exports.cache = utils.cache; + +/** + * Custom file loader. Useful for template preprocessing or restricting access + * to a certain part of the filesystem. + * + * @type {fileLoader} + */ + +exports.fileLoader = fs.readFileSync; + +/** + * Name of the object containing the locals. + * + * This variable is overridden by {@link Options}`.localsName` if it is not + * `undefined`. + * + * @type {String} + * @public + */ + +exports.localsName = _DEFAULT_LOCALS_NAME; + +/** + * Get the path to the included file from the parent file path and the + * specified path. + * + * @param {String} name specified path + * @param {String} filename parent file path + * @param {Boolean} isDir parent file path whether is directory + * @return {String} + */ +exports.resolveInclude = function(name, filename, isDir) { + var dirname = path.dirname; + var extname = path.extname; + var resolve = path.resolve; + var includePath = resolve(isDir ? filename : dirname(filename), name); + var ext = extname(name); + if (!ext) { + includePath += '.ejs'; + } + return includePath; +}; + +/** + * Get the path to the included file by Options + * + * @param {String} path specified path + * @param {Options} options compilation options + * @return {String} + */ +function getIncludePath(path, options) { + var includePath; + var filePath; + var views = options.views; + + // Abs path + if (path.charAt(0) == '/') { + includePath = exports.resolveInclude(path.replace(/^\/*/,''), options.root || '/', true); + } + // Relative paths + else { + // Look relative to a passed filename first + if (options.filename) { + filePath = exports.resolveInclude(path, options.filename); + if (fs.existsSync(filePath)) { + includePath = filePath; + } + } + // Then look in any views directories + if (!includePath) { + if (Array.isArray(views) && views.some(function (v) { + filePath = exports.resolveInclude(path, v, true); + return fs.existsSync(filePath); + })) { + includePath = filePath; + } + } + if (!includePath) { + throw new Error('Could not find include include file.'); + } + } + return includePath; +} + +/** + * Get the template from a string or a file, either compiled on-the-fly or + * read from cache (if enabled), and cache the template if needed. + * + * If `template` is not set, the file specified in `options.filename` will be + * read. + * + * If `options.cache` is true, this function reads the file from + * `options.filename` so it must be set prior to calling this function. + * + * @memberof module:ejs-internal + * @param {Options} options compilation options + * @param {String} [template] template source + * @return {(TemplateFunction|ClientFunction)} + * Depending on the value of `options.client`, either type might be returned. + * @static + */ + +function handleCache(options, template) { + var func; + var filename = options.filename; + var hasTemplate = arguments.length > 1; + + if (options.cache) { + if (!filename) { + throw new Error('cache option requires a filename'); + } + func = exports.cache.get(filename); + if (func) { + return func; + } + if (!hasTemplate) { + template = fileLoader(filename).toString().replace(_BOM, ''); + } + } + else if (!hasTemplate) { + // istanbul ignore if: should not happen at all + if (!filename) { + throw new Error('Internal EJS error: no file name or template ' + + 'provided'); + } + template = fileLoader(filename).toString().replace(_BOM, ''); + } + func = exports.compile(template, options); + if (options.cache) { + exports.cache.set(filename, func); + } + return func; +} + +/** + * Try calling handleCache with the given options and data and call the + * callback with the result. If an error occurs, call the callback with + * the error. Used by renderFile(). + * + * @memberof module:ejs-internal + * @param {Options} options compilation options + * @param {Object} data template data + * @param {RenderFileCallback} cb callback + * @static + */ + +function tryHandleCache(options, data, cb) { + var result; + try { + result = handleCache(options)(data); + } + catch (err) { + return cb(err); + } + return cb(null, result); +} + +/** + * fileLoader is independent + * + * @param {String} filePath ejs file path. + * @return {String} The contents of the specified file. + * @static + */ + +function fileLoader(filePath){ + return exports.fileLoader(filePath); +} + +/** + * Get the template function. + * + * If `options.cache` is `true`, then the template is cached. + * + * @memberof module:ejs-internal + * @param {String} path path for the specified file + * @param {Options} options compilation options + * @return {(TemplateFunction|ClientFunction)} + * Depending on the value of `options.client`, either type might be returned + * @static + */ + +function includeFile(path, options) { + var opts = utils.shallowCopy({}, options); + opts.filename = getIncludePath(path, opts); + return handleCache(opts); +} + +/** + * Get the JavaScript source of an included file. + * + * @memberof module:ejs-internal + * @param {String} path path for the specified file + * @param {Options} options compilation options + * @return {Object} + * @static + */ + +function includeSource(path, options) { + var opts = utils.shallowCopy({}, options); + var includePath; + var template; + includePath = getIncludePath(path, opts); + template = fileLoader(includePath).toString().replace(_BOM, ''); + opts.filename = includePath; + var templ = new Template(template, opts); + templ.generateSource(); + return { + source: templ.source, + filename: includePath, + template: template + }; +} + +/** + * Re-throw the given `err` in context to the `str` of ejs, `filename`, and + * `lineno`. + * + * @implements RethrowCallback + * @memberof module:ejs-internal + * @param {Error} err Error object + * @param {String} str EJS source + * @param {String} filename file name of the EJS file + * @param {String} lineno line number of the error + * @static + */ + +function rethrow(err, str, flnm, lineno, esc){ + var lines = str.split('\n'); + var start = Math.max(lineno - 3, 0); + var end = Math.min(lines.length, lineno + 3); + var filename = esc(flnm); // eslint-disable-line + // Error context + var context = lines.slice(start, end).map(function (line, i){ + var curr = i + start + 1; + return (curr == lineno ? ' >> ' : ' ') + + curr + + '| ' + + line; + }).join('\n'); + + // Alter exception message + err.path = filename; + err.message = (filename || 'ejs') + ':' + + lineno + '\n' + + context + '\n\n' + + err.message; + + throw err; +} + +function stripSemi(str){ + return str.replace(/;(\s*$)/, '$1'); +} + +/** + * Compile the given `str` of ejs into a template function. + * + * @param {String} template EJS template + * + * @param {Options} opts compilation options + * + * @return {(TemplateFunction|ClientFunction)} + * Depending on the value of `opts.client`, either type might be returned. + * @public + */ + +exports.compile = function compile(template, opts) { + var templ; + + // v1 compat + // 'scope' is 'context' + // FIXME: Remove this in a future version + if (opts && opts.scope) { + if (!scopeOptionWarned){ + console.warn('`scope` option is deprecated and will be removed in EJS 3'); + scopeOptionWarned = true; + } + if (!opts.context) { + opts.context = opts.scope; + } + delete opts.scope; + } + templ = new Template(template, opts); + return templ.compile(); +}; + +/** + * Render the given `template` of ejs. + * + * If you would like to include options but not data, you need to explicitly + * call this function with `data` being an empty object or `null`. + * + * @param {String} template EJS template + * @param {Object} [data={}] template data + * @param {Options} [opts={}] compilation and rendering options + * @return {String} + * @public + */ + +exports.render = function (template, d, o) { + var data = d || {}; + var opts = o || {}; + + // No options object -- if there are optiony names + // in the data, copy them to options + if (arguments.length == 2) { + utils.shallowCopyFromList(opts, data, _OPTS); + } + + return handleCache(opts, template)(data); +}; + +/** + * Render an EJS file at the given `path` and callback `cb(err, str)`. + * + * If you would like to include options but not data, you need to explicitly + * call this function with `data` being an empty object or `null`. + * + * @param {String} path path to the EJS file + * @param {Object} [data={}] template data + * @param {Options} [opts={}] compilation and rendering options + * @param {RenderFileCallback} cb callback + * @public + */ + +exports.renderFile = function () { + var filename = arguments[0]; + var cb = arguments[arguments.length - 1]; + var opts = {filename: filename}; + var data; + + if (arguments.length > 2) { + data = arguments[1]; + + // No options object -- if there are optiony names + // in the data, copy them to options + if (arguments.length === 3) { + // Express 4 + if (data.settings) { + if (data.settings['view options']) { + utils.shallowCopyFromList(opts, data.settings['view options'], _OPTS_EXPRESS); + } + if (data.settings.views) { + opts.views = data.settings.views; + } + } + // Express 3 and lower + else { + utils.shallowCopyFromList(opts, data, _OPTS_EXPRESS); + } + } + else { + // Use shallowCopy so we don't pollute passed in opts obj with new vals + utils.shallowCopy(opts, arguments[2]); + } + + opts.filename = filename; + } + else { + data = {}; + } + + return tryHandleCache(opts, data, cb); +}; + +/** + * Clear intermediate JavaScript cache. Calls {@link Cache#reset}. + * @public + */ + +exports.clearCache = function () { + exports.cache.reset(); +}; + +function Template(text, opts) { + opts = opts || {}; + var options = {}; + this.templateText = text; + this.mode = null; + this.truncate = false; + this.currentLine = 1; + this.source = ''; + this.dependencies = []; + options.client = opts.client || false; + options.escapeFunction = opts.escape || utils.escapeXML; + options.compileDebug = opts.compileDebug !== false; + options.debug = !!opts.debug; + options.filename = opts.filename; + options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER; + options.strict = opts.strict || false; + options.context = opts.context; + options.cache = opts.cache || false; + options.rmWhitespace = opts.rmWhitespace; + options.root = opts.root; + options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME; + options.views = opts.views; + + if (options.strict) { + options._with = false; + } + else { + options._with = typeof opts._with != 'undefined' ? opts._with : true; + } + + this.opts = options; + + this.regex = this.createRegex(); +} + +Template.modes = { + EVAL: 'eval', + ESCAPED: 'escaped', + RAW: 'raw', + COMMENT: 'comment', + LITERAL: 'literal' +}; + +Template.prototype = { + createRegex: function () { + var str = _REGEX_STRING; + var delim = utils.escapeRegExpChars(this.opts.delimiter); + str = str.replace(/%/g, delim); + return new RegExp(str); + }, + + compile: function () { + var src; + var fn; + var opts = this.opts; + var prepended = ''; + var appended = ''; + var escapeFn = opts.escapeFunction; + + if (!this.source) { + this.generateSource(); + prepended += ' var __output = [], __append = __output.push.bind(__output);' + '\n'; + if (opts._with !== false) { + prepended += ' with (' + opts.localsName + ' || {}) {' + '\n'; + appended += ' }' + '\n'; + } + appended += ' return __output.join("");' + '\n'; + this.source = prepended + this.source + appended; + } + + if (opts.compileDebug) { + src = 'var __line = 1' + '\n' + + ' , __lines = ' + JSON.stringify(this.templateText) + '\n' + + ' , __filename = ' + (opts.filename ? + JSON.stringify(opts.filename) : 'undefined') + ';' + '\n' + + 'try {' + '\n' + + this.source + + '} catch (e) {' + '\n' + + ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n' + + '}' + '\n'; + } + else { + src = this.source; + } + + if (opts.client) { + src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src; + if (opts.compileDebug) { + src = 'rethrow = rethrow || ' + rethrow.toString() + ';' + '\n' + src; + } + } + + if (opts.strict) { + src = '"use strict";\n' + src; + } + if (opts.debug) { + console.log(src); + } + + try { + fn = new Function(opts.localsName + ', escapeFn, include, rethrow', src); + } + catch(e) { + // istanbul ignore else + if (e instanceof SyntaxError) { + if (opts.filename) { + e.message += ' in ' + opts.filename; + } + e.message += ' while compiling ejs\n\n'; + e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\n'; + e.message += 'https://github.com/RyanZim/EJS-Lint'; + } + throw e; + } + + if (opts.client) { + fn.dependencies = this.dependencies; + return fn; + } + + // Return a callable function which will execute the function + // created by the source-code, with the passed data as locals + // Adds a local `include` function which allows full recursive include + var returnedFn = function (data) { + var include = function (path, includeData) { + var d = utils.shallowCopy({}, data); + if (includeData) { + d = utils.shallowCopy(d, includeData); + } + return includeFile(path, opts)(d); + }; + return fn.apply(opts.context, [data || {}, escapeFn, include, rethrow]); + }; + returnedFn.dependencies = this.dependencies; + return returnedFn; + }, + + generateSource: function () { + var opts = this.opts; + + if (opts.rmWhitespace) { + // Have to use two separate replace here as `^` and `$` operators don't + // work well with `\r`. + this.templateText = + this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, ''); + } + + // Slurp spaces and tabs before <%_ and after _%> + this.templateText = + this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>'); + + var self = this; + var matches = this.parseTemplateText(); + var d = this.opts.delimiter; + + if (matches && matches.length) { + matches.forEach(function (line, index) { + var opening; + var closing; + var include; + var includeOpts; + var includeObj; + var includeSrc; + // If this is an opening tag, check for closing tags + // FIXME: May end up with some false positives here + // Better to store modes as k/v with '<' + delimiter as key + // Then this can simply check against the map + if ( line.indexOf('<' + d) === 0 // If it is a tag + && line.indexOf('<' + d + d) !== 0) { // and is not escaped + closing = matches[index + 2]; + if (!(closing == d + '>' || closing == '-' + d + '>' || closing == '_' + d + '>')) { + throw new Error('Could not find matching close tag for "' + line + '".'); + } + } + // HACK: backward-compat `include` preprocessor directives + if ((include = line.match(/^\s*include\s+(\S+)/))) { + opening = matches[index - 1]; + // Must be in EVAL or RAW mode + if (opening && (opening == '<' + d || opening == '<' + d + '-' || opening == '<' + d + '_')) { + includeOpts = utils.shallowCopy({}, self.opts); + includeObj = includeSource(include[1], includeOpts); + if (self.opts.compileDebug) { + includeSrc = + ' ; (function(){' + '\n' + + ' var __line = 1' + '\n' + + ' , __lines = ' + JSON.stringify(includeObj.template) + '\n' + + ' , __filename = ' + JSON.stringify(includeObj.filename) + ';' + '\n' + + ' try {' + '\n' + + includeObj.source + + ' } catch (e) {' + '\n' + + ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n' + + ' }' + '\n' + + ' ; }).call(this)' + '\n'; + }else{ + includeSrc = ' ; (function(){' + '\n' + includeObj.source + + ' ; }).call(this)' + '\n'; + } + self.source += includeSrc; + self.dependencies.push(exports.resolveInclude(include[1], + includeOpts.filename)); + return; + } + } + self.scanLine(line); + }); + } + + }, + + parseTemplateText: function () { + var str = this.templateText; + var pat = this.regex; + var result = pat.exec(str); + var arr = []; + var firstPos; + + while (result) { + firstPos = result.index; + + if (firstPos !== 0) { + arr.push(str.substring(0, firstPos)); + str = str.slice(firstPos); + } + + arr.push(result[0]); + str = str.slice(result[0].length); + result = pat.exec(str); + } + + if (str) { + arr.push(str); + } + + return arr; + }, + + _addOutput: function (line) { + if (this.truncate) { + // Only replace single leading linebreak in the line after + // -%> tag -- this is the single, trailing linebreak + // after the tag that the truncation mode replaces + // Handle Win / Unix / old Mac linebreaks -- do the \r\n + // combo first in the regex-or + line = line.replace(/^(?:\r\n|\r|\n)/, ''); + this.truncate = false; + } + else if (this.opts.rmWhitespace) { + // rmWhitespace has already removed trailing spaces, just need + // to remove linebreaks + line = line.replace(/^\n/, ''); + } + if (!line) { + return line; + } + + // Preserve literal slashes + line = line.replace(/\\/g, '\\\\'); + + // Convert linebreaks + line = line.replace(/\n/g, '\\n'); + line = line.replace(/\r/g, '\\r'); + + // Escape double-quotes + // - this will be the delimiter during execution + line = line.replace(/"/g, '\\"'); + this.source += ' ; __append("' + line + '")' + '\n'; + }, + + scanLine: function (line) { + var self = this; + var d = this.opts.delimiter; + var newLineCount = 0; + + newLineCount = (line.split('\n').length - 1); + + switch (line) { + case '<' + d: + case '<' + d + '_': + this.mode = Template.modes.EVAL; + break; + case '<' + d + '=': + this.mode = Template.modes.ESCAPED; + break; + case '<' + d + '-': + this.mode = Template.modes.RAW; + break; + case '<' + d + '#': + this.mode = Template.modes.COMMENT; + break; + case '<' + d + d: + this.mode = Template.modes.LITERAL; + this.source += ' ; __append("' + line.replace('<' + d + d, '<' + d) + '")' + '\n'; + break; + case d + d + '>': + this.mode = Template.modes.LITERAL; + this.source += ' ; __append("' + line.replace(d + d + '>', d + '>') + '")' + '\n'; + break; + case d + '>': + case '-' + d + '>': + case '_' + d + '>': + if (this.mode == Template.modes.LITERAL) { + this._addOutput(line); + } + + this.mode = null; + this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0; + break; + default: + // In script mode, depends on type of tag + if (this.mode) { + // If '//' is found without a line break, add a line break. + switch (this.mode) { + case Template.modes.EVAL: + case Template.modes.ESCAPED: + case Template.modes.RAW: + if (line.lastIndexOf('//') > line.lastIndexOf('\n')) { + line += '\n'; + } + } + switch (this.mode) { + // Just executing code + case Template.modes.EVAL: + this.source += ' ; ' + line + '\n'; + break; + // Exec, esc, and output + case Template.modes.ESCAPED: + this.source += ' ; __append(escapeFn(' + stripSemi(line) + '))' + '\n'; + break; + // Exec and output + case Template.modes.RAW: + this.source += ' ; __append(' + stripSemi(line) + ')' + '\n'; + break; + case Template.modes.COMMENT: + // Do nothing + break; + // Literal <%% mode, append as raw output + case Template.modes.LITERAL: + this._addOutput(line); + break; + } + } + // In string mode, just add the output + else { + this._addOutput(line); + } + } + + if (self.opts.compileDebug && newLineCount) { + this.currentLine += newLineCount; + this.source += ' ; __line = ' + this.currentLine + '\n'; + } + } +}; + +/** + * Escape characters reserved in XML. + * + * This is simply an export of {@link module:utils.escapeXML}. + * + * If `markup` is `undefined` or `null`, the empty string is returned. + * + * @param {String} markup Input string + * @return {String} Escaped string + * @public + * @func + * */ +exports.escapeXML = utils.escapeXML; + +/** + * Express.js support. + * + * This is an alias for {@link module:ejs.renderFile}, in order to support + * Express.js out-of-the-box. + * + * @func + */ + +exports.__express = exports.renderFile; + +// Add require support +/* istanbul ignore else */ +if (require.extensions) { + require.extensions['.ejs'] = function (module, flnm) { + var filename = flnm || /* istanbul ignore next */ module.filename; + var options = { + filename: filename, + client: true + }; + var template = fileLoader(filename).toString(); + var fn = exports.compile(template, options); + module._compile('module.exports = ' + fn.toString() + ';', filename); + }; +} + +/** + * Version of EJS. + * + * @readonly + * @type {String} + * @public + */ + +exports.VERSION = _VERSION_STRING; + +/** + * Name for detection of EJS. + * + * @readonly + * @type {String} + * @public + */ + +exports.name = _NAME; + +/* istanbul ignore if */ +if (typeof window != 'undefined') { + window.ejs = exports; +} + +},{"../package.json":6,"./utils":2,"fs":3,"path":4}],2:[function(require,module,exports){ +/* + * EJS Embedded JavaScript templates + * Copyright 2112 Matthew Eernisse (mde@fleegix.org) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +/** + * Private utility functions + * @module utils + * @private + */ + +'use strict'; + +var regExpChars = /[|\\{}()[\]^$+*?.]/g; + +/** + * Escape characters reserved in regular expressions. + * + * If `string` is `undefined` or `null`, the empty string is returned. + * + * @param {String} string Input string + * @return {String} Escaped string + * @static + * @private + */ +exports.escapeRegExpChars = function (string) { + // istanbul ignore if + if (!string) { + return ''; + } + return String(string).replace(regExpChars, '\\$&'); +}; + +var _ENCODE_HTML_RULES = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; +var _MATCH_HTML = /[&<>\'"]/g; + +function encode_char(c) { + return _ENCODE_HTML_RULES[c] || c; +} + +/** + * Stringified version of constants used by {@link module:utils.escapeXML}. + * + * It is used in the process of generating {@link ClientFunction}s. + * + * @readonly + * @type {String} + */ + +var escapeFuncStr = + 'var _ENCODE_HTML_RULES = {\n' ++ ' "&": "&"\n' ++ ' , "<": "<"\n' ++ ' , ">": ">"\n' ++ ' , \'"\': """\n' ++ ' , "\'": "'"\n' ++ ' }\n' ++ ' , _MATCH_HTML = /[&<>\'"]/g;\n' ++ 'function encode_char(c) {\n' ++ ' return _ENCODE_HTML_RULES[c] || c;\n' ++ '};\n'; + +/** + * Escape characters reserved in XML. + * + * If `markup` is `undefined` or `null`, the empty string is returned. + * + * @implements {EscapeCallback} + * @param {String} markup Input string + * @return {String} Escaped string + * @static + * @private + */ + +exports.escapeXML = function (markup) { + return markup == undefined + ? '' + : String(markup) + .replace(_MATCH_HTML, encode_char); +}; +exports.escapeXML.toString = function () { + return Function.prototype.toString.call(this) + ';\n' + escapeFuncStr; +}; + +/** + * Naive copy of properties from one object to another. + * Does not recurse into non-scalar properties + * Does not check to see if the property has a value before copying + * + * @param {Object} to Destination object + * @param {Object} from Source object + * @return {Object} Destination object + * @static + * @private + */ +exports.shallowCopy = function (to, from) { + from = from || {}; + for (var p in from) { + to[p] = from[p]; + } + return to; +}; + +/** + * Naive copy of a list of key names, from one object to another. + * Only copies property if it is actually defined + * Does not recurse into non-scalar properties + * + * @param {Object} to Destination object + * @param {Object} from Source object + * @param {Array} list List of properties to copy + * @return {Object} Destination object + * @static + * @private + */ +exports.shallowCopyFromList = function (to, from, list) { + for (var i = 0; i < list.length; i++) { + var p = list[i]; + if (typeof from[p] != 'undefined') { + to[p] = from[p]; + } + } + return to; +}; + +/** + * Simple in-process cache implementation. Does not implement limits of any + * sort. + * + * @implements Cache + * @static + * @private + */ +exports.cache = { + _data: {}, + set: function (key, val) { + this._data[key] = val; + }, + get: function (key) { + return this._data[key]; + }, + reset: function () { + this._data = {}; + } +}; + +},{}],3:[function(require,module,exports){ + +},{}],4:[function(require,module,exports){ +(function (process){ +// 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. + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); +}; + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; + + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + +// posix version +exports.isAbsolute = function(path) { + return path.charAt(0) === '/'; +}; + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +}; + + +// path.relative(from, to) +// posix version +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +}; + +exports.sep = '/'; +exports.delimiter = ':'; + +exports.dirname = function(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +}; + + +exports.basename = function(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + + +exports.extname = function(path) { + return splitPath(path)[3]; +}; + +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' + ? function (str, start, len) { return str.substr(start, len) } + : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; + +}).call(this,require('_process')) +},{"_process":5}],5:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],6:[function(require,module,exports){ +module.exports={ + "name": "ejs", + "description": "Embedded JavaScript templates", + "keywords": [ + "template", + "engine", + "ejs" + ], + "version": "2.5.6", + "author": "Matthew Eernisse (http://fleegix.org)", + "contributors": [ + "Timothy Gu (https://timothygu.github.io)" + ], + "license": "Apache-2.0", + "main": "./lib/ejs.js", + "repository": { + "type": "git", + "url": "git://github.com/mde/ejs.git" + }, + "bugs": "https://github.com/mde/ejs/issues", + "homepage": "https://github.com/mde/ejs", + "dependencies": {}, + "devDependencies": { + "browserify": "^13.0.1", + "eslint": "^3.0.0", + "git-directory-deploy": "^1.5.1", + "istanbul": "~0.4.3", + "jake": "^8.0.0", + "jsdoc": "^3.4.0", + "lru-cache": "^4.0.1", + "mocha": "^3.0.2", + "uglify-js": "^2.6.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "jake test", + "lint": "eslint \"**/*.js\" Jakefile", + "coverage": "istanbul cover node_modules/mocha/bin/_mocha", + "doc": "jake doc", + "devdoc": "jake doc[dev]" + } +} + +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/node_modules/ejs/ejs.min.js b/node_modules/ejs/ejs.min.js new file mode 100644 index 0000000..b8839a9 --- /dev/null +++ b/node_modules/ejs/ejs.min.js @@ -0,0 +1 @@ +(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.ejs=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o1;if(options.cache){if(!filename){throw new Error("cache option requires a filename")}func=exports.cache.get(filename);if(func){return func}if(!hasTemplate){template=fileLoader(filename).toString().replace(_BOM,"")}}else if(!hasTemplate){if(!filename){throw new Error("Internal EJS error: no file name or template "+"provided")}template=fileLoader(filename).toString().replace(_BOM,"")}func=exports.compile(template,options);if(options.cache){exports.cache.set(filename,func)}return func}function tryHandleCache(options,data,cb){var result;try{result=handleCache(options)(data)}catch(err){return cb(err)}return cb(null,result)}function fileLoader(filePath){return exports.fileLoader(filePath)}function includeFile(path,options){var opts=utils.shallowCopy({},options);opts.filename=getIncludePath(path,opts);return handleCache(opts)}function includeSource(path,options){var opts=utils.shallowCopy({},options);var includePath;var template;includePath=getIncludePath(path,opts);template=fileLoader(includePath).toString().replace(_BOM,"");opts.filename=includePath;var templ=new Template(template,opts);templ.generateSource();return{source:templ.source,filename:includePath,template:template}}function rethrow(err,str,flnm,lineno,esc){var lines=str.split("\n");var start=Math.max(lineno-3,0);var end=Math.min(lines.length,lineno+3);var filename=esc(flnm);var context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" >> ":" ")+curr+"| "+line}).join("\n");err.path=filename;err.message=(filename||"ejs")+":"+lineno+"\n"+context+"\n\n"+err.message;throw err}function stripSemi(str){return str.replace(/;(\s*$)/,"$1")}exports.compile=function compile(template,opts){var templ;if(opts&&opts.scope){if(!scopeOptionWarned){console.warn("`scope` option is deprecated and will be removed in EJS 3");scopeOptionWarned=true}if(!opts.context){opts.context=opts.scope}delete opts.scope}templ=new Template(template,opts);return templ.compile()};exports.render=function(template,d,o){var data=d||{};var opts=o||{};if(arguments.length==2){utils.shallowCopyFromList(opts,data,_OPTS)}return handleCache(opts,template)(data)};exports.renderFile=function(){var filename=arguments[0];var cb=arguments[arguments.length-1];var opts={filename:filename};var data;if(arguments.length>2){data=arguments[1];if(arguments.length===3){if(data.settings){if(data.settings["view options"]){utils.shallowCopyFromList(opts,data.settings["view options"],_OPTS_EXPRESS)}if(data.settings.views){opts.views=data.settings.views}}else{utils.shallowCopyFromList(opts,data,_OPTS_EXPRESS)}}else{utils.shallowCopy(opts,arguments[2])}opts.filename=filename}else{data={}}return tryHandleCache(opts,data,cb)};exports.clearCache=function(){exports.cache.reset()};function Template(text,opts){opts=opts||{};var options={};this.templateText=text;this.mode=null;this.truncate=false;this.currentLine=1;this.source="";this.dependencies=[];options.client=opts.client||false;options.escapeFunction=opts.escape||utils.escapeXML;options.compileDebug=opts.compileDebug!==false;options.debug=!!opts.debug;options.filename=opts.filename;options.delimiter=opts.delimiter||exports.delimiter||_DEFAULT_DELIMITER;options.strict=opts.strict||false;options.context=opts.context;options.cache=opts.cache||false;options.rmWhitespace=opts.rmWhitespace;options.root=opts.root;options.localsName=opts.localsName||exports.localsName||_DEFAULT_LOCALS_NAME;options.views=opts.views;if(options.strict){options._with=false}else{options._with=typeof opts._with!="undefined"?opts._with:true}this.opts=options;this.regex=this.createRegex()}Template.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};Template.prototype={createRegex:function(){var str=_REGEX_STRING;var delim=utils.escapeRegExpChars(this.opts.delimiter);str=str.replace(/%/g,delim);return new RegExp(str)},compile:function(){var src;var fn;var opts=this.opts;var prepended="";var appended="";var escapeFn=opts.escapeFunction;if(!this.source){this.generateSource();prepended+=" var __output = [], __append = __output.push.bind(__output);"+"\n";if(opts._with!==false){prepended+=" with ("+opts.localsName+" || {}) {"+"\n";appended+=" }"+"\n"}appended+=' return __output.join("");'+"\n";this.source=prepended+this.source+appended}if(opts.compileDebug){src="var __line = 1"+"\n"+" , __lines = "+JSON.stringify(this.templateText)+"\n"+" , __filename = "+(opts.filename?JSON.stringify(opts.filename):"undefined")+";"+"\n"+"try {"+"\n"+this.source+"} catch (e) {"+"\n"+" rethrow(e, __lines, __filename, __line, escapeFn);"+"\n"+"}"+"\n"}else{src=this.source}if(opts.client){src="escapeFn = escapeFn || "+escapeFn.toString()+";"+"\n"+src;if(opts.compileDebug){src="rethrow = rethrow || "+rethrow.toString()+";"+"\n"+src}}if(opts.strict){src='"use strict";\n'+src}if(opts.debug){console.log(src)}try{fn=new Function(opts.localsName+", escapeFn, include, rethrow",src)}catch(e){if(e instanceof SyntaxError){if(opts.filename){e.message+=" in "+opts.filename}e.message+=" while compiling ejs\n\n";e.message+="If the above error is not helpful, you may want to try EJS-Lint:\n";e.message+="https://github.com/RyanZim/EJS-Lint"}throw e}if(opts.client){fn.dependencies=this.dependencies;return fn}var returnedFn=function(data){var include=function(path,includeData){var d=utils.shallowCopy({},data);if(includeData){d=utils.shallowCopy(d,includeData)}return includeFile(path,opts)(d)};return fn.apply(opts.context,[data||{},escapeFn,include,rethrow])};returnedFn.dependencies=this.dependencies;return returnedFn},generateSource:function(){var opts=this.opts;if(opts.rmWhitespace){this.templateText=this.templateText.replace(/\r/g,"").replace(/^\s+|\s+$/gm,"")}this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");var self=this;var matches=this.parseTemplateText();var d=this.opts.delimiter;if(matches&&matches.length){matches.forEach(function(line,index){var opening;var closing;var include;var includeOpts;var includeObj;var includeSrc;if(line.indexOf("<"+d)===0&&line.indexOf("<"+d+d)!==0){closing=matches[index+2];if(!(closing==d+">"||closing=="-"+d+">"||closing=="_"+d+">")){throw new Error('Could not find matching close tag for "'+line+'".')}}if(include=line.match(/^\s*include\s+(\S+)/)){opening=matches[index-1];if(opening&&(opening=="<"+d||opening=="<"+d+"-"||opening=="<"+d+"_")){includeOpts=utils.shallowCopy({},self.opts);includeObj=includeSource(include[1],includeOpts);if(self.opts.compileDebug){includeSrc=" ; (function(){"+"\n"+" var __line = 1"+"\n"+" , __lines = "+JSON.stringify(includeObj.template)+"\n"+" , __filename = "+JSON.stringify(includeObj.filename)+";"+"\n"+" try {"+"\n"+includeObj.source+" } catch (e) {"+"\n"+" rethrow(e, __lines, __filename, __line, escapeFn);"+"\n"+" }"+"\n"+" ; }).call(this)"+"\n"}else{includeSrc=" ; (function(){"+"\n"+includeObj.source+" ; }).call(this)"+"\n"}self.source+=includeSrc;self.dependencies.push(exports.resolveInclude(include[1],includeOpts.filename));return}}self.scanLine(line)})}},parseTemplateText:function(){var str=this.templateText;var pat=this.regex;var result=pat.exec(str);var arr=[];var firstPos;while(result){firstPos=result.index;if(firstPos!==0){arr.push(str.substring(0,firstPos));str=str.slice(firstPos)}arr.push(result[0]);str=str.slice(result[0].length);result=pat.exec(str)}if(str){arr.push(str)}return arr},_addOutput:function(line){if(this.truncate){line=line.replace(/^(?:\r\n|\r|\n)/,"");this.truncate=false}else if(this.opts.rmWhitespace){line=line.replace(/^\n/,"")}if(!line){return line}line=line.replace(/\\/g,"\\\\");line=line.replace(/\n/g,"\\n");line=line.replace(/\r/g,"\\r");line=line.replace(/"/g,'\\"');this.source+=' ; __append("'+line+'")'+"\n"},scanLine:function(line){var self=this;var d=this.opts.delimiter;var newLineCount=0;newLineCount=line.split("\n").length-1;switch(line){case"<"+d:case"<"+d+"_":this.mode=Template.modes.EVAL;break;case"<"+d+"=":this.mode=Template.modes.ESCAPED;break;case"<"+d+"-":this.mode=Template.modes.RAW;break;case"<"+d+"#":this.mode=Template.modes.COMMENT;break;case"<"+d+d:this.mode=Template.modes.LITERAL;this.source+=' ; __append("'+line.replace("<"+d+d,"<"+d)+'")'+"\n";break;case d+d+">":this.mode=Template.modes.LITERAL;this.source+=' ; __append("'+line.replace(d+d+">",d+">")+'")'+"\n";break;case d+">":case"-"+d+">":case"_"+d+">":if(this.mode==Template.modes.LITERAL){this._addOutput(line)}this.mode=null;this.truncate=line.indexOf("-")===0||line.indexOf("_")===0;break;default:if(this.mode){switch(this.mode){case Template.modes.EVAL:case Template.modes.ESCAPED:case Template.modes.RAW:if(line.lastIndexOf("//")>line.lastIndexOf("\n")){line+="\n"}}switch(this.mode){case Template.modes.EVAL:this.source+=" ; "+line+"\n";break;case Template.modes.ESCAPED:this.source+=" ; __append(escapeFn("+stripSemi(line)+"))"+"\n";break;case Template.modes.RAW:this.source+=" ; __append("+stripSemi(line)+")"+"\n";break;case Template.modes.COMMENT:break;case Template.modes.LITERAL:this._addOutput(line);break}}else{this._addOutput(line)}}if(self.opts.compileDebug&&newLineCount){this.currentLine+=newLineCount;this.source+=" ; __line = "+this.currentLine+"\n"}}};exports.escapeXML=utils.escapeXML;exports.__express=exports.renderFile;if(require.extensions){require.extensions[".ejs"]=function(module,flnm){var filename=flnm||module.filename;var options={filename:filename,client:true};var template=fileLoader(filename).toString();var fn=exports.compile(template,options);module._compile("module.exports = "+fn.toString()+";",filename)}}exports.VERSION=_VERSION_STRING;exports.name=_NAME;if(typeof window!="undefined"){window.ejs=exports}},{"../package.json":6,"./utils":2,fs:3,path:4}],2:[function(require,module,exports){"use strict";var regExpChars=/[|\\{}()[\]^$+*?.]/g;exports.escapeRegExpChars=function(string){if(!string){return""}return String(string).replace(regExpChars,"\\$&")};var _ENCODE_HTML_RULES={"&":"&","<":"<",">":">",'"':""","'":"'"};var _MATCH_HTML=/[&<>\'"]/g;function encode_char(c){return _ENCODE_HTML_RULES[c]||c}var escapeFuncStr="var _ENCODE_HTML_RULES = {\n"+' "&": "&"\n'+' , "<": "<"\n'+' , ">": ">"\n'+' , \'"\': """\n'+' , "\'": "'"\n'+" }\n"+" , _MATCH_HTML = /[&<>'\"]/g;\n"+"function encode_char(c) {\n"+" return _ENCODE_HTML_RULES[c] || c;\n"+"};\n";exports.escapeXML=function(markup){return markup==undefined?"":String(markup).replace(_MATCH_HTML,encode_char)};exports.escapeXML.toString=function(){return Function.prototype.toString.call(this)+";\n"+escapeFuncStr};exports.shallowCopy=function(to,from){from=from||{};for(var p in from){to[p]=from[p]}return to};exports.shallowCopyFromList=function(to,from,list){for(var i=0;i=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i1){for(var i=1;i (http://fleegix.org)",contributors:["Timothy Gu (https://timothygu.github.io)"],license:"Apache-2.0",main:"./lib/ejs.js",repository:{type:"git",url:"git://github.com/mde/ejs.git"},bugs:"https://github.com/mde/ejs/issues",homepage:"https://github.com/mde/ejs",dependencies:{},devDependencies:{browserify:"^13.0.1",eslint:"^3.0.0","git-directory-deploy":"^1.5.1",istanbul:"~0.4.3",jake:"^8.0.0",jsdoc:"^3.4.0","lru-cache":"^4.0.1",mocha:"^3.0.2","uglify-js":"^2.6.2"},engines:{node:">=0.10.0"},scripts:{test:"jake test",lint:'eslint "**/*.js" Jakefile',coverage:"istanbul cover node_modules/mocha/bin/_mocha",doc:"jake doc",devdoc:"jake doc[dev]"}}},{}]},{},[1])(1)}); diff --git a/node_modules/ejs/lib/ejs.js b/node_modules/ejs/lib/ejs.js new file mode 100644 index 0000000..9973dcd --- /dev/null +++ b/node_modules/ejs/lib/ejs.js @@ -0,0 +1,866 @@ +/* + * EJS Embedded JavaScript templates + * Copyright 2112 Matthew Eernisse (mde@fleegix.org) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +'use strict'; + +/** + * @file Embedded JavaScript templating engine. {@link http://ejs.co} + * @author Matthew Eernisse + * @author Tiancheng "Timothy" Gu + * @project EJS + * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0} + */ + +/** + * EJS internal functions. + * + * Technically this "module" lies in the same file as {@link module:ejs}, for + * the sake of organization all the private functions re grouped into this + * module. + * + * @module ejs-internal + * @private + */ + +/** + * Embedded JavaScript templating engine. + * + * @module ejs + * @public + */ + +var fs = require('fs'); +var path = require('path'); +var utils = require('./utils'); + +var scopeOptionWarned = false; +var _VERSION_STRING = require('../package.json').version; +var _DEFAULT_DELIMITER = '%'; +var _DEFAULT_LOCALS_NAME = 'locals'; +var _NAME = 'ejs'; +var _REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)'; +var _OPTS = ['delimiter', 'scope', 'context', 'debug', 'compileDebug', + 'client', '_with', 'rmWhitespace', 'strict', 'filename']; +// We don't allow 'cache' option to be passed in the data obj +// for the normal `render` call, but this is where Express puts it +// so we make an exception for `renderFile` +var _OPTS_EXPRESS = _OPTS.concat('cache'); +var _BOM = /^\uFEFF/; + +/** + * EJS template function cache. This can be a LRU object from lru-cache NPM + * module. By default, it is {@link module:utils.cache}, a simple in-process + * cache that grows continuously. + * + * @type {Cache} + */ + +exports.cache = utils.cache; + +/** + * Custom file loader. Useful for template preprocessing or restricting access + * to a certain part of the filesystem. + * + * @type {fileLoader} + */ + +exports.fileLoader = fs.readFileSync; + +/** + * Name of the object containing the locals. + * + * This variable is overridden by {@link Options}`.localsName` if it is not + * `undefined`. + * + * @type {String} + * @public + */ + +exports.localsName = _DEFAULT_LOCALS_NAME; + +/** + * Get the path to the included file from the parent file path and the + * specified path. + * + * @param {String} name specified path + * @param {String} filename parent file path + * @param {Boolean} isDir parent file path whether is directory + * @return {String} + */ +exports.resolveInclude = function(name, filename, isDir) { + var dirname = path.dirname; + var extname = path.extname; + var resolve = path.resolve; + var includePath = resolve(isDir ? filename : dirname(filename), name); + var ext = extname(name); + if (!ext) { + includePath += '.ejs'; + } + return includePath; +}; + +/** + * Get the path to the included file by Options + * + * @param {String} path specified path + * @param {Options} options compilation options + * @return {String} + */ +function getIncludePath(path, options) { + var includePath; + var filePath; + var views = options.views; + + // Abs path + if (path.charAt(0) == '/') { + includePath = exports.resolveInclude(path.replace(/^\/*/,''), options.root || '/', true); + } + // Relative paths + else { + // Look relative to a passed filename first + if (options.filename) { + filePath = exports.resolveInclude(path, options.filename); + if (fs.existsSync(filePath)) { + includePath = filePath; + } + } + // Then look in any views directories + if (!includePath) { + if (Array.isArray(views) && views.some(function (v) { + filePath = exports.resolveInclude(path, v, true); + return fs.existsSync(filePath); + })) { + includePath = filePath; + } + } + if (!includePath) { + throw new Error('Could not find include include file.'); + } + } + return includePath; +} + +/** + * Get the template from a string or a file, either compiled on-the-fly or + * read from cache (if enabled), and cache the template if needed. + * + * If `template` is not set, the file specified in `options.filename` will be + * read. + * + * If `options.cache` is true, this function reads the file from + * `options.filename` so it must be set prior to calling this function. + * + * @memberof module:ejs-internal + * @param {Options} options compilation options + * @param {String} [template] template source + * @return {(TemplateFunction|ClientFunction)} + * Depending on the value of `options.client`, either type might be returned. + * @static + */ + +function handleCache(options, template) { + var func; + var filename = options.filename; + var hasTemplate = arguments.length > 1; + + if (options.cache) { + if (!filename) { + throw new Error('cache option requires a filename'); + } + func = exports.cache.get(filename); + if (func) { + return func; + } + if (!hasTemplate) { + template = fileLoader(filename).toString().replace(_BOM, ''); + } + } + else if (!hasTemplate) { + // istanbul ignore if: should not happen at all + if (!filename) { + throw new Error('Internal EJS error: no file name or template ' + + 'provided'); + } + template = fileLoader(filename).toString().replace(_BOM, ''); + } + func = exports.compile(template, options); + if (options.cache) { + exports.cache.set(filename, func); + } + return func; +} + +/** + * Try calling handleCache with the given options and data and call the + * callback with the result. If an error occurs, call the callback with + * the error. Used by renderFile(). + * + * @memberof module:ejs-internal + * @param {Options} options compilation options + * @param {Object} data template data + * @param {RenderFileCallback} cb callback + * @static + */ + +function tryHandleCache(options, data, cb) { + var result; + try { + result = handleCache(options)(data); + } + catch (err) { + return cb(err); + } + return cb(null, result); +} + +/** + * fileLoader is independent + * + * @param {String} filePath ejs file path. + * @return {String} The contents of the specified file. + * @static + */ + +function fileLoader(filePath){ + return exports.fileLoader(filePath); +} + +/** + * Get the template function. + * + * If `options.cache` is `true`, then the template is cached. + * + * @memberof module:ejs-internal + * @param {String} path path for the specified file + * @param {Options} options compilation options + * @return {(TemplateFunction|ClientFunction)} + * Depending on the value of `options.client`, either type might be returned + * @static + */ + +function includeFile(path, options) { + var opts = utils.shallowCopy({}, options); + opts.filename = getIncludePath(path, opts); + return handleCache(opts); +} + +/** + * Get the JavaScript source of an included file. + * + * @memberof module:ejs-internal + * @param {String} path path for the specified file + * @param {Options} options compilation options + * @return {Object} + * @static + */ + +function includeSource(path, options) { + var opts = utils.shallowCopy({}, options); + var includePath; + var template; + includePath = getIncludePath(path, opts); + template = fileLoader(includePath).toString().replace(_BOM, ''); + opts.filename = includePath; + var templ = new Template(template, opts); + templ.generateSource(); + return { + source: templ.source, + filename: includePath, + template: template + }; +} + +/** + * Re-throw the given `err` in context to the `str` of ejs, `filename`, and + * `lineno`. + * + * @implements RethrowCallback + * @memberof module:ejs-internal + * @param {Error} err Error object + * @param {String} str EJS source + * @param {String} filename file name of the EJS file + * @param {String} lineno line number of the error + * @static + */ + +function rethrow(err, str, flnm, lineno, esc){ + var lines = str.split('\n'); + var start = Math.max(lineno - 3, 0); + var end = Math.min(lines.length, lineno + 3); + var filename = esc(flnm); // eslint-disable-line + // Error context + var context = lines.slice(start, end).map(function (line, i){ + var curr = i + start + 1; + return (curr == lineno ? ' >> ' : ' ') + + curr + + '| ' + + line; + }).join('\n'); + + // Alter exception message + err.path = filename; + err.message = (filename || 'ejs') + ':' + + lineno + '\n' + + context + '\n\n' + + err.message; + + throw err; +} + +function stripSemi(str){ + return str.replace(/;(\s*$)/, '$1'); +} + +/** + * Compile the given `str` of ejs into a template function. + * + * @param {String} template EJS template + * + * @param {Options} opts compilation options + * + * @return {(TemplateFunction|ClientFunction)} + * Depending on the value of `opts.client`, either type might be returned. + * @public + */ + +exports.compile = function compile(template, opts) { + var templ; + + // v1 compat + // 'scope' is 'context' + // FIXME: Remove this in a future version + if (opts && opts.scope) { + if (!scopeOptionWarned){ + console.warn('`scope` option is deprecated and will be removed in EJS 3'); + scopeOptionWarned = true; + } + if (!opts.context) { + opts.context = opts.scope; + } + delete opts.scope; + } + templ = new Template(template, opts); + return templ.compile(); +}; + +/** + * Render the given `template` of ejs. + * + * If you would like to include options but not data, you need to explicitly + * call this function with `data` being an empty object or `null`. + * + * @param {String} template EJS template + * @param {Object} [data={}] template data + * @param {Options} [opts={}] compilation and rendering options + * @return {String} + * @public + */ + +exports.render = function (template, d, o) { + var data = d || {}; + var opts = o || {}; + + // No options object -- if there are optiony names + // in the data, copy them to options + if (arguments.length == 2) { + utils.shallowCopyFromList(opts, data, _OPTS); + } + + return handleCache(opts, template)(data); +}; + +/** + * Render an EJS file at the given `path` and callback `cb(err, str)`. + * + * If you would like to include options but not data, you need to explicitly + * call this function with `data` being an empty object or `null`. + * + * @param {String} path path to the EJS file + * @param {Object} [data={}] template data + * @param {Options} [opts={}] compilation and rendering options + * @param {RenderFileCallback} cb callback + * @public + */ + +exports.renderFile = function () { + var filename = arguments[0]; + var cb = arguments[arguments.length - 1]; + var opts = {filename: filename}; + var data; + + if (arguments.length > 2) { + data = arguments[1]; + + // No options object -- if there are optiony names + // in the data, copy them to options + if (arguments.length === 3) { + // Express 4 + if (data.settings) { + if (data.settings['view options']) { + utils.shallowCopyFromList(opts, data.settings['view options'], _OPTS_EXPRESS); + } + if (data.settings.views) { + opts.views = data.settings.views; + } + } + // Express 3 and lower + else { + utils.shallowCopyFromList(opts, data, _OPTS_EXPRESS); + } + } + else { + // Use shallowCopy so we don't pollute passed in opts obj with new vals + utils.shallowCopy(opts, arguments[2]); + } + + opts.filename = filename; + } + else { + data = {}; + } + + return tryHandleCache(opts, data, cb); +}; + +/** + * Clear intermediate JavaScript cache. Calls {@link Cache#reset}. + * @public + */ + +exports.clearCache = function () { + exports.cache.reset(); +}; + +function Template(text, opts) { + opts = opts || {}; + var options = {}; + this.templateText = text; + this.mode = null; + this.truncate = false; + this.currentLine = 1; + this.source = ''; + this.dependencies = []; + options.client = opts.client || false; + options.escapeFunction = opts.escape || utils.escapeXML; + options.compileDebug = opts.compileDebug !== false; + options.debug = !!opts.debug; + options.filename = opts.filename; + options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER; + options.strict = opts.strict || false; + options.context = opts.context; + options.cache = opts.cache || false; + options.rmWhitespace = opts.rmWhitespace; + options.root = opts.root; + options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME; + options.views = opts.views; + + if (options.strict) { + options._with = false; + } + else { + options._with = typeof opts._with != 'undefined' ? opts._with : true; + } + + this.opts = options; + + this.regex = this.createRegex(); +} + +Template.modes = { + EVAL: 'eval', + ESCAPED: 'escaped', + RAW: 'raw', + COMMENT: 'comment', + LITERAL: 'literal' +}; + +Template.prototype = { + createRegex: function () { + var str = _REGEX_STRING; + var delim = utils.escapeRegExpChars(this.opts.delimiter); + str = str.replace(/%/g, delim); + return new RegExp(str); + }, + + compile: function () { + var src; + var fn; + var opts = this.opts; + var prepended = ''; + var appended = ''; + var escapeFn = opts.escapeFunction; + + if (!this.source) { + this.generateSource(); + prepended += ' var __output = [], __append = __output.push.bind(__output);' + '\n'; + if (opts._with !== false) { + prepended += ' with (' + opts.localsName + ' || {}) {' + '\n'; + appended += ' }' + '\n'; + } + appended += ' return __output.join("");' + '\n'; + this.source = prepended + this.source + appended; + } + + if (opts.compileDebug) { + src = 'var __line = 1' + '\n' + + ' , __lines = ' + JSON.stringify(this.templateText) + '\n' + + ' , __filename = ' + (opts.filename ? + JSON.stringify(opts.filename) : 'undefined') + ';' + '\n' + + 'try {' + '\n' + + this.source + + '} catch (e) {' + '\n' + + ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n' + + '}' + '\n'; + } + else { + src = this.source; + } + + if (opts.client) { + src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src; + if (opts.compileDebug) { + src = 'rethrow = rethrow || ' + rethrow.toString() + ';' + '\n' + src; + } + } + + if (opts.strict) { + src = '"use strict";\n' + src; + } + if (opts.debug) { + console.log(src); + } + + try { + fn = new Function(opts.localsName + ', escapeFn, include, rethrow', src); + } + catch(e) { + // istanbul ignore else + if (e instanceof SyntaxError) { + if (opts.filename) { + e.message += ' in ' + opts.filename; + } + e.message += ' while compiling ejs\n\n'; + e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\n'; + e.message += 'https://github.com/RyanZim/EJS-Lint'; + } + throw e; + } + + if (opts.client) { + fn.dependencies = this.dependencies; + return fn; + } + + // Return a callable function which will execute the function + // created by the source-code, with the passed data as locals + // Adds a local `include` function which allows full recursive include + var returnedFn = function (data) { + var include = function (path, includeData) { + var d = utils.shallowCopy({}, data); + if (includeData) { + d = utils.shallowCopy(d, includeData); + } + return includeFile(path, opts)(d); + }; + return fn.apply(opts.context, [data || {}, escapeFn, include, rethrow]); + }; + returnedFn.dependencies = this.dependencies; + return returnedFn; + }, + + generateSource: function () { + var opts = this.opts; + + if (opts.rmWhitespace) { + // Have to use two separate replace here as `^` and `$` operators don't + // work well with `\r`. + this.templateText = + this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, ''); + } + + // Slurp spaces and tabs before <%_ and after _%> + this.templateText = + this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>'); + + var self = this; + var matches = this.parseTemplateText(); + var d = this.opts.delimiter; + + if (matches && matches.length) { + matches.forEach(function (line, index) { + var opening; + var closing; + var include; + var includeOpts; + var includeObj; + var includeSrc; + // If this is an opening tag, check for closing tags + // FIXME: May end up with some false positives here + // Better to store modes as k/v with '<' + delimiter as key + // Then this can simply check against the map + if ( line.indexOf('<' + d) === 0 // If it is a tag + && line.indexOf('<' + d + d) !== 0) { // and is not escaped + closing = matches[index + 2]; + if (!(closing == d + '>' || closing == '-' + d + '>' || closing == '_' + d + '>')) { + throw new Error('Could not find matching close tag for "' + line + '".'); + } + } + // HACK: backward-compat `include` preprocessor directives + if ((include = line.match(/^\s*include\s+(\S+)/))) { + opening = matches[index - 1]; + // Must be in EVAL or RAW mode + if (opening && (opening == '<' + d || opening == '<' + d + '-' || opening == '<' + d + '_')) { + includeOpts = utils.shallowCopy({}, self.opts); + includeObj = includeSource(include[1], includeOpts); + if (self.opts.compileDebug) { + includeSrc = + ' ; (function(){' + '\n' + + ' var __line = 1' + '\n' + + ' , __lines = ' + JSON.stringify(includeObj.template) + '\n' + + ' , __filename = ' + JSON.stringify(includeObj.filename) + ';' + '\n' + + ' try {' + '\n' + + includeObj.source + + ' } catch (e) {' + '\n' + + ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n' + + ' }' + '\n' + + ' ; }).call(this)' + '\n'; + }else{ + includeSrc = ' ; (function(){' + '\n' + includeObj.source + + ' ; }).call(this)' + '\n'; + } + self.source += includeSrc; + self.dependencies.push(exports.resolveInclude(include[1], + includeOpts.filename)); + return; + } + } + self.scanLine(line); + }); + } + + }, + + parseTemplateText: function () { + var str = this.templateText; + var pat = this.regex; + var result = pat.exec(str); + var arr = []; + var firstPos; + + while (result) { + firstPos = result.index; + + if (firstPos !== 0) { + arr.push(str.substring(0, firstPos)); + str = str.slice(firstPos); + } + + arr.push(result[0]); + str = str.slice(result[0].length); + result = pat.exec(str); + } + + if (str) { + arr.push(str); + } + + return arr; + }, + + _addOutput: function (line) { + if (this.truncate) { + // Only replace single leading linebreak in the line after + // -%> tag -- this is the single, trailing linebreak + // after the tag that the truncation mode replaces + // Handle Win / Unix / old Mac linebreaks -- do the \r\n + // combo first in the regex-or + line = line.replace(/^(?:\r\n|\r|\n)/, ''); + this.truncate = false; + } + else if (this.opts.rmWhitespace) { + // rmWhitespace has already removed trailing spaces, just need + // to remove linebreaks + line = line.replace(/^\n/, ''); + } + if (!line) { + return line; + } + + // Preserve literal slashes + line = line.replace(/\\/g, '\\\\'); + + // Convert linebreaks + line = line.replace(/\n/g, '\\n'); + line = line.replace(/\r/g, '\\r'); + + // Escape double-quotes + // - this will be the delimiter during execution + line = line.replace(/"/g, '\\"'); + this.source += ' ; __append("' + line + '")' + '\n'; + }, + + scanLine: function (line) { + var self = this; + var d = this.opts.delimiter; + var newLineCount = 0; + + newLineCount = (line.split('\n').length - 1); + + switch (line) { + case '<' + d: + case '<' + d + '_': + this.mode = Template.modes.EVAL; + break; + case '<' + d + '=': + this.mode = Template.modes.ESCAPED; + break; + case '<' + d + '-': + this.mode = Template.modes.RAW; + break; + case '<' + d + '#': + this.mode = Template.modes.COMMENT; + break; + case '<' + d + d: + this.mode = Template.modes.LITERAL; + this.source += ' ; __append("' + line.replace('<' + d + d, '<' + d) + '")' + '\n'; + break; + case d + d + '>': + this.mode = Template.modes.LITERAL; + this.source += ' ; __append("' + line.replace(d + d + '>', d + '>') + '")' + '\n'; + break; + case d + '>': + case '-' + d + '>': + case '_' + d + '>': + if (this.mode == Template.modes.LITERAL) { + this._addOutput(line); + } + + this.mode = null; + this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0; + break; + default: + // In script mode, depends on type of tag + if (this.mode) { + // If '//' is found without a line break, add a line break. + switch (this.mode) { + case Template.modes.EVAL: + case Template.modes.ESCAPED: + case Template.modes.RAW: + if (line.lastIndexOf('//') > line.lastIndexOf('\n')) { + line += '\n'; + } + } + switch (this.mode) { + // Just executing code + case Template.modes.EVAL: + this.source += ' ; ' + line + '\n'; + break; + // Exec, esc, and output + case Template.modes.ESCAPED: + this.source += ' ; __append(escapeFn(' + stripSemi(line) + '))' + '\n'; + break; + // Exec and output + case Template.modes.RAW: + this.source += ' ; __append(' + stripSemi(line) + ')' + '\n'; + break; + case Template.modes.COMMENT: + // Do nothing + break; + // Literal <%% mode, append as raw output + case Template.modes.LITERAL: + this._addOutput(line); + break; + } + } + // In string mode, just add the output + else { + this._addOutput(line); + } + } + + if (self.opts.compileDebug && newLineCount) { + this.currentLine += newLineCount; + this.source += ' ; __line = ' + this.currentLine + '\n'; + } + } +}; + +/** + * Escape characters reserved in XML. + * + * This is simply an export of {@link module:utils.escapeXML}. + * + * If `markup` is `undefined` or `null`, the empty string is returned. + * + * @param {String} markup Input string + * @return {String} Escaped string + * @public + * @func + * */ +exports.escapeXML = utils.escapeXML; + +/** + * Express.js support. + * + * This is an alias for {@link module:ejs.renderFile}, in order to support + * Express.js out-of-the-box. + * + * @func + */ + +exports.__express = exports.renderFile; + +// Add require support +/* istanbul ignore else */ +if (require.extensions) { + require.extensions['.ejs'] = function (module, flnm) { + var filename = flnm || /* istanbul ignore next */ module.filename; + var options = { + filename: filename, + client: true + }; + var template = fileLoader(filename).toString(); + var fn = exports.compile(template, options); + module._compile('module.exports = ' + fn.toString() + ';', filename); + }; +} + +/** + * Version of EJS. + * + * @readonly + * @type {String} + * @public + */ + +exports.VERSION = _VERSION_STRING; + +/** + * Name for detection of EJS. + * + * @readonly + * @type {String} + * @public + */ + +exports.name = _NAME; + +/* istanbul ignore if */ +if (typeof window != 'undefined') { + window.ejs = exports; +} diff --git a/node_modules/ejs/lib/utils.js b/node_modules/ejs/lib/utils.js new file mode 100644 index 0000000..1b539da --- /dev/null +++ b/node_modules/ejs/lib/utils.js @@ -0,0 +1,164 @@ +/* + * EJS Embedded JavaScript templates + * Copyright 2112 Matthew Eernisse (mde@fleegix.org) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +/** + * Private utility functions + * @module utils + * @private + */ + +'use strict'; + +var regExpChars = /[|\\{}()[\]^$+*?.]/g; + +/** + * Escape characters reserved in regular expressions. + * + * If `string` is `undefined` or `null`, the empty string is returned. + * + * @param {String} string Input string + * @return {String} Escaped string + * @static + * @private + */ +exports.escapeRegExpChars = function (string) { + // istanbul ignore if + if (!string) { + return ''; + } + return String(string).replace(regExpChars, '\\$&'); +}; + +var _ENCODE_HTML_RULES = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; +var _MATCH_HTML = /[&<>\'"]/g; + +function encode_char(c) { + return _ENCODE_HTML_RULES[c] || c; +} + +/** + * Stringified version of constants used by {@link module:utils.escapeXML}. + * + * It is used in the process of generating {@link ClientFunction}s. + * + * @readonly + * @type {String} + */ + +var escapeFuncStr = + 'var _ENCODE_HTML_RULES = {\n' ++ ' "&": "&"\n' ++ ' , "<": "<"\n' ++ ' , ">": ">"\n' ++ ' , \'"\': """\n' ++ ' , "\'": "'"\n' ++ ' }\n' ++ ' , _MATCH_HTML = /[&<>\'"]/g;\n' ++ 'function encode_char(c) {\n' ++ ' return _ENCODE_HTML_RULES[c] || c;\n' ++ '};\n'; + +/** + * Escape characters reserved in XML. + * + * If `markup` is `undefined` or `null`, the empty string is returned. + * + * @implements {EscapeCallback} + * @param {String} markup Input string + * @return {String} Escaped string + * @static + * @private + */ + +exports.escapeXML = function (markup) { + return markup == undefined + ? '' + : String(markup) + .replace(_MATCH_HTML, encode_char); +}; +exports.escapeXML.toString = function () { + return Function.prototype.toString.call(this) + ';\n' + escapeFuncStr; +}; + +/** + * Naive copy of properties from one object to another. + * Does not recurse into non-scalar properties + * Does not check to see if the property has a value before copying + * + * @param {Object} to Destination object + * @param {Object} from Source object + * @return {Object} Destination object + * @static + * @private + */ +exports.shallowCopy = function (to, from) { + from = from || {}; + for (var p in from) { + to[p] = from[p]; + } + return to; +}; + +/** + * Naive copy of a list of key names, from one object to another. + * Only copies property if it is actually defined + * Does not recurse into non-scalar properties + * + * @param {Object} to Destination object + * @param {Object} from Source object + * @param {Array} list List of properties to copy + * @return {Object} Destination object + * @static + * @private + */ +exports.shallowCopyFromList = function (to, from, list) { + for (var i = 0; i < list.length; i++) { + var p = list[i]; + if (typeof from[p] != 'undefined') { + to[p] = from[p]; + } + } + return to; +}; + +/** + * Simple in-process cache implementation. Does not implement limits of any + * sort. + * + * @implements Cache + * @static + * @private + */ +exports.cache = { + _data: {}, + set: function (key, val) { + this._data[key] = val; + }, + get: function (key) { + return this._data[key]; + }, + reset: function () { + this._data = {}; + } +}; diff --git a/node_modules/ejs/package.json b/node_modules/ejs/package.json new file mode 100644 index 0000000..b9aa8cd --- /dev/null +++ b/node_modules/ejs/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + "ejs@2.5.7", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "ejs@2.5.7", + "_id": "ejs@2.5.7", + "_inBundle": false, + "_integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=", + "_location": "/ejs", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ejs@2.5.7", + "name": "ejs", + "escapedName": "ejs", + "rawSpec": "2.5.7", + "saveSpec": null, + "fetchSpec": "2.5.7" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", + "_spec": "2.5.7", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Matthew Eernisse", + "email": "mde@fleegix.org", + "url": "http://fleegix.org" + }, + "bugs": { + "url": "https://github.com/mde/ejs/issues" + }, + "contributors": [ + { + "name": "Timothy Gu", + "email": "timothygu99@gmail.com", + "url": "https://timothygu.github.io" + } + ], + "dependencies": {}, + "description": "Embedded JavaScript templates", + "devDependencies": { + "browserify": "^13.0.1", + "eslint": "^3.0.0", + "git-directory-deploy": "^1.5.1", + "istanbul": "~0.4.3", + "jake": "^8.0.0", + "jsdoc": "^3.4.0", + "lru-cache": "^4.0.1", + "mocha": "^3.0.2", + "uglify-js": "^2.6.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/mde/ejs", + "keywords": [ + "template", + "engine", + "ejs" + ], + "license": "Apache-2.0", + "main": "./lib/ejs.js", + "name": "ejs", + "repository": { + "type": "git", + "url": "git://github.com/mde/ejs.git" + }, + "scripts": { + "coverage": "istanbul cover node_modules/mocha/bin/_mocha", + "devdoc": "jake doc[dev]", + "doc": "jake doc", + "lint": "eslint \"**/*.js\" Jakefile", + "test": "jake test" + }, + "version": "2.5.7" +} diff --git a/node_modules/encodeurl/HISTORY.md b/node_modules/encodeurl/HISTORY.md new file mode 100644 index 0000000..41313b2 --- /dev/null +++ b/node_modules/encodeurl/HISTORY.md @@ -0,0 +1,14 @@ +1.0.2 / 2018-01-21 +================== + + * Fix encoding `%` as last character + +1.0.1 / 2016-06-09 +================== + + * Fix encoding unpaired surrogates at start/end of string + +1.0.0 / 2016-06-08 +================== + + * Initial release diff --git a/node_modules/encodeurl/LICENSE b/node_modules/encodeurl/LICENSE new file mode 100644 index 0000000..8812229 --- /dev/null +++ b/node_modules/encodeurl/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Douglas Christopher Wilson + +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/node_modules/encodeurl/README.md b/node_modules/encodeurl/README.md new file mode 100644 index 0000000..127c5a0 --- /dev/null +++ b/node_modules/encodeurl/README.md @@ -0,0 +1,128 @@ +# encodeurl + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Encode a URL to a percent-encoded form, excluding already-encoded sequences + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install encodeurl +``` + +## API + +```js +var encodeUrl = require('encodeurl') +``` + +### encodeUrl(url) + +Encode a URL to a percent-encoded form, excluding already-encoded sequences. + +This function will take an already-encoded URL and encode all the non-URL +code points (as UTF-8 byte sequences). This function will not encode the +"%" character unless it is not part of a valid sequence (`%20` will be +left as-is, but `%foo` will be encoded as `%25foo`). + +This encode is meant to be "safe" and does not throw errors. It will try as +hard as it can to properly encode the given URL, including replacing any raw, +unpaired surrogate pairs with the Unicode replacement character prior to +encoding. + +This function is _similar_ to the intrinsic function `encodeURI`, except it +will not encode the `%` character if that is part of a valid sequence, will +not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired +surrogate pairs with the Unicode replacement character (instead of throwing). + +## Examples + +### Encode a URL containing user-controled data + +```js +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') + +http.createServer(function onRequest (req, res) { + // get encoded form of inbound url + var url = encodeUrl(req.url) + + // create html message + var body = '

Location ' + escapeHtml(url) + ' not found

' + + // send a 404 + res.statusCode = 404 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) + res.end(body, 'utf-8') +}) +``` + +### Encode a URL for use in a header field + +```js +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') +var url = require('url') + +http.createServer(function onRequest (req, res) { + // parse inbound url + var href = url.parse(req) + + // set new host for redirect + href.host = 'localhost' + href.protocol = 'https:' + href.slashes = true + + // create location header + var location = encodeUrl(url.format(href)) + + // create html message + var body = '

Redirecting to new site: ' + escapeHtml(location) + '

' + + // send a 301 + res.statusCode = 301 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) + res.setHeader('Location', location) + res.end(body, 'utf-8') +}) +``` + +## Testing + +```sh +$ npm test +$ npm run lint +``` + +## References + +- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986] +- [WHATWG URL Living Standard][whatwg-url] + +[rfc-3986]: https://tools.ietf.org/html/rfc3986 +[whatwg-url]: https://url.spec.whatwg.org/ + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/encodeurl.svg +[npm-url]: https://npmjs.org/package/encodeurl +[node-version-image]: https://img.shields.io/node/v/encodeurl.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg +[travis-url]: https://travis-ci.org/pillarjs/encodeurl +[coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg +[coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master +[downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg +[downloads-url]: https://npmjs.org/package/encodeurl diff --git a/node_modules/encodeurl/index.js b/node_modules/encodeurl/index.js new file mode 100644 index 0000000..fc4906c --- /dev/null +++ b/node_modules/encodeurl/index.js @@ -0,0 +1,60 @@ +/*! + * encodeurl + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = encodeUrl + +/** + * RegExp to match non-URL code points, *after* encoding (i.e. not including "%") + * and including invalid escape sequences. + * @private + */ + +var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g + +/** + * RegExp to match unmatched surrogate pair. + * @private + */ + +var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g + +/** + * String to replace unmatched surrogate pair with. + * @private + */ + +var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2' + +/** + * Encode a URL to a percent-encoded form, excluding already-encoded sequences. + * + * This function will take an already-encoded URL and encode all the non-URL + * code points. This function will not encode the "%" character unless it is + * not part of a valid sequence (`%20` will be left as-is, but `%foo` will + * be encoded as `%25foo`). + * + * This encode is meant to be "safe" and does not throw errors. It will try as + * hard as it can to properly encode the given URL, including replacing any raw, + * unpaired surrogate pairs with the Unicode replacement character prior to + * encoding. + * + * @param {string} url + * @return {string} + * @public + */ + +function encodeUrl (url) { + return String(url) + .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE) + .replace(ENCODE_CHARS_REGEXP, encodeURI) +} diff --git a/node_modules/encodeurl/package.json b/node_modules/encodeurl/package.json new file mode 100644 index 0000000..c35b8a8 --- /dev/null +++ b/node_modules/encodeurl/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "encodeurl@1.0.2", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "encodeurl@1.0.2", + "_id": "encodeurl@1.0.2", + "_inBundle": false, + "_integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "_location": "/encodeurl", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "encodeurl@1.0.2", + "name": "encodeurl", + "escapedName": "encodeurl", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/express", + "/finalhandler", + "/send", + "/serve-static" + ], + "_resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/pillarjs/encodeurl/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences", + "devDependencies": { + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.8.0", + "eslint-plugin-node": "5.2.1", + "eslint-plugin-promise": "3.6.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "2.5.3" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "homepage": "https://github.com/pillarjs/encodeurl#readme", + "keywords": [ + "encode", + "encodeurl", + "url" + ], + "license": "MIT", + "name": "encodeurl", + "repository": { + "type": "git", + "url": "git+https://github.com/pillarjs/encodeurl.git" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.0.2" +} diff --git a/node_modules/error-ex/LICENSE b/node_modules/error-ex/LICENSE new file mode 100644 index 0000000..0a5f461 --- /dev/null +++ b/node_modules/error-ex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +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/node_modules/error-ex/README.md b/node_modules/error-ex/README.md new file mode 100644 index 0000000..97f744a --- /dev/null +++ b/node_modules/error-ex/README.md @@ -0,0 +1,144 @@ +# node-error-ex [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-error-ex.svg?style=flat-square)](https://travis-ci.org/Qix-/node-error-ex) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-error-ex.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-error-ex) +> Easily subclass and customize new Error types + +## Examples +To include in your project: +```javascript +var errorEx = require('error-ex'); +``` + +To create an error message type with a specific name (note, that `ErrorFn.name` +will not reflect this): +```javascript +var JSONError = errorEx('JSONError'); + +var err = new JSONError('error'); +err.name; //-> JSONError +throw err; //-> JSONError: error +``` + +To add a stack line: +```javascript +var JSONError = errorEx('JSONError', {fileName: errorEx.line('in %s')}); + +var err = new JSONError('error') +err.fileName = '/a/b/c/foo.json'; +throw err; //-> (line 2)-> in /a/b/c/foo.json +``` + +To append to the error message: +```javascript +var JSONError = errorEx('JSONError', {fileName: errorEx.append('in %s')}); + +var err = new JSONError('error'); +err.fileName = '/a/b/c/foo.json'; +throw err; //-> JSONError: error in /a/b/c/foo.json +``` + +## API + +#### `errorEx([name], [properties])` +Creates a new ErrorEx error type + +- `name`: the name of the new type (appears in the error message upon throw; + defaults to `Error.name`) +- `properties`: if supplied, used as a key/value dictionary of properties to + use when building up the stack message. Keys are property names that are + looked up on the error message, and then passed to function values. + - `line`: if specified and is a function, return value is added as a stack + entry (error-ex will indent for you). Passed the property value given + the key. + - `stack`: if specified and is a function, passed the value of the property + using the key, and the raw stack lines as a second argument. Takes no + return value (but the stack can be modified directly). + - `message`: if specified and is a function, return value is used as new + `.message` value upon get. Passed the property value of the property named + by key, and the existing message is passed as the second argument as an + array of lines (suitable for multi-line messages). + +Returns a constructor (Function) that can be used just like the regular Error +constructor. + +```javascript +var errorEx = require('error-ex'); + +var BasicError = errorEx(); + +var NamedError = errorEx('NamedError'); + +// -- + +var AdvancedError = errorEx('AdvancedError', { + foo: { + line: function (value, stack) { + if (value) { + return 'bar ' + value; + } + return null; + } + } +} + +var err = new AdvancedError('hello, world'); +err.foo = 'baz'; +throw err; + +/* + AdvancedError: hello, world + bar baz + at tryReadme() (readme.js:20:1) +*/ +``` + +#### `errorEx.line(str)` +Creates a stack line using a delimiter + +> This is a helper function. It is to be used in lieu of writing a value object +> for `properties` values. + +- `str`: The string to create + - Use the delimiter `%s` to specify where in the string the value should go + +```javascript +var errorEx = require('error-ex'); + +var FileError = errorEx('FileError', {fileName: errorEx.line('in %s')}); + +var err = new FileError('problem reading file'); +err.fileName = '/a/b/c/d/foo.js'; +throw err; + +/* + FileError: problem reading file + in /a/b/c/d/foo.js + at tryReadme() (readme.js:7:1) +*/ +``` + +#### `errorEx.append(str)` +Appends to the `error.message` string + +> This is a helper function. It is to be used in lieu of writing a value object +> for `properties` values. + +- `str`: The string to append + - Use the delimiter `%s` to specify where in the string the value should go + +```javascript +var errorEx = require('error-ex'); + +var SyntaxError = errorEx('SyntaxError', {fileName: errorEx.append('in %s')}); + +var err = new SyntaxError('improper indentation'); +err.fileName = '/a/b/c/d/foo.js'; +throw err; + +/* + SyntaxError: improper indentation in /a/b/c/d/foo.js + at tryReadme() (readme.js:7:1) +*/ +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/error-ex/index.js b/node_modules/error-ex/index.js new file mode 100644 index 0000000..43641b0 --- /dev/null +++ b/node_modules/error-ex/index.js @@ -0,0 +1,133 @@ +'use strict'; + +var util = require('util'); +var isArrayish = require('is-arrayish'); + +var errorEx = function errorEx(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } + + message = message instanceof Error + ? message.message + : (message || this.message); + + Error.call(this, message); + Error.captureStackTrace(this, errorExError); + + this.name = name; + + Object.defineProperty(this, 'message', { + configurable: true, + enumerable: false, + get: function () { + var newMessage = message.split(/\r?\n/g); + + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('message' in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + + return newMessage.join('\n'); + }, + set: function (v) { + message = v; + } + }); + + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + + stackDescriptor.get = function () { + var stack = (stackGetter) + ? stackGetter.call(this).split(/\r?\n+/g) + : stackValue.split(/\r?\n+/g); + + // starting in Node 7, the stack builder caches the message. + // just replace it. + stack[0] = this.name + ': ' + this.message; + + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('line' in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack.splice(lineCount++, 0, ' ' + line); + } + } + + if ('stack' in modifier) { + modifier.stack(this[key], stack); + } + } + + return stack.join('\n'); + }; + + Object.defineProperty(this, 'stack', stackDescriptor); + }; + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } + + return errorExError; +}; + +errorEx.append = function (str, def) { + return { + message: function (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (v) { + v = v || def; + + if (v) { + return str.replace('%s', v.toString()); + } + + return null; + } + }; +}; + +module.exports = errorEx; diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json new file mode 100644 index 0000000..e1d4dd5 --- /dev/null +++ b/node_modules/error-ex/package.json @@ -0,0 +1,86 @@ +{ + "_from": "error-ex@^1.2.0", + "_id": "error-ex@1.3.1", + "_inBundle": false, + "_integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "_location": "/error-ex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "error-ex@^1.2.0", + "name": "error-ex", + "escapedName": "error-ex", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/parse-json" + ], + "_resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "_shasum": "f855a86ce61adc4e8621c3cda21e7a7612c3a8dc", + "_spec": "error-ex@^1.2.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/parse-json", + "bugs": { + "url": "https://github.com/qix-/node-error-ex/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-arrayish": "^0.2.1" + }, + "deprecated": false, + "description": "Easy error subclassing and stack customization", + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.7.1" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/qix-/node-error-ex#readme", + "keywords": [ + "error", + "errors", + "extend", + "extending", + "extension", + "subclass", + "stack", + "custom" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Josh Junon", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + }, + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + } + ], + "name": "error-ex", + "repository": { + "type": "git", + "url": "git+https://github.com/qix-/node-error-ex.git" + }, + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "version": "1.3.1", + "xo": { + "rules": { + "operator-linebreak": [ + 0 + ] + } + } +} diff --git a/node_modules/es5-ext/.editorconfig b/node_modules/es5-ext/.editorconfig new file mode 100644 index 0000000..c24a6cd --- /dev/null +++ b/node_modules/es5-ext/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/node_modules/es5-ext/CHANGELOG.md b/node_modules/es5-ext/CHANGELOG.md new file mode 100644 index 0000000..35960e7 --- /dev/null +++ b/node_modules/es5-ext/CHANGELOG.md @@ -0,0 +1,259 @@ +# 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. + + +## [0.10.39](https://github.com/medikoo/es5-ext/compare/v0.10.38...v0.10.39) (2018-02-16) + + +### Features + +* Promise.lazy ([7a30a78](https://github.com/medikoo/es5-ext/commit/7a30a78)) + + + + +## [0.10.38](https://github.com/medikoo/es5-ext/compare/v0.10.37...v0.10.38) (2018-01-16) + + +### Features + +* Object.isNaturalNumber an Object.isNaturalNumberValue ([66a40af](https://github.com/medikoo/es5-ext/commit/66a40af)) + + + + +## [0.10.37](https://github.com/medikoo/es5-ext/compare/v0.10.36...v0.10.37) (2017-11-23) + + +### Features + +* String.random util ([7c28739](https://github.com/medikoo/es5-ext/commit/7c28739)) + + + + +## [0.10.36](https://github.com/medikoo/es5-ext/compare/v0.10.35...v0.10.36) (2017-11-23) + + +### Features + +* **date:** isTimeValue and ensureTimeValue utils ([7659dc5](https://github.com/medikoo/es5-ext/commit/7659dc5)) + + + + +## [0.10.35](https://github.com/medikoo/es5-ext/compare/v0.10.34...v0.10.35) (2017-10-13) + + +### Bug Fixes + +* **Object.copy:** do not upgrade primitives to objects ([dd4d88f](https://github.com/medikoo/es5-ext/commit/dd4d88f)) + + + + +## [0.10.34](https://github.com/medikoo/es5-ext/compare/v0.10.33...v0.10.34) (2017-10-13) + + +### Features + +* **copyDeep:** duplicate only recursive instances ([bba529a](https://github.com/medikoo/es5-ext/commit/bba529a)) + + + + +## [0.10.33](https://github.com/medikoo/es5-ext/compare/v0.10.32...v0.10.33) (2017-10-13) + + +### Bug Fixes + +* **Object.assignDeep:** relax input validation ([1baf57d](https://github.com/medikoo/es5-ext/commit/1baf57d)) + + + + +## [0.10.32](https://github.com/medikoo/es5-ext/compare/v0.10.31...v0.10.32) (2017-10-13) + + +### Features + +* Object.assignDeep ([2345e0b](https://github.com/medikoo/es5-ext/commit/2345e0b)) + + + + +## [0.10.31](https://github.com/medikoo/es5-ext/compare/v0.10.30...v0.10.31) (2017-10-09) + + +### Features + +* Object.isPlainFunction utility ([031be0a](https://github.com/medikoo/es5-ext/commit/031be0a)) + + + + +## [0.10.30](https://github.com/medikoo/es5-ext/compare/v0.10.29...v0.10.30) (2017-08-25) + + +### Bug Fixes + +* value stringification for error message ([37bb96b](https://github.com/medikoo/es5-ext/commit/37bb96b)) + + + + +## [0.10.29](https://github.com/medikoo/es5-ext/compare/v0.10.28...v0.10.29) (2017-08-18) + + +### Bug Fixes + +* string.repeat after recent regression ([b02fab4](https://github.com/medikoo/es5-ext/commit/b02fab4)) + + + + +## [0.10.28](https://github.com/medikoo/es5-ext/compare/v0.10.27...v0.10.28) (2017-08-18) + + +### Features + +* array.isEmpty method ([b0cfbdd](https://github.com/medikoo/es5-ext/commit/b0cfbdd)) +* improve new lines representation ([860fe8b](https://github.com/medikoo/es5-ext/commit/860fe8b)) +* Object.ensureArray util ([595c341](https://github.com/medikoo/es5-ext/commit/595c341)) +* toShortStringRepresentation util ([6842d06](https://github.com/medikoo/es5-ext/commit/6842d06)) + + + + +## [0.10.27](https://github.com/medikoo/es5-ext/compare/v0.10.26...v0.10.27) (2017-08-11) + + +### Bug Fixes + +* isNumberValue should not crash on non-coercible values ([0db765e](https://github.com/medikoo/es5-ext/commit/0db765e)) + + +### Features + +* add Object.ensureFiniteNumber util ([11c67f5](https://github.com/medikoo/es5-ext/commit/11c67f5)) +* add Object.isFiniteNumber util ([fe5b55a](https://github.com/medikoo/es5-ext/commit/fe5b55a)) + + + + +## [0.10.26](https://github.com/medikoo/es5-ext/compare/v0.10.25...v0.10.26) (2017-08-02) + + +### Bug Fixes + +* **general:** ensure optionalChaining in index ([3df879a](https://github.com/medikoo/es5-ext/commit/3df879a)) + + + + +## [0.10.25](https://github.com/medikoo/es5-ext/compare/v0.10.24...v0.10.25) (2017-08-02) + + +### Features + +* **general:** optionalChaining utility ([26332b5](https://github.com/medikoo/es5-ext/commit/26332b5)) + + + + +## [0.10.24](https://github.com/medikoo/es5-ext/compare/v0.10.23...v0.10.24) (2017-07-10) + + +### Features + +* resolve global with CSP safe method ([d386449](https://github.com/medikoo/es5-ext/commit/d386449)) + + + + +## [0.10.23](https://github.com/medikoo/es5-ext/compare/v0.10.22...v0.10.23) (2017-06-05) + + +### Bug Fixes + +* **Error.custom:** allow non-string code ([e8db3a0](https://github.com/medikoo/es5-ext/commit/e8db3a0)) +* **Error.custom:** improve `ext` argument detection ([0edbfbc](https://github.com/medikoo/es5-ext/commit/0edbfbc)) + + + + +## [0.10.22](https://github.com/medikoo/es5-ext/compare/v0.10.21...v0.10.22) (2017-05-31) + + +### Bug Fixes + +* ensure proper symbols stringification in early implementations ([ce51900](https://github.com/medikoo/es5-ext/commit/ce51900)) + + + + +## [0.10.21](https://github.com/medikoo/es5-ext/compare/v0.10.20...v0.10.21) (2017-05-22) + + +### Features + +* support arrow functions in Function/#/to-tring-tokens.js ([ad3de1e](https://github.com/medikoo/es5-ext/commit/ad3de1e)) + + + + +## [0.10.20](https://github.com/medikoo/es5-ext/compare/v0.10.19...v0.10.20) (2017-05-17) + + +### Features + +* if listed copy not only if own property ([d7e7cef](https://github.com/medikoo/es5-ext/commit/d7e7cef)) +* support `ensure` option in Object.copy ([295326f](https://github.com/medikoo/es5-ext/commit/295326f)) + + + + +## [0.10.19](https://github.com/medikoo/es5-ext/compare/v0.10.18...v0.10.19) (2017-05-17) + + +### Features + +* support propertyNames option in Object.copy ([5442279](https://github.com/medikoo/es5-ext/commit/5442279)) + + + + +## [0.10.18](https://github.com/medikoo/es5-ext/compare/v0.10.17...v0.10.18) (2017-05-15) + + +### Bug Fixes + +* take all changes in safeToString ([3c5cd12](https://github.com/medikoo/es5-ext/commit/3c5cd12)) + + + + +## [0.10.17](https://github.com/medikoo/es5-ext/compare/v0.10.16...v0.10.17) (2017-05-15) + + +### Features + +* introduce Object.ensurePromise ([46a2f45](https://github.com/medikoo/es5-ext/commit/46a2f45)) +* introduce Object.isPromise ([27aecc8](https://github.com/medikoo/es5-ext/commit/27aecc8)) +* introduce safeToString ([0cc6a7b](https://github.com/medikoo/es5-ext/commit/0cc6a7b)) + + + + +## [0.10.16](https://github.com/medikoo/es5-ext/compare/v0.10.15...v0.10.16) (2017-05-09) + + +### Features + +* add String.prototype.count ([2e53241](https://github.com/medikoo/es5-ext/commit/2e53241)) + + +## Changelog for previous versions + +See `CHANGES` file \ No newline at end of file diff --git a/node_modules/es5-ext/CHANGES b/node_modules/es5-ext/CHANGES new file mode 100644 index 0000000..bb84bab --- /dev/null +++ b/node_modules/es5-ext/CHANGES @@ -0,0 +1,650 @@ +For recent changelog see CHANGELOG.md + +----- + +v0.10.15 -- 2017.03.20 +* Fix Object.isValue (it was actually isNotValue) + +v0.10.14 -- 2017.03.15 +* Object.isValue util + +v0.10.13 -- 2017.03.13 +* Introduce JSON.safeStringify +* Improve message handling in error/custom +* Fix Array#concat shim +* Improve Array#flatten algorithm so it's stack trace friendly +* Make Object.isObject ES3 compatible + +v0.10.12 -- 2016.07.01 +* Ensure symbols are copied in Object.mixin +* Prevent RangeError errors in array#flatten +* Do not validate invalidate dates in validDate + +v0.10.11 -- 2015.12.18 +* Ensure that check for implementation of RegExp flags doesn't crash in V8 (thanks @mathiasbynens) + +v0.10.10 -- 2015.12.11 +* Add Object.isNumberValue util + +v0.10.9 -- 2015.12.01 +* Add Object.ensureNaturalNumber and Object.ensureNaturalNumberValue + +v0.10.8 -- 2015.10.02 +* Add Number.isNatural +* Add Object.find and Object.findKey +* Support arrays in Object.copyDeep +* Fix iteration issue in forEachRight and someRight +* Fix detection of native sinh +* Depend on es6-symbol v3 + +v0.10.7 -- 2015.04.22 +* New utlitities. They're convention differs from v0.10, as they were supposed to land in v1. + Still they're non breaking and start the conventions to be used in v1 + * Object.validateArrayLike + * Object.validateArrayLikeObject + * Object.validateStringifiable + * Object.validateStringifiableValue + * Universal utilities for array-like/iterable objects + * Iterable.is + * Iterable.validate + * Iterable.validateObject + * Iterable.forEach +* Fix camelToHyphen resolution, it must be absolutely reversable by hyphenToCamel +* Fix calculations of large numbers in Math.tanh +* Fix algorithm of Math.sinh +* Fix indexes to not use real symbols +* Fix length of String.fromCodePoint +* Fix tests of Array#copyWithin +* Update Travis CI configuration + +v0.10.6 -- 2015.02.02 +* Fix handling of infinite values in Math.trunc +* Fix handling of getters in Object.normalizeOptions + +v0.10.5 -- 2015.01.20 +* Add Function#toStringTokens +* Add Object.serialize and Object.unserialize +* Add String.randomUniq +* Fix Strin#camelToHyphen issue with tokens that end with digit +* Optimise Number.isInteger logic +* Improve documentation +* Configure lint scripts +* Fix spelling of LICENSE + +v0.10.4 -- 2014.04.30 +* Assure maximum spec compliance of Array.of and Array.from (thanks @mathiasbynens) +* Improve documentations + +v0.10.3 -- 2014.04.29 +Provide accurate iterators handling: +* Array.from improvements: + * Assure right unicode symbols resolution when processing strings in Array.from + * Rely on ES6 symbol shim and use native @@iterator Symbol if provided by environment +* Add methods: + * Array.prototype.entries + * Array.prototype.keys + * Array.prototype.values + * Array.prototype[@@iterator] + * String.prototype[@@iterator] + +Improve documentation + +v0.10.2 -- 2014.04.24 +- Simplify and deprecate `isCallable`. It seems in ES5 based engines there are + no callable objects which are `typeof obj !== 'function'` +- Update Array.from map callback signature (up to latest resolution of TC39) +- Improve documentation + +v0.10.1 -- 2014.04.14 +Bump version for npm +(Workaround for accidental premature publish & unpublish of v0.10.0 a while ago) + +v0.10.0 -- 2014.04.13 +Major update: +- All methods and function specified for ECMAScript 6 are now introduced as + shims accompanied with functions through which (optionally) they can be + implementend on native objects +- Filename convention was changed to shorter and strictly lower case names. e.g. + `lib/String/prototype/starts-with` became `string/#/starts-with` +- Generated functions are guaranteed to have expected length +- Objects with null prototype (created via `Object.create(null)`) are widely + supported (older version have crashed due to implied `obj.hasOwnProperty` and + related invocations) +- Support array subclasses +- When handling lists do not limit its length to Uint32 range +- Use newly introduced `Object.eq` for strict equality in place of `Object.is` +- Iteration of Object have been improved so properties that were hidden or + removed after iteration started are not iterated. + +Additions: +- `Array.isPlainArray` +- `Array.validArray` +- `Array.prototype.concat` (as updated with ES6) +- `Array.prototype.copyWithin` (as introduced with ES6) +- `Array.prototype.fill` (as introduced with ES6) +- `Array.prototype.filter` (as updated with ES6) +- `Array.prototype.findIndex` (as introduced with ES6) +- `Array.prototype.map` (as updated with ES6) +- `Array.prototype.separate` +- `Array.prototype.slice` (as updated with ES6) +- `Array.prototype.splice` (as updated with ES6) +- `Function.prototype.copy` +- `Math.acosh` (as introduced with ES6) +- `Math.atanh` (as introduced with ES6) +- `Math.cbrt` (as introduced with ES6) +- `Math.clz32` (as introduced with ES6) +- `Math.cosh` (as introduced with ES6) +- `Math.expm1` (as introduced with ES6) +- `Math.fround` (as introduced with ES6) +- `Math.hypot` (as introduced with ES6) +- `Math.imul` (as introduced with ES6) +- `Math.log2` (as introduced with ES6) +- `Math.log10` (as introduced with ES6) +- `Math.log1p` (as introduced with ES6) +- `Math.sinh` (as introduced with ES6) +- `Math.tanh` (as introduced with ES6) +- `Math.trunc` (as introduced with ES6) +- `Number.EPSILON` (as introduced with ES6) +- `Number.MIN_SAFE_INTEGER` (as introduced with ES6) +- `Number.MAX_SAFE_INTEGER` (as introduced with ES6) +- `Number.isFinite` (as introduced with ES6) +- `Number.isInteger` (as introduced with ES6) +- `Number.isSafeInteger` (as introduced with ES6) +- `Object.create` (with fix for V8 issue which disallows prototype turn of + objects derived from null +- `Object.eq` - Less restrictive version of `Object.is` based on SameValueZero + algorithm +- `Object.firstKey` +- `Object.keys` (as updated with ES6) +- `Object.mixinPrototypes` +- `Object.primitiveSet` +- `Object.setPrototypeOf` (as introduced with ES6) +- `Object.validObject` +- `RegExp.escape` +- `RegExp.prototype.match` (as introduced with ES6) +- `RegExp.prototype.replace` (as introduced with ES6) +- `RegExp.prototype.search` (as introduced with ES6) +- `RegExp.prototype.split` (as introduced with ES6) +- `RegExp.prototype.sticky` (as introduced with ES6) +- `RegExp.prototype.unicode` (as introduced with ES6) +- `String.fromCodePoint` (as introduced with ES6) +- `String.raw` (as introduced with ES6) +- `String.prototype.at` +- `String.prototype.codePointAt` (as introduced with ES6) +- `String.prototype.normalize` (as introduced with ES6) +- `String.prototype.plainReplaceAll` + +Removals: +- `reserved` set +- `Array.prototype.commonLeft` +- `Function.insert` +- `Function.remove` +- `Function.prototype.silent` +- `Function.prototype.wrap` +- `Object.descriptor` Move to external `d` project. + See: https://github.com/medikoo/d +- `Object.diff` +- `Object.extendDeep` +- `Object.reduce` +- `Object.values` +- `String.prototype.trimCommonLeft` + +Renames: +- `Function.i` into `Function.identity` +- `Function.k` into `Function.constant` +- `Number.toInt` into `Number.toInteger` +- `Number.toUint` into `Number.toPosInteger` +- `Object.extend` into `Object.assign` (as introduced in ES 6) +- `Object.extendProperties` into `Object.mixin`, with improved internal + handling, so it matches temporarily specified `Object.mixin` for ECMAScript 6 +- `Object.isList` into `Object.isArrayLike` +- `Object.mapToArray` into `Object.toArray` (with fixed function length) +- `Object.toPlainObject` into `Object.normalizeOptions` (as this is the real + use case where we use this function) +- `Function.prototype.chain` into `Function.prototype.compose` +- `Function.prototype.match` into `Function.prototype.spread` +- `String.prototype.format` into `String.formatMethod` + +Improvements & Fixes: +- Remove workaround for primitive values handling in object iterators +- `Array.from`: Update so it follows ES 6 spec +- `Array.prototype.compact`: filters just null and undefined values + (not all falsies) +- `Array.prototype.eIndexOf` and `Array.prototype.eLastIndexOf`: fix position + handling, improve internals +- `Array.prototype.find`: return undefined not null, in case of not found + (follow ES 6) +- `Array.prototype.remove` fix function length +- `Error.custom`: simplify, Custom class case is addressed by outer + `error-create` project -> https://github.com/medikoo/error-create +- `Error.isError` true only for Error instances (remove detection of host + Exception objects) +- `Number.prototype.pad`: Normalize negative pad +- `Object.clear`: Handle errors same way as in `Object.assign` +- `Object.compact`: filters just null and undefined values (not all falsies) +- `Object.compare`: Take into account NaN values +- `Object.copy`: Split into `Object.copy` and `Object.copyDeep` +- `Object.isCopy`: Separate into `Object.isCopy` and `Object.isCopyDeep`, where + `isCopyDeep` handles nested plain objects and plain arrays only +- `String.prototype.endsWith`: Adjust up to ES6 specification +- `String.prototype.repeat`: Adjust up to ES6 specification and improve algorithm +- `String.prototype.simpleReplace`: Rename into `String.prototype.plainReplace` +- `String.prototype.startsWith`: Adjust up to ES6 specification +- Update lint rules, and adjust code to that +- Update Travis CI configuration +- Remove Makefile (it's cross-env utility) + +v0.9.2 -- 2013.03.11 +Added: +* Array.prototype.isCopy +* Array.prototype.isUniq +* Error.CustomError +* Function.validFunction +* Object.extendDeep +* Object.descriptor.binder +* Object.safeTraverse +* RegExp.validRegExp +* String.prototype.capitalize +* String.prototype.simpleReplace + +Fixed: +* Fix Array.prototype.diff for sparse arrays +* Accept primitive objects as input values in Object iteration methods and + Object.clear, Object.count, Object.diff, Object.extend, + Object.getPropertyNames, Object.values +* Pass expected arguments to callbacks of Object.filter, Object.mapKeys, + Object.mapToArray, Object.map +* Improve callable callback support in Object.mapToArray + +v0.9.1 -- 2012.09.17 +* Object.reduce - reduce for hash-like collections +* Accapt any callable object as callback in Object.filter, mapKeys and map +* Convention cleanup + +v0.9.0 -- 2012.09.13 +We're getting to real solid API + +Removed: +* Function#memoize - it's grown up to be external package, to be soon published + as 'memoizee' +* String.guid - it doesn't fit es5-ext (extensions) concept, will be provided as + external package +# Function.arguments - obsolete +# Function.context - obsolete +# Function#flip - not readable when used, so it was never used +# Object.clone - obsolete and confusing + +Added: +* String#camelToHyphen - String format convertion + +Renamed: +* String#dashToCamelCase -> String#hyphenToCamel + +Fixes: +* Object.isObject - Quote names in literals that match reserved keywords + (older implementations crashed on that) +* String#repeat - Do not accept negative values (coerce them to 1) + +Improvements: +* Array#remove - Accepts many arguments, we can now remove many values at once +* Object iterators (forEach, map, some) - Compare function invoked with scope + object bound to this +* Function#curry - Algorithm cleanup +* Object.isCopy - Support for all types, not just plain objects +* Object.isPlainObject - Support for cross-frame objects +* Do not memoize any of the functions, it shouldn't be decided internally +* Remove Object.freeze calls in reserved, it's not up to convention +* Improved documentation +* Better linting (hard-core approach using both JSLint mod and JSHint) +* Optional arguments are now documented in funtions signature + +v0.8.2 -- 2012.06.22 +Fix errors in Array's intersection and exclusion methods, related to improper +usage of contains method + +v0.8.1 -- 2012.06.13 +Reorganized internal logic of Function.prototype.memoize. So it's more safe now +and clears cache properly. Additionally preventCache option was provided. + +v0.8.0 -- 2012.05.28 +Again, major overhaul. Probably last experimental stuff was trashed, all API +looks more like standard extensions now. + +Changes: +* Turn all Object.prototype extensions into functions and move them to Object +namespace. We learned that extending Object.prototype is bad idea in any case. +* Rename Function.prototype.curry into Function.prototype.partial. This function + is really doing partial application while currying is slightly different + concept. +* Convert Function.prototype.ncurry to new implementation of + Function.prototype.curry, it now serves real curry concept additionaly it + covers use cases for aritize and hold, which were removed. +* Rename Array's peek to last, and provide support for sparse arrays in it +* Rename Date's monthDaysCount into daysInMonth +* Simplify object iterators, now order of iteration can be configured with just + compareFn argument (no extra byKeys option) +* Rename Object.isDuplicate to Object.isCopy +* Rename Object.isEqual to Object.is which is compatible with future 'is' + keyword +* Function.memoize is now Function.prototype.memoize. Additionally clear cache + functionality is added, and access to original arguments object. +* Rename validation functions: assertNotNull to validValue, assertCallable to + validCallable. validValue was moved to Object namespace. On success they now + return validated value instead of true, it supports better composition. + Additionally created Date.validDate and Error.validError +* All documentation is now held in README.md not in code files. +* Move guid to String namespace. All guids now start with numbers. +* Array.generate: fill argument is now optional +* Object.toArray is now Array.from (as new ES6 specification draft suggests) +* All methods that rely on indexOf or lastIndexOf, now rely on egal (Object.is) + versions of them (eIndexOf, eLastIndexOf) +* Turn all get* functions that returned methods into actuall methods (get* + functionality can still be achieved with help of Function.prototype.partial). + So: Date.getFormat is now Date.prototype.format, + Number.getPad is now Number.prototype.pad, + String.getFormat is now String.prototype.format, + String.getIndent is now String.prototype.indent, + String.getPad is now String.prototype.pad +* Refactored Object.descriptor, it is now just two functions, main one and + main.gs, main is for describing values, and gs for describing getters and + setters. Configuration is passed with first argument as string e.g. 'ce' for + configurable and enumerable. If no configuration string is provided then by + default it returns configurable and writable but not enumerable for value or + configurable but not enumerable for getter/setter +* Function.prototype.silent now returns prepared function (it was + expected to be fixed for 0.7) +* Reserved keywords map (reserved) is now array not hash. +* Object.merge is now Object.extend (while former Object.extend was completely + removed) - 'extend' implies that we change object, not creating new one (as + 'merge' may imply). Similarily Object.mergeProperties was renamed to + Object.extendProperties +* Position argument support in Array.prototype.contains and + String.prototype.contains (so it follows ES6 specification draft) +* endPosition argument support in String.prototype.endsWith and fromPosition + argument support in String.prototype.startsWith (so it follows ES6 + specification draft) +* Better and cleaner String.prototype.indent implementation. No default value + for indent string argument, optional nest value (defaults to 1), remove + nostart argument +* Correct length values for most methods (so they reflect length of similar + methods in standard) +* Length argument is now optional in number and string pad methods. +* Improve arguments validation in general, so it adheres to standard conventions +* Fixed format of package.json + +Removed methods and functions: +* Object.prototype.slice - Object is not ordered collection, so slice doesn't + make sense. +* Function's rcurry, rncurry, s - too cumbersome for JS, not many use cases for + that +* Function.prototype.aritize and Function.prototype.hold - same functionality + can be achieved with new Function.prototype.curry +* Function.prototype.log - provided more generic Function.prototype.wrap for + same use case +* getNextIdGenerator - no use case for that (String.guid should be used if + needed) +* Object.toObject - Can be now acheived with Object(validValue(x)) +* Array.prototype.someValue - no real use case (personally used once and + case was already controversial) +* Date.prototype.duration - moved to external package +* Number.getAutoincrement - No real use case +* Object.prototype.extend, Object.prototype.override, + Object.prototype.plainCreate, Object.prototype.plainExtend - It was probably + too complex, same should be achieved just with Object.create, + Object.descriptor and by saving references to super methods in local scope. +* Object.getCompareBy - Functions should be created individually for each use + case +* Object.get, Object.getSet, Object.set, Object.unset - Not many use cases and + same can be easily achieved with simple inline function +* String.getPrefixWith - Not real use case for something that can be easily + achieved with '+' operator +* Object.isPrimitive - It's just negation of Object.isObject +* Number.prototype.isLess, Number.prototype.isLessOrEqual - they shouldn't be in + Number namespace and should rather be addressed with simple inline functions. +* Number.prototype.subtract - Should rather be addressed with simple inline + function + +New methods and functions: +* Array.prototype.lastIndex - Returns last declared index in array +* String.prototype.last - last for strings +* Function.prototype.wrap - Wrap function with other, it allows to specify + before and after behavior transform return value or prevent original function + from being called. +* Math.sign - Returns sign of a number (already in ES6 specification draft) +* Number.toInt - Converts value to integer (already in ES6 specification draft) +* Number.isNaN - Returns true if value is NaN (already in ES6 specification + draft) +* Number.toUint - Converts value to unsigned integer +* Number.toUint32 - Converts value to 32bit unsigned integer +* Array.prototype.eIndexOf, eLastIndexOf - Egal version (that uses Object.is) of + standard methods (all methods that were using native indexOf or lastIndexOf + now uses eIndexOf and elastIndexOf respectively) +* Array.of - as it's specified for ES6 + +Fixes: +* Fixed binarySearch so it always returns valid list index +* Object.isList - it failed on lists that are callable (e.g. NodeList in Nitro + engine) +* Object.map now supports third argument for callback + +v0.7.1 -- 2012.01.05 +New methods: +* Array.prototype.firstIndex - returns first valid index of array (for + sparse arrays it may not be '0' + +Improvements: +* Array.prototype.first - now returns value for index returned by firstIndex +* Object.prototype.mapToArray - can be called without callback, then array of + key-value pairs is returned + +Fixes +* Array.prototype.forEachRight, object's length read through UInt32 conversion + +v0.7.0 -- 2011.12.27 +Major update. +Stepped back from experimental ideas and introduced more standard approach +taking example from how ES5 methods and functions are designed. One exceptions +is that, we don’t refrain from declaring methods for Object.prototype - it’s up +to developer whether how he decides to use it in his context (as function or as +method). + +In general: +* Removed any method 'functionalization' and functionalize method itself. + es5-ext declares plain methods, which can be configured to work as functions + with call.bind(method) - see documentation. +* Removed separation of Object methods for ES5 (with descriptors) and + ES3 (plain) - we're following ES5 idea on that, some methods are intended just + for enumerable properties and some are for all properties, all are declared + for Object.prototype +* Removed separation of Array generic (collected in List folder) and not generic + methods (collected in Array folder). Now all methods are generic and are in + Array/prototype folder. This separation also meant, that methods in Array are + usually destructive. We don’t do that separation now, there’s generally no use + case for destructive iterators, we should be fine with one version of each + method, (same as ES5 is fine with e.g. one, non destructive 'filter' method) +* Folder structure resembles tree of native ES5 Objects +* All methods are written with ES5 conventions in mind, it means that most + methods are generic and can be run on any object. In more detail: + ** Array.prototype and Object.prototype methods can be run on any object (any + not null or undefined value), + ** Date.prototype methods should be called only on Date instances. + ** Function.prototype methods can be called on any callable objects (not + necessarily functions) + ** Number.prototype & String.prototype methods can be called on any value, in + case of Number it it’ll be degraded to number, in case of string it’ll be + degraded to string. +* Travis CI support (only for Node v0.6 branch, as v0.4 has buggy V8 version) + +Improvements for existing functions and methods: +* Function.memoize (was Function.cache) is now fully generic, can operate on any + type of arguments and it’s NaN safe (all NaN objects are considered equal) +* Method properties passed to Object.prototype.extend or + Object.prototype.override can aside of _super optionally take prototype object + via _proto argument +* Object iterators: forEach, mapToArray and every can now iterate in specified + order +* pluck, invoke and other functions that return reusable functions or methods + have now their results memoized. + +New methods: +* Global: assertNotNull, getNextIdGenerator, guid, isEqual, isPrimitive, + toObject +* Array: generate +* Array.prototype: binarySearch, clear, contains, diff, exclusion, find, first, + forEachRight, group, indexesOf, intersection, remove, someRight, someValue +* Boolean: isBoolean +* Date: isDate +* Function: arguments, context, insert, isArguments, remove +* Function.prototype: not, silent +* Number: getAutoincrement, isNumber +* Number.prototype: isLessOrEqual, isLess, subtract +* Object: assertCallable, descriptor (functions for clean descriptors), + getCompareBy, isCallable, isObject +* Object.prototype: clone (real clone), compact, count, diff, empty, + getPropertyNames, get, keyOf, mapKeys, override, plainCreate, plainExtend, + slice, some, unset +* RegExp: isRegExp +* String: getPrefixWith, isString +* String.prototype: caseInsensitiveCompare, contains, isNumeric + +Renamed methods: +* Date.clone -> Date.prototype.copy +* Date.format -> Date.getFormat +* Date/day/floor -> Date.prototype.floorDay +* Date/month/floor -> Date.prototype.floorMonth +* Date/month/year -> Date.prototype.floorYear +* Function.cache -> Function.memoize +* Function.getApplyArg -> Function.prototype.match +* Function.sequence -> Function.prototype.chain +* List.findSameStartLength -> Array.prototype.commonLeft +* Number.pad -> Number.getPad +* Object/plain/clone -> Object.prototype.copy +* Object/plain/elevate -> Object.prototype.flatten +* Object/plain/same -> Object.prototype.isDuplicate +* Object/plain/setValue -> Object.getSet +* String.format -> String.getFormat +* String.indent -> String.getIndent +* String.pad -> String.getPad +* String.trimLeftStr -> String.prototype.trimCommonLeft +* Object.merge -> Object.prototype.mergeProperties +* Object/plain/pluck -> Object.prototype.get +* Array.clone is now Array.prototype.copy and can be used also on any array-like + objects +* List.isList -> Object.isList +* List.toArray -> Object.prototype.toArray +* String/convert/dashToCamelCase -> String.prototype.dashToCamelCase + +Removed methods: +* Array.compact - removed destructive version (that operated on same array), we + have now non destructive version as Array.prototype.compact. +* Function.applyBind -> use apply.bind directly +* Function.bindBind -> use bind.bind directly +* Function.callBind -> use call.bind directly +* Fuction.clone -> no valid use case +* Function.dscope -> controversial approach, shouldn’t be considered seriously +* Function.functionalize -> It was experimental but standards are standards +* List/sort/length -> It can be easy obtained by Object.getCompareBy(‘length’) +* List.concat -> Concat’s for array-like’s makes no sense, just convert to array + first +* List.every -> Use Array.prototype.every directly +* List.filter -> Use Array.prototype.filter directly +* List.forEach -> User Array.prototype.forEach directly +* List.isListObject -> No valid use case, do: isList(list) && (typeof list === + 'object’) +* List.map -> Use Array.prototype.map directly +* List.reduce -> Use Array.prototype.reduce directly +* List.shiftSame -> Use Array.prototype.commonLeft and do slice +* List.slice -> Use Array.prototype.slice directly +* List.some -> Use Array.prototype.some directly +* Object.bindMethods -> it was version that considered descriptors, we have now + Object.prototype.bindMethods which operates only on enumerable properties +* Object.every -> version that considered all properties, we have now + Object.prototype.every which iterates only enumerables +* Object.invoke -> no use case +* Object.mergeDeep -> no use case +* Object.pluck -> no use case +* Object.same -> it considered descriptors, now there’s only Object.isDuplicate + which compares only enumerable properties +* Object.sameType -> no use case +* Object.toDescriptor and Object.toDescriptors -> replaced by much nicer + Object.descriptor functions +* Object/plain/link -> no use case (it was used internally only by + Object/plain/merge) +* Object/plain/setTrue -> now easily configurable by more universal + Object.getSet(true) +* String.trimRightStr -> Eventually String.prototype.trimCommonRight will be + added + +v0.6.3 -- 2011.12.12 +* Cleared npm warning for misnamed property in package.json + +v0.6.2 -- 2011.08.12 +* Calling String.indent without scope (global scope then) now treated as calling + it with null scope, it allows more direct invocations when using default nest + string: indent().call(str, nest) + +v0.6.1 -- 2011.08.08 +* Added TAD test suite to devDependencies, configured test commands. + Tests can be run with 'make test' or 'npm test' + +v0.6.0 -- 2011.08.07 +New methods: +* Array: clone, compact (in place) +* Date: format, duration, clone, monthDaysCount, day.floor, month.floor, + year.floor +* Function: getApplyArg, , ncurry, rncurry, hold, cache, log +* List: findSameStartLength, shiftSame, peek, isListObject +* Number: pad +* Object: sameType, toString, mapToArray, mergeDeep, toDescriptor, + toDescriptors, invoke +* String: startsWith, endsWith, indent, trimLeftStr, trimRightStr, pad, format + +Fixed: +* Object.extend does now prototypal extend as exptected +* Object.merge now tries to overwrite only configurable properties +* Function.flip + +Improved: +* Faster List.toArray +* Better global retrieval +* Functionalized all Function methods +* Renamed bindApply and bindCall to applyBind and callBind +* Removed Function.inherit (as it's unintuitive curry clone) +* Straightforward logic in Function.k +* Fixed naming of some tests files (letter case issue) +* Renamed Function.saturate into Function.lock +* String.dashToCamelCase digits support +* Strings now considered as List objects +* Improved List.compact +* Concise logic for List.concat +* Test wit TAD in clean ES5 context + +v0.5.1 -- 2011.07.11 +* Function's bindBind, bindCall and bindApply now more versatile + +v0.5.0 -- 2011.07.07 +* Removed Object.is and List.apply +* Renamed Object.plain.is to Object.plain.isPlainObject (keep naming convention + consistent) +* Improved documentation + +v0.4.0 -- 2011.07.05 +* Take most functions on Object to Object.plain to keep them away from object + descriptors +* Object functions with ES5 standard in mind (object descriptors) + +v0.3.0 -- 2011.06.24 +* New functions +* Consistent file naming (dash instead of camelCase) + +v0.2.1 -- 2011.05.28 +* Renamed Functions.K and Function.S to to lowercase versions (use consistent + naming) + +v0.2.0 -- 2011.05.28 +* Renamed Array folder to List (as its generic functions for array-like objects) +* Added Makefile +* Added various functions + +v0.1.0 -- 2011.05.24 +* Initial version diff --git a/node_modules/es5-ext/LICENSE b/node_modules/es5-ext/LICENSE new file mode 100644 index 0000000..e68f75f --- /dev/null +++ b/node_modules/es5-ext/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2011-2018 Mariusz Nowak (www.medikoo.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/node_modules/es5-ext/README.md b/node_modules/es5-ext/README.md new file mode 100644 index 0000000..7b130d8 --- /dev/null +++ b/node_modules/es5-ext/README.md @@ -0,0 +1,1018 @@ +[![Build status][semaphore-image]][semaphore-url] +[![Windows status][appveyor-image]][appveyor-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# es5-ext + +## ECMAScript 5 extensions + +### (with respect to ECMAScript 6 standard) + +Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind. + +It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board. + +When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims. + +### Installation + + $ npm install es5-ext + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +#### ECMAScript 6 features + +You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already). + +```javascript +require("es5-ext/array/from/implement"); +Array.from("foo"); // ['f', 'o', 'o'] +``` + +You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not. + +```javascript +var aFrom = require("es5-ext/array/from"); +aFrom("foo"); // ['f', 'o', 'o'] +``` + +If you want to use shim unconditionally (even if native implementation exists) do: + +```javascript +var aFrom = require("es5-ext/array/from/shim"); +aFrom("foo"); // ['f', 'o', 'o'] +``` + +##### List of ES6 shims + +It's about properties introduced with ES6 and those that have been updated in new spec. + +* `Array.from` -> `require('es5-ext/array/from')` +* `Array.of` -> `require('es5-ext/array/of')` +* `Array.prototype.concat` -> `require('es5-ext/array/#/concat')` +* `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')` +* `Array.prototype.entries` -> `require('es5-ext/array/#/entries')` +* `Array.prototype.fill` -> `require('es5-ext/array/#/fill')` +* `Array.prototype.filter` -> `require('es5-ext/array/#/filter')` +* `Array.prototype.find` -> `require('es5-ext/array/#/find')` +* `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')` +* `Array.prototype.keys` -> `require('es5-ext/array/#/keys')` +* `Array.prototype.map` -> `require('es5-ext/array/#/map')` +* `Array.prototype.slice` -> `require('es5-ext/array/#/slice')` +* `Array.prototype.splice` -> `require('es5-ext/array/#/splice')` +* `Array.prototype.values` -> `require('es5-ext/array/#/values')` +* `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')` +* `Math.acosh` -> `require('es5-ext/math/acosh')` +* `Math.asinh` -> `require('es5-ext/math/asinh')` +* `Math.atanh` -> `require('es5-ext/math/atanh')` +* `Math.cbrt` -> `require('es5-ext/math/cbrt')` +* `Math.clz32` -> `require('es5-ext/math/clz32')` +* `Math.cosh` -> `require('es5-ext/math/cosh')` +* `Math.exmp1` -> `require('es5-ext/math/expm1')` +* `Math.fround` -> `require('es5-ext/math/fround')` +* `Math.hypot` -> `require('es5-ext/math/hypot')` +* `Math.imul` -> `require('es5-ext/math/imul')` +* `Math.log1p` -> `require('es5-ext/math/log1p')` +* `Math.log2` -> `require('es5-ext/math/log2')` +* `Math.log10` -> `require('es5-ext/math/log10')` +* `Math.sign` -> `require('es5-ext/math/sign')` +* `Math.signh` -> `require('es5-ext/math/signh')` +* `Math.tanh` -> `require('es5-ext/math/tanh')` +* `Math.trunc` -> `require('es5-ext/math/trunc')` +* `Number.EPSILON` -> `require('es5-ext/number/epsilon')` +* `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')` +* `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')` +* `Number.isFinite` -> `require('es5-ext/number/is-finite')` +* `Number.isInteger` -> `require('es5-ext/number/is-integer')` +* `Number.isNaN` -> `require('es5-ext/number/is-nan')` +* `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')` +* `Object.assign` -> `require('es5-ext/object/assign')` +* `Object.keys` -> `require('es5-ext/object/keys')` +* `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')` +* `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')` +* `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')` +* `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')` +* `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')` +* `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')` +* `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')` +* `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')` +* `String.raw` -> `require('es5-ext/string/raw')` +* `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')` +* `String.prototype.contains` -> `require('es5-ext/string/#/contains')` +* `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')` +* `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')` +* `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')` +* `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')` +* `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')` + +#### Non ECMAScript standard features + +**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes: + +```javascript +Object.defineProperty(Function.prototype, "partial", { + value: require("es5-ext/function/#/partial"), + configurable: true, + enumerable: false, + writable: true +}); +Object.defineProperty(Array.prototype, "flatten", { + value: require("es5-ext/array/#/flatten"), + configurable: true, + enumerable: false, + writable: true +}); +Object.defineProperty(String.prototype, "capitalize", { + value: require("es5-ext/string/#/capitalize"), + configurable: true, + enumerable: false, + writable: true +}); +``` + +See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you. + +**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of. + +When you're in situation when native extensions are not good idea, then you should use methods indirectly: + +```javascript +var flatten = require("es5-ext/array/#/flatten"); + +flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +for better convenience you can turn methods into functions: + +```javascript +var call = Function.prototype.call; +var flatten = call.bind(require("es5-ext/array/#/flatten")); + +flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application + +```javascript +var util = {}; +util.partial = call.bind(require("es5-ext/function/#/partial")); +util.flatten = call.bind(require("es5-ext/array/#/flatten")); +util.startsWith = call.bind(require("es5-ext/string/#/starts-with")); + +util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +As with native ones most methods are generic and can be run on any type of object. + +## API + +### Global extensions + +#### global _(es5-ext/global)_ + +Object that represents global scope + +### Array Constructor extensions + +#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). +Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned. + +#### generate([length[, …fill]]) _(es5-ext/array/generate)_ + +Generate an array of pre-given _length_ built of repeated arguments. + +#### isPlainArray(x) _(es5-ext/array/is-plain-array)_ + +Returns true if object is plain array (not instance of one of the Array's extensions). + +#### of([…items]) _(es5-ext/array/of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). +Create an array from given arguments. + +#### toArray(obj) _(es5-ext/array/to-array)_ + +Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back. + +#### validArray(obj) _(es5-ext/array/valid-array)_ + +Returns `obj` if it's an array, otherwise throws `TypeError` + +### Array Prototype extensions + +#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_ + +In **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. +It's variant of binary search algorithm + +#### arr.clear() _(es5-ext/array/#/clear)_ + +Clears the array + +#### arr.compact() _(es5-ext/array/#/compact)_ + +Returns a copy of the context with all non-values (`null` or `undefined`) removed. + +#### arr.concat() _(es5-ext/array/#/concat)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). +ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context. + +#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_ + +Whether list contains the given value. + +#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin). + +#### arr.diff(other) _(es5-ext/array/#/diff)_ + +Returns the array of elements that are present in context list but not present in other list. + +#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_ + +_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_ + +_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.entries() _(es5-ext/array/#/entries)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). +Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value. + +#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_ + +Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments). + +#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill). + +#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). +ES6's version of `filter`, returns array of same type as the context. + +#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). +Return first element for which given function returns true + +#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). +Return first index for which given function returns true + +#### arr.first() _(es5-ext/array/#/first)_ + +Returns value for first defined index + +#### arr.firstIndex() _(es5-ext/array/#/first-index)_ + +Returns first declared index of the array + +#### arr.flatten() _(es5-ext/array/#/flatten)_ + +Returns flattened version of the array + +#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_ + +`forEach` starting from last element + +#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_ + +Group list elements by value returned by _cb_ function + +#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_ + +Returns array of all indexes of given value + +#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_ + +Computes the array of values that are the intersection of all lists (context list and lists given in arguments) + +#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_ + +Returns true if both context and _other_ lists have same content + +#### arr.isUniq() _(es5-ext/array/#/is-uniq)_ + +Returns true if all values in array are unique + +#### arr.keys() _(es5-ext/array/#/keys)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). +Returns iterator object, which traverses all array indexes. + +#### arr.last() _(es5-ext/array/#/last)_ + +Returns value of last defined index + +#### arr.lastIndex() _(es5-ext/array/#/last)_ + +Returns last defined index of the array + +#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). +ES6's version of `map`, returns array of same type as the context. + +#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_ + +Remove values from the array + +#### arr.separate(sep) _(es5-ext/array/#/separate)_ + +Returns array with items separated with `sep` value + +#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). +ES6's version of `slice`, returns array of same type as the context. + +#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_ + +`some` starting from last element + +#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). +ES6's version of `splice`, returns array of same type as the context. + +#### arr.uniq() _(es5-ext/array/#/uniq)_ + +Returns duplicate-free version of the array + +#### arr.values() _(es5-ext/array/#/values)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). +Returns iterator object which traverses all array values. + +#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). +Returns iterator object which traverses all array values. + +### Boolean Constructor extensions + +#### isBoolean(x) _(es5-ext/boolean/is-boolean)_ + +Whether value is boolean + +### Date Constructor extensions + +#### isDate(x) _(es5-ext/date/is-date)_ + +Whether value is date instance + +#### validDate(x) _(es5-ext/date/valid-date)_ + +If given object is not date throw TypeError in other case return it. + +### Date Prototype extensions + +#### date.copy(date) _(es5-ext/date/#/copy)_ + +Returns a copy of the date object + +#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_ + +Returns number of days of date's month + +#### date.floorDay() _(es5-ext/date/#/floor-day)_ + +Sets the date time to 00:00:00.000 + +#### date.floorMonth() _(es5-ext/date/#/floor-month)_ + +Sets date day to 1 and date time to 00:00:00.000 + +#### date.floorYear() _(es5-ext/date/#/floor-year)_ + +Sets date month to 0, day to 1 and date time to 00:00:00.000 + +#### date.format(pattern) _(es5-ext/date/#/format)_ + +Formats date up to given string. Supported patterns: + +* `%Y` - Year with century, 1999, 2003 +* `%y` - Year without century, 99, 03 +* `%m` - Month, 01..12 +* `%d` - Day of the month 01..31 +* `%H` - Hour (24-hour clock), 00..23 +* `%M` - Minute, 00..59 +* `%S` - Second, 00..59 +* `%L` - Milliseconds, 000..999 + +### Error Constructor extensions + +#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_ + +Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object) + +#### isError(x) _(es5-ext/error/is-error)_ + +Whether value is an error (instance of `Error`). + +#### validError(x) _(es5-ext/error/valid-error)_ + +If given object is not error throw TypeError in other case return it. + +### Error Prototype extensions + +#### err.throw() _(es5-ext/error/#/throw)_ + +Throws error + +### Function Constructor extensions + +Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### constant(x) _(es5-ext/function/constant)_ + +Returns a constant function that returns pregiven argument + +_k(x)(y) =def x_ + +#### identity(x) _(es5-ext/function/identity)_ + +Identity function. Returns first argument + +_i(x) =def x_ + +#### invoke(name[, …args]) _(es5-ext/function/invoke)_ + +Returns a function that takes an object as an argument, and applies object's +_name_ method to arguments. +_name_ can be name of the method or method itself. + +_invoke(name, …args)(object, …args2) =def object\[name\]\(…args, …args2\)_ + +#### isArguments(x) _(es5-ext/function/is-arguments)_ + +Whether value is arguments object + +#### isFunction(arg) _(es5-ext/function/is-function)_ + +Whether value is instance of function + +#### noop() _(es5-ext/function/noop)_ + +No operation function + +#### pluck(name) _(es5-ext/function/pluck)_ + +Returns a function that takes an object, and returns the value of its _name_ +property + +_pluck(name)(obj) =def obj[name]_ + +#### validFunction(arg) _(es5-ext/function/valid-function)_ + +If given object is not function throw TypeError in other case return it. + +### Function Prototype extensions + +Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### fn.compose([…fns]) _(es5-ext/function/#/compose)_ + +Applies the functions in reverse argument-list order. + +_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ + +#### fn.copy() _(es5-ext/function/#/copy)_ + +Produces copy of given function + +#### fn.curry([n]) _(es5-ext/function/#/curry)_ + +Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. +If _n_ is not provided then it defaults to context function length + +_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_ + +#### fn.lock([…args]) _(es5-ext/function/#/lock)_ + +Returns a function that applies the underlying function to _args_, and ignores its own arguments. + +_f.lock(…args)(…args2) =def f(…args)_ + +_Named after it's counterpart in Google Closure_ + +#### fn.not() _(es5-ext/function/#/not)_ + +Returns a function that returns boolean negation of value returned by underlying function. + +_f.not()(…args) =def !f(…args)_ + +#### fn.partial([…args]) _(es5-ext/function/#/partial)_ + +Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args. + +_f.partial(…args1)(…args2) =def f(…args1, …args2)_ + +#### fn.spread() _(es5-ext/function/#/spread)_ + +Returns a function that applies underlying function with first list argument + +_f.match()(args) =def f.apply(null, args)_ + +#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_ + +Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties. + +### Math extensions + +#### acosh(x) _(es5-ext/math/acosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh). + +#### asinh(x) _(es5-ext/math/asinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh). + +#### atanh(x) _(es5-ext/math/atanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh). + +#### cbrt(x) _(es5-ext/math/cbrt)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt). + +#### clz32(x) _(es5-ext/math/clz32)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32). + +#### cosh(x) _(es5-ext/math/cosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh). + +#### expm1(x) _(es5-ext/math/expm1)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1). + +#### fround(x) _(es5-ext/math/fround)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround). + +#### hypot([…values]) _(es5-ext/math/hypot)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot). + +#### imul(x, y) _(es5-ext/math/imul)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul). + +#### log1p(x) _(es5-ext/math/log1p)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p). + +#### log2(x) _(es5-ext/math/log2)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2). + +#### log10(x) _(es5-ext/math/log10)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10). + +#### sign(x) _(es5-ext/math/sign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign). + +#### sinh(x) _(es5-ext/math/sinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh). + +#### tanh(x) _(es5-ext/math/tanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh). + +#### trunc(x) _(es5-ext/math/trunc)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc). + +### Number Constructor extensions + +#### EPSILON _(es5-ext/number/epsilon)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon). + +The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16. + +#### isFinite(x) _(es5-ext/number/is-finite)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). +Whether value is finite. Differs from global isNaN that it doesn't do type coercion. + +#### isInteger(x) _(es5-ext/number/is-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). +Whether value is integer. + +#### isNaN(x) _(es5-ext/number/is-nan)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). +Whether value is NaN. Differs from global isNaN that it doesn't do type coercion. + +#### isNumber(x) _(es5-ext/number/is-number)_ + +Whether given value is number + +#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger). + +#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). +The value of Number.MAX_SAFE_INTEGER is 9007199254740991. + +#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). +The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1). + +#### toInteger(x) _(es5-ext/number/to-integer)_ + +Converts value to integer + +#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_ + +Converts value to positive integer. If provided value is less than 0, then 0 is returned + +#### toUint32(x) _(es5-ext/number/to-uint32)_ + +Converts value to unsigned 32 bit integer. This type is used for array lengths. +See: http://www.2ality.com/2012/02/js-integers.html + +### Number Prototype extensions + +#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_ + +Pad given number with zeros. Returns string + +### Object Constructor extensions + +#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). +Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten. + +#### clear(obj) _(es5-ext/object/clear)_ + +Remove all enumerable own properties of the object + +#### compact(obj) _(es5-ext/object/compact)_ + +Returns copy of the object with all enumerable properties that have no falsy values + +#### compare(obj1, obj2) _(es5-ext/object/compare)_ + +Universal cross-type compare function. To be used for e.g. array sort. + +#### copy(obj) _(es5-ext/object/copy)_ + +Returns copy of the object with all enumerable properties. + +#### copyDeep(obj) _(es5-ext/object/copy-deep)_ + +Returns deep copy of the object with all enumerable properties. + +#### count(obj) _(es5-ext/object/count)_ + +Counts number of enumerable own properties on object + +#### create(obj[, properties]) _(es5-ext/object/create)_ + +`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804). + +When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined. + +It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype. + +Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround. + +#### eq(x, y) _(es5-ext/object/eq)_ + +Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_ + +Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_ + +Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value. + +#### firstKey(obj) _(es5-ext/object/first-key)_ + +Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object. + +#### flatten(obj) _(es5-ext/object/flatten)_ + +Returns new object, with flatten properties of input object + +_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_ + +#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_ + +Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object +Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### getPropertyNames() _(es5-ext/object/get-property-names)_ + +Get all (not just own) property names of the object + +#### is(x, y) _(es5-ext/object/is)_ + +Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### isArrayLike(x) _(es5-ext/object/is-array-like)_ + +Whether object is array-like object + +#### isCopy(x, y) _(es5-ext/object/is-copy)_ + +Two values are considered a copy of same value when all of their own enumerable properties have same values. + +#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_ + +Deep comparision of objects + +#### isEmpty(obj) _(es5-ext/object/is-empty)_ + +True if object doesn't have any own enumerable property + +#### isObject(arg) _(es5-ext/object/is-object)_ + +Whether value is not primitive + +#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_ + +Whether object is plain object, its protototype should be Object.prototype and it cannot be host object. + +#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_ + +Search object for value + +#### keys(obj) _(es5-ext/object/keys)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). +ES6's version of `keys`, doesn't throw on primitive input + +#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_ + +Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object. + +#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_ + +Create new object with same values, but remapped keys + +#### mixin(target, source) _(es5-ext/object/mixin)_ + +Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten). +_It was for a moment part of ECMAScript 6 draft._ + +#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_ + +Extends _target_, with all source and source's prototype properties. +Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support). + +#### normalizeOptions(options) _(es5-ext/object/normalize-options)_ + +Normalizes options object into flat plain object. + +Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use. + +* It never returns input `options` object back (always a copy is created) +* `options` can be undefined in such case empty plain object is returned. +* Copies all enumerable properties found down prototype chain. + +#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_ + +Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true. + +#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_ + +Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator + +#### serialize(value) _(es5-ext/object/serialize)_ + +Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions. + +#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). +If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed. + +#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_ + +Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided +testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_ + +Creates an array of results of calling a provided function on every key-value pair in this object. +Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### unserialize(str) _(es5-ext/object/unserialize)_ + +Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize) + +#### validCallable(x) _(es5-ext/object/valid-callable)_ + +If given object is not callable throw TypeError in other case return it. + +#### validObject(x) _(es5-ext/object/valid-object)_ + +Throws error if given value is not an object, otherwise it is returned. + +#### validValue(x) _(es5-ext/object/valid-value)_ + +Throws error if given value is `null` or `undefined`, otherwise returns value. + +### RegExp Constructor extensions + +#### escape(str) _(es5-ext/reg-exp/escape)_ + +Escapes string to be used in regular expression + +#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_ + +Whether object is regular expression + +#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_ + +If object is regular expression it is returned, otherwise TypeError is thrown. + +### RegExp Prototype extensions + +#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_ + +Whether regular expression has `sticky` flag. + +It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented. + +#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_ + +Whether regular expression has `unicode` flag. + +It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented. + +#### re.match(string) _(es5-ext/reg-exp/#/match)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match). + +#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace). + +#### re.search(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search). + +#### re.split(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split). + +#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +### String Constructor extensions + +#### formatMethod(fMap) _(es5-ext/string/format-method)_ + +Creates format method. It's used e.g. to create `Date.prototype.format` method + +#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint) + +#### isString(x) _(es5-ext/string/is-string)_ + +Whether object is string + +#### randomUniq() _(es5-ext/string/random-uniq)_ + +Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice) + +#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw) + +### String Prototype extensions + +#### str.at(pos) _(es5-ext/string/#/at)_ + +_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_ + +Returns a string at given position in Unicode-safe manner. +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at). + +#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_ + +Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree. +Useful when converting names from js property convention into filename convention. + +#### str.capitalize() _(es5-ext/string/#/capitalize)_ + +Capitalize first character of a string + +#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_ + +Case insensitive compare + +#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat) + +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt). + +#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains) + +Whether string contains given string. + +#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). +Whether strings ends with given string + +#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_ + +Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree. +Useful when converting names from filename convention to js property name convention. + +#### str.indent(str[, count]) _(es5-ext/string/#/indent)_ + +Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times). + +#### str.last() _(es5-ext/string/#/last)_ + +Return last character + +#### str.normalize([form]) _(es5-ext/string/#/normalize)_ + +[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). +Returns the Unicode Normalization Form of a given string. +Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js) + +#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_ + +Pad string with _fill_. +If _length_ si given than _fill_ is reapated _length_ times. +If _length_ is negative then pad is applied from right. + +#### str.repeat(n) _(es5-ext/string/#/repeat)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). +Repeat given string _n_ times + +#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case). + +#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case). + +#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). +Whether strings starts with given string + +#### str[@@iterator] _(es5-ext/string/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). +Returns iterator object which traverses all string characters (with respect to unicode symbols) + +### Tests + + $ npm test + +[semaphore-image]: https://semaphoreci.com/api/v1/medikoo/es5-ext/branches/master/badge.svg +[semaphore-url]: https://semaphoreci.com/medikoo/es5-ext +[appveyor-image]: https://img.shields.io/appveyor/ci/medikoo/es5-ext.svg +[appveyor-url]: https://ci.appveyor.com/project/medikoo/es5-ext +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/es5-ext.svg +[npm-url]: https://www.npmjs.com/package/es5-ext diff --git a/node_modules/es5-ext/array/#/@@iterator/implement.js b/node_modules/es5-ext/array/#/@@iterator/implement.js new file mode 100644 index 0000000..8073f2b --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, require("es6-symbol").iterator, { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/@@iterator/index.js b/node_modules/es5-ext/array/#/@@iterator/index.js new file mode 100644 index 0000000..d937746 --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype[require("es6-symbol").iterator] : require("./shim"); diff --git a/node_modules/es5-ext/array/#/@@iterator/is-implemented.js b/node_modules/es5-ext/array/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..6445c04 --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function () { + var arr = ["foo", 1], iterator, result; + if (typeof arr[iteratorSymbol] !== "function") return false; + iterator = arr[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "foo") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/@@iterator/shim.js b/node_modules/es5-ext/array/#/@@iterator/shim.js new file mode 100644 index 0000000..307b1c0 --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/shim.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../values/shim"); diff --git a/node_modules/es5-ext/array/#/_compare-by-length.js b/node_modules/es5-ext/array/#/_compare-by-length.js new file mode 100644 index 0000000..f1c0cac --- /dev/null +++ b/node_modules/es5-ext/array/#/_compare-by-length.js @@ -0,0 +1,9 @@ +// Used internally to sort array of lists by length + +"use strict"; + +var toPosInt = require("../../number/to-pos-integer"); + +module.exports = function (arr1, arr2) { + return toPosInt(arr1.length) - toPosInt(arr2.length); +}; diff --git a/node_modules/es5-ext/array/#/binary-search.js b/node_modules/es5-ext/array/#/binary-search.js new file mode 100644 index 0000000..9b2c42e --- /dev/null +++ b/node_modules/es5-ext/array/#/binary-search.js @@ -0,0 +1,28 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + + , floor = Math.floor; + +module.exports = function (compareFn) { + var length, low, high, middle; + + value(this); + callable(compareFn); + + length = toPosInt(this.length); + low = 0; + high = length - 1; + + while (low <= high) { + middle = floor((low + high) / 2); + if (compareFn(this[middle]) < 0) high = middle - 1; + else low = middle + 1; + } + + if (high < 0) return 0; + if (high >= length) return length - 1; + return high; +}; diff --git a/node_modules/es5-ext/array/#/clear.js b/node_modules/es5-ext/array/#/clear.js new file mode 100644 index 0000000..fd539c9 --- /dev/null +++ b/node_modules/es5-ext/array/#/clear.js @@ -0,0 +1,12 @@ +// Inspired by Google Closure: +// http://closure-library.googlecode.com/svn/docs/ +// closure_goog_array_array.js.html#goog.array.clear + +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + value(this).length = 0; + return this; +}; diff --git a/node_modules/es5-ext/array/#/compact.js b/node_modules/es5-ext/array/#/compact.js new file mode 100644 index 0000000..3da1309 --- /dev/null +++ b/node_modules/es5-ext/array/#/compact.js @@ -0,0 +1,13 @@ +// Inspired by: http://documentcloud.github.com/underscore/#compact + +"use strict"; + +var isValue = require("../../object/is-value"); + +var filter = Array.prototype.filter; + +module.exports = function () { + return filter.call(this, function (val) { + return isValue(val); + }); +}; diff --git a/node_modules/es5-ext/array/#/concat/implement.js b/node_modules/es5-ext/array/#/concat/implement.js new file mode 100644 index 0000000..a5a1a40 --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "concat", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/concat/index.js b/node_modules/es5-ext/array/#/concat/index.js new file mode 100644 index 0000000..8bbb7bc --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.concat : require("./shim"); diff --git a/node_modules/es5-ext/array/#/concat/is-implemented.js b/node_modules/es5-ext/array/#/concat/is-implemented.js new file mode 100644 index 0000000..2a3a9fc --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { + return (new SubArray()).concat("foo") instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/concat/shim.js b/node_modules/es5-ext/array/#/concat/shim.js new file mode 100644 index 0000000..5158dde --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/shim.js @@ -0,0 +1,48 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , toPosInt = require("../../../number/to-pos-integer") + , isObject = require("../../../object/is-object") + , isConcatSpreadable = require("es6-symbol").isConcatSpreadable + , isArray = Array.isArray + , concat = Array.prototype.concat + , forEach = Array.prototype.forEach + , isSpreadable; + +isSpreadable = function (value) { + if (!value) return false; + if (!isObject(value)) return false; + if (value[isConcatSpreadable] !== undefined) { + return Boolean(value[isConcatSpreadable]); + } + return isArray(value); +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (item /*, …items*/) { + var result; + if (!this || !isArray(this) || isPlainArray(this)) { + return concat.apply(this, arguments); + } + result = new this.constructor(); + if (isSpreadable(this)) { + forEach.call(this, function (val, i) { + result[i] = val; + }); + } else { + result[0] = this; + } + forEach.call(arguments, function (arg) { + var base; + if (isSpreadable(arg)) { + base = result.length; + result.length += toPosInt(arg.length); + forEach.call(arg, function (val, i) { + result[base + i] = val; + }); + return; + } + result.push(arg); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/contains.js b/node_modules/es5-ext/array/#/contains.js new file mode 100644 index 0000000..cde6850 --- /dev/null +++ b/node_modules/es5-ext/array/#/contains.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = require("./e-index-of"); + +module.exports = function (searchElement/*, position*/) { + return indexOf.call(this, searchElement, arguments[1]) > -1; +}; diff --git a/node_modules/es5-ext/array/#/copy-within/implement.js b/node_modules/es5-ext/array/#/copy-within/implement.js new file mode 100644 index 0000000..4658fcb --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "copyWithin", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/copy-within/index.js b/node_modules/es5-ext/array/#/copy-within/index.js new file mode 100644 index 0000000..0919b79 --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.copyWithin : require("./shim"); diff --git a/node_modules/es5-ext/array/#/copy-within/is-implemented.js b/node_modules/es5-ext/array/#/copy-within/is-implemented.js new file mode 100644 index 0000000..40c499e --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5]; + if (typeof arr.copyWithin !== "function") return false; + return String(arr.copyWithin(1, 3)) === "1,4,5,4,5"; +}; diff --git a/node_modules/es5-ext/array/#/copy-within/shim.js b/node_modules/es5-ext/array/#/copy-within/shim.js new file mode 100644 index 0000000..aad220c --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/shim.js @@ -0,0 +1,45 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , validValue = require("../../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max + , min = Math.min; + +module.exports = function (target, start /*, end*/) { + var arr = validValue(this) + , end = arguments[2] + , length = toPosInt(arr.length) + , to + , from + , fin + , count + , direction; + + target = toInteger(target); + start = toInteger(start); + end = end === undefined ? length : toInteger(end); + + to = target < 0 ? max(length + target, 0) : min(target, length); + from = start < 0 ? max(length + start, 0) : min(start, length); + fin = end < 0 ? max(length + end, 0) : min(end, length); + count = min(fin - from, length - to); + direction = 1; + + if (from < to && to < from + count) { + direction = -1; + from += count - 1; + to += count - 1; + } + while (count > 0) { + if (objHasOwnProperty.call(arr, from)) arr[to] = arr[from]; + else delete arr[from]; + from += direction; + to += direction; + count -= 1; + } + return arr; +}; diff --git a/node_modules/es5-ext/array/#/diff.js b/node_modules/es5-ext/array/#/diff.js new file mode 100644 index 0000000..fbb1682 --- /dev/null +++ b/node_modules/es5-ext/array/#/diff.js @@ -0,0 +1,13 @@ +"use strict"; + +var value = require("../../object/valid-value") + , contains = require("./contains") + , filter = Array.prototype.filter; + +module.exports = function (other) { + value(this); + value(other); + return filter.call(this, function (item) { + return !contains.call(other, item); + }); +}; diff --git a/node_modules/es5-ext/array/#/e-index-of.js b/node_modules/es5-ext/array/#/e-index-of.js new file mode 100644 index 0000000..8b07011 --- /dev/null +++ b/node_modules/es5-ext/array/#/e-index-of.js @@ -0,0 +1,28 @@ +"use strict"; + +var numberIsNaN = require("../../number/is-nan") + , toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , indexOf = Array.prototype.indexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement /*, fromIndex*/) { + var i, length, fromIndex, val; + if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments); + + length = toPosInt(value(this).length); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = 0; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i < length; ++i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; diff --git a/node_modules/es5-ext/array/#/e-last-index-of.js b/node_modules/es5-ext/array/#/e-last-index-of.js new file mode 100644 index 0000000..15dbe05 --- /dev/null +++ b/node_modules/es5-ext/array/#/e-last-index-of.js @@ -0,0 +1,31 @@ +"use strict"; + +var numberIsNaN = require("../../number/is-nan") + , toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , lastIndexOf = Array.prototype.lastIndexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement /*, fromIndex*/) { + var i, fromIndex, val; + if (!numberIsNaN(searchElement)) { + // Jslint: ignore + return lastIndexOf.apply(this, arguments); + } + + value(this); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = toPosInt(this.length) - 1; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i >= 0; --i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; diff --git a/node_modules/es5-ext/array/#/entries/implement.js b/node_modules/es5-ext/array/#/entries/implement.js new file mode 100644 index 0000000..acc8a11 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "entries", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/entries/index.js b/node_modules/es5-ext/array/#/entries/index.js new file mode 100644 index 0000000..f18f7d9 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.entries : require("./shim"); diff --git a/node_modules/es5-ext/array/#/entries/is-implemented.js b/node_modules/es5-ext/array/#/entries/is-implemented.js new file mode 100644 index 0000000..335f1c2 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/is-implemented.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function () { + var arr = [1, "foo"], iterator, result; + if (typeof arr.entries !== "function") return false; + iterator = arr.entries(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result || !result.value) return false; + if (result.value[0] !== 0) return false; + if (result.value[1] !== 1) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/entries/shim.js b/node_modules/es5-ext/array/#/entries/shim.js new file mode 100644 index 0000000..caa45b7 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { + return new ArrayIterator(this, "key+value"); +}; diff --git a/node_modules/es5-ext/array/#/exclusion.js b/node_modules/es5-ext/array/#/exclusion.js new file mode 100644 index 0000000..41057d0 --- /dev/null +++ b/node_modules/es5-ext/array/#/exclusion.js @@ -0,0 +1,31 @@ +"use strict"; + +var value = require("../../object/valid-value") + , aFrom = require("../from") + , toArray = require("../to-array") + , contains = require("./contains") + , byLength = require("./_compare-by-length") + , filter = Array.prototype.filter + , push = Array.prototype.push; + +module.exports = function (/* …lists*/) { + var lists, seen, result; + if (!arguments.length) return aFrom(this); + push.apply(lists = [this], arguments); + lists.forEach(value); + seen = []; + result = []; + lists.sort(byLength).forEach(function (list) { + result = result + .filter(function (item) { + return !contains.call(list, item); + }) + .concat( + filter.call(list, function (item) { + return !contains.call(seen, item); + }) + ); + push.apply(seen, toArray(list)); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/fill/implement.js b/node_modules/es5-ext/array/#/fill/implement.js new file mode 100644 index 0000000..9de58b7 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "fill", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/fill/index.js b/node_modules/es5-ext/array/#/fill/index.js new file mode 100644 index 0000000..a827247 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.fill : require("./shim"); diff --git a/node_modules/es5-ext/array/#/fill/is-implemented.js b/node_modules/es5-ext/array/#/fill/is-implemented.js new file mode 100644 index 0000000..5d6d02e --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.fill !== "function") return false; + return String(arr.fill(-1, -3)) === "1,2,3,-1,-1,-1"; +}; diff --git a/node_modules/es5-ext/array/#/fill/shim.js b/node_modules/es5-ext/array/#/fill/shim.js new file mode 100644 index 0000000..0040bf8 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/shim.js @@ -0,0 +1,25 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , validValue = require("../../../object/valid-value") + , max = Math.max + , min = Math.min; + +module.exports = function (value /*, start, end*/) { + var arr = validValue(this) + , start = arguments[1] + , end = arguments[2] + , length = toPosInt(arr.length) + , relativeStart + , i; + + start = start === undefined ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + + relativeStart = start < 0 ? max(length + start, 0) : min(start, length); + for (i = relativeStart; i < length && i < end; ++i) arr[i] = value; + return arr; +}; diff --git a/node_modules/es5-ext/array/#/filter/implement.js b/node_modules/es5-ext/array/#/filter/implement.js new file mode 100644 index 0000000..4502575 --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "filter", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/filter/index.js b/node_modules/es5-ext/array/#/filter/index.js new file mode 100644 index 0000000..ad2082d --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.filter : require("./shim"); diff --git a/node_modules/es5-ext/array/#/filter/is-implemented.js b/node_modules/es5-ext/array/#/filter/is-implemented.js new file mode 100644 index 0000000..06de099 --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/is-implemented.js @@ -0,0 +1,11 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe") + + , pass = function () { + return true; +}; + +module.exports = function () { + return (new SubArray()).filter(pass) instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/filter/shim.js b/node_modules/es5-ext/array/#/filter/shim.js new file mode 100644 index 0000000..38304e4 --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/shim.js @@ -0,0 +1,23 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , callable = require("../../../object/valid-callable") + , isArray = Array.isArray + , filter = Array.prototype.filter + , forEach = Array.prototype.forEach + , call = Function.prototype.call; + +module.exports = function (callbackFn /*, thisArg*/) { + var result, thisArg, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return filter.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(); + i = 0; + forEach.call(this, function (val, j, self) { + if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val; + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/find-index/implement.js b/node_modules/es5-ext/array/#/find-index/implement.js new file mode 100644 index 0000000..4876b9e --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "findIndex", + { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/find-index/index.js b/node_modules/es5-ext/array/#/find-index/index.js new file mode 100644 index 0000000..3d505b1 --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.findIndex : require("./shim"); diff --git a/node_modules/es5-ext/array/#/find-index/is-implemented.js b/node_modules/es5-ext/array/#/find-index/is-implemented.js new file mode 100644 index 0000000..818c920 --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/is-implemented.js @@ -0,0 +1,11 @@ +"use strict"; + +var fn = function (value) { + return value > 3; +}; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.findIndex !== "function") return false; + return arr.findIndex(fn) === 3; +}; diff --git a/node_modules/es5-ext/array/#/find-index/shim.js b/node_modules/es5-ext/array/#/find-index/shim.js new file mode 100644 index 0000000..bc82827 --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/shim.js @@ -0,0 +1,26 @@ +"use strict"; + +var callable = require("../../../object/valid-callable") + , ensureValue = require("../../../object/valid-value") + , some = Array.prototype.some + , apply = Function.prototype.apply; + +module.exports = function (predicate /*, thisArg*/) { + var k, self; + self = Object(ensureValue(this)); + callable(predicate); + + return some.call( + self, + function (value, index) { + if (apply.call(predicate, this, arguments)) { + k = index; + return true; + } + return false; + }, + arguments[1] + ) + ? k + : -1; +}; diff --git a/node_modules/es5-ext/array/#/find/implement.js b/node_modules/es5-ext/array/#/find/implement.js new file mode 100644 index 0000000..d8ebc5b --- /dev/null +++ b/node_modules/es5-ext/array/#/find/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "find", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/find/index.js b/node_modules/es5-ext/array/#/find/index.js new file mode 100644 index 0000000..131a71b --- /dev/null +++ b/node_modules/es5-ext/array/#/find/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.find : require("./shim"); diff --git a/node_modules/es5-ext/array/#/find/is-implemented.js b/node_modules/es5-ext/array/#/find/is-implemented.js new file mode 100644 index 0000000..aa278a7 --- /dev/null +++ b/node_modules/es5-ext/array/#/find/is-implemented.js @@ -0,0 +1,11 @@ +"use strict"; + +var fn = function (value) { + return value > 3; +}; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.find !== "function") return false; + return arr.find(fn) === 4; +}; diff --git a/node_modules/es5-ext/array/#/find/shim.js b/node_modules/es5-ext/array/#/find/shim.js new file mode 100644 index 0000000..c45a938 --- /dev/null +++ b/node_modules/es5-ext/array/#/find/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +var findIndex = require("../find-index/shim"); + +// eslint-disable-next-line no-unused-vars +module.exports = function (predicate /*, thisArg*/) { + var index = findIndex.apply(this, arguments); + return index === -1 ? undefined : this[index]; +}; diff --git a/node_modules/es5-ext/array/#/first-index.js b/node_modules/es5-ext/array/#/first-index.js new file mode 100644 index 0000000..19bff54 --- /dev/null +++ b/node_modules/es5-ext/array/#/first-index.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, length; + if (!(length = toPosInt(value(this).length))) return null; + i = 0; + while (!objHasOwnProperty.call(this, i)) { + if (++i === length) return null; + } + return i; +}; diff --git a/node_modules/es5-ext/array/#/first.js b/node_modules/es5-ext/array/#/first.js new file mode 100644 index 0000000..ca76833 --- /dev/null +++ b/node_modules/es5-ext/array/#/first.js @@ -0,0 +1,9 @@ +"use strict"; + +var firstIndex = require("./first-index"); + +module.exports = function () { + var i; + if ((i = firstIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/node_modules/es5-ext/array/#/flatten.js b/node_modules/es5-ext/array/#/flatten.js new file mode 100644 index 0000000..4016727 --- /dev/null +++ b/node_modules/es5-ext/array/#/flatten.js @@ -0,0 +1,40 @@ +// Stack grow safe implementation + +"use strict"; + +var ensureValue = require("../../object/valid-value") + , isArray = Array.isArray + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var input = ensureValue(this), index = 0, remaining, remainingIndexes, length, i, result = []; + // Jslint: ignore + main: while (input) { + length = input.length; + for (i = index; i < length; ++i) { + if (!objHasOwnProperty.call(input, i)) continue; + if (isArray(input[i])) { + if (i < length - 1) { + // eslint-disable-next-line max-depth + if (!remaining) { + remaining = []; + remainingIndexes = []; + } + remaining.push(input); + remainingIndexes.push(i + 1); + } + input = input[i]; + index = 0; + continue main; + } + result.push(input[i]); + } + if (remaining) { + input = remaining.pop(); + index = remainingIndexes.pop(); + } else { + input = null; + } + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/for-each-right.js b/node_modules/es5-ext/array/#/for-each-right.js new file mode 100644 index 0000000..ebf076b --- /dev/null +++ b/node_modules/es5-ext/array/#/for-each-right.js @@ -0,0 +1,19 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb /*, thisArg*/) { + var i, self, thisArg; + + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length) - 1; i >= 0; --i) { + if (objHasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self); + } +}; diff --git a/node_modules/es5-ext/array/#/group.js b/node_modules/es5-ext/array/#/group.js new file mode 100644 index 0000000..711eb58 --- /dev/null +++ b/node_modules/es5-ext/array/#/group.js @@ -0,0 +1,28 @@ +// Inspired by Underscore's groupBy: +// http://documentcloud.github.com/underscore/#groupBy + +"use strict"; + +var callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , forEach = Array.prototype.forEach + , apply = Function.prototype.apply; + +module.exports = function (cb /*, thisArg*/) { + var result; + + value(this); + callable(cb); + + result = Object.create(null); + forEach.call( + this, + function (item) { + var key = apply.call(cb, this, arguments); + if (!result[key]) result[key] = []; + result[key].push(item); + }, + arguments[1] + ); + return result; +}; diff --git a/node_modules/es5-ext/array/#/index.js b/node_modules/es5-ext/array/#/index.js new file mode 100644 index 0000000..596e83b --- /dev/null +++ b/node_modules/es5-ext/array/#/index.js @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = { + "@@iterator": require("./@@iterator"), + "binarySearch": require("./binary-search"), + "clear": require("./clear"), + "compact": require("./compact"), + "concat": require("./concat"), + "contains": require("./contains"), + "copyWithin": require("./copy-within"), + "diff": require("./diff"), + "eIndexOf": require("./e-index-of"), + "eLastIndexOf": require("./e-last-index-of"), + "entries": require("./entries"), + "exclusion": require("./exclusion"), + "fill": require("./fill"), + "filter": require("./filter"), + "find": require("./find"), + "findIndex": require("./find-index"), + "first": require("./first"), + "firstIndex": require("./first-index"), + "flatten": require("./flatten"), + "forEachRight": require("./for-each-right"), + "keys": require("./keys"), + "group": require("./group"), + "indexesOf": require("./indexes-of"), + "intersection": require("./intersection"), + "isCopy": require("./is-copy"), + "isEmpty": require("./is-empty"), + "isUniq": require("./is-uniq"), + "last": require("./last"), + "lastIndex": require("./last-index"), + "map": require("./map"), + "remove": require("./remove"), + "separate": require("./separate"), + "slice": require("./slice"), + "someRight": require("./some-right"), + "splice": require("./splice"), + "uniq": require("./uniq"), + "values": require("./values") +}; diff --git a/node_modules/es5-ext/array/#/indexes-of.js b/node_modules/es5-ext/array/#/indexes-of.js new file mode 100644 index 0000000..6c39cd9 --- /dev/null +++ b/node_modules/es5-ext/array/#/indexes-of.js @@ -0,0 +1,12 @@ +"use strict"; + +var indexOf = require("./e-index-of"); + +module.exports = function (value /*, fromIndex*/) { + var result = [], i, fromIndex = arguments[1]; + while ((i = indexOf.call(this, value, fromIndex)) !== -1) { + result.push(i); + fromIndex = i + 1; + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/intersection.js b/node_modules/es5-ext/array/#/intersection.js new file mode 100644 index 0000000..91261d5 --- /dev/null +++ b/node_modules/es5-ext/array/#/intersection.js @@ -0,0 +1,21 @@ +"use strict"; + +var value = require("../../object/valid-value") + , contains = require("./contains") + , byLength = require("./_compare-by-length") + , filter = Array.prototype.filter + , push = Array.prototype.push + , slice = Array.prototype.slice; + +module.exports = function (/* …list*/) { + var lists; + if (!arguments.length) slice.call(this); + push.apply(lists = [this], arguments); + lists.forEach(value); + lists.sort(byLength); + return lists.reduce(function (list1, list2) { + return filter.call(list1, function (item) { + return contains.call(list2, item); + }); + }); +}; diff --git a/node_modules/es5-ext/array/#/is-copy.js b/node_modules/es5-ext/array/#/is-copy.js new file mode 100644 index 0000000..1413b95 --- /dev/null +++ b/node_modules/es5-ext/array/#/is-copy.js @@ -0,0 +1,21 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , eq = require("../../object/eq") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (other) { + var i, length; + value(this); + value(other); + length = toPosInt(this.length); + if (length !== toPosInt(other.length)) return false; + for (i = 0; i < length; ++i) { + if (objHasOwnProperty.call(this, i) !== objHasOwnProperty.call(other, i)) { + return false; + } + if (!eq(this[i], other[i])) return false; + } + return true; +}; diff --git a/node_modules/es5-ext/array/#/is-empty.js b/node_modules/es5-ext/array/#/is-empty.js new file mode 100644 index 0000000..80a3069 --- /dev/null +++ b/node_modules/es5-ext/array/#/is-empty.js @@ -0,0 +1,8 @@ +"use strict"; + +var ensureArray = require("../../object/ensure-array") + , firstIndex = require("./first-index"); + +module.exports = function () { + return firstIndex.call(ensureArray(this)) === null; +}; diff --git a/node_modules/es5-ext/array/#/is-uniq.js b/node_modules/es5-ext/array/#/is-uniq.js new file mode 100644 index 0000000..148a5a9 --- /dev/null +++ b/node_modules/es5-ext/array/#/is-uniq.js @@ -0,0 +1,14 @@ +"use strict"; + +var indexOf = require("./e-index-of") + + , every = Array.prototype.every + , isFirst; + +isFirst = function (value, index) { + return indexOf.call(this, value) === index; +}; + +module.exports = function () { + return every.call(this, isFirst, this); +}; diff --git a/node_modules/es5-ext/array/#/keys/implement.js b/node_modules/es5-ext/array/#/keys/implement.js new file mode 100644 index 0000000..40d0df0 --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "keys", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/keys/index.js b/node_modules/es5-ext/array/#/keys/index.js new file mode 100644 index 0000000..50a18f1 --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.keys : require("./shim"); diff --git a/node_modules/es5-ext/array/#/keys/is-implemented.js b/node_modules/es5-ext/array/#/keys/is-implemented.js new file mode 100644 index 0000000..70a171f --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function () { + var arr = [1, "foo"], iterator, result; + if (typeof arr.keys !== "function") return false; + iterator = arr.keys(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== 0) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/keys/shim.js b/node_modules/es5-ext/array/#/keys/shim.js new file mode 100644 index 0000000..c3c68c6 --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { + return new ArrayIterator(this, "key"); +}; diff --git a/node_modules/es5-ext/array/#/last-index.js b/node_modules/es5-ext/array/#/last-index.js new file mode 100644 index 0000000..74aaba4 --- /dev/null +++ b/node_modules/es5-ext/array/#/last-index.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, length; + if (!(length = toPosInt(value(this).length))) return null; + i = length - 1; + while (!objHasOwnProperty.call(this, i)) { + if (--i === -1) return null; + } + return i; +}; diff --git a/node_modules/es5-ext/array/#/last.js b/node_modules/es5-ext/array/#/last.js new file mode 100644 index 0000000..38bb359 --- /dev/null +++ b/node_modules/es5-ext/array/#/last.js @@ -0,0 +1,9 @@ +"use strict"; + +var lastIndex = require("./last-index"); + +module.exports = function () { + var i; + if ((i = lastIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/node_modules/es5-ext/array/#/map/implement.js b/node_modules/es5-ext/array/#/map/implement.js new file mode 100644 index 0000000..a6d1d90 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "map", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/map/index.js b/node_modules/es5-ext/array/#/map/index.js new file mode 100644 index 0000000..101c064 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.map : require("./shim"); diff --git a/node_modules/es5-ext/array/#/map/is-implemented.js b/node_modules/es5-ext/array/#/map/is-implemented.js new file mode 100644 index 0000000..24ab908 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var identity = require("../../../function/identity") + , SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { + return (new SubArray()).map(identity) instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/map/shim.js b/node_modules/es5-ext/array/#/map/shim.js new file mode 100644 index 0000000..6d8cc1f --- /dev/null +++ b/node_modules/es5-ext/array/#/map/shim.js @@ -0,0 +1,21 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , callable = require("../../../object/valid-callable") + + , isArray = Array.isArray, map = Array.prototype.map + , forEach = Array.prototype.forEach, call = Function.prototype.call; + +module.exports = function (callbackFn/*, thisArg*/) { + var result, thisArg; + if (!this || !isArray(this) || isPlainArray(this)) { + return map.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(this.length); + forEach.call(this, function (val, i, self) { + result[i] = call.call(callbackFn, thisArg, val, i, self); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/remove.js b/node_modules/es5-ext/array/#/remove.js new file mode 100644 index 0000000..6a8a086 --- /dev/null +++ b/node_modules/es5-ext/array/#/remove.js @@ -0,0 +1,17 @@ +"use strict"; + +var indexOf = require("./e-index-of") + , forEach = Array.prototype.forEach + , splice = Array.prototype.splice; + +// eslint-disable-next-line no-unused-vars +module.exports = function (itemToRemove /*, …item*/) { + forEach.call( + arguments, + function (item) { + var index = indexOf.call(this, item); + if (index !== -1) splice.call(this, index, 1); + }, + this + ); +}; diff --git a/node_modules/es5-ext/array/#/separate.js b/node_modules/es5-ext/array/#/separate.js new file mode 100644 index 0000000..35e1cc5 --- /dev/null +++ b/node_modules/es5-ext/array/#/separate.js @@ -0,0 +1,12 @@ +"use strict"; + +var forEach = Array.prototype.forEach; + +module.exports = function (sep) { + var result = []; + forEach.call(this, function (val) { + result.push(val, sep); + }); + result.pop(); + return result; +}; diff --git a/node_modules/es5-ext/array/#/slice/implement.js b/node_modules/es5-ext/array/#/slice/implement.js new file mode 100644 index 0000000..568e87a --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "slice", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/slice/index.js b/node_modules/es5-ext/array/#/slice/index.js new file mode 100644 index 0000000..c80ee35 --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.slice : require("./shim"); diff --git a/node_modules/es5-ext/array/#/slice/is-implemented.js b/node_modules/es5-ext/array/#/slice/is-implemented.js new file mode 100644 index 0000000..47904c2 --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { + return (new SubArray()).slice() instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/slice/shim.js b/node_modules/es5-ext/array/#/slice/shim.js new file mode 100644 index 0000000..ff13085 --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/shim.js @@ -0,0 +1,36 @@ +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , isPlainArray = require("../../is-plain-array") + , isArray = Array.isArray + , slice = Array.prototype.slice + , objHasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max; + +module.exports = function (start, end) { + var length, result, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return slice.apply(this, arguments); + } + length = toPosInt(this.length); + start = toInteger(start); + if (start < 0) start = max(length + start, 0); + else if (start > length) start = length; + if (end === undefined) { + end = length; + } else { + end = toInteger(end); + if (end < 0) end = max(length + end, 0); + else if (end > length) end = length; + } + if (start > end) start = end; + result = new this.constructor(end - start); + i = 0; + while (start !== end) { + if (objHasOwnProperty.call(this, start)) result[i] = this[start]; + ++i; + ++start; + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/some-right.js b/node_modules/es5-ext/array/#/some-right.js new file mode 100644 index 0000000..d9a665f --- /dev/null +++ b/node_modules/es5-ext/array/#/some-right.js @@ -0,0 +1,21 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb /*, thisArg*/) { + var i, self, thisArg; + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length) - 1; i >= 0; --i) { + if (objHasOwnProperty.call(self, i) && call.call(cb, thisArg, self[i], i, self)) { + return true; + } + } + return false; +}; diff --git a/node_modules/es5-ext/array/#/splice/implement.js b/node_modules/es5-ext/array/#/splice/implement.js new file mode 100644 index 0000000..1e1682b --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "splice", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/splice/index.js b/node_modules/es5-ext/array/#/splice/index.js new file mode 100644 index 0000000..e5fda95 --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.splice : require("./shim"); diff --git a/node_modules/es5-ext/array/#/splice/is-implemented.js b/node_modules/es5-ext/array/#/splice/is-implemented.js new file mode 100644 index 0000000..afbb95a --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { + return (new SubArray()).splice(0) instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/splice/shim.js b/node_modules/es5-ext/array/#/splice/shim.js new file mode 100644 index 0000000..dc8d837 --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , isArray = Array.isArray + , splice = Array.prototype.splice + , forEach = Array.prototype.forEach; + +// eslint-disable-next-line no-unused-vars +module.exports = function (start, deleteCount /*, …items*/) { + var arr = splice.apply(this, arguments), result; + if (!this || !isArray(this) || isPlainArray(this)) return arr; + result = new this.constructor(arr.length); + forEach.call(arr, function (val, i) { + result[i] = val; + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/uniq.js b/node_modules/es5-ext/array/#/uniq.js new file mode 100644 index 0000000..944ce93 --- /dev/null +++ b/node_modules/es5-ext/array/#/uniq.js @@ -0,0 +1,15 @@ +"use strict"; + +var indexOf = require("./e-index-of") + + , filter = Array.prototype.filter + + , isFirst; + +isFirst = function (value, index) { + return indexOf.call(this, value) === index; +}; + +module.exports = function () { + return filter.call(this, isFirst, this); +}; diff --git a/node_modules/es5-ext/array/#/values/implement.js b/node_modules/es5-ext/array/#/values/implement.js new file mode 100644 index 0000000..b43e9f6 --- /dev/null +++ b/node_modules/es5-ext/array/#/values/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "values", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/values/index.js b/node_modules/es5-ext/array/#/values/index.js new file mode 100644 index 0000000..30a50ba --- /dev/null +++ b/node_modules/es5-ext/array/#/values/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.values : require("./shim"); diff --git a/node_modules/es5-ext/array/#/values/is-implemented.js b/node_modules/es5-ext/array/#/values/is-implemented.js new file mode 100644 index 0000000..8b72568 --- /dev/null +++ b/node_modules/es5-ext/array/#/values/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function () { + var arr = ["foo", 1], iterator, result; + if (typeof arr.values !== "function") return false; + iterator = arr.values(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "foo") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/values/shim.js b/node_modules/es5-ext/array/#/values/shim.js new file mode 100644 index 0000000..e46a052 --- /dev/null +++ b/node_modules/es5-ext/array/#/values/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { + return new ArrayIterator(this, "value"); +}; diff --git a/node_modules/es5-ext/array/_is-extensible.js b/node_modules/es5-ext/array/_is-extensible.js new file mode 100644 index 0000000..a9e8ee7 --- /dev/null +++ b/node_modules/es5-ext/array/_is-extensible.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = (function () { + var SubArray = require("./_sub-array-dummy"), arr; + + if (!SubArray) return false; + arr = new SubArray(); + if (!Array.isArray(arr)) return false; + if (!(arr instanceof SubArray)) return false; + + arr[34] = "foo"; + return arr.length === 35; +}()); diff --git a/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/node_modules/es5-ext/array/_sub-array-dummy-safe.js new file mode 100644 index 0000000..80e3b3c --- /dev/null +++ b/node_modules/es5-ext/array/_sub-array-dummy-safe.js @@ -0,0 +1,25 @@ +"use strict"; + +var setPrototypeOf = require("../object/set-prototype-of") + , isExtensible = require("./_is-extensible"); + +module.exports = (function () { + var SubArray; + + if (isExtensible) return require("./_sub-array-dummy"); + + if (!setPrototypeOf) return null; + SubArray = function () { + var arr = Array.apply(this, arguments); + setPrototypeOf(arr, SubArray.prototype); + return arr; + }; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, +enumerable: false, +writable: true, + configurable: true } + }); + return SubArray; +}()); diff --git a/node_modules/es5-ext/array/_sub-array-dummy.js b/node_modules/es5-ext/array/_sub-array-dummy.js new file mode 100644 index 0000000..cf11152 --- /dev/null +++ b/node_modules/es5-ext/array/_sub-array-dummy.js @@ -0,0 +1,20 @@ +"use strict"; + +var setPrototypeOf = require("../object/set-prototype-of"); + +module.exports = (function () { + var SubArray; + + if (!setPrototypeOf) return null; + SubArray = function () { + Array.apply(this, arguments); +}; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, +enumerable: false, +writable: true, + configurable: true } + }); + return SubArray; +}()); diff --git a/node_modules/es5-ext/array/from/implement.js b/node_modules/es5-ext/array/from/implement.js new file mode 100644 index 0000000..4117224 --- /dev/null +++ b/node_modules/es5-ext/array/from/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array, "from", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/from/index.js b/node_modules/es5-ext/array/from/index.js new file mode 100644 index 0000000..ca4492d --- /dev/null +++ b/node_modules/es5-ext/array/from/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.from + : require("./shim"); diff --git a/node_modules/es5-ext/array/from/is-implemented.js b/node_modules/es5-ext/array/from/is-implemented.js new file mode 100644 index 0000000..3567c87 --- /dev/null +++ b/node_modules/es5-ext/array/from/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var from = Array.from, arr, result; + if (typeof from !== "function") return false; + arr = ["raz", "dwa"]; + result = from(arr); + return Boolean(result && (result !== arr) && (result[1] === "dwa")); +}; diff --git a/node_modules/es5-ext/array/from/shim.js b/node_modules/es5-ext/array/from/shim.js new file mode 100644 index 0000000..8928181 --- /dev/null +++ b/node_modules/es5-ext/array/from/shim.js @@ -0,0 +1,119 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , isArguments = require("../../function/is-arguments") + , isFunction = require("../../function/is-function") + , toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , validValue = require("../../object/valid-value") + , isValue = require("../../object/is-value") + , isString = require("../../string/is-string") + , isArray = Array.isArray + , call = Function.prototype.call + , desc = { configurable: true, enumerable: true, writable: true, value: null } + , defineProperty = Object.defineProperty; + +// eslint-disable-next-line complexity +module.exports = function (arrayLike /*, mapFn, thisArg*/) { + var mapFn = arguments[1] + , thisArg = arguments[2] + , Context + , i + , j + , arr + , length + , code + , iterator + , result + , getIterator + , value; + + arrayLike = Object(validValue(arrayLike)); + + if (isValue(mapFn)) callable(mapFn); + if (!this || this === Array || !isFunction(this)) { + // Result: Plain array + if (!mapFn) { + if (isArguments(arrayLike)) { + // Source: Arguments + length = arrayLike.length; + if (length !== 1) return Array.apply(null, arrayLike); + arr = new Array(1); + arr[0] = arrayLike[0]; + return arr; + } + if (isArray(arrayLike)) { + // Source: Array + arr = new Array(length = arrayLike.length); + for (i = 0; i < length; ++i) arr[i] = arrayLike[i]; + return arr; + } + } + arr = []; + } else { + // Result: Non plain array + Context = this; + } + + if (!isArray(arrayLike)) { + if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) { + // Source: Iterator + iterator = callable(getIterator).call(arrayLike); + if (Context) arr = new Context(); + result = iterator.next(); + i = 0; + while (!result.done) { + value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + result = iterator.next(); + ++i; + } + length = i; + } else if (isString(arrayLike)) { + // Source: String + length = arrayLike.length; + if (Context) arr = new Context(); + for (i = 0, j = 0; i < length; ++i) { + value = arrayLike[i]; + if (i + 1 < length) { + code = value.charCodeAt(0); + // eslint-disable-next-line max-depth + if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i]; + } + value = mapFn ? call.call(mapFn, thisArg, value, j) : value; + if (Context) { + desc.value = value; + defineProperty(arr, j, desc); + } else { + arr[j] = value; + } + ++j; + } + length = j; + } + } + if (length === undefined) { + // Source: array or array-like + length = toPosInt(arrayLike.length); + if (Context) arr = new Context(length); + for (i = 0; i < length; ++i) { + value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + } + } + if (Context) { + desc.value = null; + arr.length = length; + } + return arr; +}; diff --git a/node_modules/es5-ext/array/generate.js b/node_modules/es5-ext/array/generate.js new file mode 100644 index 0000000..42b6930 --- /dev/null +++ b/node_modules/es5-ext/array/generate.js @@ -0,0 +1,18 @@ +"use strict"; + +var toPosInt = require("../number/to-pos-integer") + , value = require("../object/valid-value") + , slice = Array.prototype.slice; + +module.exports = function (length /*, …fill*/) { + var arr, currentLength; + length = toPosInt(value(length)); + if (length === 0) return []; + + arr = arguments.length < 2 ? [undefined] : slice.call(arguments, 1, 1 + length); + + while ((currentLength = arr.length) < length) { + arr = arr.concat(arr.slice(0, length - currentLength)); + } + return arr; +}; diff --git a/node_modules/es5-ext/array/index.js b/node_modules/es5-ext/array/index.js new file mode 100644 index 0000000..49ff58e --- /dev/null +++ b/node_modules/es5-ext/array/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "from": require("./from"), + "generate": require("./generate"), + "isPlainArray": require("./is-plain-array"), + "of": require("./of"), + "toArray": require("./to-array"), + "validArray": require("./valid-array") +}; diff --git a/node_modules/es5-ext/array/is-plain-array.js b/node_modules/es5-ext/array/is-plain-array.js new file mode 100644 index 0000000..ca3d25b --- /dev/null +++ b/node_modules/es5-ext/array/is-plain-array.js @@ -0,0 +1,11 @@ +"use strict"; + +var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var proto; + if (!obj || !isArray(obj)) return false; + proto = getPrototypeOf(obj); + if (!isArray(proto)) return false; + return !isArray(getPrototypeOf(proto)); +}; diff --git a/node_modules/es5-ext/array/of/implement.js b/node_modules/es5-ext/array/of/implement.js new file mode 100644 index 0000000..92f8f3e --- /dev/null +++ b/node_modules/es5-ext/array/of/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array, "of", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/of/index.js b/node_modules/es5-ext/array/of/index.js new file mode 100644 index 0000000..43ab3f6 --- /dev/null +++ b/node_modules/es5-ext/array/of/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.of + : require("./shim"); diff --git a/node_modules/es5-ext/array/of/is-implemented.js b/node_modules/es5-ext/array/of/is-implemented.js new file mode 100644 index 0000000..20b80c2 --- /dev/null +++ b/node_modules/es5-ext/array/of/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function () { + var of = Array.of, result; + if (typeof of !== "function") return false; + result = of("foo", "bar"); + return Boolean(result && (result[1] === "bar")); +}; diff --git a/node_modules/es5-ext/array/of/shim.js b/node_modules/es5-ext/array/of/shim.js new file mode 100644 index 0000000..6cc9c38 --- /dev/null +++ b/node_modules/es5-ext/array/of/shim.js @@ -0,0 +1,19 @@ +"use strict"; + +var isFunction = require("../../function/is-function") + , slice = Array.prototype.slice + , defineProperty = Object.defineProperty + , desc = { configurable: true, enumerable: true, writable: true, value: null }; + +module.exports = function (/* …items*/) { + var result, i, length; + if (!this || this === Array || !isFunction(this)) return slice.call(arguments); + result = new this(length = arguments.length); + for (i = 0; i < length; ++i) { + desc.value = arguments[i]; + defineProperty(result, i, desc); + } + desc.value = null; + result.length = length; + return result; +}; diff --git a/node_modules/es5-ext/array/to-array.js b/node_modules/es5-ext/array/to-array.js new file mode 100644 index 0000000..2078b7a --- /dev/null +++ b/node_modules/es5-ext/array/to-array.js @@ -0,0 +1,9 @@ +"use strict"; + +var from = require("./from") + + , isArray = Array.isArray; + +module.exports = function (arrayLike) { + return isArray(arrayLike) ? arrayLike : from(arrayLike); +}; diff --git a/node_modules/es5-ext/array/valid-array.js b/node_modules/es5-ext/array/valid-array.js new file mode 100644 index 0000000..1e58c39 --- /dev/null +++ b/node_modules/es5-ext/array/valid-array.js @@ -0,0 +1,8 @@ +"use strict"; + +var isArray = Array.isArray; + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(value + " is not an array"); +}; diff --git a/node_modules/es5-ext/boolean/index.js b/node_modules/es5-ext/boolean/index.js new file mode 100644 index 0000000..ffd3fd2 --- /dev/null +++ b/node_modules/es5-ext/boolean/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + isBoolean: require("./is-boolean") +}; diff --git a/node_modules/es5-ext/boolean/is-boolean.js b/node_modules/es5-ext/boolean/is-boolean.js new file mode 100644 index 0000000..394845f --- /dev/null +++ b/node_modules/es5-ext/boolean/is-boolean.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(true); + +module.exports = function (value) { + return ( + typeof value === "boolean" || + (typeof value === "object" && (value instanceof Boolean || objToString.call(value) === id)) + ); +}; diff --git a/node_modules/es5-ext/date/#/copy.js b/node_modules/es5-ext/date/#/copy.js new file mode 100644 index 0000000..9638a65 --- /dev/null +++ b/node_modules/es5-ext/date/#/copy.js @@ -0,0 +1,7 @@ +"use strict"; + +var getTime = Date.prototype.getTime; + +module.exports = function () { + return new Date(getTime.call(this)); +}; diff --git a/node_modules/es5-ext/date/#/days-in-month.js b/node_modules/es5-ext/date/#/days-in-month.js new file mode 100644 index 0000000..8e8ca4d --- /dev/null +++ b/node_modules/es5-ext/date/#/days-in-month.js @@ -0,0 +1,17 @@ +"use strict"; + +var getMonth = Date.prototype.getMonth; + +module.exports = function () { + switch (getMonth.call(this)) { + case 1: + return this.getFullYear() % 4 ? 28 : 29; + case 3: + case 5: + case 8: + case 10: + return 30; + default: + return 31; + } +}; diff --git a/node_modules/es5-ext/date/#/floor-day.js b/node_modules/es5-ext/date/#/floor-day.js new file mode 100644 index 0000000..db696d3 --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-day.js @@ -0,0 +1,8 @@ +"use strict"; + +var setHours = Date.prototype.setHours; + +module.exports = function () { + setHours.call(this, 0, 0, 0, 0); + return this; +}; diff --git a/node_modules/es5-ext/date/#/floor-month.js b/node_modules/es5-ext/date/#/floor-month.js new file mode 100644 index 0000000..c9c0460 --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-month.js @@ -0,0 +1,8 @@ +"use strict"; + +var floorDay = require("./floor-day"); + +module.exports = function () { + floorDay.call(this).setDate(1); + return this; +}; diff --git a/node_modules/es5-ext/date/#/floor-year.js b/node_modules/es5-ext/date/#/floor-year.js new file mode 100644 index 0000000..e9b6f0f --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-year.js @@ -0,0 +1,8 @@ +"use strict"; + +var floorMonth = require("./floor-month"); + +module.exports = function () { + floorMonth.call(this).setMonth(0); + return this; +}; diff --git a/node_modules/es5-ext/date/#/format.js b/node_modules/es5-ext/date/#/format.js new file mode 100644 index 0000000..519d77c --- /dev/null +++ b/node_modules/es5-ext/date/#/format.js @@ -0,0 +1,38 @@ +/* eslint id-length: "off" */ + +"use strict"; + +var pad = require("../../number/#/pad") + , date = require("../valid-date") + , format; + +format = require("../../string/format-method")({ + Y: function () { + return String(this.getFullYear()); + }, + y: function () { + return String(this.getFullYear()).slice(-2); + }, + m: function () { + return pad.call(this.getMonth() + 1, 2); + }, + d: function () { + return pad.call(this.getDate(), 2); + }, + H: function () { + return pad.call(this.getHours(), 2); + }, + M: function () { + return pad.call(this.getMinutes(), 2); + }, + S: function () { + return pad.call(this.getSeconds(), 2); + }, + L: function () { + return pad.call(this.getMilliseconds(), 3); + } +}); + +module.exports = function (pattern) { + return format.call(date(this), pattern); +}; diff --git a/node_modules/es5-ext/date/#/index.js b/node_modules/es5-ext/date/#/index.js new file mode 100644 index 0000000..1781e21 --- /dev/null +++ b/node_modules/es5-ext/date/#/index.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + copy: require("./copy"), + daysInMonth: require("./days-in-month"), + floorDay: require("./floor-day"), + floorMonth: require("./floor-month"), + floorYear: require("./floor-year"), + format: require("./format") +}; diff --git a/node_modules/es5-ext/date/ensure-time-value.js b/node_modules/es5-ext/date/ensure-time-value.js new file mode 100644 index 0000000..09f5afc --- /dev/null +++ b/node_modules/es5-ext/date/ensure-time-value.js @@ -0,0 +1,10 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , toInteger = require("../number/to-integer") + , isTimeValue = require("./is-time-value"); + +module.exports = function (value) { + if (isTimeValue(value)) return toInteger(value); + throw new TypeError(safeToString(value) + " is not a valid time value"); +}; diff --git a/node_modules/es5-ext/date/index.js b/node_modules/es5-ext/date/index.js new file mode 100644 index 0000000..c143149 --- /dev/null +++ b/node_modules/es5-ext/date/index.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "ensureTimeValue": require("./ensure-time-value"), + "isDate": require("./is-date"), + "isTimeValue": require("./is-time-value"), + "validDate": require("./valid-date") +}; diff --git a/node_modules/es5-ext/date/is-date.js b/node_modules/es5-ext/date/is-date.js new file mode 100644 index 0000000..9758203 --- /dev/null +++ b/node_modules/es5-ext/date/is-date.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(new Date()); + +module.exports = function (value) { + return (value && (value instanceof Date || objToString.call(value) === id)) || false; +}; diff --git a/node_modules/es5-ext/date/is-time-value.js b/node_modules/es5-ext/date/is-time-value.js new file mode 100644 index 0000000..4240fec --- /dev/null +++ b/node_modules/es5-ext/date/is-time-value.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (value) { + try { + value = Number(value); + } catch (e) { + return false; + } + if (isNaN(value)) return false; + if (Math.abs(value) > 8.64e16) return false; + return true; +}; diff --git a/node_modules/es5-ext/date/valid-date.js b/node_modules/es5-ext/date/valid-date.js new file mode 100644 index 0000000..c17125f --- /dev/null +++ b/node_modules/es5-ext/date/valid-date.js @@ -0,0 +1,8 @@ +"use strict"; + +var isDate = require("./is-date"); + +module.exports = function (value) { + if (!isDate(value) || isNaN(value)) throw new TypeError(value + " is not valid Date object"); + return value; +}; diff --git a/node_modules/es5-ext/error/#/index.js b/node_modules/es5-ext/error/#/index.js new file mode 100644 index 0000000..ac9a430 --- /dev/null +++ b/node_modules/es5-ext/error/#/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + throw: require("./throw") +}; diff --git a/node_modules/es5-ext/error/#/throw.js b/node_modules/es5-ext/error/#/throw.js new file mode 100644 index 0000000..3fe6bb4 --- /dev/null +++ b/node_modules/es5-ext/error/#/throw.js @@ -0,0 +1,7 @@ +"use strict"; + +var error = require("../valid-error"); + +module.exports = function () { + throw error(this); +}; diff --git a/node_modules/es5-ext/error/custom.js b/node_modules/es5-ext/error/custom.js new file mode 100644 index 0000000..0e4c8cb --- /dev/null +++ b/node_modules/es5-ext/error/custom.js @@ -0,0 +1,20 @@ +"use strict"; + +var assign = require("../object/assign") + , isObject = require("../object/is-object") + , isValue = require("../object/is-value") + , captureStackTrace = Error.captureStackTrace; + +exports = module.exports = function (message /*, code, ext*/) { + var err = new Error(message), code = arguments[1], ext = arguments[2]; + if (!isValue(ext)) { + if (isObject(code)) { + ext = code; + code = null; + } + } + if (isValue(ext)) assign(err, ext); + if (isValue(code)) err.code = code; + if (captureStackTrace) captureStackTrace(err, exports); + return err; +}; diff --git a/node_modules/es5-ext/error/index.js b/node_modules/es5-ext/error/index.js new file mode 100644 index 0000000..cb7054a --- /dev/null +++ b/node_modules/es5-ext/error/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "custom": require("./custom"), + "isError": require("./is-error"), + "validError": require("./valid-error") +}; diff --git a/node_modules/es5-ext/error/is-error.js b/node_modules/es5-ext/error/is-error.js new file mode 100644 index 0000000..aad67ed --- /dev/null +++ b/node_modules/es5-ext/error/is-error.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(new Error()); + +module.exports = function (value) { + return (value && (value instanceof Error || objToString.call(value) === id)) || false; +}; diff --git a/node_modules/es5-ext/error/valid-error.js b/node_modules/es5-ext/error/valid-error.js new file mode 100644 index 0000000..432f7ba --- /dev/null +++ b/node_modules/es5-ext/error/valid-error.js @@ -0,0 +1,8 @@ +"use strict"; + +var isError = require("./is-error"); + +module.exports = function (value) { + if (!isError(value)) throw new TypeError(value + " is not an Error object"); + return value; +}; diff --git a/node_modules/es5-ext/function/#/compose.js b/node_modules/es5-ext/function/#/compose.js new file mode 100644 index 0000000..0897517 --- /dev/null +++ b/node_modules/es5-ext/function/#/compose.js @@ -0,0 +1,22 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , aFrom = require("../../array/from") + , apply = Function.prototype.apply + , call = Function.prototype.call + , callFn = function (arg, fn) { + return call.call(fn, this, arg); +}; + +module.exports = function (fn /*, …fnn*/) { + var fns, first; + if (!fn) callable(fn); + fns = [this].concat(aFrom(arguments)); + fns.forEach(callable); + fns = fns.reverse(); + first = fns[0]; + fns = fns.slice(1); + return function (argIgnored) { + return fns.reduce(callFn, apply.call(first, this, arguments)); + }; +}; diff --git a/node_modules/es5-ext/function/#/copy.js b/node_modules/es5-ext/function/#/copy.js new file mode 100644 index 0000000..f0403b3 --- /dev/null +++ b/node_modules/es5-ext/function/#/copy.js @@ -0,0 +1,23 @@ +"use strict"; + +var mixin = require("../../object/mixin") + , validFunction = require("../valid-function") + , re = /^\s*function\s*([\0-')-\uffff]+)*\s*\(([\0-(*-\uffff]*)\)\s*\{/; + +module.exports = function () { + var match = String(validFunction(this)).match(re), fn; + + // eslint-disable-next-line no-new-func + fn = new Function( + "fn", + "return function " + + match[1].trim() + + "(" + + match[2] + + ") { return fn.apply(this, arguments); };" + )(this); + try { + mixin(fn, this); + } catch (ignore) {} + return fn; +}; diff --git a/node_modules/es5-ext/function/#/curry.js b/node_modules/es5-ext/function/#/curry.js new file mode 100644 index 0000000..cc1e14a --- /dev/null +++ b/node_modules/es5-ext/function/#/curry.js @@ -0,0 +1,24 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , defineLength = require("../_define-length") + + , slice = Array.prototype.slice, apply = Function.prototype.apply + , curry; + +curry = function self(fn, length, preArgs) { + return defineLength(function () { + var args = preArgs + ? preArgs.concat(slice.call(arguments, 0, length - preArgs.length)) + : slice.call(arguments, 0, length); + return args.length === length ? apply.call(fn, this, args) + : self(fn, length, args); + }, preArgs ? length - preArgs.length : length); +}; + +module.exports = function (/* Length*/) { + var length = arguments[0]; + return curry(callable(this), + isNaN(length) ? toPosInt(this.length) : toPosInt(length)); +}; diff --git a/node_modules/es5-ext/function/#/index.js b/node_modules/es5-ext/function/#/index.js new file mode 100644 index 0000000..74c7f01 --- /dev/null +++ b/node_modules/es5-ext/function/#/index.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = { + compose: require("./compose"), + copy: require("./copy"), + curry: require("./curry"), + lock: require("./lock"), + not: require("./not"), + partial: require("./partial"), + spread: require("./spread"), + toStringTokens: require("./to-string-tokens") +}; diff --git a/node_modules/es5-ext/function/#/lock.js b/node_modules/es5-ext/function/#/lock.js new file mode 100644 index 0000000..dcd93bb --- /dev/null +++ b/node_modules/es5-ext/function/#/lock.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this) + , args = arguments; + + return function () { + return apply.call(fn, this, args); +}; +}; diff --git a/node_modules/es5-ext/function/#/not.js b/node_modules/es5-ext/function/#/not.js new file mode 100644 index 0000000..82d64de --- /dev/null +++ b/node_modules/es5-ext/function/#/not.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , defineLength = require("../_define-length") + + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + + return defineLength(function () { + return !apply.call(fn, this, arguments); + }, fn.length); +}; diff --git a/node_modules/es5-ext/function/#/partial.js b/node_modules/es5-ext/function/#/partial.js new file mode 100644 index 0000000..1734b13 --- /dev/null +++ b/node_modules/es5-ext/function/#/partial.js @@ -0,0 +1,16 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , aFrom = require("../../array/from") + , defineLength = require("../_define-length") + + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this) + , args = aFrom(arguments); + + return defineLength(function () { + return apply.call(fn, this, args.concat(aFrom(arguments))); + }, fn.length - args.length); +}; diff --git a/node_modules/es5-ext/function/#/spread.js b/node_modules/es5-ext/function/#/spread.js new file mode 100644 index 0000000..755553b --- /dev/null +++ b/node_modules/es5-ext/function/#/spread.js @@ -0,0 +1,12 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + return function (args) { + return apply.call(fn, this, args); +}; +}; diff --git a/node_modules/es5-ext/function/#/to-string-tokens.js b/node_modules/es5-ext/function/#/to-string-tokens.js new file mode 100644 index 0000000..4ce026a --- /dev/null +++ b/node_modules/es5-ext/function/#/to-string-tokens.js @@ -0,0 +1,17 @@ +"use strict"; + +var validFunction = require("../valid-function"); + +var re1 = /^\s*function[\0-')-\uffff]*\(([\0-(*-\uffff]*)\)\s*\{([\0-\uffff]*)\}\s*$/ + , re2 = /^\s*\(?([\0-'*-\uffff]*)\)?\s*=>\s*(\{?[\0-\uffff]*\}?)\s*$/; + +module.exports = function () { + var str = String(validFunction(this)), data = str.match(re1); + if (!data) { + data = str.match(re2); + if (!data) throw new Error("Unrecognized string format"); + data[1] = data[1].trim(); + if (data[2][0] === "{") data[2] = data[2].trim().slice(1, -1); + } + return { args: data[1], body: data[2] }; +}; diff --git a/node_modules/es5-ext/function/_define-length.js b/node_modules/es5-ext/function/_define-length.js new file mode 100644 index 0000000..13749d3 --- /dev/null +++ b/node_modules/es5-ext/function/_define-length.js @@ -0,0 +1,56 @@ +"use strict"; + +var toPosInt = require("../number/to-pos-integer"); + +var test = function (arg1, arg2) { + return arg2; +}; + +var desc, defineProperty, generate, mixin; + +try { + Object.defineProperty(test, "length", { + configurable: true, + writable: false, + enumerable: false, + value: 1 + }); +} catch (ignore) {} + +if (test.length === 1) { + // ES6 + desc = { configurable: true, writable: false, enumerable: false }; + defineProperty = Object.defineProperty; + module.exports = function (fn, length) { + length = toPosInt(length); + if (fn.length === length) return fn; + desc.value = length; + return defineProperty(fn, "length", desc); + }; +} else { + mixin = require("../object/mixin"); + generate = (function () { + var cache = []; + return function (length) { + var args, i = 0; + if (cache[length]) return cache[length]; + args = []; + while (length--) args.push("a" + (++i).toString(36)); + // eslint-disable-next-line no-new-func + return new Function( + "fn", + "return function (" + args.join(", ") + ") { return fn.apply(this, arguments); };" + ); + }; + }()); + module.exports = function (src, length) { + var target; + length = toPosInt(length); + if (src.length === length) return src; + target = generate(length)(src); + try { + mixin(target, src); + } catch (ignore) {} + return target; + }; +} diff --git a/node_modules/es5-ext/function/constant.js b/node_modules/es5-ext/function/constant.js new file mode 100644 index 0000000..c41435d --- /dev/null +++ b/node_modules/es5-ext/function/constant.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + return function () { + return value; + }; +}; diff --git a/node_modules/es5-ext/function/identity.js b/node_modules/es5-ext/function/identity.js new file mode 100644 index 0000000..01a5aad --- /dev/null +++ b/node_modules/es5-ext/function/identity.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (value) { + return value; +}; diff --git a/node_modules/es5-ext/function/index.js b/node_modules/es5-ext/function/index.js new file mode 100644 index 0000000..1574fbb --- /dev/null +++ b/node_modules/es5-ext/function/index.js @@ -0,0 +1,15 @@ +// Export all modules. + +"use strict"; + +module.exports = { + "#": require("./#"), + "constant": require("./constant"), + "identity": require("./identity"), + "invoke": require("./invoke"), + "isArguments": require("./is-arguments"), + "isFunction": require("./is-function"), + "noop": require("./noop"), + "pluck": require("./pluck"), + "validFunction": require("./valid-function") +}; diff --git a/node_modules/es5-ext/function/invoke.js b/node_modules/es5-ext/function/invoke.js new file mode 100644 index 0000000..c3d23f2 --- /dev/null +++ b/node_modules/es5-ext/function/invoke.js @@ -0,0 +1,15 @@ +"use strict"; + +var isCallable = require("../object/is-callable") + , value = require("../object/valid-value") + + , slice = Array.prototype.slice, apply = Function.prototype.apply; + +module.exports = function (name/*, …args*/) { + var args = slice.call(arguments, 1), isFn = isCallable(name); + return function (obj) { + value(obj); + return apply.call(isFn ? name : obj[name], obj, + args.concat(slice.call(arguments, 1))); + }; +}; diff --git a/node_modules/es5-ext/function/is-arguments.js b/node_modules/es5-ext/function/is-arguments.js new file mode 100644 index 0000000..f4bf406 --- /dev/null +++ b/node_modules/es5-ext/function/is-arguments.js @@ -0,0 +1,12 @@ +"use strict"; + +var objToString = Object.prototype.toString + , id = objToString.call( + (function () { + return arguments; + })() +); + +module.exports = function (value) { + return objToString.call(value) === id; +}; diff --git a/node_modules/es5-ext/function/is-function.js b/node_modules/es5-ext/function/is-function.js new file mode 100644 index 0000000..d3d92f4 --- /dev/null +++ b/node_modules/es5-ext/function/is-function.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(require("./noop")); + +module.exports = function (value) { + return typeof value === "function" && objToString.call(value) === id; +}; diff --git a/node_modules/es5-ext/function/noop.js b/node_modules/es5-ext/function/noop.js new file mode 100644 index 0000000..6174f03 --- /dev/null +++ b/node_modules/es5-ext/function/noop.js @@ -0,0 +1,4 @@ +"use strict"; + +// eslint-disable-next-line no-empty-function +module.exports = function () {}; diff --git a/node_modules/es5-ext/function/pluck.js b/node_modules/es5-ext/function/pluck.js new file mode 100644 index 0000000..8507128 --- /dev/null +++ b/node_modules/es5-ext/function/pluck.js @@ -0,0 +1,9 @@ +"use strict"; + +var value = require("../object/valid-value"); + +module.exports = function (name) { + return function (obj) { + return value(obj)[name]; + }; +}; diff --git a/node_modules/es5-ext/function/valid-function.js b/node_modules/es5-ext/function/valid-function.js new file mode 100644 index 0000000..060bd64 --- /dev/null +++ b/node_modules/es5-ext/function/valid-function.js @@ -0,0 +1,8 @@ +"use strict"; + +var isFunction = require("./is-function"); + +module.exports = function (value) { + if (!isFunction(value)) throw new TypeError(value + " is not a function"); + return value; +}; diff --git a/node_modules/es5-ext/global.js b/node_modules/es5-ext/global.js new file mode 100644 index 0000000..d77579c --- /dev/null +++ b/node_modules/es5-ext/global.js @@ -0,0 +1,5 @@ +/* eslint strict: "off" */ + +module.exports = (function () { + return this; +}()); diff --git a/node_modules/es5-ext/index.js b/node_modules/es5-ext/index.js new file mode 100644 index 0000000..0919764 --- /dev/null +++ b/node_modules/es5-ext/index.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = { + global: require("./global"), + optionalChaining: require("./optional-chaining"), + safeToString: require("./safe-to-string"), + toShortStringRepresentation: require("./to-short-string-representation"), + + array: require("./array"), + boolean: require("./boolean"), + date: require("./date"), + error: require("./error"), + function: require("./function"), + iterable: require("./iterable"), + json: require("./json"), + math: require("./math"), + number: require("./number"), + object: require("./object"), + promise: require("./promise"), + regExp: require("./reg-exp"), + string: require("./string") +}; diff --git a/node_modules/es5-ext/iterable/for-each.js b/node_modules/es5-ext/iterable/for-each.js new file mode 100644 index 0000000..2840e95 --- /dev/null +++ b/node_modules/es5-ext/iterable/for-each.js @@ -0,0 +1,12 @@ +"use strict"; + +var forOf = require("es6-iterator/for-of") + , isIterable = require("es6-iterator/is-iterable") + , iterable = require("./validate") + + , forEach = Array.prototype.forEach; + +module.exports = function (target, cb/*, thisArg*/) { + if (isIterable(iterable(target))) forOf(target, cb, arguments[2]); + else forEach.call(target, cb, arguments[2]); +}; diff --git a/node_modules/es5-ext/iterable/index.js b/node_modules/es5-ext/iterable/index.js new file mode 100644 index 0000000..4b898fc --- /dev/null +++ b/node_modules/es5-ext/iterable/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + forEach: require("./for-each"), + is: require("./is"), + validate: require("./validate"), + validateObject: require("./validate-object") +}; diff --git a/node_modules/es5-ext/iterable/is.js b/node_modules/es5-ext/iterable/is.js new file mode 100644 index 0000000..aa5a9b9 --- /dev/null +++ b/node_modules/es5-ext/iterable/is.js @@ -0,0 +1,11 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , isValue = require("../object/is-value") + , isArrayLike = require("../object/is-array-like"); + +module.exports = function (value) { + if (!isValue(value)) return false; + if (typeof value[iteratorSymbol] === "function") return true; + return isArrayLike(value); +}; diff --git a/node_modules/es5-ext/iterable/validate-object.js b/node_modules/es5-ext/iterable/validate-object.js new file mode 100644 index 0000000..26e622b --- /dev/null +++ b/node_modules/es5-ext/iterable/validate-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isObject = require("../object/is-object") + , is = require("./is"); + +module.exports = function (value) { + if (is(value) && isObject(value)) return value; + throw new TypeError(value + " is not an iterable or array-like object"); +}; diff --git a/node_modules/es5-ext/iterable/validate.js b/node_modules/es5-ext/iterable/validate.js new file mode 100644 index 0000000..94a91c4 --- /dev/null +++ b/node_modules/es5-ext/iterable/validate.js @@ -0,0 +1,8 @@ +"use strict"; + +var is = require("./is"); + +module.exports = function (value) { + if (is(value)) return value; + throw new TypeError(value + " is not an iterable or array-like"); +}; diff --git a/node_modules/es5-ext/json/index.js b/node_modules/es5-ext/json/index.js new file mode 100644 index 0000000..14b25cd --- /dev/null +++ b/node_modules/es5-ext/json/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + safeStringify: require("./safe-stringify") +}; diff --git a/node_modules/es5-ext/json/safe-stringify.js b/node_modules/es5-ext/json/safe-stringify.js new file mode 100644 index 0000000..2154f6c --- /dev/null +++ b/node_modules/es5-ext/json/safe-stringify.js @@ -0,0 +1,41 @@ +"use strict"; + +var compact = require("../array/#/compact") + , isObject = require("../object/is-object") + , toArray = require("../object/to-array") + , isArray = Array.isArray + , stringify = JSON.stringify; + +module.exports = function self(value /*, replacer, space*/) { + var replacer = arguments[1], space = arguments[2]; + try { + return stringify(value, replacer, space); + } catch (e) { + if (!isObject(value)) return null; + if (typeof value.toJSON === "function") return null; + if (isArray(value)) { + return ( + "[" + + compact.call( + value.map(function (item) { + return self(item, replacer, space); + }) + ) + + "]" + ); + } + return ( + "{" + + compact + .call( + toArray(value, function (item, key) { + item = self(item, replacer, space); + if (!item) return null; + return stringify(key) + ":" + item; + }) + ) + .join(",") + + "}" + ); + } +}; diff --git a/node_modules/es5-ext/math/_pack-ieee754.js b/node_modules/es5-ext/math/_pack-ieee754.js new file mode 100644 index 0000000..b77bc8d --- /dev/null +++ b/node_modules/es5-ext/math/_pack-ieee754.js @@ -0,0 +1,88 @@ +/* eslint no-bitwise: "off" */ +// Credit: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var abs = Math.abs + , floor = Math.floor + , log = Math.log + , min = Math.min + , pow = Math.pow + , LN2 = Math.LN2 + , roundToEven; + +roundToEven = function (num) { + var whole = floor(num), fraction = num - whole; + if (fraction < 0.5) return whole; + if (fraction > 0.5) return whole + 1; + return whole % 2 ? whole + 1 : whole; +}; + +// eslint-disable-next-line max-statements +module.exports = function (value, ebits, fbits) { + var bias = (1 << (ebits - 1)) - 1, sign, e, fraction, i, bits, str, bytes; + + // Compute sign, exponent, fraction + if (isNaN(value)) { + // NaN + // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping + e = (1 << ebits) - 1; + fraction = pow(2, fbits - 1); + sign = 0; + } else if (value === Infinity || value === -Infinity) { + e = (1 << ebits) - 1; + fraction = 0; + sign = value < 0 ? 1 : 0; + } else if (value === 0) { + e = 0; + fraction = 0; + sign = 1 / value === -Infinity ? 1 : 0; + } else { + sign = value < 0; + value = abs(value); + + if (value >= pow(2, 1 - bias)) { + e = min(floor(log(value) / LN2), 1023); + fraction = roundToEven(value / pow(2, e) * pow(2, fbits)); + if (fraction / pow(2, fbits) >= 2) { + e += 1; + fraction = 1; + } + if (e > bias) { + // Overflow + e = (1 << ebits) - 1; + fraction = 0; + } else { + // Normal + e += bias; + fraction -= pow(2, fbits); + } + } else { + // Subnormal + e = 0; + fraction = roundToEven(value / pow(2, 1 - bias - fbits)); + } + } + + // Pack sign, exponent, fraction + bits = []; + for (i = fbits; i; i -= 1) { + bits.push(fraction % 2 ? 1 : 0); + fraction = floor(fraction / 2); + } + for (i = ebits; i; i -= 1) { + bits.push(e % 2 ? 1 : 0); + e = floor(e / 2); + } + bits.push(sign ? 1 : 0); + bits.reverse(); + str = bits.join(""); + + // Bits to bytes + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; +}; diff --git a/node_modules/es5-ext/math/_unpack-ieee754.js b/node_modules/es5-ext/math/_unpack-ieee754.js new file mode 100644 index 0000000..83fa947 --- /dev/null +++ b/node_modules/es5-ext/math/_unpack-ieee754.js @@ -0,0 +1,33 @@ +/* eslint no-bitwise: "off" */ +// Credit: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var pow = Math.pow; + +module.exports = function (bytes, ebits, fbits) { + // Bytes to bits + var bits = [], i, j, bit, str, bias, sign, e, fraction; + + for (i = bytes.length; i; i -= 1) { + bit = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(bit % 2 ? 1 : 0); + bit >>= 1; + } + } + bits.reverse(); + str = bits.join(""); + + // Unpack sign, exponent, fraction + bias = (1 << (ebits - 1)) - 1; + sign = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + fraction = parseInt(str.substring(1 + ebits), 2); + + // Produce number + if (e === (1 << ebits) - 1) return fraction === 0 ? sign * Infinity : NaN; + if (e > 0) return sign * pow(2, e - bias) * (1 + fraction / pow(2, fbits)); + if (fraction !== 0) return sign * pow(2, -(bias - 1)) * (fraction / pow(2, fbits)); + return sign < 0 ? -0 : 0; +}; diff --git a/node_modules/es5-ext/math/acosh/implement.js b/node_modules/es5-ext/math/acosh/implement.js new file mode 100644 index 0000000..ea75c7d --- /dev/null +++ b/node_modules/es5-ext/math/acosh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "acosh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/acosh/index.js b/node_modules/es5-ext/math/acosh/index.js new file mode 100644 index 0000000..160f6b9 --- /dev/null +++ b/node_modules/es5-ext/math/acosh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.acosh + : require("./shim"); diff --git a/node_modules/es5-ext/math/acosh/is-implemented.js b/node_modules/es5-ext/math/acosh/is-implemented.js new file mode 100644 index 0000000..2e97301 --- /dev/null +++ b/node_modules/es5-ext/math/acosh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var acosh = Math.acosh; + if (typeof acosh !== "function") return false; + return acosh(2) === 1.3169578969248166; +}; diff --git a/node_modules/es5-ext/math/acosh/shim.js b/node_modules/es5-ext/math/acosh/shim.js new file mode 100644 index 0000000..3e632ff --- /dev/null +++ b/node_modules/es5-ext/math/acosh/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 1) return NaN; + if (value === 1) return 0; + if (value === Infinity) return value; + return log(value + sqrt(value * value - 1)); +}; diff --git a/node_modules/es5-ext/math/asinh/implement.js b/node_modules/es5-ext/math/asinh/implement.js new file mode 100644 index 0000000..efa6704 --- /dev/null +++ b/node_modules/es5-ext/math/asinh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "asinh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/asinh/index.js b/node_modules/es5-ext/math/asinh/index.js new file mode 100644 index 0000000..b5fb120 --- /dev/null +++ b/node_modules/es5-ext/math/asinh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.asinh + : require("./shim"); diff --git a/node_modules/es5-ext/math/asinh/is-implemented.js b/node_modules/es5-ext/math/asinh/is-implemented.js new file mode 100644 index 0000000..a7e0f20 --- /dev/null +++ b/node_modules/es5-ext/math/asinh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var asinh = Math.asinh; + if (typeof asinh !== "function") return false; + return asinh(2) === 1.4436354751788103; +}; diff --git a/node_modules/es5-ext/math/asinh/shim.js b/node_modules/es5-ext/math/asinh/shim.js new file mode 100644 index 0000000..30ce2e4 --- /dev/null +++ b/node_modules/es5-ext/math/asinh/shim.js @@ -0,0 +1,15 @@ +"use strict"; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (value < 0) { + value = -value; + return -log(value + sqrt(value * value + 1)); + } + return log(value + sqrt(value * value + 1)); +}; diff --git a/node_modules/es5-ext/math/atanh/implement.js b/node_modules/es5-ext/math/atanh/implement.js new file mode 100644 index 0000000..47d5cc2 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "atanh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/atanh/index.js b/node_modules/es5-ext/math/atanh/index.js new file mode 100644 index 0000000..51fbcd6 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.atanh + : require("./shim"); diff --git a/node_modules/es5-ext/math/atanh/is-implemented.js b/node_modules/es5-ext/math/atanh/is-implemented.js new file mode 100644 index 0000000..4787c4f --- /dev/null +++ b/node_modules/es5-ext/math/atanh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var atanh = Math.atanh; + if (typeof atanh !== "function") return false; + return Math.round(atanh(0.5) * 1e15) === 549306144334055; +}; diff --git a/node_modules/es5-ext/math/atanh/shim.js b/node_modules/es5-ext/math/atanh/shim.js new file mode 100644 index 0000000..9383e97 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < -1) return NaN; + if (value > 1) return NaN; + if (value === -1) return -Infinity; + if (value === 1) return Infinity; + if (value === 0) return value; + return 0.5 * log((1 + value) / (1 - value)); +}; diff --git a/node_modules/es5-ext/math/cbrt/implement.js b/node_modules/es5-ext/math/cbrt/implement.js new file mode 100644 index 0000000..f5adbab --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "cbrt", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/cbrt/index.js b/node_modules/es5-ext/math/cbrt/index.js new file mode 100644 index 0000000..4780640 --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.cbrt + : require("./shim"); diff --git a/node_modules/es5-ext/math/cbrt/is-implemented.js b/node_modules/es5-ext/math/cbrt/is-implemented.js new file mode 100644 index 0000000..a8ac0db --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var cbrt = Math.cbrt; + if (typeof cbrt !== "function") return false; + return cbrt(2) === 1.2599210498948732; +}; diff --git a/node_modules/es5-ext/math/cbrt/shim.js b/node_modules/es5-ext/math/cbrt/shim.js new file mode 100644 index 0000000..8871c55 --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var pow = Math.pow; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (value < 0) return -pow(-value, 1 / 3); + return pow(value, 1 / 3); +}; diff --git a/node_modules/es5-ext/math/clz32/implement.js b/node_modules/es5-ext/math/clz32/implement.js new file mode 100644 index 0000000..10b4a41 --- /dev/null +++ b/node_modules/es5-ext/math/clz32/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "clz32", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/clz32/index.js b/node_modules/es5-ext/math/clz32/index.js new file mode 100644 index 0000000..a16ee33 --- /dev/null +++ b/node_modules/es5-ext/math/clz32/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.clz32 + : require("./shim"); diff --git a/node_modules/es5-ext/math/clz32/is-implemented.js b/node_modules/es5-ext/math/clz32/is-implemented.js new file mode 100644 index 0000000..ee6d882 --- /dev/null +++ b/node_modules/es5-ext/math/clz32/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var clz32 = Math.clz32; + if (typeof clz32 !== "function") return false; + return clz32(1000) === 22; +}; diff --git a/node_modules/es5-ext/math/clz32/shim.js b/node_modules/es5-ext/math/clz32/shim.js new file mode 100644 index 0000000..2b526c2 --- /dev/null +++ b/node_modules/es5-ext/math/clz32/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-bitwise + value >>>= 0; + return value ? 32 - value.toString(2).length : 32; +}; diff --git a/node_modules/es5-ext/math/cosh/implement.js b/node_modules/es5-ext/math/cosh/implement.js new file mode 100644 index 0000000..6f42b38 --- /dev/null +++ b/node_modules/es5-ext/math/cosh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "cosh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/cosh/index.js b/node_modules/es5-ext/math/cosh/index.js new file mode 100644 index 0000000..5ed349a --- /dev/null +++ b/node_modules/es5-ext/math/cosh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.cosh + : require("./shim"); diff --git a/node_modules/es5-ext/math/cosh/is-implemented.js b/node_modules/es5-ext/math/cosh/is-implemented.js new file mode 100644 index 0000000..7173054 --- /dev/null +++ b/node_modules/es5-ext/math/cosh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var cosh = Math.cosh; + if (typeof cosh !== "function") return false; + return cosh(1) === 1.5430806348152437; +}; diff --git a/node_modules/es5-ext/math/cosh/shim.js b/node_modules/es5-ext/math/cosh/shim.js new file mode 100644 index 0000000..c762c84 --- /dev/null +++ b/node_modules/es5-ext/math/cosh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return 1; + if (!isFinite(value)) return Infinity; + return (exp(value) + exp(-value)) / 2; +}; diff --git a/node_modules/es5-ext/math/expm1/implement.js b/node_modules/es5-ext/math/expm1/implement.js new file mode 100644 index 0000000..8c9d811 --- /dev/null +++ b/node_modules/es5-ext/math/expm1/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "expm1", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/expm1/index.js b/node_modules/es5-ext/math/expm1/index.js new file mode 100644 index 0000000..5b5dff6 --- /dev/null +++ b/node_modules/es5-ext/math/expm1/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.expm1 + : require("./shim"); diff --git a/node_modules/es5-ext/math/expm1/is-implemented.js b/node_modules/es5-ext/math/expm1/is-implemented.js new file mode 100644 index 0000000..dfd056e --- /dev/null +++ b/node_modules/es5-ext/math/expm1/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var expm1 = Math.expm1; + if (typeof expm1 !== "function") return false; + return expm1(1).toFixed(15) === "1.718281828459045"; +}; diff --git a/node_modules/es5-ext/math/expm1/shim.js b/node_modules/es5-ext/math/expm1/shim.js new file mode 100644 index 0000000..ce737b3 --- /dev/null +++ b/node_modules/es5-ext/math/expm1/shim.js @@ -0,0 +1,16 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6 + +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return Infinity; + if (value === -Infinity) return -1; + + if (value > -1.0e-6 && value < 1.0e-6) return value + value * value / 2; + return exp(value) - 1; +}; diff --git a/node_modules/es5-ext/math/fround/implement.js b/node_modules/es5-ext/math/fround/implement.js new file mode 100644 index 0000000..b54d2fc --- /dev/null +++ b/node_modules/es5-ext/math/fround/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "fround", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/fround/index.js b/node_modules/es5-ext/math/fround/index.js new file mode 100644 index 0000000..db409e8 --- /dev/null +++ b/node_modules/es5-ext/math/fround/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.fround + : require("./shim"); diff --git a/node_modules/es5-ext/math/fround/is-implemented.js b/node_modules/es5-ext/math/fround/is-implemented.js new file mode 100644 index 0000000..ad2b705 --- /dev/null +++ b/node_modules/es5-ext/math/fround/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var fround = Math.fround; + if (typeof fround !== "function") return false; + return fround(1.337) === 1.3370000123977661; +}; diff --git a/node_modules/es5-ext/math/fround/shim.js b/node_modules/es5-ext/math/fround/shim.js new file mode 100644 index 0000000..bfbc54c --- /dev/null +++ b/node_modules/es5-ext/math/fround/shim.js @@ -0,0 +1,35 @@ +/* global Float32Array */ + +// Credit: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +"use strict"; + +var toFloat32; + +if (typeof Float32Array === "undefined") { + toFloat32 = (function () { + var pack = require("../_pack-ieee754") + , unpack = require("../_unpack-ieee754"); + + return function (value) { + return unpack(pack(value, 8, 23), 8, 23); + }; + }()); +} else { + toFloat32 = (function () { + var float32Array = new Float32Array(1); + return function (num) { + float32Array[0] = num; + return float32Array[0]; + }; + }()); +} + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + + return toFloat32(value); +}; diff --git a/node_modules/es5-ext/math/hypot/implement.js b/node_modules/es5-ext/math/hypot/implement.js new file mode 100644 index 0000000..e2b3928 --- /dev/null +++ b/node_modules/es5-ext/math/hypot/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "hypot", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/hypot/index.js b/node_modules/es5-ext/math/hypot/index.js new file mode 100644 index 0000000..a030a41 --- /dev/null +++ b/node_modules/es5-ext/math/hypot/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.hypot + : require("./shim"); diff --git a/node_modules/es5-ext/math/hypot/is-implemented.js b/node_modules/es5-ext/math/hypot/is-implemented.js new file mode 100644 index 0000000..d317bc7 --- /dev/null +++ b/node_modules/es5-ext/math/hypot/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var hypot = Math.hypot; + if (typeof hypot !== "function") return false; + return hypot(3, 4) === 5; +}; diff --git a/node_modules/es5-ext/math/hypot/shim.js b/node_modules/es5-ext/math/hypot/shim.js new file mode 100644 index 0000000..2a92b17 --- /dev/null +++ b/node_modules/es5-ext/math/hypot/shim.js @@ -0,0 +1,43 @@ +// Thanks for hints: https://github.com/paulmillr/es6-shim + +"use strict"; + +var some = Array.prototype.some + , abs = Math.abs + , sqrt = Math.sqrt + , compare = function (val1, val2) { + return val2 - val1; +} + , divide = function (value) { + return value / this; +} + , add = function (sum, number) { + return sum + number * number; +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (val1, val2 /*, …valn*/) { + var result, numbers; + if (!arguments.length) return 0; + some.call(arguments, function (val) { + if (isNaN(val)) { + result = NaN; + return false; + } + if (!isFinite(val)) { + result = Infinity; + return true; + } + if (result !== undefined) return false; + val = Number(val); + if (val === 0) return false; + if (numbers) numbers.push(abs(val)); + else numbers = [abs(val)]; + return false; + }); + if (result !== undefined) return result; + if (!numbers) return 0; + + numbers.sort(compare); + return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0)); +}; diff --git a/node_modules/es5-ext/math/imul/implement.js b/node_modules/es5-ext/math/imul/implement.js new file mode 100644 index 0000000..bff5773 --- /dev/null +++ b/node_modules/es5-ext/math/imul/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "imul", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/imul/index.js b/node_modules/es5-ext/math/imul/index.js new file mode 100644 index 0000000..a756d59 --- /dev/null +++ b/node_modules/es5-ext/math/imul/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.imul + : require("./shim"); diff --git a/node_modules/es5-ext/math/imul/is-implemented.js b/node_modules/es5-ext/math/imul/is-implemented.js new file mode 100644 index 0000000..0f32919 --- /dev/null +++ b/node_modules/es5-ext/math/imul/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var imul = Math.imul; + if (typeof imul !== "function") return false; + return imul(-1, 8) === -8; +}; diff --git a/node_modules/es5-ext/math/imul/shim.js b/node_modules/es5-ext/math/imul/shim.js new file mode 100644 index 0000000..a14e589 --- /dev/null +++ b/node_modules/es5-ext/math/imul/shim.js @@ -0,0 +1,17 @@ +/* eslint no-bitwise: "off" */ + +// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference +// /Global_Objects/Math/imul + +"use strict"; + +module.exports = function (val1, val2) { + var xh = (val1 >>> 16) & 0xffff + , xl = val1 & 0xffff + , yh = (val2 >>> 16) & 0xffff + , yl = val2 & 0xffff; + + // The shift by 0 fixes the sign on the high part + // the final |0 converts the unsigned value into a signed value + return (xl * yl + ((xh * yl + xl * yh) << 16 >>> 0)) | 0; +}; diff --git a/node_modules/es5-ext/math/index.js b/node_modules/es5-ext/math/index.js new file mode 100644 index 0000000..db86101 --- /dev/null +++ b/node_modules/es5-ext/math/index.js @@ -0,0 +1,21 @@ +"use strict"; + +module.exports = { + acosh: require("./acosh"), + asinh: require("./asinh"), + atanh: require("./atanh"), + cbrt: require("./cbrt"), + clz32: require("./clz32"), + cosh: require("./cosh"), + expm1: require("./expm1"), + fround: require("./fround"), + hypot: require("./hypot"), + imul: require("./imul"), + log10: require("./log10"), + log2: require("./log2"), + log1p: require("./log1p"), + sign: require("./sign"), + sinh: require("./sinh"), + tanh: require("./tanh"), + trunc: require("./trunc") +}; diff --git a/node_modules/es5-ext/math/log10/implement.js b/node_modules/es5-ext/math/log10/implement.js new file mode 100644 index 0000000..669cee8 --- /dev/null +++ b/node_modules/es5-ext/math/log10/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log10", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/log10/index.js b/node_modules/es5-ext/math/log10/index.js new file mode 100644 index 0000000..bc2ec48 --- /dev/null +++ b/node_modules/es5-ext/math/log10/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.log10 + : require("./shim"); diff --git a/node_modules/es5-ext/math/log10/is-implemented.js b/node_modules/es5-ext/math/log10/is-implemented.js new file mode 100644 index 0000000..f221759 --- /dev/null +++ b/node_modules/es5-ext/math/log10/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log10 = Math.log10; + if (typeof log10 !== "function") return false; + return log10(2) === 0.3010299956639812; +}; diff --git a/node_modules/es5-ext/math/log10/shim.js b/node_modules/es5-ext/math/log10/shim.js new file mode 100644 index 0000000..e8599a2 --- /dev/null +++ b/node_modules/es5-ext/math/log10/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log, LOG10E = Math.LOG10E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 0) return NaN; + if (value === 0) return -Infinity; + if (value === 1) return 0; + if (value === Infinity) return Infinity; + + return log(value) * LOG10E; +}; diff --git a/node_modules/es5-ext/math/log1p/implement.js b/node_modules/es5-ext/math/log1p/implement.js new file mode 100644 index 0000000..36fcee6 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log1p", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/log1p/index.js b/node_modules/es5-ext/math/log1p/index.js new file mode 100644 index 0000000..41c6736 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.log1p + : require("./shim"); diff --git a/node_modules/es5-ext/math/log1p/is-implemented.js b/node_modules/es5-ext/math/log1p/is-implemented.js new file mode 100644 index 0000000..7626ab4 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log1p = Math.log1p; + if (typeof log1p !== "function") return false; + return log1p(1) === 0.6931471805599453; +}; diff --git a/node_modules/es5-ext/math/log1p/shim.js b/node_modules/es5-ext/math/log1p/shim.js new file mode 100644 index 0000000..7c6f227 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/shim.js @@ -0,0 +1,17 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6/blob/master/ES6.js + +"use strict"; + +var log = Math.log; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < -1) return NaN; + if (value === -1) return -Infinity; + if (value === 0) return value; + if (value === Infinity) return Infinity; + + if (value > -1.0e-8 && value < 1.0e-8) return value - value * value / 2; + return log(1 + value); +}; diff --git a/node_modules/es5-ext/math/log2/implement.js b/node_modules/es5-ext/math/log2/implement.js new file mode 100644 index 0000000..f1c04e0 --- /dev/null +++ b/node_modules/es5-ext/math/log2/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log2", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/log2/index.js b/node_modules/es5-ext/math/log2/index.js new file mode 100644 index 0000000..d319cae --- /dev/null +++ b/node_modules/es5-ext/math/log2/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.log2 + : require("./shim"); diff --git a/node_modules/es5-ext/math/log2/is-implemented.js b/node_modules/es5-ext/math/log2/is-implemented.js new file mode 100644 index 0000000..c70963f --- /dev/null +++ b/node_modules/es5-ext/math/log2/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log2 = Math.log2; + if (typeof log2 !== "function") return false; + return log2(3).toFixed(15) === "1.584962500721156"; +}; diff --git a/node_modules/es5-ext/math/log2/shim.js b/node_modules/es5-ext/math/log2/shim.js new file mode 100644 index 0000000..51fcdae --- /dev/null +++ b/node_modules/es5-ext/math/log2/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log, LOG2E = Math.LOG2E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 0) return NaN; + if (value === 0) return -Infinity; + if (value === 1) return 0; + if (value === Infinity) return Infinity; + + return log(value) * LOG2E; +}; diff --git a/node_modules/es5-ext/math/sign/implement.js b/node_modules/es5-ext/math/sign/implement.js new file mode 100644 index 0000000..bc7da14 --- /dev/null +++ b/node_modules/es5-ext/math/sign/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "sign", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/sign/index.js b/node_modules/es5-ext/math/sign/index.js new file mode 100644 index 0000000..9f28656 --- /dev/null +++ b/node_modules/es5-ext/math/sign/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.sign + : require("./shim"); diff --git a/node_modules/es5-ext/math/sign/is-implemented.js b/node_modules/es5-ext/math/sign/is-implemented.js new file mode 100644 index 0000000..23ff83a --- /dev/null +++ b/node_modules/es5-ext/math/sign/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var sign = Math.sign; + if (typeof sign !== "function") return false; + return (sign(10) === 1) && (sign(-20) === -1); +}; diff --git a/node_modules/es5-ext/math/sign/shim.js b/node_modules/es5-ext/math/sign/shim.js new file mode 100644 index 0000000..760c69d --- /dev/null +++ b/node_modules/es5-ext/math/sign/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + value = Number(value); + if (isNaN(value) || (value === 0)) return value; + return value > 0 ? 1 : -1; +}; diff --git a/node_modules/es5-ext/math/sinh/implement.js b/node_modules/es5-ext/math/sinh/implement.js new file mode 100644 index 0000000..cc4c40b --- /dev/null +++ b/node_modules/es5-ext/math/sinh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "sinh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/sinh/index.js b/node_modules/es5-ext/math/sinh/index.js new file mode 100644 index 0000000..2c43dce --- /dev/null +++ b/node_modules/es5-ext/math/sinh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.sinh + : require("./shim"); diff --git a/node_modules/es5-ext/math/sinh/is-implemented.js b/node_modules/es5-ext/math/sinh/is-implemented.js new file mode 100644 index 0000000..5e4ee40 --- /dev/null +++ b/node_modules/es5-ext/math/sinh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var sinh = Math.sinh; + if (typeof sinh !== "function") return false; + return (sinh(1) === 1.1752011936438014) && (sinh(Number.MIN_VALUE) === 5e-324); +}; diff --git a/node_modules/es5-ext/math/sinh/shim.js b/node_modules/es5-ext/math/sinh/shim.js new file mode 100644 index 0000000..fc6a047 --- /dev/null +++ b/node_modules/es5-ext/math/sinh/shim.js @@ -0,0 +1,18 @@ +// Parts of implementation taken from es6-shim project +// See: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +"use strict"; + +var expm1 = require("../expm1") + , abs = Math.abs + , exp = Math.exp + , e = Math.E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (abs(value) < 1) return (expm1(value) - expm1(-value)) / 2; + return (exp(value - 1) - exp(-value - 1)) * e / 2; +}; diff --git a/node_modules/es5-ext/math/tanh/implement.js b/node_modules/es5-ext/math/tanh/implement.js new file mode 100644 index 0000000..9e30d10 --- /dev/null +++ b/node_modules/es5-ext/math/tanh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "tanh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/tanh/index.js b/node_modules/es5-ext/math/tanh/index.js new file mode 100644 index 0000000..7c45d98 --- /dev/null +++ b/node_modules/es5-ext/math/tanh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.tanh + : require("./shim"); diff --git a/node_modules/es5-ext/math/tanh/is-implemented.js b/node_modules/es5-ext/math/tanh/is-implemented.js new file mode 100644 index 0000000..b17a1bc --- /dev/null +++ b/node_modules/es5-ext/math/tanh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var tanh = Math.tanh; + if (typeof tanh !== "function") return false; + return (tanh(1) === 0.7615941559557649) && (tanh(Number.MAX_VALUE) === 1); +}; diff --git a/node_modules/es5-ext/math/tanh/shim.js b/node_modules/es5-ext/math/tanh/shim.js new file mode 100644 index 0000000..974dd7c --- /dev/null +++ b/node_modules/es5-ext/math/tanh/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + var num1, num2; + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return 1; + if (value === -Infinity) return -1; + num1 = exp(value); + if (num1 === Infinity) return 1; + num2 = exp(-value); + if (num2 === Infinity) return -1; + return (num1 - num2) / (num1 + num2); +}; diff --git a/node_modules/es5-ext/math/trunc/implement.js b/node_modules/es5-ext/math/trunc/implement.js new file mode 100644 index 0000000..1ecc124 --- /dev/null +++ b/node_modules/es5-ext/math/trunc/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "trunc", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/trunc/index.js b/node_modules/es5-ext/math/trunc/index.js new file mode 100644 index 0000000..94c0269 --- /dev/null +++ b/node_modules/es5-ext/math/trunc/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.trunc + : require("./shim"); diff --git a/node_modules/es5-ext/math/trunc/is-implemented.js b/node_modules/es5-ext/math/trunc/is-implemented.js new file mode 100644 index 0000000..b150735 --- /dev/null +++ b/node_modules/es5-ext/math/trunc/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var trunc = Math.trunc; + if (typeof trunc !== "function") return false; + return (trunc(13.67) === 13) && (trunc(-13.67) === -13); +}; diff --git a/node_modules/es5-ext/math/trunc/shim.js b/node_modules/es5-ext/math/trunc/shim.js new file mode 100644 index 0000000..bf6ac8c --- /dev/null +++ b/node_modules/es5-ext/math/trunc/shim.js @@ -0,0 +1,13 @@ +"use strict"; + +var floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return Infinity; + if (value === -Infinity) return -Infinity; + if (value > 0) return floor(value); + return -floor(-value); +}; diff --git a/node_modules/es5-ext/number/#/index.js b/node_modules/es5-ext/number/#/index.js new file mode 100644 index 0000000..e6e21c3 --- /dev/null +++ b/node_modules/es5-ext/number/#/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + pad: require("./pad") +}; diff --git a/node_modules/es5-ext/number/#/pad.js b/node_modules/es5-ext/number/#/pad.js new file mode 100644 index 0000000..26fe4b6 --- /dev/null +++ b/node_modules/es5-ext/number/#/pad.js @@ -0,0 +1,15 @@ +"use strict"; + +var pad = require("../../string/#/pad") + , toPosInt = require("../to-pos-integer") + + , toFixed = Number.prototype.toFixed; + +module.exports = function (length/*, precision*/) { + var precision; + length = toPosInt(length); + precision = toPosInt(arguments[1]); + + return pad.call(precision ? toFixed.call(this, precision) : this, + "0", length + (precision ? 1 + precision : 0)); +}; diff --git a/node_modules/es5-ext/number/epsilon/implement.js b/node_modules/es5-ext/number/epsilon/implement.js new file mode 100644 index 0000000..fa19131 --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "EPSILON", { value: require("./"), + configurable: false, +enumerable: false, +writable: false }); +} diff --git a/node_modules/es5-ext/number/epsilon/index.js b/node_modules/es5-ext/number/epsilon/index.js new file mode 100644 index 0000000..12e8a8d --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = 2.220446049250313e-16; diff --git a/node_modules/es5-ext/number/epsilon/is-implemented.js b/node_modules/es5-ext/number/epsilon/is-implemented.js new file mode 100644 index 0000000..1cfbded --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function () { + return typeof Number.EPSILON === "number"; +}; diff --git a/node_modules/es5-ext/number/index.js b/node_modules/es5-ext/number/index.js new file mode 100644 index 0000000..b57ff15 --- /dev/null +++ b/node_modules/es5-ext/number/index.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "EPSILON": require("./epsilon"), + "isFinite": require("./is-finite"), + "isInteger": require("./is-integer"), + "isNaN": require("./is-nan"), + "isNatural": require("./is-natural"), + "isNumber": require("./is-number"), + "isSafeInteger": require("./is-safe-integer"), + "MAX_SAFE_INTEGER": require("./max-safe-integer"), + "MIN_SAFE_INTEGER": require("./min-safe-integer"), + "toInteger": require("./to-integer"), + "toPosInteger": require("./to-pos-integer"), + "toUint32": require("./to-uint32") +}; diff --git a/node_modules/es5-ext/number/is-finite/implement.js b/node_modules/es5-ext/number/is-finite/implement.js new file mode 100644 index 0000000..17f67cb --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isFinite", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/number/is-finite/index.js b/node_modules/es5-ext/number/is-finite/index.js new file mode 100644 index 0000000..dbeaf7b --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Number.isFinite + : require("./shim"); diff --git a/node_modules/es5-ext/number/is-finite/is-implemented.js b/node_modules/es5-ext/number/is-finite/is-implemented.js new file mode 100644 index 0000000..eadd050 --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var numberIsFinite = Number.isFinite; + if (typeof numberIsFinite !== "function") return false; + return !numberIsFinite("23") && numberIsFinite(34) && !numberIsFinite(Infinity); +}; diff --git a/node_modules/es5-ext/number/is-finite/shim.js b/node_modules/es5-ext/number/is-finite/shim.js new file mode 100644 index 0000000..72dd7aa --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/shim.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (value) { + return (typeof value === "number") && isFinite(value); +}; diff --git a/node_modules/es5-ext/number/is-integer/implement.js b/node_modules/es5-ext/number/is-integer/implement.js new file mode 100644 index 0000000..dd1f3bd --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isInteger", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/number/is-integer/index.js b/node_modules/es5-ext/number/is-integer/index.js new file mode 100644 index 0000000..71cde73 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Number.isInteger + : require("./shim"); diff --git a/node_modules/es5-ext/number/is-integer/is-implemented.js b/node_modules/es5-ext/number/is-integer/is-implemented.js new file mode 100644 index 0000000..f357c71 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var isInteger = Number.isInteger; + if (typeof isInteger !== "function") return false; + return !isInteger("23") && isInteger(34) && !isInteger(32.34); +}; diff --git a/node_modules/es5-ext/number/is-integer/shim.js b/node_modules/es5-ext/number/is-integer/shim.js new file mode 100644 index 0000000..12058b5 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/shim.js @@ -0,0 +1,8 @@ +// Credit: http://www.2ality.com/2014/05/is-integer.html + +"use strict"; + +module.exports = function (value) { + if (typeof value !== "number") return false; + return value % 1 === 0; +}; diff --git a/node_modules/es5-ext/number/is-nan/implement.js b/node_modules/es5-ext/number/is-nan/implement.js new file mode 100644 index 0000000..2f9126c --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isNaN", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/number/is-nan/index.js b/node_modules/es5-ext/number/is-nan/index.js new file mode 100644 index 0000000..9128d5c --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Number.isNaN + : require("./shim"); diff --git a/node_modules/es5-ext/number/is-nan/is-implemented.js b/node_modules/es5-ext/number/is-nan/is-implemented.js new file mode 100644 index 0000000..756838a --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var numberIsNaN = Number.isNaN; + if (typeof numberIsNaN !== "function") return false; + return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); +}; diff --git a/node_modules/es5-ext/number/is-nan/shim.js b/node_modules/es5-ext/number/is-nan/shim.js new file mode 100644 index 0000000..b5730d1 --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-self-compare + return value !== value; +}; diff --git a/node_modules/es5-ext/number/is-natural.js b/node_modules/es5-ext/number/is-natural.js new file mode 100644 index 0000000..329966e --- /dev/null +++ b/node_modules/es5-ext/number/is-natural.js @@ -0,0 +1,7 @@ +"use strict"; + +var isInteger = require("./is-integer"); + +module.exports = function (num) { + return isInteger(num) && (num >= 0); +}; diff --git a/node_modules/es5-ext/number/is-number.js b/node_modules/es5-ext/number/is-number.js new file mode 100644 index 0000000..3da0712 --- /dev/null +++ b/node_modules/es5-ext/number/is-number.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(1); + +module.exports = function (value) { + return ( + typeof value === "number" || + (value instanceof Number || (typeof value === "object" && objToString.call(value) === id)) + ); +}; diff --git a/node_modules/es5-ext/number/is-safe-integer/implement.js b/node_modules/es5-ext/number/is-safe-integer/implement.js new file mode 100644 index 0000000..6092db7 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isSafeInteger", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/number/is-safe-integer/index.js b/node_modules/es5-ext/number/is-safe-integer/index.js new file mode 100644 index 0000000..d4314df --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Number.isSafeInteger + : require("./shim"); diff --git a/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/node_modules/es5-ext/number/is-safe-integer/is-implemented.js new file mode 100644 index 0000000..36b0db5 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function () { + var isSafeInteger = Number.isSafeInteger; + if (typeof isSafeInteger !== "function") return false; + return !isSafeInteger("23") && isSafeInteger(34232322323) && + !isSafeInteger(9007199254740992); +}; diff --git a/node_modules/es5-ext/number/is-safe-integer/shim.js b/node_modules/es5-ext/number/is-safe-integer/shim.js new file mode 100644 index 0000000..de7f22f --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +var isInteger = require("../is-integer/shim") + , maxValue = require("../max-safe-integer") + + , abs = Math.abs; + +module.exports = function (value) { + if (!isInteger(value)) return false; + return abs(value) <= maxValue; +}; diff --git a/node_modules/es5-ext/number/max-safe-integer/implement.js b/node_modules/es5-ext/number/max-safe-integer/implement.js new file mode 100644 index 0000000..be5a293 --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "MAX_SAFE_INTEGER", { value: require("./"), + configurable: false, +enumerable: false, +writable: false }); +} diff --git a/node_modules/es5-ext/number/max-safe-integer/index.js b/node_modules/es5-ext/number/max-safe-integer/index.js new file mode 100644 index 0000000..75a41e7 --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = Math.pow(2, 53) - 1; diff --git a/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/node_modules/es5-ext/number/max-safe-integer/is-implemented.js new file mode 100644 index 0000000..09a7da7 --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function () { + return typeof Number.MAX_SAFE_INTEGER === "number"; +}; diff --git a/node_modules/es5-ext/number/min-safe-integer/implement.js b/node_modules/es5-ext/number/min-safe-integer/implement.js new file mode 100644 index 0000000..77d0274 --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "MIN_SAFE_INTEGER", { value: require("./"), + configurable: false, +enumerable: false, +writable: false }); +} diff --git a/node_modules/es5-ext/number/min-safe-integer/index.js b/node_modules/es5-ext/number/min-safe-integer/index.js new file mode 100644 index 0000000..cde4514 --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = -(Math.pow(2, 53) - 1); diff --git a/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/node_modules/es5-ext/number/min-safe-integer/is-implemented.js new file mode 100644 index 0000000..7b63253 --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function () { + return typeof Number.MIN_SAFE_INTEGER === "number"; +}; diff --git a/node_modules/es5-ext/number/to-integer.js b/node_modules/es5-ext/number/to-integer.js new file mode 100644 index 0000000..524395c --- /dev/null +++ b/node_modules/es5-ext/number/to-integer.js @@ -0,0 +1,12 @@ +"use strict"; + +var sign = require("../math/sign") + + , abs = Math.abs, floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return 0; + value = Number(value); + if ((value === 0) || !isFinite(value)) return value; + return sign(value) * floor(abs(value)); +}; diff --git a/node_modules/es5-ext/number/to-pos-integer.js b/node_modules/es5-ext/number/to-pos-integer.js new file mode 100644 index 0000000..fe2813d --- /dev/null +++ b/node_modules/es5-ext/number/to-pos-integer.js @@ -0,0 +1,9 @@ +"use strict"; + +var toInteger = require("./to-integer") + + , max = Math.max; + +module.exports = function (value) { + return max(0, toInteger(value)); +}; diff --git a/node_modules/es5-ext/number/to-uint32.js b/node_modules/es5-ext/number/to-uint32.js new file mode 100644 index 0000000..cb3590a --- /dev/null +++ b/node_modules/es5-ext/number/to-uint32.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-bitwise + return value >>> 0; +}; diff --git a/node_modules/es5-ext/object/_iterate.js b/node_modules/es5-ext/object/_iterate.js new file mode 100644 index 0000000..1f0c85f --- /dev/null +++ b/node_modules/es5-ext/object/_iterate.js @@ -0,0 +1,30 @@ +// Internal method, used by iteration functions. +// Calls a function for each key-value pair found in object +// Optionally takes compareFn to iterate object in specific order + +"use strict"; + +var callable = require("./valid-callable") + , value = require("./valid-value") + , bind = Function.prototype.bind + , call = Function.prototype.call + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (method, defVal) { + return function (obj, cb /*, thisArg, compareFn*/) { + var list, thisArg = arguments[2], compareFn = arguments[3]; + obj = Object(value(obj)); + callable(cb); + + list = keys(obj); + if (compareFn) { + list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined); + } + if (typeof method !== "function") method = list[method]; + return call.call(method, list, function (key, index) { + if (!objPropertyIsEnumerable.call(obj, key)) return defVal; + return call.call(cb, thisArg, obj[key], key, obj, index); + }); + }; +}; diff --git a/node_modules/es5-ext/object/assign-deep.js b/node_modules/es5-ext/object/assign-deep.js new file mode 100644 index 0000000..558a5ce --- /dev/null +++ b/node_modules/es5-ext/object/assign-deep.js @@ -0,0 +1,33 @@ +"use strict"; + +var includes = require("../array/#/contains") + , uniq = require("../array/#/uniq") + , objForEach = require("./for-each") + , isPlainObject = require("./is-plain-object") + , ensureValue = require("./valid-value"); + +var isArray = Array.isArray, slice = Array.prototype.slice; + +var deepAssign = function (target, source) { + if (isPlainObject(target)) { + if (!isPlainObject(source)) return source; + objForEach(source, function (value, key) { + target[key] = deepAssign(target[key], value); + }); + return target; + } + if (isArray(target)) { + if (!isArray(source)) return source; + source.forEach(function (item) { + if (!includes.call(target, item)) target.push(item); + }); + return target; + } + return source; +}; + +module.exports = function (target /*, ...objects*/) { + return uniq + .call([ensureValue(target)].concat(slice.call(arguments, 1).map(ensureValue))) + .reduce(deepAssign); +}; diff --git a/node_modules/es5-ext/object/assign/implement.js b/node_modules/es5-ext/object/assign/implement.js new file mode 100644 index 0000000..de3c92f --- /dev/null +++ b/node_modules/es5-ext/object/assign/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "assign", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/object/assign/index.js b/node_modules/es5-ext/object/assign/index.js new file mode 100644 index 0000000..1dd31e6 --- /dev/null +++ b/node_modules/es5-ext/object/assign/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Object.assign + : require("./shim"); diff --git a/node_modules/es5-ext/object/assign/is-implemented.js b/node_modules/es5-ext/object/assign/is-implemented.js new file mode 100644 index 0000000..6b90ea9 --- /dev/null +++ b/node_modules/es5-ext/object/assign/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var assign = Object.assign, obj; + if (typeof assign !== "function") return false; + obj = { foo: "raz" }; + assign(obj, { bar: "dwa" }, { trzy: "trzy" }); + return (obj.foo + obj.bar + obj.trzy) === "razdwatrzy"; +}; diff --git a/node_modules/es5-ext/object/assign/shim.js b/node_modules/es5-ext/object/assign/shim.js new file mode 100644 index 0000000..afa58f2 --- /dev/null +++ b/node_modules/es5-ext/object/assign/shim.js @@ -0,0 +1,23 @@ +"use strict"; + +var keys = require("../keys") + , value = require("../valid-value") + , max = Math.max; + +module.exports = function (dest, src /*, …srcn*/) { + var error, i, length = max(arguments.length, 2), assign; + dest = Object(value(dest)); + assign = function (key) { + try { + dest[key] = src[key]; + } catch (e) { + if (!error) error = e; + } + }; + for (i = 1; i < length; ++i) { + src = arguments[i]; + keys(src).forEach(assign); + } + if (error !== undefined) throw error; + return dest; +}; diff --git a/node_modules/es5-ext/object/clear.js b/node_modules/es5-ext/object/clear.js new file mode 100644 index 0000000..268cc5b --- /dev/null +++ b/node_modules/es5-ext/object/clear.js @@ -0,0 +1,16 @@ +"use strict"; + +var keys = require("./keys"); + +module.exports = function (obj) { + var error; + keys(obj).forEach(function (key) { + try { + delete this[key]; + } catch (e) { + if (!error) error = e; + } + }, obj); + if (error !== undefined) throw error; + return obj; +}; diff --git a/node_modules/es5-ext/object/compact.js b/node_modules/es5-ext/object/compact.js new file mode 100644 index 0000000..9943aed --- /dev/null +++ b/node_modules/es5-ext/object/compact.js @@ -0,0 +1,10 @@ +"use strict"; + +var filter = require("./filter") + , isValue = require("./is-value"); + +module.exports = function (obj) { + return filter(obj, function (val) { + return isValue(val); + }); +}; diff --git a/node_modules/es5-ext/object/compare.js b/node_modules/es5-ext/object/compare.js new file mode 100644 index 0000000..8d07858 --- /dev/null +++ b/node_modules/es5-ext/object/compare.js @@ -0,0 +1,45 @@ +"use strict"; + +var strCompare = require("../string/#/case-insensitive-compare") + , isObject = require("./is-object") + , isValue = require("./is-value") + , numIsNaN = require("../number/is-nan") + , resolve + , typeMap; + +typeMap = { + undefined: 0, + object: 1, + boolean: 2, + string: 3, + number: 4 +}; + +resolve = function (a) { + if (isObject(a)) { + if (typeof a.valueOf !== "function") return NaN; + a = a.valueOf(); + if (isObject(a)) { + if (typeof a.toString !== "function") return NaN; + a = a.toString(); + if (typeof a !== "string") return NaN; + } + } + return a; +}; + +module.exports = function (val1, val2) { + if (val1 === val2) return 0; // Same + + val1 = resolve(val1); + val2 = resolve(val2); + // eslint-disable-next-line eqeqeq + if (val1 == val2) return typeMap[typeof val1] - typeMap[typeof val2]; + if (!isValue(val1)) return -1; + if (!isValue(val2)) return 1; + if (typeof val1 === "string" || typeof val2 === "string") { + return strCompare.call(val1, val2); + } + if (numIsNaN(val1) && numIsNaN(val2)) return 0; // Jslint: ignore + return Number(val1) - Number(val2); +}; diff --git a/node_modules/es5-ext/object/copy-deep.js b/node_modules/es5-ext/object/copy-deep.js new file mode 100644 index 0000000..39f9a1d --- /dev/null +++ b/node_modules/es5-ext/object/copy-deep.js @@ -0,0 +1,37 @@ +"use strict"; + +var forEach = require("./for-each") + , isPlainObject = require("./is-plain-object") + , ensureValue = require("./valid-value") + , isArray = Array.isArray; + +var copyValue = function (value, ancestors, ancestorsCopy) { + var mode; + if (isPlainObject(value)) mode = "object"; + else if (isArray(value)) mode = "array"; + if (!mode) return value; + + var copy = ancestorsCopy[ancestors.indexOf(value)]; + if (copy) return copy; + copy = mode === "object" ? {} : []; + + ancestors.push(value); + ancestorsCopy.push(copy); + if (mode === "object") { + forEach(value, function (item, key) { + copy[key] = copyValue(item, ancestors, ancestorsCopy); + }); + } else { + value.forEach(function (item, index) { + copy[index] = copyValue(item, ancestors, ancestorsCopy); + }); + } + ancestors.pop(); + ancestorsCopy.pop(); + + return copy; +}; + +module.exports = function (source) { + return copyValue(ensureValue(source), [], []); +}; diff --git a/node_modules/es5-ext/object/copy.js b/node_modules/es5-ext/object/copy.js new file mode 100644 index 0000000..5368e42 --- /dev/null +++ b/node_modules/es5-ext/object/copy.js @@ -0,0 +1,19 @@ +"use strict"; + +var aFrom = require("../array/from") + , assign = require("./assign") + , value = require("./valid-value"); + +module.exports = function (obj/*, propertyNames, options*/) { + var copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]); + if (copy !== obj && !propertyNames) return copy; + var result = {}; + if (propertyNames) { + aFrom(propertyNames, function (propertyName) { + if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName]; + }); + } else { + assign(result, obj); + } + return result; +}; diff --git a/node_modules/es5-ext/object/count.js b/node_modules/es5-ext/object/count.js new file mode 100644 index 0000000..8a2a71e --- /dev/null +++ b/node_modules/es5-ext/object/count.js @@ -0,0 +1,7 @@ +"use strict"; + +var keys = require("./keys"); + +module.exports = function (obj) { + return keys(obj).length; +}; diff --git a/node_modules/es5-ext/object/create.js b/node_modules/es5-ext/object/create.js new file mode 100644 index 0000000..9e3e6e8 --- /dev/null +++ b/node_modules/es5-ext/object/create.js @@ -0,0 +1,48 @@ +// Workaround for http://code.google.com/p/v8/issues/detail?id=2804 + +"use strict"; + +var create = Object.create, shim; + +if (!require("./set-prototype-of/is-implemented")()) { + shim = require("./set-prototype-of/shim"); +} + +module.exports = (function () { + var nullObject, polyProps, desc; + if (!shim) return create; + if (shim.level !== 1) return create; + + nullObject = {}; + polyProps = {}; + desc = { + configurable: false, + enumerable: false, + writable: true, + value: undefined + }; + Object.getOwnPropertyNames(Object.prototype).forEach(function (name) { + if (name === "__proto__") { + polyProps[name] = { + configurable: true, + enumerable: false, + writable: true, + value: undefined + }; + return; + } + polyProps[name] = desc; + }); + Object.defineProperties(nullObject, polyProps); + + Object.defineProperty(shim, "nullPolyfill", { + configurable: false, + enumerable: false, + writable: false, + value: nullObject + }); + + return function (prototype, props) { + return create(prototype === null ? nullObject : prototype, props); + }; +}()); diff --git a/node_modules/es5-ext/object/ensure-array.js b/node_modules/es5-ext/object/ensure-array.js new file mode 100644 index 0000000..5ca7a94 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-array.js @@ -0,0 +1,9 @@ +"use strict"; + +var toShortString = require("../to-short-string-representation") + , isArray = require("./is-array-like"); + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(toShortString(value) + " is not a array"); +}; diff --git a/node_modules/es5-ext/object/ensure-finite-number.js b/node_modules/es5-ext/object/ensure-finite-number.js new file mode 100644 index 0000000..4f6e4b4 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-finite-number.js @@ -0,0 +1,9 @@ +"use strict"; + +var isFiniteNumber = require("./is-finite-number") + , safeToString = require("../safe-to-string"); + +module.exports = function (value) { + if (isFiniteNumber(value)) return Number(value); + throw new TypeError(safeToString(value) + " does not represent a finite number value"); +}; diff --git a/node_modules/es5-ext/object/ensure-natural-number-value.js b/node_modules/es5-ext/object/ensure-natural-number-value.js new file mode 100644 index 0000000..1a901aa --- /dev/null +++ b/node_modules/es5-ext/object/ensure-natural-number-value.js @@ -0,0 +1,10 @@ +"use strict"; + +var isNaturalValue = require("./is-natural-number-value") + , toShortString = require("../to-short-string-representation"); + +module.exports = function (arg) { + var num = Number(arg); + if (!isNaturalValue(arg)) throw new TypeError(toShortString(arg) + " is not a natural number"); + return num; +}; diff --git a/node_modules/es5-ext/object/ensure-natural-number.js b/node_modules/es5-ext/object/ensure-natural-number.js new file mode 100644 index 0000000..ec7e514 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-natural-number.js @@ -0,0 +1,10 @@ +"use strict"; + +var isNatural = require("../number/is-natural") + , toShortString = require("../to-short-string-representation"); + +module.exports = function (arg) { + var num = Number(arg); + if (!isNatural(num)) throw new TypeError(toShortString(arg) + " is not a natural number"); + return num; +}; diff --git a/node_modules/es5-ext/object/ensure-promise.js b/node_modules/es5-ext/object/ensure-promise.js new file mode 100644 index 0000000..0a1119c --- /dev/null +++ b/node_modules/es5-ext/object/ensure-promise.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPromise = require("./is-promise"); + +module.exports = function (value) { + if (!isPromise(value)) throw new TypeError(safeToString(value) + " is not a thenable"); + return value; +}; diff --git a/node_modules/es5-ext/object/eq.js b/node_modules/es5-ext/object/eq.js new file mode 100644 index 0000000..0312468 --- /dev/null +++ b/node_modules/es5-ext/object/eq.js @@ -0,0 +1,7 @@ +"use strict"; + +var numIsNaN = require("../number/is-nan"); + +module.exports = function (val1, val2) { + return val1 === val2 || (numIsNaN(val1) && numIsNaN(val2)); +}; diff --git a/node_modules/es5-ext/object/every.js b/node_modules/es5-ext/object/every.js new file mode 100644 index 0000000..892b548 --- /dev/null +++ b/node_modules/es5-ext/object/every.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("every", true); diff --git a/node_modules/es5-ext/object/filter.js b/node_modules/es5-ext/object/filter.js new file mode 100644 index 0000000..c7dd969 --- /dev/null +++ b/node_modules/es5-ext/object/filter.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + if (call.call(cb, thisArg, value, key, targetObj, index)) result[key] = targetObj[key]; + }); + return result; +}; diff --git a/node_modules/es5-ext/object/find-key.js b/node_modules/es5-ext/object/find-key.js new file mode 100644 index 0000000..6da6ba6 --- /dev/null +++ b/node_modules/es5-ext/object/find-key.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")(require("../array/#/find"), false); diff --git a/node_modules/es5-ext/object/find.js b/node_modules/es5-ext/object/find.js new file mode 100644 index 0000000..5960421 --- /dev/null +++ b/node_modules/es5-ext/object/find.js @@ -0,0 +1,10 @@ +"use strict"; + +var findKey = require("./find-key") + , isValue = require("./is-value"); + +// eslint-disable-next-line no-unused-vars +module.exports = function (obj, cb /*, thisArg, compareFn*/) { + var key = findKey.apply(this, arguments); + return isValue(key) ? obj[key] : key; +}; diff --git a/node_modules/es5-ext/object/first-key.js b/node_modules/es5-ext/object/first-key.js new file mode 100644 index 0000000..3666de5 --- /dev/null +++ b/node_modules/es5-ext/object/first-key.js @@ -0,0 +1,13 @@ +"use strict"; + +var value = require("./valid-value") + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + if (objPropertyIsEnumerable.call(obj, i)) return i; + } + return null; +}; diff --git a/node_modules/es5-ext/object/flatten.js b/node_modules/es5-ext/object/flatten.js new file mode 100644 index 0000000..34e1ab0 --- /dev/null +++ b/node_modules/es5-ext/object/flatten.js @@ -0,0 +1,17 @@ +"use strict"; + +var isPlainObject = require("./is-plain-object") + , forEach = require("./for-each") + + , process; + +process = function self(value, key) { + if (isPlainObject(value)) forEach(value, self, this); + else this[key] = value; +}; + +module.exports = function (obj) { + var flattened = {}; + forEach(obj, process, flattened); + return flattened; +}; diff --git a/node_modules/es5-ext/object/for-each.js b/node_modules/es5-ext/object/for-each.js new file mode 100644 index 0000000..d282956 --- /dev/null +++ b/node_modules/es5-ext/object/for-each.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("forEach"); diff --git a/node_modules/es5-ext/object/get-property-names.js b/node_modules/es5-ext/object/get-property-names.js new file mode 100644 index 0000000..7dfef27 --- /dev/null +++ b/node_modules/es5-ext/object/get-property-names.js @@ -0,0 +1,17 @@ +"use strict"; + +var uniq = require("../array/#/uniq") + , value = require("./valid-value") + , push = Array.prototype.push + , getOwnPropertyNames = Object.getOwnPropertyNames + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var keys; + obj = Object(value(obj)); + keys = getOwnPropertyNames(obj); + while ((obj = getPrototypeOf(obj))) { + push.apply(keys, getOwnPropertyNames(obj)); + } + return uniq.call(keys); +}; diff --git a/node_modules/es5-ext/object/index.js b/node_modules/es5-ext/object/index.js new file mode 100644 index 0000000..a69a568 --- /dev/null +++ b/node_modules/es5-ext/object/index.js @@ -0,0 +1,63 @@ +"use strict"; + +module.exports = { + assign: require("./assign"), + assignDeep: require("./assign-deep"), + clear: require("./clear"), + compact: require("./compact"), + compare: require("./compare"), + copy: require("./copy"), + copyDeep: require("./copy-deep"), + count: require("./count"), + create: require("./create"), + ensureArray: require("./ensure-array"), + ensureFiniteNumber: require("./ensure-finite-number"), + ensureNaturalNumber: require("./ensure-natural-number"), + ensureNaturalNumberValue: require("./ensure-natural-number-value"), + ensurePromise: require("./ensure-promise"), + eq: require("./eq"), + every: require("./every"), + filter: require("./filter"), + find: require("./find"), + findKey: require("./find-key"), + firstKey: require("./first-key"), + flatten: require("./flatten"), + forEach: require("./for-each"), + getPropertyNames: require("./get-property-names"), + is: require("./is"), + isArrayLike: require("./is-array-like"), + isCallable: require("./is-callable"), + isCopy: require("./is-copy"), + isCopyDeep: require("./is-copy-deep"), + isEmpty: require("./is-empty"), + isFiniteNumber: require("./is-finite-number"), + isNaturalNumber: require("./is-natural-number"), + isNaturalNumberValue: require("./is-natural-number-value"), + isNumberValue: require("./is-number-value"), + isObject: require("./is-object"), + isPlainFunction: require("./is-plain-function"), + isPlainObject: require("./is-plain-object"), + isPromise: require("./is-promise"), + isValue: require("./is-value"), + keyOf: require("./key-of"), + keys: require("./keys"), + map: require("./map"), + mapKeys: require("./map-keys"), + normalizeOptions: require("./normalize-options"), + mixin: require("./mixin"), + mixinPrototypes: require("./mixin-prototypes"), + primitiveSet: require("./primitive-set"), + safeTraverse: require("./safe-traverse"), + serialize: require("./serialize"), + setPrototypeOf: require("./set-prototype-of"), + some: require("./some"), + toArray: require("./to-array"), + unserialize: require("./unserialize"), + validateArrayLike: require("./validate-array-like"), + validateArrayLikeObject: require("./validate-array-like-object"), + validCallable: require("./valid-callable"), + validObject: require("./valid-object"), + validateStringifiable: require("./validate-stringifiable"), + validateStringifiableValue: require("./validate-stringifiable-value"), + validValue: require("./valid-value") +}; diff --git a/node_modules/es5-ext/object/is-array-like.js b/node_modules/es5-ext/object/is-array-like.js new file mode 100644 index 0000000..fcb9115 --- /dev/null +++ b/node_modules/es5-ext/object/is-array-like.js @@ -0,0 +1,17 @@ +"use strict"; + +var isFunction = require("../function/is-function") + , isObject = require("./is-object") + , isValue = require("./is-value"); + +module.exports = function (value) { + return ( + (isValue(value) && + typeof value.length === "number" && + // Just checking ((typeof x === 'object') && (typeof x !== 'function')) + // won't work right for some cases, e.g.: + // type of instance of NodeList in Safari is a 'function' + ((isObject(value) && !isFunction(value)) || typeof value === "string")) || + false + ); +}; diff --git a/node_modules/es5-ext/object/is-callable.js b/node_modules/es5-ext/object/is-callable.js new file mode 100644 index 0000000..c55915b --- /dev/null +++ b/node_modules/es5-ext/object/is-callable.js @@ -0,0 +1,7 @@ +// Deprecated + +"use strict"; + +module.exports = function (obj) { + return typeof obj === "function"; +}; diff --git a/node_modules/es5-ext/object/is-copy-deep.js b/node_modules/es5-ext/object/is-copy-deep.js new file mode 100644 index 0000000..a1206ae --- /dev/null +++ b/node_modules/es5-ext/object/is-copy-deep.js @@ -0,0 +1,59 @@ +"use strict"; + +var eq = require("./eq") + , isPlainObject = require("./is-plain-object") + , value = require("./valid-value"); + +var isArray = Array.isArray + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable + , objHasOwnProperty = Object.prototype.hasOwnProperty + , eqArr + , eqVal + , eqObj; + +eqArr = function (arr1, arr2, recMap) { + var i, length = arr1.length; + if (length !== arr2.length) return false; + for (i = 0; i < length; ++i) { + if (objHasOwnProperty.call(arr1, i) !== objHasOwnProperty.call(arr2, i)) return false; + if (!eqVal(arr1[i], arr2[i], recMap)) return false; + } + return true; +}; + +eqObj = function (obj1, obj2, recMap) { + var k1 = keys(obj1), k2 = keys(obj2); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!objPropertyIsEnumerable.call(obj2, key)) return false; + return eqVal(obj1[key], obj2[key], recMap); + }); +}; + +eqVal = function (val1, val2, recMap) { + var i, eqX, c1, c2; + if (eq(val1, val2)) return true; + if (isPlainObject(val1)) { + if (!isPlainObject(val2)) return false; + eqX = eqObj; + } else if (isArray(val1) && isArray(val2)) { + eqX = eqArr; + } else { + return false; + } + c1 = recMap[0]; + c2 = recMap[1]; + i = c1.indexOf(val1); + if (i === -1) { + i = c1.push(val1) - 1; + c2[i] = []; + } else if (c2[i].indexOf(val2) !== -1) return true; + c2[i].push(val2); + return eqX(val1, val2, recMap); +}; + +module.exports = function (val1, val2) { + if (eq(value(val1), value(val2))) return true; + return eqVal(Object(val1), Object(val2), [[], []]); +}; diff --git a/node_modules/es5-ext/object/is-copy.js b/node_modules/es5-ext/object/is-copy.js new file mode 100644 index 0000000..8c6ae5e --- /dev/null +++ b/node_modules/es5-ext/object/is-copy.js @@ -0,0 +1,23 @@ +"use strict"; + +var eq = require("./eq") + , value = require("./valid-value") + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (val1, val2) { + var k1, k2; + + if (eq(value(val1), value(val2))) return true; + + val1 = Object(val1); + val2 = Object(val2); + + k1 = keys(val1); + k2 = keys(val2); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!objPropertyIsEnumerable.call(val2, key)) return false; + return eq(val1[key], val2[key]); + }); +}; diff --git a/node_modules/es5-ext/object/is-empty.js b/node_modules/es5-ext/object/is-empty.js new file mode 100644 index 0000000..dbc52d0 --- /dev/null +++ b/node_modules/es5-ext/object/is-empty.js @@ -0,0 +1,14 @@ +"use strict"; + +var value = require("./valid-value") + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + // Jslint: ignore + if (objPropertyIsEnumerable.call(obj, i)) return false; + } + return true; +}; diff --git a/node_modules/es5-ext/object/is-finite-number.js b/node_modules/es5-ext/object/is-finite-number.js new file mode 100644 index 0000000..78ed669 --- /dev/null +++ b/node_modules/es5-ext/object/is-finite-number.js @@ -0,0 +1,7 @@ +"use strict"; + +var isNumber = require("./is-number-value"); + +module.exports = function (value) { + return isNumber(value) && isFinite(value); +}; diff --git a/node_modules/es5-ext/object/is-natural-number-value.js b/node_modules/es5-ext/object/is-natural-number-value.js new file mode 100644 index 0000000..c744521 --- /dev/null +++ b/node_modules/es5-ext/object/is-natural-number-value.js @@ -0,0 +1,9 @@ +"use strict"; + +var isNaturalNumber = require("./is-natural-number") + , isValue = require("./is-value"); + +module.exports = function (arg) { + if (!isValue(arg)) return false; + return isNaturalNumber(arg); +}; diff --git a/node_modules/es5-ext/object/is-natural-number.js b/node_modules/es5-ext/object/is-natural-number.js new file mode 100644 index 0000000..37d7458 --- /dev/null +++ b/node_modules/es5-ext/object/is-natural-number.js @@ -0,0 +1,7 @@ +"use strict"; + +var isNatural = require("../number/is-natural"); + +module.exports = function (arg) { + return isNatural(Number(arg)); +}; diff --git a/node_modules/es5-ext/object/is-number-value.js b/node_modules/es5-ext/object/is-number-value.js new file mode 100644 index 0000000..e915276 --- /dev/null +++ b/node_modules/es5-ext/object/is-number-value.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("./is-value"); + +module.exports = function (value) { + if (!isValue(value)) return false; + try { + return !isNaN(value); + } catch (e) { + return false; + } +}; diff --git a/node_modules/es5-ext/object/is-object.js b/node_modules/es5-ext/object/is-object.js new file mode 100644 index 0000000..846ae21 --- /dev/null +++ b/node_modules/es5-ext/object/is-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isValue = require("./is-value"); + +var map = { function: true, object: true }; + +module.exports = function (value) { + return (isValue(value) && map[typeof value]) || false; +}; diff --git a/node_modules/es5-ext/object/is-plain-function.js b/node_modules/es5-ext/object/is-plain-function.js new file mode 100644 index 0000000..a2f3234 --- /dev/null +++ b/node_modules/es5-ext/object/is-plain-function.js @@ -0,0 +1,11 @@ +"use strict"; + +var isClassStr = RegExp.prototype.test.bind(/^\s*class[\s{/}]/) + , fnToString = Function.prototype.toString; + +module.exports = function (fn) { + if (typeof fn !== "function") return false; + if (typeof fn.call !== "function") return false; + if (typeof fn.apply !== "function") return false; + return !isClassStr(fnToString.call(fn)); +}; diff --git a/node_modules/es5-ext/object/is-plain-object.js b/node_modules/es5-ext/object/is-plain-object.js new file mode 100644 index 0000000..ff15328 --- /dev/null +++ b/node_modules/es5-ext/object/is-plain-object.js @@ -0,0 +1,20 @@ +"use strict"; + +var getPrototypeOf = Object.getPrototypeOf + , prototype = Object.prototype + , objToString = prototype.toString + , id = Object().toString(); + +module.exports = function (value) { + var proto, valueConstructor; + if (!value || typeof value !== "object" || objToString.call(value) !== id) { + return false; + } + proto = getPrototypeOf(value); + if (proto === null) { + valueConstructor = value.constructor; + if (typeof valueConstructor !== "function") return true; + return valueConstructor.prototype !== value; + } + return proto === prototype || getPrototypeOf(proto) === null; +}; diff --git a/node_modules/es5-ext/object/is-promise.js b/node_modules/es5-ext/object/is-promise.js new file mode 100644 index 0000000..3e5d20d --- /dev/null +++ b/node_modules/es5-ext/object/is-promise.js @@ -0,0 +1,8 @@ +"use strict"; + +var isCallable = require("./is-callable") + , isObject = require("./is-object"); + +module.exports = function (value) { + return isObject(value) && isCallable(value.then); +}; diff --git a/node_modules/es5-ext/object/is-value.js b/node_modules/es5-ext/object/is-value.js new file mode 100644 index 0000000..82af8f3 --- /dev/null +++ b/node_modules/es5-ext/object/is-value.js @@ -0,0 +1,7 @@ +"use strict"; + +var _undefined = require("../function/noop")(); // Support ES3 engines + +module.exports = function (val) { + return (val !== _undefined) && (val !== null); +}; diff --git a/node_modules/es5-ext/object/is.js b/node_modules/es5-ext/object/is.js new file mode 100644 index 0000000..54baade --- /dev/null +++ b/node_modules/es5-ext/object/is.js @@ -0,0 +1,10 @@ +// Implementation credits go to: +// http://wiki.ecmascript.org/doku.php?id=harmony:egal + +"use strict"; + +var numIsNaN = require("../number/is-nan"); + +module.exports = function (val1, val2) { + return val1 === val2 ? val1 !== 0 || 1 / val1 === 1 / val2 : numIsNaN(val1) && numIsNaN(val2); +}; diff --git a/node_modules/es5-ext/object/key-of.js b/node_modules/es5-ext/object/key-of.js new file mode 100644 index 0000000..dc640e4 --- /dev/null +++ b/node_modules/es5-ext/object/key-of.js @@ -0,0 +1,17 @@ +"use strict"; + +var eq = require("./eq") + , some = require("./some"); + +module.exports = function (obj, searchValue) { + var result; + return some(obj, function (value, name) { + if (eq(value, searchValue)) { + result = name; + return true; + } + return false; + }) + ? result + : null; +}; diff --git a/node_modules/es5-ext/object/keys/implement.js b/node_modules/es5-ext/object/keys/implement.js new file mode 100644 index 0000000..7119a70 --- /dev/null +++ b/node_modules/es5-ext/object/keys/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "keys", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/object/keys/index.js b/node_modules/es5-ext/object/keys/index.js new file mode 100644 index 0000000..b56b534 --- /dev/null +++ b/node_modules/es5-ext/object/keys/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Object.keys + : require("./shim"); diff --git a/node_modules/es5-ext/object/keys/is-implemented.js b/node_modules/es5-ext/object/keys/is-implemented.js new file mode 100644 index 0000000..7abd33a --- /dev/null +++ b/node_modules/es5-ext/object/keys/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + try { + Object.keys("primitive"); + return true; + } catch (e) { + return false; +} +}; diff --git a/node_modules/es5-ext/object/keys/shim.js b/node_modules/es5-ext/object/keys/shim.js new file mode 100644 index 0000000..bc80201 --- /dev/null +++ b/node_modules/es5-ext/object/keys/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +var isValue = require("../is-value"); + +var keys = Object.keys; + +module.exports = function (object) { + return keys(isValue(object) ? Object(object) : object); +}; diff --git a/node_modules/es5-ext/object/map-keys.js b/node_modules/es5-ext/object/map-keys.js new file mode 100644 index 0000000..72dada0 --- /dev/null +++ b/node_modules/es5-ext/object/map-keys.js @@ -0,0 +1,18 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach( + obj, + function (value, key, targetObj, index) { + result[call.call(cb, thisArg, key, value, this, index)] = value; + }, + obj + ); + return result; +}; diff --git a/node_modules/es5-ext/object/map.js b/node_modules/es5-ext/object/map.js new file mode 100644 index 0000000..7b718db --- /dev/null +++ b/node_modules/es5-ext/object/map.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + result[key] = call.call(cb, thisArg, value, key, targetObj, index); + }); + return result; +}; diff --git a/node_modules/es5-ext/object/mixin-prototypes.js b/node_modules/es5-ext/object/mixin-prototypes.js new file mode 100644 index 0000000..9094aef --- /dev/null +++ b/node_modules/es5-ext/object/mixin-prototypes.js @@ -0,0 +1,37 @@ +"use strict"; + +var value = require("./valid-value") + , mixin = require("./mixin") + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getOwnPropertyNames = Object.getOwnPropertyNames + , getPrototypeOf = Object.getPrototypeOf + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (target, source) { + var error, end, define; + target = Object(value(target)); + source = Object(value(source)); + end = getPrototypeOf(target); + if (source === end) return target; + try { + mixin(target, source); + } catch (e) { + error = e; + } + source = getPrototypeOf(source); + define = function (name) { + if (objHasOwnProperty.call(target, name)) return; + try { + defineProperty(target, name, getOwnPropertyDescriptor(source, name)); + } catch (e) { + error = e; + } + }; + while (source && source !== end) { + getOwnPropertyNames(source).forEach(define); + source = getPrototypeOf(source); + } + if (error) throw error; + return target; +}; diff --git a/node_modules/es5-ext/object/mixin.js b/node_modules/es5-ext/object/mixin.js new file mode 100644 index 0000000..4da7cd5 --- /dev/null +++ b/node_modules/es5-ext/object/mixin.js @@ -0,0 +1,31 @@ +"use strict"; + +var value = require("./valid-value") + + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getOwnPropertyNames = Object.getOwnPropertyNames + , getOwnPropertySymbols = Object.getOwnPropertySymbols; + +module.exports = function (target, source) { + var error, sourceObject = Object(value(source)); + target = Object(value(target)); + getOwnPropertyNames(sourceObject).forEach(function (name) { + try { + defineProperty(target, name, getOwnPropertyDescriptor(source, name)); + } catch (e) { + error = e; +} + }); + if (typeof getOwnPropertySymbols === "function") { + getOwnPropertySymbols(sourceObject).forEach(function (symbol) { + try { + defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol)); + } catch (e) { + error = e; +} + }); + } + if (error !== undefined) throw error; + return target; +}; diff --git a/node_modules/es5-ext/object/normalize-options.js b/node_modules/es5-ext/object/normalize-options.js new file mode 100644 index 0000000..6c394fe --- /dev/null +++ b/node_modules/es5-ext/object/normalize-options.js @@ -0,0 +1,20 @@ +"use strict"; + +var isValue = require("./is-value"); + +var forEach = Array.prototype.forEach, create = Object.create; + +var process = function (src, obj) { + var key; + for (key in src) obj[key] = src[key]; +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (opts1 /*, …options*/) { + var result = create(null); + forEach.call(arguments, function (options) { + if (!isValue(options)) return; + process(Object(options), result); + }); + return result; +}; diff --git a/node_modules/es5-ext/object/primitive-set.js b/node_modules/es5-ext/object/primitive-set.js new file mode 100644 index 0000000..235eaa7 --- /dev/null +++ b/node_modules/es5-ext/object/primitive-set.js @@ -0,0 +1,12 @@ +"use strict"; + +var forEach = Array.prototype.forEach, create = Object.create; + +// eslint-disable-next-line no-unused-vars +module.exports = function (arg /*, …args*/) { + var set = create(null); + forEach.call(arguments, function (name) { + set[name] = true; + }); + return set; +}; diff --git a/node_modules/es5-ext/object/safe-traverse.js b/node_modules/es5-ext/object/safe-traverse.js new file mode 100644 index 0000000..7b72d55 --- /dev/null +++ b/node_modules/es5-ext/object/safe-traverse.js @@ -0,0 +1,16 @@ +"use strict"; + +var value = require("./valid-value") + , isValue = require("./is-value"); + +module.exports = function (obj /*, …names*/) { + var length, current = 1; + value(obj); + length = arguments.length - 1; + if (!length) return obj; + while (current < length) { + obj = obj[arguments[current++]]; + if (!isValue(obj)) return undefined; + } + return obj[arguments[current]]; +}; diff --git a/node_modules/es5-ext/object/serialize.js b/node_modules/es5-ext/object/serialize.js new file mode 100644 index 0000000..4be9aeb --- /dev/null +++ b/node_modules/es5-ext/object/serialize.js @@ -0,0 +1,41 @@ +"use strict"; + +var toArray = require("./to-array") + , isDate = require("../date/is-date") + , isValue = require("../object/is-value") + , isRegExp = require("../reg-exp/is-reg-exp"); + +var isArray = Array.isArray + , stringify = JSON.stringify + , objHasOwnProperty = Object.prototype.hasOwnProperty; +var keyValueToString = function (value, key) { + return stringify(key) + ":" + exports(value); +}; + +var sparseMap = function (arr) { + var i, length = arr.length, result = new Array(length); + for (i = 0; i < length; ++i) { + if (!objHasOwnProperty.call(arr, i)) continue; + result[i] = exports(arr[i]); + } + return result; +}; + +module.exports = exports = function (obj) { + if (!isValue(obj)) return String(obj); + switch (typeof obj) { + case "string": + return stringify(obj); + case "number": + case "boolean": + case "function": + return String(obj); + case "object": + if (isArray(obj)) return "[" + sparseMap(obj) + "]"; + if (isRegExp(obj)) return String(obj); + if (isDate(obj)) return "new Date(" + obj.valueOf() + ")"; + return "{" + toArray(obj, keyValueToString) + "}"; + default: + throw new TypeError("Serialization of " + String(obj) + "is unsupported"); + } +}; diff --git a/node_modules/es5-ext/object/set-prototype-of/implement.js b/node_modules/es5-ext/object/set-prototype-of/implement.js new file mode 100644 index 0000000..1b91aeb --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +var shim; + +if (!require("./is-implemented")() && (shim = require("./shim"))) { + Object.defineProperty(Object, "setPrototypeOf", + { value: shim, configurable: true, enumerable: false, writable: true }); +} diff --git a/node_modules/es5-ext/object/set-prototype-of/index.js b/node_modules/es5-ext/object/set-prototype-of/index.js new file mode 100644 index 0000000..e035173 --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Object.setPrototypeOf + : require("./shim"); diff --git a/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/node_modules/es5-ext/object/set-prototype-of/is-implemented.js new file mode 100644 index 0000000..1a00627 --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {}; + +module.exports = function (/* CustomCreate*/) { + var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create; + if (typeof setPrototypeOf !== "function") return false; + return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject; +}; diff --git a/node_modules/es5-ext/object/set-prototype-of/shim.js b/node_modules/es5-ext/object/set-prototype-of/shim.js new file mode 100644 index 0000000..bc21784 --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/shim.js @@ -0,0 +1,86 @@ +/* eslint no-proto: "off" */ + +// Big thanks to @WebReflection for sorting this out +// https://gist.github.com/WebReflection/5593554 + +"use strict"; + +var isObject = require("../is-object") + , value = require("../valid-value") + , objIsPrototypeOf = Object.prototype.isPrototypeOf + , defineProperty = Object.defineProperty + , nullDesc = { + configurable: true, + enumerable: false, + writable: true, + value: undefined +} + , validate; + +validate = function (obj, prototype) { + value(obj); + if (prototype === null || isObject(prototype)) return obj; + throw new TypeError("Prototype must be null or an object"); +}; + +module.exports = (function (status) { + var fn, set; + if (!status) return null; + if (status.level === 2) { + if (status.set) { + set = status.set; + fn = function (obj, prototype) { + set.call(validate(obj, prototype), prototype); + return obj; + }; + } else { + fn = function (obj, prototype) { + validate(obj, prototype).__proto__ = prototype; + return obj; + }; + } + } else { + fn = function self(obj, prototype) { + var isNullBase; + validate(obj, prototype); + isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj); + if (isNullBase) delete self.nullPolyfill.__proto__; + if (prototype === null) prototype = self.nullPolyfill; + obj.__proto__ = prototype; + if (isNullBase) defineProperty(self.nullPolyfill, "__proto__", nullDesc); + return obj; + }; + } + return Object.defineProperty(fn, "level", { + configurable: false, + enumerable: false, + writable: false, + value: status.level + }); +}( + (function () { + var tmpObj1 = Object.create(null) + , tmpObj2 = {} + , set + , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__"); + + if (desc) { + try { + set = desc.set; // Opera crashes at this point + set.call(tmpObj1, tmpObj2); + } catch (ignore) {} + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 }; + } + + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 }; + + tmpObj1 = {}; + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 }; + + return false; + })() +)); + +require("../create"); diff --git a/node_modules/es5-ext/object/some.js b/node_modules/es5-ext/object/some.js new file mode 100644 index 0000000..c919466 --- /dev/null +++ b/node_modules/es5-ext/object/some.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("some", false); diff --git a/node_modules/es5-ext/object/to-array.js b/node_modules/es5-ext/object/to-array.js new file mode 100644 index 0000000..6ed50a8 --- /dev/null +++ b/node_modules/es5-ext/object/to-array.js @@ -0,0 +1,24 @@ +"use strict"; + +var callable = require("./valid-callable") + , isValue = require("./is-value") + , forEach = require("./for-each") + , call = Function.prototype.call + , defaultCb = function (value, key) { + return [key, value]; +}; + +module.exports = function (obj /*, cb, thisArg, compareFn*/) { + var a = [], cb = arguments[1], thisArg = arguments[2]; + cb = isValue(cb) ? callable(cb) : defaultCb; + + forEach( + obj, + function (value, key, targetObj, index) { + a.push(call.call(cb, thisArg, value, key, this, index)); + }, + obj, + arguments[3] + ); + return a; +}; diff --git a/node_modules/es5-ext/object/unserialize.js b/node_modules/es5-ext/object/unserialize.js new file mode 100644 index 0000000..7574514 --- /dev/null +++ b/node_modules/es5-ext/object/unserialize.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("./valid-value"); + +module.exports = exports = function (code) { + // eslint-disable-next-line no-new-func + return new Function("return " + value(code))(); +}; diff --git a/node_modules/es5-ext/object/valid-callable.js b/node_modules/es5-ext/object/valid-callable.js new file mode 100644 index 0000000..a97fb3e --- /dev/null +++ b/node_modules/es5-ext/object/valid-callable.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (fn) { + if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); + return fn; +}; diff --git a/node_modules/es5-ext/object/valid-object.js b/node_modules/es5-ext/object/valid-object.js new file mode 100644 index 0000000..74b5e5f --- /dev/null +++ b/node_modules/es5-ext/object/valid-object.js @@ -0,0 +1,8 @@ +"use strict"; + +var isObject = require("./is-object"); + +module.exports = function (value) { + if (!isObject(value)) throw new TypeError(value + " is not an Object"); + return value; +}; diff --git a/node_modules/es5-ext/object/valid-value.js b/node_modules/es5-ext/object/valid-value.js new file mode 100644 index 0000000..d0ced8a --- /dev/null +++ b/node_modules/es5-ext/object/valid-value.js @@ -0,0 +1,8 @@ +"use strict"; + +var isValue = require("./is-value"); + +module.exports = function (value) { + if (!isValue(value)) throw new TypeError("Cannot use null or undefined"); + return value; +}; diff --git a/node_modules/es5-ext/object/validate-array-like-object.js b/node_modules/es5-ext/object/validate-array-like-object.js new file mode 100644 index 0000000..d7c45b3 --- /dev/null +++ b/node_modules/es5-ext/object/validate-array-like-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isArrayLike = require("./is-array-like") + , isObject = require("./is-object"); + +module.exports = function (obj) { + if (isObject(obj) && isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like object"); +}; diff --git a/node_modules/es5-ext/object/validate-array-like.js b/node_modules/es5-ext/object/validate-array-like.js new file mode 100644 index 0000000..07aa794 --- /dev/null +++ b/node_modules/es5-ext/object/validate-array-like.js @@ -0,0 +1,8 @@ +"use strict"; + +var isArrayLike = require("./is-array-like"); + +module.exports = function (obj) { + if (isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like value"); +}; diff --git a/node_modules/es5-ext/object/validate-stringifiable-value.js b/node_modules/es5-ext/object/validate-stringifiable-value.js new file mode 100644 index 0000000..5f47042 --- /dev/null +++ b/node_modules/es5-ext/object/validate-stringifiable-value.js @@ -0,0 +1,8 @@ +"use strict"; + +var ensureValue = require("./valid-value") + , stringifiable = require("./validate-stringifiable"); + +module.exports = function (value) { + return stringifiable(ensureValue(value)); +}; diff --git a/node_modules/es5-ext/object/validate-stringifiable.js b/node_modules/es5-ext/object/validate-stringifiable.js new file mode 100644 index 0000000..2b1f127 --- /dev/null +++ b/node_modules/es5-ext/object/validate-stringifiable.js @@ -0,0 +1,12 @@ +"use strict"; + +var isCallable = require("./is-callable"); + +module.exports = function (stringifiable) { + try { + if (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString(); + return String(stringifiable); + } catch (e) { + throw new TypeError("Passed argument cannot be stringifed"); + } +}; diff --git a/node_modules/es5-ext/optional-chaining.js b/node_modules/es5-ext/optional-chaining.js new file mode 100644 index 0000000..f181127 --- /dev/null +++ b/node_modules/es5-ext/optional-chaining.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("./object/is-value"); + +var slice = Array.prototype.slice; + +// eslint-disable-next-line no-unused-vars +module.exports = function (value, propertyName1 /*, …propertyNamen*/) { + var propertyNames = slice.call(arguments, 1), index = 0, length = propertyNames.length; + while (isValue(value) && index < length) value = value[propertyNames[index++]]; + return index === length ? value : undefined; +}; diff --git a/node_modules/es5-ext/package.json b/node_modules/es5-ext/package.json new file mode 100644 index 0000000..3343df2 --- /dev/null +++ b/node_modules/es5-ext/package.json @@ -0,0 +1,90 @@ +{ + "_from": "es5-ext@^0.10.12", + "_id": "es5-ext@0.10.39", + "_inBundle": false, + "_integrity": "sha512-AlaXZhPHl0po/uxMx1tyrlt1O86M6D5iVaDH8UgLfgek4kXTX6vzsRfJQWC2Ku+aG8pkw1XWzh9eTkwfVrsD5g==", + "_location": "/es5-ext", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "es5-ext@^0.10.12", + "name": "es5-ext", + "escapedName": "es5-ext", + "rawSpec": "^0.10.12", + "saveSpec": null, + "fetchSpec": "^0.10.12" + }, + "_requiredBy": [ + "/cli-color", + "/d", + "/es6-iterator", + "/es6-symbol", + "/es6-weak-map", + "/event-emitter", + "/lru-queue", + "/memoizee", + "/timers-ext" + ], + "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.39.tgz", + "_shasum": "fca21b67559277ca4ac1a1ed7048b107b6f76d87", + "_spec": "es5-ext@^0.10.12", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/cli-color", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "bugs": { + "url": "https://github.com/medikoo/es5-ext/issues" + }, + "bundleDependencies": false, + "dependencies": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1" + }, + "deprecated": false, + "description": "ECMAScript extensions and shims", + "devDependencies": { + "eslint": "^4.15", + "eslint-config-medikoo-es5": "^1.4.7", + "tad": "~0.2.7" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "rules": { + "no-extend-native": "off" + } + }, + "homepage": "https://github.com/medikoo/es5-ext#readme", + "keywords": [ + "ecmascript", + "ecmascript5", + "ecmascript6", + "es5", + "es6", + "extensions", + "ext", + "addons", + "extras", + "harmony", + "javascript", + "polyfill", + "shim", + "util", + "utils", + "utilities" + ], + "license": "MIT", + "name": "es5-ext", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es5-ext.git" + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node ./node_modules/tad/bin/tad" + }, + "version": "0.10.39" +} diff --git a/node_modules/es5-ext/promise/.eslintrc.json b/node_modules/es5-ext/promise/.eslintrc.json new file mode 100644 index 0000000..fd5e0e9 --- /dev/null +++ b/node_modules/es5-ext/promise/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "globals": { "Promise": true } +} diff --git a/node_modules/es5-ext/promise/index.js b/node_modules/es5-ext/promise/index.js new file mode 100644 index 0000000..33ad830 --- /dev/null +++ b/node_modules/es5-ext/promise/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + lazy: require("./lazy") +}; diff --git a/node_modules/es5-ext/promise/lazy.js b/node_modules/es5-ext/promise/lazy.js new file mode 100644 index 0000000..9611ef1 --- /dev/null +++ b/node_modules/es5-ext/promise/lazy.js @@ -0,0 +1,38 @@ +"use strict"; + +var isFunction = require("../function/is-function"); + +module.exports = function (executor) { + var Constructor; + if (isFunction(this)) { + Constructor = this; + } else if (typeof Promise === "function") { + Constructor = Promise; + } else { + throw new TypeError("Could not resolve Promise constuctor"); + } + + var lazyThen; + var promise = new Constructor(function (resolve, reject) { + lazyThen = function (onSuccess, onFailure) { + if (!hasOwnProperty.call(this, "then")) { + // Sanity check + throw new Error("Unexpected (inherited) lazy then invocation"); + } + + try { + executor(resolve, reject); + } catch (reason) { + reject(reason); + } + delete this.then; + return this.then(onSuccess, onFailure); + }; + }); + + return Object.defineProperty(promise, "then", { + configurable: true, + writable: true, + value: lazyThen + }); +}; diff --git a/node_modules/es5-ext/reg-exp/#/index.js b/node_modules/es5-ext/reg-exp/#/index.js new file mode 100644 index 0000000..9b098e0 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/index.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + isSticky: require("./is-sticky"), + isUnicode: require("./is-unicode"), + match: require("./match"), + replace: require("./replace"), + search: require("./search"), + split: require("./split") +}; diff --git a/node_modules/es5-ext/reg-exp/#/is-sticky.js b/node_modules/es5-ext/reg-exp/#/is-sticky.js new file mode 100644 index 0000000..2d4bb2a --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/is-sticky.js @@ -0,0 +1,9 @@ +"use strict"; + +var validRegExp = require("../valid-reg-exp") + + , re = /\/[a-xz]*y[a-xz]*$/; + +module.exports = function () { + return Boolean(String(validRegExp(this)).match(re)); +}; diff --git a/node_modules/es5-ext/reg-exp/#/is-unicode.js b/node_modules/es5-ext/reg-exp/#/is-unicode.js new file mode 100644 index 0000000..4c1ad9e --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/is-unicode.js @@ -0,0 +1,9 @@ +"use strict"; + +var validRegExp = require("../valid-reg-exp") + + , re = /\/[a-xz]*u[a-xz]*$/; + +module.exports = function () { + return Boolean(String(validRegExp(this)).match(re)); +}; diff --git a/node_modules/es5-ext/reg-exp/#/match/implement.js b/node_modules/es5-ext/reg-exp/#/match/implement.js new file mode 100644 index 0000000..ba89bce --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "match", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/reg-exp/#/match/index.js b/node_modules/es5-ext/reg-exp/#/match/index.js new file mode 100644 index 0000000..b74d2f2 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? RegExp.prototype.match + : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/match/is-implemented.js b/node_modules/es5-ext/reg-exp/#/match/is-implemented.js new file mode 100644 index 0000000..a5065fc --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.match !== "function") return false; + return re.match("barfoobar") && !re.match("elo"); +}; diff --git a/node_modules/es5-ext/reg-exp/#/match/shim.js b/node_modules/es5-ext/reg-exp/#/match/shim.js new file mode 100644 index 0000000..2955821 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).match(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/replace/implement.js b/node_modules/es5-ext/reg-exp/#/replace/implement.js new file mode 100644 index 0000000..0db8291 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "replace", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/reg-exp/#/replace/index.js b/node_modules/es5-ext/reg-exp/#/replace/index.js new file mode 100644 index 0000000..41ff4ba --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? RegExp.prototype.replace + : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js b/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js new file mode 100644 index 0000000..0a2e7c2 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.replace !== "function") return false; + return re.replace("foobar", "mar") === "marbar"; +}; diff --git a/node_modules/es5-ext/reg-exp/#/replace/shim.js b/node_modules/es5-ext/reg-exp/#/replace/shim.js new file mode 100644 index 0000000..66f5d5b --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string, replaceValue) { + validRegExp(this); + return String(string).replace(this, replaceValue); +}; diff --git a/node_modules/es5-ext/reg-exp/#/search/implement.js b/node_modules/es5-ext/reg-exp/#/search/implement.js new file mode 100644 index 0000000..3445261 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "search", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/reg-exp/#/search/index.js b/node_modules/es5-ext/reg-exp/#/search/index.js new file mode 100644 index 0000000..a17213e --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? RegExp.prototype.search + : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/search/is-implemented.js b/node_modules/es5-ext/reg-exp/#/search/is-implemented.js new file mode 100644 index 0000000..7f38669 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.search !== "function") return false; + return re.search("barfoo") === 3; +}; diff --git a/node_modules/es5-ext/reg-exp/#/search/shim.js b/node_modules/es5-ext/reg-exp/#/search/shim.js new file mode 100644 index 0000000..c97a787 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).search(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/split/implement.js b/node_modules/es5-ext/reg-exp/#/split/implement.js new file mode 100644 index 0000000..d94acdd --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "split", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/reg-exp/#/split/index.js b/node_modules/es5-ext/reg-exp/#/split/index.js new file mode 100644 index 0000000..7942f45 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? RegExp.prototype.split + : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/split/is-implemented.js b/node_modules/es5-ext/reg-exp/#/split/is-implemented.js new file mode 100644 index 0000000..90fca0c --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /\|/; + +module.exports = function () { + if (typeof re.split !== "function") return false; + return re.split("bar|foo")[1] === "foo"; +}; diff --git a/node_modules/es5-ext/reg-exp/#/split/shim.js b/node_modules/es5-ext/reg-exp/#/split/shim.js new file mode 100644 index 0000000..c9c73cc --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).split(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/sticky/implement.js b/node_modules/es5-ext/reg-exp/#/sticky/implement.js new file mode 100644 index 0000000..f636890 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/sticky/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +var isSticky = require("../is-sticky"); + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "sticky", { configurable: true, + enumerable: false, +get: isSticky }); +} diff --git a/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js new file mode 100644 index 0000000..a1ade11 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + var dummyRegExp = /a/; + // We need to do check on instance and not on prototype due to how ES2015 spec evolved: + // https://github.com/tc39/ecma262/issues/262 + // https://github.com/tc39/ecma262/pull/263 + // https://bugs.chromium.org/p/v8/issues/detail?id=4617 + return "sticky" in dummyRegExp; +}; diff --git a/node_modules/es5-ext/reg-exp/#/unicode/implement.js b/node_modules/es5-ext/reg-exp/#/unicode/implement.js new file mode 100644 index 0000000..a5fb203 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/unicode/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +var isUnicode = require("../is-unicode"); + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "unicode", { configurable: true, + enumerable: false, +get: isUnicode }); +} diff --git a/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js new file mode 100644 index 0000000..48605d7 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + var dummyRegExp = /a/; + // We need to do check on instance and not on prototype due to how ES2015 spec evolved: + // https://github.com/tc39/ecma262/issues/262 + // https://github.com/tc39/ecma262/pull/263 + // https://bugs.chromium.org/p/v8/issues/detail?id=4617 + return "unicode" in dummyRegExp; +}; diff --git a/node_modules/es5-ext/reg-exp/escape.js b/node_modules/es5-ext/reg-exp/escape.js new file mode 100644 index 0000000..964e3c6 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/escape.js @@ -0,0 +1,11 @@ +// Thanks to Andrew Clover: +// http://stackoverflow.com/questions/3561493 +// /is-there-a-regexp-escape-function-in-javascript + +"use strict"; + +var re = /[-/\\^$*+?.()|[\]{}]/g; + +module.exports = function (str) { + return String(str).replace(re, "\\$&"); +}; diff --git a/node_modules/es5-ext/reg-exp/index.js b/node_modules/es5-ext/reg-exp/index.js new file mode 100644 index 0000000..f023fe0 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "escape": require("./escape"), + "isRegExp": require("./is-reg-exp"), + "validRegExp": require("./valid-reg-exp") +}; diff --git a/node_modules/es5-ext/reg-exp/is-reg-exp.js b/node_modules/es5-ext/reg-exp/is-reg-exp.js new file mode 100644 index 0000000..b966b0f --- /dev/null +++ b/node_modules/es5-ext/reg-exp/is-reg-exp.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(/a/); + +module.exports = function (value) { + return (value && (value instanceof RegExp || objToString.call(value) === id)) || false; +}; diff --git a/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/node_modules/es5-ext/reg-exp/valid-reg-exp.js new file mode 100644 index 0000000..a05927a --- /dev/null +++ b/node_modules/es5-ext/reg-exp/valid-reg-exp.js @@ -0,0 +1,8 @@ +"use strict"; + +var isRegExp = require("./is-reg-exp"); + +module.exports = function (value) { + if (!isRegExp(value)) throw new TypeError(value + " is not a RegExp object"); + return value; +}; diff --git a/node_modules/es5-ext/safe-to-string.js b/node_modules/es5-ext/safe-to-string.js new file mode 100644 index 0000000..cc323d7 --- /dev/null +++ b/node_modules/es5-ext/safe-to-string.js @@ -0,0 +1,12 @@ +"use strict"; + +var isCallable = require("./object/is-callable"); + +module.exports = function (value) { + try { + if (value && isCallable(value.toString)) return value.toString(); + return String(value); + } catch (e) { + return ""; + } +}; diff --git a/node_modules/es5-ext/string/#/@@iterator/implement.js b/node_modules/es5-ext/string/#/@@iterator/implement.js new file mode 100644 index 0000000..ab85d7c --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/implement.js @@ -0,0 +1,6 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, require("es6-symbol").iterator, + { value: require("./shim"), configurable: true, enumerable: false, writable: true }); +} diff --git a/node_modules/es5-ext/string/#/@@iterator/index.js b/node_modules/es5-ext/string/#/@@iterator/index.js new file mode 100644 index 0000000..b2bd1e8 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype[require("es6-symbol").iterator] : require("./shim"); diff --git a/node_modules/es5-ext/string/#/@@iterator/is-implemented.js b/node_modules/es5-ext/string/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..bb8a8d6 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function () { + var str = "🙈f", iterator, result; + if (typeof str[iteratorSymbol] !== "function") return false; + iterator = str[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "🙈") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/string/#/@@iterator/shim.js b/node_modules/es5-ext/string/#/@@iterator/shim.js new file mode 100644 index 0000000..1eafee2 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var StringIterator = require("es6-iterator/string") + , value = require("../../../object/valid-value"); + +module.exports = function () { + return new StringIterator(value(this)); +}; diff --git a/node_modules/es5-ext/string/#/at.js b/node_modules/es5-ext/string/#/at.js new file mode 100644 index 0000000..a8c2917 --- /dev/null +++ b/node_modules/es5-ext/string/#/at.js @@ -0,0 +1,35 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.at +// Thanks @mathiasbynens ! + +"use strict"; + +var toInteger = require("../../number/to-integer") + , validValue = require("../../object/valid-value"); + +module.exports = function (pos) { + var str = String(validValue(this)), size = str.length, cuFirst, cuSecond, nextPos, len; + pos = toInteger(pos); + + // Account for out-of-bounds indices + // The odd lower bound is because the ToInteger operation is + // going to round `n` to `0` for `-1 < n <= 0`. + if (pos <= -1 || pos >= size) return ""; + + // Second half of `ToInteger` + // eslint-disable-next-line no-bitwise + pos |= 0; + // Get the first code unit and code unit value + cuFirst = str.charCodeAt(pos); + nextPos = pos + 1; + len = 1; + if ( + // Check if it’s the start of a surrogate pair + cuFirst >= 0xd800 && + cuFirst <= 0xdbff && // High surrogate + size > nextPos // There is a next code unit + ) { + cuSecond = str.charCodeAt(nextPos); + if (cuSecond >= 0xdc00 && cuSecond <= 0xdfff) len = 2; // Low surrogate + } + return str.slice(pos, pos + len); +}; diff --git a/node_modules/es5-ext/string/#/camel-to-hyphen.js b/node_modules/es5-ext/string/#/camel-to-hyphen.js new file mode 100644 index 0000000..002dfd0 --- /dev/null +++ b/node_modules/es5-ext/string/#/camel-to-hyphen.js @@ -0,0 +1,10 @@ +"use strict"; + +var replace = String.prototype.replace + , re = /([A-Z])/g; + +module.exports = function () { + var str = replace.call(this, re, "-$1").toLowerCase(); + if (str[0] === "-") str = str.slice(1); + return str; +}; diff --git a/node_modules/es5-ext/string/#/capitalize.js b/node_modules/es5-ext/string/#/capitalize.js new file mode 100644 index 0000000..fc92a9f --- /dev/null +++ b/node_modules/es5-ext/string/#/capitalize.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var str = String(value(this)); + return str.charAt(0).toUpperCase() + str.slice(1); +}; diff --git a/node_modules/es5-ext/string/#/case-insensitive-compare.js b/node_modules/es5-ext/string/#/case-insensitive-compare.js new file mode 100644 index 0000000..5d961a5 --- /dev/null +++ b/node_modules/es5-ext/string/#/case-insensitive-compare.js @@ -0,0 +1,7 @@ +"use strict"; + +var toLowerCase = String.prototype.toLowerCase; + +module.exports = function (other) { + return toLowerCase.call(this).localeCompare(toLowerCase.call(String(other))); +}; diff --git a/node_modules/es5-ext/string/#/code-point-at/implement.js b/node_modules/es5-ext/string/#/code-point-at/implement.js new file mode 100644 index 0000000..f1dc80a --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "codePointAt", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/code-point-at/index.js b/node_modules/es5-ext/string/#/code-point-at/index.js new file mode 100644 index 0000000..33d45c9 --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.codePointAt + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/node_modules/es5-ext/string/#/code-point-at/is-implemented.js new file mode 100644 index 0000000..7da785f --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "abc\uD834\uDF06def"; + +module.exports = function () { + if (typeof str.codePointAt !== "function") return false; + return str.codePointAt(3) === 0x1D306; +}; diff --git a/node_modules/es5-ext/string/#/code-point-at/shim.js b/node_modules/es5-ext/string/#/code-point-at/shim.js new file mode 100644 index 0000000..0f331c3 --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/shim.js @@ -0,0 +1,26 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt +// Thanks @mathiasbynens ! + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , validValue = require("../../../object/valid-value"); + +module.exports = function (pos) { + var str = String(validValue(this)), length = str.length, first, second; + pos = toInteger(pos); + + // Account for out-of-bounds indices: + if (pos < 0 || pos >= length) return undefined; + + // Get the first code unit + first = str.charCodeAt(pos); + if (first >= 0xd800 && first <= 0xdbff && length > pos + 1) { + second = str.charCodeAt(pos + 1); + if (second >= 0xdc00 && second <= 0xdfff) { + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xd800) * 0x400 + second - 0xdc00 + 0x10000; + } + } + return first; +}; diff --git a/node_modules/es5-ext/string/#/contains/implement.js b/node_modules/es5-ext/string/#/contains/implement.js new file mode 100644 index 0000000..395acea --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "contains", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/contains/index.js b/node_modules/es5-ext/string/#/contains/index.js new file mode 100644 index 0000000..4f6a071 --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.contains + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/contains/is-implemented.js b/node_modules/es5-ext/string/#/contains/is-implemented.js new file mode 100644 index 0000000..c270bb1 --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.contains !== "function") return false; + return (str.contains("dwa") === true) && (str.contains("foo") === false); +}; diff --git a/node_modules/es5-ext/string/#/contains/shim.js b/node_modules/es5-ext/string/#/contains/shim.js new file mode 100644 index 0000000..a7219f2 --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = String.prototype.indexOf; + +module.exports = function (searchString/*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; +}; diff --git a/node_modules/es5-ext/string/#/count.js b/node_modules/es5-ext/string/#/count.js new file mode 100644 index 0000000..7607013 --- /dev/null +++ b/node_modules/es5-ext/string/#/count.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensureString = require("../../object/validate-stringifiable-value"); + +module.exports = function (search) { + var string = ensureString(this), count = 0, index = 0; + + search = ensureString(search); + if (!search) throw new TypeError("Search string cannot be empty"); + while ((index = string.indexOf(search, index)) !== -1) { + ++count; + index += search.length; + } + return count; +}; diff --git a/node_modules/es5-ext/string/#/ends-with/implement.js b/node_modules/es5-ext/string/#/ends-with/implement.js new file mode 100644 index 0000000..19e5b86 --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "endsWith", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/ends-with/index.js b/node_modules/es5-ext/string/#/ends-with/index.js new file mode 100644 index 0000000..952ed0c --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.endsWith + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/ends-with/is-implemented.js b/node_modules/es5-ext/string/#/ends-with/is-implemented.js new file mode 100644 index 0000000..fce38eb --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.endsWith !== "function") return false; + return (str.endsWith("trzy") === true) && (str.endsWith("raz") === false); +}; diff --git a/node_modules/es5-ext/string/#/ends-with/shim.js b/node_modules/es5-ext/string/#/ends-with/shim.js new file mode 100644 index 0000000..c5371aa --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/shim.js @@ -0,0 +1,18 @@ +"use strict"; + +var toInteger = require("../../../number/to-integer") + , value = require("../../../object/valid-value") + , isValue = require("../../../object/is-value") + , min = Math.min + , max = Math.max; + +module.exports = function (searchString /*, endPosition*/) { + var self, start, endPos; + self = String(value(this)); + searchString = String(searchString); + endPos = arguments[1]; + start = + (isValue(endPos) ? min(max(toInteger(endPos), 0), self.length) : self.length) - + searchString.length; + return start < 0 ? false : self.indexOf(searchString, start) === start; +}; diff --git a/node_modules/es5-ext/string/#/hyphen-to-camel.js b/node_modules/es5-ext/string/#/hyphen-to-camel.js new file mode 100644 index 0000000..20a5105 --- /dev/null +++ b/node_modules/es5-ext/string/#/hyphen-to-camel.js @@ -0,0 +1,10 @@ +"use strict"; + +var replace = String.prototype.replace, re = /-([a-z0-9])/g; +var toUpperCase = function (ignored, a) { + return a.toUpperCase(); +}; + +module.exports = function () { + return replace.call(this, re, toUpperCase); +}; diff --git a/node_modules/es5-ext/string/#/indent.js b/node_modules/es5-ext/string/#/indent.js new file mode 100644 index 0000000..df8869d --- /dev/null +++ b/node_modules/es5-ext/string/#/indent.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("../../object/is-value") + , repeat = require("./repeat") + , replace = String.prototype.replace + , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g; + +module.exports = function (indent /*, count*/) { + var count = arguments[1]; + indent = repeat.call(String(indent), isValue(count) ? count : 1); + return indent + replace.call(this, re, "$1" + indent + "$2"); +}; diff --git a/node_modules/es5-ext/string/#/index.js b/node_modules/es5-ext/string/#/index.js new file mode 100644 index 0000000..2344489 --- /dev/null +++ b/node_modules/es5-ext/string/#/index.js @@ -0,0 +1,23 @@ +"use strict"; + +module.exports = { + "@@iterator": require("./@@iterator"), + "at": require("./at"), + "count": require("./count"), + "camelToHyphen": require("./camel-to-hyphen"), + "capitalize": require("./capitalize"), + "caseInsensitiveCompare": require("./case-insensitive-compare"), + "codePointAt": require("./code-point-at"), + "contains": require("./contains"), + "hyphenToCamel": require("./hyphen-to-camel"), + "endsWith": require("./ends-with"), + "indent": require("./indent"), + "last": require("./last"), + "normalize": require("./normalize"), + "pad": require("./pad"), + "plainReplace": require("./plain-replace"), + "plainReplaceAll": require("./plain-replace-all"), + "repeat": require("./repeat"), + "startsWith": require("./starts-with"), + "uncapitalize": require("./uncapitalize") +}; diff --git a/node_modules/es5-ext/string/#/last.js b/node_modules/es5-ext/string/#/last.js new file mode 100644 index 0000000..f5c957f --- /dev/null +++ b/node_modules/es5-ext/string/#/last.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var self = String(value(this)), length = self.length; + return length ? self[length - 1] : null; +}; diff --git a/node_modules/es5-ext/string/#/normalize/_data.js b/node_modules/es5-ext/string/#/normalize/_data.js new file mode 100644 index 0000000..356d5a6 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/_data.js @@ -0,0 +1,7203 @@ +/* eslint max-lines: "off", no-sparse-arrays: "off", comma-style: "off" */ + +"use strict"; + +module.exports = { + 0: { + 60: [, , { 824: 8814 }], + 61: [, , { 824: 8800 }], + 62: [, , { 824: 8815 }], + 65: [ + , + , + { + 768: 192, + 769: 193, + 770: 194, + 771: 195, + 772: 256, + 774: 258, + 775: 550, + 776: 196, + 777: 7842, + 778: 197, + 780: 461, + 783: 512, + 785: 514, + 803: 7840, + 805: 7680, + 808: 260 + } + ], + 66: [, , { 775: 7682, 803: 7684, 817: 7686 }], + 67: [, , { 769: 262, 770: 264, 775: 266, 780: 268, 807: 199 }], + 68: [ + , + , + { 775: 7690, 780: 270, 803: 7692, 807: 7696, 813: 7698, 817: 7694 } + ], + 69: [ + , + , + { + 768: 200, + 769: 201, + 770: 202, + 771: 7868, + 772: 274, + 774: 276, + 775: 278, + 776: 203, + 777: 7866, + 780: 282, + 783: 516, + 785: 518, + 803: 7864, + 807: 552, + 808: 280, + 813: 7704, + 816: 7706 + } + ], + 70: [, , { 775: 7710 }], + 71: [ + , + , + { 769: 500, 770: 284, 772: 7712, 774: 286, 775: 288, 780: 486, 807: 290 } + ], + 72: [ + , + , + { + 770: 292, + 775: 7714, + 776: 7718, + 780: 542, + 803: 7716, + 807: 7720, + 814: 7722 + } + ], + 73: [ + , + , + { + 768: 204, + 769: 205, + 770: 206, + 771: 296, + 772: 298, + 774: 300, + 775: 304, + 776: 207, + 777: 7880, + 780: 463, + 783: 520, + 785: 522, + 803: 7882, + 808: 302, + 816: 7724 + } + ], + 74: [, , { 770: 308 }], + 75: [, , { 769: 7728, 780: 488, 803: 7730, 807: 310, 817: 7732 }], + 76: [, , { 769: 313, 780: 317, 803: 7734, 807: 315, 813: 7740, 817: 7738 }], + 77: [, , { 769: 7742, 775: 7744, 803: 7746 }], + 78: [ + , + , + { + 768: 504, + 769: 323, + 771: 209, + 775: 7748, + 780: 327, + 803: 7750, + 807: 325, + 813: 7754, + 817: 7752 + } + ], + 79: [ + , + , + { + 768: 210, + 769: 211, + 770: 212, + 771: 213, + 772: 332, + 774: 334, + 775: 558, + 776: 214, + 777: 7886, + 779: 336, + 780: 465, + 783: 524, + 785: 526, + 795: 416, + 803: 7884, + 808: 490 + } + ], + 80: [, , { 769: 7764, 775: 7766 }], + 82: [ + , + , + { + 769: 340, + 775: 7768, + 780: 344, + 783: 528, + 785: 530, + 803: 7770, + 807: 342, + 817: 7774 + } + ], + 83: [ + , + , + { 769: 346, 770: 348, 775: 7776, 780: 352, 803: 7778, 806: 536, 807: 350 } + ], + 84: [ + , + , + { + 775: 7786, + 780: 356, + 803: 7788, + 806: 538, + 807: 354, + 813: 7792, + 817: 7790 + } + ], + 85: [ + , + , + { + 768: 217, + 769: 218, + 770: 219, + 771: 360, + 772: 362, + 774: 364, + 776: 220, + 777: 7910, + 778: 366, + 779: 368, + 780: 467, + 783: 532, + 785: 534, + 795: 431, + 803: 7908, + 804: 7794, + 808: 370, + 813: 7798, + 816: 7796 + } + ], + 86: [, , { 771: 7804, 803: 7806 }], + 87: [ + , + , + { 768: 7808, 769: 7810, 770: 372, 775: 7814, 776: 7812, 803: 7816 } + ], + 88: [, , { 775: 7818, 776: 7820 }], + 89: [ + , + , + { + 768: 7922, + 769: 221, + 770: 374, + 771: 7928, + 772: 562, + 775: 7822, + 776: 376, + 777: 7926, + 803: 7924 + } + ], + 90: [, , { 769: 377, 770: 7824, 775: 379, 780: 381, 803: 7826, 817: 7828 }], + 97: [ + , + , + { + 768: 224, + 769: 225, + 770: 226, + 771: 227, + 772: 257, + 774: 259, + 775: 551, + 776: 228, + 777: 7843, + 778: 229, + 780: 462, + 783: 513, + 785: 515, + 803: 7841, + 805: 7681, + 808: 261 + } + ], + 98: [, , { 775: 7683, 803: 7685, 817: 7687 }], + 99: [, , { 769: 263, 770: 265, 775: 267, 780: 269, 807: 231 }], + 100: [ + , + , + { 775: 7691, 780: 271, 803: 7693, 807: 7697, 813: 7699, 817: 7695 } + ], + 101: [ + , + , + { + 768: 232, + 769: 233, + 770: 234, + 771: 7869, + 772: 275, + 774: 277, + 775: 279, + 776: 235, + 777: 7867, + 780: 283, + 783: 517, + 785: 519, + 803: 7865, + 807: 553, + 808: 281, + 813: 7705, + 816: 7707 + } + ], + 102: [, , { 775: 7711 }], + 103: [ + , + , + { 769: 501, 770: 285, 772: 7713, 774: 287, 775: 289, 780: 487, 807: 291 } + ], + 104: [ + , + , + { + 770: 293, + 775: 7715, + 776: 7719, + 780: 543, + 803: 7717, + 807: 7721, + 814: 7723, + 817: 7830 + } + ], + 105: [ + , + , + { + 768: 236, + 769: 237, + 770: 238, + 771: 297, + 772: 299, + 774: 301, + 776: 239, + 777: 7881, + 780: 464, + 783: 521, + 785: 523, + 803: 7883, + 808: 303, + 816: 7725 + } + ], + 106: [, , { 770: 309, 780: 496 }], + 107: [, , { 769: 7729, 780: 489, 803: 7731, 807: 311, 817: 7733 }], + 108: [ + , + , + { 769: 314, 780: 318, 803: 7735, 807: 316, 813: 7741, 817: 7739 } + ], + 109: [, , { 769: 7743, 775: 7745, 803: 7747 }], + 110: [ + , + , + { + 768: 505, + 769: 324, + 771: 241, + 775: 7749, + 780: 328, + 803: 7751, + 807: 326, + 813: 7755, + 817: 7753 + } + ], + 111: [ + , + , + { + 768: 242, + 769: 243, + 770: 244, + 771: 245, + 772: 333, + 774: 335, + 775: 559, + 776: 246, + 777: 7887, + 779: 337, + 780: 466, + 783: 525, + 785: 527, + 795: 417, + 803: 7885, + 808: 491 + } + ], + 112: [, , { 769: 7765, 775: 7767 }], + 114: [ + , + , + { + 769: 341, + 775: 7769, + 780: 345, + 783: 529, + 785: 531, + 803: 7771, + 807: 343, + 817: 7775 + } + ], + 115: [ + , + , + { 769: 347, 770: 349, 775: 7777, 780: 353, 803: 7779, 806: 537, 807: 351 } + ], + 116: [ + , + , + { + 775: 7787, + 776: 7831, + 780: 357, + 803: 7789, + 806: 539, + 807: 355, + 813: 7793, + 817: 7791 + } + ], + 117: [ + , + , + { + 768: 249, + 769: 250, + 770: 251, + 771: 361, + 772: 363, + 774: 365, + 776: 252, + 777: 7911, + 778: 367, + 779: 369, + 780: 468, + 783: 533, + 785: 535, + 795: 432, + 803: 7909, + 804: 7795, + 808: 371, + 813: 7799, + 816: 7797 + } + ], + 118: [, , { 771: 7805, 803: 7807 }], + 119: [ + , + , + { + 768: 7809, + 769: 7811, + 770: 373, + 775: 7815, + 776: 7813, + 778: 7832, + 803: 7817 + } + ], + 120: [, , { 775: 7819, 776: 7821 }], + 121: [ + , + , + { + 768: 7923, + 769: 253, + 770: 375, + 771: 7929, + 772: 563, + 775: 7823, + 776: 255, + 777: 7927, + 778: 7833, + 803: 7925 + } + ], + 122: [ + , + , + { 769: 378, 770: 7825, 775: 380, 780: 382, 803: 7827, 817: 7829 } + ], + 160: [[32], 256], + 168: [[32, 776], 256, { 768: 8173, 769: 901, 834: 8129 }], + 170: [[97], 256], + 175: [[32, 772], 256], + 178: [[50], 256], + 179: [[51], 256], + 180: [[32, 769], 256], + 181: [[956], 256], + 184: [[32, 807], 256], + 185: [[49], 256], + 186: [[111], 256], + 188: [[49, 8260, 52], 256], + 189: [[49, 8260, 50], 256], + 190: [[51, 8260, 52], 256], + 192: [[65, 768]], + 193: [[65, 769]], + 194: [[65, 770], , { 768: 7846, 769: 7844, 771: 7850, 777: 7848 }], + 195: [[65, 771]], + 196: [[65, 776], , { 772: 478 }], + 197: [[65, 778], , { 769: 506 }], + 198: [, , { 769: 508, 772: 482 }], + 199: [[67, 807], , { 769: 7688 }], + 200: [[69, 768]], + 201: [[69, 769]], + 202: [[69, 770], , { 768: 7872, 769: 7870, 771: 7876, 777: 7874 }], + 203: [[69, 776]], + 204: [[73, 768]], + 205: [[73, 769]], + 206: [[73, 770]], + 207: [[73, 776], , { 769: 7726 }], + 209: [[78, 771]], + 210: [[79, 768]], + 211: [[79, 769]], + 212: [[79, 770], , { 768: 7890, 769: 7888, 771: 7894, 777: 7892 }], + 213: [[79, 771], , { 769: 7756, 772: 556, 776: 7758 }], + 214: [[79, 776], , { 772: 554 }], + 216: [, , { 769: 510 }], + 217: [[85, 768]], + 218: [[85, 769]], + 219: [[85, 770]], + 220: [[85, 776], , { 768: 475, 769: 471, 772: 469, 780: 473 }], + 221: [[89, 769]], + 224: [[97, 768]], + 225: [[97, 769]], + 226: [[97, 770], , { 768: 7847, 769: 7845, 771: 7851, 777: 7849 }], + 227: [[97, 771]], + 228: [[97, 776], , { 772: 479 }], + 229: [[97, 778], , { 769: 507 }], + 230: [, , { 769: 509, 772: 483 }], + 231: [[99, 807], , { 769: 7689 }], + 232: [[101, 768]], + 233: [[101, 769]], + 234: [[101, 770], , { 768: 7873, 769: 7871, 771: 7877, 777: 7875 }], + 235: [[101, 776]], + 236: [[105, 768]], + 237: [[105, 769]], + 238: [[105, 770]], + 239: [[105, 776], , { 769: 7727 }], + 241: [[110, 771]], + 242: [[111, 768]], + 243: [[111, 769]], + 244: [[111, 770], , { 768: 7891, 769: 7889, 771: 7895, 777: 7893 }], + 245: [[111, 771], , { 769: 7757, 772: 557, 776: 7759 }], + 246: [[111, 776], , { 772: 555 }], + 248: [, , { 769: 511 }], + 249: [[117, 768]], + 250: [[117, 769]], + 251: [[117, 770]], + 252: [[117, 776], , { 768: 476, 769: 472, 772: 470, 780: 474 }], + 253: [[121, 769]], + 255: [[121, 776]] + }, + 256: { + 256: [[65, 772]], + 257: [[97, 772]], + 258: [[65, 774], , { 768: 7856, 769: 7854, 771: 7860, 777: 7858 }], + 259: [[97, 774], , { 768: 7857, 769: 7855, 771: 7861, 777: 7859 }], + 260: [[65, 808]], + 261: [[97, 808]], + 262: [[67, 769]], + 263: [[99, 769]], + 264: [[67, 770]], + 265: [[99, 770]], + 266: [[67, 775]], + 267: [[99, 775]], + 268: [[67, 780]], + 269: [[99, 780]], + 270: [[68, 780]], + 271: [[100, 780]], + 274: [[69, 772], , { 768: 7700, 769: 7702 }], + 275: [[101, 772], , { 768: 7701, 769: 7703 }], + 276: [[69, 774]], + 277: [[101, 774]], + 278: [[69, 775]], + 279: [[101, 775]], + 280: [[69, 808]], + 281: [[101, 808]], + 282: [[69, 780]], + 283: [[101, 780]], + 284: [[71, 770]], + 285: [[103, 770]], + 286: [[71, 774]], + 287: [[103, 774]], + 288: [[71, 775]], + 289: [[103, 775]], + 290: [[71, 807]], + 291: [[103, 807]], + 292: [[72, 770]], + 293: [[104, 770]], + 296: [[73, 771]], + 297: [[105, 771]], + 298: [[73, 772]], + 299: [[105, 772]], + 300: [[73, 774]], + 301: [[105, 774]], + 302: [[73, 808]], + 303: [[105, 808]], + 304: [[73, 775]], + 306: [[73, 74], 256], + 307: [[105, 106], 256], + 308: [[74, 770]], + 309: [[106, 770]], + 310: [[75, 807]], + 311: [[107, 807]], + 313: [[76, 769]], + 314: [[108, 769]], + 315: [[76, 807]], + 316: [[108, 807]], + 317: [[76, 780]], + 318: [[108, 780]], + 319: [[76, 183], 256], + 320: [[108, 183], 256], + 323: [[78, 769]], + 324: [[110, 769]], + 325: [[78, 807]], + 326: [[110, 807]], + 327: [[78, 780]], + 328: [[110, 780]], + 329: [[700, 110], 256], + 332: [[79, 772], , { 768: 7760, 769: 7762 }], + 333: [[111, 772], , { 768: 7761, 769: 7763 }], + 334: [[79, 774]], + 335: [[111, 774]], + 336: [[79, 779]], + 337: [[111, 779]], + 340: [[82, 769]], + 341: [[114, 769]], + 342: [[82, 807]], + 343: [[114, 807]], + 344: [[82, 780]], + 345: [[114, 780]], + 346: [[83, 769], , { 775: 7780 }], + 347: [[115, 769], , { 775: 7781 }], + 348: [[83, 770]], + 349: [[115, 770]], + 350: [[83, 807]], + 351: [[115, 807]], + 352: [[83, 780], , { 775: 7782 }], + 353: [[115, 780], , { 775: 7783 }], + 354: [[84, 807]], + 355: [[116, 807]], + 356: [[84, 780]], + 357: [[116, 780]], + 360: [[85, 771], , { 769: 7800 }], + 361: [[117, 771], , { 769: 7801 }], + 362: [[85, 772], , { 776: 7802 }], + 363: [[117, 772], , { 776: 7803 }], + 364: [[85, 774]], + 365: [[117, 774]], + 366: [[85, 778]], + 367: [[117, 778]], + 368: [[85, 779]], + 369: [[117, 779]], + 370: [[85, 808]], + 371: [[117, 808]], + 372: [[87, 770]], + 373: [[119, 770]], + 374: [[89, 770]], + 375: [[121, 770]], + 376: [[89, 776]], + 377: [[90, 769]], + 378: [[122, 769]], + 379: [[90, 775]], + 380: [[122, 775]], + 381: [[90, 780]], + 382: [[122, 780]], + 383: [[115], 256, { 775: 7835 }], + 416: [ + [79, 795], + , + { 768: 7900, 769: 7898, 771: 7904, 777: 7902, 803: 7906 } + ], + 417: [ + [111, 795], + , + { 768: 7901, 769: 7899, 771: 7905, 777: 7903, 803: 7907 } + ], + 431: [ + [85, 795], + , + { 768: 7914, 769: 7912, 771: 7918, 777: 7916, 803: 7920 } + ], + 432: [ + [117, 795], + , + { 768: 7915, 769: 7913, 771: 7919, 777: 7917, 803: 7921 } + ], + 439: [, , { 780: 494 }], + 452: [[68, 381], 256], + 453: [[68, 382], 256], + 454: [[100, 382], 256], + 455: [[76, 74], 256], + 456: [[76, 106], 256], + 457: [[108, 106], 256], + 458: [[78, 74], 256], + 459: [[78, 106], 256], + 460: [[110, 106], 256], + 461: [[65, 780]], + 462: [[97, 780]], + 463: [[73, 780]], + 464: [[105, 780]], + 465: [[79, 780]], + 466: [[111, 780]], + 467: [[85, 780]], + 468: [[117, 780]], + 469: [[220, 772]], + 470: [[252, 772]], + 471: [[220, 769]], + 472: [[252, 769]], + 473: [[220, 780]], + 474: [[252, 780]], + 475: [[220, 768]], + 476: [[252, 768]], + 478: [[196, 772]], + 479: [[228, 772]], + 480: [[550, 772]], + 481: [[551, 772]], + 482: [[198, 772]], + 483: [[230, 772]], + 486: [[71, 780]], + 487: [[103, 780]], + 488: [[75, 780]], + 489: [[107, 780]], + 490: [[79, 808], , { 772: 492 }], + 491: [[111, 808], , { 772: 493 }], + 492: [[490, 772]], + 493: [[491, 772]], + 494: [[439, 780]], + 495: [[658, 780]], + 496: [[106, 780]], + 497: [[68, 90], 256], + 498: [[68, 122], 256], + 499: [[100, 122], 256], + 500: [[71, 769]], + 501: [[103, 769]], + 504: [[78, 768]], + 505: [[110, 768]], + 506: [[197, 769]], + 507: [[229, 769]], + 508: [[198, 769]], + 509: [[230, 769]], + 510: [[216, 769]], + 511: [[248, 769]], + 66045: [, 220] + }, + 512: { + 512: [[65, 783]], + 513: [[97, 783]], + 514: [[65, 785]], + 515: [[97, 785]], + 516: [[69, 783]], + 517: [[101, 783]], + 518: [[69, 785]], + 519: [[101, 785]], + 520: [[73, 783]], + 521: [[105, 783]], + 522: [[73, 785]], + 523: [[105, 785]], + 524: [[79, 783]], + 525: [[111, 783]], + 526: [[79, 785]], + 527: [[111, 785]], + 528: [[82, 783]], + 529: [[114, 783]], + 530: [[82, 785]], + 531: [[114, 785]], + 532: [[85, 783]], + 533: [[117, 783]], + 534: [[85, 785]], + 535: [[117, 785]], + 536: [[83, 806]], + 537: [[115, 806]], + 538: [[84, 806]], + 539: [[116, 806]], + 542: [[72, 780]], + 543: [[104, 780]], + 550: [[65, 775], , { 772: 480 }], + 551: [[97, 775], , { 772: 481 }], + 552: [[69, 807], , { 774: 7708 }], + 553: [[101, 807], , { 774: 7709 }], + 554: [[214, 772]], + 555: [[246, 772]], + 556: [[213, 772]], + 557: [[245, 772]], + 558: [[79, 775], , { 772: 560 }], + 559: [[111, 775], , { 772: 561 }], + 560: [[558, 772]], + 561: [[559, 772]], + 562: [[89, 772]], + 563: [[121, 772]], + 658: [, , { 780: 495 }], + 688: [[104], 256], + 689: [[614], 256], + 690: [[106], 256], + 691: [[114], 256], + 692: [[633], 256], + 693: [[635], 256], + 694: [[641], 256], + 695: [[119], 256], + 696: [[121], 256], + 728: [[32, 774], 256], + 729: [[32, 775], 256], + 730: [[32, 778], 256], + 731: [[32, 808], 256], + 732: [[32, 771], 256], + 733: [[32, 779], 256], + 736: [[611], 256], + 737: [[108], 256], + 738: [[115], 256], + 739: [[120], 256], + 740: [[661], 256] + }, + 768: { + 768: [, 230], + 769: [, 230], + 770: [, 230], + 771: [, 230], + 772: [, 230], + 773: [, 230], + 774: [, 230], + 775: [, 230], + 776: [, 230, { 769: 836 }], + 777: [, 230], + 778: [, 230], + 779: [, 230], + 780: [, 230], + 781: [, 230], + 782: [, 230], + 783: [, 230], + 784: [, 230], + 785: [, 230], + 786: [, 230], + 787: [, 230], + 788: [, 230], + 789: [, 232], + 790: [, 220], + 791: [, 220], + 792: [, 220], + 793: [, 220], + 794: [, 232], + 795: [, 216], + 796: [, 220], + 797: [, 220], + 798: [, 220], + 799: [, 220], + 800: [, 220], + 801: [, 202], + 802: [, 202], + 803: [, 220], + 804: [, 220], + 805: [, 220], + 806: [, 220], + 807: [, 202], + 808: [, 202], + 809: [, 220], + 810: [, 220], + 811: [, 220], + 812: [, 220], + 813: [, 220], + 814: [, 220], + 815: [, 220], + 816: [, 220], + 817: [, 220], + 818: [, 220], + 819: [, 220], + 820: [, 1], + 821: [, 1], + 822: [, 1], + 823: [, 1], + 824: [, 1], + 825: [, 220], + 826: [, 220], + 827: [, 220], + 828: [, 220], + 829: [, 230], + 830: [, 230], + 831: [, 230], + 832: [[768], 230], + 833: [[769], 230], + 834: [, 230], + 835: [[787], 230], + 836: [[776, 769], 230], + 837: [, 240], + 838: [, 230], + 839: [, 220], + 840: [, 220], + 841: [, 220], + 842: [, 230], + 843: [, 230], + 844: [, 230], + 845: [, 220], + 846: [, 220], + 848: [, 230], + 849: [, 230], + 850: [, 230], + 851: [, 220], + 852: [, 220], + 853: [, 220], + 854: [, 220], + 855: [, 230], + 856: [, 232], + 857: [, 220], + 858: [, 220], + 859: [, 230], + 860: [, 233], + 861: [, 234], + 862: [, 234], + 863: [, 233], + 864: [, 234], + 865: [, 234], + 866: [, 233], + 867: [, 230], + 868: [, 230], + 869: [, 230], + 870: [, 230], + 871: [, 230], + 872: [, 230], + 873: [, 230], + 874: [, 230], + 875: [, 230], + 876: [, 230], + 877: [, 230], + 878: [, 230], + 879: [, 230], + 884: [[697]], + 890: [[32, 837], 256], + 894: [[59]], + 900: [[32, 769], 256], + 901: [[168, 769]], + 902: [[913, 769]], + 903: [[183]], + 904: [[917, 769]], + 905: [[919, 769]], + 906: [[921, 769]], + 908: [[927, 769]], + 910: [[933, 769]], + 911: [[937, 769]], + 912: [[970, 769]], + 913: [ + , + , + { + 768: 8122, + 769: 902, + 772: 8121, + 774: 8120, + 787: 7944, + 788: 7945, + 837: 8124 + } + ], + 917: [, , { 768: 8136, 769: 904, 787: 7960, 788: 7961 }], + 919: [, , { 768: 8138, 769: 905, 787: 7976, 788: 7977, 837: 8140 }], + 921: [ + , + , + { + 768: 8154, + 769: 906, + 772: 8153, + 774: 8152, + 776: 938, + 787: 7992, + 788: 7993 + } + ], + 927: [, , { 768: 8184, 769: 908, 787: 8008, 788: 8009 }], + 929: [, , { 788: 8172 }], + 933: [ + , + , + { 768: 8170, 769: 910, 772: 8169, 774: 8168, 776: 939, 788: 8025 } + ], + 937: [, , { 768: 8186, 769: 911, 787: 8040, 788: 8041, 837: 8188 }], + 938: [[921, 776]], + 939: [[933, 776]], + 940: [[945, 769], , { 837: 8116 }], + 941: [[949, 769]], + 942: [[951, 769], , { 837: 8132 }], + 943: [[953, 769]], + 944: [[971, 769]], + 945: [ + , + , + { + 768: 8048, + 769: 940, + 772: 8113, + 774: 8112, + 787: 7936, + 788: 7937, + 834: 8118, + 837: 8115 + } + ], + 949: [, , { 768: 8050, 769: 941, 787: 7952, 788: 7953 }], + 951: [ + , + , + { 768: 8052, 769: 942, 787: 7968, 788: 7969, 834: 8134, 837: 8131 } + ], + 953: [ + , + , + { + 768: 8054, + 769: 943, + 772: 8145, + 774: 8144, + 776: 970, + 787: 7984, + 788: 7985, + 834: 8150 + } + ], + 959: [, , { 768: 8056, 769: 972, 787: 8000, 788: 8001 }], + 961: [, , { 787: 8164, 788: 8165 }], + 965: [ + , + , + { + 768: 8058, + 769: 973, + 772: 8161, + 774: 8160, + 776: 971, + 787: 8016, + 788: 8017, + 834: 8166 + } + ], + 969: [ + , + , + { 768: 8060, 769: 974, 787: 8032, 788: 8033, 834: 8182, 837: 8179 } + ], + 970: [[953, 776], , { 768: 8146, 769: 912, 834: 8151 }], + 971: [[965, 776], , { 768: 8162, 769: 944, 834: 8167 }], + 972: [[959, 769]], + 973: [[965, 769]], + 974: [[969, 769], , { 837: 8180 }], + 976: [[946], 256], + 977: [[952], 256], + 978: [[933], 256, { 769: 979, 776: 980 }], + 979: [[978, 769]], + 980: [[978, 776]], + 981: [[966], 256], + 982: [[960], 256], + 1008: [[954], 256], + 1009: [[961], 256], + 1010: [[962], 256], + 1012: [[920], 256], + 1013: [[949], 256], + 1017: [[931], 256] + }, + 1024: { + 1024: [[1045, 768]], + 1025: [[1045, 776]], + 1027: [[1043, 769]], + 1030: [, , { 776: 1031 }], + 1031: [[1030, 776]], + 1036: [[1050, 769]], + 1037: [[1048, 768]], + 1038: [[1059, 774]], + 1040: [, , { 774: 1232, 776: 1234 }], + 1043: [, , { 769: 1027 }], + 1045: [, , { 768: 1024, 774: 1238, 776: 1025 }], + 1046: [, , { 774: 1217, 776: 1244 }], + 1047: [, , { 776: 1246 }], + 1048: [, , { 768: 1037, 772: 1250, 774: 1049, 776: 1252 }], + 1049: [[1048, 774]], + 1050: [, , { 769: 1036 }], + 1054: [, , { 776: 1254 }], + 1059: [, , { 772: 1262, 774: 1038, 776: 1264, 779: 1266 }], + 1063: [, , { 776: 1268 }], + 1067: [, , { 776: 1272 }], + 1069: [, , { 776: 1260 }], + 1072: [, , { 774: 1233, 776: 1235 }], + 1075: [, , { 769: 1107 }], + 1077: [, , { 768: 1104, 774: 1239, 776: 1105 }], + 1078: [, , { 774: 1218, 776: 1245 }], + 1079: [, , { 776: 1247 }], + 1080: [, , { 768: 1117, 772: 1251, 774: 1081, 776: 1253 }], + 1081: [[1080, 774]], + 1082: [, , { 769: 1116 }], + 1086: [, , { 776: 1255 }], + 1091: [, , { 772: 1263, 774: 1118, 776: 1265, 779: 1267 }], + 1095: [, , { 776: 1269 }], + 1099: [, , { 776: 1273 }], + 1101: [, , { 776: 1261 }], + 1104: [[1077, 768]], + 1105: [[1077, 776]], + 1107: [[1075, 769]], + 1110: [, , { 776: 1111 }], + 1111: [[1110, 776]], + 1116: [[1082, 769]], + 1117: [[1080, 768]], + 1118: [[1091, 774]], + 1140: [, , { 783: 1142 }], + 1141: [, , { 783: 1143 }], + 1142: [[1140, 783]], + 1143: [[1141, 783]], + 1155: [, 230], + 1156: [, 230], + 1157: [, 230], + 1158: [, 230], + 1159: [, 230], + 1217: [[1046, 774]], + 1218: [[1078, 774]], + 1232: [[1040, 774]], + 1233: [[1072, 774]], + 1234: [[1040, 776]], + 1235: [[1072, 776]], + 1238: [[1045, 774]], + 1239: [[1077, 774]], + 1240: [, , { 776: 1242 }], + 1241: [, , { 776: 1243 }], + 1242: [[1240, 776]], + 1243: [[1241, 776]], + 1244: [[1046, 776]], + 1245: [[1078, 776]], + 1246: [[1047, 776]], + 1247: [[1079, 776]], + 1250: [[1048, 772]], + 1251: [[1080, 772]], + 1252: [[1048, 776]], + 1253: [[1080, 776]], + 1254: [[1054, 776]], + 1255: [[1086, 776]], + 1256: [, , { 776: 1258 }], + 1257: [, , { 776: 1259 }], + 1258: [[1256, 776]], + 1259: [[1257, 776]], + 1260: [[1069, 776]], + 1261: [[1101, 776]], + 1262: [[1059, 772]], + 1263: [[1091, 772]], + 1264: [[1059, 776]], + 1265: [[1091, 776]], + 1266: [[1059, 779]], + 1267: [[1091, 779]], + 1268: [[1063, 776]], + 1269: [[1095, 776]], + 1272: [[1067, 776]], + 1273: [[1099, 776]] + }, + 1280: { + 1415: [[1381, 1410], 256], + 1425: [, 220], + 1426: [, 230], + 1427: [, 230], + 1428: [, 230], + 1429: [, 230], + 1430: [, 220], + 1431: [, 230], + 1432: [, 230], + 1433: [, 230], + 1434: [, 222], + 1435: [, 220], + 1436: [, 230], + 1437: [, 230], + 1438: [, 230], + 1439: [, 230], + 1440: [, 230], + 1441: [, 230], + 1442: [, 220], + 1443: [, 220], + 1444: [, 220], + 1445: [, 220], + 1446: [, 220], + 1447: [, 220], + 1448: [, 230], + 1449: [, 230], + 1450: [, 220], + 1451: [, 230], + 1452: [, 230], + 1453: [, 222], + 1454: [, 228], + 1455: [, 230], + 1456: [, 10], + 1457: [, 11], + 1458: [, 12], + 1459: [, 13], + 1460: [, 14], + 1461: [, 15], + 1462: [, 16], + 1463: [, 17], + 1464: [, 18], + 1465: [, 19], + 1466: [, 19], + 1467: [, 20], + 1468: [, 21], + 1469: [, 22], + 1471: [, 23], + 1473: [, 24], + 1474: [, 25], + 1476: [, 230], + 1477: [, 220], + 1479: [, 18] + }, + 1536: { + 1552: [, 230], + 1553: [, 230], + 1554: [, 230], + 1555: [, 230], + 1556: [, 230], + 1557: [, 230], + 1558: [, 230], + 1559: [, 230], + 1560: [, 30], + 1561: [, 31], + 1562: [, 32], + 1570: [[1575, 1619]], + 1571: [[1575, 1620]], + 1572: [[1608, 1620]], + 1573: [[1575, 1621]], + 1574: [[1610, 1620]], + 1575: [, , { 1619: 1570, 1620: 1571, 1621: 1573 }], + 1608: [, , { 1620: 1572 }], + 1610: [, , { 1620: 1574 }], + 1611: [, 27], + 1612: [, 28], + 1613: [, 29], + 1614: [, 30], + 1615: [, 31], + 1616: [, 32], + 1617: [, 33], + 1618: [, 34], + 1619: [, 230], + 1620: [, 230], + 1621: [, 220], + 1622: [, 220], + 1623: [, 230], + 1624: [, 230], + 1625: [, 230], + 1626: [, 230], + 1627: [, 230], + 1628: [, 220], + 1629: [, 230], + 1630: [, 230], + 1631: [, 220], + 1648: [, 35], + 1653: [[1575, 1652], 256], + 1654: [[1608, 1652], 256], + 1655: [[1735, 1652], 256], + 1656: [[1610, 1652], 256], + 1728: [[1749, 1620]], + 1729: [, , { 1620: 1730 }], + 1730: [[1729, 1620]], + 1746: [, , { 1620: 1747 }], + 1747: [[1746, 1620]], + 1749: [, , { 1620: 1728 }], + 1750: [, 230], + 1751: [, 230], + 1752: [, 230], + 1753: [, 230], + 1754: [, 230], + 1755: [, 230], + 1756: [, 230], + 1759: [, 230], + 1760: [, 230], + 1761: [, 230], + 1762: [, 230], + 1763: [, 220], + 1764: [, 230], + 1767: [, 230], + 1768: [, 230], + 1770: [, 220], + 1771: [, 230], + 1772: [, 230], + 1773: [, 220] + }, + 1792: { + 1809: [, 36], + 1840: [, 230], + 1841: [, 220], + 1842: [, 230], + 1843: [, 230], + 1844: [, 220], + 1845: [, 230], + 1846: [, 230], + 1847: [, 220], + 1848: [, 220], + 1849: [, 220], + 1850: [, 230], + 1851: [, 220], + 1852: [, 220], + 1853: [, 230], + 1854: [, 220], + 1855: [, 230], + 1856: [, 230], + 1857: [, 230], + 1858: [, 220], + 1859: [, 230], + 1860: [, 220], + 1861: [, 230], + 1862: [, 220], + 1863: [, 230], + 1864: [, 220], + 1865: [, 230], + 1866: [, 230], + 2027: [, 230], + 2028: [, 230], + 2029: [, 230], + 2030: [, 230], + 2031: [, 230], + 2032: [, 230], + 2033: [, 230], + 2034: [, 220], + 2035: [, 230] + }, + 2048: { + 2070: [, 230], + 2071: [, 230], + 2072: [, 230], + 2073: [, 230], + 2075: [, 230], + 2076: [, 230], + 2077: [, 230], + 2078: [, 230], + 2079: [, 230], + 2080: [, 230], + 2081: [, 230], + 2082: [, 230], + 2083: [, 230], + 2085: [, 230], + 2086: [, 230], + 2087: [, 230], + 2089: [, 230], + 2090: [, 230], + 2091: [, 230], + 2092: [, 230], + 2093: [, 230], + 2137: [, 220], + 2138: [, 220], + 2139: [, 220], + 2276: [, 230], + 2277: [, 230], + 2278: [, 220], + 2279: [, 230], + 2280: [, 230], + 2281: [, 220], + 2282: [, 230], + 2283: [, 230], + 2284: [, 230], + 2285: [, 220], + 2286: [, 220], + 2287: [, 220], + 2288: [, 27], + 2289: [, 28], + 2290: [, 29], + 2291: [, 230], + 2292: [, 230], + 2293: [, 230], + 2294: [, 220], + 2295: [, 230], + 2296: [, 230], + 2297: [, 220], + 2298: [, 220], + 2299: [, 230], + 2300: [, 230], + 2301: [, 230], + 2302: [, 230] + }, + 2304: { + 2344: [, , { 2364: 2345 }], + 2345: [[2344, 2364]], + 2352: [, , { 2364: 2353 }], + 2353: [[2352, 2364]], + 2355: [, , { 2364: 2356 }], + 2356: [[2355, 2364]], + 2364: [, 7], + 2381: [, 9], + 2385: [, 230], + 2386: [, 220], + 2387: [, 230], + 2388: [, 230], + 2392: [[2325, 2364], 512], + 2393: [[2326, 2364], 512], + 2394: [[2327, 2364], 512], + 2395: [[2332, 2364], 512], + 2396: [[2337, 2364], 512], + 2397: [[2338, 2364], 512], + 2398: [[2347, 2364], 512], + 2399: [[2351, 2364], 512], + 2492: [, 7], + 2503: [, , { 2494: 2507, 2519: 2508 }], + 2507: [[2503, 2494]], + 2508: [[2503, 2519]], + 2509: [, 9], + 2524: [[2465, 2492], 512], + 2525: [[2466, 2492], 512], + 2527: [[2479, 2492], 512] + }, + 2560: { + 2611: [[2610, 2620], 512], + 2614: [[2616, 2620], 512], + 2620: [, 7], + 2637: [, 9], + 2649: [[2582, 2620], 512], + 2650: [[2583, 2620], 512], + 2651: [[2588, 2620], 512], + 2654: [[2603, 2620], 512], + 2748: [, 7], + 2765: [, 9], + 68109: [, 220], + 68111: [, 230], + 68152: [, 230], + 68153: [, 1], + 68154: [, 220], + 68159: [, 9] + }, + 2816: { + 2876: [, 7], + 2887: [, , { 2878: 2891, 2902: 2888, 2903: 2892 }], + 2888: [[2887, 2902]], + 2891: [[2887, 2878]], + 2892: [[2887, 2903]], + 2893: [, 9], + 2908: [[2849, 2876], 512], + 2909: [[2850, 2876], 512], + 2962: [, , { 3031: 2964 }], + 2964: [[2962, 3031]], + 3014: [, , { 3006: 3018, 3031: 3020 }], + 3015: [, , { 3006: 3019 }], + 3018: [[3014, 3006]], + 3019: [[3015, 3006]], + 3020: [[3014, 3031]], + 3021: [, 9] + }, + 3072: { + 3142: [, , { 3158: 3144 }], + 3144: [[3142, 3158]], + 3149: [, 9], + 3157: [, 84], + 3158: [, 91], + 3260: [, 7], + 3263: [, , { 3285: 3264 }], + 3264: [[3263, 3285]], + 3270: [, , { 3266: 3274, 3285: 3271, 3286: 3272 }], + 3271: [[3270, 3285]], + 3272: [[3270, 3286]], + 3274: [[3270, 3266], , { 3285: 3275 }], + 3275: [[3274, 3285]], + 3277: [, 9] + }, + 3328: { + 3398: [, , { 3390: 3402, 3415: 3404 }], + 3399: [, , { 3390: 3403 }], + 3402: [[3398, 3390]], + 3403: [[3399, 3390]], + 3404: [[3398, 3415]], + 3405: [, 9], + 3530: [, 9], + 3545: [, , { 3530: 3546, 3535: 3548, 3551: 3550 }], + 3546: [[3545, 3530]], + 3548: [[3545, 3535], , { 3530: 3549 }], + 3549: [[3548, 3530]], + 3550: [[3545, 3551]] + }, + 3584: { + 3635: [[3661, 3634], 256], + 3640: [, 103], + 3641: [, 103], + 3642: [, 9], + 3656: [, 107], + 3657: [, 107], + 3658: [, 107], + 3659: [, 107], + 3763: [[3789, 3762], 256], + 3768: [, 118], + 3769: [, 118], + 3784: [, 122], + 3785: [, 122], + 3786: [, 122], + 3787: [, 122], + 3804: [[3755, 3737], 256], + 3805: [[3755, 3745], 256] + }, + 3840: { + 3852: [[3851], 256], + 3864: [, 220], + 3865: [, 220], + 3893: [, 220], + 3895: [, 220], + 3897: [, 216], + 3907: [[3906, 4023], 512], + 3917: [[3916, 4023], 512], + 3922: [[3921, 4023], 512], + 3927: [[3926, 4023], 512], + 3932: [[3931, 4023], 512], + 3945: [[3904, 4021], 512], + 3953: [, 129], + 3954: [, 130], + 3955: [[3953, 3954], 512], + 3956: [, 132], + 3957: [[3953, 3956], 512], + 3958: [[4018, 3968], 512], + 3959: [[4018, 3969], 256], + 3960: [[4019, 3968], 512], + 3961: [[4019, 3969], 256], + 3962: [, 130], + 3963: [, 130], + 3964: [, 130], + 3965: [, 130], + 3968: [, 130], + 3969: [[3953, 3968], 512], + 3970: [, 230], + 3971: [, 230], + 3972: [, 9], + 3974: [, 230], + 3975: [, 230], + 3987: [[3986, 4023], 512], + 3997: [[3996, 4023], 512], + 4002: [[4001, 4023], 512], + 4007: [[4006, 4023], 512], + 4012: [[4011, 4023], 512], + 4025: [[3984, 4021], 512], + 4038: [, 220] + }, + 4096: { + 4133: [, , { 4142: 4134 }], + 4134: [[4133, 4142]], + 4151: [, 7], + 4153: [, 9], + 4154: [, 9], + 4237: [, 220], + 4348: [[4316], 256], + 69702: [, 9], + 69785: [, , { 69818: 69786 }], + 69786: [[69785, 69818]], + 69787: [, , { 69818: 69788 }], + 69788: [[69787, 69818]], + 69797: [, , { 69818: 69803 }], + 69803: [[69797, 69818]], + 69817: [, 9], + 69818: [, 7] + }, + 4352: { + 69888: [, 230], + 69889: [, 230], + 69890: [, 230], + 69934: [[69937, 69927]], + 69935: [[69938, 69927]], + 69937: [, , { 69927: 69934 }], + 69938: [, , { 69927: 69935 }], + 69939: [, 9], + 69940: [, 9], + 70080: [, 9] + }, + 4864: { 4957: [, 230], 4958: [, 230], 4959: [, 230] }, + 5632: { 71350: [, 9], 71351: [, 7] }, + 5888: { 5908: [, 9], 5940: [, 9], 6098: [, 9], 6109: [, 230] }, + 6144: { 6313: [, 228] }, + 6400: { 6457: [, 222], 6458: [, 230], 6459: [, 220] }, + 6656: { + 6679: [, 230], + 6680: [, 220], + 6752: [, 9], + 6773: [, 230], + 6774: [, 230], + 6775: [, 230], + 6776: [, 230], + 6777: [, 230], + 6778: [, 230], + 6779: [, 230], + 6780: [, 230], + 6783: [, 220] + }, + 6912: { + 6917: [, , { 6965: 6918 }], + 6918: [[6917, 6965]], + 6919: [, , { 6965: 6920 }], + 6920: [[6919, 6965]], + 6921: [, , { 6965: 6922 }], + 6922: [[6921, 6965]], + 6923: [, , { 6965: 6924 }], + 6924: [[6923, 6965]], + 6925: [, , { 6965: 6926 }], + 6926: [[6925, 6965]], + 6929: [, , { 6965: 6930 }], + 6930: [[6929, 6965]], + 6964: [, 7], + 6970: [, , { 6965: 6971 }], + 6971: [[6970, 6965]], + 6972: [, , { 6965: 6973 }], + 6973: [[6972, 6965]], + 6974: [, , { 6965: 6976 }], + 6975: [, , { 6965: 6977 }], + 6976: [[6974, 6965]], + 6977: [[6975, 6965]], + 6978: [, , { 6965: 6979 }], + 6979: [[6978, 6965]], + 6980: [, 9], + 7019: [, 230], + 7020: [, 220], + 7021: [, 230], + 7022: [, 230], + 7023: [, 230], + 7024: [, 230], + 7025: [, 230], + 7026: [, 230], + 7027: [, 230], + 7082: [, 9], + 7083: [, 9], + 7142: [, 7], + 7154: [, 9], + 7155: [, 9] + }, + 7168: { + 7223: [, 7], + 7376: [, 230], + 7377: [, 230], + 7378: [, 230], + 7380: [, 1], + 7381: [, 220], + 7382: [, 220], + 7383: [, 220], + 7384: [, 220], + 7385: [, 220], + 7386: [, 230], + 7387: [, 230], + 7388: [, 220], + 7389: [, 220], + 7390: [, 220], + 7391: [, 220], + 7392: [, 230], + 7394: [, 1], + 7395: [, 1], + 7396: [, 1], + 7397: [, 1], + 7398: [, 1], + 7399: [, 1], + 7400: [, 1], + 7405: [, 220], + 7412: [, 230] + }, + 7424: { + 7468: [[65], 256], + 7469: [[198], 256], + 7470: [[66], 256], + 7472: [[68], 256], + 7473: [[69], 256], + 7474: [[398], 256], + 7475: [[71], 256], + 7476: [[72], 256], + 7477: [[73], 256], + 7478: [[74], 256], + 7479: [[75], 256], + 7480: [[76], 256], + 7481: [[77], 256], + 7482: [[78], 256], + 7484: [[79], 256], + 7485: [[546], 256], + 7486: [[80], 256], + 7487: [[82], 256], + 7488: [[84], 256], + 7489: [[85], 256], + 7490: [[87], 256], + 7491: [[97], 256], + 7492: [[592], 256], + 7493: [[593], 256], + 7494: [[7426], 256], + 7495: [[98], 256], + 7496: [[100], 256], + 7497: [[101], 256], + 7498: [[601], 256], + 7499: [[603], 256], + 7500: [[604], 256], + 7501: [[103], 256], + 7503: [[107], 256], + 7504: [[109], 256], + 7505: [[331], 256], + 7506: [[111], 256], + 7507: [[596], 256], + 7508: [[7446], 256], + 7509: [[7447], 256], + 7510: [[112], 256], + 7511: [[116], 256], + 7512: [[117], 256], + 7513: [[7453], 256], + 7514: [[623], 256], + 7515: [[118], 256], + 7516: [[7461], 256], + 7517: [[946], 256], + 7518: [[947], 256], + 7519: [[948], 256], + 7520: [[966], 256], + 7521: [[967], 256], + 7522: [[105], 256], + 7523: [[114], 256], + 7524: [[117], 256], + 7525: [[118], 256], + 7526: [[946], 256], + 7527: [[947], 256], + 7528: [[961], 256], + 7529: [[966], 256], + 7530: [[967], 256], + 7544: [[1085], 256], + 7579: [[594], 256], + 7580: [[99], 256], + 7581: [[597], 256], + 7582: [[240], 256], + 7583: [[604], 256], + 7584: [[102], 256], + 7585: [[607], 256], + 7586: [[609], 256], + 7587: [[613], 256], + 7588: [[616], 256], + 7589: [[617], 256], + 7590: [[618], 256], + 7591: [[7547], 256], + 7592: [[669], 256], + 7593: [[621], 256], + 7594: [[7557], 256], + 7595: [[671], 256], + 7596: [[625], 256], + 7597: [[624], 256], + 7598: [[626], 256], + 7599: [[627], 256], + 7600: [[628], 256], + 7601: [[629], 256], + 7602: [[632], 256], + 7603: [[642], 256], + 7604: [[643], 256], + 7605: [[427], 256], + 7606: [[649], 256], + 7607: [[650], 256], + 7608: [[7452], 256], + 7609: [[651], 256], + 7610: [[652], 256], + 7611: [[122], 256], + 7612: [[656], 256], + 7613: [[657], 256], + 7614: [[658], 256], + 7615: [[952], 256], + 7616: [, 230], + 7617: [, 230], + 7618: [, 220], + 7619: [, 230], + 7620: [, 230], + 7621: [, 230], + 7622: [, 230], + 7623: [, 230], + 7624: [, 230], + 7625: [, 230], + 7626: [, 220], + 7627: [, 230], + 7628: [, 230], + 7629: [, 234], + 7630: [, 214], + 7631: [, 220], + 7632: [, 202], + 7633: [, 230], + 7634: [, 230], + 7635: [, 230], + 7636: [, 230], + 7637: [, 230], + 7638: [, 230], + 7639: [, 230], + 7640: [, 230], + 7641: [, 230], + 7642: [, 230], + 7643: [, 230], + 7644: [, 230], + 7645: [, 230], + 7646: [, 230], + 7647: [, 230], + 7648: [, 230], + 7649: [, 230], + 7650: [, 230], + 7651: [, 230], + 7652: [, 230], + 7653: [, 230], + 7654: [, 230], + 7676: [, 233], + 7677: [, 220], + 7678: [, 230], + 7679: [, 220] + }, + 7680: { + 7680: [[65, 805]], + 7681: [[97, 805]], + 7682: [[66, 775]], + 7683: [[98, 775]], + 7684: [[66, 803]], + 7685: [[98, 803]], + 7686: [[66, 817]], + 7687: [[98, 817]], + 7688: [[199, 769]], + 7689: [[231, 769]], + 7690: [[68, 775]], + 7691: [[100, 775]], + 7692: [[68, 803]], + 7693: [[100, 803]], + 7694: [[68, 817]], + 7695: [[100, 817]], + 7696: [[68, 807]], + 7697: [[100, 807]], + 7698: [[68, 813]], + 7699: [[100, 813]], + 7700: [[274, 768]], + 7701: [[275, 768]], + 7702: [[274, 769]], + 7703: [[275, 769]], + 7704: [[69, 813]], + 7705: [[101, 813]], + 7706: [[69, 816]], + 7707: [[101, 816]], + 7708: [[552, 774]], + 7709: [[553, 774]], + 7710: [[70, 775]], + 7711: [[102, 775]], + 7712: [[71, 772]], + 7713: [[103, 772]], + 7714: [[72, 775]], + 7715: [[104, 775]], + 7716: [[72, 803]], + 7717: [[104, 803]], + 7718: [[72, 776]], + 7719: [[104, 776]], + 7720: [[72, 807]], + 7721: [[104, 807]], + 7722: [[72, 814]], + 7723: [[104, 814]], + 7724: [[73, 816]], + 7725: [[105, 816]], + 7726: [[207, 769]], + 7727: [[239, 769]], + 7728: [[75, 769]], + 7729: [[107, 769]], + 7730: [[75, 803]], + 7731: [[107, 803]], + 7732: [[75, 817]], + 7733: [[107, 817]], + 7734: [[76, 803], , { 772: 7736 }], + 7735: [[108, 803], , { 772: 7737 }], + 7736: [[7734, 772]], + 7737: [[7735, 772]], + 7738: [[76, 817]], + 7739: [[108, 817]], + 7740: [[76, 813]], + 7741: [[108, 813]], + 7742: [[77, 769]], + 7743: [[109, 769]], + 7744: [[77, 775]], + 7745: [[109, 775]], + 7746: [[77, 803]], + 7747: [[109, 803]], + 7748: [[78, 775]], + 7749: [[110, 775]], + 7750: [[78, 803]], + 7751: [[110, 803]], + 7752: [[78, 817]], + 7753: [[110, 817]], + 7754: [[78, 813]], + 7755: [[110, 813]], + 7756: [[213, 769]], + 7757: [[245, 769]], + 7758: [[213, 776]], + 7759: [[245, 776]], + 7760: [[332, 768]], + 7761: [[333, 768]], + 7762: [[332, 769]], + 7763: [[333, 769]], + 7764: [[80, 769]], + 7765: [[112, 769]], + 7766: [[80, 775]], + 7767: [[112, 775]], + 7768: [[82, 775]], + 7769: [[114, 775]], + 7770: [[82, 803], , { 772: 7772 }], + 7771: [[114, 803], , { 772: 7773 }], + 7772: [[7770, 772]], + 7773: [[7771, 772]], + 7774: [[82, 817]], + 7775: [[114, 817]], + 7776: [[83, 775]], + 7777: [[115, 775]], + 7778: [[83, 803], , { 775: 7784 }], + 7779: [[115, 803], , { 775: 7785 }], + 7780: [[346, 775]], + 7781: [[347, 775]], + 7782: [[352, 775]], + 7783: [[353, 775]], + 7784: [[7778, 775]], + 7785: [[7779, 775]], + 7786: [[84, 775]], + 7787: [[116, 775]], + 7788: [[84, 803]], + 7789: [[116, 803]], + 7790: [[84, 817]], + 7791: [[116, 817]], + 7792: [[84, 813]], + 7793: [[116, 813]], + 7794: [[85, 804]], + 7795: [[117, 804]], + 7796: [[85, 816]], + 7797: [[117, 816]], + 7798: [[85, 813]], + 7799: [[117, 813]], + 7800: [[360, 769]], + 7801: [[361, 769]], + 7802: [[362, 776]], + 7803: [[363, 776]], + 7804: [[86, 771]], + 7805: [[118, 771]], + 7806: [[86, 803]], + 7807: [[118, 803]], + 7808: [[87, 768]], + 7809: [[119, 768]], + 7810: [[87, 769]], + 7811: [[119, 769]], + 7812: [[87, 776]], + 7813: [[119, 776]], + 7814: [[87, 775]], + 7815: [[119, 775]], + 7816: [[87, 803]], + 7817: [[119, 803]], + 7818: [[88, 775]], + 7819: [[120, 775]], + 7820: [[88, 776]], + 7821: [[120, 776]], + 7822: [[89, 775]], + 7823: [[121, 775]], + 7824: [[90, 770]], + 7825: [[122, 770]], + 7826: [[90, 803]], + 7827: [[122, 803]], + 7828: [[90, 817]], + 7829: [[122, 817]], + 7830: [[104, 817]], + 7831: [[116, 776]], + 7832: [[119, 778]], + 7833: [[121, 778]], + 7834: [[97, 702], 256], + 7835: [[383, 775]], + 7840: [[65, 803], , { 770: 7852, 774: 7862 }], + 7841: [[97, 803], , { 770: 7853, 774: 7863 }], + 7842: [[65, 777]], + 7843: [[97, 777]], + 7844: [[194, 769]], + 7845: [[226, 769]], + 7846: [[194, 768]], + 7847: [[226, 768]], + 7848: [[194, 777]], + 7849: [[226, 777]], + 7850: [[194, 771]], + 7851: [[226, 771]], + 7852: [[7840, 770]], + 7853: [[7841, 770]], + 7854: [[258, 769]], + 7855: [[259, 769]], + 7856: [[258, 768]], + 7857: [[259, 768]], + 7858: [[258, 777]], + 7859: [[259, 777]], + 7860: [[258, 771]], + 7861: [[259, 771]], + 7862: [[7840, 774]], + 7863: [[7841, 774]], + 7864: [[69, 803], , { 770: 7878 }], + 7865: [[101, 803], , { 770: 7879 }], + 7866: [[69, 777]], + 7867: [[101, 777]], + 7868: [[69, 771]], + 7869: [[101, 771]], + 7870: [[202, 769]], + 7871: [[234, 769]], + 7872: [[202, 768]], + 7873: [[234, 768]], + 7874: [[202, 777]], + 7875: [[234, 777]], + 7876: [[202, 771]], + 7877: [[234, 771]], + 7878: [[7864, 770]], + 7879: [[7865, 770]], + 7880: [[73, 777]], + 7881: [[105, 777]], + 7882: [[73, 803]], + 7883: [[105, 803]], + 7884: [[79, 803], , { 770: 7896 }], + 7885: [[111, 803], , { 770: 7897 }], + 7886: [[79, 777]], + 7887: [[111, 777]], + 7888: [[212, 769]], + 7889: [[244, 769]], + 7890: [[212, 768]], + 7891: [[244, 768]], + 7892: [[212, 777]], + 7893: [[244, 777]], + 7894: [[212, 771]], + 7895: [[244, 771]], + 7896: [[7884, 770]], + 7897: [[7885, 770]], + 7898: [[416, 769]], + 7899: [[417, 769]], + 7900: [[416, 768]], + 7901: [[417, 768]], + 7902: [[416, 777]], + 7903: [[417, 777]], + 7904: [[416, 771]], + 7905: [[417, 771]], + 7906: [[416, 803]], + 7907: [[417, 803]], + 7908: [[85, 803]], + 7909: [[117, 803]], + 7910: [[85, 777]], + 7911: [[117, 777]], + 7912: [[431, 769]], + 7913: [[432, 769]], + 7914: [[431, 768]], + 7915: [[432, 768]], + 7916: [[431, 777]], + 7917: [[432, 777]], + 7918: [[431, 771]], + 7919: [[432, 771]], + 7920: [[431, 803]], + 7921: [[432, 803]], + 7922: [[89, 768]], + 7923: [[121, 768]], + 7924: [[89, 803]], + 7925: [[121, 803]], + 7926: [[89, 777]], + 7927: [[121, 777]], + 7928: [[89, 771]], + 7929: [[121, 771]] + }, + 7936: { + 7936: [[945, 787], , { 768: 7938, 769: 7940, 834: 7942, 837: 8064 }], + 7937: [[945, 788], , { 768: 7939, 769: 7941, 834: 7943, 837: 8065 }], + 7938: [[7936, 768], , { 837: 8066 }], + 7939: [[7937, 768], , { 837: 8067 }], + 7940: [[7936, 769], , { 837: 8068 }], + 7941: [[7937, 769], , { 837: 8069 }], + 7942: [[7936, 834], , { 837: 8070 }], + 7943: [[7937, 834], , { 837: 8071 }], + 7944: [[913, 787], , { 768: 7946, 769: 7948, 834: 7950, 837: 8072 }], + 7945: [[913, 788], , { 768: 7947, 769: 7949, 834: 7951, 837: 8073 }], + 7946: [[7944, 768], , { 837: 8074 }], + 7947: [[7945, 768], , { 837: 8075 }], + 7948: [[7944, 769], , { 837: 8076 }], + 7949: [[7945, 769], , { 837: 8077 }], + 7950: [[7944, 834], , { 837: 8078 }], + 7951: [[7945, 834], , { 837: 8079 }], + 7952: [[949, 787], , { 768: 7954, 769: 7956 }], + 7953: [[949, 788], , { 768: 7955, 769: 7957 }], + 7954: [[7952, 768]], + 7955: [[7953, 768]], + 7956: [[7952, 769]], + 7957: [[7953, 769]], + 7960: [[917, 787], , { 768: 7962, 769: 7964 }], + 7961: [[917, 788], , { 768: 7963, 769: 7965 }], + 7962: [[7960, 768]], + 7963: [[7961, 768]], + 7964: [[7960, 769]], + 7965: [[7961, 769]], + 7968: [[951, 787], , { 768: 7970, 769: 7972, 834: 7974, 837: 8080 }], + 7969: [[951, 788], , { 768: 7971, 769: 7973, 834: 7975, 837: 8081 }], + 7970: [[7968, 768], , { 837: 8082 }], + 7971: [[7969, 768], , { 837: 8083 }], + 7972: [[7968, 769], , { 837: 8084 }], + 7973: [[7969, 769], , { 837: 8085 }], + 7974: [[7968, 834], , { 837: 8086 }], + 7975: [[7969, 834], , { 837: 8087 }], + 7976: [[919, 787], , { 768: 7978, 769: 7980, 834: 7982, 837: 8088 }], + 7977: [[919, 788], , { 768: 7979, 769: 7981, 834: 7983, 837: 8089 }], + 7978: [[7976, 768], , { 837: 8090 }], + 7979: [[7977, 768], , { 837: 8091 }], + 7980: [[7976, 769], , { 837: 8092 }], + 7981: [[7977, 769], , { 837: 8093 }], + 7982: [[7976, 834], , { 837: 8094 }], + 7983: [[7977, 834], , { 837: 8095 }], + 7984: [[953, 787], , { 768: 7986, 769: 7988, 834: 7990 }], + 7985: [[953, 788], , { 768: 7987, 769: 7989, 834: 7991 }], + 7986: [[7984, 768]], + 7987: [[7985, 768]], + 7988: [[7984, 769]], + 7989: [[7985, 769]], + 7990: [[7984, 834]], + 7991: [[7985, 834]], + 7992: [[921, 787], , { 768: 7994, 769: 7996, 834: 7998 }], + 7993: [[921, 788], , { 768: 7995, 769: 7997, 834: 7999 }], + 7994: [[7992, 768]], + 7995: [[7993, 768]], + 7996: [[7992, 769]], + 7997: [[7993, 769]], + 7998: [[7992, 834]], + 7999: [[7993, 834]], + 8000: [[959, 787], , { 768: 8002, 769: 8004 }], + 8001: [[959, 788], , { 768: 8003, 769: 8005 }], + 8002: [[8000, 768]], + 8003: [[8001, 768]], + 8004: [[8000, 769]], + 8005: [[8001, 769]], + 8008: [[927, 787], , { 768: 8010, 769: 8012 }], + 8009: [[927, 788], , { 768: 8011, 769: 8013 }], + 8010: [[8008, 768]], + 8011: [[8009, 768]], + 8012: [[8008, 769]], + 8013: [[8009, 769]], + 8016: [[965, 787], , { 768: 8018, 769: 8020, 834: 8022 }], + 8017: [[965, 788], , { 768: 8019, 769: 8021, 834: 8023 }], + 8018: [[8016, 768]], + 8019: [[8017, 768]], + 8020: [[8016, 769]], + 8021: [[8017, 769]], + 8022: [[8016, 834]], + 8023: [[8017, 834]], + 8025: [[933, 788], , { 768: 8027, 769: 8029, 834: 8031 }], + 8027: [[8025, 768]], + 8029: [[8025, 769]], + 8031: [[8025, 834]], + 8032: [[969, 787], , { 768: 8034, 769: 8036, 834: 8038, 837: 8096 }], + 8033: [[969, 788], , { 768: 8035, 769: 8037, 834: 8039, 837: 8097 }], + 8034: [[8032, 768], , { 837: 8098 }], + 8035: [[8033, 768], , { 837: 8099 }], + 8036: [[8032, 769], , { 837: 8100 }], + 8037: [[8033, 769], , { 837: 8101 }], + 8038: [[8032, 834], , { 837: 8102 }], + 8039: [[8033, 834], , { 837: 8103 }], + 8040: [[937, 787], , { 768: 8042, 769: 8044, 834: 8046, 837: 8104 }], + 8041: [[937, 788], , { 768: 8043, 769: 8045, 834: 8047, 837: 8105 }], + 8042: [[8040, 768], , { 837: 8106 }], + 8043: [[8041, 768], , { 837: 8107 }], + 8044: [[8040, 769], , { 837: 8108 }], + 8045: [[8041, 769], , { 837: 8109 }], + 8046: [[8040, 834], , { 837: 8110 }], + 8047: [[8041, 834], , { 837: 8111 }], + 8048: [[945, 768], , { 837: 8114 }], + 8049: [[940]], + 8050: [[949, 768]], + 8051: [[941]], + 8052: [[951, 768], , { 837: 8130 }], + 8053: [[942]], + 8054: [[953, 768]], + 8055: [[943]], + 8056: [[959, 768]], + 8057: [[972]], + 8058: [[965, 768]], + 8059: [[973]], + 8060: [[969, 768], , { 837: 8178 }], + 8061: [[974]], + 8064: [[7936, 837]], + 8065: [[7937, 837]], + 8066: [[7938, 837]], + 8067: [[7939, 837]], + 8068: [[7940, 837]], + 8069: [[7941, 837]], + 8070: [[7942, 837]], + 8071: [[7943, 837]], + 8072: [[7944, 837]], + 8073: [[7945, 837]], + 8074: [[7946, 837]], + 8075: [[7947, 837]], + 8076: [[7948, 837]], + 8077: [[7949, 837]], + 8078: [[7950, 837]], + 8079: [[7951, 837]], + 8080: [[7968, 837]], + 8081: [[7969, 837]], + 8082: [[7970, 837]], + 8083: [[7971, 837]], + 8084: [[7972, 837]], + 8085: [[7973, 837]], + 8086: [[7974, 837]], + 8087: [[7975, 837]], + 8088: [[7976, 837]], + 8089: [[7977, 837]], + 8090: [[7978, 837]], + 8091: [[7979, 837]], + 8092: [[7980, 837]], + 8093: [[7981, 837]], + 8094: [[7982, 837]], + 8095: [[7983, 837]], + 8096: [[8032, 837]], + 8097: [[8033, 837]], + 8098: [[8034, 837]], + 8099: [[8035, 837]], + 8100: [[8036, 837]], + 8101: [[8037, 837]], + 8102: [[8038, 837]], + 8103: [[8039, 837]], + 8104: [[8040, 837]], + 8105: [[8041, 837]], + 8106: [[8042, 837]], + 8107: [[8043, 837]], + 8108: [[8044, 837]], + 8109: [[8045, 837]], + 8110: [[8046, 837]], + 8111: [[8047, 837]], + 8112: [[945, 774]], + 8113: [[945, 772]], + 8114: [[8048, 837]], + 8115: [[945, 837]], + 8116: [[940, 837]], + 8118: [[945, 834], , { 837: 8119 }], + 8119: [[8118, 837]], + 8120: [[913, 774]], + 8121: [[913, 772]], + 8122: [[913, 768]], + 8123: [[902]], + 8124: [[913, 837]], + 8125: [[32, 787], 256], + 8126: [[953]], + 8127: [[32, 787], 256, { 768: 8141, 769: 8142, 834: 8143 }], + 8128: [[32, 834], 256], + 8129: [[168, 834]], + 8130: [[8052, 837]], + 8131: [[951, 837]], + 8132: [[942, 837]], + 8134: [[951, 834], , { 837: 8135 }], + 8135: [[8134, 837]], + 8136: [[917, 768]], + 8137: [[904]], + 8138: [[919, 768]], + 8139: [[905]], + 8140: [[919, 837]], + 8141: [[8127, 768]], + 8142: [[8127, 769]], + 8143: [[8127, 834]], + 8144: [[953, 774]], + 8145: [[953, 772]], + 8146: [[970, 768]], + 8147: [[912]], + 8150: [[953, 834]], + 8151: [[970, 834]], + 8152: [[921, 774]], + 8153: [[921, 772]], + 8154: [[921, 768]], + 8155: [[906]], + 8157: [[8190, 768]], + 8158: [[8190, 769]], + 8159: [[8190, 834]], + 8160: [[965, 774]], + 8161: [[965, 772]], + 8162: [[971, 768]], + 8163: [[944]], + 8164: [[961, 787]], + 8165: [[961, 788]], + 8166: [[965, 834]], + 8167: [[971, 834]], + 8168: [[933, 774]], + 8169: [[933, 772]], + 8170: [[933, 768]], + 8171: [[910]], + 8172: [[929, 788]], + 8173: [[168, 768]], + 8174: [[901]], + 8175: [[96]], + 8178: [[8060, 837]], + 8179: [[969, 837]], + 8180: [[974, 837]], + 8182: [[969, 834], , { 837: 8183 }], + 8183: [[8182, 837]], + 8184: [[927, 768]], + 8185: [[908]], + 8186: [[937, 768]], + 8187: [[911]], + 8188: [[937, 837]], + 8189: [[180]], + 8190: [[32, 788], 256, { 768: 8157, 769: 8158, 834: 8159 }] + }, + 8192: { + 8192: [[8194]], + 8193: [[8195]], + 8194: [[32], 256], + 8195: [[32], 256], + 8196: [[32], 256], + 8197: [[32], 256], + 8198: [[32], 256], + 8199: [[32], 256], + 8200: [[32], 256], + 8201: [[32], 256], + 8202: [[32], 256], + 8209: [[8208], 256], + 8215: [[32, 819], 256], + 8228: [[46], 256], + 8229: [[46, 46], 256], + 8230: [[46, 46, 46], 256], + 8239: [[32], 256], + 8243: [[8242, 8242], 256], + 8244: [[8242, 8242, 8242], 256], + 8246: [[8245, 8245], 256], + 8247: [[8245, 8245, 8245], 256], + 8252: [[33, 33], 256], + 8254: [[32, 773], 256], + 8263: [[63, 63], 256], + 8264: [[63, 33], 256], + 8265: [[33, 63], 256], + 8279: [[8242, 8242, 8242, 8242], 256], + 8287: [[32], 256], + 8304: [[48], 256], + 8305: [[105], 256], + 8308: [[52], 256], + 8309: [[53], 256], + 8310: [[54], 256], + 8311: [[55], 256], + 8312: [[56], 256], + 8313: [[57], 256], + 8314: [[43], 256], + 8315: [[8722], 256], + 8316: [[61], 256], + 8317: [[40], 256], + 8318: [[41], 256], + 8319: [[110], 256], + 8320: [[48], 256], + 8321: [[49], 256], + 8322: [[50], 256], + 8323: [[51], 256], + 8324: [[52], 256], + 8325: [[53], 256], + 8326: [[54], 256], + 8327: [[55], 256], + 8328: [[56], 256], + 8329: [[57], 256], + 8330: [[43], 256], + 8331: [[8722], 256], + 8332: [[61], 256], + 8333: [[40], 256], + 8334: [[41], 256], + 8336: [[97], 256], + 8337: [[101], 256], + 8338: [[111], 256], + 8339: [[120], 256], + 8340: [[601], 256], + 8341: [[104], 256], + 8342: [[107], 256], + 8343: [[108], 256], + 8344: [[109], 256], + 8345: [[110], 256], + 8346: [[112], 256], + 8347: [[115], 256], + 8348: [[116], 256], + 8360: [[82, 115], 256], + 8400: [, 230], + 8401: [, 230], + 8402: [, 1], + 8403: [, 1], + 8404: [, 230], + 8405: [, 230], + 8406: [, 230], + 8407: [, 230], + 8408: [, 1], + 8409: [, 1], + 8410: [, 1], + 8411: [, 230], + 8412: [, 230], + 8417: [, 230], + 8421: [, 1], + 8422: [, 1], + 8423: [, 230], + 8424: [, 220], + 8425: [, 230], + 8426: [, 1], + 8427: [, 1], + 8428: [, 220], + 8429: [, 220], + 8430: [, 220], + 8431: [, 220], + 8432: [, 230] + }, + 8448: { + 8448: [[97, 47, 99], 256], + 8449: [[97, 47, 115], 256], + 8450: [[67], 256], + 8451: [[176, 67], 256], + 8453: [[99, 47, 111], 256], + 8454: [[99, 47, 117], 256], + 8455: [[400], 256], + 8457: [[176, 70], 256], + 8458: [[103], 256], + 8459: [[72], 256], + 8460: [[72], 256], + 8461: [[72], 256], + 8462: [[104], 256], + 8463: [[295], 256], + 8464: [[73], 256], + 8465: [[73], 256], + 8466: [[76], 256], + 8467: [[108], 256], + 8469: [[78], 256], + 8470: [[78, 111], 256], + 8473: [[80], 256], + 8474: [[81], 256], + 8475: [[82], 256], + 8476: [[82], 256], + 8477: [[82], 256], + 8480: [[83, 77], 256], + 8481: [[84, 69, 76], 256], + 8482: [[84, 77], 256], + 8484: [[90], 256], + 8486: [[937]], + 8488: [[90], 256], + 8490: [[75]], + 8491: [[197]], + 8492: [[66], 256], + 8493: [[67], 256], + 8495: [[101], 256], + 8496: [[69], 256], + 8497: [[70], 256], + 8499: [[77], 256], + 8500: [[111], 256], + 8501: [[1488], 256], + 8502: [[1489], 256], + 8503: [[1490], 256], + 8504: [[1491], 256], + 8505: [[105], 256], + 8507: [[70, 65, 88], 256], + 8508: [[960], 256], + 8509: [[947], 256], + 8510: [[915], 256], + 8511: [[928], 256], + 8512: [[8721], 256], + 8517: [[68], 256], + 8518: [[100], 256], + 8519: [[101], 256], + 8520: [[105], 256], + 8521: [[106], 256], + 8528: [[49, 8260, 55], 256], + 8529: [[49, 8260, 57], 256], + 8530: [[49, 8260, 49, 48], 256], + 8531: [[49, 8260, 51], 256], + 8532: [[50, 8260, 51], 256], + 8533: [[49, 8260, 53], 256], + 8534: [[50, 8260, 53], 256], + 8535: [[51, 8260, 53], 256], + 8536: [[52, 8260, 53], 256], + 8537: [[49, 8260, 54], 256], + 8538: [[53, 8260, 54], 256], + 8539: [[49, 8260, 56], 256], + 8540: [[51, 8260, 56], 256], + 8541: [[53, 8260, 56], 256], + 8542: [[55, 8260, 56], 256], + 8543: [[49, 8260], 256], + 8544: [[73], 256], + 8545: [[73, 73], 256], + 8546: [[73, 73, 73], 256], + 8547: [[73, 86], 256], + 8548: [[86], 256], + 8549: [[86, 73], 256], + 8550: [[86, 73, 73], 256], + 8551: [[86, 73, 73, 73], 256], + 8552: [[73, 88], 256], + 8553: [[88], 256], + 8554: [[88, 73], 256], + 8555: [[88, 73, 73], 256], + 8556: [[76], 256], + 8557: [[67], 256], + 8558: [[68], 256], + 8559: [[77], 256], + 8560: [[105], 256], + 8561: [[105, 105], 256], + 8562: [[105, 105, 105], 256], + 8563: [[105, 118], 256], + 8564: [[118], 256], + 8565: [[118, 105], 256], + 8566: [[118, 105, 105], 256], + 8567: [[118, 105, 105, 105], 256], + 8568: [[105, 120], 256], + 8569: [[120], 256], + 8570: [[120, 105], 256], + 8571: [[120, 105, 105], 256], + 8572: [[108], 256], + 8573: [[99], 256], + 8574: [[100], 256], + 8575: [[109], 256], + 8585: [[48, 8260, 51], 256], + 8592: [, , { 824: 8602 }], + 8594: [, , { 824: 8603 }], + 8596: [, , { 824: 8622 }], + 8602: [[8592, 824]], + 8603: [[8594, 824]], + 8622: [[8596, 824]], + 8653: [[8656, 824]], + 8654: [[8660, 824]], + 8655: [[8658, 824]], + 8656: [, , { 824: 8653 }], + 8658: [, , { 824: 8655 }], + 8660: [, , { 824: 8654 }] + }, + 8704: { + 8707: [, , { 824: 8708 }], + 8708: [[8707, 824]], + 8712: [, , { 824: 8713 }], + 8713: [[8712, 824]], + 8715: [, , { 824: 8716 }], + 8716: [[8715, 824]], + 8739: [, , { 824: 8740 }], + 8740: [[8739, 824]], + 8741: [, , { 824: 8742 }], + 8742: [[8741, 824]], + 8748: [[8747, 8747], 256], + 8749: [[8747, 8747, 8747], 256], + 8751: [[8750, 8750], 256], + 8752: [[8750, 8750, 8750], 256], + 8764: [, , { 824: 8769 }], + 8769: [[8764, 824]], + 8771: [, , { 824: 8772 }], + 8772: [[8771, 824]], + 8773: [, , { 824: 8775 }], + 8775: [[8773, 824]], + 8776: [, , { 824: 8777 }], + 8777: [[8776, 824]], + 8781: [, , { 824: 8813 }], + 8800: [[61, 824]], + 8801: [, , { 824: 8802 }], + 8802: [[8801, 824]], + 8804: [, , { 824: 8816 }], + 8805: [, , { 824: 8817 }], + 8813: [[8781, 824]], + 8814: [[60, 824]], + 8815: [[62, 824]], + 8816: [[8804, 824]], + 8817: [[8805, 824]], + 8818: [, , { 824: 8820 }], + 8819: [, , { 824: 8821 }], + 8820: [[8818, 824]], + 8821: [[8819, 824]], + 8822: [, , { 824: 8824 }], + 8823: [, , { 824: 8825 }], + 8824: [[8822, 824]], + 8825: [[8823, 824]], + 8826: [, , { 824: 8832 }], + 8827: [, , { 824: 8833 }], + 8828: [, , { 824: 8928 }], + 8829: [, , { 824: 8929 }], + 8832: [[8826, 824]], + 8833: [[8827, 824]], + 8834: [, , { 824: 8836 }], + 8835: [, , { 824: 8837 }], + 8836: [[8834, 824]], + 8837: [[8835, 824]], + 8838: [, , { 824: 8840 }], + 8839: [, , { 824: 8841 }], + 8840: [[8838, 824]], + 8841: [[8839, 824]], + 8849: [, , { 824: 8930 }], + 8850: [, , { 824: 8931 }], + 8866: [, , { 824: 8876 }], + 8872: [, , { 824: 8877 }], + 8873: [, , { 824: 8878 }], + 8875: [, , { 824: 8879 }], + 8876: [[8866, 824]], + 8877: [[8872, 824]], + 8878: [[8873, 824]], + 8879: [[8875, 824]], + 8882: [, , { 824: 8938 }], + 8883: [, , { 824: 8939 }], + 8884: [, , { 824: 8940 }], + 8885: [, , { 824: 8941 }], + 8928: [[8828, 824]], + 8929: [[8829, 824]], + 8930: [[8849, 824]], + 8931: [[8850, 824]], + 8938: [[8882, 824]], + 8939: [[8883, 824]], + 8940: [[8884, 824]], + 8941: [[8885, 824]] + }, + 8960: { 9001: [[12296]], 9002: [[12297]] }, + 9216: { + 9312: [[49], 256], + 9313: [[50], 256], + 9314: [[51], 256], + 9315: [[52], 256], + 9316: [[53], 256], + 9317: [[54], 256], + 9318: [[55], 256], + 9319: [[56], 256], + 9320: [[57], 256], + 9321: [[49, 48], 256], + 9322: [[49, 49], 256], + 9323: [[49, 50], 256], + 9324: [[49, 51], 256], + 9325: [[49, 52], 256], + 9326: [[49, 53], 256], + 9327: [[49, 54], 256], + 9328: [[49, 55], 256], + 9329: [[49, 56], 256], + 9330: [[49, 57], 256], + 9331: [[50, 48], 256], + 9332: [[40, 49, 41], 256], + 9333: [[40, 50, 41], 256], + 9334: [[40, 51, 41], 256], + 9335: [[40, 52, 41], 256], + 9336: [[40, 53, 41], 256], + 9337: [[40, 54, 41], 256], + 9338: [[40, 55, 41], 256], + 9339: [[40, 56, 41], 256], + 9340: [[40, 57, 41], 256], + 9341: [[40, 49, 48, 41], 256], + 9342: [[40, 49, 49, 41], 256], + 9343: [[40, 49, 50, 41], 256], + 9344: [[40, 49, 51, 41], 256], + 9345: [[40, 49, 52, 41], 256], + 9346: [[40, 49, 53, 41], 256], + 9347: [[40, 49, 54, 41], 256], + 9348: [[40, 49, 55, 41], 256], + 9349: [[40, 49, 56, 41], 256], + 9350: [[40, 49, 57, 41], 256], + 9351: [[40, 50, 48, 41], 256], + 9352: [[49, 46], 256], + 9353: [[50, 46], 256], + 9354: [[51, 46], 256], + 9355: [[52, 46], 256], + 9356: [[53, 46], 256], + 9357: [[54, 46], 256], + 9358: [[55, 46], 256], + 9359: [[56, 46], 256], + 9360: [[57, 46], 256], + 9361: [[49, 48, 46], 256], + 9362: [[49, 49, 46], 256], + 9363: [[49, 50, 46], 256], + 9364: [[49, 51, 46], 256], + 9365: [[49, 52, 46], 256], + 9366: [[49, 53, 46], 256], + 9367: [[49, 54, 46], 256], + 9368: [[49, 55, 46], 256], + 9369: [[49, 56, 46], 256], + 9370: [[49, 57, 46], 256], + 9371: [[50, 48, 46], 256], + 9372: [[40, 97, 41], 256], + 9373: [[40, 98, 41], 256], + 9374: [[40, 99, 41], 256], + 9375: [[40, 100, 41], 256], + 9376: [[40, 101, 41], 256], + 9377: [[40, 102, 41], 256], + 9378: [[40, 103, 41], 256], + 9379: [[40, 104, 41], 256], + 9380: [[40, 105, 41], 256], + 9381: [[40, 106, 41], 256], + 9382: [[40, 107, 41], 256], + 9383: [[40, 108, 41], 256], + 9384: [[40, 109, 41], 256], + 9385: [[40, 110, 41], 256], + 9386: [[40, 111, 41], 256], + 9387: [[40, 112, 41], 256], + 9388: [[40, 113, 41], 256], + 9389: [[40, 114, 41], 256], + 9390: [[40, 115, 41], 256], + 9391: [[40, 116, 41], 256], + 9392: [[40, 117, 41], 256], + 9393: [[40, 118, 41], 256], + 9394: [[40, 119, 41], 256], + 9395: [[40, 120, 41], 256], + 9396: [[40, 121, 41], 256], + 9397: [[40, 122, 41], 256], + 9398: [[65], 256], + 9399: [[66], 256], + 9400: [[67], 256], + 9401: [[68], 256], + 9402: [[69], 256], + 9403: [[70], 256], + 9404: [[71], 256], + 9405: [[72], 256], + 9406: [[73], 256], + 9407: [[74], 256], + 9408: [[75], 256], + 9409: [[76], 256], + 9410: [[77], 256], + 9411: [[78], 256], + 9412: [[79], 256], + 9413: [[80], 256], + 9414: [[81], 256], + 9415: [[82], 256], + 9416: [[83], 256], + 9417: [[84], 256], + 9418: [[85], 256], + 9419: [[86], 256], + 9420: [[87], 256], + 9421: [[88], 256], + 9422: [[89], 256], + 9423: [[90], 256], + 9424: [[97], 256], + 9425: [[98], 256], + 9426: [[99], 256], + 9427: [[100], 256], + 9428: [[101], 256], + 9429: [[102], 256], + 9430: [[103], 256], + 9431: [[104], 256], + 9432: [[105], 256], + 9433: [[106], 256], + 9434: [[107], 256], + 9435: [[108], 256], + 9436: [[109], 256], + 9437: [[110], 256], + 9438: [[111], 256], + 9439: [[112], 256], + 9440: [[113], 256], + 9441: [[114], 256], + 9442: [[115], 256], + 9443: [[116], 256], + 9444: [[117], 256], + 9445: [[118], 256], + 9446: [[119], 256], + 9447: [[120], 256], + 9448: [[121], 256], + 9449: [[122], 256], + 9450: [[48], 256] + }, + 10752: { + 10764: [[8747, 8747, 8747, 8747], 256], + 10868: [[58, 58, 61], 256], + 10869: [[61, 61], 256], + 10870: [[61, 61, 61], 256], + 10972: [[10973, 824], 512] + }, + 11264: { + 11388: [[106], 256], + 11389: [[86], 256], + 11503: [, 230], + 11504: [, 230], + 11505: [, 230] + }, + 11520: { + 11631: [[11617], 256], + 11647: [, 9], + 11744: [, 230], + 11745: [, 230], + 11746: [, 230], + 11747: [, 230], + 11748: [, 230], + 11749: [, 230], + 11750: [, 230], + 11751: [, 230], + 11752: [, 230], + 11753: [, 230], + 11754: [, 230], + 11755: [, 230], + 11756: [, 230], + 11757: [, 230], + 11758: [, 230], + 11759: [, 230], + 11760: [, 230], + 11761: [, 230], + 11762: [, 230], + 11763: [, 230], + 11764: [, 230], + 11765: [, 230], + 11766: [, 230], + 11767: [, 230], + 11768: [, 230], + 11769: [, 230], + 11770: [, 230], + 11771: [, 230], + 11772: [, 230], + 11773: [, 230], + 11774: [, 230], + 11775: [, 230] + }, + 11776: { 11935: [[27597], 256], 12019: [[40863], 256] }, + 12032: { + 12032: [[19968], 256], + 12033: [[20008], 256], + 12034: [[20022], 256], + 12035: [[20031], 256], + 12036: [[20057], 256], + 12037: [[20101], 256], + 12038: [[20108], 256], + 12039: [[20128], 256], + 12040: [[20154], 256], + 12041: [[20799], 256], + 12042: [[20837], 256], + 12043: [[20843], 256], + 12044: [[20866], 256], + 12045: [[20886], 256], + 12046: [[20907], 256], + 12047: [[20960], 256], + 12048: [[20981], 256], + 12049: [[20992], 256], + 12050: [[21147], 256], + 12051: [[21241], 256], + 12052: [[21269], 256], + 12053: [[21274], 256], + 12054: [[21304], 256], + 12055: [[21313], 256], + 12056: [[21340], 256], + 12057: [[21353], 256], + 12058: [[21378], 256], + 12059: [[21430], 256], + 12060: [[21448], 256], + 12061: [[21475], 256], + 12062: [[22231], 256], + 12063: [[22303], 256], + 12064: [[22763], 256], + 12065: [[22786], 256], + 12066: [[22794], 256], + 12067: [[22805], 256], + 12068: [[22823], 256], + 12069: [[22899], 256], + 12070: [[23376], 256], + 12071: [[23424], 256], + 12072: [[23544], 256], + 12073: [[23567], 256], + 12074: [[23586], 256], + 12075: [[23608], 256], + 12076: [[23662], 256], + 12077: [[23665], 256], + 12078: [[24027], 256], + 12079: [[24037], 256], + 12080: [[24049], 256], + 12081: [[24062], 256], + 12082: [[24178], 256], + 12083: [[24186], 256], + 12084: [[24191], 256], + 12085: [[24308], 256], + 12086: [[24318], 256], + 12087: [[24331], 256], + 12088: [[24339], 256], + 12089: [[24400], 256], + 12090: [[24417], 256], + 12091: [[24435], 256], + 12092: [[24515], 256], + 12093: [[25096], 256], + 12094: [[25142], 256], + 12095: [[25163], 256], + 12096: [[25903], 256], + 12097: [[25908], 256], + 12098: [[25991], 256], + 12099: [[26007], 256], + 12100: [[26020], 256], + 12101: [[26041], 256], + 12102: [[26080], 256], + 12103: [[26085], 256], + 12104: [[26352], 256], + 12105: [[26376], 256], + 12106: [[26408], 256], + 12107: [[27424], 256], + 12108: [[27490], 256], + 12109: [[27513], 256], + 12110: [[27571], 256], + 12111: [[27595], 256], + 12112: [[27604], 256], + 12113: [[27611], 256], + 12114: [[27663], 256], + 12115: [[27668], 256], + 12116: [[27700], 256], + 12117: [[28779], 256], + 12118: [[29226], 256], + 12119: [[29238], 256], + 12120: [[29243], 256], + 12121: [[29247], 256], + 12122: [[29255], 256], + 12123: [[29273], 256], + 12124: [[29275], 256], + 12125: [[29356], 256], + 12126: [[29572], 256], + 12127: [[29577], 256], + 12128: [[29916], 256], + 12129: [[29926], 256], + 12130: [[29976], 256], + 12131: [[29983], 256], + 12132: [[29992], 256], + 12133: [[30000], 256], + 12134: [[30091], 256], + 12135: [[30098], 256], + 12136: [[30326], 256], + 12137: [[30333], 256], + 12138: [[30382], 256], + 12139: [[30399], 256], + 12140: [[30446], 256], + 12141: [[30683], 256], + 12142: [[30690], 256], + 12143: [[30707], 256], + 12144: [[31034], 256], + 12145: [[31160], 256], + 12146: [[31166], 256], + 12147: [[31348], 256], + 12148: [[31435], 256], + 12149: [[31481], 256], + 12150: [[31859], 256], + 12151: [[31992], 256], + 12152: [[32566], 256], + 12153: [[32593], 256], + 12154: [[32650], 256], + 12155: [[32701], 256], + 12156: [[32769], 256], + 12157: [[32780], 256], + 12158: [[32786], 256], + 12159: [[32819], 256], + 12160: [[32895], 256], + 12161: [[32905], 256], + 12162: [[33251], 256], + 12163: [[33258], 256], + 12164: [[33267], 256], + 12165: [[33276], 256], + 12166: [[33292], 256], + 12167: [[33307], 256], + 12168: [[33311], 256], + 12169: [[33390], 256], + 12170: [[33394], 256], + 12171: [[33400], 256], + 12172: [[34381], 256], + 12173: [[34411], 256], + 12174: [[34880], 256], + 12175: [[34892], 256], + 12176: [[34915], 256], + 12177: [[35198], 256], + 12178: [[35211], 256], + 12179: [[35282], 256], + 12180: [[35328], 256], + 12181: [[35895], 256], + 12182: [[35910], 256], + 12183: [[35925], 256], + 12184: [[35960], 256], + 12185: [[35997], 256], + 12186: [[36196], 256], + 12187: [[36208], 256], + 12188: [[36275], 256], + 12189: [[36523], 256], + 12190: [[36554], 256], + 12191: [[36763], 256], + 12192: [[36784], 256], + 12193: [[36789], 256], + 12194: [[37009], 256], + 12195: [[37193], 256], + 12196: [[37318], 256], + 12197: [[37324], 256], + 12198: [[37329], 256], + 12199: [[38263], 256], + 12200: [[38272], 256], + 12201: [[38428], 256], + 12202: [[38582], 256], + 12203: [[38585], 256], + 12204: [[38632], 256], + 12205: [[38737], 256], + 12206: [[38750], 256], + 12207: [[38754], 256], + 12208: [[38761], 256], + 12209: [[38859], 256], + 12210: [[38893], 256], + 12211: [[38899], 256], + 12212: [[38913], 256], + 12213: [[39080], 256], + 12214: [[39131], 256], + 12215: [[39135], 256], + 12216: [[39318], 256], + 12217: [[39321], 256], + 12218: [[39340], 256], + 12219: [[39592], 256], + 12220: [[39640], 256], + 12221: [[39647], 256], + 12222: [[39717], 256], + 12223: [[39727], 256], + 12224: [[39730], 256], + 12225: [[39740], 256], + 12226: [[39770], 256], + 12227: [[40165], 256], + 12228: [[40565], 256], + 12229: [[40575], 256], + 12230: [[40613], 256], + 12231: [[40635], 256], + 12232: [[40643], 256], + 12233: [[40653], 256], + 12234: [[40657], 256], + 12235: [[40697], 256], + 12236: [[40701], 256], + 12237: [[40718], 256], + 12238: [[40723], 256], + 12239: [[40736], 256], + 12240: [[40763], 256], + 12241: [[40778], 256], + 12242: [[40786], 256], + 12243: [[40845], 256], + 12244: [[40860], 256], + 12245: [[40864], 256] + }, + 12288: { + 12288: [[32], 256], + 12330: [, 218], + 12331: [, 228], + 12332: [, 232], + 12333: [, 222], + 12334: [, 224], + 12335: [, 224], + 12342: [[12306], 256], + 12344: [[21313], 256], + 12345: [[21316], 256], + 12346: [[21317], 256], + 12358: [, , { 12441: 12436 }], + 12363: [, , { 12441: 12364 }], + 12364: [[12363, 12441]], + 12365: [, , { 12441: 12366 }], + 12366: [[12365, 12441]], + 12367: [, , { 12441: 12368 }], + 12368: [[12367, 12441]], + 12369: [, , { 12441: 12370 }], + 12370: [[12369, 12441]], + 12371: [, , { 12441: 12372 }], + 12372: [[12371, 12441]], + 12373: [, , { 12441: 12374 }], + 12374: [[12373, 12441]], + 12375: [, , { 12441: 12376 }], + 12376: [[12375, 12441]], + 12377: [, , { 12441: 12378 }], + 12378: [[12377, 12441]], + 12379: [, , { 12441: 12380 }], + 12380: [[12379, 12441]], + 12381: [, , { 12441: 12382 }], + 12382: [[12381, 12441]], + 12383: [, , { 12441: 12384 }], + 12384: [[12383, 12441]], + 12385: [, , { 12441: 12386 }], + 12386: [[12385, 12441]], + 12388: [, , { 12441: 12389 }], + 12389: [[12388, 12441]], + 12390: [, , { 12441: 12391 }], + 12391: [[12390, 12441]], + 12392: [, , { 12441: 12393 }], + 12393: [[12392, 12441]], + 12399: [, , { 12441: 12400, 12442: 12401 }], + 12400: [[12399, 12441]], + 12401: [[12399, 12442]], + 12402: [, , { 12441: 12403, 12442: 12404 }], + 12403: [[12402, 12441]], + 12404: [[12402, 12442]], + 12405: [, , { 12441: 12406, 12442: 12407 }], + 12406: [[12405, 12441]], + 12407: [[12405, 12442]], + 12408: [, , { 12441: 12409, 12442: 12410 }], + 12409: [[12408, 12441]], + 12410: [[12408, 12442]], + 12411: [, , { 12441: 12412, 12442: 12413 }], + 12412: [[12411, 12441]], + 12413: [[12411, 12442]], + 12436: [[12358, 12441]], + 12441: [, 8], + 12442: [, 8], + 12443: [[32, 12441], 256], + 12444: [[32, 12442], 256], + 12445: [, , { 12441: 12446 }], + 12446: [[12445, 12441]], + 12447: [[12424, 12426], 256], + 12454: [, , { 12441: 12532 }], + 12459: [, , { 12441: 12460 }], + 12460: [[12459, 12441]], + 12461: [, , { 12441: 12462 }], + 12462: [[12461, 12441]], + 12463: [, , { 12441: 12464 }], + 12464: [[12463, 12441]], + 12465: [, , { 12441: 12466 }], + 12466: [[12465, 12441]], + 12467: [, , { 12441: 12468 }], + 12468: [[12467, 12441]], + 12469: [, , { 12441: 12470 }], + 12470: [[12469, 12441]], + 12471: [, , { 12441: 12472 }], + 12472: [[12471, 12441]], + 12473: [, , { 12441: 12474 }], + 12474: [[12473, 12441]], + 12475: [, , { 12441: 12476 }], + 12476: [[12475, 12441]], + 12477: [, , { 12441: 12478 }], + 12478: [[12477, 12441]], + 12479: [, , { 12441: 12480 }], + 12480: [[12479, 12441]], + 12481: [, , { 12441: 12482 }], + 12482: [[12481, 12441]], + 12484: [, , { 12441: 12485 }], + 12485: [[12484, 12441]], + 12486: [, , { 12441: 12487 }], + 12487: [[12486, 12441]], + 12488: [, , { 12441: 12489 }], + 12489: [[12488, 12441]], + 12495: [, , { 12441: 12496, 12442: 12497 }], + 12496: [[12495, 12441]], + 12497: [[12495, 12442]], + 12498: [, , { 12441: 12499, 12442: 12500 }], + 12499: [[12498, 12441]], + 12500: [[12498, 12442]], + 12501: [, , { 12441: 12502, 12442: 12503 }], + 12502: [[12501, 12441]], + 12503: [[12501, 12442]], + 12504: [, , { 12441: 12505, 12442: 12506 }], + 12505: [[12504, 12441]], + 12506: [[12504, 12442]], + 12507: [, , { 12441: 12508, 12442: 12509 }], + 12508: [[12507, 12441]], + 12509: [[12507, 12442]], + 12527: [, , { 12441: 12535 }], + 12528: [, , { 12441: 12536 }], + 12529: [, , { 12441: 12537 }], + 12530: [, , { 12441: 12538 }], + 12532: [[12454, 12441]], + 12535: [[12527, 12441]], + 12536: [[12528, 12441]], + 12537: [[12529, 12441]], + 12538: [[12530, 12441]], + 12541: [, , { 12441: 12542 }], + 12542: [[12541, 12441]], + 12543: [[12467, 12488], 256] + }, + 12544: { + 12593: [[4352], 256], + 12594: [[4353], 256], + 12595: [[4522], 256], + 12596: [[4354], 256], + 12597: [[4524], 256], + 12598: [[4525], 256], + 12599: [[4355], 256], + 12600: [[4356], 256], + 12601: [[4357], 256], + 12602: [[4528], 256], + 12603: [[4529], 256], + 12604: [[4530], 256], + 12605: [[4531], 256], + 12606: [[4532], 256], + 12607: [[4533], 256], + 12608: [[4378], 256], + 12609: [[4358], 256], + 12610: [[4359], 256], + 12611: [[4360], 256], + 12612: [[4385], 256], + 12613: [[4361], 256], + 12614: [[4362], 256], + 12615: [[4363], 256], + 12616: [[4364], 256], + 12617: [[4365], 256], + 12618: [[4366], 256], + 12619: [[4367], 256], + 12620: [[4368], 256], + 12621: [[4369], 256], + 12622: [[4370], 256], + 12623: [[4449], 256], + 12624: [[4450], 256], + 12625: [[4451], 256], + 12626: [[4452], 256], + 12627: [[4453], 256], + 12628: [[4454], 256], + 12629: [[4455], 256], + 12630: [[4456], 256], + 12631: [[4457], 256], + 12632: [[4458], 256], + 12633: [[4459], 256], + 12634: [[4460], 256], + 12635: [[4461], 256], + 12636: [[4462], 256], + 12637: [[4463], 256], + 12638: [[4464], 256], + 12639: [[4465], 256], + 12640: [[4466], 256], + 12641: [[4467], 256], + 12642: [[4468], 256], + 12643: [[4469], 256], + 12644: [[4448], 256], + 12645: [[4372], 256], + 12646: [[4373], 256], + 12647: [[4551], 256], + 12648: [[4552], 256], + 12649: [[4556], 256], + 12650: [[4558], 256], + 12651: [[4563], 256], + 12652: [[4567], 256], + 12653: [[4569], 256], + 12654: [[4380], 256], + 12655: [[4573], 256], + 12656: [[4575], 256], + 12657: [[4381], 256], + 12658: [[4382], 256], + 12659: [[4384], 256], + 12660: [[4386], 256], + 12661: [[4387], 256], + 12662: [[4391], 256], + 12663: [[4393], 256], + 12664: [[4395], 256], + 12665: [[4396], 256], + 12666: [[4397], 256], + 12667: [[4398], 256], + 12668: [[4399], 256], + 12669: [[4402], 256], + 12670: [[4406], 256], + 12671: [[4416], 256], + 12672: [[4423], 256], + 12673: [[4428], 256], + 12674: [[4593], 256], + 12675: [[4594], 256], + 12676: [[4439], 256], + 12677: [[4440], 256], + 12678: [[4441], 256], + 12679: [[4484], 256], + 12680: [[4485], 256], + 12681: [[4488], 256], + 12682: [[4497], 256], + 12683: [[4498], 256], + 12684: [[4500], 256], + 12685: [[4510], 256], + 12686: [[4513], 256], + 12690: [[19968], 256], + 12691: [[20108], 256], + 12692: [[19977], 256], + 12693: [[22235], 256], + 12694: [[19978], 256], + 12695: [[20013], 256], + 12696: [[19979], 256], + 12697: [[30002], 256], + 12698: [[20057], 256], + 12699: [[19993], 256], + 12700: [[19969], 256], + 12701: [[22825], 256], + 12702: [[22320], 256], + 12703: [[20154], 256] + }, + 12800: { + 12800: [[40, 4352, 41], 256], + 12801: [[40, 4354, 41], 256], + 12802: [[40, 4355, 41], 256], + 12803: [[40, 4357, 41], 256], + 12804: [[40, 4358, 41], 256], + 12805: [[40, 4359, 41], 256], + 12806: [[40, 4361, 41], 256], + 12807: [[40, 4363, 41], 256], + 12808: [[40, 4364, 41], 256], + 12809: [[40, 4366, 41], 256], + 12810: [[40, 4367, 41], 256], + 12811: [[40, 4368, 41], 256], + 12812: [[40, 4369, 41], 256], + 12813: [[40, 4370, 41], 256], + 12814: [[40, 4352, 4449, 41], 256], + 12815: [[40, 4354, 4449, 41], 256], + 12816: [[40, 4355, 4449, 41], 256], + 12817: [[40, 4357, 4449, 41], 256], + 12818: [[40, 4358, 4449, 41], 256], + 12819: [[40, 4359, 4449, 41], 256], + 12820: [[40, 4361, 4449, 41], 256], + 12821: [[40, 4363, 4449, 41], 256], + 12822: [[40, 4364, 4449, 41], 256], + 12823: [[40, 4366, 4449, 41], 256], + 12824: [[40, 4367, 4449, 41], 256], + 12825: [[40, 4368, 4449, 41], 256], + 12826: [[40, 4369, 4449, 41], 256], + 12827: [[40, 4370, 4449, 41], 256], + 12828: [[40, 4364, 4462, 41], 256], + 12829: [[40, 4363, 4457, 4364, 4453, 4523, 41], 256], + 12830: [[40, 4363, 4457, 4370, 4462, 41], 256], + 12832: [[40, 19968, 41], 256], + 12833: [[40, 20108, 41], 256], + 12834: [[40, 19977, 41], 256], + 12835: [[40, 22235, 41], 256], + 12836: [[40, 20116, 41], 256], + 12837: [[40, 20845, 41], 256], + 12838: [[40, 19971, 41], 256], + 12839: [[40, 20843, 41], 256], + 12840: [[40, 20061, 41], 256], + 12841: [[40, 21313, 41], 256], + 12842: [[40, 26376, 41], 256], + 12843: [[40, 28779, 41], 256], + 12844: [[40, 27700, 41], 256], + 12845: [[40, 26408, 41], 256], + 12846: [[40, 37329, 41], 256], + 12847: [[40, 22303, 41], 256], + 12848: [[40, 26085, 41], 256], + 12849: [[40, 26666, 41], 256], + 12850: [[40, 26377, 41], 256], + 12851: [[40, 31038, 41], 256], + 12852: [[40, 21517, 41], 256], + 12853: [[40, 29305, 41], 256], + 12854: [[40, 36001, 41], 256], + 12855: [[40, 31069, 41], 256], + 12856: [[40, 21172, 41], 256], + 12857: [[40, 20195, 41], 256], + 12858: [[40, 21628, 41], 256], + 12859: [[40, 23398, 41], 256], + 12860: [[40, 30435, 41], 256], + 12861: [[40, 20225, 41], 256], + 12862: [[40, 36039, 41], 256], + 12863: [[40, 21332, 41], 256], + 12864: [[40, 31085, 41], 256], + 12865: [[40, 20241, 41], 256], + 12866: [[40, 33258, 41], 256], + 12867: [[40, 33267, 41], 256], + 12868: [[21839], 256], + 12869: [[24188], 256], + 12870: [[25991], 256], + 12871: [[31631], 256], + 12880: [[80, 84, 69], 256], + 12881: [[50, 49], 256], + 12882: [[50, 50], 256], + 12883: [[50, 51], 256], + 12884: [[50, 52], 256], + 12885: [[50, 53], 256], + 12886: [[50, 54], 256], + 12887: [[50, 55], 256], + 12888: [[50, 56], 256], + 12889: [[50, 57], 256], + 12890: [[51, 48], 256], + 12891: [[51, 49], 256], + 12892: [[51, 50], 256], + 12893: [[51, 51], 256], + 12894: [[51, 52], 256], + 12895: [[51, 53], 256], + 12896: [[4352], 256], + 12897: [[4354], 256], + 12898: [[4355], 256], + 12899: [[4357], 256], + 12900: [[4358], 256], + 12901: [[4359], 256], + 12902: [[4361], 256], + 12903: [[4363], 256], + 12904: [[4364], 256], + 12905: [[4366], 256], + 12906: [[4367], 256], + 12907: [[4368], 256], + 12908: [[4369], 256], + 12909: [[4370], 256], + 12910: [[4352, 4449], 256], + 12911: [[4354, 4449], 256], + 12912: [[4355, 4449], 256], + 12913: [[4357, 4449], 256], + 12914: [[4358, 4449], 256], + 12915: [[4359, 4449], 256], + 12916: [[4361, 4449], 256], + 12917: [[4363, 4449], 256], + 12918: [[4364, 4449], 256], + 12919: [[4366, 4449], 256], + 12920: [[4367, 4449], 256], + 12921: [[4368, 4449], 256], + 12922: [[4369, 4449], 256], + 12923: [[4370, 4449], 256], + 12924: [[4366, 4449, 4535, 4352, 4457], 256], + 12925: [[4364, 4462, 4363, 4468], 256], + 12926: [[4363, 4462], 256], + 12928: [[19968], 256], + 12929: [[20108], 256], + 12930: [[19977], 256], + 12931: [[22235], 256], + 12932: [[20116], 256], + 12933: [[20845], 256], + 12934: [[19971], 256], + 12935: [[20843], 256], + 12936: [[20061], 256], + 12937: [[21313], 256], + 12938: [[26376], 256], + 12939: [[28779], 256], + 12940: [[27700], 256], + 12941: [[26408], 256], + 12942: [[37329], 256], + 12943: [[22303], 256], + 12944: [[26085], 256], + 12945: [[26666], 256], + 12946: [[26377], 256], + 12947: [[31038], 256], + 12948: [[21517], 256], + 12949: [[29305], 256], + 12950: [[36001], 256], + 12951: [[31069], 256], + 12952: [[21172], 256], + 12953: [[31192], 256], + 12954: [[30007], 256], + 12955: [[22899], 256], + 12956: [[36969], 256], + 12957: [[20778], 256], + 12958: [[21360], 256], + 12959: [[27880], 256], + 12960: [[38917], 256], + 12961: [[20241], 256], + 12962: [[20889], 256], + 12963: [[27491], 256], + 12964: [[19978], 256], + 12965: [[20013], 256], + 12966: [[19979], 256], + 12967: [[24038], 256], + 12968: [[21491], 256], + 12969: [[21307], 256], + 12970: [[23447], 256], + 12971: [[23398], 256], + 12972: [[30435], 256], + 12973: [[20225], 256], + 12974: [[36039], 256], + 12975: [[21332], 256], + 12976: [[22812], 256], + 12977: [[51, 54], 256], + 12978: [[51, 55], 256], + 12979: [[51, 56], 256], + 12980: [[51, 57], 256], + 12981: [[52, 48], 256], + 12982: [[52, 49], 256], + 12983: [[52, 50], 256], + 12984: [[52, 51], 256], + 12985: [[52, 52], 256], + 12986: [[52, 53], 256], + 12987: [[52, 54], 256], + 12988: [[52, 55], 256], + 12989: [[52, 56], 256], + 12990: [[52, 57], 256], + 12991: [[53, 48], 256], + 12992: [[49, 26376], 256], + 12993: [[50, 26376], 256], + 12994: [[51, 26376], 256], + 12995: [[52, 26376], 256], + 12996: [[53, 26376], 256], + 12997: [[54, 26376], 256], + 12998: [[55, 26376], 256], + 12999: [[56, 26376], 256], + 13000: [[57, 26376], 256], + 13001: [[49, 48, 26376], 256], + 13002: [[49, 49, 26376], 256], + 13003: [[49, 50, 26376], 256], + 13004: [[72, 103], 256], + 13005: [[101, 114, 103], 256], + 13006: [[101, 86], 256], + 13007: [[76, 84, 68], 256], + 13008: [[12450], 256], + 13009: [[12452], 256], + 13010: [[12454], 256], + 13011: [[12456], 256], + 13012: [[12458], 256], + 13013: [[12459], 256], + 13014: [[12461], 256], + 13015: [[12463], 256], + 13016: [[12465], 256], + 13017: [[12467], 256], + 13018: [[12469], 256], + 13019: [[12471], 256], + 13020: [[12473], 256], + 13021: [[12475], 256], + 13022: [[12477], 256], + 13023: [[12479], 256], + 13024: [[12481], 256], + 13025: [[12484], 256], + 13026: [[12486], 256], + 13027: [[12488], 256], + 13028: [[12490], 256], + 13029: [[12491], 256], + 13030: [[12492], 256], + 13031: [[12493], 256], + 13032: [[12494], 256], + 13033: [[12495], 256], + 13034: [[12498], 256], + 13035: [[12501], 256], + 13036: [[12504], 256], + 13037: [[12507], 256], + 13038: [[12510], 256], + 13039: [[12511], 256], + 13040: [[12512], 256], + 13041: [[12513], 256], + 13042: [[12514], 256], + 13043: [[12516], 256], + 13044: [[12518], 256], + 13045: [[12520], 256], + 13046: [[12521], 256], + 13047: [[12522], 256], + 13048: [[12523], 256], + 13049: [[12524], 256], + 13050: [[12525], 256], + 13051: [[12527], 256], + 13052: [[12528], 256], + 13053: [[12529], 256], + 13054: [[12530], 256] + }, + 13056: { + 13056: [[12450, 12497, 12540, 12488], 256], + 13057: [[12450, 12523, 12501, 12449], 256], + 13058: [[12450, 12531, 12506, 12450], 256], + 13059: [[12450, 12540, 12523], 256], + 13060: [[12452, 12491, 12531, 12464], 256], + 13061: [[12452, 12531, 12481], 256], + 13062: [[12454, 12457, 12531], 256], + 13063: [[12456, 12473, 12463, 12540, 12489], 256], + 13064: [[12456, 12540, 12459, 12540], 256], + 13065: [[12458, 12531, 12473], 256], + 13066: [[12458, 12540, 12512], 256], + 13067: [[12459, 12452, 12522], 256], + 13068: [[12459, 12521, 12483, 12488], 256], + 13069: [[12459, 12525, 12522, 12540], 256], + 13070: [[12460, 12525, 12531], 256], + 13071: [[12460, 12531, 12510], 256], + 13072: [[12462, 12460], 256], + 13073: [[12462, 12491, 12540], 256], + 13074: [[12461, 12517, 12522, 12540], 256], + 13075: [[12462, 12523, 12480, 12540], 256], + 13076: [[12461, 12525], 256], + 13077: [[12461, 12525, 12464, 12521, 12512], 256], + 13078: [[12461, 12525, 12513, 12540, 12488, 12523], 256], + 13079: [[12461, 12525, 12527, 12483, 12488], 256], + 13080: [[12464, 12521, 12512], 256], + 13081: [[12464, 12521, 12512, 12488, 12531], 256], + 13082: [[12463, 12523, 12476, 12452, 12525], 256], + 13083: [[12463, 12525, 12540, 12493], 256], + 13084: [[12465, 12540, 12473], 256], + 13085: [[12467, 12523, 12490], 256], + 13086: [[12467, 12540, 12509], 256], + 13087: [[12469, 12452, 12463, 12523], 256], + 13088: [[12469, 12531, 12481, 12540, 12512], 256], + 13089: [[12471, 12522, 12531, 12464], 256], + 13090: [[12475, 12531, 12481], 256], + 13091: [[12475, 12531, 12488], 256], + 13092: [[12480, 12540, 12473], 256], + 13093: [[12487, 12471], 256], + 13094: [[12489, 12523], 256], + 13095: [[12488, 12531], 256], + 13096: [[12490, 12494], 256], + 13097: [[12494, 12483, 12488], 256], + 13098: [[12495, 12452, 12484], 256], + 13099: [[12497, 12540, 12475, 12531, 12488], 256], + 13100: [[12497, 12540, 12484], 256], + 13101: [[12496, 12540, 12524, 12523], 256], + 13102: [[12500, 12450, 12473, 12488, 12523], 256], + 13103: [[12500, 12463, 12523], 256], + 13104: [[12500, 12467], 256], + 13105: [[12499, 12523], 256], + 13106: [[12501, 12449, 12521, 12483, 12489], 256], + 13107: [[12501, 12451, 12540, 12488], 256], + 13108: [[12502, 12483, 12471, 12455, 12523], 256], + 13109: [[12501, 12521, 12531], 256], + 13110: [[12504, 12463, 12479, 12540, 12523], 256], + 13111: [[12506, 12477], 256], + 13112: [[12506, 12491, 12498], 256], + 13113: [[12504, 12523, 12484], 256], + 13114: [[12506, 12531, 12473], 256], + 13115: [[12506, 12540, 12472], 256], + 13116: [[12505, 12540, 12479], 256], + 13117: [[12509, 12452, 12531, 12488], 256], + 13118: [[12508, 12523, 12488], 256], + 13119: [[12507, 12531], 256], + 13120: [[12509, 12531, 12489], 256], + 13121: [[12507, 12540, 12523], 256], + 13122: [[12507, 12540, 12531], 256], + 13123: [[12510, 12452, 12463, 12525], 256], + 13124: [[12510, 12452, 12523], 256], + 13125: [[12510, 12483, 12495], 256], + 13126: [[12510, 12523, 12463], 256], + 13127: [[12510, 12531, 12471, 12519, 12531], 256], + 13128: [[12511, 12463, 12525, 12531], 256], + 13129: [[12511, 12522], 256], + 13130: [[12511, 12522, 12496, 12540, 12523], 256], + 13131: [[12513, 12460], 256], + 13132: [[12513, 12460, 12488, 12531], 256], + 13133: [[12513, 12540, 12488, 12523], 256], + 13134: [[12516, 12540, 12489], 256], + 13135: [[12516, 12540, 12523], 256], + 13136: [[12518, 12450, 12531], 256], + 13137: [[12522, 12483, 12488, 12523], 256], + 13138: [[12522, 12521], 256], + 13139: [[12523, 12500, 12540], 256], + 13140: [[12523, 12540, 12502, 12523], 256], + 13141: [[12524, 12512], 256], + 13142: [[12524, 12531, 12488, 12466, 12531], 256], + 13143: [[12527, 12483, 12488], 256], + 13144: [[48, 28857], 256], + 13145: [[49, 28857], 256], + 13146: [[50, 28857], 256], + 13147: [[51, 28857], 256], + 13148: [[52, 28857], 256], + 13149: [[53, 28857], 256], + 13150: [[54, 28857], 256], + 13151: [[55, 28857], 256], + 13152: [[56, 28857], 256], + 13153: [[57, 28857], 256], + 13154: [[49, 48, 28857], 256], + 13155: [[49, 49, 28857], 256], + 13156: [[49, 50, 28857], 256], + 13157: [[49, 51, 28857], 256], + 13158: [[49, 52, 28857], 256], + 13159: [[49, 53, 28857], 256], + 13160: [[49, 54, 28857], 256], + 13161: [[49, 55, 28857], 256], + 13162: [[49, 56, 28857], 256], + 13163: [[49, 57, 28857], 256], + 13164: [[50, 48, 28857], 256], + 13165: [[50, 49, 28857], 256], + 13166: [[50, 50, 28857], 256], + 13167: [[50, 51, 28857], 256], + 13168: [[50, 52, 28857], 256], + 13169: [[104, 80, 97], 256], + 13170: [[100, 97], 256], + 13171: [[65, 85], 256], + 13172: [[98, 97, 114], 256], + 13173: [[111, 86], 256], + 13174: [[112, 99], 256], + 13175: [[100, 109], 256], + 13176: [[100, 109, 178], 256], + 13177: [[100, 109, 179], 256], + 13178: [[73, 85], 256], + 13179: [[24179, 25104], 256], + 13180: [[26157, 21644], 256], + 13181: [[22823, 27491], 256], + 13182: [[26126, 27835], 256], + 13183: [[26666, 24335, 20250, 31038], 256], + 13184: [[112, 65], 256], + 13185: [[110, 65], 256], + 13186: [[956, 65], 256], + 13187: [[109, 65], 256], + 13188: [[107, 65], 256], + 13189: [[75, 66], 256], + 13190: [[77, 66], 256], + 13191: [[71, 66], 256], + 13192: [[99, 97, 108], 256], + 13193: [[107, 99, 97, 108], 256], + 13194: [[112, 70], 256], + 13195: [[110, 70], 256], + 13196: [[956, 70], 256], + 13197: [[956, 103], 256], + 13198: [[109, 103], 256], + 13199: [[107, 103], 256], + 13200: [[72, 122], 256], + 13201: [[107, 72, 122], 256], + 13202: [[77, 72, 122], 256], + 13203: [[71, 72, 122], 256], + 13204: [[84, 72, 122], 256], + 13205: [[956, 8467], 256], + 13206: [[109, 8467], 256], + 13207: [[100, 8467], 256], + 13208: [[107, 8467], 256], + 13209: [[102, 109], 256], + 13210: [[110, 109], 256], + 13211: [[956, 109], 256], + 13212: [[109, 109], 256], + 13213: [[99, 109], 256], + 13214: [[107, 109], 256], + 13215: [[109, 109, 178], 256], + 13216: [[99, 109, 178], 256], + 13217: [[109, 178], 256], + 13218: [[107, 109, 178], 256], + 13219: [[109, 109, 179], 256], + 13220: [[99, 109, 179], 256], + 13221: [[109, 179], 256], + 13222: [[107, 109, 179], 256], + 13223: [[109, 8725, 115], 256], + 13224: [[109, 8725, 115, 178], 256], + 13225: [[80, 97], 256], + 13226: [[107, 80, 97], 256], + 13227: [[77, 80, 97], 256], + 13228: [[71, 80, 97], 256], + 13229: [[114, 97, 100], 256], + 13230: [[114, 97, 100, 8725, 115], 256], + 13231: [[114, 97, 100, 8725, 115, 178], 256], + 13232: [[112, 115], 256], + 13233: [[110, 115], 256], + 13234: [[956, 115], 256], + 13235: [[109, 115], 256], + 13236: [[112, 86], 256], + 13237: [[110, 86], 256], + 13238: [[956, 86], 256], + 13239: [[109, 86], 256], + 13240: [[107, 86], 256], + 13241: [[77, 86], 256], + 13242: [[112, 87], 256], + 13243: [[110, 87], 256], + 13244: [[956, 87], 256], + 13245: [[109, 87], 256], + 13246: [[107, 87], 256], + 13247: [[77, 87], 256], + 13248: [[107, 937], 256], + 13249: [[77, 937], 256], + 13250: [[97, 46, 109, 46], 256], + 13251: [[66, 113], 256], + 13252: [[99, 99], 256], + 13253: [[99, 100], 256], + 13254: [[67, 8725, 107, 103], 256], + 13255: [[67, 111, 46], 256], + 13256: [[100, 66], 256], + 13257: [[71, 121], 256], + 13258: [[104, 97], 256], + 13259: [[72, 80], 256], + 13260: [[105, 110], 256], + 13261: [[75, 75], 256], + 13262: [[75, 77], 256], + 13263: [[107, 116], 256], + 13264: [[108, 109], 256], + 13265: [[108, 110], 256], + 13266: [[108, 111, 103], 256], + 13267: [[108, 120], 256], + 13268: [[109, 98], 256], + 13269: [[109, 105, 108], 256], + 13270: [[109, 111, 108], 256], + 13271: [[80, 72], 256], + 13272: [[112, 46, 109, 46], 256], + 13273: [[80, 80, 77], 256], + 13274: [[80, 82], 256], + 13275: [[115, 114], 256], + 13276: [[83, 118], 256], + 13277: [[87, 98], 256], + 13278: [[86, 8725, 109], 256], + 13279: [[65, 8725, 109], 256], + 13280: [[49, 26085], 256], + 13281: [[50, 26085], 256], + 13282: [[51, 26085], 256], + 13283: [[52, 26085], 256], + 13284: [[53, 26085], 256], + 13285: [[54, 26085], 256], + 13286: [[55, 26085], 256], + 13287: [[56, 26085], 256], + 13288: [[57, 26085], 256], + 13289: [[49, 48, 26085], 256], + 13290: [[49, 49, 26085], 256], + 13291: [[49, 50, 26085], 256], + 13292: [[49, 51, 26085], 256], + 13293: [[49, 52, 26085], 256], + 13294: [[49, 53, 26085], 256], + 13295: [[49, 54, 26085], 256], + 13296: [[49, 55, 26085], 256], + 13297: [[49, 56, 26085], 256], + 13298: [[49, 57, 26085], 256], + 13299: [[50, 48, 26085], 256], + 13300: [[50, 49, 26085], 256], + 13301: [[50, 50, 26085], 256], + 13302: [[50, 51, 26085], 256], + 13303: [[50, 52, 26085], 256], + 13304: [[50, 53, 26085], 256], + 13305: [[50, 54, 26085], 256], + 13306: [[50, 55, 26085], 256], + 13307: [[50, 56, 26085], 256], + 13308: [[50, 57, 26085], 256], + 13309: [[51, 48, 26085], 256], + 13310: [[51, 49, 26085], 256], + 13311: [[103, 97, 108], 256] + }, + 42496: { + 42607: [, 230], + 42612: [, 230], + 42613: [, 230], + 42614: [, 230], + 42615: [, 230], + 42616: [, 230], + 42617: [, 230], + 42618: [, 230], + 42619: [, 230], + 42620: [, 230], + 42621: [, 230], + 42655: [, 230], + 42736: [, 230], + 42737: [, 230] + }, + 42752: { 42864: [[42863], 256], 43000: [[294], 256], 43001: [[339], 256] }, + 43008: { + 43014: [, 9], + 43204: [, 9], + 43232: [, 230], + 43233: [, 230], + 43234: [, 230], + 43235: [, 230], + 43236: [, 230], + 43237: [, 230], + 43238: [, 230], + 43239: [, 230], + 43240: [, 230], + 43241: [, 230], + 43242: [, 230], + 43243: [, 230], + 43244: [, 230], + 43245: [, 230], + 43246: [, 230], + 43247: [, 230], + 43248: [, 230], + 43249: [, 230] + }, + 43264: { + 43307: [, 220], + 43308: [, 220], + 43309: [, 220], + 43347: [, 9], + 43443: [, 7], + 43456: [, 9] + }, + 43520: { + 43696: [, 230], + 43698: [, 230], + 43699: [, 230], + 43700: [, 220], + 43703: [, 230], + 43704: [, 230], + 43710: [, 230], + 43711: [, 230], + 43713: [, 230], + 43766: [, 9] + }, + 43776: { 44013: [, 9] }, + 53504: { + 119134: [[119127, 119141], 512], + 119135: [[119128, 119141], 512], + 119136: [[119135, 119150], 512], + 119137: [[119135, 119151], 512], + 119138: [[119135, 119152], 512], + 119139: [[119135, 119153], 512], + 119140: [[119135, 119154], 512], + 119141: [, 216], + 119142: [, 216], + 119143: [, 1], + 119144: [, 1], + 119145: [, 1], + 119149: [, 226], + 119150: [, 216], + 119151: [, 216], + 119152: [, 216], + 119153: [, 216], + 119154: [, 216], + 119163: [, 220], + 119164: [, 220], + 119165: [, 220], + 119166: [, 220], + 119167: [, 220], + 119168: [, 220], + 119169: [, 220], + 119170: [, 220], + 119173: [, 230], + 119174: [, 230], + 119175: [, 230], + 119176: [, 230], + 119177: [, 230], + 119178: [, 220], + 119179: [, 220], + 119210: [, 230], + 119211: [, 230], + 119212: [, 230], + 119213: [, 230], + 119227: [[119225, 119141], 512], + 119228: [[119226, 119141], 512], + 119229: [[119227, 119150], 512], + 119230: [[119228, 119150], 512], + 119231: [[119227, 119151], 512], + 119232: [[119228, 119151], 512] + }, + 53760: { 119362: [, 230], 119363: [, 230], 119364: [, 230] }, + 54272: { + 119808: [[65], 256], + 119809: [[66], 256], + 119810: [[67], 256], + 119811: [[68], 256], + 119812: [[69], 256], + 119813: [[70], 256], + 119814: [[71], 256], + 119815: [[72], 256], + 119816: [[73], 256], + 119817: [[74], 256], + 119818: [[75], 256], + 119819: [[76], 256], + 119820: [[77], 256], + 119821: [[78], 256], + 119822: [[79], 256], + 119823: [[80], 256], + 119824: [[81], 256], + 119825: [[82], 256], + 119826: [[83], 256], + 119827: [[84], 256], + 119828: [[85], 256], + 119829: [[86], 256], + 119830: [[87], 256], + 119831: [[88], 256], + 119832: [[89], 256], + 119833: [[90], 256], + 119834: [[97], 256], + 119835: [[98], 256], + 119836: [[99], 256], + 119837: [[100], 256], + 119838: [[101], 256], + 119839: [[102], 256], + 119840: [[103], 256], + 119841: [[104], 256], + 119842: [[105], 256], + 119843: [[106], 256], + 119844: [[107], 256], + 119845: [[108], 256], + 119846: [[109], 256], + 119847: [[110], 256], + 119848: [[111], 256], + 119849: [[112], 256], + 119850: [[113], 256], + 119851: [[114], 256], + 119852: [[115], 256], + 119853: [[116], 256], + 119854: [[117], 256], + 119855: [[118], 256], + 119856: [[119], 256], + 119857: [[120], 256], + 119858: [[121], 256], + 119859: [[122], 256], + 119860: [[65], 256], + 119861: [[66], 256], + 119862: [[67], 256], + 119863: [[68], 256], + 119864: [[69], 256], + 119865: [[70], 256], + 119866: [[71], 256], + 119867: [[72], 256], + 119868: [[73], 256], + 119869: [[74], 256], + 119870: [[75], 256], + 119871: [[76], 256], + 119872: [[77], 256], + 119873: [[78], 256], + 119874: [[79], 256], + 119875: [[80], 256], + 119876: [[81], 256], + 119877: [[82], 256], + 119878: [[83], 256], + 119879: [[84], 256], + 119880: [[85], 256], + 119881: [[86], 256], + 119882: [[87], 256], + 119883: [[88], 256], + 119884: [[89], 256], + 119885: [[90], 256], + 119886: [[97], 256], + 119887: [[98], 256], + 119888: [[99], 256], + 119889: [[100], 256], + 119890: [[101], 256], + 119891: [[102], 256], + 119892: [[103], 256], + 119894: [[105], 256], + 119895: [[106], 256], + 119896: [[107], 256], + 119897: [[108], 256], + 119898: [[109], 256], + 119899: [[110], 256], + 119900: [[111], 256], + 119901: [[112], 256], + 119902: [[113], 256], + 119903: [[114], 256], + 119904: [[115], 256], + 119905: [[116], 256], + 119906: [[117], 256], + 119907: [[118], 256], + 119908: [[119], 256], + 119909: [[120], 256], + 119910: [[121], 256], + 119911: [[122], 256], + 119912: [[65], 256], + 119913: [[66], 256], + 119914: [[67], 256], + 119915: [[68], 256], + 119916: [[69], 256], + 119917: [[70], 256], + 119918: [[71], 256], + 119919: [[72], 256], + 119920: [[73], 256], + 119921: [[74], 256], + 119922: [[75], 256], + 119923: [[76], 256], + 119924: [[77], 256], + 119925: [[78], 256], + 119926: [[79], 256], + 119927: [[80], 256], + 119928: [[81], 256], + 119929: [[82], 256], + 119930: [[83], 256], + 119931: [[84], 256], + 119932: [[85], 256], + 119933: [[86], 256], + 119934: [[87], 256], + 119935: [[88], 256], + 119936: [[89], 256], + 119937: [[90], 256], + 119938: [[97], 256], + 119939: [[98], 256], + 119940: [[99], 256], + 119941: [[100], 256], + 119942: [[101], 256], + 119943: [[102], 256], + 119944: [[103], 256], + 119945: [[104], 256], + 119946: [[105], 256], + 119947: [[106], 256], + 119948: [[107], 256], + 119949: [[108], 256], + 119950: [[109], 256], + 119951: [[110], 256], + 119952: [[111], 256], + 119953: [[112], 256], + 119954: [[113], 256], + 119955: [[114], 256], + 119956: [[115], 256], + 119957: [[116], 256], + 119958: [[117], 256], + 119959: [[118], 256], + 119960: [[119], 256], + 119961: [[120], 256], + 119962: [[121], 256], + 119963: [[122], 256], + 119964: [[65], 256], + 119966: [[67], 256], + 119967: [[68], 256], + 119970: [[71], 256], + 119973: [[74], 256], + 119974: [[75], 256], + 119977: [[78], 256], + 119978: [[79], 256], + 119979: [[80], 256], + 119980: [[81], 256], + 119982: [[83], 256], + 119983: [[84], 256], + 119984: [[85], 256], + 119985: [[86], 256], + 119986: [[87], 256], + 119987: [[88], 256], + 119988: [[89], 256], + 119989: [[90], 256], + 119990: [[97], 256], + 119991: [[98], 256], + 119992: [[99], 256], + 119993: [[100], 256], + 119995: [[102], 256], + 119997: [[104], 256], + 119998: [[105], 256], + 119999: [[106], 256], + 120000: [[107], 256], + 120001: [[108], 256], + 120002: [[109], 256], + 120003: [[110], 256], + 120005: [[112], 256], + 120006: [[113], 256], + 120007: [[114], 256], + 120008: [[115], 256], + 120009: [[116], 256], + 120010: [[117], 256], + 120011: [[118], 256], + 120012: [[119], 256], + 120013: [[120], 256], + 120014: [[121], 256], + 120015: [[122], 256], + 120016: [[65], 256], + 120017: [[66], 256], + 120018: [[67], 256], + 120019: [[68], 256], + 120020: [[69], 256], + 120021: [[70], 256], + 120022: [[71], 256], + 120023: [[72], 256], + 120024: [[73], 256], + 120025: [[74], 256], + 120026: [[75], 256], + 120027: [[76], 256], + 120028: [[77], 256], + 120029: [[78], 256], + 120030: [[79], 256], + 120031: [[80], 256], + 120032: [[81], 256], + 120033: [[82], 256], + 120034: [[83], 256], + 120035: [[84], 256], + 120036: [[85], 256], + 120037: [[86], 256], + 120038: [[87], 256], + 120039: [[88], 256], + 120040: [[89], 256], + 120041: [[90], 256], + 120042: [[97], 256], + 120043: [[98], 256], + 120044: [[99], 256], + 120045: [[100], 256], + 120046: [[101], 256], + 120047: [[102], 256], + 120048: [[103], 256], + 120049: [[104], 256], + 120050: [[105], 256], + 120051: [[106], 256], + 120052: [[107], 256], + 120053: [[108], 256], + 120054: [[109], 256], + 120055: [[110], 256], + 120056: [[111], 256], + 120057: [[112], 256], + 120058: [[113], 256], + 120059: [[114], 256], + 120060: [[115], 256], + 120061: [[116], 256], + 120062: [[117], 256], + 120063: [[118], 256] + }, + 54528: { + 120064: [[119], 256], + 120065: [[120], 256], + 120066: [[121], 256], + 120067: [[122], 256], + 120068: [[65], 256], + 120069: [[66], 256], + 120071: [[68], 256], + 120072: [[69], 256], + 120073: [[70], 256], + 120074: [[71], 256], + 120077: [[74], 256], + 120078: [[75], 256], + 120079: [[76], 256], + 120080: [[77], 256], + 120081: [[78], 256], + 120082: [[79], 256], + 120083: [[80], 256], + 120084: [[81], 256], + 120086: [[83], 256], + 120087: [[84], 256], + 120088: [[85], 256], + 120089: [[86], 256], + 120090: [[87], 256], + 120091: [[88], 256], + 120092: [[89], 256], + 120094: [[97], 256], + 120095: [[98], 256], + 120096: [[99], 256], + 120097: [[100], 256], + 120098: [[101], 256], + 120099: [[102], 256], + 120100: [[103], 256], + 120101: [[104], 256], + 120102: [[105], 256], + 120103: [[106], 256], + 120104: [[107], 256], + 120105: [[108], 256], + 120106: [[109], 256], + 120107: [[110], 256], + 120108: [[111], 256], + 120109: [[112], 256], + 120110: [[113], 256], + 120111: [[114], 256], + 120112: [[115], 256], + 120113: [[116], 256], + 120114: [[117], 256], + 120115: [[118], 256], + 120116: [[119], 256], + 120117: [[120], 256], + 120118: [[121], 256], + 120119: [[122], 256], + 120120: [[65], 256], + 120121: [[66], 256], + 120123: [[68], 256], + 120124: [[69], 256], + 120125: [[70], 256], + 120126: [[71], 256], + 120128: [[73], 256], + 120129: [[74], 256], + 120130: [[75], 256], + 120131: [[76], 256], + 120132: [[77], 256], + 120134: [[79], 256], + 120138: [[83], 256], + 120139: [[84], 256], + 120140: [[85], 256], + 120141: [[86], 256], + 120142: [[87], 256], + 120143: [[88], 256], + 120144: [[89], 256], + 120146: [[97], 256], + 120147: [[98], 256], + 120148: [[99], 256], + 120149: [[100], 256], + 120150: [[101], 256], + 120151: [[102], 256], + 120152: [[103], 256], + 120153: [[104], 256], + 120154: [[105], 256], + 120155: [[106], 256], + 120156: [[107], 256], + 120157: [[108], 256], + 120158: [[109], 256], + 120159: [[110], 256], + 120160: [[111], 256], + 120161: [[112], 256], + 120162: [[113], 256], + 120163: [[114], 256], + 120164: [[115], 256], + 120165: [[116], 256], + 120166: [[117], 256], + 120167: [[118], 256], + 120168: [[119], 256], + 120169: [[120], 256], + 120170: [[121], 256], + 120171: [[122], 256], + 120172: [[65], 256], + 120173: [[66], 256], + 120174: [[67], 256], + 120175: [[68], 256], + 120176: [[69], 256], + 120177: [[70], 256], + 120178: [[71], 256], + 120179: [[72], 256], + 120180: [[73], 256], + 120181: [[74], 256], + 120182: [[75], 256], + 120183: [[76], 256], + 120184: [[77], 256], + 120185: [[78], 256], + 120186: [[79], 256], + 120187: [[80], 256], + 120188: [[81], 256], + 120189: [[82], 256], + 120190: [[83], 256], + 120191: [[84], 256], + 120192: [[85], 256], + 120193: [[86], 256], + 120194: [[87], 256], + 120195: [[88], 256], + 120196: [[89], 256], + 120197: [[90], 256], + 120198: [[97], 256], + 120199: [[98], 256], + 120200: [[99], 256], + 120201: [[100], 256], + 120202: [[101], 256], + 120203: [[102], 256], + 120204: [[103], 256], + 120205: [[104], 256], + 120206: [[105], 256], + 120207: [[106], 256], + 120208: [[107], 256], + 120209: [[108], 256], + 120210: [[109], 256], + 120211: [[110], 256], + 120212: [[111], 256], + 120213: [[112], 256], + 120214: [[113], 256], + 120215: [[114], 256], + 120216: [[115], 256], + 120217: [[116], 256], + 120218: [[117], 256], + 120219: [[118], 256], + 120220: [[119], 256], + 120221: [[120], 256], + 120222: [[121], 256], + 120223: [[122], 256], + 120224: [[65], 256], + 120225: [[66], 256], + 120226: [[67], 256], + 120227: [[68], 256], + 120228: [[69], 256], + 120229: [[70], 256], + 120230: [[71], 256], + 120231: [[72], 256], + 120232: [[73], 256], + 120233: [[74], 256], + 120234: [[75], 256], + 120235: [[76], 256], + 120236: [[77], 256], + 120237: [[78], 256], + 120238: [[79], 256], + 120239: [[80], 256], + 120240: [[81], 256], + 120241: [[82], 256], + 120242: [[83], 256], + 120243: [[84], 256], + 120244: [[85], 256], + 120245: [[86], 256], + 120246: [[87], 256], + 120247: [[88], 256], + 120248: [[89], 256], + 120249: [[90], 256], + 120250: [[97], 256], + 120251: [[98], 256], + 120252: [[99], 256], + 120253: [[100], 256], + 120254: [[101], 256], + 120255: [[102], 256], + 120256: [[103], 256], + 120257: [[104], 256], + 120258: [[105], 256], + 120259: [[106], 256], + 120260: [[107], 256], + 120261: [[108], 256], + 120262: [[109], 256], + 120263: [[110], 256], + 120264: [[111], 256], + 120265: [[112], 256], + 120266: [[113], 256], + 120267: [[114], 256], + 120268: [[115], 256], + 120269: [[116], 256], + 120270: [[117], 256], + 120271: [[118], 256], + 120272: [[119], 256], + 120273: [[120], 256], + 120274: [[121], 256], + 120275: [[122], 256], + 120276: [[65], 256], + 120277: [[66], 256], + 120278: [[67], 256], + 120279: [[68], 256], + 120280: [[69], 256], + 120281: [[70], 256], + 120282: [[71], 256], + 120283: [[72], 256], + 120284: [[73], 256], + 120285: [[74], 256], + 120286: [[75], 256], + 120287: [[76], 256], + 120288: [[77], 256], + 120289: [[78], 256], + 120290: [[79], 256], + 120291: [[80], 256], + 120292: [[81], 256], + 120293: [[82], 256], + 120294: [[83], 256], + 120295: [[84], 256], + 120296: [[85], 256], + 120297: [[86], 256], + 120298: [[87], 256], + 120299: [[88], 256], + 120300: [[89], 256], + 120301: [[90], 256], + 120302: [[97], 256], + 120303: [[98], 256], + 120304: [[99], 256], + 120305: [[100], 256], + 120306: [[101], 256], + 120307: [[102], 256], + 120308: [[103], 256], + 120309: [[104], 256], + 120310: [[105], 256], + 120311: [[106], 256], + 120312: [[107], 256], + 120313: [[108], 256], + 120314: [[109], 256], + 120315: [[110], 256], + 120316: [[111], 256], + 120317: [[112], 256], + 120318: [[113], 256], + 120319: [[114], 256] + }, + 54784: { + 120320: [[115], 256], + 120321: [[116], 256], + 120322: [[117], 256], + 120323: [[118], 256], + 120324: [[119], 256], + 120325: [[120], 256], + 120326: [[121], 256], + 120327: [[122], 256], + 120328: [[65], 256], + 120329: [[66], 256], + 120330: [[67], 256], + 120331: [[68], 256], + 120332: [[69], 256], + 120333: [[70], 256], + 120334: [[71], 256], + 120335: [[72], 256], + 120336: [[73], 256], + 120337: [[74], 256], + 120338: [[75], 256], + 120339: [[76], 256], + 120340: [[77], 256], + 120341: [[78], 256], + 120342: [[79], 256], + 120343: [[80], 256], + 120344: [[81], 256], + 120345: [[82], 256], + 120346: [[83], 256], + 120347: [[84], 256], + 120348: [[85], 256], + 120349: [[86], 256], + 120350: [[87], 256], + 120351: [[88], 256], + 120352: [[89], 256], + 120353: [[90], 256], + 120354: [[97], 256], + 120355: [[98], 256], + 120356: [[99], 256], + 120357: [[100], 256], + 120358: [[101], 256], + 120359: [[102], 256], + 120360: [[103], 256], + 120361: [[104], 256], + 120362: [[105], 256], + 120363: [[106], 256], + 120364: [[107], 256], + 120365: [[108], 256], + 120366: [[109], 256], + 120367: [[110], 256], + 120368: [[111], 256], + 120369: [[112], 256], + 120370: [[113], 256], + 120371: [[114], 256], + 120372: [[115], 256], + 120373: [[116], 256], + 120374: [[117], 256], + 120375: [[118], 256], + 120376: [[119], 256], + 120377: [[120], 256], + 120378: [[121], 256], + 120379: [[122], 256], + 120380: [[65], 256], + 120381: [[66], 256], + 120382: [[67], 256], + 120383: [[68], 256], + 120384: [[69], 256], + 120385: [[70], 256], + 120386: [[71], 256], + 120387: [[72], 256], + 120388: [[73], 256], + 120389: [[74], 256], + 120390: [[75], 256], + 120391: [[76], 256], + 120392: [[77], 256], + 120393: [[78], 256], + 120394: [[79], 256], + 120395: [[80], 256], + 120396: [[81], 256], + 120397: [[82], 256], + 120398: [[83], 256], + 120399: [[84], 256], + 120400: [[85], 256], + 120401: [[86], 256], + 120402: [[87], 256], + 120403: [[88], 256], + 120404: [[89], 256], + 120405: [[90], 256], + 120406: [[97], 256], + 120407: [[98], 256], + 120408: [[99], 256], + 120409: [[100], 256], + 120410: [[101], 256], + 120411: [[102], 256], + 120412: [[103], 256], + 120413: [[104], 256], + 120414: [[105], 256], + 120415: [[106], 256], + 120416: [[107], 256], + 120417: [[108], 256], + 120418: [[109], 256], + 120419: [[110], 256], + 120420: [[111], 256], + 120421: [[112], 256], + 120422: [[113], 256], + 120423: [[114], 256], + 120424: [[115], 256], + 120425: [[116], 256], + 120426: [[117], 256], + 120427: [[118], 256], + 120428: [[119], 256], + 120429: [[120], 256], + 120430: [[121], 256], + 120431: [[122], 256], + 120432: [[65], 256], + 120433: [[66], 256], + 120434: [[67], 256], + 120435: [[68], 256], + 120436: [[69], 256], + 120437: [[70], 256], + 120438: [[71], 256], + 120439: [[72], 256], + 120440: [[73], 256], + 120441: [[74], 256], + 120442: [[75], 256], + 120443: [[76], 256], + 120444: [[77], 256], + 120445: [[78], 256], + 120446: [[79], 256], + 120447: [[80], 256], + 120448: [[81], 256], + 120449: [[82], 256], + 120450: [[83], 256], + 120451: [[84], 256], + 120452: [[85], 256], + 120453: [[86], 256], + 120454: [[87], 256], + 120455: [[88], 256], + 120456: [[89], 256], + 120457: [[90], 256], + 120458: [[97], 256], + 120459: [[98], 256], + 120460: [[99], 256], + 120461: [[100], 256], + 120462: [[101], 256], + 120463: [[102], 256], + 120464: [[103], 256], + 120465: [[104], 256], + 120466: [[105], 256], + 120467: [[106], 256], + 120468: [[107], 256], + 120469: [[108], 256], + 120470: [[109], 256], + 120471: [[110], 256], + 120472: [[111], 256], + 120473: [[112], 256], + 120474: [[113], 256], + 120475: [[114], 256], + 120476: [[115], 256], + 120477: [[116], 256], + 120478: [[117], 256], + 120479: [[118], 256], + 120480: [[119], 256], + 120481: [[120], 256], + 120482: [[121], 256], + 120483: [[122], 256], + 120484: [[305], 256], + 120485: [[567], 256], + 120488: [[913], 256], + 120489: [[914], 256], + 120490: [[915], 256], + 120491: [[916], 256], + 120492: [[917], 256], + 120493: [[918], 256], + 120494: [[919], 256], + 120495: [[920], 256], + 120496: [[921], 256], + 120497: [[922], 256], + 120498: [[923], 256], + 120499: [[924], 256], + 120500: [[925], 256], + 120501: [[926], 256], + 120502: [[927], 256], + 120503: [[928], 256], + 120504: [[929], 256], + 120505: [[1012], 256], + 120506: [[931], 256], + 120507: [[932], 256], + 120508: [[933], 256], + 120509: [[934], 256], + 120510: [[935], 256], + 120511: [[936], 256], + 120512: [[937], 256], + 120513: [[8711], 256], + 120514: [[945], 256], + 120515: [[946], 256], + 120516: [[947], 256], + 120517: [[948], 256], + 120518: [[949], 256], + 120519: [[950], 256], + 120520: [[951], 256], + 120521: [[952], 256], + 120522: [[953], 256], + 120523: [[954], 256], + 120524: [[955], 256], + 120525: [[956], 256], + 120526: [[957], 256], + 120527: [[958], 256], + 120528: [[959], 256], + 120529: [[960], 256], + 120530: [[961], 256], + 120531: [[962], 256], + 120532: [[963], 256], + 120533: [[964], 256], + 120534: [[965], 256], + 120535: [[966], 256], + 120536: [[967], 256], + 120537: [[968], 256], + 120538: [[969], 256], + 120539: [[8706], 256], + 120540: [[1013], 256], + 120541: [[977], 256], + 120542: [[1008], 256], + 120543: [[981], 256], + 120544: [[1009], 256], + 120545: [[982], 256], + 120546: [[913], 256], + 120547: [[914], 256], + 120548: [[915], 256], + 120549: [[916], 256], + 120550: [[917], 256], + 120551: [[918], 256], + 120552: [[919], 256], + 120553: [[920], 256], + 120554: [[921], 256], + 120555: [[922], 256], + 120556: [[923], 256], + 120557: [[924], 256], + 120558: [[925], 256], + 120559: [[926], 256], + 120560: [[927], 256], + 120561: [[928], 256], + 120562: [[929], 256], + 120563: [[1012], 256], + 120564: [[931], 256], + 120565: [[932], 256], + 120566: [[933], 256], + 120567: [[934], 256], + 120568: [[935], 256], + 120569: [[936], 256], + 120570: [[937], 256], + 120571: [[8711], 256], + 120572: [[945], 256], + 120573: [[946], 256], + 120574: [[947], 256], + 120575: [[948], 256] + }, + 55040: { + 120576: [[949], 256], + 120577: [[950], 256], + 120578: [[951], 256], + 120579: [[952], 256], + 120580: [[953], 256], + 120581: [[954], 256], + 120582: [[955], 256], + 120583: [[956], 256], + 120584: [[957], 256], + 120585: [[958], 256], + 120586: [[959], 256], + 120587: [[960], 256], + 120588: [[961], 256], + 120589: [[962], 256], + 120590: [[963], 256], + 120591: [[964], 256], + 120592: [[965], 256], + 120593: [[966], 256], + 120594: [[967], 256], + 120595: [[968], 256], + 120596: [[969], 256], + 120597: [[8706], 256], + 120598: [[1013], 256], + 120599: [[977], 256], + 120600: [[1008], 256], + 120601: [[981], 256], + 120602: [[1009], 256], + 120603: [[982], 256], + 120604: [[913], 256], + 120605: [[914], 256], + 120606: [[915], 256], + 120607: [[916], 256], + 120608: [[917], 256], + 120609: [[918], 256], + 120610: [[919], 256], + 120611: [[920], 256], + 120612: [[921], 256], + 120613: [[922], 256], + 120614: [[923], 256], + 120615: [[924], 256], + 120616: [[925], 256], + 120617: [[926], 256], + 120618: [[927], 256], + 120619: [[928], 256], + 120620: [[929], 256], + 120621: [[1012], 256], + 120622: [[931], 256], + 120623: [[932], 256], + 120624: [[933], 256], + 120625: [[934], 256], + 120626: [[935], 256], + 120627: [[936], 256], + 120628: [[937], 256], + 120629: [[8711], 256], + 120630: [[945], 256], + 120631: [[946], 256], + 120632: [[947], 256], + 120633: [[948], 256], + 120634: [[949], 256], + 120635: [[950], 256], + 120636: [[951], 256], + 120637: [[952], 256], + 120638: [[953], 256], + 120639: [[954], 256], + 120640: [[955], 256], + 120641: [[956], 256], + 120642: [[957], 256], + 120643: [[958], 256], + 120644: [[959], 256], + 120645: [[960], 256], + 120646: [[961], 256], + 120647: [[962], 256], + 120648: [[963], 256], + 120649: [[964], 256], + 120650: [[965], 256], + 120651: [[966], 256], + 120652: [[967], 256], + 120653: [[968], 256], + 120654: [[969], 256], + 120655: [[8706], 256], + 120656: [[1013], 256], + 120657: [[977], 256], + 120658: [[1008], 256], + 120659: [[981], 256], + 120660: [[1009], 256], + 120661: [[982], 256], + 120662: [[913], 256], + 120663: [[914], 256], + 120664: [[915], 256], + 120665: [[916], 256], + 120666: [[917], 256], + 120667: [[918], 256], + 120668: [[919], 256], + 120669: [[920], 256], + 120670: [[921], 256], + 120671: [[922], 256], + 120672: [[923], 256], + 120673: [[924], 256], + 120674: [[925], 256], + 120675: [[926], 256], + 120676: [[927], 256], + 120677: [[928], 256], + 120678: [[929], 256], + 120679: [[1012], 256], + 120680: [[931], 256], + 120681: [[932], 256], + 120682: [[933], 256], + 120683: [[934], 256], + 120684: [[935], 256], + 120685: [[936], 256], + 120686: [[937], 256], + 120687: [[8711], 256], + 120688: [[945], 256], + 120689: [[946], 256], + 120690: [[947], 256], + 120691: [[948], 256], + 120692: [[949], 256], + 120693: [[950], 256], + 120694: [[951], 256], + 120695: [[952], 256], + 120696: [[953], 256], + 120697: [[954], 256], + 120698: [[955], 256], + 120699: [[956], 256], + 120700: [[957], 256], + 120701: [[958], 256], + 120702: [[959], 256], + 120703: [[960], 256], + 120704: [[961], 256], + 120705: [[962], 256], + 120706: [[963], 256], + 120707: [[964], 256], + 120708: [[965], 256], + 120709: [[966], 256], + 120710: [[967], 256], + 120711: [[968], 256], + 120712: [[969], 256], + 120713: [[8706], 256], + 120714: [[1013], 256], + 120715: [[977], 256], + 120716: [[1008], 256], + 120717: [[981], 256], + 120718: [[1009], 256], + 120719: [[982], 256], + 120720: [[913], 256], + 120721: [[914], 256], + 120722: [[915], 256], + 120723: [[916], 256], + 120724: [[917], 256], + 120725: [[918], 256], + 120726: [[919], 256], + 120727: [[920], 256], + 120728: [[921], 256], + 120729: [[922], 256], + 120730: [[923], 256], + 120731: [[924], 256], + 120732: [[925], 256], + 120733: [[926], 256], + 120734: [[927], 256], + 120735: [[928], 256], + 120736: [[929], 256], + 120737: [[1012], 256], + 120738: [[931], 256], + 120739: [[932], 256], + 120740: [[933], 256], + 120741: [[934], 256], + 120742: [[935], 256], + 120743: [[936], 256], + 120744: [[937], 256], + 120745: [[8711], 256], + 120746: [[945], 256], + 120747: [[946], 256], + 120748: [[947], 256], + 120749: [[948], 256], + 120750: [[949], 256], + 120751: [[950], 256], + 120752: [[951], 256], + 120753: [[952], 256], + 120754: [[953], 256], + 120755: [[954], 256], + 120756: [[955], 256], + 120757: [[956], 256], + 120758: [[957], 256], + 120759: [[958], 256], + 120760: [[959], 256], + 120761: [[960], 256], + 120762: [[961], 256], + 120763: [[962], 256], + 120764: [[963], 256], + 120765: [[964], 256], + 120766: [[965], 256], + 120767: [[966], 256], + 120768: [[967], 256], + 120769: [[968], 256], + 120770: [[969], 256], + 120771: [[8706], 256], + 120772: [[1013], 256], + 120773: [[977], 256], + 120774: [[1008], 256], + 120775: [[981], 256], + 120776: [[1009], 256], + 120777: [[982], 256], + 120778: [[988], 256], + 120779: [[989], 256], + 120782: [[48], 256], + 120783: [[49], 256], + 120784: [[50], 256], + 120785: [[51], 256], + 120786: [[52], 256], + 120787: [[53], 256], + 120788: [[54], 256], + 120789: [[55], 256], + 120790: [[56], 256], + 120791: [[57], 256], + 120792: [[48], 256], + 120793: [[49], 256], + 120794: [[50], 256], + 120795: [[51], 256], + 120796: [[52], 256], + 120797: [[53], 256], + 120798: [[54], 256], + 120799: [[55], 256], + 120800: [[56], 256], + 120801: [[57], 256], + 120802: [[48], 256], + 120803: [[49], 256], + 120804: [[50], 256], + 120805: [[51], 256], + 120806: [[52], 256], + 120807: [[53], 256], + 120808: [[54], 256], + 120809: [[55], 256], + 120810: [[56], 256], + 120811: [[57], 256], + 120812: [[48], 256], + 120813: [[49], 256], + 120814: [[50], 256], + 120815: [[51], 256], + 120816: [[52], 256], + 120817: [[53], 256], + 120818: [[54], 256], + 120819: [[55], 256], + 120820: [[56], 256], + 120821: [[57], 256], + 120822: [[48], 256], + 120823: [[49], 256], + 120824: [[50], 256], + 120825: [[51], 256], + 120826: [[52], 256], + 120827: [[53], 256], + 120828: [[54], 256], + 120829: [[55], 256], + 120830: [[56], 256], + 120831: [[57], 256] + }, + 60928: { + 126464: [[1575], 256], + 126465: [[1576], 256], + 126466: [[1580], 256], + 126467: [[1583], 256], + 126469: [[1608], 256], + 126470: [[1586], 256], + 126471: [[1581], 256], + 126472: [[1591], 256], + 126473: [[1610], 256], + 126474: [[1603], 256], + 126475: [[1604], 256], + 126476: [[1605], 256], + 126477: [[1606], 256], + 126478: [[1587], 256], + 126479: [[1593], 256], + 126480: [[1601], 256], + 126481: [[1589], 256], + 126482: [[1602], 256], + 126483: [[1585], 256], + 126484: [[1588], 256], + 126485: [[1578], 256], + 126486: [[1579], 256], + 126487: [[1582], 256], + 126488: [[1584], 256], + 126489: [[1590], 256], + 126490: [[1592], 256], + 126491: [[1594], 256], + 126492: [[1646], 256], + 126493: [[1722], 256], + 126494: [[1697], 256], + 126495: [[1647], 256], + 126497: [[1576], 256], + 126498: [[1580], 256], + 126500: [[1607], 256], + 126503: [[1581], 256], + 126505: [[1610], 256], + 126506: [[1603], 256], + 126507: [[1604], 256], + 126508: [[1605], 256], + 126509: [[1606], 256], + 126510: [[1587], 256], + 126511: [[1593], 256], + 126512: [[1601], 256], + 126513: [[1589], 256], + 126514: [[1602], 256], + 126516: [[1588], 256], + 126517: [[1578], 256], + 126518: [[1579], 256], + 126519: [[1582], 256], + 126521: [[1590], 256], + 126523: [[1594], 256], + 126530: [[1580], 256], + 126535: [[1581], 256], + 126537: [[1610], 256], + 126539: [[1604], 256], + 126541: [[1606], 256], + 126542: [[1587], 256], + 126543: [[1593], 256], + 126545: [[1589], 256], + 126546: [[1602], 256], + 126548: [[1588], 256], + 126551: [[1582], 256], + 126553: [[1590], 256], + 126555: [[1594], 256], + 126557: [[1722], 256], + 126559: [[1647], 256], + 126561: [[1576], 256], + 126562: [[1580], 256], + 126564: [[1607], 256], + 126567: [[1581], 256], + 126568: [[1591], 256], + 126569: [[1610], 256], + 126570: [[1603], 256], + 126572: [[1605], 256], + 126573: [[1606], 256], + 126574: [[1587], 256], + 126575: [[1593], 256], + 126576: [[1601], 256], + 126577: [[1589], 256], + 126578: [[1602], 256], + 126580: [[1588], 256], + 126581: [[1578], 256], + 126582: [[1579], 256], + 126583: [[1582], 256], + 126585: [[1590], 256], + 126586: [[1592], 256], + 126587: [[1594], 256], + 126588: [[1646], 256], + 126590: [[1697], 256], + 126592: [[1575], 256], + 126593: [[1576], 256], + 126594: [[1580], 256], + 126595: [[1583], 256], + 126596: [[1607], 256], + 126597: [[1608], 256], + 126598: [[1586], 256], + 126599: [[1581], 256], + 126600: [[1591], 256], + 126601: [[1610], 256], + 126603: [[1604], 256], + 126604: [[1605], 256], + 126605: [[1606], 256], + 126606: [[1587], 256], + 126607: [[1593], 256], + 126608: [[1601], 256], + 126609: [[1589], 256], + 126610: [[1602], 256], + 126611: [[1585], 256], + 126612: [[1588], 256], + 126613: [[1578], 256], + 126614: [[1579], 256], + 126615: [[1582], 256], + 126616: [[1584], 256], + 126617: [[1590], 256], + 126618: [[1592], 256], + 126619: [[1594], 256], + 126625: [[1576], 256], + 126626: [[1580], 256], + 126627: [[1583], 256], + 126629: [[1608], 256], + 126630: [[1586], 256], + 126631: [[1581], 256], + 126632: [[1591], 256], + 126633: [[1610], 256], + 126635: [[1604], 256], + 126636: [[1605], 256], + 126637: [[1606], 256], + 126638: [[1587], 256], + 126639: [[1593], 256], + 126640: [[1601], 256], + 126641: [[1589], 256], + 126642: [[1602], 256], + 126643: [[1585], 256], + 126644: [[1588], 256], + 126645: [[1578], 256], + 126646: [[1579], 256], + 126647: [[1582], 256], + 126648: [[1584], 256], + 126649: [[1590], 256], + 126650: [[1592], 256], + 126651: [[1594], 256] + }, + 61696: { + 127232: [[48, 46], 256], + 127233: [[48, 44], 256], + 127234: [[49, 44], 256], + 127235: [[50, 44], 256], + 127236: [[51, 44], 256], + 127237: [[52, 44], 256], + 127238: [[53, 44], 256], + 127239: [[54, 44], 256], + 127240: [[55, 44], 256], + 127241: [[56, 44], 256], + 127242: [[57, 44], 256], + 127248: [[40, 65, 41], 256], + 127249: [[40, 66, 41], 256], + 127250: [[40, 67, 41], 256], + 127251: [[40, 68, 41], 256], + 127252: [[40, 69, 41], 256], + 127253: [[40, 70, 41], 256], + 127254: [[40, 71, 41], 256], + 127255: [[40, 72, 41], 256], + 127256: [[40, 73, 41], 256], + 127257: [[40, 74, 41], 256], + 127258: [[40, 75, 41], 256], + 127259: [[40, 76, 41], 256], + 127260: [[40, 77, 41], 256], + 127261: [[40, 78, 41], 256], + 127262: [[40, 79, 41], 256], + 127263: [[40, 80, 41], 256], + 127264: [[40, 81, 41], 256], + 127265: [[40, 82, 41], 256], + 127266: [[40, 83, 41], 256], + 127267: [[40, 84, 41], 256], + 127268: [[40, 85, 41], 256], + 127269: [[40, 86, 41], 256], + 127270: [[40, 87, 41], 256], + 127271: [[40, 88, 41], 256], + 127272: [[40, 89, 41], 256], + 127273: [[40, 90, 41], 256], + 127274: [[12308, 83, 12309], 256], + 127275: [[67], 256], + 127276: [[82], 256], + 127277: [[67, 68], 256], + 127278: [[87, 90], 256], + 127280: [[65], 256], + 127281: [[66], 256], + 127282: [[67], 256], + 127283: [[68], 256], + 127284: [[69], 256], + 127285: [[70], 256], + 127286: [[71], 256], + 127287: [[72], 256], + 127288: [[73], 256], + 127289: [[74], 256], + 127290: [[75], 256], + 127291: [[76], 256], + 127292: [[77], 256], + 127293: [[78], 256], + 127294: [[79], 256], + 127295: [[80], 256], + 127296: [[81], 256], + 127297: [[82], 256], + 127298: [[83], 256], + 127299: [[84], 256], + 127300: [[85], 256], + 127301: [[86], 256], + 127302: [[87], 256], + 127303: [[88], 256], + 127304: [[89], 256], + 127305: [[90], 256], + 127306: [[72, 86], 256], + 127307: [[77, 86], 256], + 127308: [[83, 68], 256], + 127309: [[83, 83], 256], + 127310: [[80, 80, 86], 256], + 127311: [[87, 67], 256], + 127338: [[77, 67], 256], + 127339: [[77, 68], 256], + 127376: [[68, 74], 256] + }, + 61952: { + 127488: [[12411, 12363], 256], + 127489: [[12467, 12467], 256], + 127490: [[12469], 256], + 127504: [[25163], 256], + 127505: [[23383], 256], + 127506: [[21452], 256], + 127507: [[12487], 256], + 127508: [[20108], 256], + 127509: [[22810], 256], + 127510: [[35299], 256], + 127511: [[22825], 256], + 127512: [[20132], 256], + 127513: [[26144], 256], + 127514: [[28961], 256], + 127515: [[26009], 256], + 127516: [[21069], 256], + 127517: [[24460], 256], + 127518: [[20877], 256], + 127519: [[26032], 256], + 127520: [[21021], 256], + 127521: [[32066], 256], + 127522: [[29983], 256], + 127523: [[36009], 256], + 127524: [[22768], 256], + 127525: [[21561], 256], + 127526: [[28436], 256], + 127527: [[25237], 256], + 127528: [[25429], 256], + 127529: [[19968], 256], + 127530: [[19977], 256], + 127531: [[36938], 256], + 127532: [[24038], 256], + 127533: [[20013], 256], + 127534: [[21491], 256], + 127535: [[25351], 256], + 127536: [[36208], 256], + 127537: [[25171], 256], + 127538: [[31105], 256], + 127539: [[31354], 256], + 127540: [[21512], 256], + 127541: [[28288], 256], + 127542: [[26377], 256], + 127543: [[26376], 256], + 127544: [[30003], 256], + 127545: [[21106], 256], + 127546: [[21942], 256], + 127552: [[12308, 26412, 12309], 256], + 127553: [[12308, 19977, 12309], 256], + 127554: [[12308, 20108, 12309], 256], + 127555: [[12308, 23433, 12309], 256], + 127556: [[12308, 28857, 12309], 256], + 127557: [[12308, 25171, 12309], 256], + 127558: [[12308, 30423, 12309], 256], + 127559: [[12308, 21213, 12309], 256], + 127560: [[12308, 25943, 12309], 256], + 127568: [[24471], 256], + 127569: [[21487], 256] + }, + 63488: { + 194560: [[20029]], + 194561: [[20024]], + 194562: [[20033]], + 194563: [[131362]], + 194564: [[20320]], + 194565: [[20398]], + 194566: [[20411]], + 194567: [[20482]], + 194568: [[20602]], + 194569: [[20633]], + 194570: [[20711]], + 194571: [[20687]], + 194572: [[13470]], + 194573: [[132666]], + 194574: [[20813]], + 194575: [[20820]], + 194576: [[20836]], + 194577: [[20855]], + 194578: [[132380]], + 194579: [[13497]], + 194580: [[20839]], + 194581: [[20877]], + 194582: [[132427]], + 194583: [[20887]], + 194584: [[20900]], + 194585: [[20172]], + 194586: [[20908]], + 194587: [[20917]], + 194588: [[168415]], + 194589: [[20981]], + 194590: [[20995]], + 194591: [[13535]], + 194592: [[21051]], + 194593: [[21062]], + 194594: [[21106]], + 194595: [[21111]], + 194596: [[13589]], + 194597: [[21191]], + 194598: [[21193]], + 194599: [[21220]], + 194600: [[21242]], + 194601: [[21253]], + 194602: [[21254]], + 194603: [[21271]], + 194604: [[21321]], + 194605: [[21329]], + 194606: [[21338]], + 194607: [[21363]], + 194608: [[21373]], + 194609: [[21375]], + 194610: [[21375]], + 194611: [[21375]], + 194612: [[133676]], + 194613: [[28784]], + 194614: [[21450]], + 194615: [[21471]], + 194616: [[133987]], + 194617: [[21483]], + 194618: [[21489]], + 194619: [[21510]], + 194620: [[21662]], + 194621: [[21560]], + 194622: [[21576]], + 194623: [[21608]], + 194624: [[21666]], + 194625: [[21750]], + 194626: [[21776]], + 194627: [[21843]], + 194628: [[21859]], + 194629: [[21892]], + 194630: [[21892]], + 194631: [[21913]], + 194632: [[21931]], + 194633: [[21939]], + 194634: [[21954]], + 194635: [[22294]], + 194636: [[22022]], + 194637: [[22295]], + 194638: [[22097]], + 194639: [[22132]], + 194640: [[20999]], + 194641: [[22766]], + 194642: [[22478]], + 194643: [[22516]], + 194644: [[22541]], + 194645: [[22411]], + 194646: [[22578]], + 194647: [[22577]], + 194648: [[22700]], + 194649: [[136420]], + 194650: [[22770]], + 194651: [[22775]], + 194652: [[22790]], + 194653: [[22810]], + 194654: [[22818]], + 194655: [[22882]], + 194656: [[136872]], + 194657: [[136938]], + 194658: [[23020]], + 194659: [[23067]], + 194660: [[23079]], + 194661: [[23000]], + 194662: [[23142]], + 194663: [[14062]], + 194664: [[14076]], + 194665: [[23304]], + 194666: [[23358]], + 194667: [[23358]], + 194668: [[137672]], + 194669: [[23491]], + 194670: [[23512]], + 194671: [[23527]], + 194672: [[23539]], + 194673: [[138008]], + 194674: [[23551]], + 194675: [[23558]], + 194676: [[24403]], + 194677: [[23586]], + 194678: [[14209]], + 194679: [[23648]], + 194680: [[23662]], + 194681: [[23744]], + 194682: [[23693]], + 194683: [[138724]], + 194684: [[23875]], + 194685: [[138726]], + 194686: [[23918]], + 194687: [[23915]], + 194688: [[23932]], + 194689: [[24033]], + 194690: [[24034]], + 194691: [[14383]], + 194692: [[24061]], + 194693: [[24104]], + 194694: [[24125]], + 194695: [[24169]], + 194696: [[14434]], + 194697: [[139651]], + 194698: [[14460]], + 194699: [[24240]], + 194700: [[24243]], + 194701: [[24246]], + 194702: [[24266]], + 194703: [[172946]], + 194704: [[24318]], + 194705: [[140081]], + 194706: [[140081]], + 194707: [[33281]], + 194708: [[24354]], + 194709: [[24354]], + 194710: [[14535]], + 194711: [[144056]], + 194712: [[156122]], + 194713: [[24418]], + 194714: [[24427]], + 194715: [[14563]], + 194716: [[24474]], + 194717: [[24525]], + 194718: [[24535]], + 194719: [[24569]], + 194720: [[24705]], + 194721: [[14650]], + 194722: [[14620]], + 194723: [[24724]], + 194724: [[141012]], + 194725: [[24775]], + 194726: [[24904]], + 194727: [[24908]], + 194728: [[24910]], + 194729: [[24908]], + 194730: [[24954]], + 194731: [[24974]], + 194732: [[25010]], + 194733: [[24996]], + 194734: [[25007]], + 194735: [[25054]], + 194736: [[25074]], + 194737: [[25078]], + 194738: [[25104]], + 194739: [[25115]], + 194740: [[25181]], + 194741: [[25265]], + 194742: [[25300]], + 194743: [[25424]], + 194744: [[142092]], + 194745: [[25405]], + 194746: [[25340]], + 194747: [[25448]], + 194748: [[25475]], + 194749: [[25572]], + 194750: [[142321]], + 194751: [[25634]], + 194752: [[25541]], + 194753: [[25513]], + 194754: [[14894]], + 194755: [[25705]], + 194756: [[25726]], + 194757: [[25757]], + 194758: [[25719]], + 194759: [[14956]], + 194760: [[25935]], + 194761: [[25964]], + 194762: [[143370]], + 194763: [[26083]], + 194764: [[26360]], + 194765: [[26185]], + 194766: [[15129]], + 194767: [[26257]], + 194768: [[15112]], + 194769: [[15076]], + 194770: [[20882]], + 194771: [[20885]], + 194772: [[26368]], + 194773: [[26268]], + 194774: [[32941]], + 194775: [[17369]], + 194776: [[26391]], + 194777: [[26395]], + 194778: [[26401]], + 194779: [[26462]], + 194780: [[26451]], + 194781: [[144323]], + 194782: [[15177]], + 194783: [[26618]], + 194784: [[26501]], + 194785: [[26706]], + 194786: [[26757]], + 194787: [[144493]], + 194788: [[26766]], + 194789: [[26655]], + 194790: [[26900]], + 194791: [[15261]], + 194792: [[26946]], + 194793: [[27043]], + 194794: [[27114]], + 194795: [[27304]], + 194796: [[145059]], + 194797: [[27355]], + 194798: [[15384]], + 194799: [[27425]], + 194800: [[145575]], + 194801: [[27476]], + 194802: [[15438]], + 194803: [[27506]], + 194804: [[27551]], + 194805: [[27578]], + 194806: [[27579]], + 194807: [[146061]], + 194808: [[138507]], + 194809: [[146170]], + 194810: [[27726]], + 194811: [[146620]], + 194812: [[27839]], + 194813: [[27853]], + 194814: [[27751]], + 194815: [[27926]] + }, + 63744: { + 63744: [[35912]], + 63745: [[26356]], + 63746: [[36554]], + 63747: [[36040]], + 63748: [[28369]], + 63749: [[20018]], + 63750: [[21477]], + 63751: [[40860]], + 63752: [[40860]], + 63753: [[22865]], + 63754: [[37329]], + 63755: [[21895]], + 63756: [[22856]], + 63757: [[25078]], + 63758: [[30313]], + 63759: [[32645]], + 63760: [[34367]], + 63761: [[34746]], + 63762: [[35064]], + 63763: [[37007]], + 63764: [[27138]], + 63765: [[27931]], + 63766: [[28889]], + 63767: [[29662]], + 63768: [[33853]], + 63769: [[37226]], + 63770: [[39409]], + 63771: [[20098]], + 63772: [[21365]], + 63773: [[27396]], + 63774: [[29211]], + 63775: [[34349]], + 63776: [[40478]], + 63777: [[23888]], + 63778: [[28651]], + 63779: [[34253]], + 63780: [[35172]], + 63781: [[25289]], + 63782: [[33240]], + 63783: [[34847]], + 63784: [[24266]], + 63785: [[26391]], + 63786: [[28010]], + 63787: [[29436]], + 63788: [[37070]], + 63789: [[20358]], + 63790: [[20919]], + 63791: [[21214]], + 63792: [[25796]], + 63793: [[27347]], + 63794: [[29200]], + 63795: [[30439]], + 63796: [[32769]], + 63797: [[34310]], + 63798: [[34396]], + 63799: [[36335]], + 63800: [[38706]], + 63801: [[39791]], + 63802: [[40442]], + 63803: [[30860]], + 63804: [[31103]], + 63805: [[32160]], + 63806: [[33737]], + 63807: [[37636]], + 63808: [[40575]], + 63809: [[35542]], + 63810: [[22751]], + 63811: [[24324]], + 63812: [[31840]], + 63813: [[32894]], + 63814: [[29282]], + 63815: [[30922]], + 63816: [[36034]], + 63817: [[38647]], + 63818: [[22744]], + 63819: [[23650]], + 63820: [[27155]], + 63821: [[28122]], + 63822: [[28431]], + 63823: [[32047]], + 63824: [[32311]], + 63825: [[38475]], + 63826: [[21202]], + 63827: [[32907]], + 63828: [[20956]], + 63829: [[20940]], + 63830: [[31260]], + 63831: [[32190]], + 63832: [[33777]], + 63833: [[38517]], + 63834: [[35712]], + 63835: [[25295]], + 63836: [[27138]], + 63837: [[35582]], + 63838: [[20025]], + 63839: [[23527]], + 63840: [[24594]], + 63841: [[29575]], + 63842: [[30064]], + 63843: [[21271]], + 63844: [[30971]], + 63845: [[20415]], + 63846: [[24489]], + 63847: [[19981]], + 63848: [[27852]], + 63849: [[25976]], + 63850: [[32034]], + 63851: [[21443]], + 63852: [[22622]], + 63853: [[30465]], + 63854: [[33865]], + 63855: [[35498]], + 63856: [[27578]], + 63857: [[36784]], + 63858: [[27784]], + 63859: [[25342]], + 63860: [[33509]], + 63861: [[25504]], + 63862: [[30053]], + 63863: [[20142]], + 63864: [[20841]], + 63865: [[20937]], + 63866: [[26753]], + 63867: [[31975]], + 63868: [[33391]], + 63869: [[35538]], + 63870: [[37327]], + 63871: [[21237]], + 63872: [[21570]], + 63873: [[22899]], + 63874: [[24300]], + 63875: [[26053]], + 63876: [[28670]], + 63877: [[31018]], + 63878: [[38317]], + 63879: [[39530]], + 63880: [[40599]], + 63881: [[40654]], + 63882: [[21147]], + 63883: [[26310]], + 63884: [[27511]], + 63885: [[36706]], + 63886: [[24180]], + 63887: [[24976]], + 63888: [[25088]], + 63889: [[25754]], + 63890: [[28451]], + 63891: [[29001]], + 63892: [[29833]], + 63893: [[31178]], + 63894: [[32244]], + 63895: [[32879]], + 63896: [[36646]], + 63897: [[34030]], + 63898: [[36899]], + 63899: [[37706]], + 63900: [[21015]], + 63901: [[21155]], + 63902: [[21693]], + 63903: [[28872]], + 63904: [[35010]], + 63905: [[35498]], + 63906: [[24265]], + 63907: [[24565]], + 63908: [[25467]], + 63909: [[27566]], + 63910: [[31806]], + 63911: [[29557]], + 63912: [[20196]], + 63913: [[22265]], + 63914: [[23527]], + 63915: [[23994]], + 63916: [[24604]], + 63917: [[29618]], + 63918: [[29801]], + 63919: [[32666]], + 63920: [[32838]], + 63921: [[37428]], + 63922: [[38646]], + 63923: [[38728]], + 63924: [[38936]], + 63925: [[20363]], + 63926: [[31150]], + 63927: [[37300]], + 63928: [[38584]], + 63929: [[24801]], + 63930: [[20102]], + 63931: [[20698]], + 63932: [[23534]], + 63933: [[23615]], + 63934: [[26009]], + 63935: [[27138]], + 63936: [[29134]], + 63937: [[30274]], + 63938: [[34044]], + 63939: [[36988]], + 63940: [[40845]], + 63941: [[26248]], + 63942: [[38446]], + 63943: [[21129]], + 63944: [[26491]], + 63945: [[26611]], + 63946: [[27969]], + 63947: [[28316]], + 63948: [[29705]], + 63949: [[30041]], + 63950: [[30827]], + 63951: [[32016]], + 63952: [[39006]], + 63953: [[20845]], + 63954: [[25134]], + 63955: [[38520]], + 63956: [[20523]], + 63957: [[23833]], + 63958: [[28138]], + 63959: [[36650]], + 63960: [[24459]], + 63961: [[24900]], + 63962: [[26647]], + 63963: [[29575]], + 63964: [[38534]], + 63965: [[21033]], + 63966: [[21519]], + 63967: [[23653]], + 63968: [[26131]], + 63969: [[26446]], + 63970: [[26792]], + 63971: [[27877]], + 63972: [[29702]], + 63973: [[30178]], + 63974: [[32633]], + 63975: [[35023]], + 63976: [[35041]], + 63977: [[37324]], + 63978: [[38626]], + 63979: [[21311]], + 63980: [[28346]], + 63981: [[21533]], + 63982: [[29136]], + 63983: [[29848]], + 63984: [[34298]], + 63985: [[38563]], + 63986: [[40023]], + 63987: [[40607]], + 63988: [[26519]], + 63989: [[28107]], + 63990: [[33256]], + 63991: [[31435]], + 63992: [[31520]], + 63993: [[31890]], + 63994: [[29376]], + 63995: [[28825]], + 63996: [[35672]], + 63997: [[20160]], + 63998: [[33590]], + 63999: [[21050]], + 194816: [[27966]], + 194817: [[28023]], + 194818: [[27969]], + 194819: [[28009]], + 194820: [[28024]], + 194821: [[28037]], + 194822: [[146718]], + 194823: [[27956]], + 194824: [[28207]], + 194825: [[28270]], + 194826: [[15667]], + 194827: [[28363]], + 194828: [[28359]], + 194829: [[147153]], + 194830: [[28153]], + 194831: [[28526]], + 194832: [[147294]], + 194833: [[147342]], + 194834: [[28614]], + 194835: [[28729]], + 194836: [[28702]], + 194837: [[28699]], + 194838: [[15766]], + 194839: [[28746]], + 194840: [[28797]], + 194841: [[28791]], + 194842: [[28845]], + 194843: [[132389]], + 194844: [[28997]], + 194845: [[148067]], + 194846: [[29084]], + 194847: [[148395]], + 194848: [[29224]], + 194849: [[29237]], + 194850: [[29264]], + 194851: [[149000]], + 194852: [[29312]], + 194853: [[29333]], + 194854: [[149301]], + 194855: [[149524]], + 194856: [[29562]], + 194857: [[29579]], + 194858: [[16044]], + 194859: [[29605]], + 194860: [[16056]], + 194861: [[16056]], + 194862: [[29767]], + 194863: [[29788]], + 194864: [[29809]], + 194865: [[29829]], + 194866: [[29898]], + 194867: [[16155]], + 194868: [[29988]], + 194869: [[150582]], + 194870: [[30014]], + 194871: [[150674]], + 194872: [[30064]], + 194873: [[139679]], + 194874: [[30224]], + 194875: [[151457]], + 194876: [[151480]], + 194877: [[151620]], + 194878: [[16380]], + 194879: [[16392]], + 194880: [[30452]], + 194881: [[151795]], + 194882: [[151794]], + 194883: [[151833]], + 194884: [[151859]], + 194885: [[30494]], + 194886: [[30495]], + 194887: [[30495]], + 194888: [[30538]], + 194889: [[16441]], + 194890: [[30603]], + 194891: [[16454]], + 194892: [[16534]], + 194893: [[152605]], + 194894: [[30798]], + 194895: [[30860]], + 194896: [[30924]], + 194897: [[16611]], + 194898: [[153126]], + 194899: [[31062]], + 194900: [[153242]], + 194901: [[153285]], + 194902: [[31119]], + 194903: [[31211]], + 194904: [[16687]], + 194905: [[31296]], + 194906: [[31306]], + 194907: [[31311]], + 194908: [[153980]], + 194909: [[154279]], + 194910: [[154279]], + 194911: [[31470]], + 194912: [[16898]], + 194913: [[154539]], + 194914: [[31686]], + 194915: [[31689]], + 194916: [[16935]], + 194917: [[154752]], + 194918: [[31954]], + 194919: [[17056]], + 194920: [[31976]], + 194921: [[31971]], + 194922: [[32000]], + 194923: [[155526]], + 194924: [[32099]], + 194925: [[17153]], + 194926: [[32199]], + 194927: [[32258]], + 194928: [[32325]], + 194929: [[17204]], + 194930: [[156200]], + 194931: [[156231]], + 194932: [[17241]], + 194933: [[156377]], + 194934: [[32634]], + 194935: [[156478]], + 194936: [[32661]], + 194937: [[32762]], + 194938: [[32773]], + 194939: [[156890]], + 194940: [[156963]], + 194941: [[32864]], + 194942: [[157096]], + 194943: [[32880]], + 194944: [[144223]], + 194945: [[17365]], + 194946: [[32946]], + 194947: [[33027]], + 194948: [[17419]], + 194949: [[33086]], + 194950: [[23221]], + 194951: [[157607]], + 194952: [[157621]], + 194953: [[144275]], + 194954: [[144284]], + 194955: [[33281]], + 194956: [[33284]], + 194957: [[36766]], + 194958: [[17515]], + 194959: [[33425]], + 194960: [[33419]], + 194961: [[33437]], + 194962: [[21171]], + 194963: [[33457]], + 194964: [[33459]], + 194965: [[33469]], + 194966: [[33510]], + 194967: [[158524]], + 194968: [[33509]], + 194969: [[33565]], + 194970: [[33635]], + 194971: [[33709]], + 194972: [[33571]], + 194973: [[33725]], + 194974: [[33767]], + 194975: [[33879]], + 194976: [[33619]], + 194977: [[33738]], + 194978: [[33740]], + 194979: [[33756]], + 194980: [[158774]], + 194981: [[159083]], + 194982: [[158933]], + 194983: [[17707]], + 194984: [[34033]], + 194985: [[34035]], + 194986: [[34070]], + 194987: [[160714]], + 194988: [[34148]], + 194989: [[159532]], + 194990: [[17757]], + 194991: [[17761]], + 194992: [[159665]], + 194993: [[159954]], + 194994: [[17771]], + 194995: [[34384]], + 194996: [[34396]], + 194997: [[34407]], + 194998: [[34409]], + 194999: [[34473]], + 195000: [[34440]], + 195001: [[34574]], + 195002: [[34530]], + 195003: [[34681]], + 195004: [[34600]], + 195005: [[34667]], + 195006: [[34694]], + 195007: [[17879]], + 195008: [[34785]], + 195009: [[34817]], + 195010: [[17913]], + 195011: [[34912]], + 195012: [[34915]], + 195013: [[161383]], + 195014: [[35031]], + 195015: [[35038]], + 195016: [[17973]], + 195017: [[35066]], + 195018: [[13499]], + 195019: [[161966]], + 195020: [[162150]], + 195021: [[18110]], + 195022: [[18119]], + 195023: [[35488]], + 195024: [[35565]], + 195025: [[35722]], + 195026: [[35925]], + 195027: [[162984]], + 195028: [[36011]], + 195029: [[36033]], + 195030: [[36123]], + 195031: [[36215]], + 195032: [[163631]], + 195033: [[133124]], + 195034: [[36299]], + 195035: [[36284]], + 195036: [[36336]], + 195037: [[133342]], + 195038: [[36564]], + 195039: [[36664]], + 195040: [[165330]], + 195041: [[165357]], + 195042: [[37012]], + 195043: [[37105]], + 195044: [[37137]], + 195045: [[165678]], + 195046: [[37147]], + 195047: [[37432]], + 195048: [[37591]], + 195049: [[37592]], + 195050: [[37500]], + 195051: [[37881]], + 195052: [[37909]], + 195053: [[166906]], + 195054: [[38283]], + 195055: [[18837]], + 195056: [[38327]], + 195057: [[167287]], + 195058: [[18918]], + 195059: [[38595]], + 195060: [[23986]], + 195061: [[38691]], + 195062: [[168261]], + 195063: [[168474]], + 195064: [[19054]], + 195065: [[19062]], + 195066: [[38880]], + 195067: [[168970]], + 195068: [[19122]], + 195069: [[169110]], + 195070: [[38923]], + 195071: [[38923]] + }, + 64000: { + 64000: [[20999]], + 64001: [[24230]], + 64002: [[25299]], + 64003: [[31958]], + 64004: [[23429]], + 64005: [[27934]], + 64006: [[26292]], + 64007: [[36667]], + 64008: [[34892]], + 64009: [[38477]], + 64010: [[35211]], + 64011: [[24275]], + 64012: [[20800]], + 64013: [[21952]], + 64016: [[22618]], + 64018: [[26228]], + 64021: [[20958]], + 64022: [[29482]], + 64023: [[30410]], + 64024: [[31036]], + 64025: [[31070]], + 64026: [[31077]], + 64027: [[31119]], + 64028: [[38742]], + 64029: [[31934]], + 64030: [[32701]], + 64032: [[34322]], + 64034: [[35576]], + 64037: [[36920]], + 64038: [[37117]], + 64042: [[39151]], + 64043: [[39164]], + 64044: [[39208]], + 64045: [[40372]], + 64046: [[37086]], + 64047: [[38583]], + 64048: [[20398]], + 64049: [[20711]], + 64050: [[20813]], + 64051: [[21193]], + 64052: [[21220]], + 64053: [[21329]], + 64054: [[21917]], + 64055: [[22022]], + 64056: [[22120]], + 64057: [[22592]], + 64058: [[22696]], + 64059: [[23652]], + 64060: [[23662]], + 64061: [[24724]], + 64062: [[24936]], + 64063: [[24974]], + 64064: [[25074]], + 64065: [[25935]], + 64066: [[26082]], + 64067: [[26257]], + 64068: [[26757]], + 64069: [[28023]], + 64070: [[28186]], + 64071: [[28450]], + 64072: [[29038]], + 64073: [[29227]], + 64074: [[29730]], + 64075: [[30865]], + 64076: [[31038]], + 64077: [[31049]], + 64078: [[31048]], + 64079: [[31056]], + 64080: [[31062]], + 64081: [[31069]], + 64082: [[31117]], + 64083: [[31118]], + 64084: [[31296]], + 64085: [[31361]], + 64086: [[31680]], + 64087: [[32244]], + 64088: [[32265]], + 64089: [[32321]], + 64090: [[32626]], + 64091: [[32773]], + 64092: [[33261]], + 64093: [[33401]], + 64094: [[33401]], + 64095: [[33879]], + 64096: [[35088]], + 64097: [[35222]], + 64098: [[35585]], + 64099: [[35641]], + 64100: [[36051]], + 64101: [[36104]], + 64102: [[36790]], + 64103: [[36920]], + 64104: [[38627]], + 64105: [[38911]], + 64106: [[38971]], + 64107: [[24693]], + 64108: [[148206]], + 64109: [[33304]], + 64112: [[20006]], + 64113: [[20917]], + 64114: [[20840]], + 64115: [[20352]], + 64116: [[20805]], + 64117: [[20864]], + 64118: [[21191]], + 64119: [[21242]], + 64120: [[21917]], + 64121: [[21845]], + 64122: [[21913]], + 64123: [[21986]], + 64124: [[22618]], + 64125: [[22707]], + 64126: [[22852]], + 64127: [[22868]], + 64128: [[23138]], + 64129: [[23336]], + 64130: [[24274]], + 64131: [[24281]], + 64132: [[24425]], + 64133: [[24493]], + 64134: [[24792]], + 64135: [[24910]], + 64136: [[24840]], + 64137: [[24974]], + 64138: [[24928]], + 64139: [[25074]], + 64140: [[25140]], + 64141: [[25540]], + 64142: [[25628]], + 64143: [[25682]], + 64144: [[25942]], + 64145: [[26228]], + 64146: [[26391]], + 64147: [[26395]], + 64148: [[26454]], + 64149: [[27513]], + 64150: [[27578]], + 64151: [[27969]], + 64152: [[28379]], + 64153: [[28363]], + 64154: [[28450]], + 64155: [[28702]], + 64156: [[29038]], + 64157: [[30631]], + 64158: [[29237]], + 64159: [[29359]], + 64160: [[29482]], + 64161: [[29809]], + 64162: [[29958]], + 64163: [[30011]], + 64164: [[30237]], + 64165: [[30239]], + 64166: [[30410]], + 64167: [[30427]], + 64168: [[30452]], + 64169: [[30538]], + 64170: [[30528]], + 64171: [[30924]], + 64172: [[31409]], + 64173: [[31680]], + 64174: [[31867]], + 64175: [[32091]], + 64176: [[32244]], + 64177: [[32574]], + 64178: [[32773]], + 64179: [[33618]], + 64180: [[33775]], + 64181: [[34681]], + 64182: [[35137]], + 64183: [[35206]], + 64184: [[35222]], + 64185: [[35519]], + 64186: [[35576]], + 64187: [[35531]], + 64188: [[35585]], + 64189: [[35582]], + 64190: [[35565]], + 64191: [[35641]], + 64192: [[35722]], + 64193: [[36104]], + 64194: [[36664]], + 64195: [[36978]], + 64196: [[37273]], + 64197: [[37494]], + 64198: [[38524]], + 64199: [[38627]], + 64200: [[38742]], + 64201: [[38875]], + 64202: [[38911]], + 64203: [[38923]], + 64204: [[38971]], + 64205: [[39698]], + 64206: [[40860]], + 64207: [[141386]], + 64208: [[141380]], + 64209: [[144341]], + 64210: [[15261]], + 64211: [[16408]], + 64212: [[16441]], + 64213: [[152137]], + 64214: [[154832]], + 64215: [[163539]], + 64216: [[40771]], + 64217: [[40846]], + 195072: [[38953]], + 195073: [[169398]], + 195074: [[39138]], + 195075: [[19251]], + 195076: [[39209]], + 195077: [[39335]], + 195078: [[39362]], + 195079: [[39422]], + 195080: [[19406]], + 195081: [[170800]], + 195082: [[39698]], + 195083: [[40000]], + 195084: [[40189]], + 195085: [[19662]], + 195086: [[19693]], + 195087: [[40295]], + 195088: [[172238]], + 195089: [[19704]], + 195090: [[172293]], + 195091: [[172558]], + 195092: [[172689]], + 195093: [[40635]], + 195094: [[19798]], + 195095: [[40697]], + 195096: [[40702]], + 195097: [[40709]], + 195098: [[40719]], + 195099: [[40726]], + 195100: [[40763]], + 195101: [[173568]] + }, + 64256: { + 64256: [[102, 102], 256], + 64257: [[102, 105], 256], + 64258: [[102, 108], 256], + 64259: [[102, 102, 105], 256], + 64260: [[102, 102, 108], 256], + 64261: [[383, 116], 256], + 64262: [[115, 116], 256], + 64275: [[1396, 1398], 256], + 64276: [[1396, 1381], 256], + 64277: [[1396, 1387], 256], + 64278: [[1406, 1398], 256], + 64279: [[1396, 1389], 256], + 64285: [[1497, 1460], 512], + 64286: [, 26], + 64287: [[1522, 1463], 512], + 64288: [[1506], 256], + 64289: [[1488], 256], + 64290: [[1491], 256], + 64291: [[1492], 256], + 64292: [[1499], 256], + 64293: [[1500], 256], + 64294: [[1501], 256], + 64295: [[1512], 256], + 64296: [[1514], 256], + 64297: [[43], 256], + 64298: [[1513, 1473], 512], + 64299: [[1513, 1474], 512], + 64300: [[64329, 1473], 512], + 64301: [[64329, 1474], 512], + 64302: [[1488, 1463], 512], + 64303: [[1488, 1464], 512], + 64304: [[1488, 1468], 512], + 64305: [[1489, 1468], 512], + 64306: [[1490, 1468], 512], + 64307: [[1491, 1468], 512], + 64308: [[1492, 1468], 512], + 64309: [[1493, 1468], 512], + 64310: [[1494, 1468], 512], + 64312: [[1496, 1468], 512], + 64313: [[1497, 1468], 512], + 64314: [[1498, 1468], 512], + 64315: [[1499, 1468], 512], + 64316: [[1500, 1468], 512], + 64318: [[1502, 1468], 512], + 64320: [[1504, 1468], 512], + 64321: [[1505, 1468], 512], + 64323: [[1507, 1468], 512], + 64324: [[1508, 1468], 512], + 64326: [[1510, 1468], 512], + 64327: [[1511, 1468], 512], + 64328: [[1512, 1468], 512], + 64329: [[1513, 1468], 512], + 64330: [[1514, 1468], 512], + 64331: [[1493, 1465], 512], + 64332: [[1489, 1471], 512], + 64333: [[1499, 1471], 512], + 64334: [[1508, 1471], 512], + 64335: [[1488, 1500], 256], + 64336: [[1649], 256], + 64337: [[1649], 256], + 64338: [[1659], 256], + 64339: [[1659], 256], + 64340: [[1659], 256], + 64341: [[1659], 256], + 64342: [[1662], 256], + 64343: [[1662], 256], + 64344: [[1662], 256], + 64345: [[1662], 256], + 64346: [[1664], 256], + 64347: [[1664], 256], + 64348: [[1664], 256], + 64349: [[1664], 256], + 64350: [[1658], 256], + 64351: [[1658], 256], + 64352: [[1658], 256], + 64353: [[1658], 256], + 64354: [[1663], 256], + 64355: [[1663], 256], + 64356: [[1663], 256], + 64357: [[1663], 256], + 64358: [[1657], 256], + 64359: [[1657], 256], + 64360: [[1657], 256], + 64361: [[1657], 256], + 64362: [[1700], 256], + 64363: [[1700], 256], + 64364: [[1700], 256], + 64365: [[1700], 256], + 64366: [[1702], 256], + 64367: [[1702], 256], + 64368: [[1702], 256], + 64369: [[1702], 256], + 64370: [[1668], 256], + 64371: [[1668], 256], + 64372: [[1668], 256], + 64373: [[1668], 256], + 64374: [[1667], 256], + 64375: [[1667], 256], + 64376: [[1667], 256], + 64377: [[1667], 256], + 64378: [[1670], 256], + 64379: [[1670], 256], + 64380: [[1670], 256], + 64381: [[1670], 256], + 64382: [[1671], 256], + 64383: [[1671], 256], + 64384: [[1671], 256], + 64385: [[1671], 256], + 64386: [[1677], 256], + 64387: [[1677], 256], + 64388: [[1676], 256], + 64389: [[1676], 256], + 64390: [[1678], 256], + 64391: [[1678], 256], + 64392: [[1672], 256], + 64393: [[1672], 256], + 64394: [[1688], 256], + 64395: [[1688], 256], + 64396: [[1681], 256], + 64397: [[1681], 256], + 64398: [[1705], 256], + 64399: [[1705], 256], + 64400: [[1705], 256], + 64401: [[1705], 256], + 64402: [[1711], 256], + 64403: [[1711], 256], + 64404: [[1711], 256], + 64405: [[1711], 256], + 64406: [[1715], 256], + 64407: [[1715], 256], + 64408: [[1715], 256], + 64409: [[1715], 256], + 64410: [[1713], 256], + 64411: [[1713], 256], + 64412: [[1713], 256], + 64413: [[1713], 256], + 64414: [[1722], 256], + 64415: [[1722], 256], + 64416: [[1723], 256], + 64417: [[1723], 256], + 64418: [[1723], 256], + 64419: [[1723], 256], + 64420: [[1728], 256], + 64421: [[1728], 256], + 64422: [[1729], 256], + 64423: [[1729], 256], + 64424: [[1729], 256], + 64425: [[1729], 256], + 64426: [[1726], 256], + 64427: [[1726], 256], + 64428: [[1726], 256], + 64429: [[1726], 256], + 64430: [[1746], 256], + 64431: [[1746], 256], + 64432: [[1747], 256], + 64433: [[1747], 256], + 64467: [[1709], 256], + 64468: [[1709], 256], + 64469: [[1709], 256], + 64470: [[1709], 256], + 64471: [[1735], 256], + 64472: [[1735], 256], + 64473: [[1734], 256], + 64474: [[1734], 256], + 64475: [[1736], 256], + 64476: [[1736], 256], + 64477: [[1655], 256], + 64478: [[1739], 256], + 64479: [[1739], 256], + 64480: [[1733], 256], + 64481: [[1733], 256], + 64482: [[1737], 256], + 64483: [[1737], 256], + 64484: [[1744], 256], + 64485: [[1744], 256], + 64486: [[1744], 256], + 64487: [[1744], 256], + 64488: [[1609], 256], + 64489: [[1609], 256], + 64490: [[1574, 1575], 256], + 64491: [[1574, 1575], 256], + 64492: [[1574, 1749], 256], + 64493: [[1574, 1749], 256], + 64494: [[1574, 1608], 256], + 64495: [[1574, 1608], 256], + 64496: [[1574, 1735], 256], + 64497: [[1574, 1735], 256], + 64498: [[1574, 1734], 256], + 64499: [[1574, 1734], 256], + 64500: [[1574, 1736], 256], + 64501: [[1574, 1736], 256], + 64502: [[1574, 1744], 256], + 64503: [[1574, 1744], 256], + 64504: [[1574, 1744], 256], + 64505: [[1574, 1609], 256], + 64506: [[1574, 1609], 256], + 64507: [[1574, 1609], 256], + 64508: [[1740], 256], + 64509: [[1740], 256], + 64510: [[1740], 256], + 64511: [[1740], 256] + }, + 64512: { + 64512: [[1574, 1580], 256], + 64513: [[1574, 1581], 256], + 64514: [[1574, 1605], 256], + 64515: [[1574, 1609], 256], + 64516: [[1574, 1610], 256], + 64517: [[1576, 1580], 256], + 64518: [[1576, 1581], 256], + 64519: [[1576, 1582], 256], + 64520: [[1576, 1605], 256], + 64521: [[1576, 1609], 256], + 64522: [[1576, 1610], 256], + 64523: [[1578, 1580], 256], + 64524: [[1578, 1581], 256], + 64525: [[1578, 1582], 256], + 64526: [[1578, 1605], 256], + 64527: [[1578, 1609], 256], + 64528: [[1578, 1610], 256], + 64529: [[1579, 1580], 256], + 64530: [[1579, 1605], 256], + 64531: [[1579, 1609], 256], + 64532: [[1579, 1610], 256], + 64533: [[1580, 1581], 256], + 64534: [[1580, 1605], 256], + 64535: [[1581, 1580], 256], + 64536: [[1581, 1605], 256], + 64537: [[1582, 1580], 256], + 64538: [[1582, 1581], 256], + 64539: [[1582, 1605], 256], + 64540: [[1587, 1580], 256], + 64541: [[1587, 1581], 256], + 64542: [[1587, 1582], 256], + 64543: [[1587, 1605], 256], + 64544: [[1589, 1581], 256], + 64545: [[1589, 1605], 256], + 64546: [[1590, 1580], 256], + 64547: [[1590, 1581], 256], + 64548: [[1590, 1582], 256], + 64549: [[1590, 1605], 256], + 64550: [[1591, 1581], 256], + 64551: [[1591, 1605], 256], + 64552: [[1592, 1605], 256], + 64553: [[1593, 1580], 256], + 64554: [[1593, 1605], 256], + 64555: [[1594, 1580], 256], + 64556: [[1594, 1605], 256], + 64557: [[1601, 1580], 256], + 64558: [[1601, 1581], 256], + 64559: [[1601, 1582], 256], + 64560: [[1601, 1605], 256], + 64561: [[1601, 1609], 256], + 64562: [[1601, 1610], 256], + 64563: [[1602, 1581], 256], + 64564: [[1602, 1605], 256], + 64565: [[1602, 1609], 256], + 64566: [[1602, 1610], 256], + 64567: [[1603, 1575], 256], + 64568: [[1603, 1580], 256], + 64569: [[1603, 1581], 256], + 64570: [[1603, 1582], 256], + 64571: [[1603, 1604], 256], + 64572: [[1603, 1605], 256], + 64573: [[1603, 1609], 256], + 64574: [[1603, 1610], 256], + 64575: [[1604, 1580], 256], + 64576: [[1604, 1581], 256], + 64577: [[1604, 1582], 256], + 64578: [[1604, 1605], 256], + 64579: [[1604, 1609], 256], + 64580: [[1604, 1610], 256], + 64581: [[1605, 1580], 256], + 64582: [[1605, 1581], 256], + 64583: [[1605, 1582], 256], + 64584: [[1605, 1605], 256], + 64585: [[1605, 1609], 256], + 64586: [[1605, 1610], 256], + 64587: [[1606, 1580], 256], + 64588: [[1606, 1581], 256], + 64589: [[1606, 1582], 256], + 64590: [[1606, 1605], 256], + 64591: [[1606, 1609], 256], + 64592: [[1606, 1610], 256], + 64593: [[1607, 1580], 256], + 64594: [[1607, 1605], 256], + 64595: [[1607, 1609], 256], + 64596: [[1607, 1610], 256], + 64597: [[1610, 1580], 256], + 64598: [[1610, 1581], 256], + 64599: [[1610, 1582], 256], + 64600: [[1610, 1605], 256], + 64601: [[1610, 1609], 256], + 64602: [[1610, 1610], 256], + 64603: [[1584, 1648], 256], + 64604: [[1585, 1648], 256], + 64605: [[1609, 1648], 256], + 64606: [[32, 1612, 1617], 256], + 64607: [[32, 1613, 1617], 256], + 64608: [[32, 1614, 1617], 256], + 64609: [[32, 1615, 1617], 256], + 64610: [[32, 1616, 1617], 256], + 64611: [[32, 1617, 1648], 256], + 64612: [[1574, 1585], 256], + 64613: [[1574, 1586], 256], + 64614: [[1574, 1605], 256], + 64615: [[1574, 1606], 256], + 64616: [[1574, 1609], 256], + 64617: [[1574, 1610], 256], + 64618: [[1576, 1585], 256], + 64619: [[1576, 1586], 256], + 64620: [[1576, 1605], 256], + 64621: [[1576, 1606], 256], + 64622: [[1576, 1609], 256], + 64623: [[1576, 1610], 256], + 64624: [[1578, 1585], 256], + 64625: [[1578, 1586], 256], + 64626: [[1578, 1605], 256], + 64627: [[1578, 1606], 256], + 64628: [[1578, 1609], 256], + 64629: [[1578, 1610], 256], + 64630: [[1579, 1585], 256], + 64631: [[1579, 1586], 256], + 64632: [[1579, 1605], 256], + 64633: [[1579, 1606], 256], + 64634: [[1579, 1609], 256], + 64635: [[1579, 1610], 256], + 64636: [[1601, 1609], 256], + 64637: [[1601, 1610], 256], + 64638: [[1602, 1609], 256], + 64639: [[1602, 1610], 256], + 64640: [[1603, 1575], 256], + 64641: [[1603, 1604], 256], + 64642: [[1603, 1605], 256], + 64643: [[1603, 1609], 256], + 64644: [[1603, 1610], 256], + 64645: [[1604, 1605], 256], + 64646: [[1604, 1609], 256], + 64647: [[1604, 1610], 256], + 64648: [[1605, 1575], 256], + 64649: [[1605, 1605], 256], + 64650: [[1606, 1585], 256], + 64651: [[1606, 1586], 256], + 64652: [[1606, 1605], 256], + 64653: [[1606, 1606], 256], + 64654: [[1606, 1609], 256], + 64655: [[1606, 1610], 256], + 64656: [[1609, 1648], 256], + 64657: [[1610, 1585], 256], + 64658: [[1610, 1586], 256], + 64659: [[1610, 1605], 256], + 64660: [[1610, 1606], 256], + 64661: [[1610, 1609], 256], + 64662: [[1610, 1610], 256], + 64663: [[1574, 1580], 256], + 64664: [[1574, 1581], 256], + 64665: [[1574, 1582], 256], + 64666: [[1574, 1605], 256], + 64667: [[1574, 1607], 256], + 64668: [[1576, 1580], 256], + 64669: [[1576, 1581], 256], + 64670: [[1576, 1582], 256], + 64671: [[1576, 1605], 256], + 64672: [[1576, 1607], 256], + 64673: [[1578, 1580], 256], + 64674: [[1578, 1581], 256], + 64675: [[1578, 1582], 256], + 64676: [[1578, 1605], 256], + 64677: [[1578, 1607], 256], + 64678: [[1579, 1605], 256], + 64679: [[1580, 1581], 256], + 64680: [[1580, 1605], 256], + 64681: [[1581, 1580], 256], + 64682: [[1581, 1605], 256], + 64683: [[1582, 1580], 256], + 64684: [[1582, 1605], 256], + 64685: [[1587, 1580], 256], + 64686: [[1587, 1581], 256], + 64687: [[1587, 1582], 256], + 64688: [[1587, 1605], 256], + 64689: [[1589, 1581], 256], + 64690: [[1589, 1582], 256], + 64691: [[1589, 1605], 256], + 64692: [[1590, 1580], 256], + 64693: [[1590, 1581], 256], + 64694: [[1590, 1582], 256], + 64695: [[1590, 1605], 256], + 64696: [[1591, 1581], 256], + 64697: [[1592, 1605], 256], + 64698: [[1593, 1580], 256], + 64699: [[1593, 1605], 256], + 64700: [[1594, 1580], 256], + 64701: [[1594, 1605], 256], + 64702: [[1601, 1580], 256], + 64703: [[1601, 1581], 256], + 64704: [[1601, 1582], 256], + 64705: [[1601, 1605], 256], + 64706: [[1602, 1581], 256], + 64707: [[1602, 1605], 256], + 64708: [[1603, 1580], 256], + 64709: [[1603, 1581], 256], + 64710: [[1603, 1582], 256], + 64711: [[1603, 1604], 256], + 64712: [[1603, 1605], 256], + 64713: [[1604, 1580], 256], + 64714: [[1604, 1581], 256], + 64715: [[1604, 1582], 256], + 64716: [[1604, 1605], 256], + 64717: [[1604, 1607], 256], + 64718: [[1605, 1580], 256], + 64719: [[1605, 1581], 256], + 64720: [[1605, 1582], 256], + 64721: [[1605, 1605], 256], + 64722: [[1606, 1580], 256], + 64723: [[1606, 1581], 256], + 64724: [[1606, 1582], 256], + 64725: [[1606, 1605], 256], + 64726: [[1606, 1607], 256], + 64727: [[1607, 1580], 256], + 64728: [[1607, 1605], 256], + 64729: [[1607, 1648], 256], + 64730: [[1610, 1580], 256], + 64731: [[1610, 1581], 256], + 64732: [[1610, 1582], 256], + 64733: [[1610, 1605], 256], + 64734: [[1610, 1607], 256], + 64735: [[1574, 1605], 256], + 64736: [[1574, 1607], 256], + 64737: [[1576, 1605], 256], + 64738: [[1576, 1607], 256], + 64739: [[1578, 1605], 256], + 64740: [[1578, 1607], 256], + 64741: [[1579, 1605], 256], + 64742: [[1579, 1607], 256], + 64743: [[1587, 1605], 256], + 64744: [[1587, 1607], 256], + 64745: [[1588, 1605], 256], + 64746: [[1588, 1607], 256], + 64747: [[1603, 1604], 256], + 64748: [[1603, 1605], 256], + 64749: [[1604, 1605], 256], + 64750: [[1606, 1605], 256], + 64751: [[1606, 1607], 256], + 64752: [[1610, 1605], 256], + 64753: [[1610, 1607], 256], + 64754: [[1600, 1614, 1617], 256], + 64755: [[1600, 1615, 1617], 256], + 64756: [[1600, 1616, 1617], 256], + 64757: [[1591, 1609], 256], + 64758: [[1591, 1610], 256], + 64759: [[1593, 1609], 256], + 64760: [[1593, 1610], 256], + 64761: [[1594, 1609], 256], + 64762: [[1594, 1610], 256], + 64763: [[1587, 1609], 256], + 64764: [[1587, 1610], 256], + 64765: [[1588, 1609], 256], + 64766: [[1588, 1610], 256], + 64767: [[1581, 1609], 256] + }, + 64768: { + 64768: [[1581, 1610], 256], + 64769: [[1580, 1609], 256], + 64770: [[1580, 1610], 256], + 64771: [[1582, 1609], 256], + 64772: [[1582, 1610], 256], + 64773: [[1589, 1609], 256], + 64774: [[1589, 1610], 256], + 64775: [[1590, 1609], 256], + 64776: [[1590, 1610], 256], + 64777: [[1588, 1580], 256], + 64778: [[1588, 1581], 256], + 64779: [[1588, 1582], 256], + 64780: [[1588, 1605], 256], + 64781: [[1588, 1585], 256], + 64782: [[1587, 1585], 256], + 64783: [[1589, 1585], 256], + 64784: [[1590, 1585], 256], + 64785: [[1591, 1609], 256], + 64786: [[1591, 1610], 256], + 64787: [[1593, 1609], 256], + 64788: [[1593, 1610], 256], + 64789: [[1594, 1609], 256], + 64790: [[1594, 1610], 256], + 64791: [[1587, 1609], 256], + 64792: [[1587, 1610], 256], + 64793: [[1588, 1609], 256], + 64794: [[1588, 1610], 256], + 64795: [[1581, 1609], 256], + 64796: [[1581, 1610], 256], + 64797: [[1580, 1609], 256], + 64798: [[1580, 1610], 256], + 64799: [[1582, 1609], 256], + 64800: [[1582, 1610], 256], + 64801: [[1589, 1609], 256], + 64802: [[1589, 1610], 256], + 64803: [[1590, 1609], 256], + 64804: [[1590, 1610], 256], + 64805: [[1588, 1580], 256], + 64806: [[1588, 1581], 256], + 64807: [[1588, 1582], 256], + 64808: [[1588, 1605], 256], + 64809: [[1588, 1585], 256], + 64810: [[1587, 1585], 256], + 64811: [[1589, 1585], 256], + 64812: [[1590, 1585], 256], + 64813: [[1588, 1580], 256], + 64814: [[1588, 1581], 256], + 64815: [[1588, 1582], 256], + 64816: [[1588, 1605], 256], + 64817: [[1587, 1607], 256], + 64818: [[1588, 1607], 256], + 64819: [[1591, 1605], 256], + 64820: [[1587, 1580], 256], + 64821: [[1587, 1581], 256], + 64822: [[1587, 1582], 256], + 64823: [[1588, 1580], 256], + 64824: [[1588, 1581], 256], + 64825: [[1588, 1582], 256], + 64826: [[1591, 1605], 256], + 64827: [[1592, 1605], 256], + 64828: [[1575, 1611], 256], + 64829: [[1575, 1611], 256], + 64848: [[1578, 1580, 1605], 256], + 64849: [[1578, 1581, 1580], 256], + 64850: [[1578, 1581, 1580], 256], + 64851: [[1578, 1581, 1605], 256], + 64852: [[1578, 1582, 1605], 256], + 64853: [[1578, 1605, 1580], 256], + 64854: [[1578, 1605, 1581], 256], + 64855: [[1578, 1605, 1582], 256], + 64856: [[1580, 1605, 1581], 256], + 64857: [[1580, 1605, 1581], 256], + 64858: [[1581, 1605, 1610], 256], + 64859: [[1581, 1605, 1609], 256], + 64860: [[1587, 1581, 1580], 256], + 64861: [[1587, 1580, 1581], 256], + 64862: [[1587, 1580, 1609], 256], + 64863: [[1587, 1605, 1581], 256], + 64864: [[1587, 1605, 1581], 256], + 64865: [[1587, 1605, 1580], 256], + 64866: [[1587, 1605, 1605], 256], + 64867: [[1587, 1605, 1605], 256], + 64868: [[1589, 1581, 1581], 256], + 64869: [[1589, 1581, 1581], 256], + 64870: [[1589, 1605, 1605], 256], + 64871: [[1588, 1581, 1605], 256], + 64872: [[1588, 1581, 1605], 256], + 64873: [[1588, 1580, 1610], 256], + 64874: [[1588, 1605, 1582], 256], + 64875: [[1588, 1605, 1582], 256], + 64876: [[1588, 1605, 1605], 256], + 64877: [[1588, 1605, 1605], 256], + 64878: [[1590, 1581, 1609], 256], + 64879: [[1590, 1582, 1605], 256], + 64880: [[1590, 1582, 1605], 256], + 64881: [[1591, 1605, 1581], 256], + 64882: [[1591, 1605, 1581], 256], + 64883: [[1591, 1605, 1605], 256], + 64884: [[1591, 1605, 1610], 256], + 64885: [[1593, 1580, 1605], 256], + 64886: [[1593, 1605, 1605], 256], + 64887: [[1593, 1605, 1605], 256], + 64888: [[1593, 1605, 1609], 256], + 64889: [[1594, 1605, 1605], 256], + 64890: [[1594, 1605, 1610], 256], + 64891: [[1594, 1605, 1609], 256], + 64892: [[1601, 1582, 1605], 256], + 64893: [[1601, 1582, 1605], 256], + 64894: [[1602, 1605, 1581], 256], + 64895: [[1602, 1605, 1605], 256], + 64896: [[1604, 1581, 1605], 256], + 64897: [[1604, 1581, 1610], 256], + 64898: [[1604, 1581, 1609], 256], + 64899: [[1604, 1580, 1580], 256], + 64900: [[1604, 1580, 1580], 256], + 64901: [[1604, 1582, 1605], 256], + 64902: [[1604, 1582, 1605], 256], + 64903: [[1604, 1605, 1581], 256], + 64904: [[1604, 1605, 1581], 256], + 64905: [[1605, 1581, 1580], 256], + 64906: [[1605, 1581, 1605], 256], + 64907: [[1605, 1581, 1610], 256], + 64908: [[1605, 1580, 1581], 256], + 64909: [[1605, 1580, 1605], 256], + 64910: [[1605, 1582, 1580], 256], + 64911: [[1605, 1582, 1605], 256], + 64914: [[1605, 1580, 1582], 256], + 64915: [[1607, 1605, 1580], 256], + 64916: [[1607, 1605, 1605], 256], + 64917: [[1606, 1581, 1605], 256], + 64918: [[1606, 1581, 1609], 256], + 64919: [[1606, 1580, 1605], 256], + 64920: [[1606, 1580, 1605], 256], + 64921: [[1606, 1580, 1609], 256], + 64922: [[1606, 1605, 1610], 256], + 64923: [[1606, 1605, 1609], 256], + 64924: [[1610, 1605, 1605], 256], + 64925: [[1610, 1605, 1605], 256], + 64926: [[1576, 1582, 1610], 256], + 64927: [[1578, 1580, 1610], 256], + 64928: [[1578, 1580, 1609], 256], + 64929: [[1578, 1582, 1610], 256], + 64930: [[1578, 1582, 1609], 256], + 64931: [[1578, 1605, 1610], 256], + 64932: [[1578, 1605, 1609], 256], + 64933: [[1580, 1605, 1610], 256], + 64934: [[1580, 1581, 1609], 256], + 64935: [[1580, 1605, 1609], 256], + 64936: [[1587, 1582, 1609], 256], + 64937: [[1589, 1581, 1610], 256], + 64938: [[1588, 1581, 1610], 256], + 64939: [[1590, 1581, 1610], 256], + 64940: [[1604, 1580, 1610], 256], + 64941: [[1604, 1605, 1610], 256], + 64942: [[1610, 1581, 1610], 256], + 64943: [[1610, 1580, 1610], 256], + 64944: [[1610, 1605, 1610], 256], + 64945: [[1605, 1605, 1610], 256], + 64946: [[1602, 1605, 1610], 256], + 64947: [[1606, 1581, 1610], 256], + 64948: [[1602, 1605, 1581], 256], + 64949: [[1604, 1581, 1605], 256], + 64950: [[1593, 1605, 1610], 256], + 64951: [[1603, 1605, 1610], 256], + 64952: [[1606, 1580, 1581], 256], + 64953: [[1605, 1582, 1610], 256], + 64954: [[1604, 1580, 1605], 256], + 64955: [[1603, 1605, 1605], 256], + 64956: [[1604, 1580, 1605], 256], + 64957: [[1606, 1580, 1581], 256], + 64958: [[1580, 1581, 1610], 256], + 64959: [[1581, 1580, 1610], 256], + 64960: [[1605, 1580, 1610], 256], + 64961: [[1601, 1605, 1610], 256], + 64962: [[1576, 1581, 1610], 256], + 64963: [[1603, 1605, 1605], 256], + 64964: [[1593, 1580, 1605], 256], + 64965: [[1589, 1605, 1605], 256], + 64966: [[1587, 1582, 1610], 256], + 64967: [[1606, 1580, 1610], 256], + 65008: [[1589, 1604, 1746], 256], + 65009: [[1602, 1604, 1746], 256], + 65010: [[1575, 1604, 1604, 1607], 256], + 65011: [[1575, 1603, 1576, 1585], 256], + 65012: [[1605, 1581, 1605, 1583], 256], + 65013: [[1589, 1604, 1593, 1605], 256], + 65014: [[1585, 1587, 1608, 1604], 256], + 65015: [[1593, 1604, 1610, 1607], 256], + 65016: [[1608, 1587, 1604, 1605], 256], + 65017: [[1589, 1604, 1609], 256], + 65018: [ + [ + 1589, + 1604, + 1609, + 32, + 1575, + 1604, + 1604, + 1607, + 32, + 1593, + 1604, + 1610, + 1607, + 32, + 1608, + 1587, + 1604, + 1605 + ], + 256 + ], + 65019: [[1580, 1604, 32, 1580, 1604, 1575, 1604, 1607], 256], + 65020: [[1585, 1740, 1575, 1604], 256] + }, + 65024: { + 65040: [[44], 256], + 65041: [[12289], 256], + 65042: [[12290], 256], + 65043: [[58], 256], + 65044: [[59], 256], + 65045: [[33], 256], + 65046: [[63], 256], + 65047: [[12310], 256], + 65048: [[12311], 256], + 65049: [[8230], 256], + 65056: [, 230], + 65057: [, 230], + 65058: [, 230], + 65059: [, 230], + 65060: [, 230], + 65061: [, 230], + 65062: [, 230], + 65072: [[8229], 256], + 65073: [[8212], 256], + 65074: [[8211], 256], + 65075: [[95], 256], + 65076: [[95], 256], + 65077: [[40], 256], + 65078: [[41], 256], + 65079: [[123], 256], + 65080: [[125], 256], + 65081: [[12308], 256], + 65082: [[12309], 256], + 65083: [[12304], 256], + 65084: [[12305], 256], + 65085: [[12298], 256], + 65086: [[12299], 256], + 65087: [[12296], 256], + 65088: [[12297], 256], + 65089: [[12300], 256], + 65090: [[12301], 256], + 65091: [[12302], 256], + 65092: [[12303], 256], + 65095: [[91], 256], + 65096: [[93], 256], + 65097: [[8254], 256], + 65098: [[8254], 256], + 65099: [[8254], 256], + 65100: [[8254], 256], + 65101: [[95], 256], + 65102: [[95], 256], + 65103: [[95], 256], + 65104: [[44], 256], + 65105: [[12289], 256], + 65106: [[46], 256], + 65108: [[59], 256], + 65109: [[58], 256], + 65110: [[63], 256], + 65111: [[33], 256], + 65112: [[8212], 256], + 65113: [[40], 256], + 65114: [[41], 256], + 65115: [[123], 256], + 65116: [[125], 256], + 65117: [[12308], 256], + 65118: [[12309], 256], + 65119: [[35], 256], + 65120: [[38], 256], + 65121: [[42], 256], + 65122: [[43], 256], + 65123: [[45], 256], + 65124: [[60], 256], + 65125: [[62], 256], + 65126: [[61], 256], + 65128: [[92], 256], + 65129: [[36], 256], + 65130: [[37], 256], + 65131: [[64], 256], + 65136: [[32, 1611], 256], + 65137: [[1600, 1611], 256], + 65138: [[32, 1612], 256], + 65140: [[32, 1613], 256], + 65142: [[32, 1614], 256], + 65143: [[1600, 1614], 256], + 65144: [[32, 1615], 256], + 65145: [[1600, 1615], 256], + 65146: [[32, 1616], 256], + 65147: [[1600, 1616], 256], + 65148: [[32, 1617], 256], + 65149: [[1600, 1617], 256], + 65150: [[32, 1618], 256], + 65151: [[1600, 1618], 256], + 65152: [[1569], 256], + 65153: [[1570], 256], + 65154: [[1570], 256], + 65155: [[1571], 256], + 65156: [[1571], 256], + 65157: [[1572], 256], + 65158: [[1572], 256], + 65159: [[1573], 256], + 65160: [[1573], 256], + 65161: [[1574], 256], + 65162: [[1574], 256], + 65163: [[1574], 256], + 65164: [[1574], 256], + 65165: [[1575], 256], + 65166: [[1575], 256], + 65167: [[1576], 256], + 65168: [[1576], 256], + 65169: [[1576], 256], + 65170: [[1576], 256], + 65171: [[1577], 256], + 65172: [[1577], 256], + 65173: [[1578], 256], + 65174: [[1578], 256], + 65175: [[1578], 256], + 65176: [[1578], 256], + 65177: [[1579], 256], + 65178: [[1579], 256], + 65179: [[1579], 256], + 65180: [[1579], 256], + 65181: [[1580], 256], + 65182: [[1580], 256], + 65183: [[1580], 256], + 65184: [[1580], 256], + 65185: [[1581], 256], + 65186: [[1581], 256], + 65187: [[1581], 256], + 65188: [[1581], 256], + 65189: [[1582], 256], + 65190: [[1582], 256], + 65191: [[1582], 256], + 65192: [[1582], 256], + 65193: [[1583], 256], + 65194: [[1583], 256], + 65195: [[1584], 256], + 65196: [[1584], 256], + 65197: [[1585], 256], + 65198: [[1585], 256], + 65199: [[1586], 256], + 65200: [[1586], 256], + 65201: [[1587], 256], + 65202: [[1587], 256], + 65203: [[1587], 256], + 65204: [[1587], 256], + 65205: [[1588], 256], + 65206: [[1588], 256], + 65207: [[1588], 256], + 65208: [[1588], 256], + 65209: [[1589], 256], + 65210: [[1589], 256], + 65211: [[1589], 256], + 65212: [[1589], 256], + 65213: [[1590], 256], + 65214: [[1590], 256], + 65215: [[1590], 256], + 65216: [[1590], 256], + 65217: [[1591], 256], + 65218: [[1591], 256], + 65219: [[1591], 256], + 65220: [[1591], 256], + 65221: [[1592], 256], + 65222: [[1592], 256], + 65223: [[1592], 256], + 65224: [[1592], 256], + 65225: [[1593], 256], + 65226: [[1593], 256], + 65227: [[1593], 256], + 65228: [[1593], 256], + 65229: [[1594], 256], + 65230: [[1594], 256], + 65231: [[1594], 256], + 65232: [[1594], 256], + 65233: [[1601], 256], + 65234: [[1601], 256], + 65235: [[1601], 256], + 65236: [[1601], 256], + 65237: [[1602], 256], + 65238: [[1602], 256], + 65239: [[1602], 256], + 65240: [[1602], 256], + 65241: [[1603], 256], + 65242: [[1603], 256], + 65243: [[1603], 256], + 65244: [[1603], 256], + 65245: [[1604], 256], + 65246: [[1604], 256], + 65247: [[1604], 256], + 65248: [[1604], 256], + 65249: [[1605], 256], + 65250: [[1605], 256], + 65251: [[1605], 256], + 65252: [[1605], 256], + 65253: [[1606], 256], + 65254: [[1606], 256], + 65255: [[1606], 256], + 65256: [[1606], 256], + 65257: [[1607], 256], + 65258: [[1607], 256], + 65259: [[1607], 256], + 65260: [[1607], 256], + 65261: [[1608], 256], + 65262: [[1608], 256], + 65263: [[1609], 256], + 65264: [[1609], 256], + 65265: [[1610], 256], + 65266: [[1610], 256], + 65267: [[1610], 256], + 65268: [[1610], 256], + 65269: [[1604, 1570], 256], + 65270: [[1604, 1570], 256], + 65271: [[1604, 1571], 256], + 65272: [[1604, 1571], 256], + 65273: [[1604, 1573], 256], + 65274: [[1604, 1573], 256], + 65275: [[1604, 1575], 256], + 65276: [[1604, 1575], 256] + }, + 65280: { + 65281: [[33], 256], + 65282: [[34], 256], + 65283: [[35], 256], + 65284: [[36], 256], + 65285: [[37], 256], + 65286: [[38], 256], + 65287: [[39], 256], + 65288: [[40], 256], + 65289: [[41], 256], + 65290: [[42], 256], + 65291: [[43], 256], + 65292: [[44], 256], + 65293: [[45], 256], + 65294: [[46], 256], + 65295: [[47], 256], + 65296: [[48], 256], + 65297: [[49], 256], + 65298: [[50], 256], + 65299: [[51], 256], + 65300: [[52], 256], + 65301: [[53], 256], + 65302: [[54], 256], + 65303: [[55], 256], + 65304: [[56], 256], + 65305: [[57], 256], + 65306: [[58], 256], + 65307: [[59], 256], + 65308: [[60], 256], + 65309: [[61], 256], + 65310: [[62], 256], + 65311: [[63], 256], + 65312: [[64], 256], + 65313: [[65], 256], + 65314: [[66], 256], + 65315: [[67], 256], + 65316: [[68], 256], + 65317: [[69], 256], + 65318: [[70], 256], + 65319: [[71], 256], + 65320: [[72], 256], + 65321: [[73], 256], + 65322: [[74], 256], + 65323: [[75], 256], + 65324: [[76], 256], + 65325: [[77], 256], + 65326: [[78], 256], + 65327: [[79], 256], + 65328: [[80], 256], + 65329: [[81], 256], + 65330: [[82], 256], + 65331: [[83], 256], + 65332: [[84], 256], + 65333: [[85], 256], + 65334: [[86], 256], + 65335: [[87], 256], + 65336: [[88], 256], + 65337: [[89], 256], + 65338: [[90], 256], + 65339: [[91], 256], + 65340: [[92], 256], + 65341: [[93], 256], + 65342: [[94], 256], + 65343: [[95], 256], + 65344: [[96], 256], + 65345: [[97], 256], + 65346: [[98], 256], + 65347: [[99], 256], + 65348: [[100], 256], + 65349: [[101], 256], + 65350: [[102], 256], + 65351: [[103], 256], + 65352: [[104], 256], + 65353: [[105], 256], + 65354: [[106], 256], + 65355: [[107], 256], + 65356: [[108], 256], + 65357: [[109], 256], + 65358: [[110], 256], + 65359: [[111], 256], + 65360: [[112], 256], + 65361: [[113], 256], + 65362: [[114], 256], + 65363: [[115], 256], + 65364: [[116], 256], + 65365: [[117], 256], + 65366: [[118], 256], + 65367: [[119], 256], + 65368: [[120], 256], + 65369: [[121], 256], + 65370: [[122], 256], + 65371: [[123], 256], + 65372: [[124], 256], + 65373: [[125], 256], + 65374: [[126], 256], + 65375: [[10629], 256], + 65376: [[10630], 256], + 65377: [[12290], 256], + 65378: [[12300], 256], + 65379: [[12301], 256], + 65380: [[12289], 256], + 65381: [[12539], 256], + 65382: [[12530], 256], + 65383: [[12449], 256], + 65384: [[12451], 256], + 65385: [[12453], 256], + 65386: [[12455], 256], + 65387: [[12457], 256], + 65388: [[12515], 256], + 65389: [[12517], 256], + 65390: [[12519], 256], + 65391: [[12483], 256], + 65392: [[12540], 256], + 65393: [[12450], 256], + 65394: [[12452], 256], + 65395: [[12454], 256], + 65396: [[12456], 256], + 65397: [[12458], 256], + 65398: [[12459], 256], + 65399: [[12461], 256], + 65400: [[12463], 256], + 65401: [[12465], 256], + 65402: [[12467], 256], + 65403: [[12469], 256], + 65404: [[12471], 256], + 65405: [[12473], 256], + 65406: [[12475], 256], + 65407: [[12477], 256], + 65408: [[12479], 256], + 65409: [[12481], 256], + 65410: [[12484], 256], + 65411: [[12486], 256], + 65412: [[12488], 256], + 65413: [[12490], 256], + 65414: [[12491], 256], + 65415: [[12492], 256], + 65416: [[12493], 256], + 65417: [[12494], 256], + 65418: [[12495], 256], + 65419: [[12498], 256], + 65420: [[12501], 256], + 65421: [[12504], 256], + 65422: [[12507], 256], + 65423: [[12510], 256], + 65424: [[12511], 256], + 65425: [[12512], 256], + 65426: [[12513], 256], + 65427: [[12514], 256], + 65428: [[12516], 256], + 65429: [[12518], 256], + 65430: [[12520], 256], + 65431: [[12521], 256], + 65432: [[12522], 256], + 65433: [[12523], 256], + 65434: [[12524], 256], + 65435: [[12525], 256], + 65436: [[12527], 256], + 65437: [[12531], 256], + 65438: [[12441], 256], + 65439: [[12442], 256], + 65440: [[12644], 256], + 65441: [[12593], 256], + 65442: [[12594], 256], + 65443: [[12595], 256], + 65444: [[12596], 256], + 65445: [[12597], 256], + 65446: [[12598], 256], + 65447: [[12599], 256], + 65448: [[12600], 256], + 65449: [[12601], 256], + 65450: [[12602], 256], + 65451: [[12603], 256], + 65452: [[12604], 256], + 65453: [[12605], 256], + 65454: [[12606], 256], + 65455: [[12607], 256], + 65456: [[12608], 256], + 65457: [[12609], 256], + 65458: [[12610], 256], + 65459: [[12611], 256], + 65460: [[12612], 256], + 65461: [[12613], 256], + 65462: [[12614], 256], + 65463: [[12615], 256], + 65464: [[12616], 256], + 65465: [[12617], 256], + 65466: [[12618], 256], + 65467: [[12619], 256], + 65468: [[12620], 256], + 65469: [[12621], 256], + 65470: [[12622], 256], + 65474: [[12623], 256], + 65475: [[12624], 256], + 65476: [[12625], 256], + 65477: [[12626], 256], + 65478: [[12627], 256], + 65479: [[12628], 256], + 65482: [[12629], 256], + 65483: [[12630], 256], + 65484: [[12631], 256], + 65485: [[12632], 256], + 65486: [[12633], 256], + 65487: [[12634], 256], + 65490: [[12635], 256], + 65491: [[12636], 256], + 65492: [[12637], 256], + 65493: [[12638], 256], + 65494: [[12639], 256], + 65495: [[12640], 256], + 65498: [[12641], 256], + 65499: [[12642], 256], + 65500: [[12643], 256], + 65504: [[162], 256], + 65505: [[163], 256], + 65506: [[172], 256], + 65507: [[175], 256], + 65508: [[166], 256], + 65509: [[165], 256], + 65510: [[8361], 256], + 65512: [[9474], 256], + 65513: [[8592], 256], + 65514: [[8593], 256], + 65515: [[8594], 256], + 65516: [[8595], 256], + 65517: [[9632], 256], + 65518: [[9675], 256] + } +}; diff --git a/node_modules/es5-ext/string/#/normalize/implement.js b/node_modules/es5-ext/string/#/normalize/implement.js new file mode 100644 index 0000000..ad11739 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "normalize", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/normalize/index.js b/node_modules/es5-ext/string/#/normalize/index.js new file mode 100644 index 0000000..7e91b08 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.normalize + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/normalize/is-implemented.js b/node_modules/es5-ext/string/#/normalize/is-implemented.js new file mode 100644 index 0000000..01b48a9 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "æøåäüö"; + +module.exports = function () { + if (typeof str.normalize !== "function") return false; + return str.normalize("NFKD") === "æøåäüö"; +}; diff --git a/node_modules/es5-ext/string/#/normalize/shim.js b/node_modules/es5-ext/string/#/normalize/shim.js new file mode 100644 index 0000000..aba37f5 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/shim.js @@ -0,0 +1,317 @@ +/* eslint no-bitwise: "off", max-statements: "off", max-lines: "off" */ + +// Taken from: https://github.com/walling/unorm/blob/master/lib/unorm.js + +/* + * UnicodeNormalizer 1.0.0 + * Copyright (c) 2008 Matsuza + * Dual licensed under the MIT (MIT-LICENSE.txt) and + * GPL (GPL-LICENSE.txt) licenses. + * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ + * $Rev: 13309 $ +*/ + +"use strict"; + +var primitiveSet = require("../../../object/primitive-set") + , validValue = require("../../../object/valid-value") + , data = require("./_data"); + +var floor = Math.floor + , forms = primitiveSet("NFC", "NFD", "NFKC", "NFKD") + , DEFAULT_FEATURE = [null, 0, {}] + , CACHE_THRESHOLD = 10 + , SBase = 0xac00 + , LBase = 0x1100 + , VBase = 0x1161 + , TBase = 0x11a7 + , LCount = 19 + , VCount = 21 + , TCount = 28 + , NCount = VCount * TCount + , SCount = LCount * NCount + , UChar + , cache = {} + , cacheCounter = [] + , fromCache + , fromData + , fromCpOnly + , fromRuleBasedJamo + , fromCpFilter + , strategies + , UCharIterator + , RecursDecompIterator + , DecompIterator + , CompIterator + , createIterator + , normalize; + +UChar = function (cp, feature) { + this.codepoint = cp; + this.feature = feature; +}; + +// Strategies +(function () { + for (var i = 0; i <= 0xff; ++i) cacheCounter[i] = 0; +}()); + +fromCache = function (nextStep, cp, needFeature) { + var ret = cache[cp]; + if (!ret) { + ret = nextStep(cp, needFeature); + if (Boolean(ret.feature) && ++cacheCounter[(cp >> 8) & 0xff] > CACHE_THRESHOLD) { + cache[cp] = ret; + } + } + return ret; +}; + +fromData = function (next, cp) { + var hash = cp & 0xff00, dunit = UChar.udata[hash] || {}, feature = dunit[cp]; + return feature ? new UChar(cp, feature) : new UChar(cp, DEFAULT_FEATURE); +}; +fromCpOnly = function (next, cp, needFeature) { + return needFeature ? next(cp, needFeature) : new UChar(cp, null); +}; + +fromRuleBasedJamo = function (next, cp, needFeature) { + var char, base, i, arr, SIndex, TIndex, feature, j; + if (cp < LBase || (LBase + LCount <= cp && cp < SBase) || SBase + SCount < cp) { + return next(cp, needFeature); + } + if (LBase <= cp && cp < LBase + LCount) { + char = {}; + base = (cp - LBase) * VCount; + for (i = 0; i < VCount; ++i) { + char[VBase + i] = SBase + TCount * (i + base); + } + arr = new Array(3); + arr[2] = char; + return new UChar(cp, arr); + } + + SIndex = cp - SBase; + TIndex = SIndex % TCount; + feature = []; + if (TIndex === 0) { + feature[0] = [LBase + floor(SIndex / NCount), VBase + floor(SIndex % NCount / TCount)]; + feature[2] = {}; + for (j = 1; j < TCount; ++j) { + feature[2][TBase + j] = cp + j; + } + } else { + feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; + } + return new UChar(cp, feature); +}; + +fromCpFilter = function (next, cp, needFeature) { + return cp < 60 || (cp > 13311 && cp < 42607) + ? new UChar(cp, DEFAULT_FEATURE) + : next(cp, needFeature); +}; + +strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; + +UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { + return function (cp, needFeature) { + return strategy(next, cp, needFeature); + }; +}, null); + +UChar.isHighSurrogate = function (cp) { + return cp >= 0xd800 && cp <= 0xdbff; +}; +UChar.isLowSurrogate = function (cp) { + return cp >= 0xdc00 && cp <= 0xdfff; +}; + +UChar.prototype.prepFeature = function () { + if (!this.feature) { + this.feature = UChar.fromCharCode(this.codepoint, true).feature; + } +}; + +UChar.prototype.toString = function () { + var num; + if (this.codepoint < 0x10000) return String.fromCharCode(this.codepoint); + num = this.codepoint - 0x10000; + return String.fromCharCode(floor(num / 0x400) + 0xd800, num % 0x400 + 0xdc00); +}; + +UChar.prototype.getDecomp = function () { + this.prepFeature(); + return this.feature[0] || null; +}; + +UChar.prototype.isCompatibility = function () { + this.prepFeature(); + return Boolean(this.feature[1]) && this.feature[1] & (1 << 8); +}; +UChar.prototype.isExclude = function () { + this.prepFeature(); + return Boolean(this.feature[1]) && this.feature[1] & (1 << 9); +}; +UChar.prototype.getCanonicalClass = function () { + this.prepFeature(); + return this.feature[1] ? this.feature[1] & 0xff : 0; +}; +UChar.prototype.getComposite = function (following) { + var cp; + this.prepFeature(); + if (!this.feature[2]) return null; + cp = this.feature[2][following.codepoint]; + return cp ? UChar.fromCharCode(cp) : null; +}; + +UCharIterator = function (str) { + this.str = str; + this.cursor = 0; +}; +UCharIterator.prototype.next = function () { + if (Boolean(this.str) && this.cursor < this.str.length) { + var cp = this.str.charCodeAt(this.cursor++), d; + if ( + UChar.isHighSurrogate(cp) && + this.cursor < this.str.length && + UChar.isLowSurrogate(d = this.str.charCodeAt(this.cursor)) + ) { + cp = (cp - 0xd800) * 0x400 + (d - 0xdc00) + 0x10000; + ++this.cursor; + } + return UChar.fromCharCode(cp); + } + this.str = null; + return null; +}; + +RecursDecompIterator = function (it, cano) { + this.it = it; + this.canonical = cano; + this.resBuf = []; +}; + +RecursDecompIterator.prototype.next = function () { + var recursiveDecomp, uchar; + recursiveDecomp = function (cano, ucharLoc) { + var decomp = ucharLoc.getDecomp(), ret, i, a, j; + if (Boolean(decomp) && !(cano && ucharLoc.isCompatibility())) { + ret = []; + for (i = 0; i < decomp.length; ++i) { + a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); + // Ret.concat(a); //<-why does not this work? + // following block is a workaround. + for (j = 0; j < a.length; ++j) ret.push(a[j]); + } + return ret; + } + return [ucharLoc]; + }; + if (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) return null; + this.resBuf = recursiveDecomp(this.canonical, uchar); + } + return this.resBuf.shift(); +}; + +DecompIterator = function (it) { + this.it = it; + this.resBuf = []; +}; + +DecompIterator.prototype.next = function () { + var cc, uchar, inspt, uchar2, cc2; + if (this.resBuf.length === 0) { + do { + uchar = this.it.next(); + if (!uchar) break; + cc = uchar.getCanonicalClass(); + inspt = this.resBuf.length; + if (cc !== 0) { + for (inspt; inspt > 0; --inspt) { + uchar2 = this.resBuf[inspt - 1]; + cc2 = uchar2.getCanonicalClass(); + // eslint-disable-next-line max-depth + if (cc2 <= cc) break; + } + } + this.resBuf.splice(inspt, 0, uchar); + } while (cc !== 0); + } + return this.resBuf.shift(); +}; + +CompIterator = function (it) { + this.it = it; + this.procBuf = []; + this.resBuf = []; + this.lastClass = null; +}; + +CompIterator.prototype.next = function () { + var uchar, starter, composite, cc; + while (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) { + this.resBuf = this.procBuf; + this.procBuf = []; + break; + } + if (this.procBuf.length === 0) { + this.lastClass = uchar.getCanonicalClass(); + this.procBuf.push(uchar); + } else { + starter = this.procBuf[0]; + composite = starter.getComposite(uchar); + cc = uchar.getCanonicalClass(); + if (Boolean(composite) && (this.lastClass < cc || this.lastClass === 0)) { + this.procBuf[0] = composite; + } else { + if (cc === 0) { + this.resBuf = this.procBuf; + this.procBuf = []; + } + this.lastClass = cc; + this.procBuf.push(uchar); + } + } + } + return this.resBuf.shift(); +}; + +createIterator = function (mode, str) { + switch (mode) { + case "NFD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)); + case "NFKD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)); + case "NFC": + return new CompIterator( + new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)) + ); + case "NFKC": + return new CompIterator( + new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)) + ); + default: + throw new Error(mode + " is invalid"); + } +}; +normalize = function (mode, str) { + var it = createIterator(mode, str), ret = "", uchar; + while ((uchar = it.next())) ret += uchar.toString(); + return ret; +}; + +/* Unicode data */ +UChar.udata = data; + +module.exports = function (/* Form*/) { + var str = String(validValue(this)), form = arguments[0]; + if (form === undefined) form = "NFC"; + else form = String(form); + if (!forms[form]) throw new RangeError("Invalid normalization form: " + form); + return normalize(form, str); +}; diff --git a/node_modules/es5-ext/string/#/pad.js b/node_modules/es5-ext/string/#/pad.js new file mode 100644 index 0000000..159f895 --- /dev/null +++ b/node_modules/es5-ext/string/#/pad.js @@ -0,0 +1,18 @@ +"use strict"; + +var toInteger = require("../../number/to-integer") + , value = require("../../object/valid-value") + , repeat = require("./repeat") + + , abs = Math.abs, max = Math.max; + +module.exports = function (fill/*, length*/) { + var self = String(value(this)) + , sLength = self.length + , length = arguments[1]; + + length = isNaN(length) ? 1 : toInteger(length); + fill = repeat.call(String(fill), abs(length)); + if (length >= 0) return fill.slice(0, max(0, length - sLength)) + self; + return self + ((sLength + length) >= 0 ? "" : fill.slice(length + sLength)); +}; diff --git a/node_modules/es5-ext/string/#/plain-replace-all.js b/node_modules/es5-ext/string/#/plain-replace-all.js new file mode 100644 index 0000000..9334fe0 --- /dev/null +++ b/node_modules/es5-ext/string/#/plain-replace-all.js @@ -0,0 +1,16 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function (search, replace) { + var index, pos = 0, str = String(value(this)), sl, rl; + search = String(search); + replace = String(replace); + sl = search.length; + rl = replace.length; + while ((index = str.indexOf(search, pos)) !== -1) { + str = str.slice(0, index) + replace + str.slice(index + sl); + pos = index + rl; + } + return str; +}; diff --git a/node_modules/es5-ext/string/#/plain-replace.js b/node_modules/es5-ext/string/#/plain-replace.js new file mode 100644 index 0000000..f24f521 --- /dev/null +++ b/node_modules/es5-ext/string/#/plain-replace.js @@ -0,0 +1,10 @@ +"use strict"; + +var indexOf = String.prototype.indexOf, slice = String.prototype.slice; + +module.exports = function (search, replace) { + var index = indexOf.call(this, search); + if (index === -1) return String(this); + return slice.call(this, 0, index) + replace + + slice.call(this, index + String(search).length); +}; diff --git a/node_modules/es5-ext/string/#/repeat/implement.js b/node_modules/es5-ext/string/#/repeat/implement.js new file mode 100644 index 0000000..7066b7b --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "repeat", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/repeat/index.js b/node_modules/es5-ext/string/#/repeat/index.js new file mode 100644 index 0000000..99d44b2 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.repeat + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/repeat/is-implemented.js b/node_modules/es5-ext/string/#/repeat/is-implemented.js new file mode 100644 index 0000000..e8e0240 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "foo"; + +module.exports = function () { + if (typeof str.repeat !== "function") return false; + return str.repeat(2) === "foofoo"; +}; diff --git a/node_modules/es5-ext/string/#/repeat/shim.js b/node_modules/es5-ext/string/#/repeat/shim.js new file mode 100644 index 0000000..ac259a8 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/shim.js @@ -0,0 +1,24 @@ +// Thanks +// @rauchma http://www.2ality.com/2014/01/efficient-string-repeat.html +// @mathiasbynens https://github.com/mathiasbynens/String.prototype.repeat/blob/4a4b567def/repeat.js + +"use strict"; + +var value = require("../../../object/valid-value") + , toInteger = require("../../../number/to-integer"); + +module.exports = function (count) { + var str = String(value(this)), result; + count = toInteger(count); + if (count < 0) throw new RangeError("Count must be >= 0"); + if (!isFinite(count)) throw new RangeError("Count must be < ∞"); + + result = ""; + while (count) { + if (count % 2) result += str; + if (count > 1) str += str; + // eslint-disable-next-line no-bitwise + count >>= 1; + } + return result; +}; diff --git a/node_modules/es5-ext/string/#/starts-with/implement.js b/node_modules/es5-ext/string/#/starts-with/implement.js new file mode 100644 index 0000000..11613da --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "startsWith", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/starts-with/index.js b/node_modules/es5-ext/string/#/starts-with/index.js new file mode 100644 index 0000000..9a6c374 --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.startsWith + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/starts-with/is-implemented.js b/node_modules/es5-ext/string/#/starts-with/is-implemented.js new file mode 100644 index 0000000..f6b6e29 --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.startsWith !== "function") return false; + return (str.startsWith("trzy") === false) && + (str.startsWith("raz") === true); +}; diff --git a/node_modules/es5-ext/string/#/starts-with/shim.js b/node_modules/es5-ext/string/#/starts-with/shim.js new file mode 100644 index 0000000..d455477 --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var value = require("../../../object/valid-value") + , toInteger = require("../../../number/to-integer") + + , max = Math.max, min = Math.min; + +module.exports = function (searchString/*, position*/) { + var start, self = String(value(this)); + start = min(max(toInteger(arguments[1]), 0), self.length); + return self.indexOf(searchString, start) === start; +}; diff --git a/node_modules/es5-ext/string/#/uncapitalize.js b/node_modules/es5-ext/string/#/uncapitalize.js new file mode 100644 index 0000000..202dbb7 --- /dev/null +++ b/node_modules/es5-ext/string/#/uncapitalize.js @@ -0,0 +1,8 @@ +"use strict"; + +var ensureStringifiable = require("../../object/validate-stringifiable-value"); + +module.exports = function () { + var str = ensureStringifiable(this); + return str.charAt(0).toLowerCase() + str.slice(1); +}; diff --git a/node_modules/es5-ext/string/format-method.js b/node_modules/es5-ext/string/format-method.js new file mode 100644 index 0000000..28956fe --- /dev/null +++ b/node_modules/es5-ext/string/format-method.js @@ -0,0 +1,27 @@ +"use strict"; + +var isCallable = require("../object/is-callable") + , value = require("../object/valid-value") + , call = Function.prototype.call; + +module.exports = function (fmap) { + fmap = Object(value(fmap)); + return function (pattern) { + var context = this; + value(context); + pattern = String(pattern); + return pattern.replace(/%([a-zA-Z]+)|\\([\u0000-\uffff])/g, function ( + match, + token, + escapeChar + ) { + var t, result; + if (escapeChar) return escapeChar; + t = token; + while (t && !(result = fmap[t])) t = t.slice(0, -1); + if (!result) return match; + if (isCallable(result)) result = call.call(result, context); + return result + token.slice(t.length); + }); + }; +}; diff --git a/node_modules/es5-ext/string/from-code-point/implement.js b/node_modules/es5-ext/string/from-code-point/implement.js new file mode 100644 index 0000000..4f815d6 --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String, "fromCodePoint", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/string/from-code-point/index.js b/node_modules/es5-ext/string/from-code-point/index.js new file mode 100644 index 0000000..d5a8112 --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.fromCodePoint + : require("./shim"); diff --git a/node_modules/es5-ext/string/from-code-point/is-implemented.js b/node_modules/es5-ext/string/from-code-point/is-implemented.js new file mode 100644 index 0000000..e6ccfa7 --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var fromCodePoint = String.fromCodePoint; + if (typeof fromCodePoint !== "function") return false; + return fromCodePoint(0x1D306, 0x61, 0x1D307) === "\ud834\udf06a\ud834\udf07"; +}; diff --git a/node_modules/es5-ext/string/from-code-point/shim.js b/node_modules/es5-ext/string/from-code-point/shim.js new file mode 100644 index 0000000..55824f5 --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/shim.js @@ -0,0 +1,37 @@ +// Based on: +// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/ +// and: +// https://github.com/mathiasbynens/String.fromCodePoint/blob/master +// /fromcodepoint.js + +"use strict"; + +var floor = Math.floor, fromCharCode = String.fromCharCode; + +// eslint-disable-next-line no-unused-vars +module.exports = function (codePoint1 /*, …codePoints*/) { + var chars = [], length = arguments.length, i, codePoint, result = ""; + for (i = 0; i < length; ++i) { + codePoint = Number(arguments[i]); + if ( + !isFinite(codePoint) || + codePoint < 0 || + codePoint > 0x10ffff || + floor(codePoint) !== codePoint + ) { + throw new RangeError("Invalid code point " + codePoint); + } + + if (codePoint < 0x10000) { + chars.push(codePoint); + } else { + codePoint -= 0x10000; + // eslint-disable-next-line no-bitwise + chars.push((codePoint >> 10) + 0xd800, codePoint % 0x400 + 0xdc00); + } + if (i + 1 !== length && chars.length <= 0x4000) continue; + result += fromCharCode.apply(null, chars); + chars.length = 0; + } + return result; +}; diff --git a/node_modules/es5-ext/string/index.js b/node_modules/es5-ext/string/index.js new file mode 100644 index 0000000..4393588 --- /dev/null +++ b/node_modules/es5-ext/string/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "formatMethod": require("./format-method"), + "fromCodePoint": require("./from-code-point"), + "isString": require("./is-string"), + "random": require("./random"), + "randomUniq": require("./random-uniq"), + "raw": require("./raw") +}; diff --git a/node_modules/es5-ext/string/is-string.js b/node_modules/es5-ext/string/is-string.js new file mode 100644 index 0000000..1b1e863 --- /dev/null +++ b/node_modules/es5-ext/string/is-string.js @@ -0,0 +1,13 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(""); + +module.exports = function (value) { + return ( + typeof value === "string" || + (value && + typeof value === "object" && + (value instanceof String || objToString.call(value) === id)) || + false + ); +}; diff --git a/node_modules/es5-ext/string/random-uniq.js b/node_modules/es5-ext/string/random-uniq.js new file mode 100644 index 0000000..ea10a81 --- /dev/null +++ b/node_modules/es5-ext/string/random-uniq.js @@ -0,0 +1,13 @@ +"use strict"; + +var generated = Object.create(null), random = Math.random; + +module.exports = function () { + var str; + do { + str = random() + .toString(36) + .slice(2); + } while (generated[str]); + return str; +}; diff --git a/node_modules/es5-ext/string/random.js b/node_modules/es5-ext/string/random.js new file mode 100644 index 0000000..4ecec7f --- /dev/null +++ b/node_modules/es5-ext/string/random.js @@ -0,0 +1,42 @@ +"use strict"; + +var isValue = require("../object/is-value") + , toNaturalNumber = require("../number/to-pos-integer"); + +var generated = Object.create(null), random = Math.random, uniqTryLimit = 100; + +var getChunk = function () { + return random() + .toString(36) + .slice(2); +}; + +var getString = function (/* length */) { + var str = getChunk(), length = arguments[0]; + if (!isValue(length)) return str; + while (str.length < length) str += getChunk(); + return str.slice(0, length); +}; + +module.exports = function (/* options */) { + var options = Object(arguments[0]), length = options.length, isUnique = options.isUnique; + + if (isValue(length)) length = toNaturalNumber(length); + + var str = getString(length); + if (isUnique) { + var count = 0; + while (generated[str]) { + if (++count === uniqTryLimit) { + throw new Error( + "Cannot generate random string.\n" + + "String.random is not designed to effectively generate many short and " + + "unique random strings" + ); + } + str = getString(length); + } + generated[str] = true; + } + return str; +}; diff --git a/node_modules/es5-ext/string/raw/implement.js b/node_modules/es5-ext/string/raw/implement.js new file mode 100644 index 0000000..0f17df3 --- /dev/null +++ b/node_modules/es5-ext/string/raw/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String, "raw", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/string/raw/index.js b/node_modules/es5-ext/string/raw/index.js new file mode 100644 index 0000000..e818dd5 --- /dev/null +++ b/node_modules/es5-ext/string/raw/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.raw + : require("./shim"); diff --git a/node_modules/es5-ext/string/raw/is-implemented.js b/node_modules/es5-ext/string/raw/is-implemented.js new file mode 100644 index 0000000..8758108 --- /dev/null +++ b/node_modules/es5-ext/string/raw/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var raw = String.raw, test; + if (typeof raw !== "function") return false; + test = ["foo\nbar", "marko\n"]; + test.raw = ["foo\\nbar", "marko\\n"]; + return raw(test, "INSE\nRT") === "foo\\nbarINSE\nRTmarko\\n"; +}; diff --git a/node_modules/es5-ext/string/raw/shim.js b/node_modules/es5-ext/string/raw/shim.js new file mode 100644 index 0000000..8c52bb5 --- /dev/null +++ b/node_modules/es5-ext/string/raw/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , validValue = require("../../object/valid-value") + , reduce = Array.prototype.reduce; + +module.exports = function (callSite /*, …substitutions*/) { + var args, rawValue = Object(validValue(Object(validValue(callSite)).raw)); + if (!toPosInt(rawValue.length)) return ""; + args = arguments; + return reduce.call(rawValue, function (str1, str2, i) { + return str1 + String(args[i]) + str2; + }); +}; diff --git a/node_modules/es5-ext/test/.eslintrc.json b/node_modules/es5-ext/test/.eslintrc.json new file mode 100644 index 0000000..3ac4585 --- /dev/null +++ b/node_modules/es5-ext/test/.eslintrc.json @@ -0,0 +1,14 @@ +{ + "globals": { + "Symbol": true + }, + "rules": { + "consistent-this": "off", + "id-length": "off", + "no-empty-function": "off", + "no-eval": "off", + "no-new-wrappers": "off", + "no-prototype-builtins": "off", + "no-shadow": "off" + } +} diff --git a/node_modules/es5-ext/test/__tad.js b/node_modules/es5-ext/test/__tad.js new file mode 100644 index 0000000..883c379 --- /dev/null +++ b/node_modules/es5-ext/test/__tad.js @@ -0,0 +1,3 @@ +"use strict"; + +exports.context = null; diff --git a/node_modules/es5-ext/test/array/#/@@iterator/implement.js b/node_modules/es5-ext/test/array/#/@@iterator/implement.js new file mode 100644 index 0000000..1a20aa8 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/@@iterator/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/@@iterator/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/@@iterator/index.js b/node_modules/es5-ext/test/array/#/@@iterator/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/@@iterator/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js b/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/@@iterator/shim.js b/node_modules/es5-ext/test/array/#/@@iterator/shim.js new file mode 100644 index 0000000..71b71d5 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/@@iterator/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: "1", done: false }); + a.deep(iterator.next(), { value: "2", done: false }); + a.deep(iterator.next(), { value: "3", done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/node_modules/es5-ext/test/array/#/_compare-by-length.js b/node_modules/es5-ext/test/array/#/_compare-by-length.js new file mode 100644 index 0000000..a53d847 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/_compare-by-length.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + var arr = [4, 5, 6], obj1 = { length: 8 }, obj2 = {}, obj3 = { length: 1 }; + + a.deep([arr, obj1, obj2, obj3].sort(t), [obj2, obj3, arr, obj1]); +}; diff --git a/node_modules/es5-ext/test/array/#/binary-search.js b/node_modules/es5-ext/test/array/#/binary-search.js new file mode 100644 index 0000000..04dfaef --- /dev/null +++ b/node_modules/es5-ext/test/array/#/binary-search.js @@ -0,0 +1,17 @@ +"use strict"; + +var compare = function (value) { + return this - value; +}; + +module.exports = function (t, a) { + var arr; + arr = [2, 5, 5, 8, 34, 67, 98, 345, 678]; + + // Highest, equal match + a(t.call(arr, compare.bind(1)), 0, "All higher"); + a(t.call(arr, compare.bind(679)), arr.length - 1, "All lower"); + a(t.call(arr, compare.bind(4)), 0, "Mid"); + a(t.call(arr, compare.bind(5)), 2, "Match"); + a(t.call(arr, compare.bind(6)), 2, "Above"); +}; diff --git a/node_modules/es5-ext/test/array/#/clear.js b/node_modules/es5-ext/test/array/#/clear.js new file mode 100644 index 0000000..640cc19 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/clear.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + var arr = [1, 2, {}, 4]; + a(t.call(arr), arr, "Returns same array"); + a.deep(arr, [], "Empties array"); +}; diff --git a/node_modules/es5-ext/test/array/#/compact.js b/node_modules/es5-ext/test/array/#/compact.js new file mode 100644 index 0000000..0516084 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/compact.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a(t.call(this).length, 3); + }, + "": function (t, a) { + var o, x, y, z; + o = {}; + x = [0, 1, "", null, o, false, undefined, true]; + y = x.slice(0); + + a.not(z = t.call(x), x, "Returns different object"); + a.deep(x, y, "Origin not changed"); + a.deep(z, [0, 1, "", o, false, true], "Result"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/concat/implement.js b/node_modules/es5-ext/test/array/#/concat/implement.js new file mode 100644 index 0000000..c4dc41f --- /dev/null +++ b/node_modules/es5-ext/test/array/#/concat/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/concat/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/concat/index.js b/node_modules/es5-ext/test/array/#/concat/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/concat/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/concat/is-implemented.js b/node_modules/es5-ext/test/array/#/concat/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/concat/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/concat/shim.js b/node_modules/es5-ext/test/array/#/concat/shim.js new file mode 100644 index 0000000..30a9b0c --- /dev/null +++ b/node_modules/es5-ext/test/array/#/concat/shim.js @@ -0,0 +1,26 @@ +"use strict"; + +var isConcatSpreadable = require("es6-symbol").isConcatSpreadable + , SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr = [1, 3, 45], x = {}, subArr, subArr2, result; + + a.deep(t.call(arr, "2d", x, ["ere", "fe", x], false, null), + [1, 3, 45, "2d", x, "ere", "fe", x, false, null], "Plain array"); + + subArr = new SubArray("lol", "miszko"); + subArr2 = new SubArray("elo", "fol"); + + result = t.call(subArr, "df", arr, "fef", subArr2, null); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, ["lol", "miszko", "df", 1, 3, 45, "fef", "elo", "fol", null], + "Spreable by default"); + + SubArray.prototype[isConcatSpreadable] = false; + + result = t.call(subArr, "df", arr, "fef", subArr2, null); + a.deep(result, [subArr, "df", 1, 3, 45, "fef", subArr2, null], "Non spreadable"); + + delete SubArray.prototype[isConcatSpreadable]; +}; diff --git a/node_modules/es5-ext/test/array/#/contains.js b/node_modules/es5-ext/test/array/#/contains.js new file mode 100644 index 0000000..fb0f96c --- /dev/null +++ b/node_modules/es5-ext/test/array/#/contains.js @@ -0,0 +1,21 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a(t.call(this, this[1]), true, "Contains"); + a(t.call(this, {}), false, "Does Not contain"); + }, + "": function (t, a) { + var o, x = {}, y = {}; + + o = [1, "raz", x]; + + a(t.call(o, 1), true, "First"); + a(t.call(o, "1"), false, "Type coercion"); + a(t.call(o, "raz"), true, "Primitive"); + a(t.call(o, "foo"), false, "Primitive not found"); + a(t.call(o, x), true, "Object found"); + a(t.call(o, y), false, "Object not found"); + a(t.call(o, 1, 1), false, "Position"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/copy-within/implement.js b/node_modules/es5-ext/test/array/#/copy-within/implement.js new file mode 100644 index 0000000..87272ac --- /dev/null +++ b/node_modules/es5-ext/test/array/#/copy-within/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/copy-within/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/copy-within/index.js b/node_modules/es5-ext/test/array/#/copy-within/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/copy-within/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js b/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/copy-within/shim.js b/node_modules/es5-ext/test/array/#/copy-within/shim.js new file mode 100644 index 0000000..03a631f --- /dev/null +++ b/node_modules/es5-ext/test/array/#/copy-within/shim.js @@ -0,0 +1,29 @@ +"use strict"; + +module.exports = function (t, a) { + var args, x; + + a.h1("2 args"); + x = [1, 2, 3, 4, 5]; + t.call(x, 0, 3); + a.deep(x, [4, 5, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 3), [1, 4, 5, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 2), [1, 3, 4, 5, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 2, 2), [1, 2, 3, 4, 5]); + + a.h1("3 args"); + a.deep(t.call([1, 2, 3, 4, 5], 0, 3, 4), [4, 2, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 3, 4), [1, 4, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 2, 4), [1, 3, 4, 4, 5]); + + a.h1("Negative args"); + a.deep(t.call([1, 2, 3, 4, 5], 0, -2), [4, 5, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 0, -2, -1), [4, 2, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -2), [1, 3, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -1), [1, 3, 4, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3), [1, 3, 4, 5, 5]); + + a.h1("Array-likes"); + args = { 0: 1, 1: 2, 2: 3, length: 3 }; + a.deep(t.call(args, -2, 0), { 0: 1, 1: 1, 2: 2, length: 3 }); +}; diff --git a/node_modules/es5-ext/test/array/#/diff.js b/node_modules/es5-ext/test/array/#/diff.js new file mode 100644 index 0000000..397c5dd --- /dev/null +++ b/node_modules/es5-ext/test/array/#/diff.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a.deep(t.call(this, this), []); + }, + "": function (t, a) { + var x = {}, y = {}; + + a.deep(t.call([1, "raz", x, 2, "trzy", y], [x, 2, "trzy"]), [1, "raz", y], + "Scope longer"); + a.deep(t.call([1, "raz", x], [x, 2, "trzy", 1, y]), ["raz"], + "Arg longer"); + a.deep(t.call([1, "raz", x], []), [1, "raz", x], "Empty arg"); + a.deep(t.call([], [1, y, "sdfs"]), [], "Empty scope"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/e-index-of.js b/node_modules/es5-ext/test/array/#/e-index-of.js new file mode 100644 index 0000000..1e42cbd --- /dev/null +++ b/node_modules/es5-ext/test/array/#/e-index-of.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([3, "raz", {}, x, {}], x), 3, "Regular"); + a(t.call([3, "raz", NaN, {}, NaN], NaN), 2, "NaN"); + a(t.call([3, "raz", 0, {}, -0], -0), 2, "-0"); + a(t.call([3, "raz", -0, {}, 0], +0), 2, "+0"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, 3), 4, "fromIndex"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, -1), 4, "fromIndex negative #1"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, -2), 4, "fromIndex negative #2"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, -3), 2, "fromIndex negative #3"); +}; diff --git a/node_modules/es5-ext/test/array/#/e-last-index-of.js b/node_modules/es5-ext/test/array/#/e-last-index-of.js new file mode 100644 index 0000000..2c7fff9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/e-last-index-of.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([3, "raz", {}, x, {}, x], x), 5, "Regular"); + a(t.call([3, "raz", NaN, {}, x], NaN), 2, "NaN"); + a(t.call([3, "raz", 0, {}, -0], -0), 4, "-0"); + a(t.call([3, "raz", -0, {}, 0], +0), 4, "+0"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, 3), 2, "fromIndex"); + a(t.call([3, "raz", NaN, 2, NaN], NaN, -1), 4, "Negative fromIndex #1"); + a(t.call([3, "raz", NaN, 2, NaN], NaN, -2), 2, "Negative fromIndex #2"); +}; diff --git a/node_modules/es5-ext/test/array/#/entries/implement.js b/node_modules/es5-ext/test/array/#/entries/implement.js new file mode 100644 index 0000000..fa16930 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/entries/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/entries/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/entries/index.js b/node_modules/es5-ext/test/array/#/entries/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/entries/is-implemented.js b/node_modules/es5-ext/test/array/#/entries/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/entries/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/entries/shim.js b/node_modules/es5-ext/test/array/#/entries/shim.js new file mode 100644 index 0000000..87ac25a --- /dev/null +++ b/node_modules/es5-ext/test/array/#/entries/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: [0, "1"], done: false }); + a.deep(iterator.next(), { value: [1, "2"], done: false }); + a.deep(iterator.next(), { value: [2, "3"], done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/node_modules/es5-ext/test/array/#/exclusion.js b/node_modules/es5-ext/test/array/#/exclusion.js new file mode 100644 index 0000000..827c037 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/exclusion.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + var x = {}; + a.deep(t.call(this, this, [this[0], this[2], x]), [x]); + }, + "": function (t, a) { + var x = {}, y = {}; + + a.deep(t.call([x, y]), [x, y], "No arguments"); + a.deep(t.call([x, 1], [], []), [x, 1], "Empty arguments"); + a.deep(t.call([1, "raz", x], [2, "raz", y], [2, "raz", x]), [1, y]); + } +}; diff --git a/node_modules/es5-ext/test/array/#/fill/implement.js b/node_modules/es5-ext/test/array/#/fill/implement.js new file mode 100644 index 0000000..fe806a6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/fill/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/fill/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/fill/index.js b/node_modules/es5-ext/test/array/#/fill/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/fill/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/fill/is-implemented.js b/node_modules/es5-ext/test/array/#/fill/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/fill/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/fill/shim.js b/node_modules/es5-ext/test/array/#/fill/shim.js new file mode 100644 index 0000000..c752e10 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/fill/shim.js @@ -0,0 +1,18 @@ +// Taken from https://github.com/paulmillr/es6-shim/blob/master/test/array.js + +"use strict"; + +module.exports = function (t, a) { + var x; + + x = [1, 2, 3, 4, 5, 6]; + a(t.call(x, -1), x, "Returns self object"); + a.deep(x, [-1, -1, -1, -1, -1, -1], "Value"); + + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 3), [1, 2, 3, -1, -1, -1], + "Positive start"); + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, -3), [1, 2, 3, -1, -1, -1], + "Negative start"); + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 9), [1, 2, 3, 4, 5, 6], + "Large start"); +}; diff --git a/node_modules/es5-ext/test/array/#/filter/implement.js b/node_modules/es5-ext/test/array/#/filter/implement.js new file mode 100644 index 0000000..cac92c8 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/filter/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/filter/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/filter/index.js b/node_modules/es5-ext/test/array/#/filter/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/filter/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/filter/is-implemented.js b/node_modules/es5-ext/test/array/#/filter/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/filter/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/filter/shim.js b/node_modules/es5-ext/test/array/#/filter/shim.js new file mode 100644 index 0000000..e20a651 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/filter/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ["foo", undefined, 0, "2d", false, x, null]; + + a.deep(t.call(arr, Boolean), ["foo", "2d", x], "Plain array"); + + subArr = new SubArray("foo", undefined, 0, "2d", false, x, null); + + result = t.call(subArr, Boolean); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, ["foo", "2d", x], "Result of subclass"); +}; diff --git a/node_modules/es5-ext/test/array/#/find-index/implement.js b/node_modules/es5-ext/test/array/#/find-index/implement.js new file mode 100644 index 0000000..341bede --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find-index/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/find-index/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/find-index/index.js b/node_modules/es5-ext/test/array/#/find-index/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find-index/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/find-index/is-implemented.js b/node_modules/es5-ext/test/array/#/find-index/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find-index/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/find-index/shim.js b/node_modules/es5-ext/test/array/#/find-index/shim.js new file mode 100644 index 0000000..0a6fe11 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find-index/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +exports.__generic = function (t, a) { + var count = 0, o = {}, self = Object(this); + a(t.call(self, function (value, i, scope) { + a(value, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + }, self), -1, "Falsy result"); + a(count, 3); + + count = -1; + a(t.call(this, function () { + return ++count ? o : null; + }, this), 1, "Truthy result"); + a(count, 1); +}; diff --git a/node_modules/es5-ext/test/array/#/find/implement.js b/node_modules/es5-ext/test/array/#/find/implement.js new file mode 100644 index 0000000..9333b25 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/find/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/find/index.js b/node_modules/es5-ext/test/array/#/find/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/find/is-implemented.js b/node_modules/es5-ext/test/array/#/find/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/find/shim.js b/node_modules/es5-ext/test/array/#/find/shim.js new file mode 100644 index 0000000..b8fd9f0 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +exports.__generic = function (t, a) { + var count = 0, o = {}, self = Object(this); + a(t.call(self, function (value, i, scope) { + a(value, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + }, self), undefined, "Falsy result"); + a(count, 3); + + count = -1; + a(t.call(this, function () { + return ++count ? o : null; + }, this), this[1], "Truthy result"); + a(count, 1); +}; diff --git a/node_modules/es5-ext/test/array/#/first-index.js b/node_modules/es5-ext/test/array/#/first-index.js new file mode 100644 index 0000000..af3388b --- /dev/null +++ b/node_modules/es5-ext/test/array/#/first-index.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a(t.call([]), null, "Empty"); + a(t.call([null]), 0, "One value"); + a(t.call([1, 2, 3]), 0, "Many values"); + a(t.call(new Array(1000)), null, "Sparse empty"); + x = []; + x[883] = undefined; + x[890] = null; + a(t.call(x), 883, "Manual sparse, distant value"); + x = new Array(1000); + x[657] = undefined; + x[700] = null; + a(t.call(x), 657, "Sparse, distant value"); +}; diff --git a/node_modules/es5-ext/test/array/#/first.js b/node_modules/es5-ext/test/array/#/first.js new file mode 100644 index 0000000..5e9c1ae --- /dev/null +++ b/node_modules/es5-ext/test/array/#/first.js @@ -0,0 +1,13 @@ +"use strict"; + +exports.__generic = function (t, a) { + a(t.call(this), this[0]); +}; +exports[""] = function (t, a) { + var x; + a(t.call([]), undefined, "Empty"); + a(t.call(new Array(234), undefined, "Sparse empty")); + x = new Array(2342); + x[434] = {}; + a(t.call(x), x[434], "Sparse"); +}; diff --git a/node_modules/es5-ext/test/array/#/flatten.js b/node_modules/es5-ext/test/array/#/flatten.js new file mode 100644 index 0000000..c1234c3 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/flatten.js @@ -0,0 +1,14 @@ +"use strict"; + +var o = [1, 2, [3, 4, [5, 6], 7, 8], 9, 10, [11, 12, [13, 14]], 15]; + +module.exports = { + "__generic": function (t, a) { + a(t.call(this).length, 3); + }, + "Nested Arrays": function (t, a) { + var result = t.call(o); + a.not(o, result); + a.deep(result, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); + } +}; diff --git a/node_modules/es5-ext/test/array/#/for-each-right.js b/node_modules/es5-ext/test/array/#/for-each-right.js new file mode 100644 index 0000000..109101f --- /dev/null +++ b/node_modules/es5-ext/test/array/#/for-each-right.js @@ -0,0 +1,47 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + var count = 0, first, last, x, icount = this.length; + t.call(this, function (item, index, col) { + ++count; + if (!first) { + first = item; + } + last = item; + x = col; + a(index, --icount, "Index"); + }); + a(count, this.length, "Iterated"); + a(first, this[this.length - 1], "First is last"); + a(last, this[0], "Last is first"); + a.deep(x, Object(this), "Collection as third argument"); // Jslint: skip + }, + "": function (t, a) { + var x = {}, y, count; + t.call( + [1], + function () { + y = this; + }, + x + ); + a(y, x, "Scope"); + y = 0; + t.call([3, 4, 4], function (a, i) { + y += i; + }); + a(y, 3, "Indexes"); + + x = [1, 3]; + x[5] = "x"; + y = 0; + count = 0; + t.call(x, function (a, i) { + ++count; + y += i; + }); + a(y, 6, "Misssing Indexes"); + a(count, 3, "Misssing Indexes, count"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/group.js b/node_modules/es5-ext/test/array/#/group.js new file mode 100644 index 0000000..12667de --- /dev/null +++ b/node_modules/es5-ext/test/array/#/group.js @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + var count = 0, self; + + self = Object(this); + a.deep(t.call(self, function (v, i, scope) { + a(v, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + return i; + }, self), { 0: [this[0]], 1: [this[1]], 2: [this[2]] }); + }, + "": function (t, a) { + var r; + r = t.call([2, 3, 3, 4, 5, 6, 7, 7, 23, 45, 34, 56], + function (v) { + return v % 2 ? "odd" : "even"; + }); + a.deep(r.odd, [3, 3, 5, 7, 7, 23, 45]); + a.deep(r.even, [2, 4, 6, 34, 56]); + } +}; diff --git a/node_modules/es5-ext/test/array/#/indexes-of.js b/node_modules/es5-ext/test/array/#/indexes-of.js new file mode 100644 index 0000000..1463417 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/indexes-of.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a.deep(t.call(this, this[1]), [1]); + }, + "": function (t, a) { + var x = {}; + a.deep(t.call([1, 3, 5, 3, 5], 6), [], "No result"); + a.deep(t.call([1, 3, 5, 1, 3, 5, 1], 1), [0, 3, 6], "Some results"); + a.deep(t.call([], x), [], "Empty array"); + a.deep(t.call([x, 3, {}, x, 3, 5, x], x), [0, 3, 6], "Search for object"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/intersection.js b/node_modules/es5-ext/test/array/#/intersection.js new file mode 100644 index 0000000..bb1097d --- /dev/null +++ b/node_modules/es5-ext/test/array/#/intersection.js @@ -0,0 +1,24 @@ +"use strict"; + +var toArray = require("../../../array/to-array"); + +module.exports = { + "__generic": function (t, a) { + a.deep(t.call(this, this, this), toArray(this)); + }, + "": function (t, a) { + var x = {}, y = {}, p, r; + a.deep(t.call([], [2, 3, 4]), [], "Empty #1"); + a.deep(t.call([2, 3, 4], []), [], "Empty #2"); + a.deep(t.call([2, 3, x], [y, 5, 7]), [], "Different"); + p = t.call([3, 5, "raz", {}, "dwa", x], [1, 3, "raz", "dwa", "trzy", x, {}], + [3, "raz", x, 65]); + r = [3, "raz", x]; + p.sort(); + r.sort(); + a.deep(p, r, "Same parts"); + a.deep(t.call(r, r), r, "Same"); + a.deep(t.call([1, 2, x, 4, 5, y, 7], [7, y, 5, 4, x, 2, 1]), + [1, 2, x, 4, 5, y, 7], "Long reverse same"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/is-copy.js b/node_modules/es5-ext/test/array/#/is-copy.js new file mode 100644 index 0000000..b090c2a --- /dev/null +++ b/node_modules/es5-ext/test/array/#/is-copy.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([], []), true, "Empty"); + a(t.call([], {}), true, "Empty lists"); + a(t.call([1, x, "raz"], [1, x, "raz"]), true, "Same"); + a(t.call([1, x, "raz"], { 0: 1, 1: x, 2: "raz", length: 3 }), true, + "Same lists"); + a(t.call([1, x, "raz"], [x, 1, "raz"]), false, "Diff order"); + a(t.call([1, x], [1, x, "raz"]), false, "Diff length #1"); + a(t.call([1, x, "raz"], [1, x]), false, "Diff length #2"); +}; diff --git a/node_modules/es5-ext/test/array/#/is-empty.js b/node_modules/es5-ext/test/array/#/is-empty.js new file mode 100644 index 0000000..1e1c097 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/is-empty.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([]), true, "Empty"); + a(t.call({ length: 0 }), true, "Empty lists"); + a(t.call([1, x, "raz"]), false, "Non empty"); +}; diff --git a/node_modules/es5-ext/test/array/#/is-uniq.js b/node_modules/es5-ext/test/array/#/is-uniq.js new file mode 100644 index 0000000..ab531ac --- /dev/null +++ b/node_modules/es5-ext/test/array/#/is-uniq.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([]), true, "Empty"); + a(t.call({}), true, "Empty lists"); + a(t.call([1, x, "raz"]), true, "Uniq"); + a(t.call([1, x, 1, "raz"]), false, "Not Uniq: primitive"); + a(t.call([1, x, "1", "raz"]), true, "Uniq: primitive"); + a(t.call([1, x, 1, {}, "raz"]), false, "Not Uniq: Obj"); +}; diff --git a/node_modules/es5-ext/test/array/#/keys/implement.js b/node_modules/es5-ext/test/array/#/keys/implement.js new file mode 100644 index 0000000..cc1f931 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/keys/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/keys/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/keys/index.js b/node_modules/es5-ext/test/array/#/keys/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/keys/is-implemented.js b/node_modules/es5-ext/test/array/#/keys/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/keys/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/keys/shim.js b/node_modules/es5-ext/test/array/#/keys/shim.js new file mode 100644 index 0000000..9be9a8f --- /dev/null +++ b/node_modules/es5-ext/test/array/#/keys/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: 0, done: false }); + a.deep(iterator.next(), { value: 1, done: false }); + a.deep(iterator.next(), { value: 2, done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/node_modules/es5-ext/test/array/#/last-index.js b/node_modules/es5-ext/test/array/#/last-index.js new file mode 100644 index 0000000..e66d16f --- /dev/null +++ b/node_modules/es5-ext/test/array/#/last-index.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a(t.call([]), null, "Empty"); + a(t.call([null]), 0, "One value"); + a(t.call([1, 2, 3]), 2, "Many values"); + a(t.call(new Array(1000)), null, "Sparse empty"); + x = []; + x[883] = null; + x[890] = undefined; + a(t.call(x), 890, "Manual sparse, distant value"); + x = new Array(1000); + x[657] = null; + x[700] = undefined; + a(t.call(x), 700, "Sparse, distant value"); +}; diff --git a/node_modules/es5-ext/test/array/#/last.js b/node_modules/es5-ext/test/array/#/last.js new file mode 100644 index 0000000..6ca5d05 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/last.js @@ -0,0 +1,15 @@ +"use strict"; + +exports.__generic = function (t, a) { + a(t.call(this), this[this.length - 1]); +}; + +exports[""] = function (t, a) { + var x; + a(t.call([]), undefined, "Empty"); + a(t.call(new Array(234), undefined, "Sparse empty")); + x = new Array(2342); + x[434] = {}; + x[450] = {}; + a(t.call(x), x[450], "Sparse"); +}; diff --git a/node_modules/es5-ext/test/array/#/map/implement.js b/node_modules/es5-ext/test/array/#/map/implement.js new file mode 100644 index 0000000..26bb411 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/map/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/map/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/map/index.js b/node_modules/es5-ext/test/array/#/map/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/map/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/map/is-implemented.js b/node_modules/es5-ext/test/array/#/map/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/map/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/map/shim.js b/node_modules/es5-ext/test/array/#/map/shim.js new file mode 100644 index 0000000..02a5af2 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/map/shim.js @@ -0,0 +1,19 @@ +"use strict"; + +var SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ["foo", undefined, 0, "2d", false, x, null]; + + a.deep(t.call(arr, Boolean), [true, false, false, true, false, true, false], + "Plain array"); + + subArr = new SubArray("foo", undefined, 0, "2d", false, x, null); + + result = t.call(subArr, Boolean); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [true, false, false, true, false, true, false], + "Result of subclass"); +}; diff --git a/node_modules/es5-ext/test/array/#/remove.js b/node_modules/es5-ext/test/array/#/remove.js new file mode 100644 index 0000000..d67457e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/remove.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + var y = {}, z = {}, x = [9, z, 5, y, "foo"]; + t.call(x, y); + a.deep(x, [9, z, 5, "foo"]); + t.call(x, {}); + a.deep(x, [9, z, 5, "foo"], "Not existing"); + t.call(x, 5); + a.deep(x, [9, z, "foo"], "Primitive"); + x = [9, z, 5, y, "foo"]; + t.call(x, z, 5, "foo"); + a.deep(x, [9, y], "More than one argument"); +}; diff --git a/node_modules/es5-ext/test/array/#/separate.js b/node_modules/es5-ext/test/array/#/separate.js new file mode 100644 index 0000000..9792637 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/separate.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + var x = [], y = {}, z = {}; + a.deep(t.call(x, y), [], "Empty"); + a.not(t.call(x), x, "Returns copy"); + a.deep(t.call([1], y), [1], "One"); + a.deep(t.call([1, "raz"], y), [1, y, "raz"], "One"); + a.deep(t.call([1, "raz", x], y), [1, y, "raz", y, x], "More"); + x = new Array(1000); + x[23] = 2; + x[3453] = "raz"; + x[500] = z; + a.deep(t.call(x, y), [2, y, z, y, "raz"], "Sparse"); +}; diff --git a/node_modules/es5-ext/test/array/#/slice/implement.js b/node_modules/es5-ext/test/array/#/slice/implement.js new file mode 100644 index 0000000..8c9b9be --- /dev/null +++ b/node_modules/es5-ext/test/array/#/slice/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/slice/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/slice/index.js b/node_modules/es5-ext/test/array/#/slice/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/slice/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/slice/is-implemented.js b/node_modules/es5-ext/test/array/#/slice/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/slice/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/slice/shim.js b/node_modules/es5-ext/test/array/#/slice/shim.js new file mode 100644 index 0000000..f09ad13 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/slice/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ["foo", undefined, 0, "2d", false, x, null]; + + a.deep(t.call(arr, 2, 4), [0, "2d"], "Plain array: result"); + + subArr = new SubArray("foo", undefined, 0, "2d", false, x, null); + + result = t.call(subArr, 2, 4); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [0, "2d"], "Subclass: result"); +}; diff --git a/node_modules/es5-ext/test/array/#/some-right.js b/node_modules/es5-ext/test/array/#/some-right.js new file mode 100644 index 0000000..1e0f407 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/some-right.js @@ -0,0 +1,62 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + var count = 0, first, last, x, icount = this.length; + t.call(this, function (item, index, col) { + ++count; + if (!first) { + first = item; + } + last = item; + x = col; + a(index, --icount, "Index"); + }); + a(count, this.length, "Iterated"); + a(first, this[this.length - 1], "First is last"); + a(last, this[0], "Last is first"); + a.deep(x, Object(this), "Collection as third argument"); // Jslint: skip + }, + "": function (t, a) { + var x = {}, y, count; + t.call( + [1], + function () { + y = this; + }, + x + ); + a(y, x, "Scope"); + y = 0; + t.call([3, 4, 4], function (a, i) { + y += i; + }); + a(y, 3, "Indexes"); + + x = [1, 3]; + x[5] = "x"; + y = 0; + count = 0; + a( + t.call(x, function (a, i) { + ++count; + y += i; + }), + false, + "Return" + ); + a(y, 6, "Misssing Indexes"); + a(count, 3, "Misssing Indexes, count"); + + count = 0; + a( + t.call([-2, -3, -4, 2, -5], function (item) { + ++count; + return item > 0; + }), + true, + "Return" + ); + a(count, 2, "Break after true is returned"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/splice/implement.js b/node_modules/es5-ext/test/array/#/splice/implement.js new file mode 100644 index 0000000..f09257a --- /dev/null +++ b/node_modules/es5-ext/test/array/#/splice/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/splice/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/splice/index.js b/node_modules/es5-ext/test/array/#/splice/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/splice/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/splice/is-implemented.js b/node_modules/es5-ext/test/array/#/splice/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/splice/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/splice/shim.js b/node_modules/es5-ext/test/array/#/splice/shim.js new file mode 100644 index 0000000..4802007 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/splice/shim.js @@ -0,0 +1,19 @@ +"use strict"; + +var SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ["foo", undefined, 0, "2d", false, x, null]; + + a.deep(t.call(arr, 2, 2, "bar"), [0, "2d"], "Plain array: result"); + a.deep(arr, ["foo", undefined, "bar", false, x, null], "Plain array: change"); + + subArr = new SubArray("foo", undefined, 0, "2d", false, x, null); + + result = t.call(subArr, 2, 2, "bar"); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [0, "2d"], "Subclass: result"); + a.deep(subArr, ["foo", undefined, "bar", false, x, null], "Subclass: change"); +}; diff --git a/node_modules/es5-ext/test/array/#/uniq.js b/node_modules/es5-ext/test/array/#/uniq.js new file mode 100644 index 0000000..c7223b2 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/uniq.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a(t.call(this).length, 3); + }, + "": function (t, a) { + var o, x = {}, y = {}, z = {}, w; + o = [1, 2, x, 3, 1, "raz", "1", y, x, "trzy", z, "raz"]; + + a.not(w = t.call(o), o, "Returns different object"); + a.deep(w, [1, 2, x, 3, "raz", "1", y, "trzy", z], "Result"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/values/implement.js b/node_modules/es5-ext/test/array/#/values/implement.js new file mode 100644 index 0000000..4ba7613 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/values/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/values/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/values/index.js b/node_modules/es5-ext/test/array/#/values/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/values/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/values/is-implemented.js b/node_modules/es5-ext/test/array/#/values/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/values/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/values/shim.js b/node_modules/es5-ext/test/array/#/values/shim.js new file mode 100644 index 0000000..71b71d5 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/values/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: "1", done: false }); + a.deep(iterator.next(), { value: "2", done: false }); + a.deep(iterator.next(), { value: "3", done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/node_modules/es5-ext/test/array/__scopes.js b/node_modules/es5-ext/test/array/__scopes.js new file mode 100644 index 0000000..bf47389 --- /dev/null +++ b/node_modules/es5-ext/test/array/__scopes.js @@ -0,0 +1,11 @@ +"use strict"; + +exports.Array = ["1", "2", "3"]; + +exports.Arguments = (function () { + return arguments; +}("1", "2", "3")); + +exports.String = "123"; + +exports.Object = { 0: "1", 1: "2", 2: "3", 3: "4", length: 3 }; diff --git a/node_modules/es5-ext/test/array/_is-extensible.js b/node_modules/es5-ext/test/array/_is-extensible.js new file mode 100644 index 0000000..8788186 --- /dev/null +++ b/node_modules/es5-ext/test/array/_is-extensible.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js b/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js new file mode 100644 index 0000000..6b42f4d --- /dev/null +++ b/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js @@ -0,0 +1,7 @@ +"use strict"; + +var isArray = Array.isArray; + +module.exports = function (t) { + t(t === null || isArray(t.prototype), true); +}; diff --git a/node_modules/es5-ext/test/array/_sub-array-dummy.js b/node_modules/es5-ext/test/array/_sub-array-dummy.js new file mode 100644 index 0000000..6b42f4d --- /dev/null +++ b/node_modules/es5-ext/test/array/_sub-array-dummy.js @@ -0,0 +1,7 @@ +"use strict"; + +var isArray = Array.isArray; + +module.exports = function (t) { + t(t === null || isArray(t.prototype), true); +}; diff --git a/node_modules/es5-ext/test/array/from/implement.js b/node_modules/es5-ext/test/array/from/implement.js new file mode 100644 index 0000000..2ed3788 --- /dev/null +++ b/node_modules/es5-ext/test/array/from/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../array/from/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/from/index.js b/node_modules/es5-ext/test/array/from/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/from/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/from/is-implemented.js b/node_modules/es5-ext/test/array/from/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/from/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/from/shim.js b/node_modules/es5-ext/test/array/from/shim.js new file mode 100644 index 0000000..17974c4 --- /dev/null +++ b/node_modules/es5-ext/test/array/from/shim.js @@ -0,0 +1,138 @@ +// Some tests taken from: https://github.com/mathiasbynens/Array.from/blob/master/tests/tests.js + +"use strict"; + +module.exports = function (t, a) { + var o = [1, 2, 3], MyType; + a.not(t(o), o, "Array"); + a.deep(t(o), o, "Array: same content"); + a.deep(t("12r3v"), ["1", "2", "r", "3", "v"], "String"); + a.deep( + t( + (function () { + return arguments; + })(3, o, "raz") + ), + [3, o, "raz"], + "Arguments" + ); + a.deep( + t( + (function () { + return arguments; + })(3) + ), + [3], + "Arguments with one numeric value" + ); + + a.deep(t({ 0: "raz", 1: "dwa", length: 2 }), ["raz", "dwa"], "Other"); + + a.deep( + t( + o, + function (val) { + return (val + 2) * 10; + }, + 10 + ), + [30, 40, 50], + "Mapping" + ); + + a.throws( + function () { + t(); + }, + TypeError, + "Undefined" + ); + a.deep(t(3), [], "Primitive"); + + a(t.length, 1, "Length"); + a.deep(t({ length: 0 }), [], "No values Array-like"); + a.deep(t({ length: -1 }), [], "Invalid length Array-like"); + a.deep(t({ length: -Infinity }), [], "Invalid length Array-like #2"); + a.throws( + function () { + t(undefined); + }, + TypeError, + "Undefined" + ); + a.throws( + function () { + t(null); + }, + TypeError, + "Null" + ); + a.deep(t(false), [], "Boolean"); + a.deep(t(-Infinity), [], "Inifity"); + a.deep(t(-0), [], "-0"); + a.deep(t(+0), [], "+0"); + a.deep(t(1), [], "1"); + a.deep(t(Number(Infinity)), [], "+Infinity"); + a.deep(t({}), [], "Plain object"); + a.deep(t({ length: 1 }), [undefined], "Sparse array-like"); + a.deep( + t({ 0: "a", 1: "b", length: 2 }, function (x) { + return x + x; + }), + ["aa", "bb"], + "Map" + ); + a.deep( + t( + { 0: "a", 1: "b", length: 2 }, + function () { + return String(this); + }, + undefined + ), + ["undefined", "undefined"], + "Map context" + ); + a.deep( + t( + { 0: "a", 1: "b", length: 2 }, + function () { + return String(this); + }, + "x" + ), + ["x", "x"], + "Map primitive context" + ); + a.throws( + function () { + t({}, "foo", "x"); + }, + TypeError, + "Non callable for map" + ); + + a.deep(t({ length: 1, 0: "a" }), ["a"], "Null context"); + + a(t({ __proto__: { 0: "abc", length: 1 } })[0], "abc", "Values on prototype"); + + a.throws( + function () { + t.call(function () { + return Object.freeze({}); + }, {}); + }, + TypeError, + "Contructor producing freezed objects" + ); + + // Ensure no setters are called for the indexes + // Ensure no setters are called for the indexes + MyType = function () {}; + Object.defineProperty(MyType.prototype, "0", { + set: function (x) { + throw new Error("Setter called: " + x); + } + }); + a.deep(t.call(MyType, { 0: "abc", length: 1 }), { 0: "abc", length: 1 }, "Defined not set"); +}; diff --git a/node_modules/es5-ext/test/array/generate.js b/node_modules/es5-ext/test/array/generate.js new file mode 100644 index 0000000..efd5f7c --- /dev/null +++ b/node_modules/es5-ext/test/array/generate.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}, y = {}; + a.deep(t(3), [undefined, undefined, undefined], "Just length"); + a.deep(t(0, "x"), [], "No repeat"); + a.deep(t(1, x, y), [x], "Arguments length larger than repeat number"); + a.deep(t(3, x), [x, x, x], "Single argument"); + a.deep(t(5, x, y), [x, y, x, y, x], "Many arguments"); +}; diff --git a/node_modules/es5-ext/test/array/is-plain-array.js b/node_modules/es5-ext/test/array/is-plain-array.js new file mode 100644 index 0000000..2cfd50d --- /dev/null +++ b/node_modules/es5-ext/test/array/is-plain-array.js @@ -0,0 +1,18 @@ +"use strict"; + +var SubArray = require("../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr = [1, 2, 3]; + a(t(arr), true, "Array"); + a(t(null), false, "Null"); + a(t(), false, "Undefined"); + a(t("234"), false, "String"); + a(t(23), false, "Number"); + a(t({}), false, "Plain object"); + a(t({ length: 1, 0: "raz" }), false, "Array-like"); + a(t(Object.create(arr)), false, "Array extension"); + if (!SubArray) return; + a(t(new SubArray(23)), false, "Subclass instance"); + a(t(Array.prototype), false, "Array.prototype"); +}; diff --git a/node_modules/es5-ext/test/array/of/implement.js b/node_modules/es5-ext/test/array/of/implement.js new file mode 100644 index 0000000..0b1f5c8 --- /dev/null +++ b/node_modules/es5-ext/test/array/of/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../array/of/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/of/index.js b/node_modules/es5-ext/test/array/of/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/array/of/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/of/is-implemented.js b/node_modules/es5-ext/test/array/of/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/array/of/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/of/shim.js b/node_modules/es5-ext/test/array/of/shim.js new file mode 100644 index 0000000..7d18859 --- /dev/null +++ b/node_modules/es5-ext/test/array/of/shim.js @@ -0,0 +1,89 @@ +/* eslint no-useless-call: "off" */ +// Most tests taken from https://github.com/mathiasbynens/Array.of/blob/master/tests/tests.js +// Thanks @mathiasbynens + +"use strict"; + +var defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var x = {}, testObject, MyType; + + a.deep(t(), [], "No arguments"); + a.deep(t(3), [3], "One numeric argument"); + a.deep(t(3, "raz", null, x, undefined), [3, "raz", null, x, undefined], "Many arguments"); + + a(t.length, 0, "Length"); + + a.deep(t("abc"), ["abc"], "String"); + a.deep(t(undefined), [undefined], "Undefined"); + a.deep(t(null), [null], "Null"); + a.deep(t(false), [false], "Boolean"); + a.deep(t(-Infinity), [-Infinity], "Infinity"); + a.deep(t(-0), [-0], "-0"); + a.deep(t(+0), [+0], "+0"); + a.deep(t(1), [1], "1"); + a.deep(t(1, 2, 3), [1, 2, 3], "Numeric args"); + a.deep(t(Number(Infinity)), [Number(Infinity)], "+Infinity"); + a.deep( + t({ 0: "a", 1: "b", 2: "c", length: 3 }), + [{ 0: "a", 1: "b", 2: "c", length: 3 }], + "Array like" + ); + a.deep( + t(undefined, null, false, -Infinity, -0, +0, 1, 2, Number(Infinity)), + [undefined, null, false, -Infinity, -0, +0, 1, 2, Number(Infinity)], + "Falsy arguments" + ); + + a.h1("Null context"); + a.deep(t.call(null, "abc"), ["abc"], "String"); + a.deep(t.call(null, undefined), [undefined], "Undefined"); + a.deep(t.call(null, null), [null], "Null"); + a.deep(t.call(null, false), [false], "Boolean"); + a.deep(t.call(null, -Infinity), [-Infinity], "-Infinity"); + a.deep(t.call(null, -0), [-0], "-0"); + a.deep(t.call(null, +0), [+0], "+0"); + a.deep(t.call(null, 1), [1], "1"); + a.deep(t.call(null, 1, 2, 3), [1, 2, 3], "Numeric"); + a.deep(t.call(null, Number(Infinity)), [Number(Infinity)], "+Infinity"); + a.deep( + t.call(null, { 0: "a", 1: "b", 2: "c", length: 3 }), + [{ 0: "a", 1: "b", 2: "c", length: 3 }], + "Array-like" + ); + a.deep( + t.call(null, undefined, null, false, -Infinity, -0, +0, 1, 2, Number(Infinity)), + [undefined, null, false, -Infinity, -0, +0, 1, 2, Number(Infinity)], + "Falsy" + ); + + a.h1("Other constructor context"); + a.deep(t.call(Object, 1, 2, 3), { 0: 1, 1: 2, 2: 3, length: 3 }, "Many arguments"); + + testObject = Object(3); + testObject[0] = 1; + testObject[1] = 2; + testObject[2] = 3; + testObject.length = 3; + a.deep(t.call(Object, 1, 2, 3), testObject, "Test object"); + a(t.call(Object).length, 0, "No arguments"); + a.throws( + function () { + t.call(function () { + return Object.freeze({}); + }); + }, + TypeError, + "Frozen instance" + ); + + // Ensure no setters are called for the indexes + MyType = function () {}; + defineProperty(MyType.prototype, "0", { + set: function (x) { + throw new Error("Setter called: " + x); + } + }); + a.deep(t.call(MyType, "abc"), { 0: "abc", length: 1 }, "Define, not set"); +}; diff --git a/node_modules/es5-ext/test/array/to-array.js b/node_modules/es5-ext/test/array/to-array.js new file mode 100644 index 0000000..a1f10a4 --- /dev/null +++ b/node_modules/es5-ext/test/array/to-array.js @@ -0,0 +1,27 @@ +"use strict"; + +module.exports = function (t, a) { + var o = [1, 2, 3]; + a(t(o), o, "Array"); + a.deep(t("12r3v"), ["1", "2", "r", "3", "v"], "String"); + a.deep( + t( + (function () { + return arguments; + })(3, o, "raz") + ), + [3, o, "raz"], + "Arguments" + ); + a.deep( + t( + (function () { + return arguments; + })(3) + ), + [3], + "Arguments with one numeric value" + ); + + a.deep(t({ 0: "raz", 1: "dwa", length: 2 }), ["raz", "dwa"], "Other"); +}; diff --git a/node_modules/es5-ext/test/array/valid-array.js b/node_modules/es5-ext/test/array/valid-array.js new file mode 100644 index 0000000..a3708b2 --- /dev/null +++ b/node_modules/es5-ext/test/array/valid-array.js @@ -0,0 +1,30 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "Null"); + a.throws(function () { + t(0); +}, TypeError, "Number"); + a.throws(function () { + t(true); +}, TypeError, "Boolean"); + a.throws(function () { + t("raz"); +}, TypeError, "String"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a.throws(function () { + t({}); +}, TypeError, "Object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + a(t(x = []), x, "Array"); +}; diff --git a/node_modules/es5-ext/test/boolean/is-boolean.js b/node_modules/es5-ext/test/boolean/is-boolean.js new file mode 100644 index 0000000..e36b3f3 --- /dev/null +++ b/node_modules/es5-ext/test/boolean/is-boolean.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), false, "Number"); + a(t(false), true, "Boolean"); + a(t(new Boolean(false)), true, "Boolean object"); + a(t(new Date()), false, "Date"); + a(t(new String("raz")), false, "String object"); + a(t({}), false, "Plain object"); + a(t(/a/), false, "Regular expression"); +}; diff --git a/node_modules/es5-ext/test/date/#/copy.js b/node_modules/es5-ext/test/date/#/copy.js new file mode 100644 index 0000000..27c996b --- /dev/null +++ b/node_modules/es5-ext/test/date/#/copy.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var o = new Date(), o2; + + o2 = t.call(o); + a.not(o, o2, "Different objects"); + a.ok(o2 instanceof Date, "Instance of Date"); + a(o.getTime(), o2.getTime(), "Same time"); +}; diff --git a/node_modules/es5-ext/test/date/#/days-in-month.js b/node_modules/es5-ext/test/date/#/days-in-month.js new file mode 100644 index 0000000..ce2dd77 --- /dev/null +++ b/node_modules/es5-ext/test/date/#/days-in-month.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(new Date(2001, 0, 1)), 31, "January"); + a(t.call(new Date(2001, 1, 1)), 28, "February"); + a(t.call(new Date(2000, 1, 1)), 29, "February (leap)"); + a(t.call(new Date(2001, 2, 1)), 31, "March"); + a(t.call(new Date(2001, 3, 1)), 30, "April"); + a(t.call(new Date(2001, 4, 1)), 31, "May"); + a(t.call(new Date(2001, 5, 1)), 30, "June"); + a(t.call(new Date(2001, 6, 1)), 31, "July"); + a(t.call(new Date(2001, 7, 1)), 31, "August"); + a(t.call(new Date(2001, 8, 1)), 30, "September"); + a(t.call(new Date(2001, 9, 1)), 31, "October"); + a(t.call(new Date(2001, 10, 1)), 30, "November"); + a(t.call(new Date(2001, 11, 1)), 31, "December"); +}; diff --git a/node_modules/es5-ext/test/date/#/floor-day.js b/node_modules/es5-ext/test/date/#/floor-day.js new file mode 100644 index 0000000..fa929d6 --- /dev/null +++ b/node_modules/es5-ext/test/date/#/floor-day.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 0, 1, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/node_modules/es5-ext/test/date/#/floor-month.js b/node_modules/es5-ext/test/date/#/floor-month.js new file mode 100644 index 0000000..1df4ddb --- /dev/null +++ b/node_modules/es5-ext/test/date/#/floor-month.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 0, 15, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/node_modules/es5-ext/test/date/#/floor-year.js b/node_modules/es5-ext/test/date/#/floor-year.js new file mode 100644 index 0000000..5b78b7d --- /dev/null +++ b/node_modules/es5-ext/test/date/#/floor-year.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 5, 13, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/node_modules/es5-ext/test/date/#/format.js b/node_modules/es5-ext/test/date/#/format.js new file mode 100644 index 0000000..510b26b --- /dev/null +++ b/node_modules/es5-ext/test/date/#/format.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + var dt = new Date(2011, 2, 3, 3, 5, 5, 32); + a(t.call(dt, " %Y.%y.%m.%d.%H.%M.%S.%L "), " 2011.11.03.03.03.05.05.032 "); +}; diff --git a/node_modules/es5-ext/test/date/ensure-time-value.js b/node_modules/es5-ext/test/date/ensure-time-value.js new file mode 100644 index 0000000..39ddc23 --- /dev/null +++ b/node_modules/es5-ext/test/date/ensure-time-value.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(12), 12, "Number in range"); + a(t(12.23), 12, "Rounds number in range"); + a(t(-12.63), -12, "Rounds negative number in range"); + a.throws( + function () { + t(NaN); + }, + TypeError, + "Throws on invalid" + ); +}; diff --git a/node_modules/es5-ext/test/date/is-date.js b/node_modules/es5-ext/test/date/is-date.js new file mode 100644 index 0000000..90ae8ad --- /dev/null +++ b/node_modules/es5-ext/test/date/is-date.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(new Date()), true, "Date"); + a(t(new String("raz")), false, "String object"); + a(t({}), false, "Plain object"); +}; diff --git a/node_modules/es5-ext/test/date/is-time-value.js b/node_modules/es5-ext/test/date/is-time-value.js new file mode 100644 index 0000000..a21677c --- /dev/null +++ b/node_modules/es5-ext/test/date/is-time-value.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), true, "Number in range"); + a(t(true), true, "Boolean"); + a(t(new Date()), true, "Date"); + a(t({}), false, "Plain object"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); + a(t(8.64e17), false, "Beyond range"); + a(t(8.64e15), true, "Below range"); + a(t(-8.64e17), false, "Negative beyond range"); + a(t(-8.64e15), true, "Negative below range"); +}; diff --git a/node_modules/es5-ext/test/date/valid-date.js b/node_modules/es5-ext/test/date/valid-date.js new file mode 100644 index 0000000..2856cb6 --- /dev/null +++ b/node_modules/es5-ext/test/date/valid-date.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + var d = new Date(); + a(t(d), d, "Date"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t({ valueOf: function () { + return 20; +} }); + }, "Number object"); +}; diff --git a/node_modules/es5-ext/test/error/#/throw.js b/node_modules/es5-ext/test/error/#/throw.js new file mode 100644 index 0000000..8c5d04e --- /dev/null +++ b/node_modules/es5-ext/test/error/#/throw.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var e = new Error(); + try { + t.call(e); + } catch (e2) { + a(e2, e); + } +}; diff --git a/node_modules/es5-ext/test/error/custom.js b/node_modules/es5-ext/test/error/custom.js new file mode 100644 index 0000000..ca35c76 --- /dev/null +++ b/node_modules/es5-ext/test/error/custom.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var T = t, err = new T("My Error", "MY_ERROR", { errno: 123 }); + a(err instanceof Error, true, "Instance of error"); + a(err.constructor, Error, "Constructor"); + a(err.name, "Error", "Name"); + a(String(err), "Error: My Error", "String representation"); + a(err.code, "MY_ERROR", "Code"); + a(err.errno, 123, "Errno"); + a(typeof err.stack, "string", "Stack trace"); +}; diff --git a/node_modules/es5-ext/test/error/is-error.js b/node_modules/es5-ext/test/error/is-error.js new file mode 100644 index 0000000..423c735 --- /dev/null +++ b/node_modules/es5-ext/test/error/is-error.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), false, "Undefined"); + a(t(1), false, "Primitive"); + a(t({}), false, "Objectt"); + a(t({ toString: function () { + return "[object Error]"; +} }), false, + "Fake error"); + a(t(new Error()), true, "Error"); + a(t(new EvalError()), true, "EvalError"); + a(t(new RangeError()), true, "RangeError"); + a(t(new ReferenceError()), true, "ReferenceError"); + a(t(new SyntaxError()), true, "SyntaxError"); + a(t(new TypeError()), true, "TypeError"); + a(t(new URIError()), true, "URIError"); +}; diff --git a/node_modules/es5-ext/test/error/valid-error.js b/node_modules/es5-ext/test/error/valid-error.js new file mode 100644 index 0000000..7d032bf --- /dev/null +++ b/node_modules/es5-ext/test/error/valid-error.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + var e = new Error(); + a(t(e), e, "Error"); + a.throws(function () { + t({}); + }, "Other"); +}; diff --git a/node_modules/es5-ext/test/function/#/compose.js b/node_modules/es5-ext/test/function/#/compose.js new file mode 100644 index 0000000..433f3b4 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/compose.js @@ -0,0 +1,15 @@ +"use strict"; + +var f = function (a, b) { + return ["a", arguments.length, a, b]; +} + , g = function (a) { + return ["b", arguments.length].concat(a); +} + , h = function (a) { + return ["c", arguments.length].concat(a); +}; + +module.exports = function (t, a) { + a.deep(t.call(h, g, f)(1, 2), ["c", 1, "b", 1, "a", 2, 1, 2]); +}; diff --git a/node_modules/es5-ext/test/function/#/copy.js b/node_modules/es5-ext/test/function/#/copy.js new file mode 100644 index 0000000..e7988ce --- /dev/null +++ b/node_modules/es5-ext/test/function/#/copy.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + var foo = "raz", bar = "dwa"; + // eslint-disable-next-line func-names + var fn = function marko(a, b) { + return this + a + b + foo + bar; + }; + var result, o = {}; + + fn.prototype = o; + + fn.foo = "raz"; + + result = t.call(fn); + + a(result.length, fn.length, "Length"); + a(result.name, fn.name, "Length"); + a(result.call("marko", "el", "fe"), "markoelferazdwa", "Body"); + a(result.prototype, fn.prototype, "Prototype"); + a(result.foo, fn.foo, "Custom property"); +}; diff --git a/node_modules/es5-ext/test/function/#/curry.js b/node_modules/es5-ext/test/function/#/curry.js new file mode 100644 index 0000000..c30313a --- /dev/null +++ b/node_modules/es5-ext/test/function/#/curry.js @@ -0,0 +1,20 @@ +"use strict"; + +var toArray = require("../../../array/to-array") + + , f = function () { + return toArray(arguments); +}; + +module.exports = function (t, a) { + var x, y = {}, z; + a.deep(t.call(f, 0, 1, 2)(3), [], "0 arguments"); + x = t.call(f, 5, {}); + a(x.length, 5, "Length #1"); + z = x(1, 2); + a(z.length, 3, "Length #2"); + z = z(3, 4); + a(z.length, 1, "Length #1"); + a.deep(z(5, 6), [1, 2, 3, 4, 5], "Many arguments"); + a.deep(x(8, 3)(y, 45)("raz", 6), [8, 3, y, 45, "raz"], "Many arguments #2"); +}; diff --git a/node_modules/es5-ext/test/function/#/lock.js b/node_modules/es5-ext/test/function/#/lock.js new file mode 100644 index 0000000..08ea950 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/lock.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(function () { + return arguments.length; + })(1, 2, 3), 0); +}; diff --git a/node_modules/es5-ext/test/function/#/not.js b/node_modules/es5-ext/test/function/#/not.js new file mode 100644 index 0000000..64fff71 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/not.js @@ -0,0 +1,11 @@ +"use strict"; + +var identity = require("../../../function/identity") + , noop = require("../../../function/noop"); + +module.exports = function (t, a) { + a(t.call(identity)(""), true, "Falsy"); + a(t.call(noop)(), true, "Undefined"); + a(t.call(identity)({}), false, "Any object"); + a(t.call(identity)(true), false, "True"); +}; diff --git a/node_modules/es5-ext/test/function/#/partial.js b/node_modules/es5-ext/test/function/#/partial.js new file mode 100644 index 0000000..7e9428f --- /dev/null +++ b/node_modules/es5-ext/test/function/#/partial.js @@ -0,0 +1,11 @@ +"use strict"; + +var toArray = require("../../../array/to-array") + + , f = function () { + return toArray(arguments); +}; + +module.exports = function (t, a) { + a.deep(t.call(f, 1)(2, 3), [1, 2, 3]); +}; diff --git a/node_modules/es5-ext/test/function/#/spread.js b/node_modules/es5-ext/test/function/#/spread.js new file mode 100644 index 0000000..d082fca --- /dev/null +++ b/node_modules/es5-ext/test/function/#/spread.js @@ -0,0 +1,10 @@ +"use strict"; + +var f = function (a, b) { + return this[a] + this[b]; +} + , o = { a: 3, b: 4 }; + +module.exports = function (t, a) { + a(t.call(f).call(o, ["a", "b"]), 7); +}; diff --git a/node_modules/es5-ext/test/function/#/to-string-tokens.js b/node_modules/es5-ext/test/function/#/to-string-tokens.js new file mode 100644 index 0000000..0691cc3 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/to-string-tokens.js @@ -0,0 +1,33 @@ +/* eslint no-eval: "off" */ + +"use strict"; + +module.exports = function (t, a) { + a.deep( + t.call(function (a, b) { + return this[a] + this[b]; + }), + { args: "a, b", body: "\n\t\t\treturn this[a] + this[b];\n\t\t" } + ); + a.deep(t.call(function () {}), { args: "", body: "" }); + // eslint-disable-next-line no-unused-vars + a.deep(t.call(function (raz) {}), { args: "raz", body: "" }); + a.deep( + t.call(function () { + Object(); + }), + { args: "", body: "\n\t\t\tObject();\n\t\t" } + ); + + try { + eval("(() => {})"); + } catch (e) { + // Non ES2015 env + return; + } + + a.deep(t.call(eval("(() => {})")), { args: "", body: "" }); + a.deep(t.call(eval("((elo) => foo)")), { args: "elo", body: "foo" }); + a.deep(t.call(eval("(elo => foo)")), { args: "elo", body: "foo" }); + a.deep(t.call(eval("((elo, bar) => foo())")), { args: "elo, bar", body: "foo()" }); +}; diff --git a/node_modules/es5-ext/test/function/_define-length.js b/node_modules/es5-ext/test/function/_define-length.js new file mode 100644 index 0000000..324e273 --- /dev/null +++ b/node_modules/es5-ext/test/function/_define-length.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + var foo = "raz", bar = "dwa" + , fn = function (a, b) { + return this + a + b + foo + bar; +} + , result; + + result = t(fn, 3); + a(result.call("marko", "el", "fe"), "markoelferazdwa", "Content"); + a(result.length, 3, "Length"); + a(result.prototype, fn.prototype, "Prototype"); +}; diff --git a/node_modules/es5-ext/test/function/constant.js b/node_modules/es5-ext/test/function/constant.js new file mode 100644 index 0000000..4ba2d89 --- /dev/null +++ b/node_modules/es5-ext/test/function/constant.js @@ -0,0 +1,7 @@ +"use strict"; + +var o = {}; + +module.exports = function (t, a) { + a(t(o)(), o); +}; diff --git a/node_modules/es5-ext/test/function/identity.js b/node_modules/es5-ext/test/function/identity.js new file mode 100644 index 0000000..a5b0b1b --- /dev/null +++ b/node_modules/es5-ext/test/function/identity.js @@ -0,0 +1,7 @@ +"use strict"; + +var o = {}; + +module.exports = function (t, a) { + a(t(o), o); +}; diff --git a/node_modules/es5-ext/test/function/invoke.js b/node_modules/es5-ext/test/function/invoke.js new file mode 100644 index 0000000..6268f47 --- /dev/null +++ b/node_modules/es5-ext/test/function/invoke.js @@ -0,0 +1,9 @@ +"use strict"; + +var constant = require("../../function/constant") + + , o = { b: constant("c") }; + +module.exports = function (t, a) { + a(t("b")(o), "c"); +}; diff --git a/node_modules/es5-ext/test/function/is-arguments.js b/node_modules/es5-ext/test/function/is-arguments.js new file mode 100644 index 0000000..5bd54ac --- /dev/null +++ b/node_modules/es5-ext/test/function/is-arguments.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var args, dummy; + args = (function () { + return arguments; +}()); + dummy = { 0: 1, 1: 2 }; + Object.defineProperty(dummy, "length", { value: 2 }); + a(t(args), true, "Arguments"); + a(t(dummy), false, "Dummy"); + a(t([]), false, "Array"); +}; diff --git a/node_modules/es5-ext/test/function/is-function.js b/node_modules/es5-ext/test/function/is-function.js new file mode 100644 index 0000000..fe89798 --- /dev/null +++ b/node_modules/es5-ext/test/function/is-function.js @@ -0,0 +1,8 @@ +"use strict"; + +var o = { call: Function.prototype.call, apply: Function.prototype.apply }; + +module.exports = function (t, a) { + a(t(function () {}), true, "Function is function"); + a(t(o), false, "Plain object is not function"); +}; diff --git a/node_modules/es5-ext/test/function/noop.js b/node_modules/es5-ext/test/function/noop.js new file mode 100644 index 0000000..34de85a --- /dev/null +++ b/node_modules/es5-ext/test/function/noop.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(1, 2, 3), "undefined"); +}; diff --git a/node_modules/es5-ext/test/function/pluck.js b/node_modules/es5-ext/test/function/pluck.js new file mode 100644 index 0000000..f8954c5 --- /dev/null +++ b/node_modules/es5-ext/test/function/pluck.js @@ -0,0 +1,7 @@ +"use strict"; + +var o = { foo: "bar" }; + +module.exports = function (t, a) { + a(t("foo")(o), o.foo); +}; diff --git a/node_modules/es5-ext/test/function/valid-function.js b/node_modules/es5-ext/test/function/valid-function.js new file mode 100644 index 0000000..30c0360 --- /dev/null +++ b/node_modules/es5-ext/test/function/valid-function.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + var f = function () {}; + a(t(f), f, "Function"); + // eslint-disable-next-line no-new-func + f = new Function(); + a(t(f), f, "Function"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t(/re/); + }, "RegExp"); + a.throws(function () { + t({ + call: function () { + return 20; + } + }); + }, "Plain object"); +}; diff --git a/node_modules/es5-ext/test/global.js b/node_modules/es5-ext/test/global.js new file mode 100644 index 0000000..554ad4c --- /dev/null +++ b/node_modules/es5-ext/test/global.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a.ok(t && typeof t === "object"); + a(typeof t.Array, "function"); +}; diff --git a/node_modules/es5-ext/test/iterable/for-each.js b/node_modules/es5-ext/test/iterable/for-each.js new file mode 100644 index 0000000..d6c3872 --- /dev/null +++ b/node_modules/es5-ext/test/iterable/for-each.js @@ -0,0 +1,42 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array") + + , slice = Array.prototype.slice; + +module.exports = function (t, a) { + var i = 0, x = ["raz", "dwa", "trzy"], y = {}; + t(x, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); + a(this, y, "Array: context: " + i++ + "#"); + }, y); + i = 0; + t((function () { + return arguments; +}("raz", "dwa", "trzy")), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#"); + a(this, y, "Arguments: context: " + i++ + "#"); + }, y); + i = 0; + t({ 0: "raz", 1: "dwa", 2: "trzy", length: 3 }, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array-like" + i + "#"); + a(this, y, "Array-like: context: " + i++ + "#"); + }, y); + i = 0; + t(x = "foo", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Regular String: context: " + i++ + "#"); + }, y); + i = 0; + x = ["r", "💩", "z"]; + t("r💩z", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Unicode String: context: " + i++ + "#"); + }, y); + i = 0; + t(new ArrayIterator(x), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); + a(this, y, "Iterator: context: " + i++ + "#"); + }, y); + +}; diff --git a/node_modules/es5-ext/test/iterable/is.js b/node_modules/es5-ext/test/iterable/is.js new file mode 100644 index 0000000..04d34a8 --- /dev/null +++ b/node_modules/es5-ext/test/iterable/is.js @@ -0,0 +1,28 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (t, a) { + var x; + a(t([]), true, "Array"); + a(t(""), true, "String"); + a( + t( + (function () { + return arguments; + })() + ), + true, + "Arguments" + ); + a(t({ length: 0 }), true, "List object"); + a(t(function () {}), false, "Function"); + a(t({}), false, "Plain object"); + a(t(/raz/), false, "Regexp"); + a(t(), false, "No argument"); + a(t(null), false, "Null"); + a(t(undefined), false, "Undefined"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), true, "Iterable"); +}; diff --git a/node_modules/es5-ext/test/iterable/validate-object.js b/node_modules/es5-ext/test/iterable/validate-object.js new file mode 100644 index 0000000..83a9ca1 --- /dev/null +++ b/node_modules/es5-ext/test/iterable/validate-object.js @@ -0,0 +1,34 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a.throws(function () { + t(""); +}, TypeError, "String"); + a.throws(function () { + t({}); +}, TypeError, "Plain Object"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), x, "Iterable"); +}; diff --git a/node_modules/es5-ext/test/iterable/validate.js b/node_modules/es5-ext/test/iterable/validate.js new file mode 100644 index 0000000..61cab5d --- /dev/null +++ b/node_modules/es5-ext/test/iterable/validate.js @@ -0,0 +1,32 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a(t(""), "", "''"); + a.throws(function () { + t({}); +}, TypeError, "Plain Object"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), x, "Iterable"); +}; diff --git a/node_modules/es5-ext/test/json/safe-stringify.js b/node_modules/es5-ext/test/json/safe-stringify.js new file mode 100644 index 0000000..2d13f3d --- /dev/null +++ b/node_modules/es5-ext/test/json/safe-stringify.js @@ -0,0 +1,26 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({ foo: "bar" }), JSON.stringify({ foo: "bar" })); + a(t({ foo: { elo: 12 } }), "{\"foo\":{\"elo\":12}}"); + a(t({ foo: { elo: 12, +mel: { + toJSON: function () { + throw new Error("Nu nu!"); +} + } } }), "{\"foo\":{\"elo\":12}}"); + a(t({ foo: { elo: 12 }, +mel: { + toJSON: function () { + throw new Error("Nu nu!"); +} + } }), "{\"foo\":{\"elo\":12}}"); + a(t({ foo: { elo: 12 }, +mel: [ +"raz", { + toJSON: function () { + throw new Error("Nu nu!"); +} + }, 0, 2 +] }), "{\"foo\":{\"elo\":12},\"mel\":[\"raz\",0,2]}"); +}; diff --git a/node_modules/es5-ext/test/math/_pack-ieee754.js b/node_modules/es5-ext/test/math/_pack-ieee754.js new file mode 100644 index 0000000..7e56f7f --- /dev/null +++ b/node_modules/es5-ext/test/math/_pack-ieee754.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t(1.337, 8, 23), [63, 171, 34, 209]); +}; diff --git a/node_modules/es5-ext/test/math/_unpack-ieee754.js b/node_modules/es5-ext/test/math/_unpack-ieee754.js new file mode 100644 index 0000000..52730f3 --- /dev/null +++ b/node_modules/es5-ext/test/math/_unpack-ieee754.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t([63, 171, 34, 209], 8, 23), 1.3370000123977661); +}; diff --git a/node_modules/es5-ext/test/math/acosh/implement.js b/node_modules/es5-ext/test/math/acosh/implement.js new file mode 100644 index 0000000..d7bcc28 --- /dev/null +++ b/node_modules/es5-ext/test/math/acosh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/acosh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/acosh/index.js b/node_modules/es5-ext/test/math/acosh/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/acosh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/acosh/is-implemented.js b/node_modules/es5-ext/test/math/acosh/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/acosh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/acosh/shim.js b/node_modules/es5-ext/test/math/acosh/shim.js new file mode 100644 index 0000000..17ac181 --- /dev/null +++ b/node_modules/es5-ext/test/math/acosh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-1), NaN, "Negative"); + a(t(0), NaN, "Zero"); + a(t(0.5), NaN, "Below 1"); + a(t(1), 0, "1"); + a(t(2), 1.3169578969248166, "Other"); + a(t(Infinity), Infinity, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/math/asinh/implement.js b/node_modules/es5-ext/test/math/asinh/implement.js new file mode 100644 index 0000000..ab4b969 --- /dev/null +++ b/node_modules/es5-ext/test/math/asinh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/asinh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/asinh/index.js b/node_modules/es5-ext/test/math/asinh/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/asinh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/asinh/is-implemented.js b/node_modules/es5-ext/test/math/asinh/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/asinh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/asinh/shim.js b/node_modules/es5-ext/test/math/asinh/shim.js new file mode 100644 index 0000000..a4328d2 --- /dev/null +++ b/node_modules/es5-ext/test/math/asinh/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(-2), -1.4436354751788103, "Negative"); + a(t(2), 1.4436354751788103, "Positive"); +}; diff --git a/node_modules/es5-ext/test/math/atanh/implement.js b/node_modules/es5-ext/test/math/atanh/implement.js new file mode 100644 index 0000000..bcd3bd8 --- /dev/null +++ b/node_modules/es5-ext/test/math/atanh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/atanh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/atanh/index.js b/node_modules/es5-ext/test/math/atanh/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/atanh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/atanh/is-implemented.js b/node_modules/es5-ext/test/math/atanh/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/atanh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/atanh/shim.js b/node_modules/es5-ext/test/math/atanh/shim.js new file mode 100644 index 0000000..f58709c --- /dev/null +++ b/node_modules/es5-ext/test/math/atanh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-2), NaN, "Less than -1"); + a(t(2), NaN, "Greater than 1"); + a(t(-1), -Infinity, "-1"); + a(t(1), Infinity, "1"); + a(t(0), 0, "Zero"); + a(Math.round(t(0.5) * 1e15), 549306144334055, "Other"); +}; diff --git a/node_modules/es5-ext/test/math/cbrt/implement.js b/node_modules/es5-ext/test/math/cbrt/implement.js new file mode 100644 index 0000000..132e929 --- /dev/null +++ b/node_modules/es5-ext/test/math/cbrt/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/cbrt/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/cbrt/index.js b/node_modules/es5-ext/test/math/cbrt/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/cbrt/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/cbrt/is-implemented.js b/node_modules/es5-ext/test/math/cbrt/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/cbrt/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/cbrt/shim.js b/node_modules/es5-ext/test/math/cbrt/shim.js new file mode 100644 index 0000000..fc1beee --- /dev/null +++ b/node_modules/es5-ext/test/math/cbrt/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(-1), -1, "-1"); + a(t(1), 1, "1"); + a(t(2), 1.2599210498948732, "Ohter"); +}; diff --git a/node_modules/es5-ext/test/math/clz32/implement.js b/node_modules/es5-ext/test/math/clz32/implement.js new file mode 100644 index 0000000..36f529f --- /dev/null +++ b/node_modules/es5-ext/test/math/clz32/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/clz32/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/clz32/index.js b/node_modules/es5-ext/test/math/clz32/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/clz32/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/clz32/is-implemented.js b/node_modules/es5-ext/test/math/clz32/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/clz32/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/clz32/shim.js b/node_modules/es5-ext/test/math/clz32/shim.js new file mode 100644 index 0000000..4d8dd2f --- /dev/null +++ b/node_modules/es5-ext/test/math/clz32/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(1), 31, "1"); + a(t(1000), 22, "1000"); + a(t(), 32, "No arguments"); + a(t(Infinity), 32, "Infinity"); + a(t(-Infinity), 32, "-Infinity"); + a(t("foo"), 32, "String"); + a(t(true), 31, "Boolean"); + a(t(3.5), 30, "Float"); +}; diff --git a/node_modules/es5-ext/test/math/cosh/implement.js b/node_modules/es5-ext/test/math/cosh/implement.js new file mode 100644 index 0000000..6ad42ef --- /dev/null +++ b/node_modules/es5-ext/test/math/cosh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/cosh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/cosh/index.js b/node_modules/es5-ext/test/math/cosh/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/cosh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/cosh/is-implemented.js b/node_modules/es5-ext/test/math/cosh/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/cosh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/cosh/shim.js b/node_modules/es5-ext/test/math/cosh/shim.js new file mode 100644 index 0000000..0b917c7 --- /dev/null +++ b/node_modules/es5-ext/test/math/cosh/shim.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 1, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), Infinity, "-Infinity"); + a(t(1), 1.5430806348152437, "1"); + a(t(Number.MAX_VALUE), Infinity); + a(t(-Number.MAX_VALUE), Infinity); + a(t(Number.MIN_VALUE), 1); + a(t(-Number.MIN_VALUE), 1); +}; diff --git a/node_modules/es5-ext/test/math/expm1/implement.js b/node_modules/es5-ext/test/math/expm1/implement.js new file mode 100644 index 0000000..7fb528a --- /dev/null +++ b/node_modules/es5-ext/test/math/expm1/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/expm1/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/expm1/index.js b/node_modules/es5-ext/test/math/expm1/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/expm1/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/expm1/is-implemented.js b/node_modules/es5-ext/test/math/expm1/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/expm1/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/expm1/shim.js b/node_modules/es5-ext/test/math/expm1/shim.js new file mode 100644 index 0000000..cebb063 --- /dev/null +++ b/node_modules/es5-ext/test/math/expm1/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -1, "-Infinity"); + a(t(1).toFixed(15), "1.718281828459045", "1"); +}; diff --git a/node_modules/es5-ext/test/math/fround/implement.js b/node_modules/es5-ext/test/math/fround/implement.js new file mode 100644 index 0000000..c7b9ad4 --- /dev/null +++ b/node_modules/es5-ext/test/math/fround/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/fround/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/fround/index.js b/node_modules/es5-ext/test/math/fround/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/fround/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/fround/is-implemented.js b/node_modules/es5-ext/test/math/fround/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/fround/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/fround/shim.js b/node_modules/es5-ext/test/math/fround/shim.js new file mode 100644 index 0000000..0525bfa --- /dev/null +++ b/node_modules/es5-ext/test/math/fround/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(1.337), 1.3370000123977661, "1"); +}; diff --git a/node_modules/es5-ext/test/math/hypot/implement.js b/node_modules/es5-ext/test/math/hypot/implement.js new file mode 100644 index 0000000..29c87fe --- /dev/null +++ b/node_modules/es5-ext/test/math/hypot/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/hypot/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/hypot/index.js b/node_modules/es5-ext/test/math/hypot/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/hypot/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/hypot/is-implemented.js b/node_modules/es5-ext/test/math/hypot/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/hypot/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/hypot/shim.js b/node_modules/es5-ext/test/math/hypot/shim.js new file mode 100644 index 0000000..89e4657 --- /dev/null +++ b/node_modules/es5-ext/test/math/hypot/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), 0, "No arguments"); + a(t(0, -0, 0), 0, "Zeros"); + a(t(4, NaN, Infinity), Infinity, "Infinity"); + a(t(4, NaN, -Infinity), Infinity, "Infinity"); + a(t(4, NaN, 34), NaN, "NaN"); + a(t(3, 4), 5, "#1"); + a(t(3, 4, 5), 7.0710678118654755, "#2"); +}; diff --git a/node_modules/es5-ext/test/math/imul/implement.js b/node_modules/es5-ext/test/math/imul/implement.js new file mode 100644 index 0000000..b633a72 --- /dev/null +++ b/node_modules/es5-ext/test/math/imul/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/imul/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/imul/index.js b/node_modules/es5-ext/test/math/imul/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/imul/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/imul/is-implemented.js b/node_modules/es5-ext/test/math/imul/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/imul/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/imul/shim.js b/node_modules/es5-ext/test/math/imul/shim.js new file mode 100644 index 0000000..a8d4e90 --- /dev/null +++ b/node_modules/es5-ext/test/math/imul/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), 0, "No arguments"); + a(t(0, 0), 0, "Zeros"); + a(t(2, 4), 8, "#1"); + a(t(-1, 8), -8, "#2"); + a(t(0xfffffffe, 5), -10, "#3"); +}; diff --git a/node_modules/es5-ext/test/math/log10/implement.js b/node_modules/es5-ext/test/math/log10/implement.js new file mode 100644 index 0000000..afc9dab --- /dev/null +++ b/node_modules/es5-ext/test/math/log10/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/log10/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/log10/index.js b/node_modules/es5-ext/test/math/log10/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/log10/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/log10/is-implemented.js b/node_modules/es5-ext/test/math/log10/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/log10/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/log10/shim.js b/node_modules/es5-ext/test/math/log10/shim.js new file mode 100644 index 0000000..d069628 --- /dev/null +++ b/node_modules/es5-ext/test/math/log10/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-0.5), NaN, "Less than 0"); + a(t(0), -Infinity, "0"); + a(t(1), 0, "1"); + a(t(Infinity), Infinity, "Infinity"); + a(t(2), 0.3010299956639812, "Other"); +}; diff --git a/node_modules/es5-ext/test/math/log1p/implement.js b/node_modules/es5-ext/test/math/log1p/implement.js new file mode 100644 index 0000000..baa2ab1 --- /dev/null +++ b/node_modules/es5-ext/test/math/log1p/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/log1p/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/log1p/index.js b/node_modules/es5-ext/test/math/log1p/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/log1p/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/log1p/is-implemented.js b/node_modules/es5-ext/test/math/log1p/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/log1p/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/log1p/shim.js b/node_modules/es5-ext/test/math/log1p/shim.js new file mode 100644 index 0000000..66b400c --- /dev/null +++ b/node_modules/es5-ext/test/math/log1p/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-1.5), NaN, "Less than -1"); + a(t(-1), -Infinity, "-1"); + a(t(0), 0, "0"); + a(t(Infinity), Infinity, "Infinity"); + a(t(1), 0.6931471805599453, "Other"); +}; diff --git a/node_modules/es5-ext/test/math/log2/implement.js b/node_modules/es5-ext/test/math/log2/implement.js new file mode 100644 index 0000000..43bdf43 --- /dev/null +++ b/node_modules/es5-ext/test/math/log2/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/log2/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/log2/index.js b/node_modules/es5-ext/test/math/log2/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/log2/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/log2/is-implemented.js b/node_modules/es5-ext/test/math/log2/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/log2/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/log2/shim.js b/node_modules/es5-ext/test/math/log2/shim.js new file mode 100644 index 0000000..f587e33 --- /dev/null +++ b/node_modules/es5-ext/test/math/log2/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-0.5), NaN, "Less than 0"); + a(t(0), -Infinity, "0"); + a(t(1), 0, "1"); + a(t(Infinity), Infinity, "Infinity"); + a(t(3).toFixed(15), "1.584962500721156", "Other"); +}; diff --git a/node_modules/es5-ext/test/math/sign/implement.js b/node_modules/es5-ext/test/math/sign/implement.js new file mode 100644 index 0000000..409beb1 --- /dev/null +++ b/node_modules/es5-ext/test/math/sign/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/sign/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/sign/index.js b/node_modules/es5-ext/test/math/sign/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/sign/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/sign/is-implemented.js b/node_modules/es5-ext/test/math/sign/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/sign/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/sign/shim.js b/node_modules/es5-ext/test/math/sign/shim.js new file mode 100644 index 0000000..071ea07 --- /dev/null +++ b/node_modules/es5-ext/test/math/sign/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +var is = require("../../../object/is"); + +module.exports = function (t, a) { + a(is(t(0), +0), true, "+0"); + a(is(t(-0), -0), true, "-0"); + a(t({}), NaN, true, "NaN"); + a(t(-234234234), -1, "Negative"); + a(t(234234234), 1, "Positive"); +}; diff --git a/node_modules/es5-ext/test/math/sinh/implement.js b/node_modules/es5-ext/test/math/sinh/implement.js new file mode 100644 index 0000000..ca4b5e7 --- /dev/null +++ b/node_modules/es5-ext/test/math/sinh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/sinh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/sinh/index.js b/node_modules/es5-ext/test/math/sinh/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/sinh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/sinh/is-implemented.js b/node_modules/es5-ext/test/math/sinh/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/sinh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/sinh/shim.js b/node_modules/es5-ext/test/math/sinh/shim.js new file mode 100644 index 0000000..f168a7f --- /dev/null +++ b/node_modules/es5-ext/test/math/sinh/shim.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(1), 1.1752011936438014, "1"); + a(t(Number.MAX_VALUE), Infinity); + a(t(-Number.MAX_VALUE), -Infinity); + a(t(Number.MIN_VALUE), 5e-324); + a(t(-Number.MIN_VALUE), -5e-324); +}; diff --git a/node_modules/es5-ext/test/math/tanh/implement.js b/node_modules/es5-ext/test/math/tanh/implement.js new file mode 100644 index 0000000..8503711 --- /dev/null +++ b/node_modules/es5-ext/test/math/tanh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/tanh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/tanh/index.js b/node_modules/es5-ext/test/math/tanh/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/tanh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/tanh/is-implemented.js b/node_modules/es5-ext/test/math/tanh/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/tanh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/tanh/shim.js b/node_modules/es5-ext/test/math/tanh/shim.js new file mode 100644 index 0000000..5da3c08 --- /dev/null +++ b/node_modules/es5-ext/test/math/tanh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), 1, "Infinity"); + a(t(-Infinity), -1, "-Infinity"); + a(t(1), 0.7615941559557649, "1"); + a(t(Number.MAX_VALUE), 1); + a(t(-Number.MAX_VALUE), -1); +}; diff --git a/node_modules/es5-ext/test/math/trunc/implement.js b/node_modules/es5-ext/test/math/trunc/implement.js new file mode 100644 index 0000000..0d3374f --- /dev/null +++ b/node_modules/es5-ext/test/math/trunc/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/trunc/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/trunc/index.js b/node_modules/es5-ext/test/math/trunc/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/math/trunc/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/trunc/is-implemented.js b/node_modules/es5-ext/test/math/trunc/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/math/trunc/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/trunc/shim.js b/node_modules/es5-ext/test/math/trunc/shim.js new file mode 100644 index 0000000..b80e868 --- /dev/null +++ b/node_modules/es5-ext/test/math/trunc/shim.js @@ -0,0 +1,16 @@ +"use strict"; + +var is = require("../../../object/is"); + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(is(t(0.234), 0), true, "0"); + a(is(t(-0.234), -0), true, "-0"); + a(t(13.7), 13, "Positive #1"); + a(t(12.3), 12, "Positive #2"); + a(t(-12.3), -12, "Negative #1"); + a(t(-14.7), -14, "Negative #2"); +}; diff --git a/node_modules/es5-ext/test/number/#/pad.js b/node_modules/es5-ext/test/number/#/pad.js new file mode 100644 index 0000000..cc8aa5e --- /dev/null +++ b/node_modules/es5-ext/test/number/#/pad.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(78, 4), "0078"); + a(t.call(65.12323, 4, 3), "0065.123", "Precision"); + a(t.call(65, 4, 3), "0065.000", "Precision integer"); +}; diff --git a/node_modules/es5-ext/test/number/epsilon/implement.js b/node_modules/es5-ext/test/number/epsilon/implement.js new file mode 100644 index 0000000..d387b7c --- /dev/null +++ b/node_modules/es5-ext/test/number/epsilon/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/epsilon/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/epsilon/index.js b/node_modules/es5-ext/test/number/epsilon/index.js new file mode 100644 index 0000000..d20e5c3 --- /dev/null +++ b/node_modules/es5-ext/test/number/epsilon/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "number"); +}; diff --git a/node_modules/es5-ext/test/number/epsilon/is-implemented.js b/node_modules/es5-ext/test/number/epsilon/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/number/epsilon/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-finite/implement.js b/node_modules/es5-ext/test/number/is-finite/implement.js new file mode 100644 index 0000000..5300de6 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-finite/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/is-finite/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/is-finite/index.js b/node_modules/es5-ext/test/number/is-finite/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-finite/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/number/is-finite/is-implemented.js b/node_modules/es5-ext/test/number/is-finite/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/number/is-finite/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-finite/shim.js b/node_modules/es5-ext/test/number/is-finite/shim.js new file mode 100644 index 0000000..8fa004f --- /dev/null +++ b/node_modules/es5-ext/test/number/is-finite/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t("23"), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/number/is-integer/implement.js b/node_modules/es5-ext/test/number/is-integer/implement.js new file mode 100644 index 0000000..2290b25 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-integer/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/is-integer/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/is-integer/index.js b/node_modules/es5-ext/test/number/is-integer/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/number/is-integer/is-implemented.js b/node_modules/es5-ext/test/number/is-integer/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/number/is-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-integer/shim.js b/node_modules/es5-ext/test/number/is-integer/shim.js new file mode 100644 index 0000000..e367990 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-integer/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t(2.34), false, "Float"); + a(t("23"), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/number/is-nan/implement.js b/node_modules/es5-ext/test/number/is-nan/implement.js new file mode 100644 index 0000000..10fa084 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-nan/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/is-nan/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/is-nan/index.js b/node_modules/es5-ext/test/number/is-nan/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-nan/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/number/is-nan/is-implemented.js b/node_modules/es5-ext/test/number/is-nan/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/number/is-nan/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-nan/shim.js b/node_modules/es5-ext/test/number/is-nan/shim.js new file mode 100644 index 0000000..3181047 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-nan/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), false, "Number"); + a(t({}), false, "Not numeric"); + a(t(NaN), true, "NaN"); +}; diff --git a/node_modules/es5-ext/test/number/is-natural.js b/node_modules/es5-ext/test/number/is-natural.js new file mode 100644 index 0000000..8fe4dcc --- /dev/null +++ b/node_modules/es5-ext/test/number/is-natural.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t(-2), false, "Negative"); + a(t(2.34), false, "Float"); + a(t("23"), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/number/is-number.js b/node_modules/es5-ext/test/number/is-number.js new file mode 100644 index 0000000..9cd670c --- /dev/null +++ b/node_modules/es5-ext/test/number/is-number.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(0), true, "Zero"); + a(t(NaN), true, "NaN"); + a(t(Infinity), true, "Infinity"); + a(t(12), true, "Number"); + a(t(false), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new Number(2)), true, "Number object"); + a(t("asdfaf"), false, "String"); + a(t(""), false, "Empty String"); +}; diff --git a/node_modules/es5-ext/test/number/is-safe-integer/implement.js b/node_modules/es5-ext/test/number/is-safe-integer/implement.js new file mode 100644 index 0000000..96f634b --- /dev/null +++ b/node_modules/es5-ext/test/number/is-safe-integer/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/is-safe-integer/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/is-safe-integer/index.js b/node_modules/es5-ext/test/number/is-safe-integer/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js b/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-safe-integer/shim.js b/node_modules/es5-ext/test/number/is-safe-integer/shim.js new file mode 100644 index 0000000..a4ea691 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-safe-integer/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t(2.34), false, "Float"); + a(t(Math.pow(2, 53)), false, "Too large"); + a(t(Math.pow(2, 53) - 1), true, "Maximum"); + a(t("23"), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/number/max-safe-integer/implement.js b/node_modules/es5-ext/test/number/max-safe-integer/implement.js new file mode 100644 index 0000000..1928f34 --- /dev/null +++ b/node_modules/es5-ext/test/number/max-safe-integer/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/max-safe-integer/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/max-safe-integer/index.js b/node_modules/es5-ext/test/number/max-safe-integer/index.js new file mode 100644 index 0000000..d20e5c3 --- /dev/null +++ b/node_modules/es5-ext/test/number/max-safe-integer/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "number"); +}; diff --git a/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js b/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/min-safe-integer/implement.js b/node_modules/es5-ext/test/number/min-safe-integer/implement.js new file mode 100644 index 0000000..f8b309a --- /dev/null +++ b/node_modules/es5-ext/test/number/min-safe-integer/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/min-safe-integer/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/min-safe-integer/index.js b/node_modules/es5-ext/test/number/min-safe-integer/index.js new file mode 100644 index 0000000..d20e5c3 --- /dev/null +++ b/node_modules/es5-ext/test/number/min-safe-integer/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "number"); +}; diff --git a/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js b/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/to-integer.js b/node_modules/es5-ext/test/number/to-integer.js new file mode 100644 index 0000000..b7b975f --- /dev/null +++ b/node_modules/es5-ext/test/number/to-integer.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), 0, "NaN"); + a(t(20), 20, "Positive integer"); + a(t("-20"), -20, "String negative integer"); + a(t(Infinity), Infinity, "Infinity"); + a(t(15.343), 15, "Float"); + a(t(-15.343), -15, "Negative float"); +}; diff --git a/node_modules/es5-ext/test/number/to-pos-integer.js b/node_modules/es5-ext/test/number/to-pos-integer.js new file mode 100644 index 0000000..27c7cdf --- /dev/null +++ b/node_modules/es5-ext/test/number/to-pos-integer.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), 0, "NaN"); + a(t(20), 20, "Positive integer"); + a(t(-20), 0, "Negative integer"); + a(t(Infinity), Infinity, "Infinity"); + a(t(15.343), 15, "Float"); + a(t(-15.343), 0, "Negative float"); +}; diff --git a/node_modules/es5-ext/test/number/to-uint32.js b/node_modules/es5-ext/test/number/to-uint32.js new file mode 100644 index 0000000..7eea42f --- /dev/null +++ b/node_modules/es5-ext/test/number/to-uint32.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), 0, "Not numeric"); + a(t(-4), 4294967292, "Negative"); + a(t(133432), 133432, "Positive"); + a(t(8589934592), 0, "Greater than maximum"); +}; diff --git a/node_modules/es5-ext/test/object/_iterate.js b/node_modules/es5-ext/test/object/_iterate.js new file mode 100644 index 0000000..d7728f4 --- /dev/null +++ b/node_modules/es5-ext/test/object/_iterate.js @@ -0,0 +1,30 @@ +"use strict"; + +module.exports = function (t, a) { + var o = { raz: 1, dwa: 2, trzy: 3 } + , o2 = {}, o3 = {}, arr, i = -1; + + t = t("forEach"); + t(o, function (value, name, self, index) { + o2[name] = value; + a(index, ++i, "Index"); + a(self, o, "Self"); + a(this, o3, "Scope"); + }, o3); + a.deep(o2, o); + + arr = []; + o2 = {}; + i = -1; + t(o, function (value, name, self, index) { + arr.push(value); + o2[name] = value; + a(index, ++i, "Index"); + a(self, o, "Self"); + a(this, o3, "Scope"); + }, o3, function (a, b) { + return o[b] - o[a]; + }); + a.deep(o2, o, "Sort by Values: Content"); + a.deep(arr, [3, 2, 1], "Sort by Values: Order"); +}; diff --git a/node_modules/es5-ext/test/object/assign-deep.js b/node_modules/es5-ext/test/object/assign-deep.js new file mode 100644 index 0000000..071eeb7 --- /dev/null +++ b/node_modules/es5-ext/test/object/assign-deep.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + var o1 = { a: 1, b: 2 }, o2 = { b: 3, c: 4 }; + + a(t(o1, o2), o1, "Returns self"); + a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content"); + + a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument"); + + var obj1 = { foo: { bar: 3, marko: true } } + , obj2 = { foo: { elo: 12, marko: false }, miszka: [23] }; + a.deep(t({}, obj1, obj2), { foo: { bar: 3, marko: false, elo: 12 }, miszka: [23] }); + a(t(true), true); +}; diff --git a/node_modules/es5-ext/test/object/assign/implement.js b/node_modules/es5-ext/test/object/assign/implement.js new file mode 100644 index 0000000..c3e0396 --- /dev/null +++ b/node_modules/es5-ext/test/object/assign/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../object/assign/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/object/assign/index.js b/node_modules/es5-ext/test/object/assign/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/object/assign/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/object/assign/is-implemented.js b/node_modules/es5-ext/test/object/assign/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/object/assign/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/object/assign/shim.js b/node_modules/es5-ext/test/object/assign/shim.js new file mode 100644 index 0000000..3607490 --- /dev/null +++ b/node_modules/es5-ext/test/object/assign/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + var o1 = { a: 1, b: 2 } + , o2 = { b: 3, c: 4 }; + + a(t(o1, o2), o1, "Returns self"); + a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content"); + + a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument"); +}; diff --git a/node_modules/es5-ext/test/object/clear.js b/node_modules/es5-ext/test/object/clear.js new file mode 100644 index 0000000..5735e79 --- /dev/null +++ b/node_modules/es5-ext/test/object/clear.js @@ -0,0 +1,13 @@ +"use strict"; + +var isEmpty = require("../../object/is-empty"); + +module.exports = function (t, a) { + var x = {}; + a(t(x), x, "Empty: Returns same object"); + a(isEmpty(x), true, "Empty: Not changed"); + x.foo = "raz"; + x.bar = "dwa"; + a(t(x), x, "Same object"); + a(isEmpty(x), true, "Emptied"); +}; diff --git a/node_modules/es5-ext/test/object/compact.js b/node_modules/es5-ext/test/object/compact.js new file mode 100644 index 0000000..353f6f3 --- /dev/null +++ b/node_modules/es5-ext/test/object/compact.js @@ -0,0 +1,20 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}, y = {}, z; + z = t(x); + a.not(z, x, "Returns different object"); + a.deep(z, {}, "Empty on empty"); + + x = { foo: "bar", +a: 0, +b: false, +c: "", +d: "0", +e: null, +bar: y, + elo: undefined }; + z = t(x); + a.deep(z, { foo: "bar", a: 0, b: false, c: "", d: "0", bar: y }, + "Cleared null values"); +}; diff --git a/node_modules/es5-ext/test/object/compare.js b/node_modules/es5-ext/test/object/compare.js new file mode 100644 index 0000000..23cc511 --- /dev/null +++ b/node_modules/es5-ext/test/object/compare.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var d = new Date(); + + a.ok(t(12, 3) > 0, "Numbers"); + a.ok(t(2, 13) < 0, "Numbers #2"); + a.ok(t("aaa", "aa") > 0, "Strings"); + a.ok(t("aa", "ab") < 0, "Strings #2"); + a(t("aa", "aa"), 0, "Strings same"); + a(t(d, new Date(d.getTime())), 0, "Same date"); + a.ok(t(d, new Date(d.getTime() + 1)) < 0, "Different date"); +}; diff --git a/node_modules/es5-ext/test/object/copy-deep.js b/node_modules/es5-ext/test/object/copy-deep.js new file mode 100644 index 0000000..9381383 --- /dev/null +++ b/node_modules/es5-ext/test/object/copy-deep.js @@ -0,0 +1,35 @@ +"use strict"; + +var stringify = JSON.stringify; + +module.exports = function (t, a) { + var o = { 1: "raz", 2: "dwa", 3: "trzy" }, no = t(o); + + a.not(no, o, "Return different object"); + a(stringify(no), stringify(o), "Match properties and values"); + + o = { + foo: "bar", + raz: { + dwa: "dwa", + trzy: { cztery: "pięć", sześć: "siedem" }, + osiem: {}, + dziewięć: function () {} + }, + dziesięć: 10, + jedenaście: ["raz", ["dwa", "trzy", { elo: "true" }]] + }; + o.raz.rec = o; + + no = t(o); + a.not(o.raz, no.raz, "Deep"); + a.not(o.raz.trzy, no.raz.trzy, "Deep #2"); + a(stringify(o.raz.trzy), stringify(no.raz.trzy), "Deep content"); + a(no.raz.rec, no, "Recursive"); + a.not(o.raz.osiem, no.raz.osiem, "Empty object"); + a(o.raz["dziewięć"], no.raz["dziewięć"], "Function"); + a.not(o["jedenaście"], no["jedenaście"]); + a.not(o["jedenaście"][1], no["jedenaście"][1]); + a.not(o["jedenaście"][1][2], no["jedenaście"][1][2]); + a(t(true), true); +}; diff --git a/node_modules/es5-ext/test/object/copy.js b/node_modules/es5-ext/test/object/copy.js new file mode 100644 index 0000000..a5e2c34 --- /dev/null +++ b/node_modules/es5-ext/test/object/copy.js @@ -0,0 +1,30 @@ +"use strict"; + +var stringify = JSON.stringify; + +module.exports = function (t, a) { + var o = { 1: "raz", 2: "dwa", 3: "trzy" }, no = t(o); + + a.not(no, o, "Return different object"); + a(stringify(no), stringify(o), "Match properties and values"); + + o = { + foo: "bar", + raz: { + dwa: "dwa", + trzy: { cztery: "pięć", sześć: "siedem" }, + osiem: {}, + dziewięć: function () {} + }, + dziesięć: 10 + }; + o.raz.rec = o; + + no = t(o); + a(o.raz, no.raz, "Shallow"); + + a.deep(t(o, ["foo"]), { foo: "bar" }); + a.deep(t(Object.create(o), ["foo"]), { foo: "bar" }); + a.deep(t(o, ["foo", "habla"]), { foo: "bar" }); + a.deep(t(o, ["foo", "habla"], { ensure: true }), { foo: "bar", habla: undefined }); +}; diff --git a/node_modules/es5-ext/test/object/count.js b/node_modules/es5-ext/test/object/count.js new file mode 100644 index 0000000..ec1c504 --- /dev/null +++ b/node_modules/es5-ext/test/object/count.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), 0, "Empty"); + a(t({ raz: 1, dwa: null, trzy: undefined, cztery: 0 }), 4, + "Some properties"); + a(t(Object.defineProperties({}, { + raz: { value: "raz" }, + dwa: { value: "dwa", enumerable: true } + })), 1, "Some properties hidden"); +}; diff --git a/node_modules/es5-ext/test/object/create.js b/node_modules/es5-ext/test/object/create.js new file mode 100644 index 0000000..c9f3029 --- /dev/null +++ b/node_modules/es5-ext/test/object/create.js @@ -0,0 +1,22 @@ +"use strict"; + +var setPrototypeOf = require("../../object/set-prototype-of") + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, obj; + + a(getPrototypeOf(t(x)), x, "Normal object"); + a(getPrototypeOf(t(null)), + (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null"); + + a.h1("Properties"); + a.h2("Normal object"); + a(getPrototypeOf(obj = t(x, { foo: { value: "bar" } })), x, "Prototype"); + a(obj.foo, "bar", "Property"); + a.h2("Null"); + a(getPrototypeOf(obj = t(null, { foo: { value: "bar2" } })), + (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype"); + a(obj.foo, "bar2", "Property"); +}; diff --git a/node_modules/es5-ext/test/object/ensure-array.js b/node_modules/es5-ext/test/object/ensure-array.js new file mode 100644 index 0000000..fd3c32c --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-array.js @@ -0,0 +1,55 @@ +"use strict"; + +module.exports = function (t, a) { + var arr = []; + a(t(arr), arr, "Array"); + a(t(""), "", "String"); + var args = (function () { + return arguments; + }()); + a(t(args), args, "Arguments"); + var arrayLike = { length: 0 }; + a(t(arrayLike), arrayLike, "Array like"); + a.throws( + function () { + t(function () {}); + }, + TypeError, + "Function" + ); + a.throws( + function () { + t({}); + }, + TypeError, + "Plain object" + ); + a.throws( + function () { + t(/raz/); + }, + TypeError, + "Regexp" + ); + a.throws( + function () { + t(); + }, + TypeError, + "No argument" + ); + a.throws( + function () { + t(null); + }, + TypeError, + "Null" + ); + a.throws( + function () { + t(undefined); + }, + TypeError, + "Undefined" + ); +}; diff --git a/node_modules/es5-ext/test/object/ensure-finite-number.js b/node_modules/es5-ext/test/object/ensure-finite-number.js new file mode 100644 index 0000000..f1e6166 --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-finite-number.js @@ -0,0 +1,54 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws( + function () { + t(undefined); + }, + TypeError, + "Undefined" + ); + a.throws( + function () { + t(null); + }, + TypeError, + "Null" + ); + a(t(0), 0, "Zero"); + a.throws( + function () { + t(NaN); + }, + TypeError, + "NaN" + ); + a.throws( + function () { + t(Infinity); + }, + TypeError, + "Infinity" + ); + a(t(12), 12, "Number"); + a(t(false), 0, "Boolean"); + a(t(new Date(1000000)), 1000000, "Date"); + a(t(new Number(2)), 2, "Number object"); + a.throws( + function () { + t("asdfaf"); + }, + TypeError, + "String" + ); + a(t(""), 0, "Empty String"); + if (typeof Symbol === "function") { + a.throws( + function () { + t(Symbol("test")); + }, + TypeError, + "Symbol" + ); + } +}; diff --git a/node_modules/es5-ext/test/object/ensure-natural-number-value.js b/node_modules/es5-ext/test/object/ensure-natural-number-value.js new file mode 100644 index 0000000..9aaae37 --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-natural-number-value.js @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws(function () { + t(undefined); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "Null"); + a(t(2), 2, "Number"); + a.throws(function () { + t(-2); +}, TypeError, "Negative"); + a.throws(function () { + t(2.34); +}, TypeError, "Float"); + a(t("23"), 23, "Numeric string"); + a.throws(function () { + t(NaN); +}, TypeError, "NaN"); + a.throws(function () { + t(Infinity); +}, TypeError, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/ensure-natural-number.js b/node_modules/es5-ext/test/object/ensure-natural-number.js new file mode 100644 index 0000000..ff0e836 --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-natural-number.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws(function () { + t(undefined); +}, TypeError, "Undefined"); + a(t(null), 0, "Null"); + a(t(2), 2, "Number"); + a.throws(function () { + t(-2); +}, TypeError, "Negative"); + a.throws(function () { + t(2.34); +}, TypeError, "Float"); + a(t("23"), 23, "Numeric string"); + a.throws(function () { + t(NaN); +}, TypeError, "NaN"); + a.throws(function () { + t(Infinity); +}, TypeError, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/ensure-promise.js b/node_modules/es5-ext/test/object/ensure-promise.js new file mode 100644 index 0000000..1af15ba --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-promise.js @@ -0,0 +1,32 @@ +"use strict"; + +module.exports = function (t, a) { + var promise; + a.throws(function () { + t(); +}, TypeError); + a.throws(function () { + t(null); +}, TypeError); + a.throws(function () { + t("promise"); +}, TypeError); + a.throws(function () { + t({}); +}, TypeError); + a.throws(function () { + t(function () {}); +}, TypeError); + a.throws(function () { + t({ then: {} }); +}, TypeError); + promise = { then: function () {} }; + a(t(promise), promise); + promise = function () {}; + promise.then = {}; + a.throws(function () { + t(promise); +}, TypeError); + promise.then = function () {}; + a(t(promise), promise); +}; diff --git a/node_modules/es5-ext/test/object/eq.js b/node_modules/es5-ext/test/object/eq.js new file mode 100644 index 0000000..8cad90a --- /dev/null +++ b/node_modules/es5-ext/test/object/eq.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var o = {}; + a(t(o, {}), false, "Different objects"); + a(t(o, o), true, "Same objects"); + a(t("1", "1"), true, "Same primitive"); + a(t("1", 1), false, "Different primitive types"); + a(t(NaN, NaN), true, "NaN"); + a(t(0, 0), true, "0,0"); + a(t(0, -0), true, "0,-0"); +}; diff --git a/node_modules/es5-ext/test/object/every.js b/node_modules/es5-ext/test/object/every.js new file mode 100644 index 0000000..7e837d2 --- /dev/null +++ b/node_modules/es5-ext/test/object/every.js @@ -0,0 +1,21 @@ +"use strict"; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}; + t(o, function (value, name) { + o2[name] = value; + return true; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + return true; + }), true, "Succeeds"); + + a(t(o, function () { + return false; + }), false, "Fails"); + +}; diff --git a/node_modules/es5-ext/test/object/filter.js b/node_modules/es5-ext/test/object/filter.js new file mode 100644 index 0000000..c714d23 --- /dev/null +++ b/node_modules/es5-ext/test/object/filter.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ 1: 1, 2: 2, 3: 3, 4: 4 }, + function (value) { + return Boolean(value % 2); +}), { 1: 1, 3: 3 }); +}; diff --git a/node_modules/es5-ext/test/object/find-key.js b/node_modules/es5-ext/test/object/find-key.js new file mode 100644 index 0000000..d4a578f --- /dev/null +++ b/node_modules/es5-ext/test/object/find-key.js @@ -0,0 +1,23 @@ +"use strict"; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}, i = 0; + t(o, function (value, name) { + o2[name] = value; + return false; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + ++i; + return true; + }), "1", "Finds"); + a(i, 1, "Stops iteration after condition is met"); + + a(t(o, function () { + return false; + }), undefined, "Fails"); + +}; diff --git a/node_modules/es5-ext/test/object/find.js b/node_modules/es5-ext/test/object/find.js new file mode 100644 index 0000000..eea5124 --- /dev/null +++ b/node_modules/es5-ext/test/object/find.js @@ -0,0 +1,23 @@ +"use strict"; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}, i = 0; + t(o, function (value, name) { + o2[name] = value; + return false; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + ++i; + return true; + }), 1, "Finds"); + a(i, 1, "Stops iteration after condition is met"); + + a(t(o, function () { + return false; + }), undefined, "Fails"); + +}; diff --git a/node_modules/es5-ext/test/object/first-key.js b/node_modules/es5-ext/test/object/first-key.js new file mode 100644 index 0000000..6010ba1 --- /dev/null +++ b/node_modules/es5-ext/test/object/first-key.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}, y = Object.create(null); + a(t(x), null, "Normal: Empty"); + a(t(y), null, "Null extension: Empty"); + x.foo = "raz"; + x.bar = 343; + a(["foo", "bar"].indexOf(t(x)) !== -1, true, "Normal"); + y.elo = "foo"; + y.mar = "wew"; + a(["elo", "mar"].indexOf(t(y)) !== -1, true, "Null extension"); +}; diff --git a/node_modules/es5-ext/test/object/flatten.js b/node_modules/es5-ext/test/object/flatten.js new file mode 100644 index 0000000..277a97c --- /dev/null +++ b/node_modules/es5-ext/test/object/flatten.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ a: { aa: 1, ab: 2 }, b: { ba: 3, bb: 4 } }), + { aa: 1, ab: 2, ba: 3, bb: 4 }); +}; diff --git a/node_modules/es5-ext/test/object/for-each.js b/node_modules/es5-ext/test/object/for-each.js new file mode 100644 index 0000000..97c6399 --- /dev/null +++ b/node_modules/es5-ext/test/object/for-each.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var o = { raz: 1, dwa: 2, trzy: 3 } + , o2 = {}; + a(t(o, function (value, name) { + o2[name] = value; + }), undefined, "Return"); + a.deep(o2, o); +}; diff --git a/node_modules/es5-ext/test/object/get-property-names.js b/node_modules/es5-ext/test/object/get-property-names.js new file mode 100644 index 0000000..a1d6377 --- /dev/null +++ b/node_modules/es5-ext/test/object/get-property-names.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + var o = { first: 1, second: 4 }, r1, r2; + o = Object.create(o, { + third: { value: null } + }); + o.first = 2; + o = Object.create(o); + o.fourth = 3; + + r1 = t(o); + r1.sort(); + r2 = ["first", "second", "third", "fourth"] + .concat(Object.getOwnPropertyNames(Object.prototype)); + r2.sort(); + a.deep(r1, r2); +}; diff --git a/node_modules/es5-ext/test/object/is-array-like.js b/node_modules/es5-ext/test/object/is-array-like.js new file mode 100644 index 0000000..50f5ce5 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-array-like.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + a(t([]), true, "Array"); + a(t(""), true, "String"); + a( + t( + (function () { + return arguments; + })() + ), + true, + "Arguments" + ); + a(t({ length: 0 }), true, "List object"); + a(t(function () {}), false, "Function"); + a(t({}), false, "Plain object"); + a(t(/raz/), false, "Regexp"); + a(t(), false, "No argument"); + a(t(null), false, "Null"); + a(t(undefined), false, "Undefined"); +}; diff --git a/node_modules/es5-ext/test/object/is-callable.js b/node_modules/es5-ext/test/object/is-callable.js new file mode 100644 index 0000000..415023e --- /dev/null +++ b/node_modules/es5-ext/test/object/is-callable.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(function () {}), true, "Function"); + a(t({}), false, "Object"); + a(t(), false, "Undefined"); + a(t(null), false, "Null"); +}; diff --git a/node_modules/es5-ext/test/object/is-copy-deep.js b/node_modules/es5-ext/test/object/is-copy-deep.js new file mode 100644 index 0000000..9c8ad92 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-copy-deep.js @@ -0,0 +1,46 @@ +"use strict"; + +module.exports = function (t, a) { + var x, y; + + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false, + "Different property value"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false, + "Property only in source"); + a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false, + "Property only in target"); + + a(t("raz", "dwa"), false, "String: diff"); + a(t("raz", "raz"), true, "String: same"); + a(t("32", 32), false, "String & Number"); + + a(t([1, "raz", true], [1, "raz", true]), true, "Array: same"); + a(t([1, "raz", undefined], [1, "raz"]), false, "Array: diff"); + a(t(["foo"], ["one"]), false, "Array: One value comparision"); + + x = { foo: { bar: { mar: {} } } }; + y = { foo: { bar: { mar: {} } } }; + a(t(x, y), true, "Deep"); + + a(t({ foo: { bar: { mar: "foo" } } }, { foo: { bar: { mar: {} } } }), + false, "Deep: false"); + + x = { foo: { bar: { mar: {} } } }; + x.rec = { foo: x }; + + y = { foo: { bar: { mar: {} } } }; + y.rec = { foo: x }; + + a(t(x, y), true, "Object: Infinite Recursion: Same #1"); + + x.rec.foo = y; + a(t(x, y), true, "Object: Infinite Recursion: Same #2"); + + x.rec.foo = x; + y.rec.foo = y; + a(t(x, y), true, "Object: Infinite Recursion: Same #3"); + + y.foo.bar.mar = "raz"; + a(t(x, y), false, "Object: Infinite Recursion: Diff"); +}; diff --git a/node_modules/es5-ext/test/object/is-copy.js b/node_modules/es5-ext/test/object/is-copy.js new file mode 100644 index 0000000..6052bb0 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-copy.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false, + "Different property value"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false, + "Property only in source"); + a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false, + "Property only in target"); + + a(t("raz", "dwa"), false, "String: diff"); + a(t("raz", "raz"), true, "String: same"); + a(t("32", 32), false, "String & Number"); + + a(t([1, "raz", true], [1, "raz", true]), true, "Array: same"); + a(t([1, "raz", undefined], [1, "raz"]), false, "Array: diff"); +}; diff --git a/node_modules/es5-ext/test/object/is-empty.js b/node_modules/es5-ext/test/object/is-empty.js new file mode 100644 index 0000000..067b162 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-empty.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), true, "Empty"); + a(t({ 1: 1 }), false, "Not empty"); +}; diff --git a/node_modules/es5-ext/test/object/is-finite-number.js b/node_modules/es5-ext/test/object/is-finite-number.js new file mode 100644 index 0000000..6475fb6 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-finite-number.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(0), true, "Zero"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); + a(t(12), true, "Number"); + a(t(false), true, "Boolean"); + a(t(new Date()), true, "Date"); + a(t(new Number(2)), true, "Number object"); + a(t("asdfaf"), false, "String"); + a(t(""), true, "Empty String"); + if (typeof Symbol === "function") { + a(t(Symbol("test")), false, "Symbol"); + } +}; diff --git a/node_modules/es5-ext/test/object/is-natural-number-value.js b/node_modules/es5-ext/test/object/is-natural-number-value.js new file mode 100644 index 0000000..2bc2b1c --- /dev/null +++ b/node_modules/es5-ext/test/object/is-natural-number-value.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(2), true, "Number"); + a(t(-2), false, "Negative"); + a(t(2.34), false, "Float"); + a(t("23"), true, "Numeric string"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/is-natural-number.js b/node_modules/es5-ext/test/object/is-natural-number.js new file mode 100644 index 0000000..bb110e6 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-natural-number.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), true, "Null"); + a(t(2), true, "Number"); + a(t(-2), false, "Negative"); + a(t(2.34), false, "Float"); + a(t("23"), true, "Numeric string"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/is-number-value.js b/node_modules/es5-ext/test/object/is-number-value.js new file mode 100644 index 0000000..2c09d25 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-number-value.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(0), true, "Zero"); + a(t(NaN), false, "NaN"); + a(t(Infinity), true, "Infinity"); + a(t(12), true, "Number"); + a(t(false), true, "Boolean"); + a(t(new Date()), true, "Date"); + a(t(new Number(2)), true, "Number object"); + a(t("asdfaf"), false, "String"); + a(t(""), true, "Empty String"); + if (typeof Symbol === "function") { + a(t(Symbol("test")), false, "Symbol"); + } +}; diff --git a/node_modules/es5-ext/test/object/is-object.js b/node_modules/es5-ext/test/object/is-object.js new file mode 100644 index 0000000..0b83599 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-object.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(null), false, "Null"); + a(t(new Date()), true, "Date"); + a(t(new String("raz")), true, "String object"); + a(t({}), true, "Plain object"); + a(t(/a/), true, "Regular expression"); + a(t(function () {}), true, "Function"); +}; diff --git a/node_modules/es5-ext/test/object/is-plain-function.js b/node_modules/es5-ext/test/object/is-plain-function.js new file mode 100644 index 0000000..9c1f5ed --- /dev/null +++ b/node_modules/es5-ext/test/object/is-plain-function.js @@ -0,0 +1,42 @@ +"use strict"; + +var setPrototypeOf = require("../../object/set-prototype-of"); + +module.exports = function (t, a) { + a(t(function () {}), true, "Function"); + a(t({}), false, "Object"); + a(t(), false, "Undefined"); + a(t(null), false, "Null"); + if (setPrototypeOf) { + a( + t(Object.setPrototypeOf(function () {}, Object.prototype)), + false, + "Function with non-function prototype" + ); + } + var arrowfn; + try { + arrowfn = eval("(() => {})"); + } catch (e) {} + if (arrowfn) { + a(t(arrowfn), true, "Arrow function"); + } + + var classFn; + try { + classFn = eval("(class {})"); + } catch (e) {} + if (classFn) { + a(t(classFn), false, "Class"); + } + + var commentedClassFn; + try { + // Follows issue reported to ljhard/is-callable project: + // https://github.com/ljharb/is-callable/issues/4 + commentedClassFn = eval("(class/*kkk*/\n//blah\n Bar\n//blah\n {})"); + } catch (e) {} + if (commentedClassFn) { + a(t(commentedClassFn, false, "Class"), false, "Class with comments"); + } +}; diff --git a/node_modules/es5-ext/test/object/is-plain-object.js b/node_modules/es5-ext/test/object/is-plain-object.js new file mode 100644 index 0000000..7324438 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-plain-object.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), true, "Empty {} is plain object"); + a(t({ a: true }), true, "{} with property is plain object"); + a(t({ prototype: 1, constructor: 2, __proto__: 3 }), true, + "{} with any property keys is plain object"); + a(t(null), false, "Null is not plain object"); + a(t("string"), false, "Primitive is not plain object"); + a(t(function () {}), false, "Function is not plain object"); + a(t(Object.create({})), false, + "Object whose prototype is not Object.prototype is not plain object"); + a(t(Object.create(Object.prototype)), true, + "Object whose prototype is Object.prototype is plain object"); + a(t(Object.create(null)), true, + "Object whose prototype is null is plain object"); + a(t(Object.prototype), false, "Object.prototype"); +}; diff --git a/node_modules/es5-ext/test/object/is-promise.js b/node_modules/es5-ext/test/object/is-promise.js new file mode 100644 index 0000000..18bf934 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-promise.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var promise; + a(t(), false); + a(t(null), false); + a(t("promise"), false); + a(t({}), false); + a(t(function () {}), false); + a(t({ then: {} }), false); + a(t({ then: function () {} }), true); + promise = function () {}; + promise.then = {}; + a(t(promise), false); + promise.then = function () {}; + a(t(promise), true); +}; diff --git a/node_modules/es5-ext/test/object/is-value.js b/node_modules/es5-ext/test/object/is-value.js new file mode 100644 index 0000000..c97722d --- /dev/null +++ b/node_modules/es5-ext/test/object/is-value.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), false); + a(t(undefined), false); + a(t(null), false); + a(t(NaN), true); + a(t(0), true); + a(t(false), true); + a(t("null"), true); + a(t(""), true); + a(t({}), true); + a(t(Object.prototype), true); +}; diff --git a/node_modules/es5-ext/test/object/is.js b/node_modules/es5-ext/test/object/is.js new file mode 100644 index 0000000..c94ed41 --- /dev/null +++ b/node_modules/es5-ext/test/object/is.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var o = {}; + a(t(o, {}), false, "Different objects"); + a(t(o, o), true, "Same objects"); + a(t("1", "1"), true, "Same primitive"); + a(t("1", 1), false, "Different primitive types"); + a(t(NaN, NaN), true, "NaN"); + a(t(0, 0), true, "0,0"); + a(t(0, -0), false, "0,-0"); +}; diff --git a/node_modules/es5-ext/test/object/key-of.js b/node_modules/es5-ext/test/object/key-of.js new file mode 100644 index 0000000..bf10ca0 --- /dev/null +++ b/node_modules/es5-ext/test/object/key-of.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}, y = {} + , o = { foo: "bar", raz: x, trzy: "cztery", five: "6" }; + + a(t(o, "bar"), "foo", "First property"); + a(t(o, 6), null, "Primitive that's not there"); + a(t(o, x), "raz", "Object"); + a(t(o, y), null, "Object that's not there"); + a(t(o, "6"), "five", "Last property"); +}; diff --git a/node_modules/es5-ext/test/object/keys/implement.js b/node_modules/es5-ext/test/object/keys/implement.js new file mode 100644 index 0000000..d364abe --- /dev/null +++ b/node_modules/es5-ext/test/object/keys/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../object/keys/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/object/keys/index.js b/node_modules/es5-ext/test/object/keys/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/object/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/object/keys/is-implemented.js b/node_modules/es5-ext/test/object/keys/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/object/keys/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/object/keys/shim.js b/node_modules/es5-ext/test/object/keys/shim.js new file mode 100644 index 0000000..47e6547 --- /dev/null +++ b/node_modules/es5-ext/test/object/keys/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ foo: "bar" }), ["foo"], "Object"); + a.deep(t("raz"), ["0", "1", "2"], "Primitive"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "Undefined"); +}; diff --git a/node_modules/es5-ext/test/object/map-keys.js b/node_modules/es5-ext/test/object/map-keys.js new file mode 100644 index 0000000..4598db2 --- /dev/null +++ b/node_modules/es5-ext/test/object/map-keys.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ 1: 1, 2: 2, 3: 3 }, function (key, value) { + return "x" + (key + value); + }), { x11: 1, x22: 2, x33: 3 }); +}; diff --git a/node_modules/es5-ext/test/object/map.js b/node_modules/es5-ext/test/object/map.js new file mode 100644 index 0000000..78c1ed3 --- /dev/null +++ b/node_modules/es5-ext/test/object/map.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + var obj = { 1: 1, 2: 2, 3: 3 }; + a.deep(t(obj, function (value, key, context) { + a(context, obj, "Context argument"); + return (value + 1) + key; + }), { 1: "21", 2: "32", 3: "43" }); +}; diff --git a/node_modules/es5-ext/test/object/mixin-prototypes.js b/node_modules/es5-ext/test/object/mixin-prototypes.js new file mode 100644 index 0000000..8745d97 --- /dev/null +++ b/node_modules/es5-ext/test/object/mixin-prototypes.js @@ -0,0 +1,73 @@ +"use strict"; + +module.exports = function (t, a) { + var o, o1, o2, x, y = {}, z = {}; + o = { inherited: true, visible: 23 }; + o1 = Object.create(o); + o1.visible = z; + o1.nonremovable = "raz"; + Object.defineProperty(o1, "hidden", { value: "hidden" }); + + o2 = Object.defineProperties({}, { nonremovable: { value: y } }); + o2.other = "other"; + + try { + t(o2, o1); +} catch (ignore) {} + + a(o2.visible, z, "Enumerable"); + a(o1.hidden, "hidden", "Not Enumerable"); + a(o2.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); + a(o2.propertyIsEnumerable("hidden"), false, + "Not enumerable is not enumerable"); + + a(o2.inherited, true, "Extend deep"); + + a(o2.nonremovable, y, "Do not overwrite non configurable"); + a(o2.other, "other", "Own kept"); + + x = {}; + t(x, o2); + try { + t(x, o1); +} catch (ignore) {} + + a(x.visible, z, "Enumerable"); + a(x.hidden, "hidden", "Not Enumerable"); + a(x.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); + a(x.propertyIsEnumerable("hidden"), false, + "Not enumerable is not enumerable"); + + a(x.inherited, true, "Extend deep"); + + a(x.nonremovable, y, "Ignored non configurable"); + a(x.other, "other", "Other"); + + x.visible = 3; + a(x.visible, 3, "Writable is writable"); + + x = {}; + t(x, o1); + a.throws(function () { + x.hidden = 3; + }, "Not writable is not writable"); + + x = {}; + t(x, o1); + delete x.visible; + a.ok(!x.hasOwnProperty("visible"), "Configurable is configurable"); + + x = {}; + t(x, o1); + a.throws(function () { + delete x.hidden; + }, "Not configurable is not configurable"); + + x = Object.defineProperty({}, "foo", + { configurable: false, writable: true, enumerable: false, value: "bar" }); + + try { + t(x, { foo: "lorem" }); +} catch (ignore) {} + a(x.foo, "bar", "Writable, not enumerable"); +}; diff --git a/node_modules/es5-ext/test/object/mixin.js b/node_modules/es5-ext/test/object/mixin.js new file mode 100644 index 0000000..d1905c1 --- /dev/null +++ b/node_modules/es5-ext/test/object/mixin.js @@ -0,0 +1,75 @@ +"use strict"; + +module.exports = function (t, a) { + var o, o1, o2, x, y = {}, z = {}; + o = { inherited: true }; + o1 = Object.create(o); + o1.visible = z; + o1.nonremovable = "raz"; + Object.defineProperty(o1, "hidden", { value: "hidden" }); + + o2 = Object.defineProperties({}, { nonremovable: { value: y } }); + o2.other = "other"; + + try { + t(o2, o1); +} catch (ignore) {} + + a(o2.visible, z, "Enumerable"); + a(o1.hidden, "hidden", "Not Enumerable"); + a(o2.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); + a(o2.propertyIsEnumerable("hidden"), false, + "Not enumerable is not enumerable"); + + a(o2.hasOwnProperty("inherited"), false, "Extend only own"); + a(o2.inherited, undefined, "Extend ony own: value"); + + a(o2.nonremovable, y, "Do not overwrite non configurable"); + a(o2.other, "other", "Own kept"); + + x = {}; + t(x, o2); + try { + t(x, o1); +} catch (ignore) {} + + a(x.visible, z, "Enumerable"); + a(x.hidden, "hidden", "Not Enumerable"); + a(x.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); + a(x.propertyIsEnumerable("hidden"), false, + "Not enumerable is not enumerable"); + + a(x.hasOwnProperty("inherited"), false, "Extend only own"); + a(x.inherited, undefined, "Extend ony own: value"); + + a(x.nonremovable, y, "Ignored non configurable"); + a(x.other, "other", "Other"); + + x.visible = 3; + a(x.visible, 3, "Writable is writable"); + + x = {}; + t(x, o1); + a.throws(function () { + x.hidden = 3; + }, "Not writable is not writable"); + + x = {}; + t(x, o1); + delete x.visible; + a.ok(!x.hasOwnProperty("visible"), "Configurable is configurable"); + + x = {}; + t(x, o1); + a.throws(function () { + delete x.hidden; + }, "Not configurable is not configurable"); + + x = Object.defineProperty({}, "foo", + { configurable: false, writable: true, enumerable: false, value: "bar" }); + + try { + t(x, { foo: "lorem" }); +} catch (ignore) {} + a(x.foo, "bar", "Writable, not enumerable"); +}; diff --git a/node_modules/es5-ext/test/object/normalize-options.js b/node_modules/es5-ext/test/object/normalize-options.js new file mode 100644 index 0000000..028864f --- /dev/null +++ b/node_modules/es5-ext/test/object/normalize-options.js @@ -0,0 +1,46 @@ +"use strict"; + +var create = Object.create, defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var x = { foo: "raz", bar: "dwa" }, y; + y = t(x); + a.not(y, x, "Returns copy"); + a.deep(y, x, "Plain"); + + x = { raz: "one", dwa: "two" }; + defineProperty(x, "get", { + configurable: true, + enumerable: true, + get: function () { + return this.dwa; +} + }); + x = create(x); + x.trzy = "three"; + x.cztery = "four"; + x = create(x); + x.dwa = "two!"; + x.trzy = "three!"; + x.piec = "five"; + x.szesc = "six"; + + a.deep(t(x), { raz: "one", +dwa: "two!", +trzy: "three!", +cztery: "four", + piec: "five", +szesc: "six", +get: "two!" }, "Deep object"); + + a.deep(t({ marko: "raz", raz: "foo" }, x, { szesc: "elo", siedem: "bibg" }), + { marko: "raz", +raz: "one", +dwa: "two!", +trzy: "three!", +cztery: "four", + piec: "five", +szesc: "elo", +siedem: "bibg", +get: "two!" }, "Multiple options"); +}; diff --git a/node_modules/es5-ext/test/object/primitive-set.js b/node_modules/es5-ext/test/object/primitive-set.js new file mode 100644 index 0000000..b5083d5 --- /dev/null +++ b/node_modules/es5-ext/test/object/primitive-set.js @@ -0,0 +1,15 @@ +"use strict"; + +var getPropertyNames = require("../../object/get-property-names") + , isPlainObject = require("../../object/is-plain-object"); + +module.exports = function (t, a) { + var x = t(); + a(isPlainObject(x), true, "Plain object"); + a.deep(getPropertyNames(x), [], "No properties"); + x.foo = "bar"; + a.deep(getPropertyNames(x), ["foo"], "Extensible"); + + a.deep(t("raz", "dwa", 3), { raz: true, dwa: true, 3: true }, + "Arguments handling"); +}; diff --git a/node_modules/es5-ext/test/object/safe-traverse.js b/node_modules/es5-ext/test/object/safe-traverse.js new file mode 100644 index 0000000..acf49c0 --- /dev/null +++ b/node_modules/es5-ext/test/object/safe-traverse.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + var obj = { foo: { bar: { lorem: 12 } } }; + a(t(obj), obj, "No props"); + a(t(obj, "foo"), obj.foo, "One"); + a(t(obj, "raz"), undefined, "One: Fail"); + a(t(obj, "foo", "bar"), obj.foo.bar, "Two"); + a(t(obj, "dsd", "raz"), undefined, "Two: Fail #1"); + a(t(obj, "foo", "raz"), undefined, "Two: Fail #2"); + a(t(obj, "foo", "bar", "lorem"), obj.foo.bar.lorem, "Three"); + a(t(obj, "dsd", "raz", "fef"), undefined, "Three: Fail #1"); + a(t(obj, "foo", "raz", "asdf"), undefined, "Three: Fail #2"); + a(t(obj, "foo", "bar", "asd"), undefined, "Three: Fail #3"); +}; diff --git a/node_modules/es5-ext/test/object/serialize.js b/node_modules/es5-ext/test/object/serialize.js new file mode 100644 index 0000000..f0ca800 --- /dev/null +++ b/node_modules/es5-ext/test/object/serialize.js @@ -0,0 +1,45 @@ +"use strict"; + +module.exports = function (t, a) { + var fn = function (raz, dwa) { + return raz + dwa; + }; + a(t(), "undefined", "Undefined"); + a(t(null), "null", "Null"); + a(t(null), "null", "Null"); + a(t("raz"), "\"raz\"", "String"); + a(t("raz\"ddwa\ntrzy"), "\"raz\\\"ddwa\\ntrzy\"", "String with escape"); + a(t(false), "false", "Booelean"); + a(t(fn), String(fn), "Function"); + + a(t(/raz-dwa/g), "/raz-dwa/g", "RegExp"); + a(t(new Date(1234567)), "new Date(1234567)", "Date"); + a(t([]), "[]", "Empty array"); + a( + t([undefined, false, null, "raz\"ddwa\ntrzy", fn, /raz/g, new Date(1234567), ["foo"]]), + "[undefined,false,null,\"raz\\\"ddwa\\ntrzy\"," + + String(fn) + + ",/raz/g,new Date(1234567),[\"foo\"]]", + "Rich Array" + ); + a(t({}), "{}", "Empty object"); + a( + t({ + raz: undefined, + dwa: false, + trzy: null, + cztery: "raz\"ddwa\ntrzy", + piec: fn, + szesc: /raz/g, + siedem: new Date(1234567), + osiem: ["foo", 32], + dziewiec: { foo: "bar", dwa: 343 } + }), + "{\"raz\":undefined,\"dwa\":false,\"trzy\":null,\"cztery\":\"raz\\\"ddwa\\ntrzy\"," + + "\"piec\":" + + String(fn) + + ",\"szesc\":/raz/g,\"siedem\":new Date(1234567),\"osiem\":[\"foo\",32]," + + "\"dziewiec\":{\"foo\":\"bar\",\"dwa\":343}}", + "Rich object" + ); +}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/implement.js b/node_modules/es5-ext/test/object/set-prototype-of/implement.js new file mode 100644 index 0000000..5b8fb9e --- /dev/null +++ b/node_modules/es5-ext/test/object/set-prototype-of/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +var create = require("../../../object/create") + , isImplemented = require("../../../object/set-prototype-of/is-implemented"); + +module.exports = function (a) { + a(isImplemented(create), true); +}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/index.js b/node_modules/es5-ext/test/object/set-prototype-of/index.js new file mode 100644 index 0000000..23619b0 --- /dev/null +++ b/node_modules/es5-ext/test/object/set-prototype-of/index.js @@ -0,0 +1,27 @@ +"use strict"; + +var create = require("../../../object/create") + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, y = {}; + + if (t === null) return; + a(t(x, y), x, "Return self object"); + a(getPrototypeOf(x), y, "Object"); + a.throws(function () { + t(x); +}, TypeError, "Undefined"); + a.throws(function () { + t("foo"); +}, TypeError, "Primitive"); + a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null"); + x = create(null); + a.h1("Change null prototype"); + a(t(x, y), x, "Result"); + a(getPrototypeOf(x), y, "Prototype"); + a.h1("Set null prototype"); + a(t(y, null), y, "Result"); + a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype"); +}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js b/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/shim.js b/node_modules/es5-ext/test/object/set-prototype-of/shim.js new file mode 100644 index 0000000..23619b0 --- /dev/null +++ b/node_modules/es5-ext/test/object/set-prototype-of/shim.js @@ -0,0 +1,27 @@ +"use strict"; + +var create = require("../../../object/create") + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, y = {}; + + if (t === null) return; + a(t(x, y), x, "Return self object"); + a(getPrototypeOf(x), y, "Object"); + a.throws(function () { + t(x); +}, TypeError, "Undefined"); + a.throws(function () { + t("foo"); +}, TypeError, "Primitive"); + a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null"); + x = create(null); + a.h1("Change null prototype"); + a(t(x, y), x, "Result"); + a(getPrototypeOf(x), y, "Prototype"); + a.h1("Set null prototype"); + a(t(y, null), y, "Result"); + a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype"); +}; diff --git a/node_modules/es5-ext/test/object/some.js b/node_modules/es5-ext/test/object/some.js new file mode 100644 index 0000000..97e5d77 --- /dev/null +++ b/node_modules/es5-ext/test/object/some.js @@ -0,0 +1,23 @@ +"use strict"; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}, i = 0; + t(o, function (value, name) { + o2[name] = value; + return false; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + ++i; + return true; + }), true, "Succeeds"); + a(i, 1, "Stops iteration after condition is met"); + + a(t(o, function () { + return false; + }), false, "Fails"); + +}; diff --git a/node_modules/es5-ext/test/object/to-array.js b/node_modules/es5-ext/test/object/to-array.js new file mode 100644 index 0000000..cd11a05 --- /dev/null +++ b/node_modules/es5-ext/test/object/to-array.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + var o = { 1: 1, 2: 2, 3: 3 }, o1 = {} + , o2 = t(o, function (value, name, self) { + a(self, o, "Self"); + a(this, o1, "Scope"); + return value + Number(name); + }, o1); + a.deep(o2, [2, 4, 6]); + + t(o).sort().forEach(function (item) { + a.deep(item, [item[0], o[item[0]]], "Default"); + }); +}; diff --git a/node_modules/es5-ext/test/object/unserialize.js b/node_modules/es5-ext/test/object/unserialize.js new file mode 100644 index 0000000..5af3c77 --- /dev/null +++ b/node_modules/es5-ext/test/object/unserialize.js @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = function (t, a) { + var fn = function (raz, dwa) { + return raz + dwa; + }; + a(t("undefined"), undefined, "Undefined"); + a(t("null"), null, "Null"); + a(t("\"raz\""), "raz", "String"); + a(t("\"raz\\\"ddwa\\ntrzy\""), "raz\"ddwa\ntrzy", "String with escape"); + a(t("false"), false, "Booelean"); + a(String(t(String(fn))), String(fn), "Function"); + + a.deep(t("/raz-dwa/g"), /raz-dwa/g, "RegExp"); + a.deep(t("new Date(1234567)"), new Date(1234567), "Date"); + a.deep(t("[]"), [], "Empty array"); + a.deep( + t("[undefined,false,null,\"raz\\\"ddwa\\ntrzy\",/raz/g,new Date(1234567),[\"foo\"]]"), + [undefined, false, null, "raz\"ddwa\ntrzy", /raz/g, new Date(1234567), ["foo"]], + "Rich Array" + ); + a.deep(t("{}"), {}, "Empty object"); + a.deep( + t( + "{\"raz\":undefined,\"dwa\":false,\"trzy\":null,\"cztery\":\"raz\\\"ddwa\\ntrzy\"," + + "\"szesc\":/raz/g,\"siedem\":new Date(1234567),\"osiem\":[\"foo\",32]," + + "\"dziewiec\":{\"foo\":\"bar\",\"dwa\":343}}" + ), + { + raz: undefined, + dwa: false, + trzy: null, + cztery: "raz\"ddwa\ntrzy", + szesc: /raz/g, + siedem: new Date(1234567), + osiem: ["foo", 32], + dziewiec: { foo: "bar", dwa: 343 } + }, + "Rich object" + ); +}; diff --git a/node_modules/es5-ext/test/object/valid-callable.js b/node_modules/es5-ext/test/object/valid-callable.js new file mode 100644 index 0000000..fb7310c --- /dev/null +++ b/node_modules/es5-ext/test/object/valid-callable.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + var f = function () {}; + a(t(f), f, "Function"); + a.throws(function () { + t({}); + }, "Not Function"); +}; diff --git a/node_modules/es5-ext/test/object/valid-object.js b/node_modules/es5-ext/test/object/valid-object.js new file mode 100644 index 0000000..b33be97 --- /dev/null +++ b/node_modules/es5-ext/test/object/valid-object.js @@ -0,0 +1,25 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a.throws(function () { + t(""); +}, TypeError, "''"); + a(t(x = {}), x, "Object"); + a(t(x = function () {}), x, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + a(t(x = new Date()), x, "Date"); + + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); +}; diff --git a/node_modules/es5-ext/test/object/valid-value.js b/node_modules/es5-ext/test/object/valid-value.js new file mode 100644 index 0000000..394f89f --- /dev/null +++ b/node_modules/es5-ext/test/object/valid-value.js @@ -0,0 +1,19 @@ +"use strict"; + +var numIsNaN = require("../../number/is-nan"); + +module.exports = function (t, a) { + var x; + a(t(0), 0, "0"); + a(t(false), false, "false"); + a(t(""), "", "''"); + a(numIsNaN(t(NaN)), true, "NaN"); + a(t(x = {}), x, "{}"); + + a.throws(function () { + t(); + }, "Undefined"); + a.throws(function () { + t(null); + }, "null"); +}; diff --git a/node_modules/es5-ext/test/object/validate-array-like-object.js b/node_modules/es5-ext/test/object/validate-array-like-object.js new file mode 100644 index 0000000..b10ec69 --- /dev/null +++ b/node_modules/es5-ext/test/object/validate-array-like-object.js @@ -0,0 +1,29 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a.throws(function () { + t(""); +}, TypeError, "String"); + a.throws(function () { + t({}); +}, TypeError, "Plain Object"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); +}; diff --git a/node_modules/es5-ext/test/object/validate-array-like.js b/node_modules/es5-ext/test/object/validate-array-like.js new file mode 100644 index 0000000..6da6b19 --- /dev/null +++ b/node_modules/es5-ext/test/object/validate-array-like.js @@ -0,0 +1,27 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a(t(""), "", "''"); + a.throws(function () { + t({}); +}, TypeError, "Plain Object"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); +}; diff --git a/node_modules/es5-ext/test/object/validate-stringifiable-value.js b/node_modules/es5-ext/test/object/validate-stringifiable-value.js new file mode 100644 index 0000000..8283814 --- /dev/null +++ b/node_modules/es5-ext/test/object/validate-stringifiable-value.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "Null"); + a(t(0), "0"); + a(t(false), "false"); + a(t(""), ""); + a(t({}), String({}), "Object"); + a(t(x = function () {}), String(x), "Function"); + a(t(x = new String("raz")), String(x), "String object"); // Jslint: ignore + a(t(x = new Date()), String(x), "Date"); + + a.throws(function () { + t(Object.create(null)); +}, TypeError, "Null prototype object"); +}; diff --git a/node_modules/es5-ext/test/object/validate-stringifiable.js b/node_modules/es5-ext/test/object/validate-stringifiable.js new file mode 100644 index 0000000..e75a415 --- /dev/null +++ b/node_modules/es5-ext/test/object/validate-stringifiable.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a(t(), "undefined", "Undefined"); + a(t(null), "null", "Null"); + a(t(0), "0"); + a(t(false), "false"); + a(t(""), ""); + a(t({}), String({}), "Object"); + a(t(x = function () {}), String(x), "Function"); + a(t(x = new String("raz")), String(x), "String object"); // Jslint: ignore + a(t(x = new Date()), String(x), "Date"); + + a.throws(function () { + t(Object.create(null)); +}, TypeError, "Null prototype object"); +}; diff --git a/node_modules/es5-ext/test/optional-chaining.js b/node_modules/es5-ext/test/optional-chaining.js new file mode 100644 index 0000000..1f7d405 --- /dev/null +++ b/node_modules/es5-ext/test/optional-chaining.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var obj = { foo: { bar: "elo", par: null } }; + a(t(), undefined); + a(t(null), null); + a(t(obj), obj); + a(t(obj, "foo"), obj.foo); + a(t(obj, "foo", "bar"), "elo"); + a(t(obj, "foo", "bar", "slice"), String.prototype.slice); + a(t(obj, "foo", "par"), null); + a(t(obj, "foo", "par", "marko"), undefined); + a(t(obj, "marko"), undefined); + a(t(""), ""); + a(t("", "foo"), undefined); + a(t("", "slice"), String.prototype.slice); +}; diff --git a/node_modules/es5-ext/test/promise/.eslintrc.json b/node_modules/es5-ext/test/promise/.eslintrc.json new file mode 100644 index 0000000..46c8423 --- /dev/null +++ b/node_modules/es5-ext/test/promise/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "globals": { "setTimeout": true } +} diff --git a/node_modules/es5-ext/test/promise/lazy.js b/node_modules/es5-ext/test/promise/lazy.js new file mode 100644 index 0000000..8c7a5bf --- /dev/null +++ b/node_modules/es5-ext/test/promise/lazy.js @@ -0,0 +1,52 @@ +"use strict"; + +module.exports = function (t) { + if (typeof Promise !== "function") return null; // Run tests only in ES2015+ env + + return { + "Delays execution": function (a, d) { + var invoked = false; + var promise = t(function (resolve) { + invoked = true; + setTimeout(function () { + resolve(20); + }, 10); + }); + + a(invoked, false); + + setTimeout(function () { + a(invoked, false); + promise.then(function (value) { + a(value, 20); + setTimeout(d, 0); // Escape error swallowing + }); + a(invoked, true); + }, 15); + }, + "Passes rejection": function (a, d) { + var promise = t(function (resolve, reject) { + setTimeout(function () { + reject(new Error("Stop")); + }, 10); + }); + + promise.catch(function (error) { + a(error instanceof Error, true); + a(error.message, "Stop"); + setTimeout(d, 0); // Escape error swallowing + }); + }, + "Passes sync exception": function (a, d) { + var promise = t(function () { + throw new Error("Stop"); + }); + + promise.catch(function (error) { + a(error instanceof Error, true); + a(error.message, "Stop"); + setTimeout(d, 0); // Escape error swallowing + }); + } + }; +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/index.js b/node_modules/es5-ext/test/reg-exp/#/index.js new file mode 100644 index 0000000..7ab9ab8 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/index.js @@ -0,0 +1,15 @@ +/* eslint-env node */ + +"use strict"; + +var indexTest = require("tad/lib/utils/index-test") + , path = require("path").resolve(__dirname, "../../../reg-exp/#"); + +module.exports = function (t, a, d) { + indexTest( + indexTest.readDir(path).aside(function (data) { + delete data.sticky; + delete data.unicode; + }) + )(t, a, d); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/is-sticky.js b/node_modules/es5-ext/test/reg-exp/#/is-sticky.js new file mode 100644 index 0000000..e65740e --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/is-sticky.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var re; + a(t.call(/raz/), false, "Normal"); + a(t.call(/raz/g), false, "Global"); + try { + // eslint-disable-next-line no-invalid-regexp + re = new RegExp("raz", "y"); + } catch (ignore) {} + if (!re) return; + a(t.call(re), true, "Sticky"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/is-unicode.js b/node_modules/es5-ext/test/reg-exp/#/is-unicode.js new file mode 100644 index 0000000..86217aa --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/is-unicode.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var re; + a(t.call(/raz/), false, "Normal"); + a(t.call(/raz/g), false, "Global"); + try { + // eslint-disable-next-line no-invalid-regexp + re = new RegExp("raz", "u"); + } catch (ignore) {} + if (!re) return; + a(t.call(re), true, "Unicode"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/match/implement.js b/node_modules/es5-ext/test/reg-exp/#/match/implement.js new file mode 100644 index 0000000..633d9bb --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/match/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/match/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/match/index.js b/node_modules/es5-ext/test/reg-exp/#/match/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/match/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/match/shim.js b/node_modules/es5-ext/test/reg-exp/#/match/shim.js new file mode 100644 index 0000000..fce094f --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/match/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + var result = ["foo"]; + result.index = 0; + result.input = "foobar"; + a.deep(t.call(/foo/, "foobar"), result); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/replace/implement.js b/node_modules/es5-ext/test/reg-exp/#/replace/implement.js new file mode 100644 index 0000000..7da5e66 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/replace/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/replace/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/replace/index.js b/node_modules/es5-ext/test/reg-exp/#/replace/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/replace/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/replace/shim.js b/node_modules/es5-ext/test/reg-exp/#/replace/shim.js new file mode 100644 index 0000000..4178065 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/replace/shim.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(/foo/, "foobar", "mar"), "marbar"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/search/implement.js b/node_modules/es5-ext/test/reg-exp/#/search/implement.js new file mode 100644 index 0000000..ded73e2 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/search/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/search/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/search/index.js b/node_modules/es5-ext/test/reg-exp/#/search/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/search/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/search/shim.js b/node_modules/es5-ext/test/reg-exp/#/search/shim.js new file mode 100644 index 0000000..779b132 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/search/shim.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(/foo/, "barfoo"), 3); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/split/implement.js b/node_modules/es5-ext/test/reg-exp/#/split/implement.js new file mode 100644 index 0000000..4ef532b --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/split/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/split/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/split/index.js b/node_modules/es5-ext/test/reg-exp/#/split/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/split/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/split/shim.js b/node_modules/es5-ext/test/reg-exp/#/split/shim.js new file mode 100644 index 0000000..a01250e --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/split/shim.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t.call(/\|/, "bar|foo"), ["bar", "foo"]); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js b/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js new file mode 100644 index 0000000..d7e59bf --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/sticky/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js b/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js new file mode 100644 index 0000000..9cb2b37 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/unicode/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/escape.js b/node_modules/es5-ext/test/reg-exp/escape.js new file mode 100644 index 0000000..9478f52 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/escape.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + var str = "(?:^te|er)s{2}t\\[raz]+$"; + a(RegExp("^" + t(str) + "$").test(str), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/is-reg-exp.js b/node_modules/es5-ext/test/reg-exp/is-reg-exp.js new file mode 100644 index 0000000..7727eab --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/is-reg-exp.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new String("raz")), false, "String object"); + a(t({}), false, "Plain object"); + a(t(/a/), true, "Regular expression"); + a(t(new RegExp("a")), true, "Regular expression via constructor"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js b/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js new file mode 100644 index 0000000..2f99441 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js @@ -0,0 +1,19 @@ +"use strict"; + +module.exports = function (t, a) { + var r = /raz/; + a(t(r), r, "Direct"); + r = new RegExp("foo"); + a(t(r), r, "Constructor"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t(function () {}); + }, "Function"); + a.throws(function () { + t({ exec: function () { + return 20; +} }); + }, "Plain object"); +}; diff --git a/node_modules/es5-ext/test/safe-to-string.js b/node_modules/es5-ext/test/safe-to-string.js new file mode 100644 index 0000000..1e2d7e1 --- /dev/null +++ b/node_modules/es5-ext/test/safe-to-string.js @@ -0,0 +1,19 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), "undefined"); + a(t(null), "null"); + a(t(10), "10"); + a(t("str"), "str"); + a( + t({ + toString: function () { + return "miszka"; + } + }), + "miszka" + ); + // eslint-disable-next-line symbol-description + if (typeof Symbol === "function") a(t(Symbol()), "Symbol()"); + a(t(Object.create(null)), ""); +}; diff --git a/node_modules/es5-ext/test/string/#/@@iterator/implement.js b/node_modules/es5-ext/test/string/#/@@iterator/implement.js new file mode 100644 index 0000000..c984fb2 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/@@iterator/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/@@iterator/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/@@iterator/index.js b/node_modules/es5-ext/test/string/#/@@iterator/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/@@iterator/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js b/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/@@iterator/shim.js b/node_modules/es5-ext/test/string/#/@@iterator/shim.js new file mode 100644 index 0000000..467cdc3 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/@@iterator/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + var it = t.call("r💩z"); + a.deep(it.next(), { done: false, value: "r" }, "#1"); + a.deep(it.next(), { done: false, value: "💩" }, "#2"); + a.deep(it.next(), { done: false, value: "z" }, "#3"); + a.deep(it.next(), { done: true, value: undefined }, "End"); +}; diff --git a/node_modules/es5-ext/test/string/#/at.js b/node_modules/es5-ext/test/string/#/at.js new file mode 100644 index 0000000..a614f93 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/at.js @@ -0,0 +1,132 @@ +/* eslint no-useless-call: "off" */ +// See tests at https://github.com/mathiasbynens/String.prototype.at + +"use strict"; + +module.exports = function (t, a) { + a(t.length, 1, "Length"); + + a.h1("BMP"); + a(t.call("abc\uD834\uDF06def", -Infinity), "", "-Infinity"); + a(t.call("abc\uD834\uDF06def", -1), "", "-1"); + a(t.call("abc\uD834\uDF06def", -0), "a", "-0"); + a(t.call("abc\uD834\uDF06def", +0), "a", "+0"); + a(t.call("abc\uD834\uDF06def", 1), "b", "1"); + a(t.call("abc\uD834\uDF06def", 3), "\uD834\uDF06", "3"); + a(t.call("abc\uD834\uDF06def", 4), "\uDF06", "4"); + a(t.call("abc\uD834\uDF06def", 5), "d", "5"); + a(t.call("abc\uD834\uDF06def", 42), "", "42"); + a(t.call("abc\uD834\uDF06def", Number(Infinity)), "", "+Infinity"); + a(t.call("abc\uD834\uDF06def", null), "a", "null"); + a(t.call("abc\uD834\uDF06def", undefined), "a", "undefined"); + a(t.call("abc\uD834\uDF06def"), "a", "No argument"); + a(t.call("abc\uD834\uDF06def", false), "a", "false"); + a(t.call("abc\uD834\uDF06def", NaN), "a", "NaN"); + a(t.call("abc\uD834\uDF06def", ""), "a", "Empty string"); + a(t.call("abc\uD834\uDF06def", "_"), "a", "_"); + a(t.call("abc\uD834\uDF06def", "1"), "b", "'1'"); + a(t.call("abc\uD834\uDF06def", []), "a", "[]"); + a(t.call("abc\uD834\uDF06def", {}), "a", "{}"); + a(t.call("abc\uD834\uDF06def", -0.9), "a", "-0.9"); + a(t.call("abc\uD834\uDF06def", 1.9), "b", "1.9"); + a(t.call("abc\uD834\uDF06def", 7.9), "f", "7.9"); + a(t.call("abc\uD834\uDF06def", Math.pow(2, 32)), "", "Big number"); + + a.h1("Astral symbol"); + a(t.call("\uD834\uDF06def", -Infinity), "", "-Infinity"); + a(t.call("\uD834\uDF06def", -1), "", "-1"); + a(t.call("\uD834\uDF06def", -0), "\uD834\uDF06", "-0"); + a(t.call("\uD834\uDF06def", +0), "\uD834\uDF06", "+0"); + a(t.call("\uD834\uDF06def", 1), "\uDF06", "1"); + a(t.call("\uD834\uDF06def", 2), "d", "2"); + a(t.call("\uD834\uDF06def", 3), "e", "3"); + a(t.call("\uD834\uDF06def", 4), "f", "4"); + a(t.call("\uD834\uDF06def", 42), "", "42"); + a(t.call("\uD834\uDF06def", Number(Infinity)), "", "+Infinity"); + a(t.call("\uD834\uDF06def", null), "\uD834\uDF06", "null"); + a(t.call("\uD834\uDF06def", undefined), "\uD834\uDF06", "undefined"); + a(t.call("\uD834\uDF06def"), "\uD834\uDF06", "No arguments"); + a(t.call("\uD834\uDF06def", false), "\uD834\uDF06", "false"); + a(t.call("\uD834\uDF06def", NaN), "\uD834\uDF06", "NaN"); + a(t.call("\uD834\uDF06def", ""), "\uD834\uDF06", "Empty string"); + a(t.call("\uD834\uDF06def", "_"), "\uD834\uDF06", "_"); + a(t.call("\uD834\uDF06def", "1"), "\uDF06", "'1'"); + + a.h1("Lone high surrogates"); + a(t.call("\uD834abc", -Infinity), "", "-Infinity"); + a(t.call("\uD834abc", -1), "", "-1"); + a(t.call("\uD834abc", -0), "\uD834", "-0"); + a(t.call("\uD834abc", +0), "\uD834", "+0"); + a(t.call("\uD834abc", 1), "a", "1"); + a(t.call("\uD834abc", 42), "", "42"); + a(t.call("\uD834abc", Number(Infinity)), "", "Infinity"); + a(t.call("\uD834abc", null), "\uD834", "null"); + a(t.call("\uD834abc", undefined), "\uD834", "undefined"); + a(t.call("\uD834abc"), "\uD834", "No arguments"); + a(t.call("\uD834abc", false), "\uD834", "false"); + a(t.call("\uD834abc", NaN), "\uD834", "NaN"); + a(t.call("\uD834abc", ""), "\uD834", "Empty string"); + a(t.call("\uD834abc", "_"), "\uD834", "_"); + a(t.call("\uD834abc", "1"), "a", "'a'"); + + a.h1("Lone low surrogates"); + a(t.call("\uDF06abc", -Infinity), "", "-Infinity"); + a(t.call("\uDF06abc", -1), "", "-1"); + a(t.call("\uDF06abc", -0), "\uDF06", "-0"); + a(t.call("\uDF06abc", +0), "\uDF06", "+0"); + a(t.call("\uDF06abc", 1), "a", "1"); + a(t.call("\uDF06abc", 42), "", "42"); + a(t.call("\uDF06abc", Number(Infinity)), "", "+Infinity"); + a(t.call("\uDF06abc", null), "\uDF06", "null"); + a(t.call("\uDF06abc", undefined), "\uDF06", "undefined"); + a(t.call("\uDF06abc"), "\uDF06", "No arguments"); + a(t.call("\uDF06abc", false), "\uDF06", "false"); + a(t.call("\uDF06abc", NaN), "\uDF06", "NaN"); + a(t.call("\uDF06abc", ""), "\uDF06", "Empty string"); + a(t.call("\uDF06abc", "_"), "\uDF06", "_"); + a(t.call("\uDF06abc", "1"), "a", "'1'"); + + a.h1("Context"); + a.throws( + function () { + t.call(undefined); + }, + TypeError, + "Undefined" + ); + a.throws( + function () { + t.call(undefined, 4); + }, + TypeError, + "Undefined + argument" + ); + a.throws( + function () { + t.call(null); + }, + TypeError, + "Null" + ); + a.throws( + function () { + t.call(null, 4); + }, + TypeError, + "Null + argument" + ); + a(t.call(42, 0), "4", "Number #1"); + a(t.call(42, 1), "2", "Number #2"); + a( + t.call( + { + toString: function () { + return "abc"; + } + }, + 2 + ), + "c", + "Object" + ); +}; diff --git a/node_modules/es5-ext/test/string/#/camel-to-hyphen.js b/node_modules/es5-ext/test/string/#/camel-to-hyphen.js new file mode 100644 index 0000000..bbf9ae4 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/camel-to-hyphen.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("razDwaTRzy4yFoo45My"), "raz-dwa-t-rzy4y-foo45-my"); + a(t.call("razDwaTRzy4yFoo45My-"), "raz-dwa-t-rzy4y-foo45-my-"); + a(t.call("razDwaTRzy4yFoo45My--"), "raz-dwa-t-rzy4y-foo45-my--"); +}; diff --git a/node_modules/es5-ext/test/string/#/capitalize.js b/node_modules/es5-ext/test/string/#/capitalize.js new file mode 100644 index 0000000..884ae9c --- /dev/null +++ b/node_modules/es5-ext/test/string/#/capitalize.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("raz"), "Raz", "Word"); + a(t.call("BLA"), "BLA", "Uppercase"); + a(t.call(""), "", "Empty"); + a(t.call("a"), "A", "One letter"); + a(t.call("this is a test"), "This is a test", "Sentence"); +}; diff --git a/node_modules/es5-ext/test/string/#/case-insensitive-compare.js b/node_modules/es5-ext/test/string/#/case-insensitive-compare.js new file mode 100644 index 0000000..8117f92 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/case-insensitive-compare.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("AA", "aa"), 0, "Same"); + a.ok(t.call("Amber", "zebra") < 0, "Less"); + a.ok(t.call("Zebra", "amber") > 0, "Greater"); +}; diff --git a/node_modules/es5-ext/test/string/#/code-point-at/implement.js b/node_modules/es5-ext/test/string/#/code-point-at/implement.js new file mode 100644 index 0000000..f966c53 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/code-point-at/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +var isImplemented = + require("../../../../string/#/code-point-at/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/code-point-at/index.js b/node_modules/es5-ext/test/string/#/code-point-at/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/code-point-at/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js b/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/code-point-at/shim.js b/node_modules/es5-ext/test/string/#/code-point-at/shim.js new file mode 100644 index 0000000..40d6276 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/code-point-at/shim.js @@ -0,0 +1,119 @@ +/* eslint no-useless-call: "off" */ + +// Taken from: https://github.com/mathiasbynens/String.prototype.codePointAt +// /blob/master/tests/tests.js + +"use strict"; + +module.exports = function (t, a) { + a(t.length, 1, "Length"); + + // String that starts with a BMP symbol + a(t.call("abc\uD834\uDF06def", ""), 0x61); + a(t.call("abc\uD834\uDF06def", "_"), 0x61); + a(t.call("abc\uD834\uDF06def"), 0x61); + a(t.call("abc\uD834\uDF06def", -Infinity), undefined); + a(t.call("abc\uD834\uDF06def", -1), undefined); + a(t.call("abc\uD834\uDF06def", -0), 0x61); + a(t.call("abc\uD834\uDF06def", 0), 0x61); + a(t.call("abc\uD834\uDF06def", 3), 0x1d306); + a(t.call("abc\uD834\uDF06def", 4), 0xdf06); + a(t.call("abc\uD834\uDF06def", 5), 0x64); + a(t.call("abc\uD834\uDF06def", 42), undefined); + a(t.call("abc\uD834\uDF06def", Infinity), undefined); + a(t.call("abc\uD834\uDF06def", Infinity), undefined); + a(t.call("abc\uD834\uDF06def", NaN), 0x61); + a(t.call("abc\uD834\uDF06def", false), 0x61); + a(t.call("abc\uD834\uDF06def", null), 0x61); + a(t.call("abc\uD834\uDF06def", undefined), 0x61); + + // String that starts with an astral symbol + a(t.call("\uD834\uDF06def", ""), 0x1d306); + a(t.call("\uD834\uDF06def", "1"), 0xdf06); + a(t.call("\uD834\uDF06def", "_"), 0x1d306); + a(t.call("\uD834\uDF06def"), 0x1d306); + a(t.call("\uD834\uDF06def", -1), undefined); + a(t.call("\uD834\uDF06def", -0), 0x1d306); + a(t.call("\uD834\uDF06def", 0), 0x1d306); + a(t.call("\uD834\uDF06def", 1), 0xdf06); + a(t.call("\uD834\uDF06def", 42), undefined); + a(t.call("\uD834\uDF06def", false), 0x1d306); + a(t.call("\uD834\uDF06def", null), 0x1d306); + a(t.call("\uD834\uDF06def", undefined), 0x1d306); + + // Lone high surrogates + a(t.call("\uD834abc", ""), 0xd834); + a(t.call("\uD834abc", "_"), 0xd834); + a(t.call("\uD834abc"), 0xd834); + a(t.call("\uD834abc", -1), undefined); + a(t.call("\uD834abc", -0), 0xd834); + a(t.call("\uD834abc", 0), 0xd834); + a(t.call("\uD834abc", false), 0xd834); + a(t.call("\uD834abc", NaN), 0xd834); + a(t.call("\uD834abc", null), 0xd834); + a(t.call("\uD834abc", undefined), 0xd834); + + // Lone low surrogates + a(t.call("\uDF06abc", ""), 0xdf06); + a(t.call("\uDF06abc", "_"), 0xdf06); + a(t.call("\uDF06abc"), 0xdf06); + a(t.call("\uDF06abc", -1), undefined); + a(t.call("\uDF06abc", -0), 0xdf06); + a(t.call("\uDF06abc", 0), 0xdf06); + a(t.call("\uDF06abc", false), 0xdf06); + a(t.call("\uDF06abc", NaN), 0xdf06); + a(t.call("\uDF06abc", null), 0xdf06); + a(t.call("\uDF06abc", undefined), 0xdf06); + + a.throws(function () { + t.call(undefined); + }, TypeError); + a.throws(function () { + t.call(undefined, 4); + }, TypeError); + a.throws(function () { + t.call(null); + }, TypeError); + a.throws(function () { + t.call(null, 4); + }, TypeError); + a(t.call(42, 0), 0x34); + a(t.call(42, 1), 0x32); + a( + t.call( + { + toString: function () { + return "abc"; + } + }, + 2 + ), + 0x63 + ); + + a.throws(function () { + t.apply(undefined); + }, TypeError); + a.throws(function () { + t.apply(undefined, [4]); + }, TypeError); + a.throws(function () { + t.apply(null); + }, TypeError); + a.throws(function () { + t.apply(null, [4]); + }, TypeError); + a(t.apply(42, [0]), 0x34); + a(t.apply(42, [1]), 0x32); + a( + t.apply( + { + toString: function () { + return "abc"; + } + }, + [2] + ), + 0x63 + ); +}; diff --git a/node_modules/es5-ext/test/string/#/contains/implement.js b/node_modules/es5-ext/test/string/#/contains/implement.js new file mode 100644 index 0000000..297a832 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/contains/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/contains/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/contains/index.js b/node_modules/es5-ext/test/string/#/contains/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/contains/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/contains/is-implemented.js b/node_modules/es5-ext/test/string/#/contains/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/#/contains/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/contains/shim.js b/node_modules/es5-ext/test/string/#/contains/shim.js new file mode 100644 index 0000000..0a73671 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/contains/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("raz", ""), true, "Empty"); + a(t.call("", ""), true, "Both Empty"); + a(t.call("raz", "raz"), true, "Same"); + a(t.call("razdwa", "raz"), true, "Starts with"); + a(t.call("razdwa", "dwa"), true, "Ends with"); + a(t.call("razdwa", "zdw"), true, "In middle"); + a(t.call("", "raz"), false, "Something in empty"); + a(t.call("az", "raz"), false, "Longer"); + a(t.call("azasdfasdf", "azff"), false, "Not found"); + a(t.call("razdwa", "raz", 1), false, "Position"); +}; diff --git a/node_modules/es5-ext/test/string/#/count.js b/node_modules/es5-ext/test/string/#/count.js new file mode 100644 index 0000000..d259c90 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/count.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws(function () { + t.call("", ""); + }); + a(t.call("x", "x"), 1); + a(t.call("xx", "x"), 2); + a(t.call("xxx", "xx"), 1); + a(t.call("xxxx", "xx"), 2); + a(t.call("xx", "xxx"), 0); + a(t.call("", "elo"), 0); + a(t.call("fooo", "foofooo"), 0); +}; diff --git a/node_modules/es5-ext/test/string/#/ends-with/implement.js b/node_modules/es5-ext/test/string/#/ends-with/implement.js new file mode 100644 index 0000000..5a2ca3c --- /dev/null +++ b/node_modules/es5-ext/test/string/#/ends-with/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/ends-with/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/ends-with/index.js b/node_modules/es5-ext/test/string/#/ends-with/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/ends-with/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js b/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/ends-with/shim.js b/node_modules/es5-ext/test/string/#/ends-with/shim.js new file mode 100644 index 0000000..7539883 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/ends-with/shim.js @@ -0,0 +1,16 @@ +// In some parts copied from: +// http://closure-library.googlecode.com/svn/trunk/closure/goog/ +// string/string_test.html + +"use strict"; + +module.exports = function (t, a) { + a(t.call("abc", ""), true, "Empty needle"); + a(t.call("abcd", "cd"), true, "Ends with needle"); + a(t.call("abcd", "abcd"), true, "Needle equals haystack"); + a(t.call("abcd", "ab"), false, "Doesn't end with needle"); + a(t.call("abc", "defg"), false, "Length trick"); + a(t.call("razdwa", "zd", 3), false, "Position: false"); + a(t.call("razdwa", "zd", 4), true, "Position: true"); + a(t.call("razdwa", "zd", 5), false, "Position: false #2"); +}; diff --git a/node_modules/es5-ext/test/string/#/hyphen-to-camel.js b/node_modules/es5-ext/test/string/#/hyphen-to-camel.js new file mode 100644 index 0000000..89c8161 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/hyphen-to-camel.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa"), "razDwaTRzy4yRtr4Tiu45Pa"); + a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa-"), "razDwaTRzy4yRtr4Tiu45Pa-"); + a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa--"), "razDwaTRzy4yRtr4Tiu45Pa--"); +}; diff --git a/node_modules/es5-ext/test/string/#/indent.js b/node_modules/es5-ext/test/string/#/indent.js new file mode 100644 index 0000000..6b1dd89 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/indent.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("ra\nzz", ""), "ra\nzz", "Empty"); + a(t.call("ra\nzz", "\t", 3), "\t\t\tra\n\t\t\tzz", "String repeat"); + a(t.call("ra\nzz\nsss\nfff\n", "\t"), "\tra\n\tzz\n\tsss\n\tfff\n", + "Multi-line"); + a(t.call("ra\n\nzz\n", "\t"), "\tra\n\n\tzz\n", "Don't touch empty lines"); +}; diff --git a/node_modules/es5-ext/test/string/#/last.js b/node_modules/es5-ext/test/string/#/last.js new file mode 100644 index 0000000..fea798d --- /dev/null +++ b/node_modules/es5-ext/test/string/#/last.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(""), null, "Null"); + a(t.call("abcdef"), "f", "String"); +}; diff --git a/node_modules/es5-ext/test/string/#/normalize/_data.js b/node_modules/es5-ext/test/string/#/normalize/_data.js new file mode 100644 index 0000000..9631211 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/_data.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t[0], "object"); +}; diff --git a/node_modules/es5-ext/test/string/#/normalize/implement.js b/node_modules/es5-ext/test/string/#/normalize/implement.js new file mode 100644 index 0000000..b053aa8 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/normalize/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/normalize/index.js b/node_modules/es5-ext/test/string/#/normalize/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/normalize/is-implemented.js b/node_modules/es5-ext/test/string/#/normalize/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/normalize/shim.js b/node_modules/es5-ext/test/string/#/normalize/shim.js new file mode 100644 index 0000000..0c80aa4 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/shim.js @@ -0,0 +1,13 @@ +// Taken from: https://github.com/walling/unorm/blob/master/test/es6-shim.js + +"use strict"; + +var str = "äiti"; + +module.exports = function (t, a) { + a(t.call(str), "\u00e4iti"); + a(t.call(str, "NFC"), "\u00e4iti"); + a(t.call(str, "NFD"), "a\u0308iti"); + a(t.call(str, "NFKC"), "\u00e4iti"); + a(t.call(str, "NFKD"), "a\u0308iti"); +}; diff --git a/node_modules/es5-ext/test/string/#/pad.js b/node_modules/es5-ext/test/string/#/pad.js new file mode 100644 index 0000000..e573453 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/pad.js @@ -0,0 +1,24 @@ +"use strict"; + +var partial = require("../../../function/#/partial"); + +module.exports = { + Left: function (t, a) { + t = partial.call(t, "x", 5); + + a(t.call("yy"), "xxxyy"); + a(t.call(""), "xxxxx", "Empty string"); + + a(t.call("yyyyy"), "yyyyy", "Equal length"); + a(t.call("yyyyyyy"), "yyyyyyy", "Longer"); + }, + Right: function (t, a) { + t = partial.call(t, "x", -5); + + a(t.call("yy"), "yyxxx"); + a(t.call(""), "xxxxx", "Empty string"); + + a(t.call("yyyyy"), "yyyyy", "Equal length"); + a(t.call("yyyyyyy"), "yyyyyyy", "Longer"); + } +}; diff --git a/node_modules/es5-ext/test/string/#/plain-replace-all.js b/node_modules/es5-ext/test/string/#/plain-replace-all.js new file mode 100644 index 0000000..e5f801c --- /dev/null +++ b/node_modules/es5-ext/test/string/#/plain-replace-all.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("razdwatrzy", "dwa", "olera"), "razoleratrzy", "Basic"); + a(t.call("razdwatrzy", "dwa", "ole$&a"), "razole$&atrzy", "Inserts"); + a(t.call("razdwa", "ola", "sdfs"), "razdwa", "No replace"); + + a(t.call("$raz$$dwa$trzy$", "$", "&&"), "&&raz&&&&dwa&&trzy&&", "Multi"); + a(t.call("$raz$$dwa$$$$trzy$", "$$", "&"), "$raz&dwa&&trzy$", + "Multi many chars"); +}; diff --git a/node_modules/es5-ext/test/string/#/plain-replace.js b/node_modules/es5-ext/test/string/#/plain-replace.js new file mode 100644 index 0000000..9f6c2be --- /dev/null +++ b/node_modules/es5-ext/test/string/#/plain-replace.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("razdwatrzy", "dwa", "olera"), "razoleratrzy", "Basic"); + a(t.call("razdwatrzy", "dwa", "ole$&a"), "razole$&atrzy", "Inserts"); + a(t.call("razdwa", "ola", "sdfs"), "razdwa", "No replace"); +}; diff --git a/node_modules/es5-ext/test/string/#/repeat/implement.js b/node_modules/es5-ext/test/string/#/repeat/implement.js new file mode 100644 index 0000000..2709628 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/repeat/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/repeat/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/repeat/index.js b/node_modules/es5-ext/test/string/#/repeat/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/repeat/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/repeat/is-implemented.js b/node_modules/es5-ext/test/string/#/repeat/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/#/repeat/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/repeat/shim.js b/node_modules/es5-ext/test/string/#/repeat/shim.js new file mode 100644 index 0000000..c584884 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/repeat/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("a", 0), "", "Empty"); + a(t.call("a", 1), "a", "1"); + a(t.call("a", 2), "aa", "2"); + a(t.call("\t", 5), "\t\t\t\t\t", "Whitespace"); + a(t.call("raz", 3), "razrazraz", "Many chars"); + a(t.call("raz", 3), "razrazraz", "Many chars"); + a(t.call("razfoobar", 5), "razfoobarrazfoobarrazfoobarrazfoobarrazfoobar", "Many chars"); + a(t.call("a", 300).length, 300); +}; diff --git a/node_modules/es5-ext/test/string/#/starts-with/implement.js b/node_modules/es5-ext/test/string/#/starts-with/implement.js new file mode 100644 index 0000000..d1f1ce2 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/starts-with/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/starts-with/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/starts-with/index.js b/node_modules/es5-ext/test/string/#/starts-with/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/starts-with/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js b/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/starts-with/shim.js b/node_modules/es5-ext/test/string/#/starts-with/shim.js new file mode 100644 index 0000000..4b5e4e4 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/starts-with/shim.js @@ -0,0 +1,14 @@ +// Inspired and in some parts copied from: +// http://closure-library.googlecode.com/svn/trunk/closure/goog +// /string/string_test.html + +"use strict"; + +module.exports = function (t, a) { + a(t.call("abc", ""), true, "Empty needle"); + a(t.call("abcd", "ab"), true, "Starts with needle"); + a(t.call("abcd", "abcd"), true, "Needle equals haystack"); + a(t.call("abcd", "bcde", 1), false, "Needle larger than haystack"); + a(!t.call("abcd", "cd"), true, "Doesn't start with needle"); + a(t.call("abcd", "bc", 1), true, "Position"); +}; diff --git a/node_modules/es5-ext/test/string/#/uncapitalize.js b/node_modules/es5-ext/test/string/#/uncapitalize.js new file mode 100644 index 0000000..cddd847 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/uncapitalize.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("raz"), "raz", "Word"); + a(t.call("BLA"), "bLA", "Uppercase"); + a(t.call(""), "", "Empty"); + a(t.call("a"), "a", "One letter"); + a(t.call("this is a test"), "this is a test", "Sentence"); + a(t.call("This is a test"), "this is a test", "Capitalized sentence"); +}; diff --git a/node_modules/es5-ext/test/string/format-method.js b/node_modules/es5-ext/test/string/format-method.js new file mode 100644 index 0000000..69e93de --- /dev/null +++ b/node_modules/es5-ext/test/string/format-method.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + t = t({ a: "A", +aa: "B", +ab: "C", +b: "D", + c: function () { + return ++this.a; +} }); + a(t.call({ a: 0 }, " %a%aab%abb%b\\%aa%ab%c%c "), " ABbCbD%aaC12 "); +}; diff --git a/node_modules/es5-ext/test/string/from-code-point/implement.js b/node_modules/es5-ext/test/string/from-code-point/implement.js new file mode 100644 index 0000000..31ed7b5 --- /dev/null +++ b/node_modules/es5-ext/test/string/from-code-point/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../string/from-code-point/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/from-code-point/index.js b/node_modules/es5-ext/test/string/from-code-point/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/from-code-point/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/from-code-point/is-implemented.js b/node_modules/es5-ext/test/string/from-code-point/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/from-code-point/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/from-code-point/shim.js b/node_modules/es5-ext/test/string/from-code-point/shim.js new file mode 100644 index 0000000..023931f --- /dev/null +++ b/node_modules/es5-ext/test/string/from-code-point/shim.js @@ -0,0 +1,73 @@ +// Taken from: https://github.com/mathiasbynens/String.fromCodePoint/blob/master +// /tests/tests.js + +"use strict"; + +var pow = Math.pow; + +module.exports = function (t, a) { + var counter, result; + + a(t.length, 1, "Length"); + a(String.propertyIsEnumerable("fromCodePoint"), false, "Not enumerable"); + + a(t(""), "\0", "Empty string"); + a(t(), "", "No arguments"); + a(t(-0), "\0", "-0"); + a(t(0), "\0", "0"); + a(t(0x1D306), "\uD834\uDF06", "Unicode"); + a(t(0x1D306, 0x61, 0x1D307), "\uD834\uDF06a\uD834\uDF07", "Complex unicode"); + a(t(0x61, 0x62, 0x1D307), "ab\uD834\uDF07", "Complex"); + a(t(false), "\0", "false"); + a(t(null), "\0", "null"); + + a.throws(function () { + t("_"); +}, RangeError, "_"); + a.throws(function () { + t(Infinity); +}, RangeError, "Infinity"); + a.throws(function () { + t(-Infinity); +}, RangeError, "-Infinity"); + a.throws(function () { + t(-1); +}, RangeError, "-1"); + a.throws(function () { + t(0x10FFFF + 1); +}, RangeError, "Range error #1"); + a.throws(function () { + t(3.14); +}, RangeError, "Range error #2"); + a.throws(function () { + t(3e-2); +}, RangeError, "Range error #3"); + a.throws(function () { + t(-Infinity); +}, RangeError, "Range error #4"); + a.throws(function () { + t(Number(Infinity)); +}, RangeError, "Range error #5"); + a.throws(function () { + t(NaN); +}, RangeError, "Range error #6"); + a.throws(function () { + t(undefined); +}, RangeError, "Range error #7"); + a.throws(function () { + t({}); +}, RangeError, "Range error #8"); + a.throws(function () { + t(/re/); +}, RangeError, "Range error #9"); + + counter = pow(2, 15) * 3 / 2; + result = []; + while (--counter >= 0) result.push(0); // One code unit per symbol + t.apply(null, result); // Must not throw + + counter = pow(2, 15) * 3 / 2; + result = []; + while (--counter >= 0) result.push(0xFFFF + 1); // Two code units per symbol + t.apply(null, result); // Must not throw +}; diff --git a/node_modules/es5-ext/test/string/is-string.js b/node_modules/es5-ext/test/string/is-string.js new file mode 100644 index 0000000..0e83122 --- /dev/null +++ b/node_modules/es5-ext/test/string/is-string.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(null), false, "Null"); + a(t(""), true, "Empty string"); + a(t(12), false, "Number"); + a(t(false), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new String("raz")), true, "String object"); + a(t("asdfaf"), true, "String"); +}; diff --git a/node_modules/es5-ext/test/string/random-uniq.js b/node_modules/es5-ext/test/string/random-uniq.js new file mode 100644 index 0000000..3b6d889 --- /dev/null +++ b/node_modules/es5-ext/test/string/random-uniq.js @@ -0,0 +1,14 @@ +"use strict"; + +var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/); + +module.exports = function (t, a) { + a(typeof t(), "string"); + a.ok(t().length > 7); + a.not(t(), t()); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); +}; diff --git a/node_modules/es5-ext/test/string/random.js b/node_modules/es5-ext/test/string/random.js new file mode 100644 index 0000000..3fa44ca --- /dev/null +++ b/node_modules/es5-ext/test/string/random.js @@ -0,0 +1,13 @@ +"use strict"; + +var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/); + +module.exports = function (t, a) { + a(typeof t(), "string"); + a.ok(t().length > 7); + a.not(t({ isUnique: true }), t({ isUnique: true })); + a.ok(isValidFormat(t())); + a(t({ length: 1 }).length, 1); + a(t({ length: 100 }).length, 100); + a(t({ length: 0 }), ""); +}; diff --git a/node_modules/es5-ext/test/string/raw/implement.js b/node_modules/es5-ext/test/string/raw/implement.js new file mode 100644 index 0000000..25b624e --- /dev/null +++ b/node_modules/es5-ext/test/string/raw/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../string/raw/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/raw/index.js b/node_modules/es5-ext/test/string/raw/index.js new file mode 100644 index 0000000..10bb8f6 --- /dev/null +++ b/node_modules/es5-ext/test/string/raw/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/raw/is-implemented.js b/node_modules/es5-ext/test/string/raw/is-implemented.js new file mode 100644 index 0000000..5003e7e --- /dev/null +++ b/node_modules/es5-ext/test/string/raw/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/raw/shim.js b/node_modules/es5-ext/test/string/raw/shim.js new file mode 100644 index 0000000..17a11ac --- /dev/null +++ b/node_modules/es5-ext/test/string/raw/shim.js @@ -0,0 +1,15 @@ +// Partially taken from: +// https://github.com/paulmillr/es6-shim/blob/master/test/string.js + +"use strict"; + +module.exports = function (t, a) { + var callSite = []; + + callSite.raw = ["The total is ", " ($", " with tax)"]; + a(t(callSite, "{total}", "{total * 1.01}"), + "The total is {total} (${total * 1.01} with tax)"); + + callSite.raw = []; + a(t(callSite, "{total}", "{total * 1.01}"), ""); +}; diff --git a/node_modules/es5-ext/test/to-short-string-representation.js b/node_modules/es5-ext/test/to-short-string-representation.js new file mode 100644 index 0000000..ea9a06d --- /dev/null +++ b/node_modules/es5-ext/test/to-short-string-representation.js @@ -0,0 +1,23 @@ +"use strict"; + +var repeat = require("../string/#/repeat"); + +module.exports = function (t, a) { + a(t(), "undefined"); + a(t(null), "null"); + a(t(10), "10"); + a(t("str"), "str"); + a( + t({ + toString: function () { + return "miszka"; + } + }), + "miszka" + ); + // eslint-disable-next-line symbol-description + if (typeof Symbol === "function") a(t(Symbol()), "Symbol()"); + a(t(Object.create(null)), ""); + a(t(repeat.call("a", 300)), repeat.call("a", 99) + "…"); + a(t("mar\ntoo\nfar"), "mar\\ntoo\\nfar"); +}; diff --git a/node_modules/es5-ext/to-short-string-representation.js b/node_modules/es5-ext/to-short-string-representation.js new file mode 100644 index 0000000..5aede53 --- /dev/null +++ b/node_modules/es5-ext/to-short-string-representation.js @@ -0,0 +1,16 @@ +"use strict"; + +var safeToString = require("./safe-to-string"); + +var reNewLine = /[\n\r\u2028\u2029]/g; + +module.exports = function (value) { + var string = safeToString(value); + // Trim if too long + if (string.length > 100) string = string.slice(0, 99) + "…"; + // Replace eventual new lines + string = string.replace(reNewLine, function (char) { + return JSON.stringify(char).slice(1, -1); + }); + return string; +}; diff --git a/node_modules/es6-iterator/#/chain.js b/node_modules/es6-iterator/#/chain.js new file mode 100644 index 0000000..190a346 --- /dev/null +++ b/node_modules/es6-iterator/#/chain.js @@ -0,0 +1,40 @@ +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , d = require("d") + , Iterator = require("../") + , validIterable = require("../valid-iterable") + + , push = Array.prototype.push + , defineProperties = Object.defineProperties + , IteratorChain; + +IteratorChain = function (iterators) { + defineProperties(this, { + __iterators__: d("", iterators), + __current__: d("w", iterators.shift()) + }); +}; +if (setPrototypeOf) setPrototypeOf(IteratorChain, Iterator); + +IteratorChain.prototype = Object.create(Iterator.prototype, { + constructor: d(IteratorChain), + next: d(function () { + var result; + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + while (result.done) { + this.__current__ = this.__iterators__.shift(); + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + } + return result; + }) +}); + +module.exports = function () { + var iterators = [this]; + push.apply(iterators, arguments); + iterators.forEach(validIterable); + return new IteratorChain(iterators); +}; diff --git a/node_modules/es6-iterator/.editorconfig b/node_modules/es6-iterator/.editorconfig new file mode 100644 index 0000000..c24a6cd --- /dev/null +++ b/node_modules/es6-iterator/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/node_modules/es6-iterator/.npmignore b/node_modules/es6-iterator/.npmignore new file mode 100644 index 0000000..a91db65 --- /dev/null +++ b/node_modules/es6-iterator/.npmignore @@ -0,0 +1,12 @@ +.DS_Store +Thumbs.db +/.idea +/.vscode +npm-debug.log +/wallaby.js +/node_modules +/.travis.yml +/.gitignore +/.circle.yml +/.circleci +/.appveyor.yml diff --git a/node_modules/es6-iterator/CHANGELOG.md b/node_modules/es6-iterator/CHANGELOG.md new file mode 100644 index 0000000..37eb16a --- /dev/null +++ b/node_modules/es6-iterator/CHANGELOG.md @@ -0,0 +1,27 @@ +# 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. + + +## [2.0.3](https://github.com/medikoo/es6-iterator/compare/v2.0.2...v2.0.3) (2017-10-17) + + +### Bug Fixes + +* configurability of toStringTag ([b99f692](https://github.com/medikoo/es6-iterator/commit/b99f692)) + + + + +## [2.0.2](https://github.com/medikoo/es6-iterator/compare/v2.0.1...v2.0.2) (2017-10-17) + + +### Bug Fixes + +* constructor exposure ([dbc0c51](https://github.com/medikoo/es6-iterator/commit/dbc0c51)) +* do not allow non constructor calls ([1f2f800](https://github.com/medikoo/es6-iterator/commit/1f2f800)) +* toString and toStringTag symbol definitions. ([2d17786](https://github.com/medikoo/es6-iterator/commit/2d17786)), closes [#6](https://github.com/medikoo/es6-iterator/issues/6) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/es6-iterator/CHANGES b/node_modules/es6-iterator/CHANGES new file mode 100644 index 0000000..83095f7 --- /dev/null +++ b/node_modules/es6-iterator/CHANGES @@ -0,0 +1,42 @@ +For recent changelog see CHANGELOG.md + +----- + +v2.0.1 -- 2017.03.15 +* Update dependencies + +v2.0.0 -- 2015.10.02 +* Use es6-symbol at v3 + +v1.0.0 -- 2015.06.23 +* Implement support for arguments object +* Drop support for v0.8 node ('^' in package.json dependencies) + +v0.1.3 -- 2015.02.02 +* Update dependencies +* Fix spelling of LICENSE + +v0.1.2 -- 2014.11.19 +* Optimise internal `_next` to not verify internal's list length at all times + (#2 thanks @RReverser) +* Fix documentation examples +* Configure lint scripts + +v0.1.1 -- 2014.04.29 +* Fix es6-symbol dependency version + +v0.1.0 -- 2014.04.29 +* Assure strictly npm hosted dependencies +* Remove sparse arrays dedicated handling (as per spec) +* Add: isIterable, validIterable and chain (method) +* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from) +* Add break possiblity to 'forOf' via 'doBreak' function argument +* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator) +* Provide @@toStringTag symbol +* When available rely on @@iterator symbol +* Remove 32bit integer maximum list length restriction +* Improve Iterator internals +* Update to use latest version of dependencies + +v0.0.0 -- 2013.10.12 +Initial (dev version) diff --git a/node_modules/es6-iterator/LICENSE b/node_modules/es6-iterator/LICENSE new file mode 100644 index 0000000..d7c36d5 --- /dev/null +++ b/node_modules/es6-iterator/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2017 Mariusz Nowak (www.medikoo.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/node_modules/es6-iterator/README.md b/node_modules/es6-iterator/README.md new file mode 100644 index 0000000..288373d --- /dev/null +++ b/node_modules/es6-iterator/README.md @@ -0,0 +1,148 @@ +# es6-iterator +## ECMAScript 6 Iterator interface + +### Installation + + $ npm install es6-iterator + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## API + +### Constructors + +#### Iterator(list) _(es6-iterator)_ + +Abstract Iterator interface. Meant for extensions and not to be used on its own. + +Accepts any _list_ object (technically object with numeric _length_ property). + +_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_ + +```javascript +var Iterator = require('es6-iterator') +var iterator = new Iterator([1, 2, 3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + + +#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_ + +Dedicated for arrays and array-likes. Supports three iteration kinds: +* __value__ _(default)_ - Iterates values +* __key__ - Iterates indexes +* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form. + + +```javascript +var ArrayIterator = require('es6-iterator/array') +var iterator = new ArrayIterator([1, 2, 3], 'key+value'); + +iterator.next(); // { value: [0, 1], done: false } +iterator.next(); // { value: [1, 2], done: false } +iterator.next(); // { value: [2, 3], done: false } +iterator.next(); // { value: undefined, done: true } +``` + +May also be used for _arguments_ objects: + +```javascript +(function () { + var iterator = new ArrayIterator(arguments); + + iterator.next(); // { value: 1, done: false } + iterator.next(); // { value: 2, done: false } + iterator.next(); // { value: 3, done: false } + iterator.next(); // { value: undefined, done: true } +}(1, 2, 3)); +``` + +#### StringIterator(str) _(es6-iterator/string)_ + +Assures proper iteration over unicode symbols. +See: http://mathiasbynens.be/notes/javascript-unicode + +```javascript +var StringIterator = require('es6-iterator/string'); +var iterator = new StringIterator('f🙈o🙉o🙊'); + +iterator.next(); // { value: 'f', done: false } +iterator.next(); // { value: '🙈', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙉', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙊', done: false } +iterator.next(); // { value: undefined, done: true } +``` + +### Function utilities + +#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_ + +Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement. + +``` +var forOf = require('es6-iterator/for-of'); +var result = []; + +forOf('🙈🙉🙊', function (monkey) { result.push(monkey); }); +console.log(result); // ['🙈', '🙉', '🙊']; +``` + +Optionally you can break iteration at any point: + +```javascript +var result = []; + +forOf([1,2,3,4]', function (val, doBreak) { + result.push(monkey); + if (val >= 3) doBreak(); +}); +console.log(result); // [1, 2, 3]; +``` + +#### get(obj) _(es6-iterator/get)_ + +Return iterator for any iterable object. + +```javascript +var getIterator = require('es6-iterator/get'); +var iterator = get([1,2,3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + +#### isIterable(obj) _(es6-iterator/is-iterable)_ + +Whether _obj_ is iterable + +```javascript +var isIterable = require('es6-iterator/is-iterable'); + +isIterable(null); // false +isIterable(true); // false +isIterable('str'); // true +isIterable(['a', 'r', 'r']); // true +isIterable(new ArrayIterator([])); // true +``` + +#### validIterable(obj) _(es6-iterator/valid-iterable)_ + +If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown. + +### Method extensions + +#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_ + +Chain multiple iterators into one. + +### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator) + + $ npm test diff --git a/node_modules/es6-iterator/appveyor.yml b/node_modules/es6-iterator/appveyor.yml new file mode 100644 index 0000000..942ab82 --- /dev/null +++ b/node_modules/es6-iterator/appveyor.yml @@ -0,0 +1,26 @@ +# Test against the latest version of this Node.js version +environment: + matrix: + # node.js + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "6" + - nodejs_version: "8" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm test + +# Don't actually build. +build: off diff --git a/node_modules/es6-iterator/array.js b/node_modules/es6-iterator/array.js new file mode 100644 index 0000000..d7a46a4 --- /dev/null +++ b/node_modules/es6-iterator/array.js @@ -0,0 +1,32 @@ +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , contains = require("es5-ext/string/#/contains") + , d = require("d") + , Symbol = require("es6-symbol") + , Iterator = require("./"); + +var defineProperty = Object.defineProperty, ArrayIterator; + +ArrayIterator = module.exports = function (arr, kind) { + if (!(this instanceof ArrayIterator)) throw new TypeError("Constructor requires 'new'"); + Iterator.call(this, arr); + if (!kind) kind = "value"; + else if (contains.call(kind, "key+value")) kind = "key+value"; + else if (contains.call(kind, "key")) kind = "key"; + else kind = "value"; + defineProperty(this, "__kind__", d("", kind)); +}; +if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete ArrayIterator.prototype.constructor; + +ArrayIterator.prototype = Object.create(Iterator.prototype, { + _resolve: d(function (i) { + if (this.__kind__ === "value") return this.__list__[i]; + if (this.__kind__ === "key+value") return [i, this.__list__[i]]; + return i; + }) +}); +defineProperty(ArrayIterator.prototype, Symbol.toStringTag, d("c", "Array Iterator")); diff --git a/node_modules/es6-iterator/for-of.js b/node_modules/es6-iterator/for-of.js new file mode 100644 index 0000000..5d15c34 --- /dev/null +++ b/node_modules/es6-iterator/for-of.js @@ -0,0 +1,47 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , callable = require("es5-ext/object/valid-callable") + , isString = require("es5-ext/string/is-string") + , get = require("./get"); + +var isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some; + +module.exports = function (iterable, cb /*, thisArg*/) { + var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code; + if (isArray(iterable) || isArguments(iterable)) mode = "array"; + else if (isString(iterable)) mode = "string"; + else iterable = get(iterable); + + callable(cb); + doBreak = function () { + broken = true; + }; + if (mode === "array") { + some.call(iterable, function (value) { + call.call(cb, thisArg, value, doBreak); + return broken; + }); + return; + } + if (mode === "string") { + length = iterable.length; + for (i = 0; i < length; ++i) { + char = iterable[i]; + if (i + 1 < length) { + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) char += iterable[++i]; + } + call.call(cb, thisArg, char, doBreak); + if (broken) break; + } + return; + } + result = iterable.next(); + + while (!result.done) { + call.call(cb, thisArg, result.value, doBreak); + if (broken) return; + result = iterable.next(); + } +}; diff --git a/node_modules/es6-iterator/get.js b/node_modules/es6-iterator/get.js new file mode 100644 index 0000000..d36c9e2 --- /dev/null +++ b/node_modules/es6-iterator/get.js @@ -0,0 +1,15 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , isString = require("es5-ext/string/is-string") + , ArrayIterator = require("./array") + , StringIterator = require("./string") + , iterable = require("./valid-iterable") + , iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (obj) { + if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol](); + if (isArguments(obj)) return new ArrayIterator(obj); + if (isString(obj)) return new StringIterator(obj); + return new ArrayIterator(obj); +}; diff --git a/node_modules/es6-iterator/index.js b/node_modules/es6-iterator/index.js new file mode 100644 index 0000000..790475f --- /dev/null +++ b/node_modules/es6-iterator/index.js @@ -0,0 +1,106 @@ +"use strict"; + +var clear = require("es5-ext/array/#/clear") + , assign = require("es5-ext/object/assign") + , callable = require("es5-ext/object/valid-callable") + , value = require("es5-ext/object/valid-value") + , d = require("d") + , autoBind = require("d/auto-bind") + , Symbol = require("es6-symbol"); + +var defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator; + +module.exports = Iterator = function (list, context) { + if (!(this instanceof Iterator)) throw new TypeError("Constructor requires 'new'"); + defineProperties(this, { + __list__: d("w", value(list)), + __context__: d("w", context), + __nextIndex__: d("w", 0) + }); + if (!context) return; + callable(context.on); + context.on("_add", this._onAdd); + context.on("_delete", this._onDelete); + context.on("_clear", this._onClear); +}; + +// Internal %IteratorPrototype% doesn't expose its constructor +delete Iterator.prototype.constructor; + +defineProperties( + Iterator.prototype, + assign( + { + _next: d(function () { + var i; + if (!this.__list__) return undefined; + if (this.__redo__) { + i = this.__redo__.shift(); + if (i !== undefined) return i; + } + if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + next: d(function () { + return this._createResult(this._next()); + }), + _createResult: d(function (i) { + if (i === undefined) return { done: true, value: undefined }; + return { done: false, value: this._resolve(i) }; + }), + _resolve: d(function (i) { + return this.__list__[i]; + }), + _unBind: d(function () { + this.__list__ = null; + delete this.__redo__; + if (!this.__context__) return; + this.__context__.off("_add", this._onAdd); + this.__context__.off("_delete", this._onDelete); + this.__context__.off("_clear", this._onClear); + this.__context__ = null; + }), + toString: d(function () { + return "[object " + (this[Symbol.toStringTag] || "Object") + "]"; + }) + }, + autoBind({ + _onAdd: d(function (index) { + if (index >= this.__nextIndex__) return; + ++this.__nextIndex__; + if (!this.__redo__) { + defineProperty(this, "__redo__", d("c", [index])); + return; + } + this.__redo__.forEach(function (redo, i) { + if (redo >= index) this.__redo__[i] = ++redo; + }, this); + this.__redo__.push(index); + }), + _onDelete: d(function (index) { + var i; + if (index >= this.__nextIndex__) return; + --this.__nextIndex__; + if (!this.__redo__) return; + i = this.__redo__.indexOf(index); + if (i !== -1) this.__redo__.splice(i, 1); + this.__redo__.forEach(function (redo, j) { + if (redo > index) this.__redo__[j] = --redo; + }, this); + }), + _onClear: d(function () { + if (this.__redo__) clear.call(this.__redo__); + this.__nextIndex__ = 0; + }) + }) + ) +); + +defineProperty( + Iterator.prototype, + Symbol.iterator, + d(function () { + return this; + }) +); diff --git a/node_modules/es6-iterator/is-iterable.js b/node_modules/es6-iterator/is-iterable.js new file mode 100644 index 0000000..cda7dfe --- /dev/null +++ b/node_modules/es6-iterator/is-iterable.js @@ -0,0 +1,16 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , isValue = require("es5-ext/object/is-value") + , isString = require("es5-ext/string/is-string"); + +var iteratorSymbol = require("es6-symbol").iterator + , isArray = Array.isArray; + +module.exports = function (value) { + if (!isValue(value)) return false; + if (isArray(value)) return true; + if (isString(value)) return true; + if (isArguments(value)) return true; + return typeof value[iteratorSymbol] === "function"; +}; diff --git a/node_modules/es6-iterator/package.json b/node_modules/es6-iterator/package.json new file mode 100644 index 0000000..6e3f0f4 --- /dev/null +++ b/node_modules/es6-iterator/package.json @@ -0,0 +1,76 @@ +{ + "_from": "es6-iterator@2", + "_id": "es6-iterator@2.0.3", + "_inBundle": false, + "_integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "_location": "/es6-iterator", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "es6-iterator@2", + "name": "es6-iterator", + "escapedName": "es6-iterator", + "rawSpec": "2", + "saveSpec": null, + "fetchSpec": "2" + }, + "_requiredBy": [ + "/cli-color", + "/es5-ext", + "/es6-weak-map" + ], + "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "_shasum": "a7de889141a05a94b0854403b2d0a0fbfa98f3b7", + "_spec": "es6-iterator@2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/cli-color", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "bugs": { + "url": "https://github.com/medikoo/es6-iterator/issues" + }, + "bundleDependencies": false, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + }, + "deprecated": false, + "description": "Iterator abstraction based on ES6 specification", + "devDependencies": { + "eslint": "^4.9", + "eslint-config-medikoo-es5": "^1.4.4", + "event-emitter": "^0.3.5", + "tad": "^0.2.7" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "rules": { + "no-extend-native": "off" + } + }, + "homepage": "https://github.com/medikoo/es6-iterator#readme", + "keywords": [ + "iterator", + "array", + "list", + "set", + "map", + "generator" + ], + "license": "MIT", + "name": "es6-iterator", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-iterator.git" + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node ./node_modules/tad/bin/tad" + }, + "version": "2.0.3" +} diff --git a/node_modules/es6-iterator/string.js b/node_modules/es6-iterator/string.js new file mode 100644 index 0000000..4888225 --- /dev/null +++ b/node_modules/es6-iterator/string.js @@ -0,0 +1,39 @@ +// Thanks @mathiasbynens +// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols + +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , d = require("d") + , Symbol = require("es6-symbol") + , Iterator = require("./"); + +var defineProperty = Object.defineProperty, StringIterator; + +StringIterator = module.exports = function (str) { + if (!(this instanceof StringIterator)) throw new TypeError("Constructor requires 'new'"); + str = String(str); + Iterator.call(this, str); + defineProperty(this, "__length__", d("", str.length)); +}; +if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete StringIterator.prototype.constructor; + +StringIterator.prototype = Object.create(Iterator.prototype, { + _next: d(function () { + if (!this.__list__) return undefined; + if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + _resolve: d(function (i) { + var char = this.__list__[i], code; + if (this.__nextIndex__ === this.__length__) return char; + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++]; + return char; + }) +}); +defineProperty(StringIterator.prototype, Symbol.toStringTag, d("c", "String Iterator")); diff --git a/node_modules/es6-iterator/test/#/chain.js b/node_modules/es6-iterator/test/#/chain.js new file mode 100644 index 0000000..457356f --- /dev/null +++ b/node_modules/es6-iterator/test/#/chain.js @@ -0,0 +1,23 @@ +"use strict"; + +var Iterator = require("../../"); + +module.exports = function (t, a) { + var i1 = new Iterator(["raz", "dwa", "trzy"]) + , i2 = new Iterator(["cztery", "pięć", "sześć"]) + , i3 = new Iterator(["siedem", "osiem", "dziewięć"]) + + , iterator = t.call(i1, i2, i3); + + a.deep(iterator.next(), { done: false, value: "raz" }, "#1"); + a.deep(iterator.next(), { done: false, value: "dwa" }, "#2"); + a.deep(iterator.next(), { done: false, value: "trzy" }, "#3"); + a.deep(iterator.next(), { done: false, value: "cztery" }, "#4"); + a.deep(iterator.next(), { done: false, value: "pięć" }, "#5"); + a.deep(iterator.next(), { done: false, value: "sześć" }, "#6"); + a.deep(iterator.next(), { done: false, value: "siedem" }, "#7"); + a.deep(iterator.next(), { done: false, value: "osiem" }, "#8"); + a.deep(iterator.next(), { done: false, value: "dziewięć" }, "#9"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #1"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #2"); +}; diff --git a/node_modules/es6-iterator/test/.eslintrc.json b/node_modules/es6-iterator/test/.eslintrc.json new file mode 100644 index 0000000..99f0b65 --- /dev/null +++ b/node_modules/es6-iterator/test/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "id-length": "off" + } +} diff --git a/node_modules/es6-iterator/test/array.js b/node_modules/es6-iterator/test/array.js new file mode 100644 index 0000000..447dfa7 --- /dev/null +++ b/node_modules/es6-iterator/test/array.js @@ -0,0 +1,67 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T) { + return { + "Values": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: "dwa" }, "Insert"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: "pięć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys & Values": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x, "key+value"); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: [0, "raz"] }, "#1"); + a.deep(it.next(), { done: false, value: [1, "dwa"] }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: [2, "dwa"] }, "Insert"); + a.deep(it.next(), { done: false, value: [3, "trzy"] }, "#3"); + a.deep(it.next(), { done: false, value: [4, "cztery"] }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: [5, "pięć"] }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x, "key"); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: 0 }, "#1"); + a.deep(it.next(), { done: false, value: 1 }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: 2 }, "Insert"); + a.deep(it.next(), { done: false, value: 3 }, "#3"); + a.deep(it.next(), { done: false, value: 4 }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: 5 }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Sparse": function (a) { + var x = new Array(6), it; + + x[2] = "raz"; + x[4] = "dwa"; + it = new T(x); + a.deep(it.next(), { done: false, value: undefined }, "#1"); + a.deep(it.next(), { done: false, value: undefined }, "#2"); + a.deep(it.next(), { done: false, value: "raz" }, "#3"); + a.deep(it.next(), { done: false, value: undefined }, "#4"); + a.deep(it.next(), { done: false, value: "dwa" }, "#5"); + a.deep(it.next(), { done: false, value: undefined }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/node_modules/es6-iterator/test/for-of.js b/node_modules/es6-iterator/test/for-of.js new file mode 100644 index 0000000..9b47e97 --- /dev/null +++ b/node_modules/es6-iterator/test/for-of.js @@ -0,0 +1,42 @@ +"use strict"; + +var ArrayIterator = require("../array") + + , slice = Array.prototype.slice; + +module.exports = function (t, a) { + var i = 0, x = ["raz", "dwa", "trzy"], y = {}, called = 0; + t(x, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); + a(this, y, "Array: context: " + i++ + "#"); + }, y); + i = 0; + t((function () { + return arguments; +}("raz", "dwa", "trzy")), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#"); + a(this, y, "Arguments: context: " + i++ + "#"); + }, y); + i = 0; + t(x = "foo", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Regular String: context: " + i++ + "#"); + }, y); + i = 0; + x = ["r", "💩", "z"]; + t("r💩z", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Unicode String: context: " + i++ + "#"); + }, y); + i = 0; + t(new ArrayIterator(x), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); + a(this, y, "Iterator: context: " + i++ + "#"); + }, y); + + t(x = ["raz", "dwa", "trzy"], function (value, doBreak) { + ++called; + return doBreak(); + }); + a(called, 1, "Break"); +}; diff --git a/node_modules/es6-iterator/test/get.js b/node_modules/es6-iterator/test/get.js new file mode 100644 index 0000000..c5947d3 --- /dev/null +++ b/node_modules/es6-iterator/test/get.js @@ -0,0 +1,27 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var iterator; + a.throws(function () { + t(); +}, TypeError, "Null"); + a.throws(function () { + t({}); +}, TypeError, "Plain object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(iterator) instanceof Iterator, true, "Iterator"); + a(String(t([])), "[object Array Iterator]", " Array"); + a(String(t(function () { + return arguments; +}())), "[object Array Iterator]", " Arguments"); + a(String(t("foo")), "[object String Iterator]", "String"); +}; diff --git a/node_modules/es6-iterator/test/index.js b/node_modules/es6-iterator/test/index.js new file mode 100644 index 0000000..4898218 --- /dev/null +++ b/node_modules/es6-iterator/test/index.js @@ -0,0 +1,99 @@ +"use strict"; + +var ee = require("event-emitter") + , iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T) { + return { + "": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć"], it, y, z; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + y = it.next(); + a.deep(y, { done: false, value: "raz" }, "#1"); + z = it.next(); + a.not(y, z, "Recreate result"); + a.deep(z, { done: false, value: "dwa" }, "#2"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + a.deep(it.next(), { done: false, value: "pięć" }, "#5"); + a.deep(y = it.next(), { done: true, value: undefined }, "End"); + a.not(y, it.next(), "Recreate result on dead"); + }, + "Emited": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + y.emit("_add", x.push("sześć") - 1); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + x.splice(5, 1); + y.emit("_delete", 5); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + a.deep(it.next(), { done: false, value: "sześć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited #2": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + x.splice(1, 0, "1.25"); + y.emit("_add", 1); + x.splice(0, 1); + y.emit("_delete", 0); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + x.splice(5, 1); + y.emit("_delete", 5); + a.deep(it.next(), { done: false, value: "sześć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #1": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.length = 0; + y.emit("_clear"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #2": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.length = 0; + y.emit("_clear"); + x.push("foo"); + x.push("bar"); + a.deep(it.next(), { done: false, value: "foo" }, "#3"); + a.deep(it.next(), { done: false, value: "bar" }, "#4"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + x.splice(1, 0, "1.25"); + y.emit("_add", 1); + x.splice(0, 1); + y.emit("_delete", 0); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/node_modules/es6-iterator/test/is-iterable.js b/node_modules/es6-iterator/test/is-iterable.js new file mode 100644 index 0000000..5787351 --- /dev/null +++ b/node_modules/es6-iterator/test/is-iterable.js @@ -0,0 +1,23 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var iterator; + a(t(), false, "Undefined"); + a(t(123), false, "Number"); + a(t({}), false, "Plain object"); + a(t({ length: 0 }), false, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(iterator), true, "Iterator"); + a(t([]), true, "Array"); + a(t("foo"), true, "String"); + a(t(""), true, "Empty string"); + a(t(function () { + return arguments; +}()), true, "Arguments"); +}; diff --git a/node_modules/es6-iterator/test/string.js b/node_modules/es6-iterator/test/string.js new file mode 100644 index 0000000..3f2a5b6 --- /dev/null +++ b/node_modules/es6-iterator/test/string.js @@ -0,0 +1,23 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T, a) { + var it = new T("foobar"); + + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: "f" }, "#1"); + a.deep(it.next(), { done: false, value: "o" }, "#2"); + a.deep(it.next(), { done: false, value: "o" }, "#3"); + a.deep(it.next(), { done: false, value: "b" }, "#4"); + a.deep(it.next(), { done: false, value: "a" }, "#5"); + a.deep(it.next(), { done: false, value: "r" }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + + a.h1("Outside of BMP"); + it = new T("r💩z"); + a.deep(it.next(), { done: false, value: "r" }, "#1"); + a.deep(it.next(), { done: false, value: "💩" }, "#2"); + a.deep(it.next(), { done: false, value: "z" }, "#3"); + a.deep(it.next(), { done: true, value: undefined }, "End"); +}; diff --git a/node_modules/es6-iterator/test/valid-iterable.js b/node_modules/es6-iterator/test/valid-iterable.js new file mode 100644 index 0000000..b8b2a8a --- /dev/null +++ b/node_modules/es6-iterator/test/valid-iterable.js @@ -0,0 +1,28 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var obj; + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t({}); +}, TypeError, "Plain object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + obj = {}; + obj[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(obj), obj, "Iterator"); + obj = []; + a(t(obj), obj, "Array"); + obj = (function () { + return arguments; +}()); + a(t(obj), obj, "Arguments"); +}; diff --git a/node_modules/es6-iterator/valid-iterable.js b/node_modules/es6-iterator/valid-iterable.js new file mode 100644 index 0000000..8c6e071 --- /dev/null +++ b/node_modules/es6-iterator/valid-iterable.js @@ -0,0 +1,8 @@ +"use strict"; + +var isIterable = require("./is-iterable"); + +module.exports = function (value) { + if (!isIterable(value)) throw new TypeError(value + " is not iterable"); + return value; +}; diff --git a/node_modules/es6-symbol/.lint b/node_modules/es6-symbol/.lint new file mode 100644 index 0000000..df1e53c --- /dev/null +++ b/node_modules/es6-symbol/.lint @@ -0,0 +1,15 @@ +@root + +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus +newcap +vars + +predef+ Symbol diff --git a/node_modules/es6-symbol/.npmignore b/node_modules/es6-symbol/.npmignore new file mode 100644 index 0000000..155e41f --- /dev/null +++ b/node_modules/es6-symbol/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/node_modules/es6-symbol/.travis.yml b/node_modules/es6-symbol/.travis.yml new file mode 100644 index 0000000..0b1f5e4 --- /dev/null +++ b/node_modules/es6-symbol/.travis.yml @@ -0,0 +1,11 @@ +sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +language: node_js +node_js: + - 0.12 + - v4 + - v5 + - v6 + +notifications: + email: + - medikoo+es6-symbol@medikoo.com diff --git a/node_modules/es6-symbol/CHANGES b/node_modules/es6-symbol/CHANGES new file mode 100644 index 0000000..017d409 --- /dev/null +++ b/node_modules/es6-symbol/CHANGES @@ -0,0 +1,57 @@ +v3.1.1 -- 2017.03.15 +* Improve documentation +* Improve error messages +* Update dependencies + +v3.1.0 -- 2016.06.03 +* Fix internals of symbol detection +* Ensure Symbol.prototype[Symbol.toPrimitive] in all cases returns primitive value + (fixes Node v6 support) +* Create native symbols whenver possible + +v3.0.2 -- 2015.12.12 +* Fix definition flow, so uneven state of Symbol implementation doesn't crash initialization of + polyfill. See #13 + +v3.0.1 -- 2015.10.22 +* Workaround for IE11 bug (reported in #12) + +v3.0.0 -- 2015.10.02 +* Reuse native symbols (e.g. iterator, toStringTag etc.) in a polyfill if they're available + Otherwise polyfill symbols may not be recognized by other functions +* Improve documentation + +v2.0.1 -- 2015.01.28 +* Fix Symbol.prototype[Symbol.isPrimitive] implementation +* Improve validation within Symbol.prototype.toString and + Symbol.prototype.valueOf + +v2.0.0 -- 2015.01.28 +* Update up to changes in specification: + * Implement `for` and `keyFor` + * Remove `Symbol.create` and `Symbol.isRegExp` + * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and + `Symbol.split` +* Rename `validSymbol` to `validateSymbol` +* Improve documentation +* Remove dead test modules + +v1.0.0 -- 2015.01.26 +* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value) +* Introduce initialization via hidden constructor +* Fix isSymbol handling of polyfill values when native Symbol is present +* Fix spelling of LICENSE +* Configure lint scripts + +v0.1.1 -- 2014.10.07 +* Fix isImplemented, so it returns true in case of polyfill +* Improve documentations + +v0.1.0 -- 2014.04.28 +* Assure strictly npm dependencies +* Update to use latest versions of dependencies +* Fix implementation detection so it doesn't crash on `String(symbol)` +* throw on `new Symbol()` (as decided by TC39) + +v0.0.0 -- 2013.11.15 +* Initial (dev) version \ No newline at end of file diff --git a/node_modules/es6-symbol/LICENSE b/node_modules/es6-symbol/LICENSE new file mode 100644 index 0000000..04724a3 --- /dev/null +++ b/node_modules/es6-symbol/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.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/node_modules/es6-symbol/README.md b/node_modules/es6-symbol/README.md new file mode 100644 index 0000000..fea9906 --- /dev/null +++ b/node_modules/es6-symbol/README.md @@ -0,0 +1,71 @@ +# es6-symbol +## ECMAScript 6 Symbol polyfill + +For more information about symbols see following links +- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html) +- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) +- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor) + +### Limitations + +Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely. + +### Usage + +If you'd like to use native version when it exists and fallback to [ponyfill](https://ponyfill.com) if it doesn't, use *es6-symbol* as following: + +```javascript +var Symbol = require('es6-symbol'); +``` + +If you want to make sure your environment implements `Symbol` globally, do: + +```javascript +require('es6-symbol/implement'); +``` + +If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do: + +```javascript +var Symbol = require('es6-symbol/polyfill'); +``` + +#### API + +Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples: + +```javascript +var Symbol = require('es6-symbol'); + +var symbol = Symbol('My custom symbol'); +var x = {}; + +x[symbol] = 'foo'; +console.log(x[symbol]); 'foo' + +// Detect iterable: +var iterator, result; +if (possiblyIterable[Symbol.iterator]) { + iterator = possiblyIterable[Symbol.iterator](); + result = iterator.next(); + while(!result.done) { + console.log(result.value); + result = iterator.next(); + } +} +``` + +### Installation +#### NPM + +In your project path: + + $ npm install es6-symbol + +##### Browser + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol) + + $ npm test diff --git a/node_modules/es6-symbol/implement.js b/node_modules/es6-symbol/implement.js new file mode 100644 index 0000000..153edac --- /dev/null +++ b/node_modules/es6-symbol/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(require('es5-ext/global'), 'Symbol', + { value: require('./polyfill'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/node_modules/es6-symbol/index.js b/node_modules/es6-symbol/index.js new file mode 100644 index 0000000..609f1fa --- /dev/null +++ b/node_modules/es6-symbol/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? Symbol : require('./polyfill'); diff --git a/node_modules/es6-symbol/is-implemented.js b/node_modules/es6-symbol/is-implemented.js new file mode 100644 index 0000000..93629d2 --- /dev/null +++ b/node_modules/es6-symbol/is-implemented.js @@ -0,0 +1,17 @@ +'use strict'; + +var validTypes = { object: true, symbol: true }; + +module.exports = function () { + var symbol; + if (typeof Symbol !== 'function') return false; + symbol = Symbol('test symbol'); + try { String(symbol); } catch (e) { return false; } + + // Return 'true' also for polyfills + if (!validTypes[typeof Symbol.iterator]) return false; + if (!validTypes[typeof Symbol.toPrimitive]) return false; + if (!validTypes[typeof Symbol.toStringTag]) return false; + + return true; +}; diff --git a/node_modules/es6-symbol/is-native-implemented.js b/node_modules/es6-symbol/is-native-implemented.js new file mode 100644 index 0000000..8676d0e --- /dev/null +++ b/node_modules/es6-symbol/is-native-implemented.js @@ -0,0 +1,5 @@ +// Exports true if environment provides native `Symbol` implementation + +'use strict'; + +module.exports = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; diff --git a/node_modules/es6-symbol/is-symbol.js b/node_modules/es6-symbol/is-symbol.js new file mode 100644 index 0000000..074cb07 --- /dev/null +++ b/node_modules/es6-symbol/is-symbol.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (x) { + if (!x) return false; + if (typeof x === 'symbol') return true; + if (!x.constructor) return false; + if (x.constructor.name !== 'Symbol') return false; + return (x[x.constructor.toStringTag] === 'Symbol'); +}; diff --git a/node_modules/es6-symbol/package.json b/node_modules/es6-symbol/package.json new file mode 100644 index 0000000..e6cc9d6 --- /dev/null +++ b/node_modules/es6-symbol/package.json @@ -0,0 +1,70 @@ +{ + "_from": "es6-symbol@~3.1.1", + "_id": "es6-symbol@3.1.1", + "_inBundle": false, + "_integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "_location": "/es6-symbol", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "es6-symbol@~3.1.1", + "name": "es6-symbol", + "escapedName": "es6-symbol", + "rawSpec": "~3.1.1", + "saveSpec": null, + "fetchSpec": "~3.1.1" + }, + "_requiredBy": [ + "/es5-ext", + "/es6-iterator", + "/es6-weak-map" + ], + "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "_shasum": "bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77", + "_spec": "es6-symbol@~3.1.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/es5-ext", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "bugs": { + "url": "https://github.com/medikoo/es6-symbol/issues" + }, + "bundleDependencies": false, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + }, + "deprecated": false, + "description": "ECMAScript 6 Symbol polyfill", + "devDependencies": { + "tad": "~0.2.7", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.4" + }, + "homepage": "https://github.com/medikoo/es6-symbol#readme", + "keywords": [ + "symbol", + "private", + "property", + "es6", + "ecmascript", + "harmony", + "ponyfill", + "polyfill" + ], + "license": "MIT", + "name": "es6-symbol", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-symbol.git" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node ./node_modules/tad/bin/tad" + }, + "version": "3.1.1" +} diff --git a/node_modules/es6-symbol/polyfill.js b/node_modules/es6-symbol/polyfill.js new file mode 100644 index 0000000..dca879a --- /dev/null +++ b/node_modules/es6-symbol/polyfill.js @@ -0,0 +1,118 @@ +// ES2015 Symbol polyfill for environments that do not (or partially) support it + +'use strict'; + +var d = require('d') + , validateSymbol = require('./validate-symbol') + + , create = Object.create, defineProperties = Object.defineProperties + , defineProperty = Object.defineProperty, objPrototype = Object.prototype + , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null) + , isNativeSafe; + +if (typeof Symbol === 'function') { + NativeSymbol = Symbol; + try { + String(NativeSymbol()); + isNativeSafe = true; + } catch (ignore) {} +} + +var generateName = (function () { + var created = create(null); + return function (desc) { + var postfix = 0, name, ie11BugWorkaround; + while (created[desc + (postfix || '')]) ++postfix; + desc += (postfix || ''); + created[desc] = true; + name = '@@' + desc; + defineProperty(objPrototype, name, d.gs(null, function (value) { + // For IE11 issue see: + // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ + // ie11-broken-getters-on-dom-objects + // https://github.com/medikoo/es6-symbol/issues/12 + if (ie11BugWorkaround) return; + ie11BugWorkaround = true; + defineProperty(this, name, d(value)); + ie11BugWorkaround = false; + })); + return name; + }; +}()); + +// Internal constructor (not one exposed) for creating Symbol instances. +// This one is used to ensure that `someSymbol instanceof Symbol` always return false +HiddenSymbol = function Symbol(description) { + if (this instanceof HiddenSymbol) throw new TypeError('Symbol is not a constructor'); + return SymbolPolyfill(description); +}; + +// Exposed `Symbol` constructor +// (returns instances of HiddenSymbol) +module.exports = SymbolPolyfill = function Symbol(description) { + var symbol; + if (this instanceof Symbol) throw new TypeError('Symbol is not a constructor'); + if (isNativeSafe) return NativeSymbol(description); + symbol = create(HiddenSymbol.prototype); + description = (description === undefined ? '' : String(description)); + return defineProperties(symbol, { + __description__: d('', description), + __name__: d('', generateName(description)) + }); +}; +defineProperties(SymbolPolyfill, { + for: d(function (key) { + if (globalSymbols[key]) return globalSymbols[key]; + return (globalSymbols[key] = SymbolPolyfill(String(key))); + }), + keyFor: d(function (s) { + var key; + validateSymbol(s); + for (key in globalSymbols) if (globalSymbols[key] === s) return key; + }), + + // To ensure proper interoperability with other native functions (e.g. Array.from) + // fallback to eventual native implementation of given symbol + hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')), + isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) || + SymbolPolyfill('isConcatSpreadable')), + iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')), + match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')), + replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')), + search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')), + species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')), + split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')), + toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')), + toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')), + unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables')) +}); + +// Internal tweaks for real symbol producer +defineProperties(HiddenSymbol.prototype, { + constructor: d(SymbolPolyfill), + toString: d('', function () { return this.__name__; }) +}); + +// Proper implementation of methods exposed on Symbol.prototype +// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype +defineProperties(SymbolPolyfill.prototype, { + toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }), + valueOf: d(function () { return validateSymbol(this); }) +}); +defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function () { + var symbol = validateSymbol(this); + if (typeof symbol === 'symbol') return symbol; + return symbol.toString(); +})); +defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol')); + +// Proper implementaton of toPrimitive and toStringTag for returned symbol instances +defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, + d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])); + +// Note: It's important to define `toPrimitive` as last one, as some implementations +// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) +// And that may invoke error in definition flow: +// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 +defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, + d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); diff --git a/node_modules/es6-symbol/test/implement.js b/node_modules/es6-symbol/test/implement.js new file mode 100644 index 0000000..eb35c30 --- /dev/null +++ b/node_modules/es6-symbol/test/implement.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof Symbol, 'function'); }; diff --git a/node_modules/es6-symbol/test/index.js b/node_modules/es6-symbol/test/index.js new file mode 100644 index 0000000..62b3296 --- /dev/null +++ b/node_modules/es6-symbol/test/index.js @@ -0,0 +1,12 @@ +'use strict'; + +var d = require('d') + + , defineProperty = Object.defineProperty; + +module.exports = function (T, a) { + var symbol = T('test'), x = {}; + defineProperty(x, symbol, d('foo')); + a(x.test, undefined, "Name"); + a(x[symbol], 'foo', "Get"); +}; diff --git a/node_modules/es6-symbol/test/is-implemented.js b/node_modules/es6-symbol/test/is-implemented.js new file mode 100644 index 0000000..bb0d645 --- /dev/null +++ b/node_modules/es6-symbol/test/is-implemented.js @@ -0,0 +1,14 @@ +'use strict'; + +var global = require('es5-ext/global') + , polyfill = require('../polyfill'); + +module.exports = function (t, a) { + var cache; + a(typeof t(), 'boolean'); + cache = global.Symbol; + global.Symbol = polyfill; + a(t(), true); + if (cache === undefined) delete global.Symbol; + else global.Symbol = cache; +}; diff --git a/node_modules/es6-symbol/test/is-native-implemented.js b/node_modules/es6-symbol/test/is-native-implemented.js new file mode 100644 index 0000000..df8ba03 --- /dev/null +++ b/node_modules/es6-symbol/test/is-native-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t, 'boolean'); }; diff --git a/node_modules/es6-symbol/test/is-symbol.js b/node_modules/es6-symbol/test/is-symbol.js new file mode 100644 index 0000000..ac24b9a --- /dev/null +++ b/node_modules/es6-symbol/test/is-symbol.js @@ -0,0 +1,16 @@ +'use strict'; + +var SymbolPoly = require('../polyfill'); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t('raz'), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof Symbol !== 'undefined') { + a(t(Symbol()), true, "Native"); + } + a(t(SymbolPoly()), true, "Polyfill"); +}; diff --git a/node_modules/es6-symbol/test/polyfill.js b/node_modules/es6-symbol/test/polyfill.js new file mode 100644 index 0000000..8b65790 --- /dev/null +++ b/node_modules/es6-symbol/test/polyfill.js @@ -0,0 +1,29 @@ +'use strict'; + +var d = require('d') + , isSymbol = require('../is-symbol') + + , defineProperty = Object.defineProperty; + +module.exports = function (T, a) { + var symbol = T('test'), x = {}; + defineProperty(x, symbol, d('foo')); + a(x.test, undefined, "Name"); + a(x[symbol], 'foo', "Get"); + a(x instanceof T, false); + + a(isSymbol(symbol), true, "Symbol"); + a(isSymbol(T.iterator), true, "iterator"); + a(isSymbol(T.toStringTag), true, "toStringTag"); + + x = {}; + x[symbol] = 'foo'; + if (typeof symbol !== 'symbol') { + a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false, + value: 'foo', writable: true }); + } + symbol = T.for('marko'); + a(isSymbol(symbol), true); + a(T.for('marko'), symbol); + a(T.keyFor(symbol), 'marko'); +}; diff --git a/node_modules/es6-symbol/test/validate-symbol.js b/node_modules/es6-symbol/test/validate-symbol.js new file mode 100644 index 0000000..2c8f84c --- /dev/null +++ b/node_modules/es6-symbol/test/validate-symbol.js @@ -0,0 +1,19 @@ +'use strict'; + +var SymbolPoly = require('../polyfill'); + +module.exports = function (t, a) { + var symbol; + a.throws(function () { t(undefined); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.throws(function () { t(true); }, TypeError, "Primitive"); + a.throws(function () { t('raz'); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Object"); + a.throws(function () { t([]); }, TypeError, "Array"); + if (typeof Symbol !== 'undefined') { + symbol = Symbol(); + a(t(symbol), symbol, "Native"); + } + symbol = SymbolPoly(); + a(t(symbol), symbol, "Polyfill"); +}; diff --git a/node_modules/es6-symbol/validate-symbol.js b/node_modules/es6-symbol/validate-symbol.js new file mode 100644 index 0000000..4275004 --- /dev/null +++ b/node_modules/es6-symbol/validate-symbol.js @@ -0,0 +1,8 @@ +'use strict'; + +var isSymbol = require('./is-symbol'); + +module.exports = function (value) { + if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); + return value; +}; diff --git a/node_modules/es6-weak-map/.lint b/node_modules/es6-weak-map/.lint new file mode 100644 index 0000000..3c9ef8d --- /dev/null +++ b/node_modules/es6-weak-map/.lint @@ -0,0 +1,13 @@ +@root + +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus + +predef+ WeakMap diff --git a/node_modules/es6-weak-map/.npmignore b/node_modules/es6-weak-map/.npmignore new file mode 100644 index 0000000..155e41f --- /dev/null +++ b/node_modules/es6-weak-map/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/node_modules/es6-weak-map/.travis.yml b/node_modules/es6-weak-map/.travis.yml new file mode 100644 index 0000000..d367a79 --- /dev/null +++ b/node_modules/es6-weak-map/.travis.yml @@ -0,0 +1,13 @@ +sudo: false # use faster docker infrastructure +language: node_js +node_js: + - 0.12 + - 4 + - 6 + - 7 + +notifications: + email: + - medikoo+es6-weak-map@medikoo.com + +script: "npm test && npm run lint" diff --git a/node_modules/es6-weak-map/CHANGES b/node_modules/es6-weak-map/CHANGES new file mode 100644 index 0000000..7772891 --- /dev/null +++ b/node_modules/es6-weak-map/CHANGES @@ -0,0 +1,45 @@ +v2.0.2 -- 2017.03.15 +* Update dependencies + +v2.0.1 -- 2015.10.02 +* Update to use es6-symbol at v3 + +v2.0.0 -- 2015.09.04 +* Relax native implementation detection, stringification of instance should returm + expected result (not necesarily prototype) + +v1.0.2 -- 2015.05.07 +* Add "ponyfill" keyword to meta description. Fixes #7 + +v1.0.1 -- 2015.04.14 +* Fix isNativeImplemented, so it's not affected by #3619 V8 bug +* Fix internal prototype resolution, in case where isNativeImplemented was true, and + native implementation was shadowed it got into stack overflow + +v1.0.0 -- 2015.04.13 +* It's v0.1.3 republished as v1.0.0 + +v0.1.4 -- 2015.04.13 +* Republish v0.1.2 as v0.1.4 due to breaking changes + (v0.1.3 should have been published as next major) + +v0.1.3 -- 2015.04.12 +* Update up to changes in specification (require new, remove clear method) +* Improve native implementation validation +* Configure lint scripts +* Rename LICENCE to LICENSE + +v0.1.2 -- 2014.09.01 +* Use internal random and unique id generator instead of external (time-uuid based). + Global uniqueness is not needed in scope of this module. Fixes #1 + +v0.1.1 -- 2014.05.15 +* Improve valid WeakMap detection + +v0.1.0 -- 2014.04.29 +* Assure to depend only npm hosted dependencies +* Update to use latest versions of dependencies +* Use ES6 symbols internally + +v0.0.0 -- 2013.10.24 +Initial (dev version) diff --git a/node_modules/es6-weak-map/LICENSE b/node_modules/es6-weak-map/LICENSE new file mode 100644 index 0000000..aaf3528 --- /dev/null +++ b/node_modules/es6-weak-map/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2013 Mariusz Nowak (www.medikoo.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/node_modules/es6-weak-map/README.md b/node_modules/es6-weak-map/README.md new file mode 100644 index 0000000..ccbade2 --- /dev/null +++ b/node_modules/es6-weak-map/README.md @@ -0,0 +1,63 @@ +# es6-weak-map +## WeakMap collection as specified in ECMAScript6 + +_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_. + +Differences are: +- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks) +- Well modularized CJS style +- Based on one solution. + +### Limitations + +- Will fail on non extensible objects provided as keys + +### Installation + + $ npm install es6-weak-map + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +If you want to make sure your environment implements `WeakMap`, do: + +```javascript +require('es6-weak-map/implement'); +``` + +If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do: + +```javascript +var WeakMap = require('es6-weak-map'); +``` + +If you strictly want to use polyfill even if native `WeakMap` exists, do: + +```javascript +var WeakMap = require('es6-weak-map/polyfill'); +``` + +#### API + +Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example: + +```javascript +var WeakMap = require('es6-weak-map'); + +var map = new WeakMap(); +var obj = {}; + +map.set(obj, 'foo'); // map +map.get(obj); // 'foo' +map.has(obj); // true +map.delete(obj); // true +map.get(obj); // undefined +map.has(obj); // false +map.set(obj, 'bar'); // map +map.has(obj); // false +``` + +## Tests [![Build Status](https://travis-ci.org/medikoo/es6-weak-map.svg)](https://travis-ci.org/medikoo/es6-weak-map) + + $ npm test diff --git a/node_modules/es6-weak-map/implement.js b/node_modules/es6-weak-map/implement.js new file mode 100644 index 0000000..6c3f306 --- /dev/null +++ b/node_modules/es6-weak-map/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(require('es5-ext/global'), 'WeakMap', + { value: require('./polyfill'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/node_modules/es6-weak-map/index.js b/node_modules/es6-weak-map/index.js new file mode 100644 index 0000000..c2ff71b --- /dev/null +++ b/node_modules/es6-weak-map/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? WeakMap : require('./polyfill'); diff --git a/node_modules/es6-weak-map/is-implemented.js b/node_modules/es6-weak-map/is-implemented.js new file mode 100644 index 0000000..6ef5082 --- /dev/null +++ b/node_modules/es6-weak-map/is-implemented.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = function () { + var weakMap, x; + if (typeof WeakMap !== 'function') return false; + try { + // WebKit doesn't support arguments and crashes + weakMap = new WeakMap([[x = {}, 'one'], [{}, 'two'], [{}, 'three']]); + } catch (e) { + return false; + } + if (String(weakMap) !== '[object WeakMap]') return false; + if (typeof weakMap.set !== 'function') return false; + if (weakMap.set({}, 1) !== weakMap) return false; + if (typeof weakMap.delete !== 'function') return false; + if (typeof weakMap.has !== 'function') return false; + if (weakMap.get(x) !== 'one') return false; + + return true; +}; diff --git a/node_modules/es6-weak-map/is-native-implemented.js b/node_modules/es6-weak-map/is-native-implemented.js new file mode 100644 index 0000000..ddc4dbd --- /dev/null +++ b/node_modules/es6-weak-map/is-native-implemented.js @@ -0,0 +1,8 @@ +// Exports true if environment provides native `WeakMap` implementation, whatever that is. + +'use strict'; + +module.exports = (function () { + if (typeof WeakMap !== 'function') return false; + return (Object.prototype.toString.call(new WeakMap()) === '[object WeakMap]'); +}()); diff --git a/node_modules/es6-weak-map/is-weak-map.js b/node_modules/es6-weak-map/is-weak-map.js new file mode 100644 index 0000000..10bb2a1 --- /dev/null +++ b/node_modules/es6-weak-map/is-weak-map.js @@ -0,0 +1,13 @@ +'use strict'; + +var toStringTagSymbol = require('es6-symbol').toStringTag + + , toString = Object.prototype.toString + , id = '[object WeakMap]' + , Global = (typeof WeakMap === 'undefined') ? null : WeakMap; + +module.exports = function (x) { + return (x && ((Global && (x instanceof Global)) || + (toString.call(x) === id) || (x[toStringTagSymbol] === 'WeakMap'))) || + false; +}; diff --git a/node_modules/es6-weak-map/package.json b/node_modules/es6-weak-map/package.json new file mode 100644 index 0000000..573614c --- /dev/null +++ b/node_modules/es6-weak-map/package.json @@ -0,0 +1,71 @@ +{ + "_from": "es6-weak-map@^2.0.2", + "_id": "es6-weak-map@2.0.2", + "_inBundle": false, + "_integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "_location": "/es6-weak-map", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "es6-weak-map@^2.0.2", + "name": "es6-weak-map", + "escapedName": "es6-weak-map", + "rawSpec": "^2.0.2", + "saveSpec": null, + "fetchSpec": "^2.0.2" + }, + "_requiredBy": [ + "/memoizee" + ], + "_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "_shasum": "5e3ab32251ffd1538a1f8e5ffa1357772f92d96f", + "_spec": "es6-weak-map@^2.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/memoizee", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "bugs": { + "url": "https://github.com/medikoo/es6-weak-map/issues" + }, + "bundleDependencies": false, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + }, + "deprecated": false, + "description": "ECMAScript6 WeakMap polyfill", + "devDependencies": { + "tad": "^0.2.7", + "xlint": "^0.2.2", + "xlint-jslint-medikoo": "^0.1.4" + }, + "homepage": "https://github.com/medikoo/es6-weak-map#readme", + "keywords": [ + "map", + "weakmap", + "collection", + "es6", + "harmony", + "list", + "hash", + "gc", + "ponyfill" + ], + "license": "MIT", + "name": "es6-weak-map", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-weak-map.git" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node ./node_modules/tad/bin/tad" + }, + "version": "2.0.2" +} diff --git a/node_modules/es6-weak-map/polyfill.js b/node_modules/es6-weak-map/polyfill.js new file mode 100644 index 0000000..6bef09f --- /dev/null +++ b/node_modules/es6-weak-map/polyfill.js @@ -0,0 +1,66 @@ +'use strict'; + +var setPrototypeOf = require('es5-ext/object/set-prototype-of') + , object = require('es5-ext/object/valid-object') + , value = require('es5-ext/object/valid-value') + , randomUniq = require('es5-ext/string/random-uniq') + , d = require('d') + , getIterator = require('es6-iterator/get') + , forOf = require('es6-iterator/for-of') + , toStringTagSymbol = require('es6-symbol').toStringTag + , isNative = require('./is-native-implemented') + + , isArray = Array.isArray, defineProperty = Object.defineProperty + , hasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf + , WeakMapPoly; + +module.exports = WeakMapPoly = function (/*iterable*/) { + var iterable = arguments[0], self; + if (!(this instanceof WeakMapPoly)) throw new TypeError('Constructor requires \'new\''); + if (isNative && setPrototypeOf && (WeakMap !== WeakMapPoly)) { + self = setPrototypeOf(new WeakMap(), getPrototypeOf(this)); + } else { + self = this; + } + if (iterable != null) { + if (!isArray(iterable)) iterable = getIterator(iterable); + } + defineProperty(self, '__weakMapData__', d('c', '$weakMap$' + randomUniq())); + if (!iterable) return self; + forOf(iterable, function (val) { + value(val); + self.set(val[0], val[1]); + }); + return self; +}; + +if (isNative) { + if (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap); + WeakMapPoly.prototype = Object.create(WeakMap.prototype, { + constructor: d(WeakMapPoly) + }); +} + +Object.defineProperties(WeakMapPoly.prototype, { + delete: d(function (key) { + if (hasOwnProperty.call(object(key), this.__weakMapData__)) { + delete key[this.__weakMapData__]; + return true; + } + return false; + }), + get: d(function (key) { + if (hasOwnProperty.call(object(key), this.__weakMapData__)) { + return key[this.__weakMapData__]; + } + }), + has: d(function (key) { + return hasOwnProperty.call(object(key), this.__weakMapData__); + }), + set: d(function (key, value) { + defineProperty(object(key), this.__weakMapData__, d('c', value)); + return this; + }), + toString: d(function () { return '[object WeakMap]'; }) +}); +defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d('c', 'WeakMap')); diff --git a/node_modules/es6-weak-map/test/implement.js b/node_modules/es6-weak-map/test/implement.js new file mode 100644 index 0000000..860027e --- /dev/null +++ b/node_modules/es6-weak-map/test/implement.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof WeakMap, 'function'); }; diff --git a/node_modules/es6-weak-map/test/index.js b/node_modules/es6-weak-map/test/index.js new file mode 100644 index 0000000..9b26e4f --- /dev/null +++ b/node_modules/es6-weak-map/test/index.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (T, a) { + var x = {}; + a((new T([[x, 'foo']])).get(x), 'foo'); +}; diff --git a/node_modules/es6-weak-map/test/is-implemented.js b/node_modules/es6-weak-map/test/is-implemented.js new file mode 100644 index 0000000..0186871 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-implemented.js @@ -0,0 +1,14 @@ +'use strict'; + +var global = require('es5-ext/global') + , polyfill = require('../polyfill'); + +module.exports = function (t, a) { + var cache; + a(typeof t(), 'boolean'); + cache = global.WeakMap; + global.WeakMap = polyfill; + a(t(), true); + if (cache === undefined) delete global.WeakMap; + else global.WeakMap = cache; +}; diff --git a/node_modules/es6-weak-map/test/is-native-implemented.js b/node_modules/es6-weak-map/test/is-native-implemented.js new file mode 100644 index 0000000..df8ba03 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-native-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t, 'boolean'); }; diff --git a/node_modules/es6-weak-map/test/is-weak-map.js b/node_modules/es6-weak-map/test/is-weak-map.js new file mode 100644 index 0000000..ba8c045 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-weak-map.js @@ -0,0 +1,16 @@ +'use strict'; + +var WeakMapPoly = require('../polyfill'); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t('raz'), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof WeakMap !== 'undefined') { + a(t(new WeakMap()), true, "Native"); + } + a(t(new WeakMapPoly()), true, "Polyfill"); +}; diff --git a/node_modules/es6-weak-map/test/polyfill.js b/node_modules/es6-weak-map/test/polyfill.js new file mode 100644 index 0000000..aaffe4a --- /dev/null +++ b/node_modules/es6-weak-map/test/polyfill.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = function (T, a) { + var x = {}, y = {}, z = {}, arr = [[x, 'raz'], [y, 'dwa']], map = new T(arr); + + a(map instanceof T, true, "WeakMap"); + a(map.has(x), true, "Has: true"); + a(map.get(x), 'raz', "Get: contains"); + a(map.has(z), false, "Has: false"); + a(map.get(z), undefined, "Get: doesn't contain"); + a(map.set(z, 'trzy'), map, "Set: return"); + a(map.has(z), true, "Add"); + a(map.delete({}), false, "Delete: false"); + + a(map.delete(x), true, "Delete: true"); + a(map.get(x), undefined, "Get: after delete"); + a(map.has(x), false, "Has: after delete"); + + a.h1("Empty initialization"); + map = new T(); + map.set(x, 'bar'); + a(map.get(x), 'bar'); +}; diff --git a/node_modules/es6-weak-map/test/valid-weak-map.js b/node_modules/es6-weak-map/test/valid-weak-map.js new file mode 100644 index 0000000..a782342 --- /dev/null +++ b/node_modules/es6-weak-map/test/valid-weak-map.js @@ -0,0 +1,19 @@ +'use strict'; + +var WeakMapPoly = require('../polyfill'); + +module.exports = function (t, a) { + var map; + a.throws(function () { t(undefined); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.throws(function () { t(true); }, TypeError, "Primitive"); + a.throws(function () { t('raz'); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Object"); + a.throws(function () { t([]); }, TypeError, "Array"); + if (typeof WeakMap !== 'undefined') { + map = new WeakMap(); + a(t(map), map, "Native"); + } + map = new WeakMapPoly(); + a(t(map), map, "Polyfill"); +}; diff --git a/node_modules/es6-weak-map/valid-weak-map.js b/node_modules/es6-weak-map/valid-weak-map.js new file mode 100644 index 0000000..bfb579f --- /dev/null +++ b/node_modules/es6-weak-map/valid-weak-map.js @@ -0,0 +1,8 @@ +'use strict'; + +var isWeakMap = require('./is-weak-map'); + +module.exports = function (x) { + if (!isWeakMap(x)) throw new TypeError(x + " is not a WeakMap"); + return x; +}; diff --git a/node_modules/escape-html/LICENSE b/node_modules/escape-html/LICENSE new file mode 100644 index 0000000..2e70de9 --- /dev/null +++ b/node_modules/escape-html/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012-2013 TJ Holowaychuk +Copyright (c) 2015 Andreas Lubbe +Copyright (c) 2015 Tiancheng "Timothy" Gu + +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/node_modules/escape-html/Readme.md b/node_modules/escape-html/Readme.md new file mode 100644 index 0000000..653d9ea --- /dev/null +++ b/node_modules/escape-html/Readme.md @@ -0,0 +1,43 @@ + +# escape-html + + Escape string for use in HTML + +## Example + +```js +var escape = require('escape-html'); +var html = escape('foo & bar'); +// -> foo & bar +``` + +## Benchmark + +``` +$ npm run-script bench + +> escape-html@1.0.3 bench nodejs-escape-html +> node benchmark/index.js + + + http_parser@1.0 + node@0.10.33 + v8@3.14.5.9 + ares@1.9.0-DEV + uv@0.10.29 + zlib@1.2.3 + modules@11 + openssl@1.0.1j + + 1 test completed. + 2 tests completed. + 3 tests completed. + + no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled) + single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled) + many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled) +``` + +## License + + MIT \ No newline at end of file diff --git a/node_modules/escape-html/index.js b/node_modules/escape-html/index.js new file mode 100644 index 0000000..bf9e226 --- /dev/null +++ b/node_modules/escape-html/index.js @@ -0,0 +1,78 @@ +/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */ + +'use strict'; + +/** + * Module variables. + * @private + */ + +var matchHtmlRegExp = /["'&<>]/; + +/** + * Module exports. + * @public + */ + +module.exports = escapeHtml; + +/** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ + +function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: // " + escape = '"'; + break; + case 38: // & + escape = '&'; + break; + case 39: // ' + escape = '''; + break; + case 60: // < + escape = '<'; + break; + case 62: // > + escape = '>'; + break; + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index + ? html + str.substring(lastIndex, index) + : html; +} diff --git a/node_modules/escape-html/package.json b/node_modules/escape-html/package.json new file mode 100644 index 0000000..c4e7fb7 --- /dev/null +++ b/node_modules/escape-html/package.json @@ -0,0 +1,62 @@ +{ + "_args": [ + [ + "escape-html@1.0.3", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "escape-html@1.0.3", + "_id": "escape-html@1.0.3", + "_inBundle": false, + "_integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "_location": "/escape-html", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "escape-html@1.0.3", + "name": "escape-html", + "escapedName": "escape-html", + "rawSpec": "1.0.3", + "saveSpec": null, + "fetchSpec": "1.0.3" + }, + "_requiredBy": [ + "/express", + "/finalhandler", + "/send", + "/serve-static" + ], + "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "_spec": "1.0.3", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/component/escape-html/issues" + }, + "description": "Escape string for use in HTML", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "1.0.0" + }, + "files": [ + "LICENSE", + "Readme.md", + "index.js" + ], + "homepage": "https://github.com/component/escape-html#readme", + "keywords": [ + "escape", + "html", + "utility" + ], + "license": "MIT", + "name": "escape-html", + "repository": { + "type": "git", + "url": "git+https://github.com/component/escape-html.git" + }, + "scripts": { + "bench": "node benchmark/index.js" + }, + "version": "1.0.3" +} diff --git a/node_modules/escape-string-regexp/index.js b/node_modules/escape-string-regexp/index.js new file mode 100644 index 0000000..7834bf9 --- /dev/null +++ b/node_modules/escape-string-regexp/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; diff --git a/node_modules/escape-string-regexp/license b/node_modules/escape-string-regexp/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/escape-string-regexp/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/node_modules/escape-string-regexp/package.json b/node_modules/escape-string-regexp/package.json new file mode 100644 index 0000000..5b8f982 --- /dev/null +++ b/node_modules/escape-string-regexp/package.json @@ -0,0 +1,81 @@ +{ + "_from": "escape-string-regexp@^1.0.5", + "_id": "escape-string-regexp@1.0.5", + "_inBundle": false, + "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "_location": "/escape-string-regexp", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "escape-string-regexp@^1.0.5", + "name": "escape-string-regexp", + "escapedName": "escape-string-regexp", + "rawSpec": "^1.0.5", + "saveSpec": null, + "fetchSpec": "^1.0.5" + }, + "_requiredBy": [ + "/chalk" + ], + "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4", + "_spec": "escape-string-regexp@^1.0.5", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Escape RegExp special characters", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme", + "keywords": [ + "escape", + "regex", + "regexp", + "re", + "regular", + "expression", + "string", + "str", + "special", + "characters" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + } + ], + "name": "escape-string-regexp", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/escape-string-regexp.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.5" +} diff --git a/node_modules/escape-string-regexp/readme.md b/node_modules/escape-string-regexp/readme.md new file mode 100644 index 0000000..87ac82d --- /dev/null +++ b/node_modules/escape-string-regexp/readme.md @@ -0,0 +1,27 @@ +# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) + +> Escape RegExp special characters + + +## Install + +``` +$ npm install --save escape-string-regexp +``` + + +## Usage + +```js +const escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('how much $ for a unicorn?'); +//=> 'how much \$ for a unicorn\?' + +new RegExp(escapedString); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/etag/HISTORY.md b/node_modules/etag/HISTORY.md new file mode 100644 index 0000000..222b293 --- /dev/null +++ b/node_modules/etag/HISTORY.md @@ -0,0 +1,83 @@ +1.8.1 / 2017-09-12 +================== + + * perf: replace regular expression with substring + +1.8.0 / 2017-02-18 +================== + + * Use SHA1 instead of MD5 for ETag hashing + - Improves performance for larger entities + - Works with FIPS 140-2 OpenSSL configuration + +1.7.0 / 2015-06-08 +================== + + * Always include entity length in ETags for hash length extensions + * Generate non-Stats ETags using MD5 only (no longer CRC32) + * Improve stat performance by removing hashing + * Remove base64 padding in ETags to shorten + * Use MD5 instead of MD4 in weak ETags over 1KB + +1.6.0 / 2015-05-10 +================== + + * Improve support for JXcore + * Remove requirement of `atime` in the stats object + * Support "fake" stats objects in environments without `fs` + +1.5.1 / 2014-11-19 +================== + + * deps: crc@3.2.1 + - Minor fixes + +1.5.0 / 2014-10-14 +================== + + * Improve string performance + * Slightly improve speed for weak ETags over 1KB + +1.4.0 / 2014-09-21 +================== + + * Support "fake" stats objects + * Support Node.js 0.6 + +1.3.1 / 2014-09-14 +================== + + * Use the (new and improved) `crc` for crc32 + +1.3.0 / 2014-08-29 +================== + + * Default strings to strong ETags + * Improve speed for weak ETags over 1KB + +1.2.1 / 2014-08-29 +================== + + * Use the (much faster) `buffer-crc32` for crc32 + +1.2.0 / 2014-08-24 +================== + + * Add support for file stat objects + +1.1.0 / 2014-08-24 +================== + + * Add fast-path for empty entity + * Add weak ETag generation + * Shrink size of generated ETags + +1.0.1 / 2014-08-24 +================== + + * Fix behavior of string containing Unicode + +1.0.0 / 2014-05-18 +================== + + * Initial release diff --git a/node_modules/etag/LICENSE b/node_modules/etag/LICENSE new file mode 100644 index 0000000..cab251c --- /dev/null +++ b/node_modules/etag/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2016 Douglas Christopher Wilson + +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/node_modules/etag/README.md b/node_modules/etag/README.md new file mode 100644 index 0000000..09c2169 --- /dev/null +++ b/node_modules/etag/README.md @@ -0,0 +1,159 @@ +# etag + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create simple HTTP ETags + +This module generates HTTP ETags (as defined in RFC 7232) for use in +HTTP responses. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install etag +``` + +## API + + + +```js +var etag = require('etag') +``` + +### etag(entity, [options]) + +Generate a strong ETag for the given entity. This should be the complete +body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By +default, a strong ETag is generated except for `fs.Stats`, which will +generate a weak ETag (this can be overwritten by `options.weak`). + + + +```js +res.setHeader('ETag', etag(body)) +``` + +#### Options + +`etag` accepts these properties in the options object. + +##### weak + +Specifies if the generated ETag will include the weak validator mark (that +is, the leading `W/`). The actual entity tag is the same. The default value +is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`. + +## Testing + +```sh +$ npm test +``` + +## Benchmark + +```bash +$ npm run-script bench + +> etag@1.8.1 bench nodejs-etag +> node benchmark/index.js + + http_parser@2.7.0 + node@6.11.1 + v8@5.1.281.103 + uv@1.11.0 + zlib@1.2.11 + ares@1.10.1-DEV + icu@58.2 + modules@48 + openssl@1.0.2k + +> node benchmark/body0-100b.js + + 100B body + + 4 tests completed. + + buffer - strong x 258,647 ops/sec ±1.07% (180 runs sampled) + buffer - weak x 263,812 ops/sec ±0.61% (184 runs sampled) + string - strong x 259,955 ops/sec ±1.19% (185 runs sampled) + string - weak x 264,356 ops/sec ±1.09% (184 runs sampled) + +> node benchmark/body1-1kb.js + + 1KB body + + 4 tests completed. + + buffer - strong x 189,018 ops/sec ±1.12% (182 runs sampled) + buffer - weak x 190,586 ops/sec ±0.81% (186 runs sampled) + string - strong x 144,272 ops/sec ±0.96% (188 runs sampled) + string - weak x 145,380 ops/sec ±1.43% (187 runs sampled) + +> node benchmark/body2-5kb.js + + 5KB body + + 4 tests completed. + + buffer - strong x 92,435 ops/sec ±0.42% (188 runs sampled) + buffer - weak x 92,373 ops/sec ±0.58% (189 runs sampled) + string - strong x 48,850 ops/sec ±0.56% (186 runs sampled) + string - weak x 49,380 ops/sec ±0.56% (190 runs sampled) + +> node benchmark/body3-10kb.js + + 10KB body + + 4 tests completed. + + buffer - strong x 55,989 ops/sec ±0.93% (188 runs sampled) + buffer - weak x 56,148 ops/sec ±0.55% (190 runs sampled) + string - strong x 27,345 ops/sec ±0.43% (188 runs sampled) + string - weak x 27,496 ops/sec ±0.45% (190 runs sampled) + +> node benchmark/body4-100kb.js + + 100KB body + + 4 tests completed. + + buffer - strong x 7,083 ops/sec ±0.22% (190 runs sampled) + buffer - weak x 7,115 ops/sec ±0.26% (191 runs sampled) + string - strong x 3,068 ops/sec ±0.34% (190 runs sampled) + string - weak x 3,096 ops/sec ±0.35% (190 runs sampled) + +> node benchmark/stats.js + + stat + + 4 tests completed. + + real - strong x 871,642 ops/sec ±0.34% (189 runs sampled) + real - weak x 867,613 ops/sec ±0.39% (190 runs sampled) + fake - strong x 401,051 ops/sec ±0.40% (189 runs sampled) + fake - weak x 400,100 ops/sec ±0.47% (188 runs sampled) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/etag.svg +[npm-url]: https://npmjs.org/package/etag +[node-version-image]: https://img.shields.io/node/v/etag.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg +[travis-url]: https://travis-ci.org/jshttp/etag +[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master +[downloads-image]: https://img.shields.io/npm/dm/etag.svg +[downloads-url]: https://npmjs.org/package/etag diff --git a/node_modules/etag/index.js b/node_modules/etag/index.js new file mode 100644 index 0000000..2a585c9 --- /dev/null +++ b/node_modules/etag/index.js @@ -0,0 +1,131 @@ +/*! + * etag + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = etag + +/** + * Module dependencies. + * @private + */ + +var crypto = require('crypto') +var Stats = require('fs').Stats + +/** + * Module variables. + * @private + */ + +var toString = Object.prototype.toString + +/** + * Generate an entity tag. + * + * @param {Buffer|string} entity + * @return {string} + * @private + */ + +function entitytag (entity) { + if (entity.length === 0) { + // fast-path empty + return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"' + } + + // compute hash of entity + var hash = crypto + .createHash('sha1') + .update(entity, 'utf8') + .digest('base64') + .substring(0, 27) + + // compute length of entity + var len = typeof entity === 'string' + ? Buffer.byteLength(entity, 'utf8') + : entity.length + + return '"' + len.toString(16) + '-' + hash + '"' +} + +/** + * Create a simple ETag. + * + * @param {string|Buffer|Stats} entity + * @param {object} [options] + * @param {boolean} [options.weak] + * @return {String} + * @public + */ + +function etag (entity, options) { + if (entity == null) { + throw new TypeError('argument entity is required') + } + + // support fs.Stats object + var isStats = isstats(entity) + var weak = options && typeof options.weak === 'boolean' + ? options.weak + : isStats + + // validate argument + if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) { + throw new TypeError('argument entity must be string, Buffer, or fs.Stats') + } + + // generate entity tag + var tag = isStats + ? stattag(entity) + : entitytag(entity) + + return weak + ? 'W/' + tag + : tag +} + +/** + * Determine if object is a Stats object. + * + * @param {object} obj + * @return {boolean} + * @api private + */ + +function isstats (obj) { + // genuine fs.Stats + if (typeof Stats === 'function' && obj instanceof Stats) { + return true + } + + // quack quack + return obj && typeof obj === 'object' && + 'ctime' in obj && toString.call(obj.ctime) === '[object Date]' && + 'mtime' in obj && toString.call(obj.mtime) === '[object Date]' && + 'ino' in obj && typeof obj.ino === 'number' && + 'size' in obj && typeof obj.size === 'number' +} + +/** + * Generate a tag for a stat. + * + * @param {object} stat + * @return {string} + * @private + */ + +function stattag (stat) { + var mtime = stat.mtime.getTime().toString(16) + var size = stat.size.toString(16) + + return '"' + size + '-' + mtime + '"' +} diff --git a/node_modules/etag/package.json b/node_modules/etag/package.json new file mode 100644 index 0000000..e222909 --- /dev/null +++ b/node_modules/etag/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "etag@1.8.1", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "etag@1.8.1", + "_id": "etag@1.8.1", + "_inBundle": false, + "_integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "_location": "/etag", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "etag@1.8.1", + "name": "etag", + "escapedName": "etag", + "rawSpec": "1.8.1", + "saveSpec": null, + "fetchSpec": "1.8.1" + }, + "_requiredBy": [ + "/express", + "/send" + ], + "_resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "_spec": "1.8.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/jshttp/etag/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "David Björklund", + "email": "david.bjorklund@gmail.com" + } + ], + "description": "Create simple HTTP ETags", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5", + "safe-buffer": "5.1.1", + "seedrandom": "2.4.3" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "homepage": "https://github.com/jshttp/etag#readme", + "keywords": [ + "etag", + "http", + "res" + ], + "license": "MIT", + "name": "etag", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/etag.git" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.8.1" +} diff --git a/node_modules/event-emitter/.lint b/node_modules/event-emitter/.lint new file mode 100644 index 0000000..f76e528 --- /dev/null +++ b/node_modules/event-emitter/.lint @@ -0,0 +1,15 @@ +@root + +module +es5 + +indent 2 +maxlen 80 +tabs + +ass +plusplus +nomen + +./benchmark +predef+ console diff --git a/node_modules/event-emitter/.npmignore b/node_modules/event-emitter/.npmignore new file mode 100644 index 0000000..68ebfdd --- /dev/null +++ b/node_modules/event-emitter/.npmignore @@ -0,0 +1,3 @@ +.DS_Store +/.lintcache +/node_modules diff --git a/node_modules/event-emitter/.testignore b/node_modules/event-emitter/.testignore new file mode 100644 index 0000000..f9c8c38 --- /dev/null +++ b/node_modules/event-emitter/.testignore @@ -0,0 +1 @@ +/benchmark diff --git a/node_modules/event-emitter/.travis.yml b/node_modules/event-emitter/.travis.yml new file mode 100644 index 0000000..5f29034 --- /dev/null +++ b/node_modules/event-emitter/.travis.yml @@ -0,0 +1,16 @@ +sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +language: node_js +node_js: + - 0.12 + - 4 + - 6 + - 7 + +before_install: + - mkdir node_modules; ln -s ../ node_modules/event-emitter + +notifications: + email: + - medikoo+event-emitter@medikoo.com + +script: "npm test && npm run lint" diff --git a/node_modules/event-emitter/CHANGES b/node_modules/event-emitter/CHANGES new file mode 100644 index 0000000..3ac46ce --- /dev/null +++ b/node_modules/event-emitter/CHANGES @@ -0,0 +1,73 @@ +v0.3.5 -- 2017.03.15 +* Improve documentation +* Update dependencies + +v0.3.4 -- 2015.10.02 +* Add `emitError` extension + +v0.3.3 -- 2015.01.30 +* Fix reference to module in benchmarks + +v0.3.2 -- 2015.01.20 +* Improve documentation +* Configure lint scripts +* Fix spelling of LICENSE + +v0.3.1 -- 2014.04.25 +* Fix redefinition of emit method in `pipe` +* Allow custom emit method name in `pipe` + +v0.3.0 -- 2014.04.24 +* Move out from lib folder +* Do not expose all utilities on main module +* Support objects which do not inherit from Object.prototype +* Improve arguments validation +* Improve internals +* Remove Makefile +* Improve documentation + +v0.2.2 -- 2013.06.05 +* `unify` functionality + +v0.2.1 -- 2012.09.21 +* hasListeners module +* Simplified internal id (improves performance a little), now it starts with + underscore (hint it's private). Abstracted it to external module to have it + one place +* Documentation cleanup + +v0.2.0 -- 2012.09.19 +* Trashed poor implementation of v0.1 and came up with something solid + +Changes: +* Improved performance +* Fixed bugs event-emitter is now cross-prototype safe and not affected by + unexpected methods attached to Object.prototype +* Removed support for optional "emitter" argument in `emit` method, it was + cumbersome to use, and should be solved just with event objects + +v0.1.5 -- 2012.08.06 +* (maintanance) Do not use descriptors for internal objects, it exposes V8 bugs + (only Node v0.6 branch) + +v0.1.4 -- 2012.06.13 +* Fix detachment of listeners added with 'once' + +v0.1.3 -- 2012.05.28 +* Updated es5-ext to latest version (v0.8) +* Cleared package.json so it's in npm friendly format + +v0.1.2 -- 2012.01.22 +* Support for emitter argument in emit function, this allows some listeners not + to be notified about event +* allOff - removes all listeners from object +* All methods returns self object +* Internal fixes +* Travis CI integration + +v0.1.1 -- 2011.08.08 +* Added TAD test suite to devDependencies, configured test commands. + Tests can be run with 'make test' or 'npm test' + +v0.1.0 -- 2011.08.08 +Initial version diff --git a/node_modules/event-emitter/LICENSE b/node_modules/event-emitter/LICENSE new file mode 100644 index 0000000..ccb76f6 --- /dev/null +++ b/node_modules/event-emitter/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2015 Mariusz Nowak (www.medikoo.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/node_modules/event-emitter/README.md b/node_modules/event-emitter/README.md new file mode 100644 index 0000000..0499054 --- /dev/null +++ b/node_modules/event-emitter/README.md @@ -0,0 +1,98 @@ +# event-emitter +## Environment agnostic event emitter + +### Installation + + $ npm install event-emitter + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +```javascript +var ee = require('event-emitter'); + +var MyClass = function () { /* .. */ }; +ee(MyClass.prototype); // All instances of MyClass will expose event-emitter interface + +var emitter = new MyClass(), listener; + +emitter.on('test', listener = function (args) { + // … react to 'test' event +}); + +emitter.once('test', function (args) { + // … react to first 'test' event (invoked only once!) +}); + +emitter.emit('test', arg1, arg2/*…args*/); // Two above listeners invoked +emitter.emit('test', arg1, arg2/*…args*/); // Only first listener invoked + +emitter.off('test', listener); // Removed first listener +emitter.emit('test', arg1, arg2/*…args*/); // No listeners invoked +``` +### Additional utilities + +#### allOff(obj) _(event-emitter/all-off)_ + +Removes all listeners from given event emitter object + +#### hasListeners(obj[, name]) _(event-emitter/has-listeners)_ + +Whether object has some listeners attached to the object. +When `name` is provided, it checks listeners for specific event name + +```javascript +var emitter = ee(); +var hasListeners = require('event-emitter/has-listeners'); +var listener = function () {}; + +hasListeners(emitter); // false + +emitter.on('foo', listener); +hasListeners(emitter); // true +hasListeners(emitter, 'foo'); // true +hasListeners(emitter, 'bar'); // false + +emitter.off('foo', listener); +hasListeners(emitter, 'foo'); // false +``` + +#### pipe(source, target[, emitMethodName]) _(event-emitter/pipe)_ + +Pipes all events from _source_ emitter onto _target_ emitter (all events from _source_ emitter will be emitted also on _target_ emitter, but not other way). +Returns _pipe_ object which exposes `pipe.close` function. Invoke it to close configured _pipe_. +It works internally by redefinition of `emit` method, if in your interface this method is referenced differently, provide its name (or symbol) with third argument. + +#### unify(emitter1, emitter2) _(event-emitter/unify)_ + +Unifies event handling for two objects. Events emitted on _emitter1_ would be also emitted on _emitter2_, and other way back. +Non reversible. + +```javascript +var eeUnify = require('event-emitter/unify'); + +var emitter1 = ee(), listener1, listener3; +var emitter2 = ee(), listener2, listener4; + +emitter1.on('test', listener1 = function () { }); +emitter2.on('test', listener2 = function () { }); + +emitter1.emit('test'); // Invoked listener1 +emitter2.emit('test'); // Invoked listener2 + +var unify = eeUnify(emitter1, emitter2); + +emitter1.emit('test'); // Invoked listener1 and listener2 +emitter2.emit('test'); // Invoked listener1 and listener2 + +emitter1.on('test', listener3 = function () { }); +emitter2.on('test', listener4 = function () { }); + +emitter1.emit('test'); // Invoked listener1, listener2, listener3 and listener4 +emitter2.emit('test'); // Invoked listener1, listener2, listener3 and listener4 +``` + +### Tests [![Build Status](https://travis-ci.org/medikoo/event-emitter.png)](https://travis-ci.org/medikoo/event-emitter) + + $ npm test diff --git a/node_modules/event-emitter/all-off.js b/node_modules/event-emitter/all-off.js new file mode 100644 index 0000000..829be65 --- /dev/null +++ b/node_modules/event-emitter/all-off.js @@ -0,0 +1,19 @@ +'use strict'; + +var value = require('es5-ext/object/valid-object') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (emitter/*, type*/) { + var type = arguments[1], data; + + value(emitter); + + if (type !== undefined) { + data = hasOwnProperty.call(emitter, '__ee__') && emitter.__ee__; + if (!data) return; + if (data[type]) delete data[type]; + return; + } + if (hasOwnProperty.call(emitter, '__ee__')) delete emitter.__ee__; +}; diff --git a/node_modules/event-emitter/benchmark/many-on.js b/node_modules/event-emitter/benchmark/many-on.js new file mode 100644 index 0000000..e09bfde --- /dev/null +++ b/node_modules/event-emitter/benchmark/many-on.js @@ -0,0 +1,83 @@ +'use strict'; + +// Benchmark comparing performance of event emit for many listeners +// To run it, do following in memoizee package path: +// +// $ npm install eventemitter2 signals +// $ node benchmark/many-on.js + +var forEach = require('es5-ext/object/for-each') + , pad = require('es5-ext/string/#/pad') + + , now = Date.now + + , time, count = 1000000, i, data = {} + , ee, native, ee2, signals, a = {}, b = {}; + +ee = (function () { + var ee = require('../')(); + ee.on('test', function () { return arguments; }); + ee.on('test', function () { return arguments; }); + return ee.on('test', function () { return arguments; }); +}()); + +native = (function () { + var ee = require('events'); + ee = new ee.EventEmitter(); + ee.on('test', function () { return arguments; }); + ee.on('test', function () { return arguments; }); + return ee.on('test', function () { return arguments; }); +}()); + +ee2 = (function () { + var ee = require('eventemitter2'); + ee = new ee.EventEmitter2(); + ee.on('test', function () { return arguments; }); + ee.on('test', function () { return arguments; }); + return ee.on('test', function () { return arguments; }); +}()); + +signals = (function () { + var Signal = require('signals') + , ee = { test: new Signal() }; + ee.test.add(function () { return arguments; }); + ee.test.add(function () { return arguments; }); + ee.test.add(function () { return arguments; }); + return ee; +}()); + +console.log("Emit for 3 listeners", "x" + count + ":\n"); + +i = count; +time = now(); +while (i--) { + ee.emit('test', a, b); +} +data["event-emitter (this implementation)"] = now() - time; + +i = count; +time = now(); +while (i--) { + native.emit('test', a, b); +} +data["EventEmitter (Node.js native)"] = now() - time; + +i = count; +time = now(); +while (i--) { + ee2.emit('test', a, b); +} +data.EventEmitter2 = now() - time; + +i = count; +time = now(); +while (i--) { + signals.test.dispatch(a, b); +} +data.Signals = now() - time; + +forEach(data, function (value, name, obj, index) { + console.log(index + 1 + ":", pad.call(value, " ", 5), name); +}, null, function (a, b) { + return this[a] - this[b]; +}); diff --git a/node_modules/event-emitter/benchmark/single-on.js b/node_modules/event-emitter/benchmark/single-on.js new file mode 100644 index 0000000..99decbd --- /dev/null +++ b/node_modules/event-emitter/benchmark/single-on.js @@ -0,0 +1,73 @@ +'use strict'; + +// Benchmark comparing performance of event emit for single listener +// To run it, do following in memoizee package path: +// +// $ npm install eventemitter2 signals +// $ node benchmark/single-on.js + +var forEach = require('es5-ext/object/for-each') + , pad = require('es5-ext/string/#/pad') + + , now = Date.now + + , time, count = 1000000, i, data = {} + , ee, native, ee2, signals, a = {}, b = {}; + +ee = (function () { + var ee = require('../'); + return ee().on('test', function () { return arguments; }); +}()); + +native = (function () { + var ee = require('events'); + return (new ee.EventEmitter()).on('test', function () { return arguments; }); +}()); + +ee2 = (function () { + var ee = require('eventemitter2'); + return (new ee.EventEmitter2()).on('test', function () { return arguments; }); +}()); + +signals = (function () { + var Signal = require('signals') + , ee = { test: new Signal() }; + ee.test.add(function () { return arguments; }); + return ee; +}()); + +console.log("Emit for single listener", "x" + count + ":\n"); + +i = count; +time = now(); +while (i--) { + ee.emit('test', a, b); +} +data["event-emitter (this implementation)"] = now() - time; + +i = count; +time = now(); +while (i--) { + native.emit('test', a, b); +} +data["EventEmitter (Node.js native)"] = now() - time; + +i = count; +time = now(); +while (i--) { + ee2.emit('test', a, b); +} +data.EventEmitter2 = now() - time; + +i = count; +time = now(); +while (i--) { + signals.test.dispatch(a, b); +} +data.Signals = now() - time; + +forEach(data, function (value, name, obj, index) { + console.log(index + 1 + ":", pad.call(value, " ", 5), name); +}, null, function (a, b) { + return this[a] - this[b]; +}); diff --git a/node_modules/event-emitter/emit-error.js b/node_modules/event-emitter/emit-error.js new file mode 100644 index 0000000..769b4c5 --- /dev/null +++ b/node_modules/event-emitter/emit-error.js @@ -0,0 +1,13 @@ +'use strict'; + +var ensureError = require('es5-ext/error/valid-error') + , ensureObject = require('es5-ext/object/valid-object') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (err) { + (ensureObject(this) && ensureError(err)); + if (!hasOwnProperty.call(ensureObject(this), '__ee__')) throw err; + if (!this.__ee__.error) throw err; + this.emit('error', err); +}; diff --git a/node_modules/event-emitter/has-listeners.js b/node_modules/event-emitter/has-listeners.js new file mode 100644 index 0000000..8744522 --- /dev/null +++ b/node_modules/event-emitter/has-listeners.js @@ -0,0 +1,16 @@ +'use strict'; + +var isEmpty = require('es5-ext/object/is-empty') + , value = require('es5-ext/object/valid-value') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (obj/*, type*/) { + var type; + value(obj); + type = arguments[1]; + if (arguments.length > 1) { + return hasOwnProperty.call(obj, '__ee__') && Boolean(obj.__ee__[type]); + } + return obj.hasOwnProperty('__ee__') && !isEmpty(obj.__ee__); +}; diff --git a/node_modules/event-emitter/index.js b/node_modules/event-emitter/index.js new file mode 100644 index 0000000..c36d3e4 --- /dev/null +++ b/node_modules/event-emitter/index.js @@ -0,0 +1,132 @@ +'use strict'; + +var d = require('d') + , callable = require('es5-ext/object/valid-callable') + + , apply = Function.prototype.apply, call = Function.prototype.call + , create = Object.create, defineProperty = Object.defineProperty + , defineProperties = Object.defineProperties + , hasOwnProperty = Object.prototype.hasOwnProperty + , descriptor = { configurable: true, enumerable: false, writable: true } + + , on, once, off, emit, methods, descriptors, base; + +on = function (type, listener) { + var data; + + callable(listener); + + if (!hasOwnProperty.call(this, '__ee__')) { + data = descriptor.value = create(null); + defineProperty(this, '__ee__', descriptor); + descriptor.value = null; + } else { + data = this.__ee__; + } + if (!data[type]) data[type] = listener; + else if (typeof data[type] === 'object') data[type].push(listener); + else data[type] = [data[type], listener]; + + return this; +}; + +once = function (type, listener) { + var once, self; + + callable(listener); + self = this; + on.call(this, type, once = function () { + off.call(self, type, once); + apply.call(listener, this, arguments); + }); + + once.__eeOnceListener__ = listener; + return this; +}; + +off = function (type, listener) { + var data, listeners, candidate, i; + + callable(listener); + + if (!hasOwnProperty.call(this, '__ee__')) return this; + data = this.__ee__; + if (!data[type]) return this; + listeners = data[type]; + + if (typeof listeners === 'object') { + for (i = 0; (candidate = listeners[i]); ++i) { + if ((candidate === listener) || + (candidate.__eeOnceListener__ === listener)) { + if (listeners.length === 2) data[type] = listeners[i ? 0 : 1]; + else listeners.splice(i, 1); + } + } + } else { + if ((listeners === listener) || + (listeners.__eeOnceListener__ === listener)) { + delete data[type]; + } + } + + return this; +}; + +emit = function (type) { + var i, l, listener, listeners, args; + + if (!hasOwnProperty.call(this, '__ee__')) return; + listeners = this.__ee__[type]; + if (!listeners) return; + + if (typeof listeners === 'object') { + l = arguments.length; + args = new Array(l - 1); + for (i = 1; i < l; ++i) args[i - 1] = arguments[i]; + + listeners = listeners.slice(); + for (i = 0; (listener = listeners[i]); ++i) { + apply.call(listener, this, args); + } + } else { + switch (arguments.length) { + case 1: + call.call(listeners, this); + break; + case 2: + call.call(listeners, this, arguments[1]); + break; + case 3: + call.call(listeners, this, arguments[1], arguments[2]); + break; + default: + l = arguments.length; + args = new Array(l - 1); + for (i = 1; i < l; ++i) { + args[i - 1] = arguments[i]; + } + apply.call(listeners, this, args); + } + } +}; + +methods = { + on: on, + once: once, + off: off, + emit: emit +}; + +descriptors = { + on: d(on), + once: d(once), + off: d(off), + emit: d(emit) +}; + +base = defineProperties({}, descriptors); + +module.exports = exports = function (o) { + return (o == null) ? create(base) : defineProperties(Object(o), descriptors); +}; +exports.methods = methods; diff --git a/node_modules/event-emitter/package.json b/node_modules/event-emitter/package.json new file mode 100644 index 0000000..5ba900d --- /dev/null +++ b/node_modules/event-emitter/package.json @@ -0,0 +1,67 @@ +{ + "_from": "event-emitter@^0.3.5", + "_id": "event-emitter@0.3.5", + "_inBundle": false, + "_integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "_location": "/event-emitter", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "event-emitter@^0.3.5", + "name": "event-emitter", + "escapedName": "event-emitter", + "rawSpec": "^0.3.5", + "saveSpec": null, + "fetchSpec": "^0.3.5" + }, + "_requiredBy": [ + "/memoizee" + ], + "_resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "_shasum": "df8c69eef1647923c7157b9ce83840610b02cc39", + "_spec": "event-emitter@^0.3.5", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/memoizee", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "bugs": { + "url": "https://github.com/medikoo/event-emitter/issues" + }, + "bundleDependencies": false, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + }, + "deprecated": false, + "description": "Environment agnostic event emitter", + "devDependencies": { + "tad": "~0.2.7", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.4" + }, + "homepage": "https://github.com/medikoo/event-emitter#readme", + "keywords": [ + "event", + "events", + "trigger", + "observer", + "listener", + "emitter", + "pubsub" + ], + "license": "MIT", + "name": "event-emitter", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/event-emitter.git" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node ./node_modules/tad/bin/tad" + }, + "version": "0.3.5" +} diff --git a/node_modules/event-emitter/pipe.js b/node_modules/event-emitter/pipe.js new file mode 100644 index 0000000..0088efe --- /dev/null +++ b/node_modules/event-emitter/pipe.js @@ -0,0 +1,42 @@ +'use strict'; + +var aFrom = require('es5-ext/array/from') + , remove = require('es5-ext/array/#/remove') + , value = require('es5-ext/object/valid-object') + , d = require('d') + , emit = require('./').methods.emit + + , defineProperty = Object.defineProperty + , hasOwnProperty = Object.prototype.hasOwnProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (e1, e2/*, name*/) { + var pipes, pipe, desc, name; + + (value(e1) && value(e2)); + name = arguments[2]; + if (name === undefined) name = 'emit'; + + pipe = { + close: function () { remove.call(pipes, e2); } + }; + if (hasOwnProperty.call(e1, '__eePipes__')) { + (pipes = e1.__eePipes__).push(e2); + return pipe; + } + defineProperty(e1, '__eePipes__', d('c', pipes = [e2])); + desc = getOwnPropertyDescriptor(e1, name); + if (!desc) { + desc = d('c', undefined); + } else { + delete desc.get; + delete desc.set; + } + desc.value = function () { + var i, emitter, data = aFrom(pipes); + emit.apply(this, arguments); + for (i = 0; (emitter = data[i]); ++i) emit.apply(emitter, arguments); + }; + defineProperty(e1, name, desc); + return pipe; +}; diff --git a/node_modules/event-emitter/test/all-off.js b/node_modules/event-emitter/test/all-off.js new file mode 100644 index 0000000..8aa872e --- /dev/null +++ b/node_modules/event-emitter/test/all-off.js @@ -0,0 +1,48 @@ +'use strict'; + +var ee = require('../'); + +module.exports = function (t, a) { + var x, count, count2; + + x = ee(); + count = 0; + count2 = 0; + x.on('foo', function () { + ++count; + }); + x.on('foo', function () { + ++count; + }); + x.on('bar', function () { + ++count2; + }); + x.on('bar', function () { + ++count2; + }); + t(x, 'foo'); + x.emit('foo'); + x.emit('bar'); + a(count, 0, "All off: type"); + a(count2, 2, "All off: ohter type"); + + count = 0; + count2 = 0; + x.on('foo', function () { + ++count; + }); + x.on('foo', function () { + ++count; + }); + x.on('bar', function () { + ++count2; + }); + x.on('bar', function () { + ++count2; + }); + t(x); + x.emit('foo'); + x.emit('bar'); + a(count, 0, "All off: type"); + a(count2, 0, "All off: other type"); +}; diff --git a/node_modules/event-emitter/test/emit-error.js b/node_modules/event-emitter/test/emit-error.js new file mode 100644 index 0000000..edac350 --- /dev/null +++ b/node_modules/event-emitter/test/emit-error.js @@ -0,0 +1,14 @@ +'use strict'; + +var customError = require('es5-ext/error/custom') + , ee = require('../'); + +module.exports = function (t, a) { + var x, error = customError('Some error', 'ERROR_TEST'), emitted; + + x = ee(); + a.throws(function () { t.call(x, error); }, 'ERROR_TEST'); + x.on('error', function (err) { emitted = err; }); + t.call(x, error); + a(emitted, error); +}; diff --git a/node_modules/event-emitter/test/has-listeners.js b/node_modules/event-emitter/test/has-listeners.js new file mode 100644 index 0000000..875b048 --- /dev/null +++ b/node_modules/event-emitter/test/has-listeners.js @@ -0,0 +1,42 @@ +'use strict'; + +var ee = require('../'); + +module.exports = function (t) { + var x, y; + return { + Any: function (a) { + a(t(true), false, "Primitive"); + a(t({ events: [] }), false, "Other object"); + a(t(x = ee()), false, "Emitter: empty"); + + x.on('test', y = function () {}); + a(t(x), true, "Emitter: full"); + x.off('test', y); + a(t(x), false, "Emitter: empty but touched"); + x.once('test', y = function () {}); + a(t(x), true, "Emitter: full: Once"); + x.off('test', y); + a(t(x), false, "Emitter: empty but touched by once"); + }, + Specific: function (a) { + a(t(true, 'test'), false, "Primitive"); + a(t({ events: [] }, 'test'), false, "Other object"); + a(t(x = ee(), 'test'), false, "Emitter: empty"); + + x.on('test', y = function () {}); + a(t(x, 'test'), true, "Emitter: full"); + a(t(x, 'foo'), false, "Emitter: full, other event"); + x.off('test', y); + a(t(x, 'test'), false, "Emitter: empty but touched"); + a(t(x, 'foo'), false, "Emitter: empty but touched, other event"); + + x.once('test', y = function () {}); + a(t(x, 'test'), true, "Emitter: full: Once"); + a(t(x, 'foo'), false, "Emitter: full: Once, other event"); + x.off('test', y); + a(t(x, 'test'), false, "Emitter: empty but touched by once"); + a(t(x, 'foo'), false, "Emitter: empty but touched by once, other event"); + } + }; +}; diff --git a/node_modules/event-emitter/test/index.js b/node_modules/event-emitter/test/index.js new file mode 100644 index 0000000..c7c3f24 --- /dev/null +++ b/node_modules/event-emitter/test/index.js @@ -0,0 +1,107 @@ +'use strict'; + +module.exports = function (t, a) { + var x = t(), y, count, count2, count3, count4, test, listener1, listener2; + + x.emit('none'); + + test = "Once: "; + count = 0; + x.once('foo', function (a1, a2, a3) { + a(this, x, test + "Context"); + a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); + ++count; + }); + + x.emit('foobar'); + a(count, 0, test + "Not invoked on other event"); + x.emit('foo', 'foo', x, 15); + a(count, 1, test + "Emitted"); + x.emit('foo'); + a(count, 1, test + "Emitted once"); + + test = "On & Once: "; + count = 0; + x.on('foo', listener1 = function (a1, a2, a3) { + a(this, x, test + "Context"); + a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); + ++count; + }); + count2 = 0; + x.once('foo', listener2 = function (a1, a2, a3) { + a(this, x, test + "Context"); + a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); + ++count2; + }); + + x.emit('foobar'); + a(count, 0, test + "Not invoked on other event"); + x.emit('foo', 'foo', x, 15); + a(count, 1, test + "Emitted"); + x.emit('foo', 'foo', x, 15); + a(count, 2, test + "Emitted twice"); + a(count2, 1, test + "Emitted once"); + x.off('foo', listener1); + x.emit('foo'); + a(count, 2, test + "Not emitter after off"); + + count = 0; + x.once('foo', listener1 = function () { ++count; }); + + x.off('foo', listener1); + x.emit('foo'); + a(count, 0, "Once Off: Not emitted"); + + count = 0; + x.on('foo', listener2 = function () {}); + x.once('foo', listener1 = function () { ++count; }); + + x.off('foo', listener1); + x.emit('foo'); + a(count, 0, "Once Off (multi): Not emitted"); + x.off('foo', listener2); + + test = "Prototype Share: "; + + y = Object.create(x); + + count = 0; + count2 = 0; + count3 = 0; + count4 = 0; + x.on('foo', function () { + ++count; + }); + y.on('foo', function () { + ++count2; + }); + x.once('foo', function () { + ++count3; + }); + y.once('foo', function () { + ++count4; + }); + x.emit('foo'); + a(count, 1, test + "x on count"); + a(count2, 0, test + "y on count"); + a(count3, 1, test + "x once count"); + a(count4, 0, test + "y once count"); + + y.emit('foo'); + a(count, 1, test + "x on count"); + a(count2, 1, test + "y on count"); + a(count3, 1, test + "x once count"); + a(count4, 1, test + "y once count"); + + x.emit('foo'); + a(count, 2, test + "x on count"); + a(count2, 1, test + "y on count"); + a(count3, 1, test + "x once count"); + a(count4, 1, test + "y once count"); + + y.emit('foo'); + a(count, 2, test + "x on count"); + a(count2, 2, test + "y on count"); + a(count3, 1, test + "x once count"); + a(count4, 1, test + "y once count"); +}; diff --git a/node_modules/event-emitter/test/pipe.js b/node_modules/event-emitter/test/pipe.js new file mode 100644 index 0000000..9d15d6d --- /dev/null +++ b/node_modules/event-emitter/test/pipe.js @@ -0,0 +1,53 @@ +'use strict'; + +var ee = require('../'); + +module.exports = function (t, a) { + var x = {}, y = {}, z = {}, count, count2, count3, pipe; + + ee(x); + x = Object.create(x); + ee(y); + ee(z); + + count = 0; + count2 = 0; + count3 = 0; + x.on('foo', function () { + ++count; + }); + y.on('foo', function () { + ++count2; + }); + z.on('foo', function () { + ++count3; + }); + + x.emit('foo'); + a(count, 1, "Pre pipe, x"); + a(count2, 0, "Pre pipe, y"); + a(count3, 0, "Pre pipe, z"); + + pipe = t(x, y); + x.emit('foo'); + a(count, 2, "Post pipe, x"); + a(count2, 1, "Post pipe, y"); + a(count3, 0, "Post pipe, z"); + + y.emit('foo'); + a(count, 2, "Post pipe, on y, x"); + a(count2, 2, "Post pipe, on y, y"); + a(count3, 0, "Post pipe, on y, z"); + + t(x, z); + x.emit('foo'); + a(count, 3, "Post pipe z, x"); + a(count2, 3, "Post pipe z, y"); + a(count3, 1, "Post pipe z, z"); + + pipe.close(); + x.emit('foo'); + a(count, 4, "Close pipe y, x"); + a(count2, 3, "Close pipe y, y"); + a(count3, 2, "Close pipe y, z"); +}; diff --git a/node_modules/event-emitter/test/unify.js b/node_modules/event-emitter/test/unify.js new file mode 100644 index 0000000..69295e0 --- /dev/null +++ b/node_modules/event-emitter/test/unify.js @@ -0,0 +1,123 @@ +'use strict'; + +var ee = require('../'); + +module.exports = function (t) { + + return { + "": function (a) { + var x = {}, y = {}, z = {}, count, count2, count3; + + ee(x); + ee(y); + ee(z); + + count = 0; + count2 = 0; + count3 = 0; + x.on('foo', function () { ++count; }); + y.on('foo', function () { ++count2; }); + z.on('foo', function () { ++count3; }); + + x.emit('foo'); + a(count, 1, "Pre unify, x"); + a(count2, 0, "Pre unify, y"); + a(count3, 0, "Pre unify, z"); + + t(x, y); + a(x.__ee__, y.__ee__, "Post unify y"); + x.emit('foo'); + a(count, 2, "Post unify, x"); + a(count2, 1, "Post unify, y"); + a(count3, 0, "Post unify, z"); + + y.emit('foo'); + a(count, 3, "Post unify, on y, x"); + a(count2, 2, "Post unify, on y, y"); + a(count3, 0, "Post unify, on y, z"); + + t(x, z); + a(x.__ee__, x.__ee__, "Post unify z"); + x.emit('foo'); + a(count, 4, "Post unify z, x"); + a(count2, 3, "Post unify z, y"); + a(count3, 1, "Post unify z, z"); + }, + "On empty": function (a) { + var x = {}, y = {}, z = {}, count, count2, count3; + + ee(x); + ee(y); + ee(z); + + count = 0; + count2 = 0; + count3 = 0; + y.on('foo', function () { ++count2; }); + x.emit('foo'); + a(count, 0, "Pre unify, x"); + a(count2, 0, "Pre unify, y"); + a(count3, 0, "Pre unify, z"); + + t(x, y); + a(x.__ee__, y.__ee__, "Post unify y"); + x.on('foo', function () { ++count; }); + x.emit('foo'); + a(count, 1, "Post unify, x"); + a(count2, 1, "Post unify, y"); + a(count3, 0, "Post unify, z"); + + y.emit('foo'); + a(count, 2, "Post unify, on y, x"); + a(count2, 2, "Post unify, on y, y"); + a(count3, 0, "Post unify, on y, z"); + + t(x, z); + a(x.__ee__, z.__ee__, "Post unify z"); + z.on('foo', function () { ++count3; }); + x.emit('foo'); + a(count, 3, "Post unify z, x"); + a(count2, 3, "Post unify z, y"); + a(count3, 1, "Post unify z, z"); + }, + Many: function (a) { + var x = {}, y = {}, z = {}, count, count2, count3; + + ee(x); + ee(y); + ee(z); + + count = 0; + count2 = 0; + count3 = 0; + x.on('foo', function () { ++count; }); + y.on('foo', function () { ++count2; }); + y.on('foo', function () { ++count2; }); + z.on('foo', function () { ++count3; }); + + x.emit('foo'); + a(count, 1, "Pre unify, x"); + a(count2, 0, "Pre unify, y"); + a(count3, 0, "Pre unify, z"); + + t(x, y); + a(x.__ee__, y.__ee__, "Post unify y"); + x.emit('foo'); + a(count, 2, "Post unify, x"); + a(count2, 2, "Post unify, y"); + a(count3, 0, "Post unify, z"); + + y.emit('foo'); + a(count, 3, "Post unify, on y, x"); + a(count2, 4, "Post unify, on y, y"); + a(count3, 0, "Post unify, on y, z"); + + t(x, z); + a(x.__ee__, x.__ee__, "Post unify z"); + x.emit('foo'); + a(count, 4, "Post unify z, x"); + a(count2, 6, "Post unify z, y"); + a(count3, 1, "Post unify z, z"); + } + }; +}; diff --git a/node_modules/event-emitter/unify.js b/node_modules/event-emitter/unify.js new file mode 100644 index 0000000..c6a858a --- /dev/null +++ b/node_modules/event-emitter/unify.js @@ -0,0 +1,50 @@ +'use strict'; + +var forEach = require('es5-ext/object/for-each') + , validValue = require('es5-ext/object/valid-object') + + , push = Array.prototype.apply, defineProperty = Object.defineProperty + , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty + , d = { configurable: true, enumerable: false, writable: true }; + +module.exports = function (e1, e2) { + var data; + (validValue(e1) && validValue(e2)); + if (!hasOwnProperty.call(e1, '__ee__')) { + if (!hasOwnProperty.call(e2, '__ee__')) { + d.value = create(null); + defineProperty(e1, '__ee__', d); + defineProperty(e2, '__ee__', d); + d.value = null; + return; + } + d.value = e2.__ee__; + defineProperty(e1, '__ee__', d); + d.value = null; + return; + } + data = d.value = e1.__ee__; + if (!hasOwnProperty.call(e2, '__ee__')) { + defineProperty(e2, '__ee__', d); + d.value = null; + return; + } + if (data === e2.__ee__) return; + forEach(e2.__ee__, function (listener, name) { + if (!data[name]) { + data[name] = listener; + return; + } + if (typeof data[name] === 'object') { + if (typeof listener === 'object') push.apply(data[name], listener); + else data[name].push(listener); + } else if (typeof listener === 'object') { + listener.unshift(data[name]); + data[name] = listener; + } else { + data[name] = [data[name], listener]; + } + }); + defineProperty(e2, '__ee__', d); + d.value = null; +}; diff --git a/node_modules/event-stream/.npmignore b/node_modules/event-stream/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/event-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/event-stream/.travis.yml b/node_modules/event-stream/.travis.yml new file mode 100644 index 0000000..6e5919d --- /dev/null +++ b/node_modules/event-stream/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/node_modules/event-stream/LICENCE b/node_modules/event-stream/LICENCE new file mode 100644 index 0000000..2af26fe --- /dev/null +++ b/node_modules/event-stream/LICENCE @@ -0,0 +1,24 @@ +The MIT License (MIT) + +Copyright (c) 2011 Dominic Tarr + +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/node_modules/event-stream/examples/pretty.js b/node_modules/event-stream/examples/pretty.js new file mode 100644 index 0000000..af04340 --- /dev/null +++ b/node_modules/event-stream/examples/pretty.js @@ -0,0 +1,25 @@ + +var inspect = require('util').inspect + +if(!module.parent) { + var es = require('..') //load event-stream + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/node_modules/event-stream/index.js b/node_modules/event-stream/index.js new file mode 100644 index 0000000..97da560 --- /dev/null +++ b/node_modules/event-stream/index.js @@ -0,0 +1,324 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + +var Stream = require('stream').Stream + , es = exports + , through = require('through') + , from = require('from') + , duplex = require('duplexer') + , map = require('map-stream') + , pause = require('pause-stream') + , split = require('split') + , pipeline = require('stream-combiner') + , immediately = global.setImmediate || process.nextTick; + +es.Stream = Stream //re-export Stream from core +es.through = through +es.from = from +es.duplex = duplex +es.map = map +es.pause = pause +es.split = split +es.pipeline = es.connect = es.pipe = pipeline +// merge / concat +// +// combine multiple streams into a single stream. +// will emit end only once + +es.concat = //actually this should be called concat +es.merge = function (/*streams...*/) { + var toMerge = [].slice.call(arguments) + if (toMerge.length === 1 && (toMerge[0] instanceof Array)) { + toMerge = toMerge[0] //handle array as arguments object + } + var stream = new Stream() + stream.setMaxListeners(0) // allow adding more than 11 streams + var endCount = 0 + stream.writable = stream.readable = true + + if (toMerge.length) { + toMerge.forEach(function (e) { + e.pipe(stream, {end: false}) + var ended = false + e.on('end', function () { + if(ended) return + ended = true + endCount ++ + if(endCount == toMerge.length) + stream.emit('end') + }) + }) + } else { + process.nextTick(function () { + stream.emit('end') + }) + } + + stream.write = function (data) { + this.emit('data', data) + } + stream.destroy = function () { + toMerge.forEach(function (e) { + if(e.destroy) e.destroy() + }) + } + return stream +} + + +// writable stream, collects all events into an array +// and calls back when 'end' occurs +// mainly I'm using this to test the other functions + +es.writeArray = function (done) { + if ('function' !== typeof done) + throw new Error('function writeArray (done): done must be function') + + var a = new Stream () + , array = [], isDone = false + a.write = function (l) { + array.push(l) + } + a.end = function () { + isDone = true + done(null, array) + } + a.writable = true + a.readable = false + a.destroy = function () { + a.writable = a.readable = false + if(isDone) return + done(new Error('destroyed before end'), array) + } + return a +} + +//return a Stream that reads the properties of an object +//respecting pause() and resume() + +es.readArray = function (array) { + var stream = new Stream() + , i = 0 + , paused = false + , ended = false + + stream.readable = true + stream.writable = false + + if(!Array.isArray(array)) + throw new Error('event-stream.read expects an array') + + stream.resume = function () { + if(ended) return + paused = false + var l = array.length + while(i < l && !paused && !ended) { + stream.emit('data', array[i++]) + } + if(i == l && !ended) + ended = true, stream.readable = false, stream.emit('end') + } + process.nextTick(stream.resume) + stream.pause = function () { + paused = true + } + stream.destroy = function () { + ended = true + stream.emit('close') + } + return stream +} + +// +// readable (asyncFunction) +// return a stream that calls an async function while the stream is not paused. +// +// the function must take: (count, callback) {... +// + +es.readable = +function (func, continueOnError) { + var stream = new Stream() + , i = 0 + , paused = false + , ended = false + , reading = false + + stream.readable = true + stream.writable = false + + if('function' !== typeof func) + throw new Error('event-stream.readable expects async function') + + stream.on('end', function () { ended = true }) + + function get (err, data) { + + if(err) { + stream.emit('error', err) + if(!continueOnError) stream.emit('end') + } else if (arguments.length > 1) + stream.emit('data', data) + + immediately(function () { + if(ended || paused || reading) return + try { + reading = true + func.call(stream, i++, function () { + reading = false + get.apply(null, arguments) + }) + } catch (err) { + stream.emit('error', err) + } + }) + } + stream.resume = function () { + paused = false + get() + } + process.nextTick(get) + stream.pause = function () { + paused = true + } + stream.destroy = function () { + stream.emit('end') + stream.emit('close') + ended = true + } + return stream +} + + +// +// map sync +// + +es.mapSync = function (sync) { + return es.through(function write(data) { + var mappedData + try { + mappedData = sync(data) + } catch (err) { + return this.emit('error', err) + } + if (mappedData !== undefined) + this.emit('data', mappedData) + }) +} + +// +// log just print out what is coming through the stream, for debugging +// + +es.log = function (name) { + return es.through(function (data) { + var args = [].slice.call(arguments) + if(name) console.error(name, data) + else console.error(data) + this.emit('data', data) + }) +} + + +// +// child -- pipe through a child process +// + +es.child = function (child) { + + return es.duplex(child.stdin, child.stdout) + +} + +// +// parse +// +// must be used after es.split() to ensure that each chunk represents a line +// source.pipe(es.split()).pipe(es.parse()) + +es.parse = function (options) { + var emitError = !!(options ? options.error : false) + return es.through(function (data) { + var obj + try { + if(data) //ignore empty lines + obj = JSON.parse(data.toString()) + } catch (err) { + if (emitError) + return this.emit('error', err) + return console.error(err, 'attempting to parse:', data) + } + //ignore lines that where only whitespace. + if(obj !== undefined) + this.emit('data', obj) + }) +} +// +// stringify +// + +es.stringify = function () { + var Buffer = require('buffer').Buffer + return es.mapSync(function (e){ + return JSON.stringify(Buffer.isBuffer(e) ? e.toString() : e) + '\n' + }) +} + +// +// replace a string within a stream. +// +// warn: just concatenates the string and then does str.split().join(). +// probably not optimal. +// for smallish responses, who cares? +// I need this for shadow-npm so it's only relatively small json files. + +es.replace = function (from, to) { + return es.pipeline(es.split(from), es.join(to)) +} + +// +// join chunks with a joiner. just like Array#join +// also accepts a callback that is passed the chunks appended together +// this is still supported for legacy reasons. +// + +es.join = function (str) { + + //legacy api + if('function' === typeof str) + return es.wait(str) + + var first = true + return es.through(function (data) { + if(!first) + this.emit('data', str) + first = false + this.emit('data', data) + return true + }) +} + + +// +// wait. callback when 'end' is emitted, with all chunks appended as string. +// + +es.wait = function (callback) { + var arr = [] + return es.through(function (data) { arr.push(data) }, + function () { + var body = Buffer.isBuffer(arr[0]) ? Buffer.concat(arr) + : arr.join('') + this.emit('data', body) + this.emit('end') + if(callback) callback(null, body) + }) +} + +es.pipeable = function () { + throw new Error('[EVENT-STREAM] es.pipeable is deprecated') +} diff --git a/node_modules/event-stream/node_modules/split/.npmignore b/node_modules/event-stream/node_modules/split/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/event-stream/node_modules/split/.travis.yml b/node_modules/event-stream/node_modules/split/.travis.yml new file mode 100644 index 0000000..dad2273 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" diff --git a/node_modules/event-stream/node_modules/split/LICENCE b/node_modules/event-stream/node_modules/split/LICENCE new file mode 100644 index 0000000..171dd97 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +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/node_modules/event-stream/node_modules/split/examples/pretty.js b/node_modules/event-stream/node_modules/split/examples/pretty.js new file mode 100644 index 0000000..2e89131 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/examples/pretty.js @@ -0,0 +1,26 @@ + +var inspect = require('util').inspect +var es = require('event-stream') //load event-stream +var split = require('../') + +if(!module.parent) { + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/node_modules/event-stream/node_modules/split/index.js b/node_modules/event-stream/node_modules/split/index.js new file mode 100644 index 0000000..d856433 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/index.js @@ -0,0 +1,63 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var through = require('through') +var Decoder = require('string_decoder').StringDecoder + +module.exports = split + +//TODO pass in a function to map across the lines. + +function split (matcher, mapper, options) { + var decoder = new Decoder() + var soFar = '' + var maxLength = options && options.maxLength; + if('function' === typeof matcher) + mapper = matcher, matcher = null + if (!matcher) + matcher = /\r?\n/ + + function emit(stream, piece) { + if(mapper) { + try { + piece = mapper(piece) + } + catch (err) { + return stream.emit('error', err) + } + if('undefined' !== typeof piece) + stream.queue(piece) + } + else + stream.queue(piece) + } + + function next (stream, buffer) { + var pieces = ((soFar != null ? soFar : '') + buffer).split(matcher) + soFar = pieces.pop() + + if (maxLength && soFar.length > maxLength) + stream.emit('error', new Error('maximum buffer reached')) + + for (var i = 0; i < pieces.length; i++) { + var piece = pieces[i] + emit(stream, piece) + } + } + + return through(function (b) { + next(this, decoder.write(b)) + }, + function () { + if(decoder.end) + next(this, decoder.end()) + if(soFar != null) + emit(this, soFar) + this.queue(null) + }) +} + diff --git a/node_modules/event-stream/node_modules/split/package.json b/node_modules/event-stream/node_modules/split/package.json new file mode 100644 index 0000000..69df992 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/package.json @@ -0,0 +1,62 @@ +{ + "_from": "split@0.3", + "_id": "split@0.3.3", + "_inBundle": false, + "_integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "_location": "/event-stream/split", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "split@0.3", + "name": "split", + "escapedName": "split", + "rawSpec": "0.3", + "saveSpec": null, + "fetchSpec": "0.3" + }, + "_requiredBy": [ + "/event-stream" + ], + "_resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "_shasum": "cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f", + "_spec": "split@0.3", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/event-stream", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://bit.ly/dominictarr" + }, + "bugs": { + "url": "https://github.com/dominictarr/split/issues" + }, + "bundleDependencies": false, + "dependencies": { + "through": "2" + }, + "deprecated": false, + "description": "split a Text Stream into a Line Stream", + "devDependencies": { + "asynct": "*", + "event-stream": "~3.0.2", + "it-is": "1", + "stream-spec": "~0.2", + "string-to-stream": "~1.0.0", + "ubelt": "~2.9" + }, + "engines": { + "node": "*" + }, + "homepage": "http://github.com/dominictarr/split", + "license": "MIT", + "name": "split", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/split.git" + }, + "scripts": { + "test": "asynct test/" + }, + "version": "0.3.3" +} diff --git a/node_modules/event-stream/node_modules/split/readme.markdown b/node_modules/event-stream/node_modules/split/readme.markdown new file mode 100644 index 0000000..13854ae --- /dev/null +++ b/node_modules/event-stream/node_modules/split/readme.markdown @@ -0,0 +1,66 @@ +# Split (matcher) + +[![build status](https://secure.travis-ci.org/dominictarr/split.png)](http://travis-ci.org/dominictarr/split) + +Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` + +Example, read every line in a file ... + +``` js + fs.createReadStream(file) + .pipe(split()) + .on('data', function (line) { + //each chunk now is a seperate line! + }) + +``` + +`split` takes the same arguments as `string.split` except it defaults to '/\r?\n/' instead of ',', and the optional `limit` paremeter is ignored. +[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) + +`split` takes an optional options object on it's third argument. + +``` js + split(matcher, mapper, options) +``` + +Valid options: + +* maxLength - The maximum buffer length without seeing a newline or `matcher`, + if a single line exceeds this, the split stream will emit an error. + +``` js + split(JSON.parse, null, { maxLength: 2}) +``` + +## keep matched splitter + +As with `Array#split`, if you split by a regular expression with a matching group, +the matches will be retained in the collection. + +``` +stdin +.pipe(split(/(\r?\n)/)) +... //lines + separators. +``` + + +# NDJ - Newline Delimited Json + +`split` accepts a function which transforms each line. + +``` js +fs.createReadStream(file) + .pipe(split(JSON.parse)) + .on('data', function (obj) { + //each chunk now is a a js object + }) + .on('error', function (err) { + //syntax errors will land here + //note, this ends the stream. + }) +``` + +# License + +MIT diff --git a/node_modules/event-stream/node_modules/split/test/options.asynct.js b/node_modules/event-stream/node_modules/split/test/options.asynct.js new file mode 100644 index 0000000..6d34d87 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/test/options.asynct.js @@ -0,0 +1,23 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['maximum buffer limit'] = function (test) { + var s = split(JSON.parse, null, { + maxLength: 2 + }) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + s.write('{ "') + it(caughtError).equal(true) + + s.end() + test.done() +} diff --git a/node_modules/event-stream/node_modules/split/test/partitioned_unicode.js b/node_modules/event-stream/node_modules/split/test/partitioned_unicode.js new file mode 100644 index 0000000..aff3d5d --- /dev/null +++ b/node_modules/event-stream/node_modules/split/test/partitioned_unicode.js @@ -0,0 +1,34 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['split data with partitioned unicode character'] = function (test) { + var s = split(/,/g) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + var x = 'テスト試験今日とても,よい天気で' + unicodeData = new Buffer(x); + + // partition of 日 + piece1 = unicodeData.slice(0, 20); + piece2 = unicodeData.slice(20, unicodeData.length); + + s.write(piece1); + s.write(piece2); + + s.end() + + it(caughtError).equal(false) + + it(rows).deepEqual(['テスト試験今日とても', 'よい天気で']); + + it(rows).deepEqual(x.split(',')) + + test.done() +} diff --git a/node_modules/event-stream/node_modules/split/test/split.asynct.js b/node_modules/event-stream/node_modules/split/test/split.asynct.js new file mode 100644 index 0000000..e5df026 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/test/split.asynct.js @@ -0,0 +1,137 @@ +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('ubelt') + , split = require('..') + , join = require('path').join + , fs = require('fs') + , Stream = require('stream').Stream + , Readable = require('stream').Readable + , spec = require('stream-spec') + , through = require('through') + , stringStream = require('string-to-stream') + +exports ['split() works like String#split'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split() + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +exports ['split() takes mapper function'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split(function (line) { return line.toUpperCase() }) + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).equal(v.trim().toUpperCase()) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +exports ['split() works with empty string chunks'] = function (test) { + var str = ' foo' + , expected = str.split(/[\s]*/).reduce(splitBy(/[\s]*/), []) + , cs1 = split(/[\s]*/) + , cs2 = split(/[\s]*/) + , actual = [] + , ended = false + , x = spec(cs1).through() + , y = spec(cs2).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + y.validate() + }) + } + a.writable = true + + cs1.pipe(cs2) + cs2.pipe(a) + + cs1.write(str) + cs1.end() + +} + +function splitBy (delimeter) { + return function (arr, piece) { + return arr.concat(piece.split(delimeter)) + } +} \ No newline at end of file diff --git a/node_modules/event-stream/node_modules/split/test/try_catch.asynct.js b/node_modules/event-stream/node_modules/split/test/try_catch.asynct.js new file mode 100644 index 0000000..39e49f7 --- /dev/null +++ b/node_modules/event-stream/node_modules/split/test/try_catch.asynct.js @@ -0,0 +1,51 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['emit mapper exceptions as error events'] = function (test) { + var s = split(JSON.parse) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + s.write('b":2}\n{"c":}\n') + it(caughtError).equal(true) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + s.end() + test.done() +} + +exports ['mapper error events on trailing chunks'] = function (test) { + var s = split(JSON.parse) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + s.write('b":2}\n{"c":}') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + s.end() + it(caughtError).equal(true) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + test.done() +} diff --git a/node_modules/event-stream/package.json b/node_modules/event-stream/package.json new file mode 100644 index 0000000..f03c0c9 --- /dev/null +++ b/node_modules/event-stream/package.json @@ -0,0 +1,88 @@ +{ + "_from": "event-stream@~3.3.0", + "_id": "event-stream@3.3.4", + "_inBundle": false, + "_integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "_location": "/event-stream", + "_phantomChildren": { + "through": "2.3.8" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "event-stream@~3.3.0", + "name": "event-stream", + "escapedName": "event-stream", + "rawSpec": "~3.3.0", + "saveSpec": null, + "fetchSpec": "~3.3.0" + }, + "_requiredBy": [ + "/ps-tree" + ], + "_resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "_shasum": "4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571", + "_spec": "event-stream@~3.3.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/ps-tree", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://bit.ly/dominictarr" + }, + "bugs": { + "url": "https://github.com/dominictarr/event-stream/issues" + }, + "bundleDependencies": false, + "dependencies": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + }, + "deprecated": false, + "description": "construct pipes of streams of events", + "devDependencies": { + "asynct": "*", + "it-is": "1", + "stream-spec": "~0.3.5", + "tape": "~2.3.0", + "ubelt": "~3.2.2" + }, + "homepage": "http://github.com/dominictarr/event-stream", + "license": "MIT", + "name": "event-stream", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/event-stream.git" + }, + "scripts": { + "prepublish": "npm ls && npm test", + "test": "asynct test/", + "test_tap": "set -e; for t in test/*.js; do node $t; done" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 8, + 9 + ], + "firefox": [ + 13 + ], + "chrome": [ + 20 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "version": "3.3.4" +} diff --git a/node_modules/event-stream/readme.markdown b/node_modules/event-stream/readme.markdown new file mode 100644 index 0000000..0150b05 --- /dev/null +++ b/node_modules/event-stream/readme.markdown @@ -0,0 +1,314 @@ +# EventStream + + + +[![browser status](http://ci.testling.com/dominictarr/event-stream.png)] +(http://ci.testling.com/dominictarr/event-stream) + +[Streams](http://nodejs.org/api/stream.html "Stream") are node's best and most misunderstood idea, and +_EventStream_ is a toolkit to make creating and working with streams easy. + +Normally, streams are only used for IO, +but in event stream we send all kinds of objects down the pipe. +If your application's input and output are streams, +shouldn't the throughput be a stream too? + +The *EventStream* functions resemble the array functions, +because Streams are like Arrays, but laid out in time, rather than in memory. + +All the `event-stream` functions return instances of `Stream`. + +`event-stream` creates +[0.8 streams](https://github.com/joyent/node/blob/v0.8/doc/api/stream.markdown) +, which are compatible with [0.10 streams](http://nodejs.org/api/stream.html "Stream"). + +>NOTE: I shall use the term "through stream" to refer to a stream that is writable and readable. + +### [simple example](https://github.com/dominictarr/event-stream/blob/master/examples/pretty.js): + +``` js + +//pretty.js + +if(!module.parent) { + var es = require('event-stream') + var inspect = require('util').inspect + + process.stdin //connect streams together with `pipe` + .pipe(es.split()) //split stream to break on newlines + .pipe(es.map(function (data, cb) { //turn this async function into a stream + cb(null + , inspect(JSON.parse(data))) //render it nicely + })) + .pipe(process.stdout) // pipe it to stdout ! +} +``` +run it ... + +``` bash +curl -sS registry.npmjs.org/event-stream | node pretty.js +``` + +[node Stream documentation](http://nodejs.org/api/stream.html) + +## through (write?, end?) + +Re-emits data synchronously. Easy way to create synchronous through streams. +Pass in optional `write` and `end` methods. They will be called in the +context of the stream. Use `this.pause()` and `this.resume()` to manage flow. +Check `this.paused` to see current flow state. (write always returns `!this.paused`) + +this function is the basis for most of the synchronous streams in `event-stream`. + +``` js + +es.through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) + +``` + +## map (asyncFunction) + +Create a through stream from an asynchronous function. + +``` js +var es = require('event-stream') + +es.map(function (data, callback) { + //transform data + // ... + callback(null, data) +}) + +``` + +Each map MUST call the callback. It may callback with data, with an error or with no arguments, + + * `callback()` drop this data. + this makes the map work like `filter`, + note:`callback(null,null)` is not the same, and will emit `null` + + * `callback(null, newData)` turn data into newData + + * `callback(error)` emit an error for this item. + +>Note: if a callback is not called, `map` will think that it is still being processed, +>every call must be answered or the stream will not know when to end. +> +>Also, if the callback is called more than once, every call but the first will be ignored. + +## mapSync (syncFunction) + +Same as `map`, but the callback is called synchronously. Based on `es.through` + +## split (matcher) + +Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` + +Example, read every line in a file ... + +``` js +fs.createReadStream(file, {flags: 'r'}) + .pipe(es.split()) + .pipe(es.map(function (line, cb) { + //do something with the line + cb(null, line) + })) +``` + +`split` takes the same arguments as `string.split` except it defaults to '\n' instead of ',', and the optional `limit` parameter is ignored. +[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) + +## join (separator) + +Create a through stream that emits `separator` between each chunk, just like Array#join. + +(for legacy reasons, if you pass a callback instead of a string, join is a synonym for `es.wait`) + +## merge (stream1,...,streamN) or merge (streamArray) +> concat → merge + +Merges streams into one and returns it. +Incoming data will be emitted as soon it comes into - no ordering will be applied (for example: `data1 data1 data2 data1 data2` - where `data1` and `data2` is data from two streams). +Counts how many streams were passed to it and emits end only when all streams emitted end. + +```js +es.merge( + process.stdout, + process.stderr +).pipe(fs.createWriteStream('output.log')); +``` + +It can also take an Array of streams as input like this: +```js +es.merge([ + fs.createReadStream('input1.txt'), + fs.createReadStream('input2.txt') +]).pipe(fs.createWriteStream('output.log')); +``` + +## replace (from, to) + +Replace all occurrences of `from` with `to`. `from` may be a `String` or a `RegExp`. +Works just like `string.split(from).join(to)`, but streaming. + + +## parse + +Convenience function for parsing JSON chunks. For newline separated JSON, +use with `es.split`. By default it logs parsing errors by `console.error`; +for another behaviour, transforms created by `es.parse({error: true})` will +emit error events for exceptions thrown from `JSON.parse`, unmodified. + +``` js +fs.createReadStream(filename) + .pipe(es.split()) //defaults to lines. + .pipe(es.parse()) +``` + +## stringify + +convert javascript objects into lines of text. The text will have whitespace escaped and have a `\n` appended, so it will be compatible with `es.parse` + +``` js +objectStream + .pipe(es.stringify()) + .pipe(fs.createWriteStream(filename)) +``` + +## readable (asyncFunction) + +create a readable stream (that respects pause) from an async function. +while the stream is not paused, +the function will be polled with `(count, callback)`, +and `this` will be the readable stream. + +``` js + +es.readable(function (count, callback) { + if(streamHasEnded) + return this.emit('end') + + //... + + this.emit('data', data) //use this way to emit multiple chunks per call. + + callback() // you MUST always call the callback eventually. + // the function will not be called again until you do this. +}) +``` +you can also pass the data and the error to the callback. +you may only call the callback once. +calling the same callback more than once will have no effect. + +## readArray (array) + +Create a readable stream from an Array. + +Just emit each item as a data event, respecting `pause` and `resume`. + +``` js + var es = require('event-stream') + , reader = es.readArray([1,2,3]) + + reader.pipe(...) +``` + +If you want the stream behave like a 0.10 stream you will need to wrap it using [`Readable.wrap()`](http://nodejs.org/api/stream.html#stream_readable_wrap_stream) function. Example: + +``` js + var s = new stream.Readable({objectMode: true}).wrap(es.readArray([1,2,3])); +``` + +## writeArray (callback) + +create a writeable stream from a callback, +all `data` events are stored in an array, which is passed to the callback when the stream ends. + +``` js + var es = require('event-stream') + , reader = es.readArray([1, 2, 3]) + , writer = es.writeArray(function (err, array){ + //array deepEqual [1, 2, 3] + }) + + reader.pipe(writer) +``` + +## pause () + +A stream that buffers all chunks when paused. + + +``` js + var ps = es.pause() + ps.pause() //buffer the stream, also do not allow 'end' + ps.resume() //allow chunks through +``` + +## duplex (writeStream, readStream) + +Takes a writable stream and a readable stream and makes them appear as a readable writable stream. + +It is assumed that the two streams are connected to each other in some way. + +(This is used by `pipeline` and `child`.) + +``` js + var grep = cp.exec('grep Stream') + + es.duplex(grep.stdin, grep.stdout) +``` + +## child (child_process) + +Create a through stream from a child process ... + +``` js + var cp = require('child_process') + + es.child(cp.exec('grep Stream')) // a through stream + +``` + +## wait (callback) + +waits for stream to emit 'end'. +joins chunks of a stream into a single string or buffer. +takes an optional callback, which will be passed the +complete string/buffer when it receives the 'end' event. + +also, emits a single 'data' event. + +``` js + +readStream.pipe(es.wait(function (err, body) { + // have complete text here. +})) + +``` + +# Other Stream Modules + +These modules are not included as a part of *EventStream* but may be +useful when working with streams. + +## [reduce (syncFunction, initial)](https://github.com/parshap/node-stream-reduce) + +Like `Array.prototype.reduce` but for streams. Given a sync reduce +function and an initial value it will return a through stream that emits +a single data event with the reduced value once the input stream ends. + +``` js +var reduce = require("stream-reduce"); +process.stdin.pipe(reduce(function(acc, data) { + return acc + data.length; +}, 0)).on("data", function(length) { + console.log("stdin size:", length); +}); +``` diff --git a/node_modules/event-stream/test/connect.asynct.js b/node_modules/event-stream/test/connect.asynct.js new file mode 100644 index 0000000..e6a442b --- /dev/null +++ b/node_modules/event-stream/test/connect.asynct.js @@ -0,0 +1,86 @@ +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + +function makeExamplePipe() { + + return es.connect( + es.map(function (data, callback) { + callback(null, data * 2) + }), + es.map(function (data, callback) { + d.delay(callback)(null, data) + }), + es.map(function (data, callback) { + callback(null, data + 2) + })) +} + +exports['simple pipe'] = function (test) { + + var pipe = makeExamplePipe() + + pipe.on('data', function (data) { + it(data).equal(18) + test.done() + }) + + pipe.write(8) + +} + +exports['read array then map'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + , first = es.readArray(readThis) + , read = [] + , pipe = + es.connect( + first, + es.map(function (data, callback) { + callback(null, {data: data}) + }), + es.map(function (data, callback) { + callback(null, {data: data}) + }), + es.writeArray(function (err, array) { + it(array).deepEqual(d.map(readThis, function (data) { + return {data: {data: data}} + })) + test.done() + }) + ) +} + +exports ['connect returns a stream'] = function (test) { + + var rw = + es.connect( + es.map(function (data, callback) { + callback(null, data * 2) + }), + es.map(function (data, callback) { + callback(null, data * 5) + }) + ) + + it(rw).has({readable: true, writable: true}) + + var array = [190, 24, 6, 7, 40, 57, 4, 6] + , _array = [] + , c = + es.connect( + es.readArray(array), + rw, + es.log('after rw:'), + es.writeArray(function (err, _array) { + it(_array).deepEqual(array.map(function (e) { return e * 10 })) + test.done() + }) + ) + +} + + +require('./helper')(module) + diff --git a/node_modules/event-stream/test/helper/index.js b/node_modules/event-stream/test/helper/index.js new file mode 100644 index 0000000..96abaeb --- /dev/null +++ b/node_modules/event-stream/test/helper/index.js @@ -0,0 +1,12 @@ +var tape = require('tape') + +module.exports = function (m) { + if(m.parent) return + for(var name in m.exports) { + tape(name, function (t) { + console.log('start', name) + t.done = t.end + m.exports[name](t) + }) + } +} diff --git a/node_modules/event-stream/test/merge.asynct.js b/node_modules/event-stream/test/merge.asynct.js new file mode 100644 index 0000000..68f38ba --- /dev/null +++ b/node_modules/event-stream/test/merge.asynct.js @@ -0,0 +1,29 @@ +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + +exports.merge = function (t) { + var odd = d.map(1, 3, 100, d.id) //array of multiples of 3 < 100 + var even = d.map(2, 4, 100, d.id) //array of multiples of 3 < 100 + + var r1 = es.readArray(even) + var r2 = es.readArray(odd) + var endCount = 0 + + var writer = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array.sort()).deepEqual(even.concat(odd).sort()) + if (++endCount === 2) t.done() + }) + + var writer2 = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array.sort()).deepEqual(even.concat(odd).sort()) + if (++endCount === 2) t.done() + }) + + es.merge(r1, r2).pipe(writer) + es.merge([r1, r2]).pipe(writer2) + +} +require('./helper')(module) diff --git a/node_modules/event-stream/test/parse.asynct.js b/node_modules/event-stream/test/parse.asynct.js new file mode 100644 index 0000000..a5fefcf --- /dev/null +++ b/node_modules/event-stream/test/parse.asynct.js @@ -0,0 +1,32 @@ +var es = require('../') + , it = require('it-is').style('colour') + +exports ['es.parse() writes parsing errors with console.error'] = function (test) { + var parseStream = es.parse() + var oldConsoleError = console.error + console.error = function () { + console.error = oldConsoleError + it(arguments.length > 0).ok() + test.done() + } + + // bare word is not valid JSON + parseStream.write('A') +} + +exports ['es.parse({error: true(thy)}) emits error events from parsing'] = function (test) { + var parseStream = es.parse({error: 1}) + var expectedError + try { + JSON.parse('A') + } catch(e) { + expectedError = e + } + + parseStream.on('error', function (e) { + it(e).deepEqual(expectedError) + process.nextTick(function () { + test.done() + }) + }).write('A') +} diff --git a/node_modules/event-stream/test/pause.asynct.js b/node_modules/event-stream/test/pause.asynct.js new file mode 100644 index 0000000..b073604 --- /dev/null +++ b/node_modules/event-stream/test/pause.asynct.js @@ -0,0 +1,39 @@ + +var es = require('../') + , it = require('it-is') + , d = require('ubelt') + +exports ['gate buffers when shut'] = function (test) { + + var hundy = d.map(1,100, d.id) + , gate = es.pause() + , ten = 10 + es.connect( + es.readArray(hundy), + es.log('after readArray'), + gate, + //es.log('after gate'), + es.map(function (num, next) { + //stick a map in here to check that gate never emits when open + it(gate.paused).equal(false) + console.log('data', num) + if(!--ten) { + console.log('PAUSE') + gate.pause()//.resume() + d.delay(gate.resume.bind(gate), 10)() + ten = 10 + } + + next(null, num) + }), + es.writeArray(function (err, array) { //just realized that I should remove the error param. errors will be emitted + console.log('eonuhoenuoecbulc') + it(array).deepEqual(hundy) + test.done() + }) + ) + + gate.resume() + +} +require('./helper')(module) diff --git a/node_modules/event-stream/test/pipeline.asynct.js b/node_modules/event-stream/test/pipeline.asynct.js new file mode 100644 index 0000000..f07c6fa --- /dev/null +++ b/node_modules/event-stream/test/pipeline.asynct.js @@ -0,0 +1,52 @@ +var es = require('..') + +exports['do not duplicate errors'] = function (test) { + + var errors = 0; + var pipe = es.pipeline( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }) + ) + + pipe.on('error', function(err) { + errors++ + console.log('error count', errors) + process.nextTick(function () { + return test.done(); + }) + }) + + return pipe.write('meh'); + +} + +exports['3 pipe do not duplicate errors'] = function (test) { + + var errors = 0; + var pipe = es.pipeline( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }), + es.through() + ) + + pipe.on('error', function(err) { + errors++ + console.log('error count', errors) + process.nextTick(function () { + return test.done(); + }) + }) + + return pipe.write('meh'); + +} + +require('./helper')(module) diff --git a/node_modules/event-stream/test/readArray.asynct.js b/node_modules/event-stream/test/readArray.asynct.js new file mode 100644 index 0000000..3eeb90a --- /dev/null +++ b/node_modules/event-stream/test/readArray.asynct.js @@ -0,0 +1,89 @@ + +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + +function readStream(stream, pauseAt, done) { + if(!done) done = pauseAt, pauseAt = -1 + var array = [] + stream.on('data', function (data) { + array.push(data) + if(!--pauseAt ) + stream.pause(), done(null, array) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +exports ['read an array'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var reader = es.readArray(readThis) + + var writer = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + +exports ['read an array and pause it.'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var reader = es.readArray(readThis) + + readStream(reader, 10, function (err, data) { + if(err) throw err + it(data).deepEqual([3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) + readStream(reader, 10, function (err, data) { + it(data).deepEqual([33, 36, 39, 42, 45, 48, 51, 54, 57, 60]) + test.done() + }) + reader.resume() + }) + +} + +exports ['reader is readable, but not writeable'] = function (test) { + var reader = es.readArray([1]) + it(reader).has({ + readable: true, + writable: false + }) + + test.done() +} + + +exports ['read one item per tick'] = function (test) { + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + var drains = 0 + var reader = es.readArray(readThis) + var tickMapper = es.map(function (data,callback) { + process.nextTick(function () { + callback(null, data) + }) + //since tickMapper is returning false + //pipe should pause the writer until a drain occurs + return false + }) + reader.pipe(tickMapper) + readStream(tickMapper, function (err, array) { + it(array).deepEqual(readThis) + it(array.length).deepEqual(readThis.length) + it(drains).equal(readThis.length) + test.done() + }) + tickMapper.on('drain', function () { + drains ++ + }) + +} +require('./helper')(module) diff --git a/node_modules/event-stream/test/readable.asynct.js b/node_modules/event-stream/test/readable.asynct.js new file mode 100644 index 0000000..6ea2fdb --- /dev/null +++ b/node_modules/event-stream/test/readable.asynct.js @@ -0,0 +1,197 @@ + +var es = require('../') + , it = require('it-is').style('colour') + , u = require('ubelt') + +exports ['read an array'] = function (test) { + + + console.log('readable') + return test.end() + var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 + + console.log('readable') + + var reader = + es.readable(function (i, callback) { + if(i >= readThis.length) + return this.emit('end') + console.log('readable') + callback(null, readThis[i]) + }) + + var writer = es.writeArray(function (err, array){ + if(err) throw err + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + +exports ['read an array - async'] = function (test) { + + var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 + + var reader = + es.readable(function (i, callback) { + if(i >= readThis.length) + return this.emit('end') + u.delay(callback)(null, readThis[i]) + }) + + var writer = es.writeArray(function (err, array){ + if(err) throw err + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + + +exports ['emit data then call next() also works'] = function (test) { + + var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 + + var reader = + es.readable(function (i, next) { + if(i >= readThis.length) + return this.emit('end') + this.emit('data', readThis[i]) + next() + }) + + var writer = es.writeArray(function (err, array){ + if(err) throw err + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + + +exports ['callback emits error, then stops'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , called = 0 + + var reader = + es.readable(function (i, callback) { + if(called++) + return + callback(err) + }) + + reader.on('error', function (_err){ + it(_err).deepEqual(err) + u.delay(function() { + it(called).equal(1) + test.done() + }, 50)() + }) +} + +exports['readable does not call read concurrently'] = function (test) { + + var current = 0 + var source = es.readable(function(count, cb){ + current ++ + if(count > 100) + return this.emit('end') + u.delay(function(){ + current -- + it(current).equal(0) + cb(null, {ok: true, n: count}); + })(); + }); + + var destination = es.map(function(data, cb){ + //console.info(data); + cb(); + }); + + var all = es.connect(source, destination); + + destination.on('end', test.done) +} + +exports ['does not raise a warning: Recursive process.nextTick detected'] = function (test) { + var readThisDelayed; + + u.delay(function () { + readThisDelayed = [1, 3, 5]; + })(); + + es.readable(function (count, callback) { + + if (readThisDelayed) { + var that = this; + readThisDelayed.forEach(function (item) { + that.emit('data', item); + }); + + this.emit('end'); + test.done(); + } + + callback(); + }); +}; + +// +// emitting multiple errors is not supported by stream. +// +// I do not think that this is a good idea, at least, there should be an option to pipe to +// continue on error. it makes alot ef sense, if you are using Stream like I am, to be able to emit multiple errors. +// an error might not necessarily mean the end of the stream. it depends on the error, at least. +// +// I will start a thread on the mailing list. I'd rather that than use a custom `pipe` implementation. +// +// basically, I want to be able use pipe to transform objects, and if one object is invalid, +// the next might still be good, so I should get to choose if it's gonna stop. +// re-enstate this test when this issue progresses. +// +// hmm. I could add this to es.connect by deregistering the error listener, +// but I would rather it be an option in core. + +/* +exports ['emit multiple errors, with 2nd parameter (continueOnError)'] = function (test) { + + var readThis = d.map(1, 100, d.id) + , errors = 0 + var reader = + es.readable(function (i, callback) { + console.log(i, readThis.length) + if(i >= readThis.length) + return this.emit('end') + if(!(readThis[i] % 7)) + return callback(readThis[i]) + callback(null, readThis[i]) + }, true) + + var writer = es.writeArray(function (err, array) { + if(err) throw err + it(array).every(function (u){ + it(u % 7).notEqual(0) + }).property('length', 80) + it(errors).equal(14) + test.done() + }) + + reader.on('error', function (u) { + errors ++ + console.log(u) + if('number' !== typeof u) + throw u + + it(u % 7).equal(0) + + }) + + reader.pipe(writer) +} +*/ + +require('./helper')(module) diff --git a/node_modules/event-stream/test/replace.asynct.js b/node_modules/event-stream/test/replace.asynct.js new file mode 100644 index 0000000..1c8735b --- /dev/null +++ b/node_modules/event-stream/test/replace.asynct.js @@ -0,0 +1,76 @@ +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + , spec = require('stream-spec') + +var next = process.nextTick + +var fizzbuzz = '12F4BF78FB11F1314FB1617F19BF2223FB26F2829FB3132F34BF3738FB41F4344FB4647F49BF5253FB56F5859FB6162F64BF6768FB71F7374FB7677F79BF8283FB86F8889FB9192F94BF9798FB' + , fizz7buzz = '12F4BFseven8FB11F1314FB161sevenF19BF2223FB26F2829FB3132F34BF3seven38FB41F4344FB464sevenF49BF5253FB56F5859FB6162F64BF6seven68FBseven1Fseven3seven4FBseven6sevensevenFseven9BF8283FB86F8889FB9192F94BF9seven98FB' + , fizzbuzzwhitespce = ' 12F4BF78FB11F1314FB1617F19BF2223FB26F2829FB3132F34BF3738FB41F4344FB4647F49BF5253FB56F5859FB6162F64BF6768FB71F7374FB7677F79BF8283FB86F8889FB9192F94BF9798FB ' + +exports ['fizz buzz'] = function (test) { + + var readThis = d.map(1, 100, function (i) { + return ( + ! (i % 3 || i % 5) ? "FB" : + !(i % 3) ? "F" : + !(i % 5) ? "B" : + ''+i + ) + }) //array of multiples of 3 < 100 + + var reader = es.readArray(readThis) + var join = es.wait(function (err, string){ + it(string).equal(fizzbuzz) + test.done() + }) + reader.pipe(join) + +} + + +exports ['fizz buzz replace'] = function (test) { + var split = es.split(/(1)/) + var replace = es.replace('7', 'seven') +// var x = spec(replace).through() + split + .pipe(replace) + .pipe(es.join(function (err, string) { + it(string).equal(fizz7buzz) + })) + + replace.on('close', function () { +// x.validate() + test.done() + }) + + split.write(fizzbuzz) + split.end() + +} + + +exports ['fizz buzz replace whitespace using regexp'] = function (test) { + var split = es.split(/(1)/) + var replaceLeading = es.replace(/^[\s]*/, '') + var replaceTrailing = es.replace(/[\s]*$/, '') +// var x = spec(replace).through() + split + .pipe(replaceLeading) + .pipe(replaceTrailing) + .pipe(es.join(function (err, string) { + it(string).equal(fizzbuzz) + })) + + replaceTrailing.on('close', function () { +// x.validate() + test.done() + }) + + split.write(fizzbuzz) + split.end() + +} + +require('./helper')(module) diff --git a/node_modules/event-stream/test/simple-map.asynct.js b/node_modules/event-stream/test/simple-map.asynct.js new file mode 100644 index 0000000..25121f9 --- /dev/null +++ b/node_modules/event-stream/test/simple-map.asynct.js @@ -0,0 +1,343 @@ +'use strict'; + +var es = require('../') + , it = require('it-is') + , u = require('ubelt') + , spec = require('stream-spec') + , Stream = require('stream') + , from = require('from') + , through = require('through') + +//REFACTOR THIS TEST TO USE es.readArray and es.writeArray + +function writeArray(array, stream) { + + array.forEach( function (j) { + stream.write(j) + }) + stream.end() + +} + +function readStream(stream, done) { + + var array = [] + stream.on('data', function (data) { + array.push(data) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +//call sink on each write, +//and complete when finished. + +function pauseStream (prob, delay) { + var pauseIf = ( + 'number' == typeof prob + ? function () { + return Math.random() < prob + } + : 'function' == typeof prob + ? prob + : 0.1 + ) + var delayer = ( + !delay + ? process.nextTick + : 'number' == typeof delay + ? function (next) { setTimeout(next, delay) } + : delay + ) + + return es.through(function (data) { + if(!this.paused && pauseIf()) { + console.log('PAUSE STREAM PAUSING') + this.pause() + var self = this + delayer(function () { + console.log('PAUSE STREAM RESUMING') + self.resume() + }) + } + console.log("emit ('data', " + data + ')') + this.emit('data', data) + }) +} + +exports ['simple map'] = function (test) { + + var input = u.map(1, 1000, function () { + return Math.random() + }) + var expected = input.map(function (v) { + return v * 2 + }) + + var pause = pauseStream(0.1) + var fs = from(input) + var ts = es.writeArray(function (err, ar) { + it(ar).deepEqual(expected) + test.done() + }) + var map = es.through(function (data) { + this.emit('data', data * 2) + }) + + spec(map).through().validateOnExit() + spec(pause).through().validateOnExit() + + fs.pipe(map).pipe(pause).pipe(ts) +} + +exports ['simple map applied to a stream'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + + var doubler = es.map(function (data, cb) { + cb(null, data * 2) + }) + + spec(doubler).through().validateOnExit() + + //a map is only a middle man, so it is both readable and writable + + it(doubler).has({ + readable: true, + writable: true, + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 2 + })) +// process.nextTick(x.validate) + test.done() + }) + + writeArray(input, doubler) + +} + +exports['pipe two maps together'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + function dd (data, cb) { + cb(null, data * 2) + } + var doubler1 = es.map(dd), doubler2 = es.map(dd) + + doubler1.pipe(doubler2) + + spec(doubler1).through().validateOnExit() + spec(doubler2).through().validateOnExit() + + readStream(doubler2, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 4 + })) + test.done() + }) + + writeArray(input, doubler1) + +} + +//next: +// +// test pause, resume and drian. +// + +// then make a pipe joiner: +// +// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) +// +// will return a single stream that write goes to the first + +exports ['map will not call end until the callback'] = function (test) { + + var ticker = es.map(function (data, cb) { + process.nextTick(function () { + cb(null, data * 2) + }) + }) + + spec(ticker).through().validateOnExit() + + ticker.write('x') + ticker.end() + + ticker.on('end', function () { + test.done() + }) +} + + +exports ['emit error thrown'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + es.map(function () { + throw err + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + +// onExit(spec(mapper).basic().validate) +//need spec that says stream may error. + + mapper.write('hello') + +} + +exports ['emit error calledback'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + es.map(function (data, callback) { + callback(err) + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['do not emit drain if not paused'] = function (test) { + + var map = es.map(function (data, callback) { + u.delay(callback)(null, 1) + return true + }) + + spec(map).through().pausable().validateOnExit() + + map.on('drain', function () { + it(false).ok('should not emit drain unless the stream is paused') + }) + + it(map.write('hello')).equal(true) + it(map.write('hello')).equal(true) + it(map.write('hello')).equal(true) + setTimeout(function () {map.end()},10) + map.on('end', test.done) +} + +exports ['emits drain if paused, when all '] = function (test) { + var active = 0 + var drained = false + var map = es.map(function (data, callback) { + active ++ + u.delay(function () { + active -- + callback(null, 1) + })() + console.log('WRITE', false) + return false + }) + + spec(map).through().validateOnExit() + + map.on('drain', function () { + drained = true + it(active).equal(0, 'should emit drain when all maps are done') + }) + + it(map.write('hello')).equal(false) + it(map.write('hello')).equal(false) + it(map.write('hello')).equal(false) + + process.nextTick(function () {map.end()},10) + + map.on('end', function () { + console.log('end') + it(drained).ok('shoud have emitted drain before end') + test.done() + }) + +} + +exports ['map applied to a stream with filtering'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = es.map(function (data, callback) { + if (data % 2) + callback(null, data * 2) + else + callback() + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.filter(function (j) { + return j % 2 + }).map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + +exports ['simple mapSync applied to a stream'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = es.mapSync(function (data) { + return data * 2 + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + +exports ['mapSync applied to a stream with filtering'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = es.mapSync(function (data) { + if (data % 2) + return data * 2 + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.filter(function (j) { + return j % 2 + }).map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + +require('./helper')(module) diff --git a/node_modules/event-stream/test/spec.asynct.js b/node_modules/event-stream/test/spec.asynct.js new file mode 100644 index 0000000..6d5fb6b --- /dev/null +++ b/node_modules/event-stream/test/spec.asynct.js @@ -0,0 +1,86 @@ +/* + assert that data is called many times + assert that end is called eventually + + assert that when stream enters pause state, + on drain is emitted eventually. +*/ + +var es = require('..') +var it = require('it-is').style('colour') +var spec = require('stream-spec') + +exports['simple stream'] = function (test) { + + var stream = es.through() + var x = spec(stream).basic().pausable() + + stream.write(1) + stream.write(1) + stream.pause() + stream.write(1) + stream.resume() + stream.write(1) + stream.end(2) //this will call write() + + process.nextTick(function (){ + x.validate() + test.done() + }) +} + +exports['throw on write when !writable'] = function (test) { + + var stream = es.through() + var x = spec(stream).basic().pausable() + + stream.write(1) + stream.write(1) + stream.end(2) //this will call write() + stream.write(1) //this will be throwing..., but the spec will catch it. + + process.nextTick(function () { + x.validate() + test.done() + }) + +} + +exports['end fast'] = function (test) { + + var stream = es.through() + var x = spec(stream).basic().pausable() + + stream.end() //this will call write() + + process.nextTick(function () { + x.validate() + test.done() + }) + +} + + +/* + okay, that was easy enough, whats next? + + say, after you call paused(), write should return false + until resume is called. + + simple way to implement this: + write must return !paused + after pause() paused = true + after resume() paused = false + + on resume, if !paused drain is emitted again. + after drain, !paused + + there are lots of subtle ordering bugs in streams. + + example, set !paused before emitting drain. + + the stream api is stateful. +*/ + + +require('./helper')(module) diff --git a/node_modules/event-stream/test/split.asynct.js b/node_modules/event-stream/test/split.asynct.js new file mode 100644 index 0000000..7d44bac --- /dev/null +++ b/node_modules/event-stream/test/split.asynct.js @@ -0,0 +1,47 @@ +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + , join = require('path').join + , fs = require('fs') + , Stream = require('stream').Stream + , spec = require('stream-spec') + +exports ['es.split() works like String#split'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = es.split() + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +require('./helper')(module) diff --git a/node_modules/event-stream/test/stringify.js b/node_modules/event-stream/test/stringify.js new file mode 100644 index 0000000..d158185 --- /dev/null +++ b/node_modules/event-stream/test/stringify.js @@ -0,0 +1,15 @@ + + + +var es = require('../') + +exports['handle buffer'] = function (t) { + + + es.stringify().on('data', function (d) { + t.equal(d.trim(), JSON.stringify('HELLO')) + t.end() + }).write(new Buffer('HELLO')) + +} +require('./helper')(module) diff --git a/node_modules/event-stream/test/writeArray.asynct.js b/node_modules/event-stream/test/writeArray.asynct.js new file mode 100644 index 0000000..5d705de --- /dev/null +++ b/node_modules/event-stream/test/writeArray.asynct.js @@ -0,0 +1,31 @@ + +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + +exports ['write an array'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var writer = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array).deepEqual(readThis) + test.done() + }) + + d.each(readThis, writer.write.bind(writer)) + writer.end() + +} + + +exports ['writer is writable, but not readable'] = function (test) { + var reader = es.writeArray(function () {}) + it(reader).has({ + readable: false, + writable: true + }) + + test.done() +} +require('./helper')(module) diff --git a/node_modules/execa/index.js b/node_modules/execa/index.js new file mode 100644 index 0000000..74ba8ee --- /dev/null +++ b/node_modules/execa/index.js @@ -0,0 +1,309 @@ +'use strict'; +const childProcess = require('child_process'); +const util = require('util'); +const crossSpawn = require('cross-spawn'); +const stripEof = require('strip-eof'); +const npmRunPath = require('npm-run-path'); +const isStream = require('is-stream'); +const _getStream = require('get-stream'); +const pFinally = require('p-finally'); +const onExit = require('signal-exit'); +const errname = require('./lib/errname'); +const stdio = require('./lib/stdio'); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + if (opts && opts.env && opts.extendEnv !== false) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts && opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: cmd + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, opts) { + const input = opts.input; + + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, encoding, maxBuffer) { + if (!process[stream]) { + return null; + } + + let ret; + + if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +module.exports = (cmd, args, opts) => { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + const parsed = handleArgs(cmd, args, opts); + const encoding = parsed.opts.encoding; + const maxBuffer = parsed.opts.maxBuffer; + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanupTimeout = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanupTimeout(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanupTimeout(); + resolve({err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanupTimeout(); + resolve({err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const promise = pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', encoding, maxBuffer), + getStream(spawned, 'stderr', encoding, maxBuffer) + ]).then(arr => { + const result = arr[0]; + const stdout = arr[1]; + const stderr = arr[2]; + + let err = result.err; + const code = result.code; + const signal = result.signal; + + if (removeExitHandler) { + removeExitHandler(); + } + + if (err || code !== 0 || signal !== null) { + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, stdout), + stderr: handleOutput(parsed.opts, stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts); + + spawned.then = promise.then.bind(promise); + spawned.catch = promise.catch.bind(promise); + + return spawned; +}; + +module.exports.stdout = function () { + // TODO: set `stderr: 'ignore'` when that option is implemented + return module.exports.apply(null, arguments).then(x => x.stdout); +}; + +module.exports.stderr = function () { + // TODO: set `stdout: 'ignore'` when that option is implemented + return module.exports.apply(null, arguments).then(x => x.stderr); +}; + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + + if (result.error || result.status !== 0) { + throw (result.error || new Error(result.stderr === '' ? result.stdout : result.stderr)); + } + + result.stdout = handleOutput(parsed.opts, result.stdout); + result.stderr = handleOutput(parsed.opts, result.stderr); + + return result; +}; + +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); + +module.exports.spawn = util.deprecate(module.exports, 'execa.spawn() is deprecated. Use execa() instead.'); diff --git a/node_modules/execa/lib/errname.js b/node_modules/execa/lib/errname.js new file mode 100644 index 0000000..328f3e3 --- /dev/null +++ b/node_modules/execa/lib/errname.js @@ -0,0 +1,37 @@ +'use strict'; +// The Node team wants to deprecate `process.bind(...)`. +// https://github.com/nodejs/node/pull/2768 +// +// However, we need the 'uv' binding for errname support. +// This is a defensive wrapper around it so `execa` will not fail entirely if it stops working someday. +// +// If this ever stops working. See: https://github.com/sindresorhus/execa/issues/31#issuecomment-215939939 for another possible solution. +let uv; + +try { + uv = process.binding('uv'); + + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } +} catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; +} + +function errname(uv, code) { + if (uv) { + return uv.errname(code); + } + + if (!(code < 0)) { + throw new Error('err >= 0'); + } + + return `Unknown system error ${code}`; +} + +module.exports = code => errname(uv, code); + +// Used for testing the fallback behavior +module.exports.__test__ = errname; diff --git a/node_modules/execa/lib/stdio.js b/node_modules/execa/lib/stdio.js new file mode 100644 index 0000000..a82d468 --- /dev/null +++ b/node_modules/execa/lib/stdio.js @@ -0,0 +1,41 @@ +'use strict'; +const alias = ['stdin', 'stdout', 'stderr']; + +const hasAlias = opts => alias.some(x => Boolean(opts[x])); + +module.exports = opts => { + if (!opts) { + return null; + } + + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } + + if (typeof opts.stdio === 'string') { + return opts.stdio; + } + + const stdio = opts.stdio || []; + + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + + const result = []; + const len = Math.max(stdio.length, alias.length); + + for (let i = 0; i < len; i++) { + let value = null; + + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } + + result[i] = value; + } + + return result; +}; diff --git a/node_modules/execa/license b/node_modules/execa/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/execa/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/node_modules/execa/package.json b/node_modules/execa/package.json new file mode 100644 index 0000000..244b0cf --- /dev/null +++ b/node_modules/execa/package.json @@ -0,0 +1,108 @@ +{ + "_from": "execa@^0.7.0", + "_id": "execa@0.7.0", + "_inBundle": false, + "_integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "_location": "/execa", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "execa@^0.7.0", + "name": "execa", + "escapedName": "execa", + "rawSpec": "^0.7.0", + "saveSpec": null, + "fetchSpec": "^0.7.0" + }, + "_requiredBy": [ + "/term-size" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "_shasum": "944becd34cc41ee32a63a9faf27ad5a65fc59777", + "_spec": "execa@^0.7.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/term-size", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "bundleDependencies": false, + "dependencies": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "deprecated": false, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^2.11.9", + "delay": "^2.0.0", + "is-running": "^2.0.0", + "nyc": "^11.0.2", + "tempfile": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "exec", + "child", + "process", + "execute", + "fork", + "execfile", + "spawn", + "file", + "shell", + "bin", + "binary", + "binaries", + "npm", + "path", + "local" + ], + "license": "MIT", + "maintainers": [ + { + "name": "James Talmage", + "email": "james@talmage.io", + "url": "github.com/jamestalmage" + } + ], + "name": "execa", + "nyc": { + "reporter": [ + "text", + "lcov" + ], + "exclude": [ + "**/fixtures/**", + "**/test.js", + "**/test/**" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "0.7.0" +} diff --git a/node_modules/execa/readme.md b/node_modules/execa/readme.md new file mode 100644 index 0000000..18c808a --- /dev/null +++ b/node_modules/execa/readme.md @@ -0,0 +1,279 @@ +# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) + +> A better [`child_process`](https://nodejs.org/api/child_process.html) + + +## Why + +- Promise interface. +- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. +- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. +- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) +- Higher max buffer. 10 MB instead of 200 KB. +- [Executes locally installed binaries by name.](#preferlocal) +- [Cleans up spawned processes when the parent process dies.](#cleanup) + + +## Install + +``` +$ npm install --save execa +``` + + +## Usage + +```js +const execa = require('execa'); + +execa('echo', ['unicorns']).then(result => { + console.log(result.stdout); + //=> 'unicorns' +}); + +// pipe the child process stdout to the current stdout +execa('echo', ['unicorns']).stdout.pipe(process.stdout); + +execa.shell('echo unicorns').then(result => { + console.log(result.stdout); + //=> 'unicorns' +}); + +// example of catching an error +execa.shell('exit 3').catch(error => { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + killed: false, + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ +}); +``` + + +## API + +### execa(file, [arguments], [options]) + +Execute a file. + +Think of this as a mix of `child_process.execFile` and `child_process.spawn`. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. + +### execa.stdout(file, [arguments], [options]) + +Same as `execa()`, but returns only `stdout`. + +### execa.stderr(file, [arguments], [options]) + +Same as `execa()`, but returns only `stderr`. + +### execa.shell(command, [options]) + +Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.sync(file, [arguments], [options]) + +Execute a file synchronously. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +This method throws an `Error` if the command fails. + +### execa.shellSync(file, [options]) + +Execute a command synchronously through the system shell. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### options + +Type: `Object` + +#### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory of the child process. + +#### env + +Type: `Object`
+Default: `process.env` + +Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. + +#### extendEnv + +Type: `boolean`
+Default: `true` + +Set to `false` if you don't want to extend the environment variables when providing the `env` property. + +#### argv0 + +Type: `string` + +Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. + +#### stdio + +Type: `Array` `string`
+Default: `pipe` + +Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. + +#### detached + +Type: `boolean` + +Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). + +#### uid + +Type: `number` + +Sets the user identity of the process. + +#### gid + +Type: `number` + +Sets the group identity of the process. + +#### shell + +Type: `boolean` `string`
+Default: `false` + +If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. + +#### stripEof + +Type: `boolean`
+Default: `true` + +[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. + +#### preferLocal + +Type: `boolean`
+Default: `true` + +Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`. + +#### localDir + +Type: `string`
+Default: `process.cwd()` + +Preferred path to find locally installed binaries in (use with `preferLocal`). + +#### input + +Type: `string` `Buffer` `stream.Readable` + +Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods. + +#### reject + +Type: `boolean`
+Default: `true` + +Setting this to `false` resolves the promise with the error instead of rejecting it. + +#### cleanup + +Type: `boolean`
+Default: `true` + +Keep track of the spawned process and `kill` it when the parent process exits. + +#### encoding + +Type: `string`
+Default: `utf8` + +Specify the character encoding used to decode the `stdout` and `stderr` output. + +#### timeout + +Type: `number`
+Default: `0` + +If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. + +#### maxBuffer + +Type: `number`
+Default: `10000000` (10MB) + +Largest amount of data in bytes allowed on `stdout` or `stderr`. + +#### killSignal + +Type: `string` `number`
+Default: `SIGTERM` + +Signal value to be used when the spawned process will be killed. + +#### stdin + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stdout + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stderr + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + + +## Tips + +### Save and pipe output from a child process + +Let's say you want to show the output of a child process in real-time while also saving it to a variable. + +```js +const execa = require('execa'); +const getStream = require('get-stream'); + +const stream = execa('echo', ['foo']).stdout; + +stream.pipe(process.stdout); + +getStream(stream).then(value => { + console.log('child output:', value); +}); +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/expand-brackets/LICENSE b/node_modules/expand-brackets/LICENSE new file mode 100644 index 0000000..6525171 --- /dev/null +++ b/node_modules/expand-brackets/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert + +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/node_modules/expand-brackets/README.md b/node_modules/expand-brackets/README.md new file mode 100644 index 0000000..c0e33d0 --- /dev/null +++ b/node_modules/expand-brackets/README.md @@ -0,0 +1,302 @@ +# expand-brackets [![NPM version](https://img.shields.io/npm/v/expand-brackets.svg?style=flat)](https://www.npmjs.com/package/expand-brackets) [![NPM monthly downloads](https://img.shields.io/npm/dm/expand-brackets.svg?style=flat)](https://npmjs.org/package/expand-brackets) [![NPM total downloads](https://img.shields.io/npm/dt/expand-brackets.svg?style=flat)](https://npmjs.org/package/expand-brackets) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/expand-brackets.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/expand-brackets) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/expand-brackets.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/expand-brackets) + +> Expand POSIX bracket expressions (character classes) in glob patterns. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save expand-brackets +``` + +## Usage + +```js +var brackets = require('expand-brackets'); +brackets(string[, options]); +``` + +**Params** + +The main export is a function that takes the following parameters: + +* `pattern` **{String}**: the pattern to convert +* `options` **{Object}**: optionally supply an options object +* `returns` **{String}**: returns a string that can be used to create a regex + +**Example** + +```js +console.log(brackets('[![:lower:]]')); +//=> '[^a-z]' +``` + +## API + +### [brackets](index.js#L29) + +Parses the given POSIX character class `pattern` and returns a +string that can be used for creating regular expressions for matching. + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{Object}** + +### [.match](index.js#L54) + +Takes an array of strings and a POSIX character class pattern, and returns a new array with only the strings that matched the pattern. + +**Example** + +```js +var brackets = require('expand-brackets'); +console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]')); +//=> ['a'] + +console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]+')); +//=> ['a', 'ab'] +``` + +**Params** + +* `arr` **{Array}**: Array of strings to match +* `pattern` **{String}**: POSIX character class pattern(s) +* `options` **{Object}** +* `returns` **{Array}** + +### [.isMatch](index.js#L100) + +Returns true if the specified `string` matches the given brackets `pattern`. + +**Example** + +```js +var brackets = require('expand-brackets'); + +console.log(brackets.isMatch('a.a', '[[:alpha:]].[[:alpha:]]')); +//=> true +console.log(brackets.isMatch('1.2', '[[:alpha:]].[[:alpha:]]')); +//=> false +``` + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Poxis pattern +* `options` **{String}** +* `returns` **{Boolean}** + +### [.matcher](index.js#L123) + +Takes a POSIX character class pattern and returns a matcher function. The returned function takes the string to match as its only argument. + +**Example** + +```js +var brackets = require('expand-brackets'); +var isMatch = brackets.matcher('[[:lower:]].[[:upper:]]'); + +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.A')); +//=> true +``` + +**Params** + +* `pattern` **{String}**: Poxis pattern +* `options` **{String}** +* `returns` **{Boolean}** + +### [.makeRe](index.js#L145) + +Create a regular expression from the given `pattern`. + +**Example** + +```js +var brackets = require('expand-brackets'); +var re = brackets.makeRe('[[:alpha:]]'); +console.log(re); +//=> /^(?:[a-zA-Z])$/ +``` + +**Params** + +* `pattern` **{String}**: The pattern to convert to regex. +* `options` **{Object}** +* `returns` **{RegExp}** + +### [.create](index.js#L187) + +Parses the given POSIX character class `pattern` and returns an object with the compiled `output` and optional source `map`. + +**Example** + +```js +var brackets = require('expand-brackets'); +console.log(brackets('[[:alpha:]]')); +// { options: { source: 'string' }, +// input: '[[:alpha:]]', +// state: {}, +// compilers: +// { eos: [Function], +// noop: [Function], +// bos: [Function], +// not: [Function], +// escape: [Function], +// text: [Function], +// posix: [Function], +// bracket: [Function], +// 'bracket.open': [Function], +// 'bracket.inner': [Function], +// 'bracket.literal': [Function], +// 'bracket.close': [Function] }, +// output: '[a-zA-Z]', +// ast: +// { type: 'root', +// errors: [], +// nodes: [ [Object], [Object], [Object] ] }, +// parsingErrors: [] } +``` + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{Object}** + +## Options + +### options.sourcemap + +Generate a source map for the given pattern. + +**Example** + +```js +var res = brackets('[:alpha:]', {sourcemap: true}); + +console.log(res.map); +// { version: 3, +// sources: [ 'brackets' ], +// names: [], +// mappings: 'AAAA,MAAS', +// sourcesContent: [ '[:alpha:]' ] } +``` + +### POSIX Character classes + +The following named POSIX bracket expressions are supported: + +* `[:alnum:]`: Alphanumeric characters (`a-zA-Z0-9]`) +* `[:alpha:]`: Alphabetic characters (`a-zA-Z]`) +* `[:blank:]`: Space and tab (`[ t]`) +* `[:digit:]`: Digits (`[0-9]`) +* `[:lower:]`: Lowercase letters (`[a-z]`) +* `[:punct:]`: Punctuation and symbols. (`[!"#$%&'()*+, -./:;<=>?@ [\]^_``{|}~]`) +* `[:upper:]`: Uppercase letters (`[A-Z]`) +* `[:word:]`: Word characters (letters, numbers and underscores) (`[A-Za-z0-9_]`) +* `[:xdigit:]`: Hexadecimal digits (`[A-Fa-f0-9]`) + +See [posix-character-classes](https://github.com/jonschlinkert/posix-character-classes) for more details. + +**Not supported** + +* [equivalence classes](https://www.gnu.org/software/gawk/manual/html_node/Bracket-Expressions.html) are not supported +* [POSIX.2 collating symbols](https://www.gnu.org/software/gawk/manual/html_node/Bracket-Expressions.html) are not supported + +## Changelog + +### v2.0.0 + +**Breaking changes** + +* The main export now returns the compiled string, instead of the object returned from the compiler + +**Added features** + +* Adds a `.create` method to do what the main function did before v2.0.0 + +### v0.2.0 + +In addition to performance and matching improvements, the v0.2.0 refactor adds complete POSIX character class support, with the exception of equivalence classes and POSIX.2 collating symbols which are not relevant to node.js usage. + +**Added features** + +* parser is exposed, so that expand-brackets parsers can be used by upstream parsers (like [micromatch](https://github.com/jonschlinkert/micromatch)) +* compiler is exposed, so that expand-brackets compilers can be used by upstream compilers +* source maps + +**source map example** + +```js +var brackets = require('expand-brackets'); +var res = brackets('[:alpha:]'); +console.log(res.map); + +{ version: 3, + sources: [ 'brackets' ], + names: [], + mappings: 'AAAA,MAAS', + sourcesContent: [ '[:alpha:]' ] } +``` + +## About + +### Related projects + +* [braces](https://www.npmjs.com/package/braces): Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/jonschlinkert/nanomatch) | [homepage](https://github.com/jonschlinkert/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 66 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [MartinKolarik](https://github.com/MartinKolarik) | +| 2 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/expand-brackets/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 12, 2016._ \ No newline at end of file diff --git a/node_modules/expand-brackets/changelog.md b/node_modules/expand-brackets/changelog.md new file mode 100644 index 0000000..0c0723a --- /dev/null +++ b/node_modules/expand-brackets/changelog.md @@ -0,0 +1,35 @@ +## Changelog + +### v2.0.0 + +**Breaking changes** + +- The main export now returns the compiled string, instead of the object returned from the compiler + +**Added features** + +- Adds a `.create` method to do what the main function did before v2.0.0 + +### v0.2.0 + +In addition to performance and matching improvements, the v0.2.0 refactor adds complete POSIX character class support, with the exception of equivalence classes and POSIX.2 collating symbols which are not relevant to node.js usage. + +**Added features** + +- parser is exposed, so that expand-brackets parsers can be used by upstream parsers (like [micromatch][]) +- compiler is exposed, so that expand-brackets compilers can be used by upstream compilers +- source maps + +**source map example** + +```js +var brackets = require('expand-brackets'); +var res = brackets('[:alpha:]'); +console.log(res.map); + +{ version: 3, + sources: [ 'brackets' ], + names: [], + mappings: 'AAAA,MAAS', + sourcesContent: [ '[:alpha:]' ] } +``` diff --git a/node_modules/expand-brackets/index.js b/node_modules/expand-brackets/index.js new file mode 100644 index 0000000..74b8b15 --- /dev/null +++ b/node_modules/expand-brackets/index.js @@ -0,0 +1,211 @@ +'use strict'; + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); + +/** + * Module dependencies + */ + +var debug = require('debug')('expand-brackets'); +var extend = require('extend-shallow'); +var Snapdragon = require('snapdragon'); +var toRegex = require('to-regex'); + +/** + * Parses the given POSIX character class `pattern` and returns a + * string that can be used for creating regular expressions for matching. + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} + * @api public + */ + +function brackets(pattern, options) { + debug('initializing from <%s>', __filename); + var res = brackets.create(pattern, options); + return res.output; +} + +/** + * Takes an array of strings and a POSIX character class pattern, and returns a new + * array with only the strings that matched the pattern. + * + * ```js + * var brackets = require('expand-brackets'); + * console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]')); + * //=> ['a'] + * + * console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]+')); + * //=> ['a', 'ab'] + * ``` + * @param {Array} `arr` Array of strings to match + * @param {String} `pattern` POSIX character class pattern(s) + * @param {Object} `options` + * @return {Array} + * @api public + */ + +brackets.match = function(arr, pattern, options) { + arr = [].concat(arr); + var opts = extend({}, options); + var isMatch = brackets.matcher(pattern, opts); + var len = arr.length; + var idx = -1; + var res = []; + + while (++idx < len) { + var ele = arr[idx]; + if (isMatch(ele)) { + res.push(ele); + } + } + + if (res.length === 0) { + if (opts.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + + if (opts.nonull === true || opts.nullglob === true) { + return [pattern.split('\\').join('')]; + } + } + return res; +}; + +/** + * Returns true if the specified `string` matches the given + * brackets `pattern`. + * + * ```js + * var brackets = require('expand-brackets'); + * + * console.log(brackets.isMatch('a.a', '[[:alpha:]].[[:alpha:]]')); + * //=> true + * console.log(brackets.isMatch('1.2', '[[:alpha:]].[[:alpha:]]')); + * //=> false + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Poxis pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +brackets.isMatch = function(str, pattern, options) { + return brackets.matcher(pattern, options)(str); +}; + +/** + * Takes a POSIX character class pattern and returns a matcher function. The returned + * function takes the string to match as its only argument. + * + * ```js + * var brackets = require('expand-brackets'); + * var isMatch = brackets.matcher('[[:lower:]].[[:upper:]]'); + * + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.A')); + * //=> true + * ``` + * @param {String} `pattern` Poxis pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +brackets.matcher = function(pattern, options) { + var re = brackets.makeRe(pattern, options); + return function(str) { + return re.test(str); + }; +}; + +/** + * Create a regular expression from the given `pattern`. + * + * ```js + * var brackets = require('expand-brackets'); + * var re = brackets.makeRe('[[:alpha:]]'); + * console.log(re); + * //=> /^(?:[a-zA-Z])$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +brackets.makeRe = function(pattern, options) { + var res = brackets.create(pattern, options); + var opts = extend({strictErrors: false}, options); + return toRegex(res.output, opts); +}; + +/** + * Parses the given POSIX character class `pattern` and returns an object + * with the compiled `output` and optional source `map`. + * + * ```js + * var brackets = require('expand-brackets'); + * console.log(brackets('[[:alpha:]]')); + * // { options: { source: 'string' }, + * // input: '[[:alpha:]]', + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // not: [Function], + * // escape: [Function], + * // text: [Function], + * // posix: [Function], + * // bracket: [Function], + * // 'bracket.open': [Function], + * // 'bracket.inner': [Function], + * // 'bracket.literal': [Function], + * // 'bracket.close': [Function] }, + * // output: '[a-zA-Z]', + * // ast: + * // { type: 'root', + * // errors: [], + * // nodes: [ [Object], [Object], [Object] ] }, + * // parsingErrors: [] } + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} + * @api public + */ + +brackets.create = function(pattern, options) { + var snapdragon = (options && options.snapdragon) || new Snapdragon(options); + compilers(snapdragon); + parsers(snapdragon); + + var ast = snapdragon.parse(pattern, options); + ast.input = pattern; + var res = snapdragon.compile(ast, options); + res.input = pattern; + return res; +}; + +/** + * Expose `brackets` constructor, parsers and compilers + */ + +brackets.compilers = compilers; +brackets.parsers = parsers; + +/** + * Expose `brackets` + * @type {Function} + */ + +module.exports = brackets; diff --git a/node_modules/expand-brackets/lib/compilers.js b/node_modules/expand-brackets/lib/compilers.js new file mode 100644 index 0000000..fbf7fe8 --- /dev/null +++ b/node_modules/expand-brackets/lib/compilers.js @@ -0,0 +1,87 @@ +'use strict'; + +var posix = require('posix-character-classes'); + +module.exports = function(brackets) { + brackets.compiler + + /** + * Escaped characters + */ + + .set('escape', function(node) { + return this.emit('\\' + node.val.replace(/^\\/, ''), node); + }) + + /** + * Text + */ + + .set('text', function(node) { + return this.emit(node.val.replace(/([{}])/g, '\\$1'), node); + }) + + /** + * POSIX character classes + */ + + .set('posix', function(node) { + if (node.val === '[::]') { + return this.emit('\\[::\\]', node); + } + + var val = posix[node.inner]; + if (typeof val === 'undefined') { + val = '[' + node.inner + ']'; + } + return this.emit(val, node); + }) + + /** + * Non-posix brackets + */ + + .set('bracket', function(node) { + return this.mapVisit(node.nodes); + }) + .set('bracket.open', function(node) { + return this.emit(node.val, node); + }) + .set('bracket.inner', function(node) { + var inner = node.val; + + if (inner === '[' || inner === ']') { + return this.emit('\\' + node.val, node); + } + if (inner === '^]') { + return this.emit('^\\]', node); + } + if (inner === '^') { + return this.emit('^', node); + } + + if (/-/.test(inner) && !/(\d-\d|\w-\w)/.test(inner)) { + inner = inner.split('-').join('\\-'); + } + + var isNegated = inner.charAt(0) === '^'; + // add slashes to negated brackets, per spec + if (isNegated && inner.indexOf('/') === -1) { + inner += '/'; + } + if (isNegated && inner.indexOf('.') === -1) { + inner += '.'; + } + + // don't unescape `0` (octal literal) + inner = inner.replace(/\\([1-9])/g, '$1'); + return this.emit(inner, node); + }) + .set('bracket.close', function(node) { + var val = node.val.replace(/^\\/, ''); + if (node.parent.escaped === true) { + return this.emit('\\' + val, node); + } + return this.emit(val, node); + }); +}; diff --git a/node_modules/expand-brackets/lib/parsers.js b/node_modules/expand-brackets/lib/parsers.js new file mode 100644 index 0000000..450a512 --- /dev/null +++ b/node_modules/expand-brackets/lib/parsers.js @@ -0,0 +1,219 @@ +'use strict'; + +var utils = require('./utils'); +var define = require('define-property'); + +/** + * Text regex + */ + +var TEXT_REGEX = '(\\[(?=.*\\])|\\])+'; +var not = utils.createRegex(TEXT_REGEX); + +/** + * Brackets parsers + */ + +function parsers(brackets) { + brackets.state = brackets.state || {}; + brackets.parser.sets.bracket = brackets.parser.sets.bracket || []; + brackets.parser + + .capture('escape', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\\(.)/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[0] + }); + }) + + /** + * Text parser + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + return pos({ + type: 'text', + val: m[0] + }); + }) + + /** + * POSIX character classes: "[[:alpha:][:digits:]]" + */ + + .capture('posix', function() { + var pos = this.position(); + var m = this.match(/^\[:(.*?):\](?=.*\])/); + if (!m) return; + + var inside = this.isInside('bracket'); + if (inside) { + brackets.posix++; + } + + return pos({ + type: 'posix', + insideBracket: inside, + inner: m[1], + val: m[0] + }); + }) + + /** + * Bracket (noop) + */ + + .capture('bracket', function() {}) + + /** + * Open: '[' + */ + + .capture('bracket.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\[(?=.*\])/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { + last.val = last.val.slice(0, last.val.length - 1); + return pos({ + type: 'escape', + val: m[0] + }); + } + + var open = pos({ + type: 'bracket.open', + val: m[0] + }); + + if (last.type === 'bracket.open' || this.isInside('bracket')) { + open.val = '\\' + open.val; + open.type = 'bracket.inner'; + open.escaped = true; + return open; + } + + var node = pos({ + type: 'bracket', + nodes: [open] + }); + + define(node, 'parent', prev); + define(open, 'parent', node); + this.push('bracket', node); + prev.nodes.push(node); + }) + + /** + * Bracket text + */ + + .capture('bracket.inner', function() { + if (!this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + var next = this.input.charAt(0); + var val = m[0]; + + var node = pos({ + type: 'bracket.inner', + val: val + }); + + if (val === '\\\\') { + return node; + } + + var first = val.charAt(0); + var last = val.slice(-1); + + if (first === '!') { + val = '^' + val.slice(1); + } + + if (last === '\\' || (val === '^' && next === ']')) { + val += this.input[0]; + this.consume(1); + } + + node.val = val; + return node; + }) + + /** + * Close: ']' + */ + + .capture('bracket.close', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\]/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { + last.val = last.val.slice(0, last.val.length - 1); + + return pos({ + type: 'escape', + val: m[0] + }); + } + + var node = pos({ + type: 'bracket.close', + rest: this.input, + val: m[0] + }); + + if (last.type === 'bracket.open') { + node.type = 'bracket.inner'; + node.escaped = true; + return node; + } + + var bracket = this.pop('bracket'); + if (!this.isType(bracket, 'bracket')) { + if (this.options.strict) { + throw new Error('missing opening "["'); + } + node.type = 'bracket.inner'; + node.escaped = true; + return node; + } + + bracket.nodes.push(node); + define(node, 'parent', bracket); + }); +} + +/** + * Brackets parsers + */ + +module.exports = parsers; + +/** + * Expose text regex + */ + +module.exports.TEXT_REGEX = TEXT_REGEX; diff --git a/node_modules/expand-brackets/lib/utils.js b/node_modules/expand-brackets/lib/utils.js new file mode 100644 index 0000000..599ff51 --- /dev/null +++ b/node_modules/expand-brackets/lib/utils.js @@ -0,0 +1,34 @@ +'use strict'; + +var toRegex = require('to-regex'); +var regexNot = require('regex-not'); +var cached; + +/** + * Get the last element from `array` + * @param {Array} `array` + * @return {*} + */ + +exports.last = function(arr) { + return arr[arr.length - 1]; +}; + +/** + * Create and cache regex to use for text nodes + */ + +exports.createRegex = function(pattern, include) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re; + + if (typeof include === 'string') { + re = toRegex('^(?:' + include + '|' + not + ')', opts); + } else { + re = toRegex(not, opts); + } + + return (cached = re); +}; diff --git a/node_modules/expand-brackets/node_modules/define-property/LICENSE b/node_modules/expand-brackets/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/expand-brackets/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/node_modules/expand-brackets/node_modules/define-property/README.md b/node_modules/expand-brackets/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/node_modules/expand-brackets/node_modules/define-property/index.js b/node_modules/expand-brackets/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/expand-brackets/node_modules/define-property/package.json b/node_modules/expand-brackets/node_modules/define-property/package.json new file mode 100644 index 0000000..36966be --- /dev/null +++ b/node_modules/expand-brackets/node_modules/define-property/package.json @@ -0,0 +1,82 @@ +{ + "_from": "define-property@^0.2.5", + "_id": "define-property@0.2.5", + "_inBundle": false, + "_integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "_location": "/expand-brackets/define-property", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "define-property@^0.2.5", + "name": "define-property", + "escapedName": "define-property", + "rawSpec": "^0.2.5", + "saveSpec": null, + "fetchSpec": "^0.2.5" + }, + "_requiredBy": [ + "/expand-brackets" + ], + "_resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "_shasum": "c35b1ef918ec3c990f9a5bc57be04aacec5c8116", + "_spec": "define-property@^0.2.5", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/expand-brackets", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "deprecated": false, + "description": "Define a non-enumerable property on an object.", + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/define-property", + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "define-property", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/define-property.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "version": "0.2.5" +} diff --git a/node_modules/expand-brackets/node_modules/extend-shallow/LICENSE b/node_modules/expand-brackets/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/expand-brackets/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +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/node_modules/expand-brackets/node_modules/extend-shallow/README.md b/node_modules/expand-brackets/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..cdc45d4 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/extend-shallow/README.md @@ -0,0 +1,61 @@ +# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i extend-shallow --save +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## Related + +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) +* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/extend-shallow/index.js b/node_modules/expand-brackets/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..92a067f --- /dev/null +++ b/node_modules/expand-brackets/node_modules/extend-shallow/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var isObject = require('is-extendable'); + +module.exports = function extend(o/*, objects*/) { + if (!isObject(o)) { o = {}; } + + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + + if (isObject(obj)) { + assign(o, obj); + } + } + return o; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} diff --git a/node_modules/expand-brackets/node_modules/extend-shallow/package.json b/node_modules/expand-brackets/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..543b17e --- /dev/null +++ b/node_modules/expand-brackets/node_modules/extend-shallow/package.json @@ -0,0 +1,87 @@ +{ + "_from": "extend-shallow@^2.0.1", + "_id": "extend-shallow@2.0.1", + "_inBundle": false, + "_integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "_location": "/expand-brackets/extend-shallow", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "extend-shallow@^2.0.1", + "name": "extend-shallow", + "escapedName": "extend-shallow", + "rawSpec": "^2.0.1", + "saveSpec": null, + "fetchSpec": "^2.0.1" + }, + "_requiredBy": [ + "/expand-brackets" + ], + "_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "_shasum": "51af7d614ad9a9f610ea1bafbb989d6b1c56890f", + "_spec": "extend-shallow@^2.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/expand-brackets", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "deprecated": false, + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "devDependencies": { + "array-slice": "^0.2.3", + "benchmarked": "^0.1.4", + "chalk": "^1.0.0", + "for-own": "^0.1.3", + "glob": "^5.0.12", + "is-plain-object": "^2.0.1", + "kind-of": "^2.0.0", + "minimist": "^1.1.1", + "mocha": "^2.2.5", + "should": "^7.0.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "extend-shallow", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/extend-shallow.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.1" +} diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/LICENSE b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/node_modules/expand-brackets/node_modules/is-accessor-descriptor/README.md b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/README.md new file mode 100644 index 0000000..3743fe6 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/README.md @@ -0,0 +1,123 @@ +# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg)](https://www.npmjs.com/package/is-accessor-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. + +- [Install](#install) +- [Usage](#usage) +- [Examples](#examples) +- [API](#api) +- [Related projects](#related-projects) +- [Running tests](#running-tests) +- [Contributing](#contributing) +- [Author](#author) +- [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i is-accessor-descriptor --save +``` + +## Usage + +```js +var isAccessor = require('is-accessor-descriptor'); + +isAccessor({get: function() {}}); +//=> true +``` + +You may also pass an object and property name to check if the property is an accessor: + +```js +isAccessor(foo, 'bar'); +``` + +## Examples + +`false` when not an object + +```js +isAccessor('a') +isAccessor(null) +isAccessor([]) +//=> false +``` + +`true` when the object has valid properties + +and the properties all have the correct JavaScript types: + +```js +isAccessor({get: noop, set: noop}) +isAccessor({get: noop}) +isAccessor({set: noop}) +//=> true +``` + +`false` when the object has invalid properties + +```js +isAccessor({get: noop, set: noop, bar: 'baz'}) +isAccessor({get: noop, writable: true}) +isAccessor({get: noop, value: true}) +//=> false +``` + +`false` when an accessor is not a function + +```js +isAccessor({get: noop, set: 'baz'}) +isAccessor({get: 'foo', set: noop}) +isAccessor({get: 'foo', bar: 'baz'}) +isAccessor({get: 'foo', set: 'baz'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isAccessor({get: noop, set: noop, enumerable: 'foo'}) +isAccessor({set: noop, configurable: 'foo'}) +isAccessor({get: noop, configurable: 'foo'}) +//=> false +``` + +## Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor) +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor) +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-accessor-descriptor/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/index.js b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/index.js new file mode 100644 index 0000000..2ca4af8 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/index.js @@ -0,0 +1,69 @@ +/*! + * is-accessor-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// accessor descriptor properties +var accessor = { + get: 'function', + set: 'function', + configurable: 'boolean', + enumerable: 'boolean' +}; + +function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (typeOf(obj) !== 'object') { + return false; + } + + if (has(obj, 'value') || has(obj, 'writable')) { + return false; + } + + if (!has(obj, 'get') || typeof obj.get !== 'function') { + return false; + } + + // tldr: it's valid to have "set" be undefined + // "set" might be undefined if `Object.getOwnPropertyDescriptor` + // was used to get the value, and only `get` was defined by the user + if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { + return false; + } + + for (var key in obj) { + if (!accessor.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === accessor[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +function has(obj, key) { + return {}.hasOwnProperty.call(obj, key); +} + +/** + * Expose `isAccessorDescriptor` + */ + +module.exports = isAccessorDescriptor; diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..a5e79b2 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,139 @@ +{ + "_from": "kind-of@^3.0.2", + "_id": "kind-of@3.2.2", + "_inBundle": false, + "_integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "_location": "/expand-brackets/is-accessor-descriptor/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^3.0.2", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^3.0.2", + "saveSpec": null, + "fetchSpec": "^3.0.2" + }, + "_requiredBy": [ + "/expand-brackets/is-accessor-descriptor" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "_shasum": "31ea21a734bab9bbb0f32466d893aea51e4a3c64", + "_spec": "kind-of@^3.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/expand-brackets/node_modules/is-accessor-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "is-buffer": "^1.1.5" + }, + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "3.2.2" +} diff --git a/node_modules/expand-brackets/node_modules/is-accessor-descriptor/package.json b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/package.json new file mode 100644 index 0000000..bb6d63b --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-accessor-descriptor/package.json @@ -0,0 +1,94 @@ +{ + "_from": "is-accessor-descriptor@^0.1.6", + "_id": "is-accessor-descriptor@0.1.6", + "_inBundle": false, + "_integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "_location": "/expand-brackets/is-accessor-descriptor", + "_phantomChildren": { + "is-buffer": "1.1.6" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-accessor-descriptor@^0.1.6", + "name": "is-accessor-descriptor", + "escapedName": "is-accessor-descriptor", + "rawSpec": "^0.1.6", + "saveSpec": null, + "fetchSpec": "^0.1.6" + }, + "_requiredBy": [ + "/expand-brackets/is-descriptor" + ], + "_resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "_shasum": "a9e12cb3ae8d876727eeef3843f8a0897b5c98d6", + "_spec": "is-accessor-descriptor@^0.1.6", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/expand-brackets/node_modules/is-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues" + }, + "bundleDependencies": false, + "dependencies": { + "kind-of": "^3.0.2" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-accessor-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-accessor-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-accessor-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "layout": "default" + }, + "version": "0.1.6" +} diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/LICENSE b/node_modules/expand-brackets/node_modules/is-data-descriptor/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/node_modules/expand-brackets/node_modules/is-data-descriptor/README.md b/node_modules/expand-brackets/node_modules/is-data-descriptor/README.md new file mode 100644 index 0000000..41e1643 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/README.md @@ -0,0 +1,128 @@ +# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg)](https://www.npmjs.com/package/is-data-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-data-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript data descriptor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i is-data-descriptor --save +``` + +## Usage + +```js +var isDataDesc = require('is-data-descriptor'); +``` + +## Examples + +`true` when the descriptor has valid properties with valid values. + +```js +// `value` can be anything +isDataDesc({value: 'foo'}) +isDataDesc({value: function() {}}) +isDataDesc({value: true}) +//=> true +``` + +`false` when not an object + +```js +isDataDesc('a') +//=> false +isDataDesc(null) +//=> false +isDataDesc([]) +//=> false +``` + +`false` when the object has invalid properties + +```js +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', get: function(){}}) +//=> false +isDataDesc({get: function(){}, value: 'foo'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isDataDesc({value: 'foo', enumerable: 'foo'}) +//=> false +isDataDesc({value: 'foo', configurable: 'foo'}) +//=> false +isDataDesc({value: 'foo', writable: 'foo'}) +//=> false +``` + +## Valid properties + +The only valid data descriptor properties are the following: + +* `configurable` (required) +* `enumerable` (required) +* `value` (optional) +* `writable` (optional) + +To be a valid data descriptor, either `value` or `writable` must be defined. + +**Invalid properties** + +A descriptor may have additional _invalid_ properties (an error will **not** be thrown). + +```js +var foo = {}; + +Object.defineProperty(foo, 'bar', { + enumerable: true, + whatever: 'blah', // invalid, but doesn't cause an error + get: function() { + return 'baz'; + } +}); + +console.log(foo.bar); +//=> 'baz' +``` + +## Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor) +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-data-descriptor/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/index.js b/node_modules/expand-brackets/node_modules/is-data-descriptor/index.js new file mode 100644 index 0000000..d4d09c9 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/index.js @@ -0,0 +1,55 @@ +/*! + * is-data-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// data descriptor properties +var data = { + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean' +}; + +function isDataDescriptor(obj, prop) { + if (typeOf(obj) !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!('value' in obj) && !('writable' in obj)) { + return false; + } + + for (var key in obj) { + if (key === 'value') continue; + + if (!data.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === data[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +/** + * Expose `isDataDescriptor` + */ + +module.exports = isDataDescriptor; diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/README.md b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/index.js b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/package.json b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..e4e6f70 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,139 @@ +{ + "_from": "kind-of@^3.0.2", + "_id": "kind-of@3.2.2", + "_inBundle": false, + "_integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "_location": "/expand-brackets/is-data-descriptor/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^3.0.2", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^3.0.2", + "saveSpec": null, + "fetchSpec": "^3.0.2" + }, + "_requiredBy": [ + "/expand-brackets/is-data-descriptor" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "_shasum": "31ea21a734bab9bbb0f32466d893aea51e4a3c64", + "_spec": "kind-of@^3.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/expand-brackets/node_modules/is-data-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "is-buffer": "^1.1.5" + }, + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "3.2.2" +} diff --git a/node_modules/expand-brackets/node_modules/is-data-descriptor/package.json b/node_modules/expand-brackets/node_modules/is-data-descriptor/package.json new file mode 100644 index 0000000..3b0cf7a --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-data-descriptor/package.json @@ -0,0 +1,93 @@ +{ + "_from": "is-data-descriptor@^0.1.4", + "_id": "is-data-descriptor@0.1.4", + "_inBundle": false, + "_integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "_location": "/expand-brackets/is-data-descriptor", + "_phantomChildren": { + "is-buffer": "1.1.6" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-data-descriptor@^0.1.4", + "name": "is-data-descriptor", + "escapedName": "is-data-descriptor", + "rawSpec": "^0.1.4", + "saveSpec": null, + "fetchSpec": "^0.1.4" + }, + "_requiredBy": [ + "/expand-brackets/is-descriptor" + ], + "_resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "_shasum": "0b5ee648388e2c860282e793f1856fec3f301b56", + "_spec": "is-data-descriptor@^0.1.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/expand-brackets/node_modules/is-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-data-descriptor/issues" + }, + "bundleDependencies": false, + "dependencies": { + "kind-of": "^3.0.2" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-data-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-data-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-data-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ] + }, + "version": "0.1.4" +} diff --git a/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE b/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/expand-brackets/node_modules/is-descriptor/README.md b/node_modules/expand-brackets/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..658e533 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-descriptor/README.md @@ -0,0 +1,193 @@ +# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-descriptor +``` + +## Usage + +```js +var isDescriptor = require('is-descriptor'); + +isDescriptor({value: 'foo'}) +//=> true +isDescriptor({get: function(){}, set: function(){}}) +//=> true +isDescriptor({get: 'foo', set: function(){}}) +//=> false +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +var obj = {}; +obj.foo = 'abc'; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +isDescriptor(obj, 'foo'); +//=> true +isDescriptor(obj, 'bar'); +//=> true +``` + +## Examples + +### value type + +`false` when not an object + +```js +isDescriptor('a'); +//=> false +isDescriptor(null); +//=> false +isDescriptor([]); +//=> false +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({value: 'foo'}); +//=> true +isDescriptor({value: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', get: noop}); +//=> false +isDescriptor({get: noop, value: noop}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({value: 'foo', enumerable: 'foo'}); +//=> false +isDescriptor({value: 'foo', configurable: 'foo'}); +//=> false +isDescriptor({value: 'foo', writable: 'foo'}); +//=> false +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({get: noop, set: noop}); +//=> true +isDescriptor({get: noop}); +//=> true +isDescriptor({set: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({get: noop, set: noop, bar: 'baz'}); +//=> false +isDescriptor({get: noop, writable: true}); +//=> false +isDescriptor({get: noop, value: true}); +//=> false +``` + +`false` when an accessor is not a function + +```js +isDescriptor({get: noop, set: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: noop}); +//=> false +isDescriptor({get: 'foo', bar: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: 'baz'}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({get: noop, set: noop, enumerable: 'foo'}); +//=> false +isDescriptor({set: noop, configurable: 'foo'}); +//=> false +isDescriptor({get: noop, configurable: 'foo'}); +//=> false +``` + +## About + +### Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 24 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/is-descriptor/index.js b/node_modules/expand-brackets/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9b91d7 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-descriptor/index.js @@ -0,0 +1,22 @@ +/*! + * is-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (typeOf(obj) !== 'object') { + return false; + } + if ('get' in obj) { + return isAccessor(obj, key); + } + return isData(obj, key); +}; diff --git a/node_modules/expand-brackets/node_modules/is-descriptor/package.json b/node_modules/expand-brackets/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..3ef7f76 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/is-descriptor/package.json @@ -0,0 +1,114 @@ +{ + "_from": "is-descriptor@^0.1.0", + "_id": "is-descriptor@0.1.6", + "_inBundle": false, + "_integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "_location": "/expand-brackets/is-descriptor", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-descriptor@^0.1.0", + "name": "is-descriptor", + "escapedName": "is-descriptor", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/expand-brackets/define-property" + ], + "_resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "_shasum": "366d8240dde487ca51823b1ab9f07a10a78251ca", + "_spec": "is-descriptor@^0.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/expand-brackets/node_modules/define-property", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-descriptor/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "0.1.6" +} diff --git a/node_modules/expand-brackets/node_modules/kind-of/LICENSE b/node_modules/expand-brackets/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/expand-brackets/node_modules/kind-of/README.md b/node_modules/expand-brackets/node_modules/kind-of/README.md new file mode 100644 index 0000000..170bf30 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/kind-of/README.md @@ -0,0 +1,342 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Release history + +### v4.0.0 + +**Added** + +* `promise` support + +### v5.0.0 + +**Added** + +* `Set Iterator` and `Map Iterator` support + +**Fixed** + +* Now returns `generatorfunction` for generator functions + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of is more correct than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly tests instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 82 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 13, 2017._ \ No newline at end of file diff --git a/node_modules/expand-brackets/node_modules/kind-of/index.js b/node_modules/expand-brackets/node_modules/kind-of/index.js new file mode 100644 index 0000000..fc5cde9 --- /dev/null +++ b/node_modules/expand-brackets/node_modules/kind-of/index.js @@ -0,0 +1,147 @@ +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + var type = typeof val; + + // primitivies + if (type === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (type === 'string' || val instanceof String) { + return 'string'; + } + if (type === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (type === 'function' || val instanceof Function) { + if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') { + return 'generatorfunction'; + } + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + if (type === '[object Map Iterator]') { + return 'mapiterator'; + } + if (type === '[object Set Iterator]') { + return 'setiterator'; + } + if (type === '[object String Iterator]') { + return 'stringiterator'; + } + if (type === '[object Array Iterator]') { + return 'arrayiterator'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + return val.constructor + && typeof val.constructor.isBuffer === 'function' + && val.constructor.isBuffer(val); +} diff --git a/node_modules/expand-brackets/node_modules/kind-of/package.json b/node_modules/expand-brackets/node_modules/kind-of/package.json new file mode 100644 index 0000000..2503b6c --- /dev/null +++ b/node_modules/expand-brackets/node_modules/kind-of/package.json @@ -0,0 +1,146 @@ +{ + "_from": "kind-of@^5.0.0", + "_id": "kind-of@5.1.0", + "_inBundle": false, + "_integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "_location": "/expand-brackets/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^5.0.0", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^5.0.0", + "saveSpec": null, + "fetchSpec": "^5.0.0" + }, + "_requiredBy": [ + "/expand-brackets/is-descriptor" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "_shasum": "729c91e2d857b7a419a1f9aa65685c4c33f5845d", + "_spec": "kind-of@^5.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/expand-brackets/node_modules/is-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "James", + "url": "https://twitter.com/aretecode" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + }, + { + "name": "tunnckoCore", + "url": "https://i.am.charlike.online" + } + ], + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.1.1", + "browserify": "^14.4.0", + "gulp-format-md": "^0.1.12", + "matched": "^0.4.4", + "mocha": "^3.4.2", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + }, + "version": "5.1.0" +} diff --git a/node_modules/expand-brackets/package.json b/node_modules/expand-brackets/package.json new file mode 100644 index 0000000..b99eecb --- /dev/null +++ b/node_modules/expand-brackets/package.json @@ -0,0 +1,133 @@ +{ + "_from": "expand-brackets@^2.1.4", + "_id": "expand-brackets@2.1.4", + "_inBundle": false, + "_integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "_location": "/expand-brackets", + "_phantomChildren": { + "is-buffer": "1.1.6", + "is-extendable": "0.1.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "expand-brackets@^2.1.4", + "name": "expand-brackets", + "escapedName": "expand-brackets", + "rawSpec": "^2.1.4", + "saveSpec": null, + "fetchSpec": "^2.1.4" + }, + "_requiredBy": [ + "/extglob" + ], + "_resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "_shasum": "b77735e315ce30f6b6eff0f83b04151a22449622", + "_spec": "expand-brackets@^2.1.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/extglob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/expand-brackets/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + { + "name": "Eugene Sharygin", + "url": "https://github.com/eush77" + }, + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Martin Kolárik", + "email": "martin@kolarik.sk", + "url": "http://kolarik.sk" + } + ], + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "deprecated": false, + "description": "Expand POSIX bracket expressions (character classes) in glob patterns.", + "devDependencies": { + "bash-match": "^0.1.1", + "gulp-format-md": "^0.1.10", + "helper-changelog": "^0.3.0", + "minimatch": "^3.0.3", + "mocha": "^3.0.2", + "multimatch": "^2.1.0", + "yargs-parser": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/jonschlinkert/expand-brackets", + "keywords": [ + "bracket", + "brackets", + "character class", + "expand", + "expression", + "posix" + ], + "license": "MIT", + "main": "index.js", + "name": "expand-brackets", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/expand-brackets.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "helpers": [ + "helper-changelog" + ], + "related": { + "list": [ + "braces", + "extglob", + "micromatch", + "nanomatch" + ] + }, + "reflinks": [ + "micromatch", + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "2.1.4" +} diff --git a/node_modules/express/History.md b/node_modules/express/History.md new file mode 100644 index 0000000..fbf59a2 --- /dev/null +++ b/node_modules/express/History.md @@ -0,0 +1,3374 @@ +4.16.2 / 2017-10-09 +=================== + + * Fix `TypeError` in `res.send` when given `Buffer` and `ETag` header set + * perf: skip parsing of entire `X-Forwarded-Proto` header + +4.16.1 / 2017-09-29 +=================== + + * deps: send@0.16.1 + * deps: serve-static@1.13.1 + - Fix regression when `root` is incorrectly set to a file + - deps: send@0.16.1 + +4.16.0 / 2017-09-28 +=================== + + * Add `"json escape"` setting for `res.json` and `res.jsonp` + * Add `express.json` and `express.urlencoded` to parse bodies + * Add `options` argument to `res.download` + * Improve error message when autoloading invalid view engine + * Improve error messages when non-function provided as middleware + * Skip `Buffer` encoding when not generating ETag for small response + * Use `safe-buffer` for improved Buffer API + * deps: accepts@~1.3.4 + - deps: mime-types@~2.1.16 + * deps: content-type@~1.0.4 + - perf: remove argument reassignment + - perf: skip parameter parsing when no parameters + * deps: etag@~1.8.1 + - perf: replace regular expression with substring + * deps: finalhandler@1.1.0 + - Use `res.headersSent` when available + * deps: parseurl@~1.3.2 + - perf: reduce overhead for full URLs + - perf: unroll the "fast-path" `RegExp` + * deps: proxy-addr@~2.0.2 + - Fix trimming leading / trailing OWS in `X-Forwarded-For` + - deps: forwarded@~0.1.2 + - deps: ipaddr.js@1.5.2 + - perf: reduce overhead when no `X-Forwarded-For` header + * deps: qs@6.5.1 + - Fix parsing & compacting very deep objects + * deps: send@0.16.0 + - Add 70 new types for file extensions + - Add `immutable` option + - Fix missing `` in default error & redirects + - Set charset as "UTF-8" for .js and .json + - Use instance methods on steam to check for listeners + - deps: mime@1.4.1 + - perf: improve path validation speed + * deps: serve-static@1.13.0 + - Add 70 new types for file extensions + - Add `immutable` option + - Set charset as "UTF-8" for .js and .json + - deps: send@0.16.0 + * deps: setprototypeof@1.1.0 + * deps: utils-merge@1.0.1 + * deps: vary@~1.1.2 + - perf: improve header token parsing speed + * perf: re-use options object when generating ETags + * perf: remove dead `.charset` set in `res.jsonp` + +4.15.5 / 2017-09-24 +=================== + + * deps: debug@2.6.9 + * deps: finalhandler@~1.0.6 + - deps: debug@2.6.9 + - deps: parseurl@~1.3.2 + * deps: fresh@0.5.2 + - Fix handling of modified headers with invalid dates + - perf: improve ETag match loop + - perf: improve `If-None-Match` token parsing + * deps: send@0.15.6 + - Fix handling of modified headers with invalid dates + - deps: debug@2.6.9 + - deps: etag@~1.8.1 + - deps: fresh@0.5.2 + - perf: improve `If-Match` token parsing + * deps: serve-static@1.12.6 + - deps: parseurl@~1.3.2 + - deps: send@0.15.6 + - perf: improve slash collapsing + +4.15.4 / 2017-08-06 +=================== + + * deps: debug@2.6.8 + * deps: depd@~1.1.1 + - Remove unnecessary `Buffer` loading + * deps: finalhandler@~1.0.4 + - deps: debug@2.6.8 + * deps: proxy-addr@~1.1.5 + - Fix array argument being altered + - deps: ipaddr.js@1.4.0 + * deps: qs@6.5.0 + * deps: send@0.15.4 + - deps: debug@2.6.8 + - deps: depd@~1.1.1 + - deps: http-errors@~1.6.2 + * deps: serve-static@1.12.4 + - deps: send@0.15.4 + +4.15.3 / 2017-05-16 +=================== + + * Fix error when `res.set` cannot add charset to `Content-Type` + * deps: debug@2.6.7 + - Fix `DEBUG_MAX_ARRAY_LENGTH` + - deps: ms@2.0.0 + * deps: finalhandler@~1.0.3 + - Fix missing `` in HTML document + - deps: debug@2.6.7 + * deps: proxy-addr@~1.1.4 + - deps: ipaddr.js@1.3.0 + * deps: send@0.15.3 + - deps: debug@2.6.7 + - deps: ms@2.0.0 + * deps: serve-static@1.12.3 + - deps: send@0.15.3 + * deps: type-is@~1.6.15 + - deps: mime-types@~2.1.15 + * deps: vary@~1.1.1 + - perf: hoist regular expression + +4.15.2 / 2017-03-06 +=================== + + * deps: qs@6.4.0 + - Fix regression parsing keys starting with `[` + +4.15.1 / 2017-03-05 +=================== + + * deps: send@0.15.1 + - Fix issue when `Date.parse` does not return `NaN` on invalid date + - Fix strict violation in broken environments + * deps: serve-static@1.12.1 + - Fix issue when `Date.parse` does not return `NaN` on invalid date + - deps: send@0.15.1 + +4.15.0 / 2017-03-01 +=================== + + * Add debug message when loading view engine + * Add `next("router")` to exit from router + * Fix case where `router.use` skipped requests routes did not + * Remove usage of `res._headers` private field + - Improves compatibility with Node.js 8 nightly + * Skip routing when `req.url` is not set + * Use `%o` in path debug to tell types apart + * Use `Object.create` to setup request & response prototypes + * Use `setprototypeof` module to replace `__proto__` setting + * Use `statuses` instead of `http` module for status messages + * deps: debug@2.6.1 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable set to `3` or higher + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@0.7.2 + * deps: etag@~1.8.0 + - Use SHA1 instead of MD5 for ETag hashing + - Works with FIPS 140-2 OpenSSL configuration + * deps: finalhandler@~1.0.0 + - Fix exception when `err` cannot be converted to a string + - Fully URL-encode the pathname in the 404 + - Only include the pathname in the 404 message + - Send complete HTML document + - Set `Content-Security-Policy: default-src 'self'` header + - deps: debug@2.6.1 + * deps: fresh@0.5.0 + - Fix false detection of `no-cache` request directive + - Fix incorrect result when `If-None-Match` has both `*` and ETags + - Fix weak `ETag` matching to match spec + - perf: delay reading header values until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove duplicate conditional + - perf: remove unnecessary boolean coercions + - perf: skip checking modified time if ETag check failed + - perf: skip parsing `If-None-Match` when no `ETag` header + - perf: use `Date.parse` instead of `new Date` + * deps: qs@6.3.1 + - Fix array parsing from skipping empty values + - Fix compacting nested arrays + * deps: send@0.15.0 + - Fix false detection of `no-cache` request directive + - Fix incorrect result when `If-None-Match` has both `*` and ETags + - Fix weak `ETag` matching to match spec + - Remove usage of `res._headers` private field + - Support `If-Match` and `If-Unmodified-Since` headers + - Use `res.getHeaderNames()` when available + - Use `res.headersSent` when available + - deps: debug@2.6.1 + - deps: etag@~1.8.0 + - deps: fresh@0.5.0 + - deps: http-errors@~1.6.1 + * deps: serve-static@1.12.0 + - Fix false detection of `no-cache` request directive + - Fix incorrect result when `If-None-Match` has both `*` and ETags + - Fix weak `ETag` matching to match spec + - Remove usage of `res._headers` private field + - Send complete HTML document in redirect response + - Set default CSP header in redirect response + - Support `If-Match` and `If-Unmodified-Since` headers + - Use `res.getHeaderNames()` when available + - Use `res.headersSent` when available + - deps: send@0.15.0 + * perf: add fast match path for `*` route + * perf: improve `req.ips` performance + +4.14.1 / 2017-01-28 +=================== + + * deps: content-disposition@0.5.2 + * deps: finalhandler@0.5.1 + - Fix exception when `err.headers` is not an object + - deps: statuses@~1.3.1 + - perf: hoist regular expressions + - perf: remove duplicate validation path + * deps: proxy-addr@~1.1.3 + - deps: ipaddr.js@1.2.0 + * deps: send@0.14.2 + - deps: http-errors@~1.5.1 + - deps: ms@0.7.2 + - deps: statuses@~1.3.1 + * deps: serve-static@~1.11.2 + - deps: send@0.14.2 + * deps: type-is@~1.6.14 + - deps: mime-types@~2.1.13 + +4.14.0 / 2016-06-16 +=================== + + * Add `acceptRanges` option to `res.sendFile`/`res.sendfile` + * Add `cacheControl` option to `res.sendFile`/`res.sendfile` + * Add `options` argument to `req.range` + - Includes the `combine` option + * Encode URL in `res.location`/`res.redirect` if not already encoded + * Fix some redirect handling in `res.sendFile`/`res.sendfile` + * Fix Windows absolute path check using forward slashes + * Improve error with invalid arguments to `req.get()` + * Improve performance for `res.json`/`res.jsonp` in most cases + * Improve `Range` header handling in `res.sendFile`/`res.sendfile` + * deps: accepts@~1.3.3 + - Fix including type extensions in parameters in `Accept` parsing + - Fix parsing `Accept` parameters with quoted equals + - Fix parsing `Accept` parameters with quoted semicolons + - Many performance improvments + - deps: mime-types@~2.1.11 + - deps: negotiator@0.6.1 + * deps: content-type@~1.0.2 + - perf: enable strict mode + * deps: cookie@0.3.1 + - Add `sameSite` option + - Fix cookie `Max-Age` to never be a floating point number + - Improve error message when `encode` is not a function + - Improve error message when `expires` is not a `Date` + - Throw better error for invalid argument to parse + - Throw on invalid values provided to `serialize` + - perf: enable strict mode + - perf: hoist regular expression + - perf: use for loop in parse + - perf: use string concatination for serialization + * deps: finalhandler@0.5.0 + - Change invalid or non-numeric status code to 500 + - Overwrite status message to match set status code + - Prefer `err.statusCode` if `err.status` is invalid + - Set response headers from `err.headers` object + - Use `statuses` instead of `http` module for status messages + * deps: proxy-addr@~1.1.2 + - Fix accepting various invalid netmasks + - Fix IPv6-mapped IPv4 validation edge cases + - IPv4 netmasks must be contingous + - IPv6 addresses cannot be used as a netmask + - deps: ipaddr.js@1.1.1 + * deps: qs@6.2.0 + - Add `decoder` option in `parse` function + * deps: range-parser@~1.2.0 + - Add `combine` option to combine overlapping ranges + - Fix incorrectly returning -1 when there is at least one valid range + - perf: remove internal function + * deps: send@0.14.1 + - Add `acceptRanges` option + - Add `cacheControl` option + - Attempt to combine multiple ranges into single range + - Correctly inherit from `Stream` class + - Fix `Content-Range` header in 416 responses when using `start`/`end` options + - Fix `Content-Range` header missing from default 416 responses + - Fix redirect error when `path` contains raw non-URL characters + - Fix redirect when `path` starts with multiple forward slashes + - Ignore non-byte `Range` headers + - deps: http-errors@~1.5.0 + - deps: range-parser@~1.2.0 + - deps: statuses@~1.3.0 + - perf: remove argument reassignment + * deps: serve-static@~1.11.1 + - Add `acceptRanges` option + - Add `cacheControl` option + - Attempt to combine multiple ranges into single range + - Fix redirect error when `req.url` contains raw non-URL characters + - Ignore non-byte `Range` headers + - Use status code 301 for redirects + - deps: send@0.14.1 + * deps: type-is@~1.6.13 + - Fix type error when given invalid type to match against + - deps: mime-types@~2.1.11 + * deps: vary@~1.1.0 + - Only accept valid field names in the `field` argument + * perf: use strict equality when possible + +4.13.4 / 2016-01-21 +=================== + + * deps: content-disposition@0.5.1 + - perf: enable strict mode + * deps: cookie@0.1.5 + - Throw on invalid values provided to `serialize` + * deps: depd@~1.1.0 + - Support web browser loading + - perf: enable strict mode + * deps: escape-html@~1.0.3 + - perf: enable strict mode + - perf: optimize string replacement + - perf: use faster string coercion + * deps: finalhandler@0.4.1 + - deps: escape-html@~1.0.3 + * deps: merge-descriptors@1.0.1 + - perf: enable strict mode + * deps: methods@~1.1.2 + - perf: enable strict mode + * deps: parseurl@~1.3.1 + - perf: enable strict mode + * deps: proxy-addr@~1.0.10 + - deps: ipaddr.js@1.0.5 + - perf: enable strict mode + * deps: range-parser@~1.0.3 + - perf: enable strict mode + * deps: send@0.13.1 + - deps: depd@~1.1.0 + - deps: destroy@~1.0.4 + - deps: escape-html@~1.0.3 + - deps: range-parser@~1.0.3 + * deps: serve-static@~1.10.2 + - deps: escape-html@~1.0.3 + - deps: parseurl@~1.3.0 + - deps: send@0.13.1 + +4.13.3 / 2015-08-02 +=================== + + * Fix infinite loop condition using `mergeParams: true` + * Fix inner numeric indices incorrectly altering parent `req.params` + +4.13.2 / 2015-07-31 +=================== + + * deps: accepts@~1.2.12 + - deps: mime-types@~2.1.4 + * deps: array-flatten@1.1.1 + - perf: enable strict mode + * deps: path-to-regexp@0.1.7 + - Fix regression with escaped round brackets and matching groups + * deps: type-is@~1.6.6 + - deps: mime-types@~2.1.4 + +4.13.1 / 2015-07-05 +=================== + + * deps: accepts@~1.2.10 + - deps: mime-types@~2.1.2 + * deps: qs@4.0.0 + - Fix dropping parameters like `hasOwnProperty` + - Fix various parsing edge cases + * deps: type-is@~1.6.4 + - deps: mime-types@~2.1.2 + - perf: enable strict mode + - perf: remove argument reassignment + +4.13.0 / 2015-06-20 +=================== + + * Add settings to debug output + * Fix `res.format` error when only `default` provided + * Fix issue where `next('route')` in `app.param` would incorrectly skip values + * Fix hiding platform issues with `decodeURIComponent` + - Only `URIError`s are a 400 + * Fix using `*` before params in routes + * Fix using capture groups before params in routes + * Simplify `res.cookie` to call `res.append` + * Use `array-flatten` module for flattening arrays + * deps: accepts@~1.2.9 + - deps: mime-types@~2.1.1 + - perf: avoid argument reassignment & argument slice + - perf: avoid negotiator recursive construction + - perf: enable strict mode + - perf: remove unnecessary bitwise operator + * deps: cookie@0.1.3 + - perf: deduce the scope of try-catch deopt + - perf: remove argument reassignments + * deps: escape-html@1.0.2 + * deps: etag@~1.7.0 + - Always include entity length in ETags for hash length extensions + - Generate non-Stats ETags using MD5 only (no longer CRC32) + - Improve stat performance by removing hashing + - Improve support for JXcore + - Remove base64 padding in ETags to shorten + - Support "fake" stats objects in environments without fs + - Use MD5 instead of MD4 in weak ETags over 1KB + * deps: finalhandler@0.4.0 + - Fix a false-positive when unpiping in Node.js 0.8 + - Support `statusCode` property on `Error` objects + - Use `unpipe` module for unpiping requests + - deps: escape-html@1.0.2 + - deps: on-finished@~2.3.0 + - perf: enable strict mode + - perf: remove argument reassignment + * deps: fresh@0.3.0 + - Add weak `ETag` matching support + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * deps: path-to-regexp@0.1.6 + * deps: send@0.13.0 + - Allow Node.js HTTP server to set `Date` response header + - Fix incorrectly removing `Content-Location` on 304 response + - Improve the default redirect response headers + - Send appropriate headers on default error response + - Use `http-errors` for standard emitted errors + - Use `statuses` instead of `http` module for status messages + - deps: escape-html@1.0.2 + - deps: etag@~1.7.0 + - deps: fresh@0.3.0 + - deps: on-finished@~2.3.0 + - perf: enable strict mode + - perf: remove unnecessary array allocations + * deps: serve-static@~1.10.0 + - Add `fallthrough` option + - Fix reading options from options prototype + - Improve the default redirect response headers + - Malformed URLs now `next()` instead of 400 + - deps: escape-html@1.0.2 + - deps: send@0.13.0 + - perf: enable strict mode + - perf: remove argument reassignment + * deps: type-is@~1.6.3 + - deps: mime-types@~2.1.1 + - perf: reduce try block size + - perf: remove bitwise operations + * perf: enable strict mode + * perf: isolate `app.render` try block + * perf: remove argument reassignments in application + * perf: remove argument reassignments in request prototype + * perf: remove argument reassignments in response prototype + * perf: remove argument reassignments in routing + * perf: remove argument reassignments in `View` + * perf: skip attempting to decode zero length string + * perf: use saved reference to `http.STATUS_CODES` + +4.12.4 / 2015-05-17 +=================== + + * deps: accepts@~1.2.7 + - deps: mime-types@~2.0.11 + - deps: negotiator@0.5.3 + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: etag@~1.6.0 + - Improve support for JXcore + - Support "fake" stats objects in environments without `fs` + * deps: finalhandler@0.3.6 + - deps: debug@~2.2.0 + - deps: on-finished@~2.2.1 + * deps: on-finished@~2.2.1 + - Fix `isFinished(req)` when data buffered + * deps: proxy-addr@~1.0.8 + - deps: ipaddr.js@1.0.1 + * deps: qs@2.4.2 + - Fix allowing parameters like `constructor` + * deps: send@0.12.3 + - deps: debug@~2.2.0 + - deps: depd@~1.0.1 + - deps: etag@~1.6.0 + - deps: ms@0.7.1 + - deps: on-finished@~2.2.1 + * deps: serve-static@~1.9.3 + - deps: send@0.12.3 + * deps: type-is@~1.6.2 + - deps: mime-types@~2.0.11 + +4.12.3 / 2015-03-17 +=================== + + * deps: accepts@~1.2.5 + - deps: mime-types@~2.0.10 + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + * deps: finalhandler@0.3.4 + - deps: debug@~2.1.3 + * deps: proxy-addr@~1.0.7 + - deps: ipaddr.js@0.1.9 + * deps: qs@2.4.1 + - Fix error when parameter `hasOwnProperty` is present + * deps: send@0.12.2 + - Throw errors early for invalid `extensions` or `index` options + - deps: debug@~2.1.3 + * deps: serve-static@~1.9.2 + - deps: send@0.12.2 + * deps: type-is@~1.6.1 + - deps: mime-types@~2.0.10 + +4.12.2 / 2015-03-02 +=================== + + * Fix regression where `"Request aborted"` is logged using `res.sendFile` + +4.12.1 / 2015-03-01 +=================== + + * Fix constructing application with non-configurable prototype properties + * Fix `ECONNRESET` errors from `res.sendFile` usage + * Fix `req.host` when using "trust proxy" hops count + * Fix `req.protocol`/`req.secure` when using "trust proxy" hops count + * Fix wrong `code` on aborted connections from `res.sendFile` + * deps: merge-descriptors@1.0.0 + +4.12.0 / 2015-02-23 +=================== + + * Fix `"trust proxy"` setting to inherit when app is mounted + * Generate `ETag`s for all request responses + - No longer restricted to only responses for `GET` and `HEAD` requests + * Use `content-type` to parse `Content-Type` headers + * deps: accepts@~1.2.4 + - Fix preference sorting to be stable for long acceptable lists + - deps: mime-types@~2.0.9 + - deps: negotiator@0.5.1 + * deps: cookie-signature@1.0.6 + * deps: send@0.12.1 + - Always read the stat size from the file + - Fix mutating passed-in `options` + - deps: mime@1.3.4 + * deps: serve-static@~1.9.1 + - deps: send@0.12.1 + * deps: type-is@~1.6.0 + - fix argument reassignment + - fix false-positives in `hasBody` `Transfer-Encoding` check + - support wildcard for both type and subtype (`*/*`) + - deps: mime-types@~2.0.9 + +4.11.2 / 2015-02-01 +=================== + + * Fix `res.redirect` double-calling `res.end` for `HEAD` requests + * deps: accepts@~1.2.3 + - deps: mime-types@~2.0.8 + * deps: proxy-addr@~1.0.6 + - deps: ipaddr.js@0.1.8 + * deps: type-is@~1.5.6 + - deps: mime-types@~2.0.8 + +4.11.1 / 2015-01-20 +=================== + + * deps: send@0.11.1 + - Fix root path disclosure + * deps: serve-static@~1.8.1 + - Fix redirect loop in Node.js 0.11.14 + - Fix root path disclosure + - deps: send@0.11.1 + +4.11.0 / 2015-01-13 +=================== + + * Add `res.append(field, val)` to append headers + * Deprecate leading `:` in `name` for `app.param(name, fn)` + * Deprecate `req.param()` -- use `req.params`, `req.body`, or `req.query` instead + * Deprecate `app.param(fn)` + * Fix `OPTIONS` responses to include the `HEAD` method properly + * Fix `res.sendFile` not always detecting aborted connection + * Match routes iteratively to prevent stack overflows + * deps: accepts@~1.2.2 + - deps: mime-types@~2.0.7 + - deps: negotiator@0.5.0 + * deps: send@0.11.0 + - deps: debug@~2.1.1 + - deps: etag@~1.5.1 + - deps: ms@0.7.0 + - deps: on-finished@~2.2.0 + * deps: serve-static@~1.8.0 + - deps: send@0.11.0 + +4.10.8 / 2015-01-13 +=================== + + * Fix crash from error within `OPTIONS` response handler + * deps: proxy-addr@~1.0.5 + - deps: ipaddr.js@0.1.6 + +4.10.7 / 2015-01-04 +=================== + + * Fix `Allow` header for `OPTIONS` to not contain duplicate methods + * Fix incorrect "Request aborted" for `res.sendFile` when `HEAD` or 304 + * deps: debug@~2.1.1 + * deps: finalhandler@0.3.3 + - deps: debug@~2.1.1 + - deps: on-finished@~2.2.0 + * deps: methods@~1.1.1 + * deps: on-finished@~2.2.0 + * deps: serve-static@~1.7.2 + - Fix potential open redirect when mounted at root + * deps: type-is@~1.5.5 + - deps: mime-types@~2.0.7 + +4.10.6 / 2014-12-12 +=================== + + * Fix exception in `req.fresh`/`req.stale` without response headers + +4.10.5 / 2014-12-10 +=================== + + * Fix `res.send` double-calling `res.end` for `HEAD` requests + * deps: accepts@~1.1.4 + - deps: mime-types@~2.0.4 + * deps: type-is@~1.5.4 + - deps: mime-types@~2.0.4 + +4.10.4 / 2014-11-24 +=================== + + * Fix `res.sendfile` logging standard write errors + +4.10.3 / 2014-11-23 +=================== + + * Fix `res.sendFile` logging standard write errors + * deps: etag@~1.5.1 + * deps: proxy-addr@~1.0.4 + - deps: ipaddr.js@0.1.5 + * deps: qs@2.3.3 + - Fix `arrayLimit` behavior + +4.10.2 / 2014-11-09 +=================== + + * Correctly invoke async router callback asynchronously + * deps: accepts@~1.1.3 + - deps: mime-types@~2.0.3 + * deps: type-is@~1.5.3 + - deps: mime-types@~2.0.3 + +4.10.1 / 2014-10-28 +=================== + + * Fix handling of URLs containing `://` in the path + * deps: qs@2.3.2 + - Fix parsing of mixed objects and values + +4.10.0 / 2014-10-23 +=================== + + * Add support for `app.set('views', array)` + - Views are looked up in sequence in array of directories + * Fix `res.send(status)` to mention `res.sendStatus(status)` + * Fix handling of invalid empty URLs + * Use `content-disposition` module for `res.attachment`/`res.download` + - Sends standards-compliant `Content-Disposition` header + - Full Unicode support + * Use `path.resolve` in view lookup + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + * deps: depd@~1.0.0 + * deps: etag@~1.5.0 + - Improve string performance + - Slightly improve speed for weak ETags over 1KB + * deps: finalhandler@0.3.2 + - Terminate in progress response only on error + - Use `on-finished` to determine request status + - deps: debug@~2.1.0 + - deps: on-finished@~2.1.1 + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + * deps: qs@2.3.0 + - Fix parsing of mixed implicit and explicit arrays + * deps: send@0.10.1 + - deps: debug@~2.1.0 + - deps: depd@~1.0.0 + - deps: etag@~1.5.0 + - deps: on-finished@~2.1.1 + * deps: serve-static@~1.7.1 + - deps: send@0.10.1 + +4.9.8 / 2014-10-17 +================== + + * Fix `res.redirect` body when redirect status specified + * deps: accepts@~1.1.2 + - Fix error when media type has invalid parameter + - deps: negotiator@0.4.9 + +4.9.7 / 2014-10-10 +================== + + * Fix using same param name in array of paths + +4.9.6 / 2014-10-08 +================== + + * deps: accepts@~1.1.1 + - deps: mime-types@~2.0.2 + - deps: negotiator@0.4.8 + * deps: serve-static@~1.6.4 + - Fix redirect loop when index file serving disabled + * deps: type-is@~1.5.2 + - deps: mime-types@~2.0.2 + +4.9.5 / 2014-09-24 +================== + + * deps: etag@~1.4.0 + * deps: proxy-addr@~1.0.3 + - Use `forwarded` npm module + * deps: send@0.9.3 + - deps: etag@~1.4.0 + * deps: serve-static@~1.6.3 + - deps: send@0.9.3 + +4.9.4 / 2014-09-19 +================== + + * deps: qs@2.2.4 + - Fix issue with object keys starting with numbers truncated + +4.9.3 / 2014-09-18 +================== + + * deps: proxy-addr@~1.0.2 + - Fix a global leak when multiple subnets are trusted + - deps: ipaddr.js@0.1.3 + +4.9.2 / 2014-09-17 +================== + + * Fix regression for empty string `path` in `app.use` + * Fix `router.use` to accept array of middleware without path + * Improve error message for bad `app.use` arguments + +4.9.1 / 2014-09-16 +================== + + * Fix `app.use` to accept array of middleware without path + * deps: depd@0.4.5 + * deps: etag@~1.3.1 + * deps: send@0.9.2 + - deps: depd@0.4.5 + - deps: etag@~1.3.1 + - deps: range-parser@~1.0.2 + * deps: serve-static@~1.6.2 + - deps: send@0.9.2 + +4.9.0 / 2014-09-08 +================== + + * Add `res.sendStatus` + * Invoke callback for sendfile when client aborts + - Applies to `res.sendFile`, `res.sendfile`, and `res.download` + - `err` will be populated with request aborted error + * Support IP address host in `req.subdomains` + * Use `etag` to generate `ETag` headers + * deps: accepts@~1.1.0 + - update `mime-types` + * deps: cookie-signature@1.0.5 + * deps: debug@~2.0.0 + * deps: finalhandler@0.2.0 + - Set `X-Content-Type-Options: nosniff` header + - deps: debug@~2.0.0 + * deps: fresh@0.2.4 + * deps: media-typer@0.3.0 + - Throw error when parameter format invalid on parse + * deps: qs@2.2.3 + - Fix issue where first empty value in array is discarded + * deps: range-parser@~1.0.2 + * deps: send@0.9.1 + - Add `lastModified` option + - Use `etag` to generate `ETag` header + - deps: debug@~2.0.0 + - deps: fresh@0.2.4 + * deps: serve-static@~1.6.1 + - Add `lastModified` option + - deps: send@0.9.1 + * deps: type-is@~1.5.1 + - fix `hasbody` to be true for `content-length: 0` + - deps: media-typer@0.3.0 + - deps: mime-types@~2.0.1 + * deps: vary@~1.0.0 + - Accept valid `Vary` header string as `field` + +4.8.8 / 2014-09-04 +================== + + * deps: send@0.8.5 + - Fix a path traversal issue when using `root` + - Fix malicious path detection for empty string path + * deps: serve-static@~1.5.4 + - deps: send@0.8.5 + +4.8.7 / 2014-08-29 +================== + + * deps: qs@2.2.2 + - Remove unnecessary cloning + +4.8.6 / 2014-08-27 +================== + + * deps: qs@2.2.0 + - Array parsing fix + - Performance improvements + +4.8.5 / 2014-08-18 +================== + + * deps: send@0.8.3 + - deps: destroy@1.0.3 + - deps: on-finished@2.1.0 + * deps: serve-static@~1.5.3 + - deps: send@0.8.3 + +4.8.4 / 2014-08-14 +================== + + * deps: qs@1.2.2 + * deps: send@0.8.2 + - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` + * deps: serve-static@~1.5.2 + - deps: send@0.8.2 + +4.8.3 / 2014-08-10 +================== + + * deps: parseurl@~1.3.0 + * deps: qs@1.2.1 + * deps: serve-static@~1.5.1 + - Fix parsing of weird `req.originalUrl` values + - deps: parseurl@~1.3.0 + - deps: utils-merge@1.0.0 + +4.8.2 / 2014-08-07 +================== + + * deps: qs@1.2.0 + - Fix parsing array of objects + +4.8.1 / 2014-08-06 +================== + + * fix incorrect deprecation warnings on `res.download` + * deps: qs@1.1.0 + - Accept urlencoded square brackets + - Accept empty values in implicit array notation + +4.8.0 / 2014-08-05 +================== + + * add `res.sendFile` + - accepts a file system path instead of a URL + - requires an absolute path or `root` option specified + * deprecate `res.sendfile` -- use `res.sendFile` instead + * support mounted app as any argument to `app.use()` + * deps: qs@1.0.2 + - Complete rewrite + - Limits array length to 20 + - Limits object depth to 5 + - Limits parameters to 1,000 + * deps: send@0.8.1 + - Add `extensions` option + * deps: serve-static@~1.5.0 + - Add `extensions` option + - deps: send@0.8.1 + +4.7.4 / 2014-08-04 +================== + + * fix `res.sendfile` regression for serving directory index files + * deps: send@0.7.4 + - Fix incorrect 403 on Windows and Node.js 0.11 + - Fix serving index files without root dir + * deps: serve-static@~1.4.4 + - deps: send@0.7.4 + +4.7.3 / 2014-08-04 +================== + + * deps: send@0.7.3 + - Fix incorrect 403 on Windows and Node.js 0.11 + * deps: serve-static@~1.4.3 + - Fix incorrect 403 on Windows and Node.js 0.11 + - deps: send@0.7.3 + +4.7.2 / 2014-07-27 +================== + + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + * deps: send@0.7.2 + - deps: depd@0.4.4 + * deps: serve-static@~1.4.2 + +4.7.1 / 2014-07-26 +================== + + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + * deps: send@0.7.1 + - deps: depd@0.4.3 + * deps: serve-static@~1.4.1 + +4.7.0 / 2014-07-25 +================== + + * fix `req.protocol` for proxy-direct connections + * configurable query parser with `app.set('query parser', parser)` + - `app.set('query parser', 'extended')` parse with "qs" module + - `app.set('query parser', 'simple')` parse with "querystring" core module + - `app.set('query parser', false)` disable query string parsing + - `app.set('query parser', true)` enable simple parsing + * deprecate `res.json(status, obj)` -- use `res.status(status).json(obj)` instead + * deprecate `res.jsonp(status, obj)` -- use `res.status(status).jsonp(obj)` instead + * deprecate `res.send(status, body)` -- use `res.status(status).send(body)` instead + * deps: debug@1.0.4 + * deps: depd@0.4.2 + - Add `TRACE_DEPRECATION` environment variable + - Remove non-standard grey color from color output + - Support `--no-deprecation` argument + - Support `--trace-deprecation` argument + * deps: finalhandler@0.1.0 + - Respond after request fully read + - deps: debug@1.0.4 + * deps: parseurl@~1.2.0 + - Cache URLs based on original value + - Remove no-longer-needed URL mis-parse work-around + - Simplify the "fast-path" `RegExp` + * deps: send@0.7.0 + - Add `dotfiles` option + - Cap `maxAge` value to 1 year + - deps: debug@1.0.4 + - deps: depd@0.4.2 + * deps: serve-static@~1.4.0 + - deps: parseurl@~1.2.0 + - deps: send@0.7.0 + * perf: prevent multiple `Buffer` creation in `res.send` + +4.6.1 / 2014-07-12 +================== + + * fix `subapp.mountpath` regression for `app.use(subapp)` + +4.6.0 / 2014-07-11 +================== + + * accept multiple callbacks to `app.use()` + * add explicit "Rosetta Flash JSONP abuse" protection + - previous versions are not vulnerable; this is just explicit protection + * catch errors in multiple `req.param(name, fn)` handlers + * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead + * fix `res.send(status, num)` to send `num` as json (not error) + * remove unnecessary escaping when `res.jsonp` returns JSON response + * support non-string `path` in `app.use(path, fn)` + - supports array of paths + - supports `RegExp` + * router: fix optimization on router exit + * router: refactor location of `try` blocks + * router: speed up standard `app.use(fn)` + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + * deps: finalhandler@0.0.3 + - deps: debug@1.0.3 + * deps: methods@1.1.0 + - add `CONNECT` + * deps: parseurl@~1.1.3 + - faster parsing of href-only URLs + * deps: path-to-regexp@0.1.3 + * deps: send@0.6.0 + - deps: debug@1.0.3 + * deps: serve-static@~1.3.2 + - deps: parseurl@~1.1.3 + - deps: send@0.6.0 + * perf: fix arguments reassign deopt in some `res` methods + +4.5.1 / 2014-07-06 +================== + + * fix routing regression when altering `req.method` + +4.5.0 / 2014-07-04 +================== + + * add deprecation message to non-plural `req.accepts*` + * add deprecation message to `res.send(body, status)` + * add deprecation message to `res.vary()` + * add `headers` option to `res.sendfile` + - use to set headers on successful file transfer + * add `mergeParams` option to `Router` + - merges `req.params` from parent routes + * add `req.hostname` -- correct name for what `req.host` returns + * deprecate things with `depd` module + * deprecate `req.host` -- use `req.hostname` instead + * fix behavior when handling request without routes + * fix handling when `route.all` is only route + * invoke `router.param()` only when route matches + * restore `req.params` after invoking router + * use `finalhandler` for final response handling + * use `media-typer` to alter content-type charset + * deps: accepts@~1.0.7 + * deps: send@0.5.0 + - Accept string for `maxage` (converted by `ms`) + - Include link in default redirect response + * deps: serve-static@~1.3.0 + - Accept string for `maxAge` (converted by `ms`) + - Add `setHeaders` option + - Include HTML link in redirect response + - deps: send@0.5.0 + * deps: type-is@~1.3.2 + +4.4.5 / 2014-06-26 +================== + + * deps: cookie-signature@1.0.4 + - fix for timing attacks + +4.4.4 / 2014-06-20 +================== + + * fix `res.attachment` Unicode filenames in Safari + * fix "trim prefix" debug message in `express:router` + * deps: accepts@~1.0.5 + * deps: buffer-crc32@0.2.3 + +4.4.3 / 2014-06-11 +================== + + * fix persistence of modified `req.params[name]` from `app.param()` + * deps: accepts@1.0.3 + - deps: negotiator@0.4.6 + * deps: debug@1.0.2 + * deps: send@0.4.3 + - Do not throw un-catchable error on file open race condition + - Use `escape-html` for HTML escaping + - deps: debug@1.0.2 + - deps: finished@1.2.2 + - deps: fresh@0.2.2 + * deps: serve-static@1.2.3 + - Do not throw un-catchable error on file open race condition + - deps: send@0.4.3 + +4.4.2 / 2014-06-09 +================== + + * fix catching errors from top-level handlers + * use `vary` module for `res.vary` + * deps: debug@1.0.1 + * deps: proxy-addr@1.0.1 + * deps: send@0.4.2 + - fix "event emitter leak" warnings + - deps: debug@1.0.1 + - deps: finished@1.2.1 + * deps: serve-static@1.2.2 + - fix "event emitter leak" warnings + - deps: send@0.4.2 + * deps: type-is@1.2.1 + +4.4.1 / 2014-06-02 +================== + + * deps: methods@1.0.1 + * deps: send@0.4.1 + - Send `max-age` in `Cache-Control` in correct format + * deps: serve-static@1.2.1 + - use `escape-html` for escaping + - deps: send@0.4.1 + +4.4.0 / 2014-05-30 +================== + + * custom etag control with `app.set('etag', val)` + - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation + - `app.set('etag', 'weak')` weak tag + - `app.set('etag', 'strong')` strong etag + - `app.set('etag', false)` turn off + - `app.set('etag', true)` standard etag + * mark `res.send` ETag as weak and reduce collisions + * update accepts to 1.0.2 + - Fix interpretation when header not in request + * update send to 0.4.0 + - Calculate ETag with md5 for reduced collisions + - Ignore stream errors after request ends + - deps: debug@0.8.1 + * update serve-static to 1.2.0 + - Calculate ETag with md5 for reduced collisions + - Ignore stream errors after request ends + - deps: send@0.4.0 + +4.3.2 / 2014-05-28 +================== + + * fix handling of errors from `router.param()` callbacks + +4.3.1 / 2014-05-23 +================== + + * revert "fix behavior of multiple `app.VERB` for the same path" + - this caused a regression in the order of route execution + +4.3.0 / 2014-05-21 +================== + + * add `req.baseUrl` to access the path stripped from `req.url` in routes + * fix behavior of multiple `app.VERB` for the same path + * fix issue routing requests among sub routers + * invoke `router.param()` only when necessary instead of every match + * proper proxy trust with `app.set('trust proxy', trust)` + - `app.set('trust proxy', 1)` trust first hop + - `app.set('trust proxy', 'loopback')` trust loopback addresses + - `app.set('trust proxy', '10.0.0.1')` trust single IP + - `app.set('trust proxy', '10.0.0.1/16')` trust subnet + - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list + - `app.set('trust proxy', false)` turn off + - `app.set('trust proxy', true)` trust everything + * set proper `charset` in `Content-Type` for `res.send` + * update type-is to 1.2.0 + - support suffix matching + +4.2.0 / 2014-05-11 +================== + + * deprecate `app.del()` -- use `app.delete()` instead + * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead + - the edge-case `res.json(status, num)` requires `res.status(status).json(num)` + * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead + - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)` + * fix `req.next` when inside router instance + * include `ETag` header in `HEAD` requests + * keep previous `Content-Type` for `res.jsonp` + * support PURGE method + - add `app.purge` + - add `router.purge` + - include PURGE in `app.all` + * update debug to 0.8.0 + - add `enable()` method + - change from stderr to stdout + * update methods to 1.0.0 + - add PURGE + +4.1.2 / 2014-05-08 +================== + + * fix `req.host` for IPv6 literals + * fix `res.jsonp` error if callback param is object + +4.1.1 / 2014-04-27 +================== + + * fix package.json to reflect supported node version + +4.1.0 / 2014-04-24 +================== + + * pass options from `res.sendfile` to `send` + * preserve casing of headers in `res.header` and `res.set` + * support unicode file names in `res.attachment` and `res.download` + * update accepts to 1.0.1 + - deps: negotiator@0.4.0 + * update cookie to 0.1.2 + - Fix for maxAge == 0 + - made compat with expires field + * update send to 0.3.0 + - Accept API options in options object + - Coerce option types + - Control whether to generate etags + - Default directory access to 403 when index disabled + - Fix sending files with dots without root set + - Include file path in etag + - Make "Can't set headers after they are sent." catchable + - Send full entity-body for multi range requests + - Set etags to "weak" + - Support "If-Range" header + - Support multiple index paths + - deps: mime@1.2.11 + * update serve-static to 1.1.0 + - Accept options directly to `send` module + - Resolve relative paths at middleware setup + - Use parseurl to parse the URL from request + - deps: send@0.3.0 + * update type-is to 1.1.0 + - add non-array values support + - add `multipart` as a shorthand + +4.0.0 / 2014-04-09 +================== + + * remove: + - node 0.8 support + - connect and connect's patches except for charset handling + - express(1) - moved to [express-generator](https://github.com/expressjs/generator) + - `express.createServer()` - it has been deprecated for a long time. Use `express()` + - `app.configure` - use logic in your own app code + - `app.router` - is removed + - `req.auth` - use `basic-auth` instead + - `req.accepted*` - use `req.accepts*()` instead + - `res.location` - relative URL resolution is removed + - `res.charset` - include the charset in the content type when using `res.set()` + - all bundled middleware except `static` + * change: + - `app.route` -> `app.mountpath` when mounting an express app in another express app + - `json spaces` no longer enabled by default in development + - `req.accepts*` -> `req.accepts*s` - i.e. `req.acceptsEncoding` -> `req.acceptsEncodings` + - `req.params` is now an object instead of an array + - `res.locals` is no longer a function. It is a plain js object. Treat it as such. + - `res.headerSent` -> `res.headersSent` to match node.js ServerResponse object + * refactor: + - `req.accepts*` with [accepts](https://github.com/expressjs/accepts) + - `req.is` with [type-is](https://github.com/expressjs/type-is) + - [path-to-regexp](https://github.com/component/path-to-regexp) + * add: + - `app.router()` - returns the app Router instance + - `app.route()` - Proxy to the app's `Router#route()` method to create a new route + - Router & Route - public API + +3.21.2 / 2015-07-31 +=================== + + * deps: connect@2.30.2 + - deps: body-parser@~1.13.3 + - deps: compression@~1.5.2 + - deps: errorhandler@~1.4.2 + - deps: method-override@~2.3.5 + - deps: serve-index@~1.7.2 + - deps: type-is@~1.6.6 + - deps: vhost@~3.0.1 + * deps: vary@~1.0.1 + - Fix setting empty header from empty `field` + - perf: enable strict mode + - perf: remove argument reassignments + +3.21.1 / 2015-07-05 +=================== + + * deps: basic-auth@~1.0.3 + * deps: connect@2.30.1 + - deps: body-parser@~1.13.2 + - deps: compression@~1.5.1 + - deps: errorhandler@~1.4.1 + - deps: morgan@~1.6.1 + - deps: pause@0.1.0 + - deps: qs@4.0.0 + - deps: serve-index@~1.7.1 + - deps: type-is@~1.6.4 + +3.21.0 / 2015-06-18 +=================== + + * deps: basic-auth@1.0.2 + - perf: enable strict mode + - perf: hoist regular expression + - perf: parse with regular expressions + - perf: remove argument reassignment + * deps: connect@2.30.0 + - deps: body-parser@~1.13.1 + - deps: bytes@2.1.0 + - deps: compression@~1.5.0 + - deps: cookie@0.1.3 + - deps: cookie-parser@~1.3.5 + - deps: csurf@~1.8.3 + - deps: errorhandler@~1.4.0 + - deps: express-session@~1.11.3 + - deps: finalhandler@0.4.0 + - deps: fresh@0.3.0 + - deps: morgan@~1.6.0 + - deps: serve-favicon@~2.3.0 + - deps: serve-index@~1.7.0 + - deps: serve-static@~1.10.0 + - deps: type-is@~1.6.3 + * deps: cookie@0.1.3 + - perf: deduce the scope of try-catch deopt + - perf: remove argument reassignments + * deps: escape-html@1.0.2 + * deps: etag@~1.7.0 + - Always include entity length in ETags for hash length extensions + - Generate non-Stats ETags using MD5 only (no longer CRC32) + - Improve stat performance by removing hashing + - Improve support for JXcore + - Remove base64 padding in ETags to shorten + - Support "fake" stats objects in environments without fs + - Use MD5 instead of MD4 in weak ETags over 1KB + * deps: fresh@0.3.0 + - Add weak `ETag` matching support + * deps: mkdirp@0.5.1 + - Work in global strict mode + * deps: send@0.13.0 + - Allow Node.js HTTP server to set `Date` response header + - Fix incorrectly removing `Content-Location` on 304 response + - Improve the default redirect response headers + - Send appropriate headers on default error response + - Use `http-errors` for standard emitted errors + - Use `statuses` instead of `http` module for status messages + - deps: escape-html@1.0.2 + - deps: etag@~1.7.0 + - deps: fresh@0.3.0 + - deps: on-finished@~2.3.0 + - perf: enable strict mode + - perf: remove unnecessary array allocations + +3.20.3 / 2015-05-17 +=================== + + * deps: connect@2.29.2 + - deps: body-parser@~1.12.4 + - deps: compression@~1.4.4 + - deps: connect-timeout@~1.6.2 + - deps: debug@~2.2.0 + - deps: depd@~1.0.1 + - deps: errorhandler@~1.3.6 + - deps: finalhandler@0.3.6 + - deps: method-override@~2.3.3 + - deps: morgan@~1.5.3 + - deps: qs@2.4.2 + - deps: response-time@~2.3.1 + - deps: serve-favicon@~2.2.1 + - deps: serve-index@~1.6.4 + - deps: serve-static@~1.9.3 + - deps: type-is@~1.6.2 + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: proxy-addr@~1.0.8 + - deps: ipaddr.js@1.0.1 + * deps: send@0.12.3 + - deps: debug@~2.2.0 + - deps: depd@~1.0.1 + - deps: etag@~1.6.0 + - deps: ms@0.7.1 + - deps: on-finished@~2.2.1 + +3.20.2 / 2015-03-16 +=================== + + * deps: connect@2.29.1 + - deps: body-parser@~1.12.2 + - deps: compression@~1.4.3 + - deps: connect-timeout@~1.6.1 + - deps: debug@~2.1.3 + - deps: errorhandler@~1.3.5 + - deps: express-session@~1.10.4 + - deps: finalhandler@0.3.4 + - deps: method-override@~2.3.2 + - deps: morgan@~1.5.2 + - deps: qs@2.4.1 + - deps: serve-index@~1.6.3 + - deps: serve-static@~1.9.2 + - deps: type-is@~1.6.1 + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + * deps: merge-descriptors@1.0.0 + * deps: proxy-addr@~1.0.7 + - deps: ipaddr.js@0.1.9 + * deps: send@0.12.2 + - Throw errors early for invalid `extensions` or `index` options + - deps: debug@~2.1.3 + +3.20.1 / 2015-02-28 +=================== + + * Fix `req.host` when using "trust proxy" hops count + * Fix `req.protocol`/`req.secure` when using "trust proxy" hops count + +3.20.0 / 2015-02-18 +=================== + + * Fix `"trust proxy"` setting to inherit when app is mounted + * Generate `ETag`s for all request responses + - No longer restricted to only responses for `GET` and `HEAD` requests + * Use `content-type` to parse `Content-Type` headers + * deps: connect@2.29.0 + - Use `content-type` to parse `Content-Type` headers + - deps: body-parser@~1.12.0 + - deps: compression@~1.4.1 + - deps: connect-timeout@~1.6.0 + - deps: cookie-parser@~1.3.4 + - deps: cookie-signature@1.0.6 + - deps: csurf@~1.7.0 + - deps: errorhandler@~1.3.4 + - deps: express-session@~1.10.3 + - deps: http-errors@~1.3.1 + - deps: response-time@~2.3.0 + - deps: serve-index@~1.6.2 + - deps: serve-static@~1.9.1 + - deps: type-is@~1.6.0 + * deps: cookie-signature@1.0.6 + * deps: send@0.12.1 + - Always read the stat size from the file + - Fix mutating passed-in `options` + - deps: mime@1.3.4 + +3.19.2 / 2015-02-01 +=================== + + * deps: connect@2.28.3 + - deps: compression@~1.3.1 + - deps: csurf@~1.6.6 + - deps: errorhandler@~1.3.3 + - deps: express-session@~1.10.2 + - deps: serve-index@~1.6.1 + - deps: type-is@~1.5.6 + * deps: proxy-addr@~1.0.6 + - deps: ipaddr.js@0.1.8 + +3.19.1 / 2015-01-20 +=================== + + * deps: connect@2.28.2 + - deps: body-parser@~1.10.2 + - deps: serve-static@~1.8.1 + * deps: send@0.11.1 + - Fix root path disclosure + +3.19.0 / 2015-01-09 +=================== + + * Fix `OPTIONS` responses to include the `HEAD` method property + * Use `readline` for prompt in `express(1)` + * deps: commander@2.6.0 + * deps: connect@2.28.1 + - deps: body-parser@~1.10.1 + - deps: compression@~1.3.0 + - deps: connect-timeout@~1.5.0 + - deps: csurf@~1.6.4 + - deps: debug@~2.1.1 + - deps: errorhandler@~1.3.2 + - deps: express-session@~1.10.1 + - deps: finalhandler@0.3.3 + - deps: method-override@~2.3.1 + - deps: morgan@~1.5.1 + - deps: serve-favicon@~2.2.0 + - deps: serve-index@~1.6.0 + - deps: serve-static@~1.8.0 + - deps: type-is@~1.5.5 + * deps: debug@~2.1.1 + * deps: methods@~1.1.1 + * deps: proxy-addr@~1.0.5 + - deps: ipaddr.js@0.1.6 + * deps: send@0.11.0 + - deps: debug@~2.1.1 + - deps: etag@~1.5.1 + - deps: ms@0.7.0 + - deps: on-finished@~2.2.0 + +3.18.6 / 2014-12-12 +=================== + + * Fix exception in `req.fresh`/`req.stale` without response headers + +3.18.5 / 2014-12-11 +=================== + + * deps: connect@2.27.6 + - deps: compression@~1.2.2 + - deps: express-session@~1.9.3 + - deps: http-errors@~1.2.8 + - deps: serve-index@~1.5.3 + - deps: type-is@~1.5.4 + +3.18.4 / 2014-11-23 +=================== + + * deps: connect@2.27.4 + - deps: body-parser@~1.9.3 + - deps: compression@~1.2.1 + - deps: errorhandler@~1.2.3 + - deps: express-session@~1.9.2 + - deps: qs@2.3.3 + - deps: serve-favicon@~2.1.7 + - deps: serve-static@~1.5.1 + - deps: type-is@~1.5.3 + * deps: etag@~1.5.1 + * deps: proxy-addr@~1.0.4 + - deps: ipaddr.js@0.1.5 + +3.18.3 / 2014-11-09 +=================== + + * deps: connect@2.27.3 + - Correctly invoke async callback asynchronously + - deps: csurf@~1.6.3 + +3.18.2 / 2014-10-28 +=================== + + * deps: connect@2.27.2 + - Fix handling of URLs containing `://` in the path + - deps: body-parser@~1.9.2 + - deps: qs@2.3.2 + +3.18.1 / 2014-10-22 +=================== + + * Fix internal `utils.merge` deprecation warnings + * deps: connect@2.27.1 + - deps: body-parser@~1.9.1 + - deps: express-session@~1.9.1 + - deps: finalhandler@0.3.2 + - deps: morgan@~1.4.1 + - deps: qs@2.3.0 + - deps: serve-static@~1.7.1 + * deps: send@0.10.1 + - deps: on-finished@~2.1.1 + +3.18.0 / 2014-10-17 +=================== + + * Use `content-disposition` module for `res.attachment`/`res.download` + - Sends standards-compliant `Content-Disposition` header + - Full Unicode support + * Use `etag` module to generate `ETag` headers + * deps: connect@2.27.0 + - Use `http-errors` module for creating errors + - Use `utils-merge` module for merging objects + - deps: body-parser@~1.9.0 + - deps: compression@~1.2.0 + - deps: connect-timeout@~1.4.0 + - deps: debug@~2.1.0 + - deps: depd@~1.0.0 + - deps: express-session@~1.9.0 + - deps: finalhandler@0.3.1 + - deps: method-override@~2.3.0 + - deps: morgan@~1.4.0 + - deps: response-time@~2.2.0 + - deps: serve-favicon@~2.1.6 + - deps: serve-index@~1.5.0 + - deps: serve-static@~1.7.0 + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + * deps: depd@~1.0.0 + * deps: send@0.10.0 + - deps: debug@~2.1.0 + - deps: depd@~1.0.0 + - deps: etag@~1.5.0 + +3.17.8 / 2014-10-15 +=================== + + * deps: connect@2.26.6 + - deps: compression@~1.1.2 + - deps: csurf@~1.6.2 + - deps: errorhandler@~1.2.2 + +3.17.7 / 2014-10-08 +=================== + + * deps: connect@2.26.5 + - Fix accepting non-object arguments to `logger` + - deps: serve-static@~1.6.4 + +3.17.6 / 2014-10-02 +=================== + + * deps: connect@2.26.4 + - deps: morgan@~1.3.2 + - deps: type-is@~1.5.2 + +3.17.5 / 2014-09-24 +=================== + + * deps: connect@2.26.3 + - deps: body-parser@~1.8.4 + - deps: serve-favicon@~2.1.5 + - deps: serve-static@~1.6.3 + * deps: proxy-addr@~1.0.3 + - Use `forwarded` npm module + * deps: send@0.9.3 + - deps: etag@~1.4.0 + +3.17.4 / 2014-09-19 +=================== + + * deps: connect@2.26.2 + - deps: body-parser@~1.8.3 + - deps: qs@2.2.4 + +3.17.3 / 2014-09-18 +=================== + + * deps: proxy-addr@~1.0.2 + - Fix a global leak when multiple subnets are trusted + - deps: ipaddr.js@0.1.3 + +3.17.2 / 2014-09-15 +=================== + + * Use `crc` instead of `buffer-crc32` for speed + * deps: connect@2.26.1 + - deps: body-parser@~1.8.2 + - deps: depd@0.4.5 + - deps: express-session@~1.8.2 + - deps: morgan@~1.3.1 + - deps: serve-favicon@~2.1.3 + - deps: serve-static@~1.6.2 + * deps: depd@0.4.5 + * deps: send@0.9.2 + - deps: depd@0.4.5 + - deps: etag@~1.3.1 + - deps: range-parser@~1.0.2 + +3.17.1 / 2014-09-08 +=================== + + * Fix error in `req.subdomains` on empty host + +3.17.0 / 2014-09-08 +=================== + + * Support `X-Forwarded-Host` in `req.subdomains` + * Support IP address host in `req.subdomains` + * deps: connect@2.26.0 + - deps: body-parser@~1.8.1 + - deps: compression@~1.1.0 + - deps: connect-timeout@~1.3.0 + - deps: cookie-parser@~1.3.3 + - deps: cookie-signature@1.0.5 + - deps: csurf@~1.6.1 + - deps: debug@~2.0.0 + - deps: errorhandler@~1.2.0 + - deps: express-session@~1.8.1 + - deps: finalhandler@0.2.0 + - deps: fresh@0.2.4 + - deps: media-typer@0.3.0 + - deps: method-override@~2.2.0 + - deps: morgan@~1.3.0 + - deps: qs@2.2.3 + - deps: serve-favicon@~2.1.3 + - deps: serve-index@~1.2.1 + - deps: serve-static@~1.6.1 + - deps: type-is@~1.5.1 + - deps: vhost@~3.0.0 + * deps: cookie-signature@1.0.5 + * deps: debug@~2.0.0 + * deps: fresh@0.2.4 + * deps: media-typer@0.3.0 + - Throw error when parameter format invalid on parse + * deps: range-parser@~1.0.2 + * deps: send@0.9.1 + - Add `lastModified` option + - Use `etag` to generate `ETag` header + - deps: debug@~2.0.0 + - deps: fresh@0.2.4 + * deps: vary@~1.0.0 + - Accept valid `Vary` header string as `field` + +3.16.10 / 2014-09-04 +==================== + + * deps: connect@2.25.10 + - deps: serve-static@~1.5.4 + * deps: send@0.8.5 + - Fix a path traversal issue when using `root` + - Fix malicious path detection for empty string path + +3.16.9 / 2014-08-29 +=================== + + * deps: connect@2.25.9 + - deps: body-parser@~1.6.7 + - deps: qs@2.2.2 + +3.16.8 / 2014-08-27 +=================== + + * deps: connect@2.25.8 + - deps: body-parser@~1.6.6 + - deps: csurf@~1.4.1 + - deps: qs@2.2.0 + +3.16.7 / 2014-08-18 +=================== + + * deps: connect@2.25.7 + - deps: body-parser@~1.6.5 + - deps: express-session@~1.7.6 + - deps: morgan@~1.2.3 + - deps: serve-static@~1.5.3 + * deps: send@0.8.3 + - deps: destroy@1.0.3 + - deps: on-finished@2.1.0 + +3.16.6 / 2014-08-14 +=================== + + * deps: connect@2.25.6 + - deps: body-parser@~1.6.4 + - deps: qs@1.2.2 + - deps: serve-static@~1.5.2 + * deps: send@0.8.2 + - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` + +3.16.5 / 2014-08-11 +=================== + + * deps: connect@2.25.5 + - Fix backwards compatibility in `logger` + +3.16.4 / 2014-08-10 +=================== + + * Fix original URL parsing in `res.location` + * deps: connect@2.25.4 + - Fix `query` middleware breaking with argument + - deps: body-parser@~1.6.3 + - deps: compression@~1.0.11 + - deps: connect-timeout@~1.2.2 + - deps: express-session@~1.7.5 + - deps: method-override@~2.1.3 + - deps: on-headers@~1.0.0 + - deps: parseurl@~1.3.0 + - deps: qs@1.2.1 + - deps: response-time@~2.0.1 + - deps: serve-index@~1.1.6 + - deps: serve-static@~1.5.1 + * deps: parseurl@~1.3.0 + +3.16.3 / 2014-08-07 +=================== + + * deps: connect@2.25.3 + - deps: multiparty@3.3.2 + +3.16.2 / 2014-08-07 +=================== + + * deps: connect@2.25.2 + - deps: body-parser@~1.6.2 + - deps: qs@1.2.0 + +3.16.1 / 2014-08-06 +=================== + + * deps: connect@2.25.1 + - deps: body-parser@~1.6.1 + - deps: qs@1.1.0 + +3.16.0 / 2014-08-05 +=================== + + * deps: connect@2.25.0 + - deps: body-parser@~1.6.0 + - deps: compression@~1.0.10 + - deps: csurf@~1.4.0 + - deps: express-session@~1.7.4 + - deps: qs@1.0.2 + - deps: serve-static@~1.5.0 + * deps: send@0.8.1 + - Add `extensions` option + +3.15.3 / 2014-08-04 +=================== + + * fix `res.sendfile` regression for serving directory index files + * deps: connect@2.24.3 + - deps: serve-index@~1.1.5 + - deps: serve-static@~1.4.4 + * deps: send@0.7.4 + - Fix incorrect 403 on Windows and Node.js 0.11 + - Fix serving index files without root dir + +3.15.2 / 2014-07-27 +=================== + + * deps: connect@2.24.2 + - deps: body-parser@~1.5.2 + - deps: depd@0.4.4 + - deps: express-session@~1.7.2 + - deps: morgan@~1.2.2 + - deps: serve-static@~1.4.2 + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + * deps: send@0.7.2 + - deps: depd@0.4.4 + +3.15.1 / 2014-07-26 +=================== + + * deps: connect@2.24.1 + - deps: body-parser@~1.5.1 + - deps: depd@0.4.3 + - deps: express-session@~1.7.1 + - deps: morgan@~1.2.1 + - deps: serve-index@~1.1.4 + - deps: serve-static@~1.4.1 + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + * deps: send@0.7.1 + - deps: depd@0.4.3 + +3.15.0 / 2014-07-22 +=================== + + * Fix `req.protocol` for proxy-direct connections + * Pass options from `res.sendfile` to `send` + * deps: connect@2.24.0 + - deps: body-parser@~1.5.0 + - deps: compression@~1.0.9 + - deps: connect-timeout@~1.2.1 + - deps: debug@1.0.4 + - deps: depd@0.4.2 + - deps: express-session@~1.7.0 + - deps: finalhandler@0.1.0 + - deps: method-override@~2.1.2 + - deps: morgan@~1.2.0 + - deps: multiparty@3.3.1 + - deps: parseurl@~1.2.0 + - deps: serve-static@~1.4.0 + * deps: debug@1.0.4 + * deps: depd@0.4.2 + - Add `TRACE_DEPRECATION` environment variable + - Remove non-standard grey color from color output + - Support `--no-deprecation` argument + - Support `--trace-deprecation` argument + * deps: parseurl@~1.2.0 + - Cache URLs based on original value + - Remove no-longer-needed URL mis-parse work-around + - Simplify the "fast-path" `RegExp` + * deps: send@0.7.0 + - Add `dotfiles` option + - Cap `maxAge` value to 1 year + - deps: debug@1.0.4 + - deps: depd@0.4.2 + +3.14.0 / 2014-07-11 +=================== + + * add explicit "Rosetta Flash JSONP abuse" protection + - previous versions are not vulnerable; this is just explicit protection + * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead + * fix `res.send(status, num)` to send `num` as json (not error) + * remove unnecessary escaping when `res.jsonp` returns JSON response + * deps: basic-auth@1.0.0 + - support empty password + - support empty username + * deps: connect@2.23.0 + - deps: debug@1.0.3 + - deps: express-session@~1.6.4 + - deps: method-override@~2.1.0 + - deps: parseurl@~1.1.3 + - deps: serve-static@~1.3.1 + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + * deps: methods@1.1.0 + - add `CONNECT` + * deps: parseurl@~1.1.3 + - faster parsing of href-only URLs + +3.13.0 / 2014-07-03 +=================== + + * add deprecation message to `app.configure` + * add deprecation message to `req.auth` + * use `basic-auth` to parse `Authorization` header + * deps: connect@2.22.0 + - deps: csurf@~1.3.0 + - deps: express-session@~1.6.1 + - deps: multiparty@3.3.0 + - deps: serve-static@~1.3.0 + * deps: send@0.5.0 + - Accept string for `maxage` (converted by `ms`) + - Include link in default redirect response + +3.12.1 / 2014-06-26 +=================== + + * deps: connect@2.21.1 + - deps: cookie-parser@1.3.2 + - deps: cookie-signature@1.0.4 + - deps: express-session@~1.5.2 + - deps: type-is@~1.3.2 + * deps: cookie-signature@1.0.4 + - fix for timing attacks + +3.12.0 / 2014-06-21 +=================== + + * use `media-typer` to alter content-type charset + * deps: connect@2.21.0 + - deprecate `connect(middleware)` -- use `app.use(middleware)` instead + - deprecate `connect.createServer()` -- use `connect()` instead + - fix `res.setHeader()` patch to work with with get -> append -> set pattern + - deps: compression@~1.0.8 + - deps: errorhandler@~1.1.1 + - deps: express-session@~1.5.0 + - deps: serve-index@~1.1.3 + +3.11.0 / 2014-06-19 +=================== + + * deprecate things with `depd` module + * deps: buffer-crc32@0.2.3 + * deps: connect@2.20.2 + - deprecate `verify` option to `json` -- use `body-parser` npm module instead + - deprecate `verify` option to `urlencoded` -- use `body-parser` npm module instead + - deprecate things with `depd` module + - use `finalhandler` for final response handling + - use `media-typer` to parse `content-type` for charset + - deps: body-parser@1.4.3 + - deps: connect-timeout@1.1.1 + - deps: cookie-parser@1.3.1 + - deps: csurf@1.2.2 + - deps: errorhandler@1.1.0 + - deps: express-session@1.4.0 + - deps: multiparty@3.2.9 + - deps: serve-index@1.1.2 + - deps: type-is@1.3.1 + - deps: vhost@2.0.0 + +3.10.5 / 2014-06-11 +=================== + + * deps: connect@2.19.6 + - deps: body-parser@1.3.1 + - deps: compression@1.0.7 + - deps: debug@1.0.2 + - deps: serve-index@1.1.1 + - deps: serve-static@1.2.3 + * deps: debug@1.0.2 + * deps: send@0.4.3 + - Do not throw un-catchable error on file open race condition + - Use `escape-html` for HTML escaping + - deps: debug@1.0.2 + - deps: finished@1.2.2 + - deps: fresh@0.2.2 + +3.10.4 / 2014-06-09 +=================== + + * deps: connect@2.19.5 + - fix "event emitter leak" warnings + - deps: csurf@1.2.1 + - deps: debug@1.0.1 + - deps: serve-static@1.2.2 + - deps: type-is@1.2.1 + * deps: debug@1.0.1 + * deps: send@0.4.2 + - fix "event emitter leak" warnings + - deps: finished@1.2.1 + - deps: debug@1.0.1 + +3.10.3 / 2014-06-05 +=================== + + * use `vary` module for `res.vary` + * deps: connect@2.19.4 + - deps: errorhandler@1.0.2 + - deps: method-override@2.0.2 + - deps: serve-favicon@2.0.1 + * deps: debug@1.0.0 + +3.10.2 / 2014-06-03 +=================== + + * deps: connect@2.19.3 + - deps: compression@1.0.6 + +3.10.1 / 2014-06-03 +=================== + + * deps: connect@2.19.2 + - deps: compression@1.0.4 + * deps: proxy-addr@1.0.1 + +3.10.0 / 2014-06-02 +=================== + + * deps: connect@2.19.1 + - deprecate `methodOverride()` -- use `method-override` npm module instead + - deps: body-parser@1.3.0 + - deps: method-override@2.0.1 + - deps: multiparty@3.2.8 + - deps: response-time@2.0.0 + - deps: serve-static@1.2.1 + * deps: methods@1.0.1 + * deps: send@0.4.1 + - Send `max-age` in `Cache-Control` in correct format + +3.9.0 / 2014-05-30 +================== + + * custom etag control with `app.set('etag', val)` + - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation + - `app.set('etag', 'weak')` weak tag + - `app.set('etag', 'strong')` strong etag + - `app.set('etag', false)` turn off + - `app.set('etag', true)` standard etag + * Include ETag in HEAD requests + * mark `res.send` ETag as weak and reduce collisions + * update connect to 2.18.0 + - deps: compression@1.0.3 + - deps: serve-index@1.1.0 + - deps: serve-static@1.2.0 + * update send to 0.4.0 + - Calculate ETag with md5 for reduced collisions + - Ignore stream errors after request ends + - deps: debug@0.8.1 + +3.8.1 / 2014-05-27 +================== + + * update connect to 2.17.3 + - deps: body-parser@1.2.2 + - deps: express-session@1.2.1 + - deps: method-override@1.0.2 + +3.8.0 / 2014-05-21 +================== + + * keep previous `Content-Type` for `res.jsonp` + * set proper `charset` in `Content-Type` for `res.send` + * update connect to 2.17.1 + - fix `res.charset` appending charset when `content-type` has one + - deps: express-session@1.2.0 + - deps: morgan@1.1.1 + - deps: serve-index@1.0.3 + +3.7.0 / 2014-05-18 +================== + + * proper proxy trust with `app.set('trust proxy', trust)` + - `app.set('trust proxy', 1)` trust first hop + - `app.set('trust proxy', 'loopback')` trust loopback addresses + - `app.set('trust proxy', '10.0.0.1')` trust single IP + - `app.set('trust proxy', '10.0.0.1/16')` trust subnet + - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list + - `app.set('trust proxy', false)` turn off + - `app.set('trust proxy', true)` trust everything + * update connect to 2.16.2 + - deprecate `res.headerSent` -- use `res.headersSent` + - deprecate `res.on("header")` -- use on-headers module instead + - fix edge-case in `res.appendHeader` that would append in wrong order + - json: use body-parser + - urlencoded: use body-parser + - dep: bytes@1.0.0 + - dep: cookie-parser@1.1.0 + - dep: csurf@1.2.0 + - dep: express-session@1.1.0 + - dep: method-override@1.0.1 + +3.6.0 / 2014-05-09 +================== + + * deprecate `app.del()` -- use `app.delete()` instead + * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead + - the edge-case `res.json(status, num)` requires `res.status(status).json(num)` + * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead + - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)` + * support PURGE method + - add `app.purge` + - add `router.purge` + - include PURGE in `app.all` + * update connect to 2.15.0 + * Add `res.appendHeader` + * Call error stack even when response has been sent + * Patch `res.headerSent` to return Boolean + * Patch `res.headersSent` for node.js 0.8 + * Prevent default 404 handler after response sent + * dep: compression@1.0.2 + * dep: connect-timeout@1.1.0 + * dep: debug@^0.8.0 + * dep: errorhandler@1.0.1 + * dep: express-session@1.0.4 + * dep: morgan@1.0.1 + * dep: serve-favicon@2.0.0 + * dep: serve-index@1.0.2 + * update debug to 0.8.0 + * add `enable()` method + * change from stderr to stdout + * update methods to 1.0.0 + - add PURGE + * update mkdirp to 0.5.0 + +3.5.3 / 2014-05-08 +================== + + * fix `req.host` for IPv6 literals + * fix `res.jsonp` error if callback param is object + +3.5.2 / 2014-04-24 +================== + + * update connect to 2.14.5 + * update cookie to 0.1.2 + * update mkdirp to 0.4.0 + * update send to 0.3.0 + +3.5.1 / 2014-03-25 +================== + + * pin less-middleware in generated app + +3.5.0 / 2014-03-06 +================== + + * bump deps + +3.4.8 / 2014-01-13 +================== + + * prevent incorrect automatic OPTIONS responses #1868 @dpatti + * update binary and examples for jade 1.0 #1876 @yossi, #1877 @reqshark, #1892 @matheusazzi + * throw 400 in case of malformed paths @rlidwka + +3.4.7 / 2013-12-10 +================== + + * update connect + +3.4.6 / 2013-12-01 +================== + + * update connect (raw-body) + +3.4.5 / 2013-11-27 +================== + + * update connect + * res.location: remove leading ./ #1802 @kapouer + * res.redirect: fix `res.redirect('toString') #1829 @michaelficarra + * res.send: always send ETag when content-length > 0 + * router: add Router.all() method + +3.4.4 / 2013-10-29 +================== + + * update connect + * update supertest + * update methods + * express(1): replace bodyParser() with urlencoded() and json() #1795 @chirag04 + +3.4.3 / 2013-10-23 +================== + + * update connect + +3.4.2 / 2013-10-18 +================== + + * update connect + * downgrade commander + +3.4.1 / 2013-10-15 +================== + + * update connect + * update commander + * jsonp: check if callback is a function + * router: wrap encodeURIComponent in a try/catch #1735 (@lxe) + * res.format: now includes charset @1747 (@sorribas) + * res.links: allow multiple calls @1746 (@sorribas) + +3.4.0 / 2013-09-07 +================== + + * add res.vary(). Closes #1682 + * update connect + +3.3.8 / 2013-09-02 +================== + + * update connect + +3.3.7 / 2013-08-28 +================== + + * update connect + +3.3.6 / 2013-08-27 +================== + + * Revert "remove charset from json responses. Closes #1631" (causes issues in some clients) + * add: req.accepts take an argument list + +3.3.4 / 2013-07-08 +================== + + * update send and connect + +3.3.3 / 2013-07-04 +================== + + * update connect + +3.3.2 / 2013-07-03 +================== + + * update connect + * update send + * remove .version export + +3.3.1 / 2013-06-27 +================== + + * update connect + +3.3.0 / 2013-06-26 +================== + + * update connect + * add support for multiple X-Forwarded-Proto values. Closes #1646 + * change: remove charset from json responses. Closes #1631 + * change: return actual booleans from req.accept* functions + * fix jsonp callback array throw + +3.2.6 / 2013-06-02 +================== + + * update connect + +3.2.5 / 2013-05-21 +================== + + * update connect + * update node-cookie + * add: throw a meaningful error when there is no default engine + * change generation of ETags with res.send() to GET requests only. Closes #1619 + +3.2.4 / 2013-05-09 +================== + + * fix `req.subdomains` when no Host is present + * fix `req.host` when no Host is present, return undefined + +3.2.3 / 2013-05-07 +================== + + * update connect / qs + +3.2.2 / 2013-05-03 +================== + + * update qs + +3.2.1 / 2013-04-29 +================== + + * add app.VERB() paths array deprecation warning + * update connect + * update qs and remove all ~ semver crap + * fix: accept number as value of Signed Cookie + +3.2.0 / 2013-04-15 +================== + + * add "view" constructor setting to override view behaviour + * add req.acceptsEncoding(name) + * add req.acceptedEncodings + * revert cookie signature change causing session race conditions + * fix sorting of Accept values of the same quality + +3.1.2 / 2013-04-12 +================== + + * add support for custom Accept parameters + * update cookie-signature + +3.1.1 / 2013-04-01 +================== + + * add X-Forwarded-Host support to `req.host` + * fix relative redirects + * update mkdirp + * update buffer-crc32 + * remove legacy app.configure() method from app template. + +3.1.0 / 2013-01-25 +================== + + * add support for leading "." in "view engine" setting + * add array support to `res.set()` + * add node 0.8.x to travis.yml + * add "subdomain offset" setting for tweaking `req.subdomains` + * add `res.location(url)` implementing `res.redirect()`-like setting of Location + * use app.get() for x-powered-by setting for inheritance + * fix colons in passwords for `req.auth` + +3.0.6 / 2013-01-04 +================== + + * add http verb methods to Router + * update connect + * fix mangling of the `res.cookie()` options object + * fix jsonp whitespace escape. Closes #1132 + +3.0.5 / 2012-12-19 +================== + + * add throwing when a non-function is passed to a route + * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses + * revert "add 'etag' option" + +3.0.4 / 2012-12-05 +================== + + * add 'etag' option to disable `res.send()` Etags + * add escaping of urls in text/plain in `res.redirect()` + for old browsers interpreting as html + * change crc32 module for a more liberal license + * update connect + +3.0.3 / 2012-11-13 +================== + + * update connect + * update cookie module + * fix cookie max-age + +3.0.2 / 2012-11-08 +================== + + * add OPTIONS to cors example. Closes #1398 + * fix route chaining regression. Closes #1397 + +3.0.1 / 2012-11-01 +================== + + * update connect + +3.0.0 / 2012-10-23 +================== + + * add `make clean` + * add "Basic" check to req.auth + * add `req.auth` test coverage + * add cb && cb(payload) to `res.jsonp()`. Closes #1374 + * add backwards compat for `res.redirect()` status. Closes #1336 + * add support for `res.json()` to retain previously defined Content-Types. Closes #1349 + * update connect + * change `res.redirect()` to utilize a pathname-relative Location again. Closes #1382 + * remove non-primitive string support for `res.send()` + * fix view-locals example. Closes #1370 + * fix route-separation example + +3.0.0rc5 / 2012-09-18 +================== + + * update connect + * add redis search example + * add static-files example + * add "x-powered-by" setting (`app.disable('x-powered-by')`) + * add "application/octet-stream" redirect Accept test case. Closes #1317 + +3.0.0rc4 / 2012-08-30 +================== + + * add `res.jsonp()`. Closes #1307 + * add "verbose errors" option to error-pages example + * add another route example to express(1) so people are not so confused + * add redis online user activity tracking example + * update connect dep + * fix etag quoting. Closes #1310 + * fix error-pages 404 status + * fix jsonp callback char restrictions + * remove old OPTIONS default response + +3.0.0rc3 / 2012-08-13 +================== + + * update connect dep + * fix signed cookies to work with `connect.cookieParser()` ("s:" prefix was missing) [tnydwrds] + * fix `res.render()` clobbering of "locals" + +3.0.0rc2 / 2012-08-03 +================== + + * add CORS example + * update connect dep + * deprecate `.createServer()` & remove old stale examples + * fix: escape `res.redirect()` link + * fix vhost example + +3.0.0rc1 / 2012-07-24 +================== + + * add more examples to view-locals + * add scheme-relative redirects (`res.redirect("//foo.com")`) support + * update cookie dep + * update connect dep + * update send dep + * fix `express(1)` -h flag, use -H for hogan. Closes #1245 + * fix `res.sendfile()` socket error handling regression + +3.0.0beta7 / 2012-07-16 +================== + + * update connect dep for `send()` root normalization regression + +3.0.0beta6 / 2012-07-13 +================== + + * add `err.view` property for view errors. Closes #1226 + * add "jsonp callback name" setting + * add support for "/foo/:bar*" non-greedy matches + * change `res.sendfile()` to use `send()` module + * change `res.send` to use "response-send" module + * remove `app.locals.use` and `res.locals.use`, use regular middleware + +3.0.0beta5 / 2012-07-03 +================== + + * add "make check" support + * add route-map example + * add `res.json(obj, status)` support back for BC + * add "methods" dep, remove internal methods module + * update connect dep + * update auth example to utilize cores pbkdf2 + * updated tests to use "supertest" + +3.0.0beta4 / 2012-06-25 +================== + + * Added `req.auth` + * Added `req.range(size)` + * Added `res.links(obj)` + * Added `res.send(body, status)` support back for backwards compat + * Added `.default()` support to `res.format()` + * Added 2xx / 304 check to `req.fresh` + * Revert "Added + support to the router" + * Fixed `res.send()` freshness check, respect res.statusCode + +3.0.0beta3 / 2012-06-15 +================== + + * Added hogan `--hjs` to express(1) [nullfirm] + * Added another example to content-negotiation + * Added `fresh` dep + * Changed: `res.send()` always checks freshness + * Fixed: expose connects mime module. Closes #1165 + +3.0.0beta2 / 2012-06-06 +================== + + * Added `+` support to the router + * Added `req.host` + * Changed `req.param()` to check route first + * Update connect dep + +3.0.0beta1 / 2012-06-01 +================== + + * Added `res.format()` callback to override default 406 behaviour + * Fixed `res.redirect()` 406. Closes #1154 + +3.0.0alpha5 / 2012-05-30 +================== + + * Added `req.ip` + * Added `{ signed: true }` option to `res.cookie()` + * Removed `res.signedCookie()` + * Changed: dont reverse `req.ips` + * Fixed "trust proxy" setting check for `req.ips` + +3.0.0alpha4 / 2012-05-09 +================== + + * Added: allow `[]` in jsonp callback. Closes #1128 + * Added `PORT` env var support in generated template. Closes #1118 [benatkin] + * Updated: connect 2.2.2 + +3.0.0alpha3 / 2012-05-04 +================== + + * Added public `app.routes`. Closes #887 + * Added _view-locals_ example + * Added _mvc_ example + * Added `res.locals.use()`. Closes #1120 + * Added conditional-GET support to `res.send()` + * Added: coerce `res.set()` values to strings + * Changed: moved `static()` in generated apps below router + * Changed: `res.send()` only set ETag when not previously set + * Changed connect 2.2.1 dep + * Changed: `make test` now runs unit / acceptance tests + * Fixed req/res proto inheritance + +3.0.0alpha2 / 2012-04-26 +================== + + * Added `make benchmark` back + * Added `res.send()` support for `String` objects + * Added client-side data exposing example + * Added `res.header()` and `req.header()` aliases for BC + * Added `express.createServer()` for BC + * Perf: memoize parsed urls + * Perf: connect 2.2.0 dep + * Changed: make `expressInit()` middleware self-aware + * Fixed: use app.get() for all core settings + * Fixed redis session example + * Fixed session example. Closes #1105 + * Fixed generated express dep. Closes #1078 + +3.0.0alpha1 / 2012-04-15 +================== + + * Added `app.locals.use(callback)` + * Added `app.locals` object + * Added `app.locals(obj)` + * Added `res.locals` object + * Added `res.locals(obj)` + * Added `res.format()` for content-negotiation + * Added `app.engine()` + * Added `res.cookie()` JSON cookie support + * Added "trust proxy" setting + * Added `req.subdomains` + * Added `req.protocol` + * Added `req.secure` + * Added `req.path` + * Added `req.ips` + * Added `req.fresh` + * Added `req.stale` + * Added comma-delimited / array support for `req.accepts()` + * Added debug instrumentation + * Added `res.set(obj)` + * Added `res.set(field, value)` + * Added `res.get(field)` + * Added `app.get(setting)`. Closes #842 + * Added `req.acceptsLanguage()` + * Added `req.acceptsCharset()` + * Added `req.accepted` + * Added `req.acceptedLanguages` + * Added `req.acceptedCharsets` + * Added "json replacer" setting + * Added "json spaces" setting + * Added X-Forwarded-Proto support to `res.redirect()`. Closes #92 + * Added `--less` support to express(1) + * Added `express.response` prototype + * Added `express.request` prototype + * Added `express.application` prototype + * Added `app.path()` + * Added `app.render()` + * Added `res.type()` to replace `res.contentType()` + * Changed: `res.redirect()` to add relative support + * Changed: enable "jsonp callback" by default + * Changed: renamed "case sensitive routes" to "case sensitive routing" + * Rewrite of all tests with mocha + * Removed "root" setting + * Removed `res.redirect('home')` support + * Removed `req.notify()` + * Removed `app.register()` + * Removed `app.redirect()` + * Removed `app.is()` + * Removed `app.helpers()` + * Removed `app.dynamicHelpers()` + * Fixed `res.sendfile()` with non-GET. Closes #723 + * Fixed express(1) public dir for windows. Closes #866 + +2.5.9/ 2012-04-02 +================== + + * Added support for PURGE request method [pbuyle] + * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki] + +2.5.8 / 2012-02-08 +================== + + * Update mkdirp dep. Closes #991 + +2.5.7 / 2012-02-06 +================== + + * Fixed `app.all` duplicate DELETE requests [mscdex] + +2.5.6 / 2012-01-13 +================== + + * Updated hamljs dev dep. Closes #953 + +2.5.5 / 2012-01-08 +================== + + * Fixed: set `filename` on cached templates [matthewleon] + +2.5.4 / 2012-01-02 +================== + + * Fixed `express(1)` eol on 0.4.x. Closes #947 + +2.5.3 / 2011-12-30 +================== + + * Fixed `req.is()` when a charset is present + +2.5.2 / 2011-12-10 +================== + + * Fixed: express(1) LF -> CRLF for windows + +2.5.1 / 2011-11-17 +================== + + * Changed: updated connect to 1.8.x + * Removed sass.js support from express(1) + +2.5.0 / 2011-10-24 +================== + + * Added ./routes dir for generated app by default + * Added npm install reminder to express(1) app gen + * Added 0.5.x support + * Removed `make test-cov` since it wont work with node 0.5.x + * Fixed express(1) public dir for windows. Closes #866 + +2.4.7 / 2011-10-05 +================== + + * Added mkdirp to express(1). Closes #795 + * Added simple _json-config_ example + * Added shorthand for the parsed request's pathname via `req.path` + * Changed connect dep to 1.7.x to fix npm issue... + * Fixed `res.redirect()` __HEAD__ support. [reported by xerox] + * Fixed `req.flash()`, only escape args + * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie] + +2.4.6 / 2011-08-22 +================== + + * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode] + +2.4.5 / 2011-08-19 +================== + + * Added support for routes to handle errors. Closes #809 + * Added `app.routes.all()`. Closes #803 + * Added "basepath" setting to work in conjunction with reverse proxies etc. + * Refactored `Route` to use a single array of callbacks + * Added support for multiple callbacks for `app.param()`. Closes #801 +Closes #805 + * Changed: removed .call(self) for route callbacks + * Dependency: `qs >= 0.3.1` + * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808 + +2.4.4 / 2011-08-05 +================== + + * Fixed `res.header()` intention of a set, even when `undefined` + * Fixed `*`, value no longer required + * Fixed `res.send(204)` support. Closes #771 + +2.4.3 / 2011-07-14 +================== + + * Added docs for `status` option special-case. Closes #739 + * Fixed `options.filename`, exposing the view path to template engines + +2.4.2. / 2011-07-06 +================== + + * Revert "removed jsonp stripping" for XSS + +2.4.1 / 2011-07-06 +================== + + * Added `res.json()` JSONP support. Closes #737 + * Added _extending-templates_ example. Closes #730 + * Added "strict routing" setting for trailing slashes + * Added support for multiple envs in `app.configure()` calls. Closes #735 + * Changed: `res.send()` using `res.json()` + * Changed: when cookie `path === null` don't default it + * Changed; default cookie path to "home" setting. Closes #731 + * Removed _pids/logs_ creation from express(1) + +2.4.0 / 2011-06-28 +================== + + * Added chainable `res.status(code)` + * Added `res.json()`, an explicit version of `res.send(obj)` + * Added simple web-service example + +2.3.12 / 2011-06-22 +================== + + * \#express is now on freenode! come join! + * Added `req.get(field, param)` + * Added links to Japanese documentation, thanks @hideyukisaito! + * Added; the `express(1)` generated app outputs the env + * Added `content-negotiation` example + * Dependency: connect >= 1.5.1 < 2.0.0 + * Fixed view layout bug. Closes #720 + * Fixed; ignore body on 304. Closes #701 + +2.3.11 / 2011-06-04 +================== + + * Added `npm test` + * Removed generation of dummy test file from `express(1)` + * Fixed; `express(1)` adds express as a dep + * Fixed; prune on `prepublish` + +2.3.10 / 2011-05-27 +================== + + * Added `req.route`, exposing the current route + * Added _package.json_ generation support to `express(1)` + * Fixed call to `app.param()` function for optional params. Closes #682 + +2.3.9 / 2011-05-25 +================== + + * Fixed bug-ish with `../' in `res.partial()` calls + +2.3.8 / 2011-05-24 +================== + + * Fixed `app.options()` + +2.3.7 / 2011-05-23 +================== + + * Added route `Collection`, ex: `app.get('/user/:id').remove();` + * Added support for `app.param(fn)` to define param logic + * Removed `app.param()` support for callback with return value + * Removed module.parent check from express(1) generated app. Closes #670 + * Refactored router. Closes #639 + +2.3.6 / 2011-05-20 +================== + + * Changed; using devDependencies instead of git submodules + * Fixed redis session example + * Fixed markdown example + * Fixed view caching, should not be enabled in development + +2.3.5 / 2011-05-20 +================== + + * Added export `.view` as alias for `.View` + +2.3.4 / 2011-05-08 +================== + + * Added `./examples/say` + * Fixed `res.sendfile()` bug preventing the transfer of files with spaces + +2.3.3 / 2011-05-03 +================== + + * Added "case sensitive routes" option. + * Changed; split methods supported per rfc [slaskis] + * Fixed route-specific middleware when using the same callback function several times + +2.3.2 / 2011-04-27 +================== + + * Fixed view hints + +2.3.1 / 2011-04-26 +================== + + * Added `app.match()` as `app.match.all()` + * Added `app.lookup()` as `app.lookup.all()` + * Added `app.remove()` for `app.remove.all()` + * Added `app.remove.VERB()` + * Fixed template caching collision issue. Closes #644 + * Moved router over from connect and started refactor + +2.3.0 / 2011-04-25 +================== + + * Added options support to `res.clearCookie()` + * Added `res.helpers()` as alias of `res.locals()` + * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0` + * Changed; auto set Content-Type in res.attachement [Aaron Heckmann] + * Renamed "cache views" to "view cache". Closes #628 + * Fixed caching of views when using several apps. Closes #637 + * Fixed gotcha invoking `app.param()` callbacks once per route middleware. +Closes #638 + * Fixed partial lookup precedence. Closes #631 +Shaw] + +2.2.2 / 2011-04-12 +================== + + * Added second callback support for `res.download()` connection errors + * Fixed `filename` option passing to template engine + +2.2.1 / 2011-04-04 +================== + + * Added `layout(path)` helper to change the layout within a view. Closes #610 + * Fixed `partial()` collection object support. + Previously only anything with `.length` would work. + When `.length` is present one must still be aware of holes, + however now `{ collection: {foo: 'bar'}}` is valid, exposes + `keyInCollection` and `keysInCollection`. + + * Performance improved with better view caching + * Removed `request` and `response` locals + * Changed; errorHandler page title is now `Express` instead of `Connect` + +2.2.0 / 2011-03-30 +================== + + * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606 + * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606 + * Added `app.VERB(path)` as alias of `app.lookup.VERB()`. + * Dependency `connect >= 1.2.0` + +2.1.1 / 2011-03-29 +================== + + * Added; expose `err.view` object when failing to locate a view + * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann] + * Fixed; `res.send(undefined)` responds with 204 [aheckmann] + +2.1.0 / 2011-03-24 +================== + + * Added `/_?` partial lookup support. Closes #447 + * Added `request`, `response`, and `app` local variables + * Added `settings` local variable, containing the app's settings + * Added `req.flash()` exception if `req.session` is not available + * Added `res.send(bool)` support (json response) + * Fixed stylus example for latest version + * Fixed; wrap try/catch around `res.render()` + +2.0.0 / 2011-03-17 +================== + + * Fixed up index view path alternative. + * Changed; `res.locals()` without object returns the locals + +2.0.0rc3 / 2011-03-17 +================== + + * Added `res.locals(obj)` to compliment `res.local(key, val)` + * Added `res.partial()` callback support + * Fixed recursive error reporting issue in `res.render()` + +2.0.0rc2 / 2011-03-17 +================== + + * Changed; `partial()` "locals" are now optional + * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01] + * Fixed .filename view engine option [reported by drudge] + * Fixed blog example + * Fixed `{req,res}.app` reference when mounting [Ben Weaver] + +2.0.0rc / 2011-03-14 +================== + + * Fixed; expose `HTTPSServer` constructor + * Fixed express(1) default test charset. Closes #579 [reported by secoif] + * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP] + +2.0.0beta3 / 2011-03-09 +================== + + * Added support for `res.contentType()` literal + The original `res.contentType('.json')`, + `res.contentType('application/json')`, and `res.contentType('json')` + will work now. + * Added `res.render()` status option support back + * Added charset option for `res.render()` + * Added `.charset` support (via connect 1.0.4) + * Added view resolution hints when in development and a lookup fails + * Added layout lookup support relative to the page view. + For example while rendering `./views/user/index.jade` if you create + `./views/user/layout.jade` it will be used in favour of the root layout. + * Fixed `res.redirect()`. RFC states absolute url [reported by unlink] + * Fixed; default `res.send()` string charset to utf8 + * Removed `Partial` constructor (not currently used) + +2.0.0beta2 / 2011-03-07 +================== + + * Added res.render() `.locals` support back to aid in migration process + * Fixed flash example + +2.0.0beta / 2011-03-03 +================== + + * Added HTTPS support + * Added `res.cookie()` maxAge support + * Added `req.header()` _Referrer_ / _Referer_ special-case, either works + * Added mount support for `res.redirect()`, now respects the mount-point + * Added `union()` util, taking place of `merge(clone())` combo + * Added stylus support to express(1) generated app + * Added secret to session middleware used in examples and generated app + * Added `res.local(name, val)` for progressive view locals + * Added default param support to `req.param(name, default)` + * Added `app.disabled()` and `app.enabled()` + * Added `app.register()` support for omitting leading ".", either works + * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539 + * Added `app.param()` to map route params to async/sync logic + * Added; aliased `app.helpers()` as `app.locals()`. Closes #481 + * Added extname with no leading "." support to `res.contentType()` + * Added `cache views` setting, defaulting to enabled in "production" env + * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_. + * Added `req.accepts()` support for extensions + * Changed; `res.download()` and `res.sendfile()` now utilize Connect's + static file server `connect.static.send()`. + * Changed; replaced `connect.utils.mime()` with npm _mime_ module + * Changed; allow `req.query` to be pre-defined (via middleware or other parent + * Changed view partial resolution, now relative to parent view + * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`. + * Fixed `req.param()` bug returning Array.prototype methods. Closes #552 + * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()` + * Fixed; using _qs_ module instead of _querystring_ + * Fixed; strip unsafe chars from jsonp callbacks + * Removed "stream threshold" setting + +1.0.8 / 2011-03-01 +================== + + * Allow `req.query` to be pre-defined (via middleware or other parent app) + * "connect": ">= 0.5.0 < 1.0.0". Closes #547 + * Removed the long deprecated __EXPRESS_ENV__ support + +1.0.7 / 2011-02-07 +================== + + * Fixed `render()` setting inheritance. + Mounted apps would not inherit "view engine" + +1.0.6 / 2011-02-07 +================== + + * Fixed `view engine` setting bug when period is in dirname + +1.0.5 / 2011-02-05 +================== + + * Added secret to generated app `session()` call + +1.0.4 / 2011-02-05 +================== + + * Added `qs` dependency to _package.json_ + * Fixed namespaced `require()`s for latest connect support + +1.0.3 / 2011-01-13 +================== + + * Remove unsafe characters from JSONP callback names [Ryan Grove] + +1.0.2 / 2011-01-10 +================== + + * Removed nested require, using `connect.router` + +1.0.1 / 2010-12-29 +================== + + * Fixed for middleware stacked via `createServer()` + previously the `foo` middleware passed to `createServer(foo)` + would not have access to Express methods such as `res.send()` + or props like `req.query` etc. + +1.0.0 / 2010-11-16 +================== + + * Added; deduce partial object names from the last segment. + For example by default `partial('forum/post', postObject)` will + give you the _post_ object, providing a meaningful default. + * Added http status code string representation to `res.redirect()` body + * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__. + * Added `req.is()` to aid in content negotiation + * Added partial local inheritance [suggested by masylum]. Closes #102 + providing access to parent template locals. + * Added _-s, --session[s]_ flag to express(1) to add session related middleware + * Added _--template_ flag to express(1) to specify the + template engine to use. + * Added _--css_ flag to express(1) to specify the + stylesheet engine to use (or just plain css by default). + * Added `app.all()` support [thanks aheckmann] + * Added partial direct object support. + You may now `partial('user', user)` providing the "user" local, + vs previously `partial('user', { object: user })`. + * Added _route-separation_ example since many people question ways + to do this with CommonJS modules. Also view the _blog_ example for + an alternative. + * Performance; caching view path derived partial object names + * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454 + * Fixed jsonp support; _text/javascript_ as per mailinglist discussion + +1.0.0rc4 / 2010-10-14 +================== + + * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0 + * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware)) + * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass] + * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass] + * Added `partial()` support for array-like collections. Closes #434 + * Added support for swappable querystring parsers + * Added session usage docs. Closes #443 + * Added dynamic helper caching. Closes #439 [suggested by maritz] + * Added authentication example + * Added basic Range support to `res.sendfile()` (and `res.download()` etc) + * Changed; `express(1)` generated app using 2 spaces instead of 4 + * Default env to "development" again [aheckmann] + * Removed _context_ option is no more, use "scope" + * Fixed; exposing _./support_ libs to examples so they can run without installs + * Fixed mvc example + +1.0.0rc3 / 2010-09-20 +================== + + * Added confirmation for `express(1)` app generation. Closes #391 + * Added extending of flash formatters via `app.flashFormatters` + * Added flash formatter support. Closes #411 + * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold" + * Added _stream threshold_ setting for `res.sendfile()` + * Added `res.send()` __HEAD__ support + * Added `res.clearCookie()` + * Added `res.cookie()` + * Added `res.render()` headers option + * Added `res.redirect()` response bodies + * Added `res.render()` status option support. Closes #425 [thanks aheckmann] + * Fixed `res.sendfile()` responding with 403 on malicious path + * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_ + * Fixed; mounted apps settings now inherit from parent app [aheckmann] + * Fixed; stripping Content-Length / Content-Type when 204 + * Fixed `res.send()` 204. Closes #419 + * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402 + * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo] + + +1.0.0rc2 / 2010-08-17 +================== + + * Added `app.register()` for template engine mapping. Closes #390 + * Added `res.render()` callback support as second argument (no options) + * Added callback support to `res.download()` + * Added callback support for `res.sendfile()` + * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()` + * Added "partials" setting to docs + * Added default expresso tests to `express(1)` generated app. Closes #384 + * Fixed `res.sendfile()` error handling, defer via `next()` + * Fixed `res.render()` callback when a layout is used [thanks guillermo] + * Fixed; `make install` creating ~/.node_libraries when not present + * Fixed issue preventing error handlers from being defined anywhere. Closes #387 + +1.0.0rc / 2010-07-28 +================== + + * Added mounted hook. Closes #369 + * Added connect dependency to _package.json_ + + * Removed "reload views" setting and support code + development env never caches, production always caches. + + * Removed _param_ in route callbacks, signature is now + simply (req, res, next), previously (req, res, params, next). + Use _req.params_ for path captures, _req.query_ for GET params. + + * Fixed "home" setting + * Fixed middleware/router precedence issue. Closes #366 + * Fixed; _configure()_ callbacks called immediately. Closes #368 + +1.0.0beta2 / 2010-07-23 +================== + + * Added more examples + * Added; exporting `Server` constructor + * Added `Server#helpers()` for view locals + * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349 + * Added support for absolute view paths + * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363 + * Added Guillermo Rauch to the contributor list + * Added support for "as" for non-collection partials. Closes #341 + * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf] + * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo] + * Fixed instanceof `Array` checks, now `Array.isArray()` + * Fixed express(1) expansion of public dirs. Closes #348 + * Fixed middleware precedence. Closes #345 + * Fixed view watcher, now async [thanks aheckmann] + +1.0.0beta / 2010-07-15 +================== + + * Re-write + - much faster + - much lighter + - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs + +0.14.0 / 2010-06-15 +================== + + * Utilize relative requires + * Added Static bufferSize option [aheckmann] + * Fixed caching of view and partial subdirectories [aheckmann] + * Fixed mime.type() comments now that ".ext" is not supported + * Updated haml submodule + * Updated class submodule + * Removed bin/express + +0.13.0 / 2010-06-01 +================== + + * Added node v0.1.97 compatibility + * Added support for deleting cookies via Request#cookie('key', null) + * Updated haml submodule + * Fixed not-found page, now using using charset utf-8 + * Fixed show-exceptions page, now using using charset utf-8 + * Fixed view support due to fs.readFile Buffers + * Changed; mime.type() no longer accepts ".type" due to node extname() changes + +0.12.0 / 2010-05-22 +================== + + * Added node v0.1.96 compatibility + * Added view `helpers` export which act as additional local variables + * Updated haml submodule + * Changed ETag; removed inode, modified time only + * Fixed LF to CRLF for setting multiple cookies + * Fixed cookie complation; values are now urlencoded + * Fixed cookies parsing; accepts quoted values and url escaped cookies + +0.11.0 / 2010-05-06 +================== + + * Added support for layouts using different engines + - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' }) + - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml' + - this.render('page.html.haml', { layout: false }) // no layout + * Updated ext submodule + * Updated haml submodule + * Fixed EJS partial support by passing along the context. Issue #307 + +0.10.1 / 2010-05-03 +================== + + * Fixed binary uploads. + +0.10.0 / 2010-04-30 +================== + + * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s + encoding is set to 'utf8' or 'utf-8'. + * Added "encoding" option to Request#render(). Closes #299 + * Added "dump exceptions" setting, which is enabled by default. + * Added simple ejs template engine support + * Added error response support for text/plain, application/json. Closes #297 + * Added callback function param to Request#error() + * Added Request#sendHead() + * Added Request#stream() + * Added support for Request#respond(304, null) for empty response bodies + * Added ETag support to Request#sendfile() + * Added options to Request#sendfile(), passed to fs.createReadStream() + * Added filename arg to Request#download() + * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request + * Performance enhanced by preventing several calls to toLowerCase() in Router#match() + * Changed; Request#sendfile() now streams + * Changed; Renamed Request#halt() to Request#respond(). Closes #289 + * Changed; Using sys.inspect() instead of JSON.encode() for error output + * Changed; run() returns the http.Server instance. Closes #298 + * Changed; Defaulting Server#host to null (INADDR_ANY) + * Changed; Logger "common" format scale of 0.4f + * Removed Logger "request" format + * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found + * Fixed several issues with http client + * Fixed Logger Content-Length output + * Fixed bug preventing Opera from retaining the generated session id. Closes #292 + +0.9.0 / 2010-04-14 +================== + + * Added DSL level error() route support + * Added DSL level notFound() route support + * Added Request#error() + * Added Request#notFound() + * Added Request#render() callback function. Closes #258 + * Added "max upload size" setting + * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254 + * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js + * Added callback function support to Request#halt() as 3rd/4th arg + * Added preprocessing of route param wildcards using param(). Closes #251 + * Added view partial support (with collections etc) + * Fixed bug preventing falsey params (such as ?page=0). Closes #286 + * Fixed setting of multiple cookies. Closes #199 + * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml) + * Changed; session cookie is now httpOnly + * Changed; Request is no longer global + * Changed; Event is no longer global + * Changed; "sys" module is no longer global + * Changed; moved Request#download to Static plugin where it belongs + * Changed; Request instance created before body parsing. Closes #262 + * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253 + * Changed; Pre-caching view partials in memory when "cache view partials" is enabled + * Updated support to node --version 0.1.90 + * Updated dependencies + * Removed set("session cookie") in favour of use(Session, { cookie: { ... }}) + * Removed utils.mixin(); use Object#mergeDeep() + +0.8.0 / 2010-03-19 +================== + + * Added coffeescript example app. Closes #242 + * Changed; cache api now async friendly. Closes #240 + * Removed deprecated 'express/static' support. Use 'express/plugins/static' + +0.7.6 / 2010-03-19 +================== + + * Added Request#isXHR. Closes #229 + * Added `make install` (for the executable) + * Added `express` executable for setting up simple app templates + * Added "GET /public/*" to Static plugin, defaulting to /public + * Added Static plugin + * Fixed; Request#render() only calls cache.get() once + * Fixed; Namespacing View caches with "view:" + * Fixed; Namespacing Static caches with "static:" + * Fixed; Both example apps now use the Static plugin + * Fixed set("views"). Closes #239 + * Fixed missing space for combined log format + * Deprecated Request#sendfile() and 'express/static' + * Removed Server#running + +0.7.5 / 2010-03-16 +================== + + * Added Request#flash() support without args, now returns all flashes + * Updated ext submodule + +0.7.4 / 2010-03-16 +================== + + * Fixed session reaper + * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft) + +0.7.3 / 2010-03-16 +================== + + * Added package.json + * Fixed requiring of haml / sass due to kiwi removal + +0.7.2 / 2010-03-16 +================== + + * Fixed GIT submodules (HAH!) + +0.7.1 / 2010-03-16 +================== + + * Changed; Express now using submodules again until a PM is adopted + * Changed; chat example using millisecond conversions from ext + +0.7.0 / 2010-03-15 +================== + + * Added Request#pass() support (finds the next matching route, or the given path) + * Added Logger plugin (default "common" format replaces CommonLogger) + * Removed Profiler plugin + * Removed CommonLogger plugin + +0.6.0 / 2010-03-11 +================== + + * Added seed.yml for kiwi package management support + * Added HTTP client query string support when method is GET. Closes #205 + + * Added support for arbitrary view engines. + For example "foo.engine.html" will now require('engine'), + the exports from this module are cached after the first require(). + + * Added async plugin support + + * Removed usage of RESTful route funcs as http client + get() etc, use http.get() and friends + + * Removed custom exceptions + +0.5.0 / 2010-03-10 +================== + + * Added ext dependency (library of js extensions) + * Removed extname() / basename() utils. Use path module + * Removed toArray() util. Use arguments.values + * Removed escapeRegexp() util. Use RegExp.escape() + * Removed process.mixin() dependency. Use utils.mixin() + * Removed Collection + * Removed ElementCollection + * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;) + +0.4.0 / 2010-02-11 +================== + + * Added flash() example to sample upload app + * Added high level restful http client module (express/http) + * Changed; RESTful route functions double as HTTP clients. Closes #69 + * Changed; throwing error when routes are added at runtime + * Changed; defaulting render() context to the current Request. Closes #197 + * Updated haml submodule + +0.3.0 / 2010-02-11 +================== + + * Updated haml / sass submodules. Closes #200 + * Added flash message support. Closes #64 + * Added accepts() now allows multiple args. fixes #117 + * Added support for plugins to halt. Closes #189 + * Added alternate layout support. Closes #119 + * Removed Route#run(). Closes #188 + * Fixed broken specs due to use(Cookie) missing + +0.2.1 / 2010-02-05 +================== + + * Added "plot" format option for Profiler (for gnuplot processing) + * Added request number to Profiler plugin + * Fixed binary encoding for multi-part file uploads, was previously defaulting to UTF8 + * Fixed issue with routes not firing when not files are present. Closes #184 + * Fixed process.Promise -> events.Promise + +0.2.0 / 2010-02-03 +================== + + * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180 + * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174 + * Added expiration support to cache api with reaper. Closes #133 + * Added cache Store.Memory#reap() + * Added Cache; cache api now uses first class Cache instances + * Added abstract session Store. Closes #172 + * Changed; cache Memory.Store#get() utilizing Collection + * Renamed MemoryStore -> Store.Memory + * Fixed use() of the same plugin several time will always use latest options. Closes #176 + +0.1.0 / 2010-02-03 +================== + + * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context + * Updated node support to 0.1.27 Closes #169 + * Updated dirname(__filename) -> __dirname + * Updated libxmljs support to v0.2.0 + * Added session support with memory store / reaping + * Added quick uid() helper + * Added multi-part upload support + * Added Sass.js support / submodule + * Added production env caching view contents and static files + * Added static file caching. Closes #136 + * Added cache plugin with memory stores + * Added support to StaticFile so that it works with non-textual files. + * Removed dirname() helper + * Removed several globals (now their modules must be required) + +0.0.2 / 2010-01-10 +================== + + * Added view benchmarks; currently haml vs ejs + * Added Request#attachment() specs. Closes #116 + * Added use of node's parseQuery() util. Closes #123 + * Added `make init` for submodules + * Updated Haml + * Updated sample chat app to show messages on load + * Updated libxmljs parseString -> parseHtmlString + * Fixed `make init` to work with older versions of git + * Fixed specs can now run independent specs for those who cant build deps. Closes #127 + * Fixed issues introduced by the node url module changes. Closes 126. + * Fixed two assertions failing due to Collection#keys() returning strings + * Fixed faulty Collection#toArray() spec due to keys() returning strings + * Fixed `make test` now builds libxmljs.node before testing + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/express/LICENSE b/node_modules/express/LICENSE new file mode 100644 index 0000000..aa927e4 --- /dev/null +++ b/node_modules/express/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2009-2014 TJ Holowaychuk +Copyright (c) 2013-2014 Roman Shtylman +Copyright (c) 2014-2015 Douglas Christopher Wilson + +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/node_modules/express/Readme.md b/node_modules/express/Readme.md new file mode 100644 index 0000000..3cd2203 --- /dev/null +++ b/node_modules/express/Readme.md @@ -0,0 +1,153 @@ +[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/) + + Fast, unopinionated, minimalist web framework for [node](http://nodejs.org). + + [![NPM Version][npm-image]][npm-url] + [![NPM Downloads][downloads-image]][downloads-url] + [![Linux Build][travis-image]][travis-url] + [![Windows Build][appveyor-image]][appveyor-url] + [![Test Coverage][coveralls-image]][coveralls-url] + +```js +var express = require('express') +var app = express() + +app.get('/', function (req, res) { + res.send('Hello World') +}) + +app.listen(3000) +``` + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). + +Before installing, [download and install Node.js](https://nodejs.org/en/download/). +Node.js 0.10 or higher is required. + +Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install express +``` + +Follow [our installing guide](http://expressjs.com/en/starter/installing.html) +for more information. + +## Features + + * Robust routing + * Focus on high performance + * Super-high test coverage + * HTTP helpers (redirection, caching, etc) + * View system supporting 14+ template engines + * Content negotiation + * Executable for generating applications quickly + +## Docs & Community + + * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)] + * [#express](https://webchat.freenode.net/?channels=express) on freenode IRC + * [GitHub Organization](https://github.com/expressjs) for Official Middleware & Modules + * Visit the [Wiki](https://github.com/expressjs/express/wiki) + * [Google Group](https://groups.google.com/group/express-js) for discussion + * [Gitter](https://gitter.im/expressjs/express) for support and discussion + +**PROTIP** Be sure to read [Migrating from 3.x to 4.x](https://github.com/expressjs/express/wiki/Migrating-from-3.x-to-4.x) as well as [New features in 4.x](https://github.com/expressjs/express/wiki/New-features-in-4.x). + +### Security Issues + +If you discover a security vulnerability in Express, please see [Security Policies and Procedures](Security.md). + +## Quick Start + + The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below: + + Install the executable. The executable's major version will match Express's: + +```bash +$ npm install -g express-generator@4 +``` + + Create the app: + +```bash +$ express /tmp/foo && cd /tmp/foo +``` + + Install dependencies: + +```bash +$ npm install +``` + + Start the server: + +```bash +$ npm start +``` + +## Philosophy + + The Express philosophy is to provide small, robust tooling for HTTP servers, making + it a great solution for single page applications, web sites, hybrids, or public + HTTP APIs. + + Express does not force you to use any specific ORM or template engine. With support for over + 14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js), + you can quickly craft your perfect framework. + +## Examples + + To view the examples, clone the Express repo and install the dependencies: + +```bash +$ git clone git://github.com/expressjs/express.git --depth 1 +$ cd express +$ npm install +``` + + Then run whichever example you want: + +```bash +$ node examples/content-negotiation +``` + +## Tests + + To run the test suite, first install the dependencies, then run `npm test`: + +```bash +$ npm install +$ npm test +``` + +## People + +The original author of Express is [TJ Holowaychuk](https://github.com/tj) [![TJ's Gratipay][gratipay-image-visionmedia]][gratipay-url-visionmedia] + +The current lead maintainer is [Douglas Christopher Wilson](https://github.com/dougwilson) [![Doug's Gratipay][gratipay-image-dougwilson]][gratipay-url-dougwilson] + +[List of all contributors](https://github.com/expressjs/express/graphs/contributors) + +## License + + [MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/express.svg +[npm-url]: https://npmjs.org/package/express +[downloads-image]: https://img.shields.io/npm/dm/express.svg +[downloads-url]: https://npmjs.org/package/express +[travis-image]: https://img.shields.io/travis/expressjs/express/master.svg?label=linux +[travis-url]: https://travis-ci.org/expressjs/express +[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/express/master.svg?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/express +[coveralls-image]: https://img.shields.io/coveralls/expressjs/express/master.svg +[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master +[gratipay-image-visionmedia]: https://img.shields.io/gratipay/visionmedia.svg +[gratipay-url-visionmedia]: https://gratipay.com/visionmedia/ +[gratipay-image-dougwilson]: https://img.shields.io/gratipay/dougwilson.svg +[gratipay-url-dougwilson]: https://gratipay.com/dougwilson/ diff --git a/node_modules/express/index.js b/node_modules/express/index.js new file mode 100644 index 0000000..d219b0c --- /dev/null +++ b/node_modules/express/index.js @@ -0,0 +1,11 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +module.exports = require('./lib/express'); diff --git a/node_modules/express/lib/application.js b/node_modules/express/lib/application.js new file mode 100644 index 0000000..91f77d2 --- /dev/null +++ b/node_modules/express/lib/application.js @@ -0,0 +1,644 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var finalhandler = require('finalhandler'); +var Router = require('./router'); +var methods = require('methods'); +var middleware = require('./middleware/init'); +var query = require('./middleware/query'); +var debug = require('debug')('express:application'); +var View = require('./view'); +var http = require('http'); +var compileETag = require('./utils').compileETag; +var compileQueryParser = require('./utils').compileQueryParser; +var compileTrust = require('./utils').compileTrust; +var deprecate = require('depd')('express'); +var flatten = require('array-flatten'); +var merge = require('utils-merge'); +var resolve = require('path').resolve; +var setPrototypeOf = require('setprototypeof') +var slice = Array.prototype.slice; + +/** + * Application prototype. + */ + +var app = exports = module.exports = {}; + +/** + * Variable for trust proxy inheritance back-compat + * @private + */ + +var trustProxyDefaultSymbol = '@@symbol:trust_proxy_default'; + +/** + * Initialize the server. + * + * - setup default configuration + * - setup default middleware + * - setup route reflection methods + * + * @private + */ + +app.init = function init() { + this.cache = {}; + this.engines = {}; + this.settings = {}; + + this.defaultConfiguration(); +}; + +/** + * Initialize application configuration. + * @private + */ + +app.defaultConfiguration = function defaultConfiguration() { + var env = process.env.NODE_ENV || 'development'; + + // default settings + this.enable('x-powered-by'); + this.set('etag', 'weak'); + this.set('env', env); + this.set('query parser', 'extended'); + this.set('subdomain offset', 2); + this.set('trust proxy', false); + + // trust proxy inherit back-compat + Object.defineProperty(this.settings, trustProxyDefaultSymbol, { + configurable: true, + value: true + }); + + debug('booting in %s mode', env); + + this.on('mount', function onmount(parent) { + // inherit trust proxy + if (this.settings[trustProxyDefaultSymbol] === true + && typeof parent.settings['trust proxy fn'] === 'function') { + delete this.settings['trust proxy']; + delete this.settings['trust proxy fn']; + } + + // inherit protos + setPrototypeOf(this.request, parent.request) + setPrototypeOf(this.response, parent.response) + setPrototypeOf(this.engines, parent.engines) + setPrototypeOf(this.settings, parent.settings) + }); + + // setup locals + this.locals = Object.create(null); + + // top-most app is mounted at / + this.mountpath = '/'; + + // default locals + this.locals.settings = this.settings; + + // default configuration + this.set('view', View); + this.set('views', resolve('views')); + this.set('jsonp callback name', 'callback'); + + if (env === 'production') { + this.enable('view cache'); + } + + Object.defineProperty(this, 'router', { + get: function() { + throw new Error('\'app.router\' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app.'); + } + }); +}; + +/** + * lazily adds the base router if it has not yet been added. + * + * We cannot add the base router in the defaultConfiguration because + * it reads app settings which might be set after that has run. + * + * @private + */ +app.lazyrouter = function lazyrouter() { + if (!this._router) { + this._router = new Router({ + caseSensitive: this.enabled('case sensitive routing'), + strict: this.enabled('strict routing') + }); + + this._router.use(query(this.get('query parser fn'))); + this._router.use(middleware.init(this)); + } +}; + +/** + * Dispatch a req, res pair into the application. Starts pipeline processing. + * + * If no callback is provided, then default error handlers will respond + * in the event of an error bubbling through the stack. + * + * @private + */ + +app.handle = function handle(req, res, callback) { + var router = this._router; + + // final handler + var done = callback || finalhandler(req, res, { + env: this.get('env'), + onerror: logerror.bind(this) + }); + + // no routes + if (!router) { + debug('no routes defined on app'); + done(); + return; + } + + router.handle(req, res, done); +}; + +/** + * Proxy `Router#use()` to add middleware to the app router. + * See Router#use() documentation for details. + * + * If the _fn_ parameter is an express app, then it will be + * mounted at the _route_ specified. + * + * @public + */ + +app.use = function use(fn) { + var offset = 0; + var path = '/'; + + // default path to '/' + // disambiguate app.use([fn]) + if (typeof fn !== 'function') { + var arg = fn; + + while (Array.isArray(arg) && arg.length !== 0) { + arg = arg[0]; + } + + // first arg is the path + if (typeof arg !== 'function') { + offset = 1; + path = fn; + } + } + + var fns = flatten(slice.call(arguments, offset)); + + if (fns.length === 0) { + throw new TypeError('app.use() requires a middleware function') + } + + // setup router + this.lazyrouter(); + var router = this._router; + + fns.forEach(function (fn) { + // non-express app + if (!fn || !fn.handle || !fn.set) { + return router.use(path, fn); + } + + debug('.use app under %s', path); + fn.mountpath = path; + fn.parent = this; + + // restore .app property on req and res + router.use(path, function mounted_app(req, res, next) { + var orig = req.app; + fn.handle(req, res, function (err) { + setPrototypeOf(req, orig.request) + setPrototypeOf(res, orig.response) + next(err); + }); + }); + + // mounted an app + fn.emit('mount', this); + }, this); + + return this; +}; + +/** + * Proxy to the app `Router#route()` + * Returns a new `Route` instance for the _path_. + * + * Routes are isolated middleware stacks for specific paths. + * See the Route api docs for details. + * + * @public + */ + +app.route = function route(path) { + this.lazyrouter(); + return this._router.route(path); +}; + +/** + * Register the given template engine callback `fn` + * as `ext`. + * + * By default will `require()` the engine based on the + * file extension. For example if you try to render + * a "foo.ejs" file Express will invoke the following internally: + * + * app.engine('ejs', require('ejs').__express); + * + * For engines that do not provide `.__express` out of the box, + * or if you wish to "map" a different extension to the template engine + * you may use this method. For example mapping the EJS template engine to + * ".html" files: + * + * app.engine('html', require('ejs').renderFile); + * + * In this case EJS provides a `.renderFile()` method with + * the same signature that Express expects: `(path, options, callback)`, + * though note that it aliases this method as `ejs.__express` internally + * so if you're using ".ejs" extensions you dont need to do anything. + * + * Some template engines do not follow this convention, the + * [Consolidate.js](https://github.com/tj/consolidate.js) + * library was created to map all of node's popular template + * engines to follow this convention, thus allowing them to + * work seamlessly within Express. + * + * @param {String} ext + * @param {Function} fn + * @return {app} for chaining + * @public + */ + +app.engine = function engine(ext, fn) { + if (typeof fn !== 'function') { + throw new Error('callback function required'); + } + + // get file extension + var extension = ext[0] !== '.' + ? '.' + ext + : ext; + + // store engine + this.engines[extension] = fn; + + return this; +}; + +/** + * Proxy to `Router#param()` with one added api feature. The _name_ parameter + * can be an array of names. + * + * See the Router#param() docs for more details. + * + * @param {String|Array} name + * @param {Function} fn + * @return {app} for chaining + * @public + */ + +app.param = function param(name, fn) { + this.lazyrouter(); + + if (Array.isArray(name)) { + for (var i = 0; i < name.length; i++) { + this.param(name[i], fn); + } + + return this; + } + + this._router.param(name, fn); + + return this; +}; + +/** + * Assign `setting` to `val`, or return `setting`'s value. + * + * app.set('foo', 'bar'); + * app.set('foo'); + * // => "bar" + * + * Mounted servers inherit their parent server's settings. + * + * @param {String} setting + * @param {*} [val] + * @return {Server} for chaining + * @public + */ + +app.set = function set(setting, val) { + if (arguments.length === 1) { + // app.get(setting) + return this.settings[setting]; + } + + debug('set "%s" to %o', setting, val); + + // set value + this.settings[setting] = val; + + // trigger matched settings + switch (setting) { + case 'etag': + this.set('etag fn', compileETag(val)); + break; + case 'query parser': + this.set('query parser fn', compileQueryParser(val)); + break; + case 'trust proxy': + this.set('trust proxy fn', compileTrust(val)); + + // trust proxy inherit back-compat + Object.defineProperty(this.settings, trustProxyDefaultSymbol, { + configurable: true, + value: false + }); + + break; + } + + return this; +}; + +/** + * Return the app's absolute pathname + * based on the parent(s) that have + * mounted it. + * + * For example if the application was + * mounted as "/admin", which itself + * was mounted as "/blog" then the + * return value would be "/blog/admin". + * + * @return {String} + * @private + */ + +app.path = function path() { + return this.parent + ? this.parent.path() + this.mountpath + : ''; +}; + +/** + * Check if `setting` is enabled (truthy). + * + * app.enabled('foo') + * // => false + * + * app.enable('foo') + * app.enabled('foo') + * // => true + * + * @param {String} setting + * @return {Boolean} + * @public + */ + +app.enabled = function enabled(setting) { + return Boolean(this.set(setting)); +}; + +/** + * Check if `setting` is disabled. + * + * app.disabled('foo') + * // => true + * + * app.enable('foo') + * app.disabled('foo') + * // => false + * + * @param {String} setting + * @return {Boolean} + * @public + */ + +app.disabled = function disabled(setting) { + return !this.set(setting); +}; + +/** + * Enable `setting`. + * + * @param {String} setting + * @return {app} for chaining + * @public + */ + +app.enable = function enable(setting) { + return this.set(setting, true); +}; + +/** + * Disable `setting`. + * + * @param {String} setting + * @return {app} for chaining + * @public + */ + +app.disable = function disable(setting) { + return this.set(setting, false); +}; + +/** + * Delegate `.VERB(...)` calls to `router.VERB(...)`. + */ + +methods.forEach(function(method){ + app[method] = function(path){ + if (method === 'get' && arguments.length === 1) { + // app.get(setting) + return this.set(path); + } + + this.lazyrouter(); + + var route = this._router.route(path); + route[method].apply(route, slice.call(arguments, 1)); + return this; + }; +}); + +/** + * Special-cased "all" method, applying the given route `path`, + * middleware, and callback to _every_ HTTP method. + * + * @param {String} path + * @param {Function} ... + * @return {app} for chaining + * @public + */ + +app.all = function all(path) { + this.lazyrouter(); + + var route = this._router.route(path); + var args = slice.call(arguments, 1); + + for (var i = 0; i < methods.length; i++) { + route[methods[i]].apply(route, args); + } + + return this; +}; + +// del -> delete alias + +app.del = deprecate.function(app.delete, 'app.del: Use app.delete instead'); + +/** + * Render the given view `name` name with `options` + * and a callback accepting an error and the + * rendered template string. + * + * Example: + * + * app.render('email', { name: 'Tobi' }, function(err, html){ + * // ... + * }) + * + * @param {String} name + * @param {Object|Function} options or fn + * @param {Function} callback + * @public + */ + +app.render = function render(name, options, callback) { + var cache = this.cache; + var done = callback; + var engines = this.engines; + var opts = options; + var renderOptions = {}; + var view; + + // support callback function as second arg + if (typeof options === 'function') { + done = options; + opts = {}; + } + + // merge app.locals + merge(renderOptions, this.locals); + + // merge options._locals + if (opts._locals) { + merge(renderOptions, opts._locals); + } + + // merge options + merge(renderOptions, opts); + + // set .cache unless explicitly provided + if (renderOptions.cache == null) { + renderOptions.cache = this.enabled('view cache'); + } + + // primed cache + if (renderOptions.cache) { + view = cache[name]; + } + + // view + if (!view) { + var View = this.get('view'); + + view = new View(name, { + defaultEngine: this.get('view engine'), + root: this.get('views'), + engines: engines + }); + + if (!view.path) { + var dirs = Array.isArray(view.root) && view.root.length > 1 + ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"' + : 'directory "' + view.root + '"' + var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs); + err.view = view; + return done(err); + } + + // prime the cache + if (renderOptions.cache) { + cache[name] = view; + } + } + + // render + tryRender(view, renderOptions, done); +}; + +/** + * Listen for connections. + * + * A node `http.Server` is returned, with this + * application (which is a `Function`) as its + * callback. If you wish to create both an HTTP + * and HTTPS server you may do so with the "http" + * and "https" modules as shown here: + * + * var http = require('http') + * , https = require('https') + * , express = require('express') + * , app = express(); + * + * http.createServer(app).listen(80); + * https.createServer({ ... }, app).listen(443); + * + * @return {http.Server} + * @public + */ + +app.listen = function listen() { + var server = http.createServer(this); + return server.listen.apply(server, arguments); +}; + +/** + * Log error using console.error. + * + * @param {Error} err + * @private + */ + +function logerror(err) { + /* istanbul ignore next */ + if (this.get('env') !== 'test') console.error(err.stack || err.toString()); +} + +/** + * Try rendering a view. + * @private + */ + +function tryRender(view, options, callback) { + try { + view.render(options, callback); + } catch (err) { + callback(err); + } +} diff --git a/node_modules/express/lib/express.js b/node_modules/express/lib/express.js new file mode 100644 index 0000000..485a8fc --- /dev/null +++ b/node_modules/express/lib/express.js @@ -0,0 +1,112 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + */ + +var bodyParser = require('body-parser') +var EventEmitter = require('events').EventEmitter; +var mixin = require('merge-descriptors'); +var proto = require('./application'); +var Route = require('./router/route'); +var Router = require('./router'); +var req = require('./request'); +var res = require('./response'); + +/** + * Expose `createApplication()`. + */ + +exports = module.exports = createApplication; + +/** + * Create an express application. + * + * @return {Function} + * @api public + */ + +function createApplication() { + var app = function(req, res, next) { + app.handle(req, res, next); + }; + + mixin(app, EventEmitter.prototype, false); + mixin(app, proto, false); + + // expose the prototype that will get set on requests + app.request = Object.create(req, { + app: { configurable: true, enumerable: true, writable: true, value: app } + }) + + // expose the prototype that will get set on responses + app.response = Object.create(res, { + app: { configurable: true, enumerable: true, writable: true, value: app } + }) + + app.init(); + return app; +} + +/** + * Expose the prototypes. + */ + +exports.application = proto; +exports.request = req; +exports.response = res; + +/** + * Expose constructors. + */ + +exports.Route = Route; +exports.Router = Router; + +/** + * Expose middleware + */ + +exports.json = bodyParser.json +exports.query = require('./middleware/query'); +exports.static = require('serve-static'); +exports.urlencoded = bodyParser.urlencoded + +/** + * Replace removed middleware with an appropriate error message. + */ + +;[ + 'bodyParser', + 'compress', + 'cookieSession', + 'session', + 'logger', + 'cookieParser', + 'favicon', + 'responseTime', + 'errorHandler', + 'timeout', + 'methodOverride', + 'vhost', + 'csrf', + 'directory', + 'limit', + 'multipart', + 'staticCache', +].forEach(function (name) { + Object.defineProperty(exports, name, { + get: function () { + throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.'); + }, + configurable: true + }); +}); diff --git a/node_modules/express/lib/middleware/init.js b/node_modules/express/lib/middleware/init.js new file mode 100644 index 0000000..dfd0427 --- /dev/null +++ b/node_modules/express/lib/middleware/init.js @@ -0,0 +1,43 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var setPrototypeOf = require('setprototypeof') + +/** + * Initialization middleware, exposing the + * request and response to each other, as well + * as defaulting the X-Powered-By header field. + * + * @param {Function} app + * @return {Function} + * @api private + */ + +exports.init = function(app){ + return function expressInit(req, res, next){ + if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); + req.res = res; + res.req = req; + req.next = next; + + setPrototypeOf(req, app.request) + setPrototypeOf(res, app.response) + + res.locals = res.locals || Object.create(null); + + next(); + }; +}; + diff --git a/node_modules/express/lib/middleware/query.js b/node_modules/express/lib/middleware/query.js new file mode 100644 index 0000000..7e91669 --- /dev/null +++ b/node_modules/express/lib/middleware/query.js @@ -0,0 +1,47 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + */ + +var merge = require('utils-merge') +var parseUrl = require('parseurl'); +var qs = require('qs'); + +/** + * @param {Object} options + * @return {Function} + * @api public + */ + +module.exports = function query(options) { + var opts = merge({}, options) + var queryparse = qs.parse; + + if (typeof options === 'function') { + queryparse = options; + opts = undefined; + } + + if (opts !== undefined && opts.allowPrototypes === undefined) { + // back-compat for qs module + opts.allowPrototypes = true; + } + + return function query(req, res, next){ + if (!req.query) { + var val = parseUrl(req).query; + req.query = queryparse(val, opts); + } + + next(); + }; +}; diff --git a/node_modules/express/lib/request.js b/node_modules/express/lib/request.js new file mode 100644 index 0000000..8bb86a9 --- /dev/null +++ b/node_modules/express/lib/request.js @@ -0,0 +1,521 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var accepts = require('accepts'); +var deprecate = require('depd')('express'); +var isIP = require('net').isIP; +var typeis = require('type-is'); +var http = require('http'); +var fresh = require('fresh'); +var parseRange = require('range-parser'); +var parse = require('parseurl'); +var proxyaddr = require('proxy-addr'); + +/** + * Request prototype. + * @public + */ + +var req = Object.create(http.IncomingMessage.prototype) + +/** + * Module exports. + * @public + */ + +module.exports = req + +/** + * Return request header. + * + * The `Referrer` header field is special-cased, + * both `Referrer` and `Referer` are interchangeable. + * + * Examples: + * + * req.get('Content-Type'); + * // => "text/plain" + * + * req.get('content-type'); + * // => "text/plain" + * + * req.get('Something'); + * // => undefined + * + * Aliased as `req.header()`. + * + * @param {String} name + * @return {String} + * @public + */ + +req.get = +req.header = function header(name) { + if (!name) { + throw new TypeError('name argument is required to req.get'); + } + + if (typeof name !== 'string') { + throw new TypeError('name must be a string to req.get'); + } + + var lc = name.toLowerCase(); + + switch (lc) { + case 'referer': + case 'referrer': + return this.headers.referrer + || this.headers.referer; + default: + return this.headers[lc]; + } +}; + +/** + * To do: update docs. + * + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single MIME type string + * such as "application/json", an extension name + * such as "json", a comma-delimited list such as "json, html, text/plain", + * an argument list such as `"json", "html", "text/plain"`, + * or an array `["json", "html", "text/plain"]`. When a list + * or array is given, the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * req.accepts('html'); + * // => "html" + * + * // Accept: text/*, application/json + * req.accepts('html'); + * // => "html" + * req.accepts('text/html'); + * // => "text/html" + * req.accepts('json, text'); + * // => "json" + * req.accepts('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * req.accepts('image/png'); + * req.accepts('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * req.accepts(['html', 'json']); + * req.accepts('html', 'json'); + * req.accepts('html, json'); + * // => "json" + * + * @param {String|Array} type(s) + * @return {String|Array|Boolean} + * @public + */ + +req.accepts = function(){ + var accept = accepts(this); + return accept.types.apply(accept, arguments); +}; + +/** + * Check if the given `encoding`s are accepted. + * + * @param {String} ...encoding + * @return {String|Array} + * @public + */ + +req.acceptsEncodings = function(){ + var accept = accepts(this); + return accept.encodings.apply(accept, arguments); +}; + +req.acceptsEncoding = deprecate.function(req.acceptsEncodings, + 'req.acceptsEncoding: Use acceptsEncodings instead'); + +/** + * Check if the given `charset`s are acceptable, + * otherwise you should respond with 406 "Not Acceptable". + * + * @param {String} ...charset + * @return {String|Array} + * @public + */ + +req.acceptsCharsets = function(){ + var accept = accepts(this); + return accept.charsets.apply(accept, arguments); +}; + +req.acceptsCharset = deprecate.function(req.acceptsCharsets, + 'req.acceptsCharset: Use acceptsCharsets instead'); + +/** + * Check if the given `lang`s are acceptable, + * otherwise you should respond with 406 "Not Acceptable". + * + * @param {String} ...lang + * @return {String|Array} + * @public + */ + +req.acceptsLanguages = function(){ + var accept = accepts(this); + return accept.languages.apply(accept, arguments); +}; + +req.acceptsLanguage = deprecate.function(req.acceptsLanguages, + 'req.acceptsLanguage: Use acceptsLanguages instead'); + +/** + * Parse Range header field, capping to the given `size`. + * + * Unspecified ranges such as "0-" require knowledge of your resource length. In + * the case of a byte range this is of course the total number of bytes. If the + * Range header field is not given `undefined` is returned, `-1` when unsatisfiable, + * and `-2` when syntactically invalid. + * + * When ranges are returned, the array has a "type" property which is the type of + * range that is required (most commonly, "bytes"). Each array element is an object + * with a "start" and "end" property for the portion of the range. + * + * The "combine" option can be set to `true` and overlapping & adjacent ranges + * will be combined into a single range. + * + * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3" + * should respond with 4 users when available, not 3. + * + * @param {number} size + * @param {object} [options] + * @param {boolean} [options.combine=false] + * @return {number|array} + * @public + */ + +req.range = function range(size, options) { + var range = this.get('Range'); + if (!range) return; + return parseRange(size, range, options); +}; + +/** + * Return the value of param `name` when present or `defaultValue`. + * + * - Checks route placeholders, ex: _/user/:id_ + * - Checks body params, ex: id=12, {"id":12} + * - Checks query string params, ex: ?id=12 + * + * To utilize request bodies, `req.body` + * should be an object. This can be done by using + * the `bodyParser()` middleware. + * + * @param {String} name + * @param {Mixed} [defaultValue] + * @return {String} + * @public + */ + +req.param = function param(name, defaultValue) { + var params = this.params || {}; + var body = this.body || {}; + var query = this.query || {}; + + var args = arguments.length === 1 + ? 'name' + : 'name, default'; + deprecate('req.param(' + args + '): Use req.params, req.body, or req.query instead'); + + if (null != params[name] && params.hasOwnProperty(name)) return params[name]; + if (null != body[name]) return body[name]; + if (null != query[name]) return query[name]; + + return defaultValue; +}; + +/** + * Check if the incoming request contains the "Content-Type" + * header field, and it contains the give mime `type`. + * + * Examples: + * + * // With Content-Type: text/html; charset=utf-8 + * req.is('html'); + * req.is('text/html'); + * req.is('text/*'); + * // => true + * + * // When Content-Type is application/json + * req.is('json'); + * req.is('application/json'); + * req.is('application/*'); + * // => true + * + * req.is('html'); + * // => false + * + * @param {String|Array} types... + * @return {String|false|null} + * @public + */ + +req.is = function is(types) { + var arr = types; + + // support flattened arguments + if (!Array.isArray(types)) { + arr = new Array(arguments.length); + for (var i = 0; i < arr.length; i++) { + arr[i] = arguments[i]; + } + } + + return typeis(this, arr); +}; + +/** + * Return the protocol string "http" or "https" + * when requested with TLS. When the "trust proxy" + * setting trusts the socket address, the + * "X-Forwarded-Proto" header field will be trusted + * and used if present. + * + * If you're running behind a reverse proxy that + * supplies https for you this may be enabled. + * + * @return {String} + * @public + */ + +defineGetter(req, 'protocol', function protocol(){ + var proto = this.connection.encrypted + ? 'https' + : 'http'; + var trust = this.app.get('trust proxy fn'); + + if (!trust(this.connection.remoteAddress, 0)) { + return proto; + } + + // Note: X-Forwarded-Proto is normally only ever a + // single value, but this is to be safe. + var header = this.get('X-Forwarded-Proto') || proto + var index = header.indexOf(',') + + return index !== -1 + ? header.substring(0, index).trim() + : header.trim() +}); + +/** + * Short-hand for: + * + * req.protocol === 'https' + * + * @return {Boolean} + * @public + */ + +defineGetter(req, 'secure', function secure(){ + return this.protocol === 'https'; +}); + +/** + * Return the remote address from the trusted proxy. + * + * The is the remote address on the socket unless + * "trust proxy" is set. + * + * @return {String} + * @public + */ + +defineGetter(req, 'ip', function ip(){ + var trust = this.app.get('trust proxy fn'); + return proxyaddr(this, trust); +}); + +/** + * When "trust proxy" is set, trusted proxy addresses + client. + * + * For example if the value were "client, proxy1, proxy2" + * you would receive the array `["client", "proxy1", "proxy2"]` + * where "proxy2" is the furthest down-stream and "proxy1" and + * "proxy2" were trusted. + * + * @return {Array} + * @public + */ + +defineGetter(req, 'ips', function ips() { + var trust = this.app.get('trust proxy fn'); + var addrs = proxyaddr.all(this, trust); + + // reverse the order (to farthest -> closest) + // and remove socket address + addrs.reverse().pop() + + return addrs +}); + +/** + * Return subdomains as an array. + * + * Subdomains are the dot-separated parts of the host before the main domain of + * the app. By default, the domain of the app is assumed to be the last two + * parts of the host. This can be changed by setting "subdomain offset". + * + * For example, if the domain is "tobi.ferrets.example.com": + * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`. + * If "subdomain offset" is 3, req.subdomains is `["tobi"]`. + * + * @return {Array} + * @public + */ + +defineGetter(req, 'subdomains', function subdomains() { + var hostname = this.hostname; + + if (!hostname) return []; + + var offset = this.app.get('subdomain offset'); + var subdomains = !isIP(hostname) + ? hostname.split('.').reverse() + : [hostname]; + + return subdomains.slice(offset); +}); + +/** + * Short-hand for `url.parse(req.url).pathname`. + * + * @return {String} + * @public + */ + +defineGetter(req, 'path', function path() { + return parse(this).pathname; +}); + +/** + * Parse the "Host" header field to a hostname. + * + * When the "trust proxy" setting trusts the socket + * address, the "X-Forwarded-Host" header field will + * be trusted. + * + * @return {String} + * @public + */ + +defineGetter(req, 'hostname', function hostname(){ + var trust = this.app.get('trust proxy fn'); + var host = this.get('X-Forwarded-Host'); + + if (!host || !trust(this.connection.remoteAddress, 0)) { + host = this.get('Host'); + } + + if (!host) return; + + // IPv6 literal support + var offset = host[0] === '[' + ? host.indexOf(']') + 1 + : 0; + var index = host.indexOf(':', offset); + + return index !== -1 + ? host.substring(0, index) + : host; +}); + +// TODO: change req.host to return host in next major + +defineGetter(req, 'host', deprecate.function(function host(){ + return this.hostname; +}, 'req.host: Use req.hostname instead')); + +/** + * Check if the request is fresh, aka + * Last-Modified and/or the ETag + * still match. + * + * @return {Boolean} + * @public + */ + +defineGetter(req, 'fresh', function(){ + var method = this.method; + var res = this.res + var status = res.statusCode + + // GET or HEAD for weak freshness validation only + if ('GET' !== method && 'HEAD' !== method) return false; + + // 2xx or 304 as per rfc2616 14.26 + if ((status >= 200 && status < 300) || 304 === status) { + return fresh(this.headers, { + 'etag': res.get('ETag'), + 'last-modified': res.get('Last-Modified') + }) + } + + return false; +}); + +/** + * Check if the request is stale, aka + * "Last-Modified" and / or the "ETag" for the + * resource has changed. + * + * @return {Boolean} + * @public + */ + +defineGetter(req, 'stale', function stale(){ + return !this.fresh; +}); + +/** + * Check if the request was an _XMLHttpRequest_. + * + * @return {Boolean} + * @public + */ + +defineGetter(req, 'xhr', function xhr(){ + var val = this.get('X-Requested-With') || ''; + return val.toLowerCase() === 'xmlhttprequest'; +}); + +/** + * Helper function for creating a getter on an object. + * + * @param {Object} obj + * @param {String} name + * @param {Function} getter + * @private + */ +function defineGetter(obj, name, getter) { + Object.defineProperty(obj, name, { + configurable: true, + enumerable: true, + get: getter + }); +} diff --git a/node_modules/express/lib/response.js b/node_modules/express/lib/response.js new file mode 100644 index 0000000..9c1796d --- /dev/null +++ b/node_modules/express/lib/response.js @@ -0,0 +1,1137 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var Buffer = require('safe-buffer').Buffer +var contentDisposition = require('content-disposition'); +var deprecate = require('depd')('express'); +var encodeUrl = require('encodeurl'); +var escapeHtml = require('escape-html'); +var http = require('http'); +var isAbsolute = require('./utils').isAbsolute; +var onFinished = require('on-finished'); +var path = require('path'); +var statuses = require('statuses') +var merge = require('utils-merge'); +var sign = require('cookie-signature').sign; +var normalizeType = require('./utils').normalizeType; +var normalizeTypes = require('./utils').normalizeTypes; +var setCharset = require('./utils').setCharset; +var cookie = require('cookie'); +var send = require('send'); +var extname = path.extname; +var mime = send.mime; +var resolve = path.resolve; +var vary = require('vary'); + +/** + * Response prototype. + * @public + */ + +var res = Object.create(http.ServerResponse.prototype) + +/** + * Module exports. + * @public + */ + +module.exports = res + +/** + * Module variables. + * @private + */ + +var charsetRegExp = /;\s*charset\s*=/; + +/** + * Set status `code`. + * + * @param {Number} code + * @return {ServerResponse} + * @public + */ + +res.status = function status(code) { + this.statusCode = code; + return this; +}; + +/** + * Set Link header field with the given `links`. + * + * Examples: + * + * res.links({ + * next: 'http://api.example.com/users?page=2', + * last: 'http://api.example.com/users?page=5' + * }); + * + * @param {Object} links + * @return {ServerResponse} + * @public + */ + +res.links = function(links){ + var link = this.get('Link') || ''; + if (link) link += ', '; + return this.set('Link', link + Object.keys(links).map(function(rel){ + return '<' + links[rel] + '>; rel="' + rel + '"'; + }).join(', ')); +}; + +/** + * Send a response. + * + * Examples: + * + * res.send(Buffer.from('wahoo')); + * res.send({ some: 'json' }); + * res.send('

some html

'); + * + * @param {string|number|boolean|object|Buffer} body + * @public + */ + +res.send = function send(body) { + var chunk = body; + var encoding; + var req = this.req; + var type; + + // settings + var app = this.app; + + // allow status / body + if (arguments.length === 2) { + // res.send(body, status) backwards compat + if (typeof arguments[0] !== 'number' && typeof arguments[1] === 'number') { + deprecate('res.send(body, status): Use res.status(status).send(body) instead'); + this.statusCode = arguments[1]; + } else { + deprecate('res.send(status, body): Use res.status(status).send(body) instead'); + this.statusCode = arguments[0]; + chunk = arguments[1]; + } + } + + // disambiguate res.send(status) and res.send(status, num) + if (typeof chunk === 'number' && arguments.length === 1) { + // res.send(status) will set status message as text string + if (!this.get('Content-Type')) { + this.type('txt'); + } + + deprecate('res.send(status): Use res.sendStatus(status) instead'); + this.statusCode = chunk; + chunk = statuses[chunk] + } + + switch (typeof chunk) { + // string defaulting to html + case 'string': + if (!this.get('Content-Type')) { + this.type('html'); + } + break; + case 'boolean': + case 'number': + case 'object': + if (chunk === null) { + chunk = ''; + } else if (Buffer.isBuffer(chunk)) { + if (!this.get('Content-Type')) { + this.type('bin'); + } + } else { + return this.json(chunk); + } + break; + } + + // write strings in utf-8 + if (typeof chunk === 'string') { + encoding = 'utf8'; + type = this.get('Content-Type'); + + // reflect this in content-type + if (typeof type === 'string') { + this.set('Content-Type', setCharset(type, 'utf-8')); + } + } + + // determine if ETag should be generated + var etagFn = app.get('etag fn') + var generateETag = !this.get('ETag') && typeof etagFn === 'function' + + // populate Content-Length + var len + if (chunk !== undefined) { + if (Buffer.isBuffer(chunk)) { + // get length of Buffer + len = chunk.length + } else if (!generateETag && chunk.length < 1000) { + // just calculate length when no ETag + small chunk + len = Buffer.byteLength(chunk, encoding) + } else { + // convert chunk to Buffer and calculate + chunk = Buffer.from(chunk, encoding) + encoding = undefined; + len = chunk.length + } + + this.set('Content-Length', len); + } + + // populate ETag + var etag; + if (generateETag && len !== undefined) { + if ((etag = etagFn(chunk, encoding))) { + this.set('ETag', etag); + } + } + + // freshness + if (req.fresh) this.statusCode = 304; + + // strip irrelevant headers + if (204 === this.statusCode || 304 === this.statusCode) { + this.removeHeader('Content-Type'); + this.removeHeader('Content-Length'); + this.removeHeader('Transfer-Encoding'); + chunk = ''; + } + + if (req.method === 'HEAD') { + // skip body for HEAD + this.end(); + } else { + // respond + this.end(chunk, encoding); + } + + return this; +}; + +/** + * Send JSON response. + * + * Examples: + * + * res.json(null); + * res.json({ user: 'tj' }); + * + * @param {string|number|boolean|object} obj + * @public + */ + +res.json = function json(obj) { + var val = obj; + + // allow status / body + if (arguments.length === 2) { + // res.json(body, status) backwards compat + if (typeof arguments[1] === 'number') { + deprecate('res.json(obj, status): Use res.status(status).json(obj) instead'); + this.statusCode = arguments[1]; + } else { + deprecate('res.json(status, obj): Use res.status(status).json(obj) instead'); + this.statusCode = arguments[0]; + val = arguments[1]; + } + } + + // settings + var app = this.app; + var escape = app.get('json escape') + var replacer = app.get('json replacer'); + var spaces = app.get('json spaces'); + var body = stringify(val, replacer, spaces, escape) + + // content-type + if (!this.get('Content-Type')) { + this.set('Content-Type', 'application/json'); + } + + return this.send(body); +}; + +/** + * Send JSON response with JSONP callback support. + * + * Examples: + * + * res.jsonp(null); + * res.jsonp({ user: 'tj' }); + * + * @param {string|number|boolean|object} obj + * @public + */ + +res.jsonp = function jsonp(obj) { + var val = obj; + + // allow status / body + if (arguments.length === 2) { + // res.json(body, status) backwards compat + if (typeof arguments[1] === 'number') { + deprecate('res.jsonp(obj, status): Use res.status(status).json(obj) instead'); + this.statusCode = arguments[1]; + } else { + deprecate('res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead'); + this.statusCode = arguments[0]; + val = arguments[1]; + } + } + + // settings + var app = this.app; + var escape = app.get('json escape') + var replacer = app.get('json replacer'); + var spaces = app.get('json spaces'); + var body = stringify(val, replacer, spaces, escape) + var callback = this.req.query[app.get('jsonp callback name')]; + + // content-type + if (!this.get('Content-Type')) { + this.set('X-Content-Type-Options', 'nosniff'); + this.set('Content-Type', 'application/json'); + } + + // fixup callback + if (Array.isArray(callback)) { + callback = callback[0]; + } + + // jsonp + if (typeof callback === 'string' && callback.length !== 0) { + this.set('X-Content-Type-Options', 'nosniff'); + this.set('Content-Type', 'text/javascript'); + + // restrict callback charset + callback = callback.replace(/[^\[\]\w$.]/g, ''); + + // replace chars not allowed in JavaScript that are in JSON + body = body + .replace(/\u2028/g, '\\u2028') + .replace(/\u2029/g, '\\u2029'); + + // the /**/ is a specific security mitigation for "Rosetta Flash JSONP abuse" + // the typeof check is just to reduce client error noise + body = '/**/ typeof ' + callback + ' === \'function\' && ' + callback + '(' + body + ');'; + } + + return this.send(body); +}; + +/** + * Send given HTTP status code. + * + * Sets the response status to `statusCode` and the body of the + * response to the standard description from node's http.STATUS_CODES + * or the statusCode number if no description. + * + * Examples: + * + * res.sendStatus(200); + * + * @param {number} statusCode + * @public + */ + +res.sendStatus = function sendStatus(statusCode) { + var body = statuses[statusCode] || String(statusCode) + + this.statusCode = statusCode; + this.type('txt'); + + return this.send(body); +}; + +/** + * Transfer the file at the given `path`. + * + * Automatically sets the _Content-Type_ response header field. + * The callback `callback(err)` is invoked when the transfer is complete + * or when an error occurs. Be sure to check `res.sentHeader` + * if you wish to attempt responding, as the header and some data + * may have already been transferred. + * + * Options: + * + * - `maxAge` defaulting to 0 (can be string converted by `ms`) + * - `root` root directory for relative filenames + * - `headers` object of headers to serve with file + * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them + * + * Other options are passed along to `send`. + * + * Examples: + * + * The following example illustrates how `res.sendFile()` may + * be used as an alternative for the `static()` middleware for + * dynamic situations. The code backing `res.sendFile()` is actually + * the same code, so HTTP cache support etc is identical. + * + * app.get('/user/:uid/photos/:file', function(req, res){ + * var uid = req.params.uid + * , file = req.params.file; + * + * req.user.mayViewFilesFrom(uid, function(yes){ + * if (yes) { + * res.sendFile('/uploads/' + uid + '/' + file); + * } else { + * res.send(403, 'Sorry! you cant see that.'); + * } + * }); + * }); + * + * @public + */ + +res.sendFile = function sendFile(path, options, callback) { + var done = callback; + var req = this.req; + var res = this; + var next = req.next; + var opts = options || {}; + + if (!path) { + throw new TypeError('path argument is required to res.sendFile'); + } + + // support function as second arg + if (typeof options === 'function') { + done = options; + opts = {}; + } + + if (!opts.root && !isAbsolute(path)) { + throw new TypeError('path must be absolute or specify root to res.sendFile'); + } + + // create file stream + var pathname = encodeURI(path); + var file = send(req, pathname, opts); + + // transfer + sendfile(res, file, opts, function (err) { + if (done) return done(err); + if (err && err.code === 'EISDIR') return next(); + + // next() all but write errors + if (err && err.code !== 'ECONNABORTED' && err.syscall !== 'write') { + next(err); + } + }); +}; + +/** + * Transfer the file at the given `path`. + * + * Automatically sets the _Content-Type_ response header field. + * The callback `callback(err)` is invoked when the transfer is complete + * or when an error occurs. Be sure to check `res.sentHeader` + * if you wish to attempt responding, as the header and some data + * may have already been transferred. + * + * Options: + * + * - `maxAge` defaulting to 0 (can be string converted by `ms`) + * - `root` root directory for relative filenames + * - `headers` object of headers to serve with file + * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them + * + * Other options are passed along to `send`. + * + * Examples: + * + * The following example illustrates how `res.sendfile()` may + * be used as an alternative for the `static()` middleware for + * dynamic situations. The code backing `res.sendfile()` is actually + * the same code, so HTTP cache support etc is identical. + * + * app.get('/user/:uid/photos/:file', function(req, res){ + * var uid = req.params.uid + * , file = req.params.file; + * + * req.user.mayViewFilesFrom(uid, function(yes){ + * if (yes) { + * res.sendfile('/uploads/' + uid + '/' + file); + * } else { + * res.send(403, 'Sorry! you cant see that.'); + * } + * }); + * }); + * + * @public + */ + +res.sendfile = function (path, options, callback) { + var done = callback; + var req = this.req; + var res = this; + var next = req.next; + var opts = options || {}; + + // support function as second arg + if (typeof options === 'function') { + done = options; + opts = {}; + } + + // create file stream + var file = send(req, path, opts); + + // transfer + sendfile(res, file, opts, function (err) { + if (done) return done(err); + if (err && err.code === 'EISDIR') return next(); + + // next() all but write errors + if (err && err.code !== 'ECONNABORT' && err.syscall !== 'write') { + next(err); + } + }); +}; + +res.sendfile = deprecate.function(res.sendfile, + 'res.sendfile: Use res.sendFile instead'); + +/** + * Transfer the file at the given `path` as an attachment. + * + * Optionally providing an alternate attachment `filename`, + * and optional callback `callback(err)`. The callback is invoked + * when the data transfer is complete, or when an error has + * ocurred. Be sure to check `res.headersSent` if you plan to respond. + * + * Optionally providing an `options` object to use with `res.sendFile()`. + * This function will set the `Content-Disposition` header, overriding + * any `Content-Disposition` header passed as header options in order + * to set the attachment and filename. + * + * This method uses `res.sendFile()`. + * + * @public + */ + +res.download = function download (path, filename, options, callback) { + var done = callback; + var name = filename; + var opts = options || null + + // support function as second or third arg + if (typeof filename === 'function') { + done = filename; + name = null; + opts = null + } else if (typeof options === 'function') { + done = options + opts = null + } + + // set Content-Disposition when file is sent + var headers = { + 'Content-Disposition': contentDisposition(name || path) + }; + + // merge user-provided headers + if (opts && opts.headers) { + var keys = Object.keys(opts.headers) + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + if (key.toLowerCase() !== 'content-disposition') { + headers[key] = opts.headers[key] + } + } + } + + // merge user-provided options + opts = Object.create(opts) + opts.headers = headers + + // Resolve the full path for sendFile + var fullPath = resolve(path); + + // send file + return this.sendFile(fullPath, opts, done) +}; + +/** + * Set _Content-Type_ response header with `type` through `mime.lookup()` + * when it does not contain "/", or set the Content-Type to `type` otherwise. + * + * Examples: + * + * res.type('.html'); + * res.type('html'); + * res.type('json'); + * res.type('application/json'); + * res.type('png'); + * + * @param {String} type + * @return {ServerResponse} for chaining + * @public + */ + +res.contentType = +res.type = function contentType(type) { + var ct = type.indexOf('/') === -1 + ? mime.lookup(type) + : type; + + return this.set('Content-Type', ct); +}; + +/** + * Respond to the Acceptable formats using an `obj` + * of mime-type callbacks. + * + * This method uses `req.accepted`, an array of + * acceptable types ordered by their quality values. + * When "Accept" is not present the _first_ callback + * is invoked, otherwise the first match is used. When + * no match is performed the server responds with + * 406 "Not Acceptable". + * + * Content-Type is set for you, however if you choose + * you may alter this within the callback using `res.type()` + * or `res.set('Content-Type', ...)`. + * + * res.format({ + * 'text/plain': function(){ + * res.send('hey'); + * }, + * + * 'text/html': function(){ + * res.send('

hey

'); + * }, + * + * 'appliation/json': function(){ + * res.send({ message: 'hey' }); + * } + * }); + * + * In addition to canonicalized MIME types you may + * also use extnames mapped to these types: + * + * res.format({ + * text: function(){ + * res.send('hey'); + * }, + * + * html: function(){ + * res.send('

hey

'); + * }, + * + * json: function(){ + * res.send({ message: 'hey' }); + * } + * }); + * + * By default Express passes an `Error` + * with a `.status` of 406 to `next(err)` + * if a match is not made. If you provide + * a `.default` callback it will be invoked + * instead. + * + * @param {Object} obj + * @return {ServerResponse} for chaining + * @public + */ + +res.format = function(obj){ + var req = this.req; + var next = req.next; + + var fn = obj.default; + if (fn) delete obj.default; + var keys = Object.keys(obj); + + var key = keys.length > 0 + ? req.accepts(keys) + : false; + + this.vary("Accept"); + + if (key) { + this.set('Content-Type', normalizeType(key).value); + obj[key](req, this, next); + } else if (fn) { + fn(); + } else { + var err = new Error('Not Acceptable'); + err.status = err.statusCode = 406; + err.types = normalizeTypes(keys).map(function(o){ return o.value }); + next(err); + } + + return this; +}; + +/** + * Set _Content-Disposition_ header to _attachment_ with optional `filename`. + * + * @param {String} filename + * @return {ServerResponse} + * @public + */ + +res.attachment = function attachment(filename) { + if (filename) { + this.type(extname(filename)); + } + + this.set('Content-Disposition', contentDisposition(filename)); + + return this; +}; + +/** + * Append additional header `field` with value `val`. + * + * Example: + * + * res.append('Link', ['', '']); + * res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly'); + * res.append('Warning', '199 Miscellaneous warning'); + * + * @param {String} field + * @param {String|Array} val + * @return {ServerResponse} for chaining + * @public + */ + +res.append = function append(field, val) { + var prev = this.get(field); + var value = val; + + if (prev) { + // concat the new and prev vals + value = Array.isArray(prev) ? prev.concat(val) + : Array.isArray(val) ? [prev].concat(val) + : [prev, val]; + } + + return this.set(field, value); +}; + +/** + * Set header `field` to `val`, or pass + * an object of header fields. + * + * Examples: + * + * res.set('Foo', ['bar', 'baz']); + * res.set('Accept', 'application/json'); + * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); + * + * Aliased as `res.header()`. + * + * @param {String|Object} field + * @param {String|Array} val + * @return {ServerResponse} for chaining + * @public + */ + +res.set = +res.header = function header(field, val) { + if (arguments.length === 2) { + var value = Array.isArray(val) + ? val.map(String) + : String(val); + + // add charset to content-type + if (field.toLowerCase() === 'content-type') { + if (Array.isArray(value)) { + throw new TypeError('Content-Type cannot be set to an Array'); + } + if (!charsetRegExp.test(value)) { + var charset = mime.charsets.lookup(value.split(';')[0]); + if (charset) value += '; charset=' + charset.toLowerCase(); + } + } + + this.setHeader(field, value); + } else { + for (var key in field) { + this.set(key, field[key]); + } + } + return this; +}; + +/** + * Get value for header `field`. + * + * @param {String} field + * @return {String} + * @public + */ + +res.get = function(field){ + return this.getHeader(field); +}; + +/** + * Clear cookie `name`. + * + * @param {String} name + * @param {Object} [options] + * @return {ServerResponse} for chaining + * @public + */ + +res.clearCookie = function clearCookie(name, options) { + var opts = merge({ expires: new Date(1), path: '/' }, options); + + return this.cookie(name, '', opts); +}; + +/** + * Set cookie `name` to `value`, with the given `options`. + * + * Options: + * + * - `maxAge` max-age in milliseconds, converted to `expires` + * - `signed` sign the cookie + * - `path` defaults to "/" + * + * Examples: + * + * // "Remember Me" for 15 minutes + * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); + * + * // save as above + * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) + * + * @param {String} name + * @param {String|Object} value + * @param {Object} [options] + * @return {ServerResponse} for chaining + * @public + */ + +res.cookie = function (name, value, options) { + var opts = merge({}, options); + var secret = this.req.secret; + var signed = opts.signed; + + if (signed && !secret) { + throw new Error('cookieParser("secret") required for signed cookies'); + } + + var val = typeof value === 'object' + ? 'j:' + JSON.stringify(value) + : String(value); + + if (signed) { + val = 's:' + sign(val, secret); + } + + if ('maxAge' in opts) { + opts.expires = new Date(Date.now() + opts.maxAge); + opts.maxAge /= 1000; + } + + if (opts.path == null) { + opts.path = '/'; + } + + this.append('Set-Cookie', cookie.serialize(name, String(val), opts)); + + return this; +}; + +/** + * Set the location header to `url`. + * + * The given `url` can also be "back", which redirects + * to the _Referrer_ or _Referer_ headers or "/". + * + * Examples: + * + * res.location('/foo/bar').; + * res.location('http://example.com'); + * res.location('../login'); + * + * @param {String} url + * @return {ServerResponse} for chaining + * @public + */ + +res.location = function location(url) { + var loc = url; + + // "back" is an alias for the referrer + if (url === 'back') { + loc = this.req.get('Referrer') || '/'; + } + + // set location + return this.set('Location', encodeUrl(loc)); +}; + +/** + * Redirect to the given `url` with optional response `status` + * defaulting to 302. + * + * The resulting `url` is determined by `res.location()`, so + * it will play nicely with mounted apps, relative paths, + * `"back"` etc. + * + * Examples: + * + * res.redirect('/foo/bar'); + * res.redirect('http://example.com'); + * res.redirect(301, 'http://example.com'); + * res.redirect('../login'); // /blog/post/1 -> /blog/login + * + * @public + */ + +res.redirect = function redirect(url) { + var address = url; + var body; + var status = 302; + + // allow status / url + if (arguments.length === 2) { + if (typeof arguments[0] === 'number') { + status = arguments[0]; + address = arguments[1]; + } else { + deprecate('res.redirect(url, status): Use res.redirect(status, url) instead'); + status = arguments[1]; + } + } + + // Set location header + address = this.location(address).get('Location'); + + // Support text/{plain,html} by default + this.format({ + text: function(){ + body = statuses[status] + '. Redirecting to ' + address + }, + + html: function(){ + var u = escapeHtml(address); + body = '

' + statuses[status] + '. Redirecting to ' + u + '

' + }, + + default: function(){ + body = ''; + } + }); + + // Respond + this.statusCode = status; + this.set('Content-Length', Buffer.byteLength(body)); + + if (this.req.method === 'HEAD') { + this.end(); + } else { + this.end(body); + } +}; + +/** + * Add `field` to Vary. If already present in the Vary set, then + * this call is simply ignored. + * + * @param {Array|String} field + * @return {ServerResponse} for chaining + * @public + */ + +res.vary = function(field){ + // checks for back-compat + if (!field || (Array.isArray(field) && !field.length)) { + deprecate('res.vary(): Provide a field name'); + return this; + } + + vary(this, field); + + return this; +}; + +/** + * Render `view` with the given `options` and optional callback `fn`. + * When a callback function is given a response will _not_ be made + * automatically, otherwise a response of _200_ and _text/html_ is given. + * + * Options: + * + * - `cache` boolean hinting to the engine it should cache + * - `filename` filename of the view being rendered + * + * @public + */ + +res.render = function render(view, options, callback) { + var app = this.req.app; + var done = callback; + var opts = options || {}; + var req = this.req; + var self = this; + + // support callback function as second arg + if (typeof options === 'function') { + done = options; + opts = {}; + } + + // merge res.locals + opts._locals = self.locals; + + // default callback to respond + done = done || function (err, str) { + if (err) return req.next(err); + self.send(str); + }; + + // render + app.render(view, opts, done); +}; + +// pipe the send file stream +function sendfile(res, file, options, callback) { + var done = false; + var streaming; + + // request aborted + function onaborted() { + if (done) return; + done = true; + + var err = new Error('Request aborted'); + err.code = 'ECONNABORTED'; + callback(err); + } + + // directory + function ondirectory() { + if (done) return; + done = true; + + var err = new Error('EISDIR, read'); + err.code = 'EISDIR'; + callback(err); + } + + // errors + function onerror(err) { + if (done) return; + done = true; + callback(err); + } + + // ended + function onend() { + if (done) return; + done = true; + callback(); + } + + // file + function onfile() { + streaming = false; + } + + // finished + function onfinish(err) { + if (err && err.code === 'ECONNRESET') return onaborted(); + if (err) return onerror(err); + if (done) return; + + setImmediate(function () { + if (streaming !== false && !done) { + onaborted(); + return; + } + + if (done) return; + done = true; + callback(); + }); + } + + // streaming + function onstream() { + streaming = true; + } + + file.on('directory', ondirectory); + file.on('end', onend); + file.on('error', onerror); + file.on('file', onfile); + file.on('stream', onstream); + onFinished(res, onfinish); + + if (options.headers) { + // set headers on successful transfer + file.on('headers', function headers(res) { + var obj = options.headers; + var keys = Object.keys(obj); + + for (var i = 0; i < keys.length; i++) { + var k = keys[i]; + res.setHeader(k, obj[k]); + } + }); + } + + // pipe + file.pipe(res); +} + +/** + * Stringify JSON, like JSON.stringify, but v8 optimized, with the + * ability to escape characters that can trigger HTML sniffing. + * + * @param {*} value + * @param {function} replaces + * @param {number} spaces + * @param {boolean} escape + * @returns {string} + * @private + */ + +function stringify (value, replacer, spaces, escape) { + // v8 checks arguments.length for optimizing simple call + // https://bugs.chromium.org/p/v8/issues/detail?id=4730 + var json = replacer || spaces + ? JSON.stringify(value, replacer, spaces) + : JSON.stringify(value); + + if (escape) { + json = json.replace(/[<>&]/g, function (c) { + switch (c.charCodeAt(0)) { + case 0x3c: + return '\\u003c' + case 0x3e: + return '\\u003e' + case 0x26: + return '\\u0026' + default: + return c + } + }) + } + + return json +} diff --git a/node_modules/express/lib/router/index.js b/node_modules/express/lib/router/index.js new file mode 100644 index 0000000..60727ed --- /dev/null +++ b/node_modules/express/lib/router/index.js @@ -0,0 +1,662 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var Route = require('./route'); +var Layer = require('./layer'); +var methods = require('methods'); +var mixin = require('utils-merge'); +var debug = require('debug')('express:router'); +var deprecate = require('depd')('express'); +var flatten = require('array-flatten'); +var parseUrl = require('parseurl'); +var setPrototypeOf = require('setprototypeof') + +/** + * Module variables. + * @private + */ + +var objectRegExp = /^\[object (\S+)\]$/; +var slice = Array.prototype.slice; +var toString = Object.prototype.toString; + +/** + * Initialize a new `Router` with the given `options`. + * + * @param {Object} options + * @return {Router} which is an callable function + * @public + */ + +var proto = module.exports = function(options) { + var opts = options || {}; + + function router(req, res, next) { + router.handle(req, res, next); + } + + // mixin Router class functions + setPrototypeOf(router, proto) + + router.params = {}; + router._params = []; + router.caseSensitive = opts.caseSensitive; + router.mergeParams = opts.mergeParams; + router.strict = opts.strict; + router.stack = []; + + return router; +}; + +/** + * Map the given param placeholder `name`(s) to the given callback. + * + * Parameter mapping is used to provide pre-conditions to routes + * which use normalized placeholders. For example a _:user_id_ parameter + * could automatically load a user's information from the database without + * any additional code, + * + * The callback uses the same signature as middleware, the only difference + * being that the value of the placeholder is passed, in this case the _id_ + * of the user. Once the `next()` function is invoked, just like middleware + * it will continue on to execute the route, or subsequent parameter functions. + * + * Just like in middleware, you must either respond to the request or call next + * to avoid stalling the request. + * + * app.param('user_id', function(req, res, next, id){ + * User.find(id, function(err, user){ + * if (err) { + * return next(err); + * } else if (!user) { + * return next(new Error('failed to load user')); + * } + * req.user = user; + * next(); + * }); + * }); + * + * @param {String} name + * @param {Function} fn + * @return {app} for chaining + * @public + */ + +proto.param = function param(name, fn) { + // param logic + if (typeof name === 'function') { + deprecate('router.param(fn): Refactor to use path params'); + this._params.push(name); + return; + } + + // apply param functions + var params = this._params; + var len = params.length; + var ret; + + if (name[0] === ':') { + deprecate('router.param(' + JSON.stringify(name) + ', fn): Use router.param(' + JSON.stringify(name.substr(1)) + ', fn) instead'); + name = name.substr(1); + } + + for (var i = 0; i < len; ++i) { + if (ret = params[i](name, fn)) { + fn = ret; + } + } + + // ensure we end up with a + // middleware function + if ('function' !== typeof fn) { + throw new Error('invalid param() call for ' + name + ', got ' + fn); + } + + (this.params[name] = this.params[name] || []).push(fn); + return this; +}; + +/** + * Dispatch a req, res into the router. + * @private + */ + +proto.handle = function handle(req, res, out) { + var self = this; + + debug('dispatching %s %s', req.method, req.url); + + var idx = 0; + var protohost = getProtohost(req.url) || '' + var removed = ''; + var slashAdded = false; + var paramcalled = {}; + + // store options for OPTIONS request + // only used if OPTIONS request + var options = []; + + // middleware and routes + var stack = self.stack; + + // manage inter-router variables + var parentParams = req.params; + var parentUrl = req.baseUrl || ''; + var done = restore(out, req, 'baseUrl', 'next', 'params'); + + // setup next layer + req.next = next; + + // for options requests, respond with a default if nothing else responds + if (req.method === 'OPTIONS') { + done = wrap(done, function(old, err) { + if (err || options.length === 0) return old(err); + sendOptionsResponse(res, options, old); + }); + } + + // setup basic req values + req.baseUrl = parentUrl; + req.originalUrl = req.originalUrl || req.url; + + next(); + + function next(err) { + var layerError = err === 'route' + ? null + : err; + + // remove added slash + if (slashAdded) { + req.url = req.url.substr(1); + slashAdded = false; + } + + // restore altered req.url + if (removed.length !== 0) { + req.baseUrl = parentUrl; + req.url = protohost + removed + req.url.substr(protohost.length); + removed = ''; + } + + // signal to exit router + if (layerError === 'router') { + setImmediate(done, null) + return + } + + // no more matching layers + if (idx >= stack.length) { + setImmediate(done, layerError); + return; + } + + // get pathname of request + var path = getPathname(req); + + if (path == null) { + return done(layerError); + } + + // find next matching layer + var layer; + var match; + var route; + + while (match !== true && idx < stack.length) { + layer = stack[idx++]; + match = matchLayer(layer, path); + route = layer.route; + + if (typeof match !== 'boolean') { + // hold on to layerError + layerError = layerError || match; + } + + if (match !== true) { + continue; + } + + if (!route) { + // process non-route handlers normally + continue; + } + + if (layerError) { + // routes do not match with a pending error + match = false; + continue; + } + + var method = req.method; + var has_method = route._handles_method(method); + + // build up automatic options response + if (!has_method && method === 'OPTIONS') { + appendMethods(options, route._options()); + } + + // don't even bother matching route + if (!has_method && method !== 'HEAD') { + match = false; + continue; + } + } + + // no match + if (match !== true) { + return done(layerError); + } + + // store route for dispatch on change + if (route) { + req.route = route; + } + + // Capture one-time layer values + req.params = self.mergeParams + ? mergeParams(layer.params, parentParams) + : layer.params; + var layerPath = layer.path; + + // this should be done for the layer + self.process_params(layer, paramcalled, req, res, function (err) { + if (err) { + return next(layerError || err); + } + + if (route) { + return layer.handle_request(req, res, next); + } + + trim_prefix(layer, layerError, layerPath, path); + }); + } + + function trim_prefix(layer, layerError, layerPath, path) { + if (layerPath.length !== 0) { + // Validate path breaks on a path separator + var c = path[layerPath.length] + if (c && c !== '/' && c !== '.') return next(layerError) + + // Trim off the part of the url that matches the route + // middleware (.use stuff) needs to have the path stripped + debug('trim prefix (%s) from url %s', layerPath, req.url); + removed = layerPath; + req.url = protohost + req.url.substr(protohost.length + removed.length); + + // Ensure leading slash + if (!protohost && req.url[0] !== '/') { + req.url = '/' + req.url; + slashAdded = true; + } + + // Setup base URL (no trailing slash) + req.baseUrl = parentUrl + (removed[removed.length - 1] === '/' + ? removed.substring(0, removed.length - 1) + : removed); + } + + debug('%s %s : %s', layer.name, layerPath, req.originalUrl); + + if (layerError) { + layer.handle_error(layerError, req, res, next); + } else { + layer.handle_request(req, res, next); + } + } +}; + +/** + * Process any parameters for the layer. + * @private + */ + +proto.process_params = function process_params(layer, called, req, res, done) { + var params = this.params; + + // captured parameters from the layer, keys and values + var keys = layer.keys; + + // fast track + if (!keys || keys.length === 0) { + return done(); + } + + var i = 0; + var name; + var paramIndex = 0; + var key; + var paramVal; + var paramCallbacks; + var paramCalled; + + // process params in order + // param callbacks can be async + function param(err) { + if (err) { + return done(err); + } + + if (i >= keys.length ) { + return done(); + } + + paramIndex = 0; + key = keys[i++]; + name = key.name; + paramVal = req.params[name]; + paramCallbacks = params[name]; + paramCalled = called[name]; + + if (paramVal === undefined || !paramCallbacks) { + return param(); + } + + // param previously called with same value or error occurred + if (paramCalled && (paramCalled.match === paramVal + || (paramCalled.error && paramCalled.error !== 'route'))) { + // restore value + req.params[name] = paramCalled.value; + + // next param + return param(paramCalled.error); + } + + called[name] = paramCalled = { + error: null, + match: paramVal, + value: paramVal + }; + + paramCallback(); + } + + // single param callbacks + function paramCallback(err) { + var fn = paramCallbacks[paramIndex++]; + + // store updated value + paramCalled.value = req.params[key.name]; + + if (err) { + // store error + paramCalled.error = err; + param(err); + return; + } + + if (!fn) return param(); + + try { + fn(req, res, paramCallback, paramVal, key.name); + } catch (e) { + paramCallback(e); + } + } + + param(); +}; + +/** + * Use the given middleware function, with optional path, defaulting to "/". + * + * Use (like `.all`) will run for any http METHOD, but it will not add + * handlers for those methods so OPTIONS requests will not consider `.use` + * functions even if they could respond. + * + * The other difference is that _route_ path is stripped and not visible + * to the handler function. The main effect of this feature is that mounted + * handlers can operate without any code changes regardless of the "prefix" + * pathname. + * + * @public + */ + +proto.use = function use(fn) { + var offset = 0; + var path = '/'; + + // default path to '/' + // disambiguate router.use([fn]) + if (typeof fn !== 'function') { + var arg = fn; + + while (Array.isArray(arg) && arg.length !== 0) { + arg = arg[0]; + } + + // first arg is the path + if (typeof arg !== 'function') { + offset = 1; + path = fn; + } + } + + var callbacks = flatten(slice.call(arguments, offset)); + + if (callbacks.length === 0) { + throw new TypeError('Router.use() requires a middleware function') + } + + for (var i = 0; i < callbacks.length; i++) { + var fn = callbacks[i]; + + if (typeof fn !== 'function') { + throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn)) + } + + // add the middleware + debug('use %o %s', path, fn.name || '') + + var layer = new Layer(path, { + sensitive: this.caseSensitive, + strict: false, + end: false + }, fn); + + layer.route = undefined; + + this.stack.push(layer); + } + + return this; +}; + +/** + * Create a new Route for the given path. + * + * Each route contains a separate middleware stack and VERB handlers. + * + * See the Route api documentation for details on adding handlers + * and middleware to routes. + * + * @param {String} path + * @return {Route} + * @public + */ + +proto.route = function route(path) { + var route = new Route(path); + + var layer = new Layer(path, { + sensitive: this.caseSensitive, + strict: this.strict, + end: true + }, route.dispatch.bind(route)); + + layer.route = route; + + this.stack.push(layer); + return route; +}; + +// create Router#VERB functions +methods.concat('all').forEach(function(method){ + proto[method] = function(path){ + var route = this.route(path) + route[method].apply(route, slice.call(arguments, 1)); + return this; + }; +}); + +// append methods to a list of methods +function appendMethods(list, addition) { + for (var i = 0; i < addition.length; i++) { + var method = addition[i]; + if (list.indexOf(method) === -1) { + list.push(method); + } + } +} + +// get pathname of request +function getPathname(req) { + try { + return parseUrl(req).pathname; + } catch (err) { + return undefined; + } +} + +// Get get protocol + host for a URL +function getProtohost(url) { + if (typeof url !== 'string' || url.length === 0 || url[0] === '/') { + return undefined + } + + var searchIndex = url.indexOf('?') + var pathLength = searchIndex !== -1 + ? searchIndex + : url.length + var fqdnIndex = url.substr(0, pathLength).indexOf('://') + + return fqdnIndex !== -1 + ? url.substr(0, url.indexOf('/', 3 + fqdnIndex)) + : undefined +} + +// get type for error message +function gettype(obj) { + var type = typeof obj; + + if (type !== 'object') { + return type; + } + + // inspect [[Class]] for objects + return toString.call(obj) + .replace(objectRegExp, '$1'); +} + +/** + * Match path to a layer. + * + * @param {Layer} layer + * @param {string} path + * @private + */ + +function matchLayer(layer, path) { + try { + return layer.match(path); + } catch (err) { + return err; + } +} + +// merge params with parent params +function mergeParams(params, parent) { + if (typeof parent !== 'object' || !parent) { + return params; + } + + // make copy of parent for base + var obj = mixin({}, parent); + + // simple non-numeric merging + if (!(0 in params) || !(0 in parent)) { + return mixin(obj, params); + } + + var i = 0; + var o = 0; + + // determine numeric gaps + while (i in params) { + i++; + } + + while (o in parent) { + o++; + } + + // offset numeric indices in params before merge + for (i--; i >= 0; i--) { + params[i + o] = params[i]; + + // create holes for the merge when necessary + if (i < o) { + delete params[i]; + } + } + + return mixin(obj, params); +} + +// restore obj props after function +function restore(fn, obj) { + var props = new Array(arguments.length - 2); + var vals = new Array(arguments.length - 2); + + for (var i = 0; i < props.length; i++) { + props[i] = arguments[i + 2]; + vals[i] = obj[props[i]]; + } + + return function () { + // restore vals + for (var i = 0; i < props.length; i++) { + obj[props[i]] = vals[i]; + } + + return fn.apply(this, arguments); + }; +} + +// send an OPTIONS response +function sendOptionsResponse(res, options, next) { + try { + var body = options.join(','); + res.set('Allow', body); + res.send(body); + } catch (err) { + next(err); + } +} + +// wrap a function +function wrap(old, fn) { + return function proxy() { + var args = new Array(arguments.length + 1); + + args[0] = old; + for (var i = 0, len = arguments.length; i < len; i++) { + args[i + 1] = arguments[i]; + } + + fn.apply(this, args); + }; +} diff --git a/node_modules/express/lib/router/layer.js b/node_modules/express/lib/router/layer.js new file mode 100644 index 0000000..4dc8e86 --- /dev/null +++ b/node_modules/express/lib/router/layer.js @@ -0,0 +1,181 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var pathRegexp = require('path-to-regexp'); +var debug = require('debug')('express:router:layer'); + +/** + * Module variables. + * @private + */ + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Module exports. + * @public + */ + +module.exports = Layer; + +function Layer(path, options, fn) { + if (!(this instanceof Layer)) { + return new Layer(path, options, fn); + } + + debug('new %o', path) + var opts = options || {}; + + this.handle = fn; + this.name = fn.name || ''; + this.params = undefined; + this.path = undefined; + this.regexp = pathRegexp(path, this.keys = [], opts); + + // set fast path flags + this.regexp.fast_star = path === '*' + this.regexp.fast_slash = path === '/' && opts.end === false +} + +/** + * Handle the error for the layer. + * + * @param {Error} error + * @param {Request} req + * @param {Response} res + * @param {function} next + * @api private + */ + +Layer.prototype.handle_error = function handle_error(error, req, res, next) { + var fn = this.handle; + + if (fn.length !== 4) { + // not a standard error handler + return next(error); + } + + try { + fn(error, req, res, next); + } catch (err) { + next(err); + } +}; + +/** + * Handle the request for the layer. + * + * @param {Request} req + * @param {Response} res + * @param {function} next + * @api private + */ + +Layer.prototype.handle_request = function handle(req, res, next) { + var fn = this.handle; + + if (fn.length > 3) { + // not a standard request handler + return next(); + } + + try { + fn(req, res, next); + } catch (err) { + next(err); + } +}; + +/** + * Check if this route matches `path`, if so + * populate `.params`. + * + * @param {String} path + * @return {Boolean} + * @api private + */ + +Layer.prototype.match = function match(path) { + var match + + if (path != null) { + // fast path non-ending match for / (any path matches) + if (this.regexp.fast_slash) { + this.params = {} + this.path = '' + return true + } + + // fast path for * (everything matched in a param) + if (this.regexp.fast_star) { + this.params = {'0': decode_param(path)} + this.path = path + return true + } + + // match the path + match = this.regexp.exec(path) + } + + if (!match) { + this.params = undefined; + this.path = undefined; + return false; + } + + // store values + this.params = {}; + this.path = match[0] + + var keys = this.keys; + var params = this.params; + + for (var i = 1; i < match.length; i++) { + var key = keys[i - 1]; + var prop = key.name; + var val = decode_param(match[i]) + + if (val !== undefined || !(hasOwnProperty.call(params, prop))) { + params[prop] = val; + } + } + + return true; +}; + +/** + * Decode param value. + * + * @param {string} val + * @return {string} + * @private + */ + +function decode_param(val) { + if (typeof val !== 'string' || val.length === 0) { + return val; + } + + try { + return decodeURIComponent(val); + } catch (err) { + if (err instanceof URIError) { + err.message = 'Failed to decode param \'' + val + '\''; + err.status = err.statusCode = 400; + } + + throw err; + } +} diff --git a/node_modules/express/lib/router/route.js b/node_modules/express/lib/router/route.js new file mode 100644 index 0000000..178df0d --- /dev/null +++ b/node_modules/express/lib/router/route.js @@ -0,0 +1,216 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var debug = require('debug')('express:router:route'); +var flatten = require('array-flatten'); +var Layer = require('./layer'); +var methods = require('methods'); + +/** + * Module variables. + * @private + */ + +var slice = Array.prototype.slice; +var toString = Object.prototype.toString; + +/** + * Module exports. + * @public + */ + +module.exports = Route; + +/** + * Initialize `Route` with the given `path`, + * + * @param {String} path + * @public + */ + +function Route(path) { + this.path = path; + this.stack = []; + + debug('new %o', path) + + // route handlers for various http methods + this.methods = {}; +} + +/** + * Determine if the route handles a given method. + * @private + */ + +Route.prototype._handles_method = function _handles_method(method) { + if (this.methods._all) { + return true; + } + + var name = method.toLowerCase(); + + if (name === 'head' && !this.methods['head']) { + name = 'get'; + } + + return Boolean(this.methods[name]); +}; + +/** + * @return {Array} supported HTTP methods + * @private + */ + +Route.prototype._options = function _options() { + var methods = Object.keys(this.methods); + + // append automatic head + if (this.methods.get && !this.methods.head) { + methods.push('head'); + } + + for (var i = 0; i < methods.length; i++) { + // make upper case + methods[i] = methods[i].toUpperCase(); + } + + return methods; +}; + +/** + * dispatch req, res into this route + * @private + */ + +Route.prototype.dispatch = function dispatch(req, res, done) { + var idx = 0; + var stack = this.stack; + if (stack.length === 0) { + return done(); + } + + var method = req.method.toLowerCase(); + if (method === 'head' && !this.methods['head']) { + method = 'get'; + } + + req.route = this; + + next(); + + function next(err) { + // signal to exit route + if (err && err === 'route') { + return done(); + } + + // signal to exit router + if (err && err === 'router') { + return done(err) + } + + var layer = stack[idx++]; + if (!layer) { + return done(err); + } + + if (layer.method && layer.method !== method) { + return next(err); + } + + if (err) { + layer.handle_error(err, req, res, next); + } else { + layer.handle_request(req, res, next); + } + } +}; + +/** + * Add a handler for all HTTP verbs to this route. + * + * Behaves just like middleware and can respond or call `next` + * to continue processing. + * + * You can use multiple `.all` call to add multiple handlers. + * + * function check_something(req, res, next){ + * next(); + * }; + * + * function validate_user(req, res, next){ + * next(); + * }; + * + * route + * .all(validate_user) + * .all(check_something) + * .get(function(req, res, next){ + * res.send('hello world'); + * }); + * + * @param {function} handler + * @return {Route} for chaining + * @api public + */ + +Route.prototype.all = function all() { + var handles = flatten(slice.call(arguments)); + + for (var i = 0; i < handles.length; i++) { + var handle = handles[i]; + + if (typeof handle !== 'function') { + var type = toString.call(handle); + var msg = 'Route.all() requires a callback function but got a ' + type + throw new TypeError(msg); + } + + var layer = Layer('/', {}, handle); + layer.method = undefined; + + this.methods._all = true; + this.stack.push(layer); + } + + return this; +}; + +methods.forEach(function(method){ + Route.prototype[method] = function(){ + var handles = flatten(slice.call(arguments)); + + for (var i = 0; i < handles.length; i++) { + var handle = handles[i]; + + if (typeof handle !== 'function') { + var type = toString.call(handle); + var msg = 'Route.' + method + '() requires a callback function but got a ' + type + throw new Error(msg); + } + + debug('%s %o', method, this.path) + + var layer = Layer('/', {}, handle); + layer.method = method; + + this.methods[method] = true; + this.stack.push(layer); + } + + return this; + }; +}); diff --git a/node_modules/express/lib/utils.js b/node_modules/express/lib/utils.js new file mode 100644 index 0000000..bd81ac7 --- /dev/null +++ b/node_modules/express/lib/utils.js @@ -0,0 +1,306 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @api private + */ + +var Buffer = require('safe-buffer').Buffer +var contentDisposition = require('content-disposition'); +var contentType = require('content-type'); +var deprecate = require('depd')('express'); +var flatten = require('array-flatten'); +var mime = require('send').mime; +var etag = require('etag'); +var proxyaddr = require('proxy-addr'); +var qs = require('qs'); +var querystring = require('querystring'); + +/** + * Return strong ETag for `body`. + * + * @param {String|Buffer} body + * @param {String} [encoding] + * @return {String} + * @api private + */ + +exports.etag = createETagGenerator({ weak: false }) + +/** + * Return weak ETag for `body`. + * + * @param {String|Buffer} body + * @param {String} [encoding] + * @return {String} + * @api private + */ + +exports.wetag = createETagGenerator({ weak: true }) + +/** + * Check if `path` looks absolute. + * + * @param {String} path + * @return {Boolean} + * @api private + */ + +exports.isAbsolute = function(path){ + if ('/' === path[0]) return true; + if (':' === path[1] && ('\\' === path[2] || '/' === path[2])) return true; // Windows device path + if ('\\\\' === path.substring(0, 2)) return true; // Microsoft Azure absolute path +}; + +/** + * Flatten the given `arr`. + * + * @param {Array} arr + * @return {Array} + * @api private + */ + +exports.flatten = deprecate.function(flatten, + 'utils.flatten: use array-flatten npm module instead'); + +/** + * Normalize the given `type`, for example "html" becomes "text/html". + * + * @param {String} type + * @return {Object} + * @api private + */ + +exports.normalizeType = function(type){ + return ~type.indexOf('/') + ? acceptParams(type) + : { value: mime.lookup(type), params: {} }; +}; + +/** + * Normalize `types`, for example "html" becomes "text/html". + * + * @param {Array} types + * @return {Array} + * @api private + */ + +exports.normalizeTypes = function(types){ + var ret = []; + + for (var i = 0; i < types.length; ++i) { + ret.push(exports.normalizeType(types[i])); + } + + return ret; +}; + +/** + * Generate Content-Disposition header appropriate for the filename. + * non-ascii filenames are urlencoded and a filename* parameter is added + * + * @param {String} filename + * @return {String} + * @api private + */ + +exports.contentDisposition = deprecate.function(contentDisposition, + 'utils.contentDisposition: use content-disposition npm module instead'); + +/** + * Parse accept params `str` returning an + * object with `.value`, `.quality` and `.params`. + * also includes `.originalIndex` for stable sorting + * + * @param {String} str + * @return {Object} + * @api private + */ + +function acceptParams(str, index) { + var parts = str.split(/ *; */); + var ret = { value: parts[0], quality: 1, params: {}, originalIndex: index }; + + for (var i = 1; i < parts.length; ++i) { + var pms = parts[i].split(/ *= */); + if ('q' === pms[0]) { + ret.quality = parseFloat(pms[1]); + } else { + ret.params[pms[0]] = pms[1]; + } + } + + return ret; +} + +/** + * Compile "etag" value to function. + * + * @param {Boolean|String|Function} val + * @return {Function} + * @api private + */ + +exports.compileETag = function(val) { + var fn; + + if (typeof val === 'function') { + return val; + } + + switch (val) { + case true: + fn = exports.wetag; + break; + case false: + break; + case 'strong': + fn = exports.etag; + break; + case 'weak': + fn = exports.wetag; + break; + default: + throw new TypeError('unknown value for etag function: ' + val); + } + + return fn; +} + +/** + * Compile "query parser" value to function. + * + * @param {String|Function} val + * @return {Function} + * @api private + */ + +exports.compileQueryParser = function compileQueryParser(val) { + var fn; + + if (typeof val === 'function') { + return val; + } + + switch (val) { + case true: + fn = querystring.parse; + break; + case false: + fn = newObject; + break; + case 'extended': + fn = parseExtendedQueryString; + break; + case 'simple': + fn = querystring.parse; + break; + default: + throw new TypeError('unknown value for query parser function: ' + val); + } + + return fn; +} + +/** + * Compile "proxy trust" value to function. + * + * @param {Boolean|String|Number|Array|Function} val + * @return {Function} + * @api private + */ + +exports.compileTrust = function(val) { + if (typeof val === 'function') return val; + + if (val === true) { + // Support plain true/false + return function(){ return true }; + } + + if (typeof val === 'number') { + // Support trusting hop count + return function(a, i){ return i < val }; + } + + if (typeof val === 'string') { + // Support comma-separated values + val = val.split(/ *, */); + } + + return proxyaddr.compile(val || []); +} + +/** + * Set the charset in a given Content-Type string. + * + * @param {String} type + * @param {String} charset + * @return {String} + * @api private + */ + +exports.setCharset = function setCharset(type, charset) { + if (!type || !charset) { + return type; + } + + // parse type + var parsed = contentType.parse(type); + + // set charset + parsed.parameters.charset = charset; + + // format type + return contentType.format(parsed); +}; + +/** + * Create an ETag generator function, generating ETags with + * the given options. + * + * @param {object} options + * @return {function} + * @private + */ + +function createETagGenerator (options) { + return function generateETag (body, encoding) { + var buf = !Buffer.isBuffer(body) + ? Buffer.from(body, encoding) + : body + + return etag(buf, options) + } +} + +/** + * Parse an extended query string with qs. + * + * @return {Object} + * @private + */ + +function parseExtendedQueryString(str) { + return qs.parse(str, { + allowPrototypes: true + }); +} + +/** + * Return new empty object. + * + * @return {Object} + * @api private + */ + +function newObject() { + return {}; +} diff --git a/node_modules/express/lib/view.js b/node_modules/express/lib/view.js new file mode 100644 index 0000000..cf101ca --- /dev/null +++ b/node_modules/express/lib/view.js @@ -0,0 +1,182 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var debug = require('debug')('express:view'); +var path = require('path'); +var fs = require('fs'); + +/** + * Module variables. + * @private + */ + +var dirname = path.dirname; +var basename = path.basename; +var extname = path.extname; +var join = path.join; +var resolve = path.resolve; + +/** + * Module exports. + * @public + */ + +module.exports = View; + +/** + * Initialize a new `View` with the given `name`. + * + * Options: + * + * - `defaultEngine` the default template engine name + * - `engines` template engine require() cache + * - `root` root path for view lookup + * + * @param {string} name + * @param {object} options + * @public + */ + +function View(name, options) { + var opts = options || {}; + + this.defaultEngine = opts.defaultEngine; + this.ext = extname(name); + this.name = name; + this.root = opts.root; + + if (!this.ext && !this.defaultEngine) { + throw new Error('No default engine was specified and no extension was provided.'); + } + + var fileName = name; + + if (!this.ext) { + // get extension from default engine name + this.ext = this.defaultEngine[0] !== '.' + ? '.' + this.defaultEngine + : this.defaultEngine; + + fileName += this.ext; + } + + if (!opts.engines[this.ext]) { + // load engine + var mod = this.ext.substr(1) + debug('require "%s"', mod) + + // default engine export + var fn = require(mod).__express + + if (typeof fn !== 'function') { + throw new Error('Module "' + mod + '" does not provide a view engine.') + } + + opts.engines[this.ext] = fn + } + + // store loaded engine + this.engine = opts.engines[this.ext]; + + // lookup path + this.path = this.lookup(fileName); +} + +/** + * Lookup view by the given `name` + * + * @param {string} name + * @private + */ + +View.prototype.lookup = function lookup(name) { + var path; + var roots = [].concat(this.root); + + debug('lookup "%s"', name); + + for (var i = 0; i < roots.length && !path; i++) { + var root = roots[i]; + + // resolve the path + var loc = resolve(root, name); + var dir = dirname(loc); + var file = basename(loc); + + // resolve the file + path = this.resolve(dir, file); + } + + return path; +}; + +/** + * Render with the given options. + * + * @param {object} options + * @param {function} callback + * @private + */ + +View.prototype.render = function render(options, callback) { + debug('render "%s"', this.path); + this.engine(this.path, options, callback); +}; + +/** + * Resolve the file within the given directory. + * + * @param {string} dir + * @param {string} file + * @private + */ + +View.prototype.resolve = function resolve(dir, file) { + var ext = this.ext; + + // . + var path = join(dir, file); + var stat = tryStat(path); + + if (stat && stat.isFile()) { + return path; + } + + // /index. + path = join(dir, basename(file, ext), 'index' + ext); + stat = tryStat(path); + + if (stat && stat.isFile()) { + return path; + } +}; + +/** + * Return a stat, maybe. + * + * @param {string} path + * @return {fs.Stats} + * @private + */ + +function tryStat(path) { + debug('stat "%s"', path); + + try { + return fs.statSync(path); + } catch (e) { + return undefined; + } +} diff --git a/node_modules/express/node_modules/setprototypeof/LICENSE b/node_modules/express/node_modules/setprototypeof/LICENSE new file mode 100644 index 0000000..61afa2f --- /dev/null +++ b/node_modules/express/node_modules/setprototypeof/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Wes Todd + +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/node_modules/express/node_modules/setprototypeof/README.md b/node_modules/express/node_modules/setprototypeof/README.md new file mode 100644 index 0000000..826bf02 --- /dev/null +++ b/node_modules/express/node_modules/setprototypeof/README.md @@ -0,0 +1,26 @@ +# Polyfill for `Object.setPrototypeOf` + +A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. + +## Usage: + +``` +$ npm install --save setprototypeof +``` + +```javascript +var setPrototypeOf = require('setprototypeof'); + +var obj = {}; +setPrototypeOf(obj, { + foo: function() { + return 'bar'; + } +}); +obj.foo(); // bar +``` + +TypeScript is also supported: +```typescript +import setPrototypeOf = require('setprototypeof'); +``` \ No newline at end of file diff --git a/node_modules/express/node_modules/setprototypeof/index.d.ts b/node_modules/express/node_modules/setprototypeof/index.d.ts new file mode 100644 index 0000000..f108ecd --- /dev/null +++ b/node_modules/express/node_modules/setprototypeof/index.d.ts @@ -0,0 +1,2 @@ +declare function setPrototypeOf(o: any, proto: object | null): any; +export = setPrototypeOf; diff --git a/node_modules/express/node_modules/setprototypeof/index.js b/node_modules/express/node_modules/setprototypeof/index.js new file mode 100644 index 0000000..93ea417 --- /dev/null +++ b/node_modules/express/node_modules/setprototypeof/index.js @@ -0,0 +1,15 @@ +module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties); + +function setProtoOf(obj, proto) { + obj.__proto__ = proto; + return obj; +} + +function mixinProperties(obj, proto) { + for (var prop in proto) { + if (!obj.hasOwnProperty(prop)) { + obj[prop] = proto[prop]; + } + } + return obj; +} diff --git a/node_modules/express/node_modules/setprototypeof/package.json b/node_modules/express/node_modules/setprototypeof/package.json new file mode 100644 index 0000000..b11d6c1 --- /dev/null +++ b/node_modules/express/node_modules/setprototypeof/package.json @@ -0,0 +1,55 @@ +{ + "_args": [ + [ + "setprototypeof@1.1.0", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "setprototypeof@1.1.0", + "_id": "setprototypeof@1.1.0", + "_inBundle": false, + "_integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "_location": "/express/setprototypeof", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "setprototypeof@1.1.0", + "name": "setprototypeof", + "escapedName": "setprototypeof", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Wes Todd" + }, + "bugs": { + "url": "https://github.com/wesleytodd/setprototypeof/issues" + }, + "description": "A small polyfill for Object.setprototypeof", + "homepage": "https://github.com/wesleytodd/setprototypeof", + "keywords": [ + "polyfill", + "object", + "setprototypeof" + ], + "license": "ISC", + "main": "index.js", + "name": "setprototypeof", + "repository": { + "type": "git", + "url": "git+https://github.com/wesleytodd/setprototypeof.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "typings": "index.d.ts", + "version": "1.1.0" +} diff --git a/node_modules/express/node_modules/statuses/HISTORY.md b/node_modules/express/node_modules/statuses/HISTORY.md new file mode 100644 index 0000000..3015a5f --- /dev/null +++ b/node_modules/express/node_modules/statuses/HISTORY.md @@ -0,0 +1,55 @@ +1.3.1 / 2016-11-11 +================== + + * Fix return type in JSDoc + +1.3.0 / 2016-05-17 +================== + + * Add `421 Misdirected Request` + * perf: enable strict mode + +1.2.1 / 2015-02-01 +================== + + * Fix message for status 451 + - `451 Unavailable For Legal Reasons` + +1.2.0 / 2014-09-28 +================== + + * Add `208 Already Repored` + * Add `226 IM Used` + * Add `306 (Unused)` + * Add `415 Unable For Legal Reasons` + * Add `508 Loop Detected` + +1.1.1 / 2014-09-24 +================== + + * Add missing 308 to `codes.json` + +1.1.0 / 2014-09-21 +================== + + * Add `codes.json` for universal support + +1.0.4 / 2014-08-20 +================== + + * Package cleanup + +1.0.3 / 2014-06-08 +================== + + * Add 308 to `.redirect` category + +1.0.2 / 2014-03-13 +================== + + * Add `.retry` category + +1.0.1 / 2014-03-12 +================== + + * Initial release diff --git a/node_modules/express/node_modules/statuses/LICENSE b/node_modules/express/node_modules/statuses/LICENSE new file mode 100644 index 0000000..82af4df --- /dev/null +++ b/node_modules/express/node_modules/statuses/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.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/node_modules/express/node_modules/statuses/README.md b/node_modules/express/node_modules/statuses/README.md new file mode 100644 index 0000000..2bf0756 --- /dev/null +++ b/node_modules/express/node_modules/statuses/README.md @@ -0,0 +1,103 @@ +# Statuses + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP status utility for node. + +## API + +```js +var status = require('statuses') +``` + +### var code = status(Integer || String) + +If `Integer` or `String` is a valid HTTP code or status message, then the appropriate `code` will be returned. Otherwise, an error will be thrown. + +```js +status(403) // => 403 +status('403') // => 403 +status('forbidden') // => 403 +status('Forbidden') // => 403 +status(306) // throws, as it's not supported by node.js +``` + +### status.codes + +Returns an array of all the status codes as `Integer`s. + +### var msg = status[code] + +Map of `code` to `status message`. `undefined` for invalid `code`s. + +```js +status[404] // => 'Not Found' +``` + +### var code = status[msg] + +Map of `status message` to `code`. `msg` can either be title-cased or lower-cased. `undefined` for invalid `status message`s. + +```js +status['not found'] // => 404 +status['Not Found'] // => 404 +``` + +### status.redirect[code] + +Returns `true` if a status code is a valid redirect status. + +```js +status.redirect[200] // => undefined +status.redirect[301] // => true +``` + +### status.empty[code] + +Returns `true` if a status code expects an empty body. + +```js +status.empty[200] // => undefined +status.empty[204] // => true +status.empty[304] // => true +``` + +### status.retry[code] + +Returns `true` if you should retry the rest. + +```js +status.retry[501] // => undefined +status.retry[503] // => true +``` + +## Adding Status Codes + +The status codes are primarily sourced from http://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv. +Additionally, custom codes are added from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes. +These are added manually in the `lib/*.json` files. +If you would like to add a status code, add it to the appropriate JSON file. + +To rebuild `codes.json`, run the following: + +```bash +# update src/iana.json +npm run fetch +# build codes.json +npm run build +``` + +[npm-image]: https://img.shields.io/npm/v/statuses.svg +[npm-url]: https://npmjs.org/package/statuses +[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg +[travis-url]: https://travis-ci.org/jshttp/statuses +[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg +[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master +[downloads-image]: https://img.shields.io/npm/dm/statuses.svg +[downloads-url]: https://npmjs.org/package/statuses diff --git a/node_modules/express/node_modules/statuses/codes.json b/node_modules/express/node_modules/statuses/codes.json new file mode 100644 index 0000000..e765123 --- /dev/null +++ b/node_modules/express/node_modules/statuses/codes.json @@ -0,0 +1,65 @@ +{ + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "306": "(Unused)", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} \ No newline at end of file diff --git a/node_modules/express/node_modules/statuses/index.js b/node_modules/express/node_modules/statuses/index.js new file mode 100644 index 0000000..9f955c6 --- /dev/null +++ b/node_modules/express/node_modules/statuses/index.js @@ -0,0 +1,110 @@ +/*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var codes = require('./codes.json') + +/** + * Module exports. + * @public + */ + +module.exports = status + +// array of status codes +status.codes = populateStatusesMap(status, codes) + +// status codes for redirects +status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true +} + +// status codes for empty bodies +status.empty = { + 204: true, + 205: true, + 304: true +} + +// status codes for when you should retry the request +status.retry = { + 502: true, + 503: true, + 504: true +} + +/** + * Populate the statuses map for given codes. + * @private + */ + +function populateStatusesMap (statuses, codes) { + var arr = [] + + Object.keys(codes).forEach(function forEachCode (code) { + var message = codes[code] + var status = Number(code) + + // Populate properties + statuses[status] = message + statuses[message] = status + statuses[message.toLowerCase()] = status + + // Add to array + arr.push(status) + }) + + return arr +} + +/** + * Get the status code. + * + * Given a number, this will throw if it is not a known status + * code, otherwise the code will be returned. Given a string, + * the string will be parsed for a number and return the code + * if valid, otherwise will lookup the code assuming this is + * the status message. + * + * @param {string|number} code + * @returns {number} + * @public + */ + +function status (code) { + if (typeof code === 'number') { + if (!status[code]) throw new Error('invalid status code: ' + code) + return code + } + + if (typeof code !== 'string') { + throw new TypeError('code must be a number or string') + } + + // '403' + var n = parseInt(code, 10) + if (!isNaN(n)) { + if (!status[n]) throw new Error('invalid status code: ' + n) + return n + } + + n = status[code.toLowerCase()] + if (!n) throw new Error('invalid status message: "' + code + '"') + return n +} diff --git a/node_modules/express/node_modules/statuses/package.json b/node_modules/express/node_modules/statuses/package.json new file mode 100644 index 0000000..25c6d2b --- /dev/null +++ b/node_modules/express/node_modules/statuses/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "statuses@1.3.1", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "statuses@1.3.1", + "_id": "statuses@1.3.1", + "_inBundle": false, + "_integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "_location": "/express/statuses", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "statuses@1.3.1", + "name": "statuses", + "escapedName": "statuses", + "rawSpec": "1.3.1", + "saveSpec": null, + "fetchSpec": "1.3.1" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "_spec": "1.3.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/jshttp/statuses/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "description": "HTTP status utility", + "devDependencies": { + "csv-parse": "1.1.7", + "eslint": "3.10.0", + "eslint-config-standard": "6.2.1", + "eslint-plugin-promise": "3.3.2", + "eslint-plugin-standard": "2.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5", + "stream-to-array": "2.3.0" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "index.js", + "codes.json", + "LICENSE" + ], + "homepage": "https://github.com/jshttp/statuses#readme", + "keywords": [ + "http", + "status", + "code" + ], + "license": "MIT", + "name": "statuses", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/statuses.git" + }, + "scripts": { + "build": "node scripts/build.js", + "fetch": "node scripts/fetch.js", + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "update": "npm run fetch && npm run build" + }, + "version": "1.3.1" +} diff --git a/node_modules/express/package.json b/node_modules/express/package.json new file mode 100644 index 0000000..91ba0c2 --- /dev/null +++ b/node_modules/express/package.json @@ -0,0 +1,156 @@ +{ + "_args": [ + [ + "express@4.16.2", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "express@4.16.2", + "_id": "express@4.16.2", + "_inBundle": false, + "_integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=", + "_location": "/express", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "express@4.16.2", + "name": "express", + "escapedName": "express", + "rawSpec": "4.16.2", + "saveSpec": null, + "fetchSpec": "4.16.2" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", + "_spec": "4.16.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "bugs": { + "url": "https://github.com/expressjs/express/issues" + }, + "contributors": [ + { + "name": "Aaron Heckmann", + "email": "aaron.heckmann+github@gmail.com" + }, + { + "name": "Ciaran Jessup", + "email": "ciaranj@gmail.com" + }, + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Guillermo Rauch", + "email": "rauchg@gmail.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com" + }, + { + "name": "Roman Shtylman", + "email": "shtylman+expressjs@gmail.com" + }, + { + "name": "Young Jae Sim", + "email": "hanul@hanul.me" + } + ], + "dependencies": { + "accepts": "~1.3.4", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.1", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.0", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.2", + "qs": "6.5.1", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.1", + "serve-static": "1.13.1", + "setprototypeof": "1.1.0", + "statuses": "~1.3.1", + "type-is": "~1.6.15", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "description": "Fast, unopinionated, minimalist web framework", + "devDependencies": { + "after": "0.8.2", + "connect-redis": "~2.4.1", + "cookie-parser": "~1.4.3", + "cookie-session": "1.3.2", + "ejs": "2.5.7", + "eslint": "2.13.1", + "express-session": "1.15.6", + "hbs": "4.0.1", + "istanbul": "0.4.5", + "marked": "0.3.6", + "method-override": "2.3.10", + "mocha": "3.5.3", + "morgan": "1.9.0", + "multiparty": "4.1.3", + "pbkdf2-password": "1.2.1", + "should": "13.1.0", + "supertest": "1.2.0", + "vhost": "~3.0.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "files": [ + "LICENSE", + "History.md", + "Readme.md", + "index.js", + "lib/" + ], + "homepage": "http://expressjs.com/", + "keywords": [ + "express", + "framework", + "sinatra", + "web", + "rest", + "restful", + "router", + "app", + "api" + ], + "license": "MIT", + "name": "express", + "repository": { + "type": "git", + "url": "git+https://github.com/expressjs/express.git" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --require test/support/env --reporter spec --bail --check-leaks --no-exit test/ test/acceptance/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks --no-exit test/ test/acceptance/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks --no-exit test/ test/acceptance/", + "test-tap": "mocha --require test/support/env --reporter tap --check-leaks --no-exit test/ test/acceptance/" + }, + "version": "4.16.2" +} diff --git a/node_modules/extend-shallow/LICENSE b/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..99c9369 --- /dev/null +++ b/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert. + +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/node_modules/extend-shallow/README.md b/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..dee226f --- /dev/null +++ b/node_modules/extend-shallow/README.md @@ -0,0 +1,97 @@ +# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extend-shallow +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [pdehaan](https://github.com/pdehaan) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/extend-shallow/index.js b/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..c9582f8 --- /dev/null +++ b/node_modules/extend-shallow/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var isExtendable = require('is-extendable'); +var assignSymbols = require('assign-symbols'); + +module.exports = Object.assign || function(obj/*, objects*/) { + if (obj === null || typeof obj === 'undefined') { + throw new TypeError('Cannot convert undefined or null to object'); + } + if (!isObject(obj)) { + obj = {}; + } + for (var i = 1; i < arguments.length; i++) { + var val = arguments[i]; + if (isString(val)) { + val = toObject(val); + } + if (isObject(val)) { + assign(obj, val); + assignSymbols(obj, val); + } + } + return obj; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +function isString(val) { + return (val && typeof val === 'string'); +} + +function toObject(str) { + var obj = {}; + for (var i in str) { + obj[i] = str[i]; + } + return obj; +} + +function isObject(val) { + return (val && typeof val === 'object') || isExtendable(val); +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +function isEnum(obj, key) { + return Object.prototype.propertyIsEnumerable.call(obj, key); +} diff --git a/node_modules/extend-shallow/node_modules/is-extendable/LICENSE b/node_modules/extend-shallow/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/extend-shallow/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/extend-shallow/node_modules/is-extendable/README.md b/node_modules/extend-shallow/node_modules/is-extendable/README.md new file mode 100644 index 0000000..875b56a --- /dev/null +++ b/node_modules/extend-shallow/node_modules/is-extendable/README.md @@ -0,0 +1,88 @@ +# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable) + +> Returns true if a value is a plain object, array or function. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extendable +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* array +* plain object +* function + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is a plain object, function or array + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Release history + +### v1.0.0 - 2017/07/20 + +**Breaking changes** + +* No longer considers date, regex or error objects to be extendable + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 20, 2017._ \ No newline at end of file diff --git a/node_modules/extend-shallow/node_modules/is-extendable/index.d.ts b/node_modules/extend-shallow/node_modules/is-extendable/index.d.ts new file mode 100644 index 0000000..b96d507 --- /dev/null +++ b/node_modules/extend-shallow/node_modules/is-extendable/index.d.ts @@ -0,0 +1,5 @@ +export = isExtendable; + +declare function isExtendable(val: any): boolean; + +declare namespace isExtendable {} diff --git a/node_modules/extend-shallow/node_modules/is-extendable/index.js b/node_modules/extend-shallow/node_modules/is-extendable/index.js new file mode 100644 index 0000000..a8b26ad --- /dev/null +++ b/node_modules/extend-shallow/node_modules/is-extendable/index.js @@ -0,0 +1,14 @@ +/*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isPlainObject = require('is-plain-object'); + +module.exports = function isExtendable(val) { + return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); +}; diff --git a/node_modules/extend-shallow/node_modules/is-extendable/package.json b/node_modules/extend-shallow/node_modules/is-extendable/package.json new file mode 100644 index 0000000..0c84de0 --- /dev/null +++ b/node_modules/extend-shallow/node_modules/is-extendable/package.json @@ -0,0 +1,98 @@ +{ + "_from": "is-extendable@^1.0.1", + "_id": "is-extendable@1.0.1", + "_inBundle": false, + "_integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "_location": "/extend-shallow/is-extendable", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-extendable@^1.0.1", + "name": "is-extendable", + "escapedName": "is-extendable", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/extend-shallow" + ], + "_resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "_shasum": "a7470f9e426733d81bd81e1155264e3a3507cab4", + "_spec": "is-extendable@^1.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/extend-shallow", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "deprecated": false, + "description": "Returns true if a value is a plain object, array or function.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/jonschlinkert/is-extendable", + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extendable", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "license": "MIT", + "main": "index.js", + "name": "is-extendable", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extendable.git" + }, + "scripts": { + "test": "mocha" + }, + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "assign-deep", + "is-equal-shallow", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.1" +} diff --git a/node_modules/extend-shallow/package.json b/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..e176f9d --- /dev/null +++ b/node_modules/extend-shallow/package.json @@ -0,0 +1,126 @@ +{ + "_from": "extend-shallow@^3.0.2", + "_id": "extend-shallow@3.0.2", + "_inBundle": false, + "_integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "_location": "/extend-shallow", + "_phantomChildren": { + "is-plain-object": "2.0.4" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "extend-shallow@^3.0.2", + "name": "extend-shallow", + "escapedName": "extend-shallow", + "rawSpec": "^3.0.2", + "saveSpec": null, + "fetchSpec": "^3.0.2" + }, + "_requiredBy": [ + "/micromatch", + "/nanomatch", + "/regex-not", + "/split-string", + "/to-regex" + ], + "_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "_shasum": "26a71aaf073b39fb2127172746131c2704028db8", + "_spec": "extend-shallow@^3.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "deprecated": false, + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "devDependencies": { + "array-slice": "^1.0.0", + "benchmarked": "^2.0.0", + "for-own": "^1.0.0", + "gulp-format-md": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.1", + "minimist": "^1.2.0", + "mocha": "^3.5.3", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "keywords": [ + "assign", + "clone", + "extend", + "merge", + "obj", + "object", + "object-assign", + "object.assign", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "extend-shallow", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/extend-shallow.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "extend-shallow", + "for-in", + "for-own", + "is-plain-object", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "3.0.2" +} diff --git a/node_modules/extglob/LICENSE b/node_modules/extglob/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/extglob/README.md b/node_modules/extglob/README.md new file mode 100644 index 0000000..3255ea2 --- /dev/null +++ b/node_modules/extglob/README.md @@ -0,0 +1,362 @@ +# extglob [![NPM version](https://img.shields.io/npm/v/extglob.svg?style=flat)](https://www.npmjs.com/package/extglob) [![NPM monthly downloads](https://img.shields.io/npm/dm/extglob.svg?style=flat)](https://npmjs.org/package/extglob) [![NPM total downloads](https://img.shields.io/npm/dt/extglob.svg?style=flat)](https://npmjs.org/package/extglob) [![Linux Build Status](https://img.shields.io/travis/micromatch/extglob.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/extglob) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/extglob.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/extglob) + +> Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save extglob +``` + +* Convert an extglob string to a regex-compatible string. +* More complete (and correct) support than [minimatch](https://github.com/isaacs/minimatch) (minimatch fails a large percentage of the extglob tests) +* Handles [negation patterns](#extglob-patterns) +* Handles [nested patterns](#extglob-patterns) +* Organized code base, easy to maintain and make changes when edge cases arise +* As you can see by the [benchmarks](#benchmarks), extglob doesn't pay with speed for it's completeness, accuracy and quality. + +**Heads up!**: This library only supports extglobs, to handle full glob patterns and other extended globbing features use [micromatch](https://github.com/jonschlinkert/micromatch) instead. + +## Usage + +The main export is a function that takes a string and options, and returns an object with the parsed AST and the compiled `.output`, which is a regex-compatible string that can be used for matching. + +```js +var extglob = require('extglob'); +console.log(extglob('!(xyz)*.js')); +``` + +## Extglob cheatsheet + +Extended globbing patterns can be defined as follows (as described by the [bash man page](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html)): + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern-list)` | `(...|...)?` | Matches zero or one occurrence of the given pattern(s) | +| `*(pattern-list)` | `(...|...)*` | Matches zero or more occurrences of the given pattern(s) | +| `+(pattern-list)` | `(...|...)+` | Matches one or more occurrences of the given pattern(s) | +| `@(pattern-list)` | `(...|...)` [1] | Matches one of the given pattern(s) | +| `!(pattern-list)` | N/A | Matches anything except one of the given pattern(s) | + +## API + +### [extglob](index.js#L36) + +Convert the given `extglob` pattern into a regex-compatible string. Returns an object with the compiled result and the parsed AST. + +**Params** + +* `pattern` **{String}** +* `options` **{Object}** +* `returns` **{String}** + +**Example** + +```js +var extglob = require('extglob'); +console.log(extglob('*.!(*a)')); +//=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' +``` + +### [.match](index.js#L56) + +Takes an array of strings and an extglob pattern and returns a new array that contains only the strings that match the pattern. + +**Params** + +* `list` **{Array}**: Array of strings to match +* `pattern` **{String}**: Extglob pattern +* `options` **{Object}** +* `returns` **{Array}**: Returns an array of matches + +**Example** + +```js +var extglob = require('extglob'); +console.log(extglob.match(['a.a', 'a.b', 'a.c'], '*.!(*a)')); +//=> ['a.b', 'a.c'] +``` + +### [.isMatch](index.js#L111) + +Returns true if the specified `string` matches the given extglob `pattern`. + +**Params** + +* `string` **{String}**: String to match +* `pattern` **{String}**: Extglob pattern +* `options` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var extglob = require('extglob'); + +console.log(extglob.isMatch('a.a', '*.!(*a)')); +//=> false +console.log(extglob.isMatch('a.b', '*.!(*a)')); +//=> true +``` + +### [.contains](index.js#L150) + +Returns true if the given `string` contains the given pattern. Similar to `.isMatch` but the pattern can match any part of the string. + +**Params** + +* `str` **{String}**: The string to match. +* `pattern` **{String}**: Glob pattern to use for matching. +* `options` **{Object}** +* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`. + +**Example** + +```js +var extglob = require('extglob'); +console.log(extglob.contains('aa/bb/cc', '*b')); +//=> true +console.log(extglob.contains('aa/bb/cc', '*d')); +//=> false +``` + +### [.matcher](index.js#L184) + +Takes an extglob pattern and returns a matcher function. The returned function takes the string to match as its only argument. + +**Params** + +* `pattern` **{String}**: Extglob pattern +* `options` **{String}** +* `returns` **{Boolean}** + +**Example** + +```js +var extglob = require('extglob'); +var isMatch = extglob.matcher('*.!(*a)'); + +console.log(isMatch('a.a')); +//=> false +console.log(isMatch('a.b')); +//=> true +``` + +### [.create](index.js#L214) + +Convert the given `extglob` pattern into a regex-compatible string. Returns an object with the compiled result and the parsed AST. + +**Params** + +* `str` **{String}** +* `options` **{Object}** +* `returns` **{String}** + +**Example** + +```js +var extglob = require('extglob'); +console.log(extglob.create('*.!(*a)').output); +//=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' +``` + +### [.capture](index.js#L248) + +Returns an array of matches captured by `pattern` in `string`, or `null` if the pattern did not match. + +**Params** + +* `pattern` **{String}**: Glob pattern to use for matching. +* `string` **{String}**: String to match +* `options` **{Object}**: See available [options](#options) for changing how matches are performed +* `returns` **{Boolean}**: Returns an array of captures if the string matches the glob pattern, otherwise `null`. + +**Example** + +```js +var extglob = require('extglob'); +extglob.capture(pattern, string[, options]); + +console.log(extglob.capture('test/*.js', 'test/foo.js')); +//=> ['foo'] +console.log(extglob.capture('test/*.js', 'foo/bar.css')); +//=> null +``` + +### [.makeRe](index.js#L281) + +Create a regular expression from the given `pattern` and `options`. + +**Params** + +* `pattern` **{String}**: The pattern to convert to regex. +* `options` **{Object}** +* `returns` **{RegExp}** + +**Example** + +```js +var extglob = require('extglob'); +var re = extglob.makeRe('*.!(*a)'); +console.log(re); +//=> /^[^\/]*?\.(?![^\/]*?a)[^\/]*?$/ +``` + +## Options + +Available options are based on the options from Bash (and the option names used in bash). + +### options.nullglob + +**Type**: `boolean` + +**Default**: `undefined` + +When enabled, the pattern itself will be returned when no matches are found. + +### options.nonull + +Alias for [options.nullglob](#optionsnullglob), included for parity with minimatch. + +### options.cache + +**Type**: `boolean` + +**Default**: `undefined` + +Functions are memoized based on the given glob patterns and options. Disable memoization by setting `options.cache` to false. + +### options.failglob + +**Type**: `boolean` + +**Default**: `undefined` + +Throw an error is no matches are found. + +## Benchmarks + +Last run on December 21, 2017 + +```sh +# negation-nested (49 bytes) + extglob x 2,228,255 ops/sec ±0.98% (89 runs sampled) + minimatch x 207,875 ops/sec ±0.61% (91 runs sampled) + + fastest is extglob (by 1072% avg) + +# negation-simple (43 bytes) + extglob x 2,205,668 ops/sec ±1.00% (91 runs sampled) + minimatch x 311,923 ops/sec ±1.25% (91 runs sampled) + + fastest is extglob (by 707% avg) + +# range-false (57 bytes) + extglob x 2,263,877 ops/sec ±0.40% (94 runs sampled) + minimatch x 271,372 ops/sec ±1.02% (91 runs sampled) + + fastest is extglob (by 834% avg) + +# range-true (56 bytes) + extglob x 2,161,891 ops/sec ±0.41% (92 runs sampled) + minimatch x 268,265 ops/sec ±1.17% (91 runs sampled) + + fastest is extglob (by 806% avg) + +# star-simple (46 bytes) + extglob x 2,211,081 ops/sec ±0.49% (92 runs sampled) + minimatch x 343,319 ops/sec ±0.59% (91 runs sampled) + + fastest is extglob (by 644% avg) + +``` + +## Differences from Bash + +This library has complete parity with Bash 4.3 with only a couple of minor differences. + +* In some cases Bash returns true if the given string "contains" the pattern, whereas this library returns true if the string is an exact match for the pattern. You can relax this by setting `options.contains` to true. +* This library is more accurate than Bash and thus does not fail some of the tests that Bash 4.3 still lists as failing in their unit tests + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by [micromatch].") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 49 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [isiahmeadows](https://github.com/isiahmeadows) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [devongovett](https://github.com/devongovett) | +| 1 | [mjbvz](https://github.com/mjbvz) | +| 1 | [shinnn](https://github.com/shinnn) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 21, 2017._ + +
+
+
    +
  1. `@` isn "'t a RegEx character." + +
  2. +
+
\ No newline at end of file diff --git a/node_modules/extglob/changelog.md b/node_modules/extglob/changelog.md new file mode 100644 index 0000000..c9fc4fc --- /dev/null +++ b/node_modules/extglob/changelog.md @@ -0,0 +1,25 @@ +## Changelog + +### v2.0.0 + +**Added features** + +- Adds [.capture](readme.md#capture) method for capturing matches, thanks to [devongovett](https://github.com/devongovett) + + +### v1.0.0 + +**Breaking changes** + +- The main export now returns the compiled string, instead of the object returned from the compiler + +**Added features** + +- Adds a `.create` method to do what the main function did before v1.0.0 + +**Other changes** + +- adds `expand-brackets` parsers/compilers to handle nested brackets and extglobs +- uses `to-regex` to build regex for `makeRe` method +- improves coverage +- optimizations \ No newline at end of file diff --git a/node_modules/extglob/index.js b/node_modules/extglob/index.js new file mode 100644 index 0000000..116e6d5 --- /dev/null +++ b/node_modules/extglob/index.js @@ -0,0 +1,331 @@ +'use strict'; + +/** + * Module dependencies + */ + +var extend = require('extend-shallow'); +var unique = require('array-unique'); +var toRegex = require('to-regex'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var Extglob = require('./lib/extglob'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; + +/** + * Convert the given `extglob` pattern into a regex-compatible string. Returns + * an object with the compiled result and the parsed AST. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob('*.!(*a)')); + * //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {String} + * @api public + */ + +function extglob(pattern, options) { + return extglob.create(pattern, options).output; +} + +/** + * Takes an array of strings and an extglob pattern and returns a new + * array that contains only the strings that match the pattern. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.match(['a.a', 'a.b', 'a.c'], '*.!(*a)')); + * //=> ['a.b', 'a.c'] + * ``` + * @param {Array} `list` Array of strings to match + * @param {String} `pattern` Extglob pattern + * @param {Object} `options` + * @return {Array} Returns an array of matches + * @api public + */ + +extglob.match = function(list, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + list = utils.arrayify(list); + var isMatch = extglob.matcher(pattern, options); + var len = list.length; + var idx = -1; + var matches = []; + + while (++idx < len) { + var ele = list[idx]; + + if (isMatch(ele)) { + matches.push(ele); + } + } + + // if no options were passed, uniquify results and return + if (typeof options === 'undefined') { + return unique(matches); + } + + if (matches.length === 0) { + if (options.failglob === true) { + throw new Error('no matches found for "' + pattern + '"'); + } + if (options.nonull === true || options.nullglob === true) { + return [pattern.split('\\').join('')]; + } + } + + return options.nodupes !== false ? unique(matches) : matches; +}; + +/** + * Returns true if the specified `string` matches the given + * extglob `pattern`. + * + * ```js + * var extglob = require('extglob'); + * + * console.log(extglob.isMatch('a.a', '*.!(*a)')); + * //=> false + * console.log(extglob.isMatch('a.b', '*.!(*a)')); + * //=> true + * ``` + * @param {String} `string` String to match + * @param {String} `pattern` Extglob pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +extglob.isMatch = function(str, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern === str) { + return true; + } + + if (pattern === '' || pattern === ' ' || pattern === '.') { + return pattern === str; + } + + var isMatch = utils.memoize('isMatch', pattern, options, extglob.matcher); + return isMatch(str); +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar to `.isMatch` but + * the pattern can match any part of the string. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(extglob.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String} `pattern` Glob pattern to use for matching. + * @param {Object} `options` + * @return {Boolean} Returns true if the patter matches any part of `str`. + * @api public + */ + +extglob.contains = function(str, pattern, options) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern === '' || pattern === ' ' || pattern === '.') { + return pattern === str; + } + + var opts = extend({}, options, {contains: true}); + opts.strictClose = false; + opts.strictOpen = false; + return extglob.isMatch(str, pattern, opts); +}; + +/** + * Takes an extglob pattern and returns a matcher function. The returned + * function takes the string to match as its only argument. + * + * ```js + * var extglob = require('extglob'); + * var isMatch = extglob.matcher('*.!(*a)'); + * + * console.log(isMatch('a.a')); + * //=> false + * console.log(isMatch('a.b')); + * //=> true + * ``` + * @param {String} `pattern` Extglob pattern + * @param {String} `options` + * @return {Boolean} + * @api public + */ + +extglob.matcher = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + function matcher() { + var re = extglob.makeRe(pattern, options); + return function(str) { + return re.test(str); + }; + } + + return utils.memoize('matcher', pattern, options, matcher); +}; + +/** + * Convert the given `extglob` pattern into a regex-compatible string. Returns + * an object with the compiled result and the parsed AST. + * + * ```js + * var extglob = require('extglob'); + * console.log(extglob.create('*.!(*a)').output); + * //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?' + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +extglob.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + function create() { + var ext = new Extglob(options); + var ast = ext.parse(pattern, options); + return ext.compile(ast, options); + } + + return utils.memoize('create', pattern, options, create); +}; + +/** + * Returns an array of matches captured by `pattern` in `string`, or `null` + * if the pattern did not match. + * + * ```js + * var extglob = require('extglob'); + * extglob.capture(pattern, string[, options]); + * + * console.log(extglob.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(extglob.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `pattern` Glob pattern to use for matching. + * @param {String} `string` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns an array of captures if the string matches the glob pattern, otherwise `null`. + * @api public + */ + +extglob.capture = function(pattern, str, options) { + var re = extglob.makeRe(pattern, extend({capture: true}, options)); + + function match() { + return function(string) { + var match = re.exec(string); + if (!match) { + return null; + } + + return match.slice(1); + }; + } + + var capture = utils.memoize('capture', pattern, options, match); + return capture(str); +}; + +/** + * Create a regular expression from the given `pattern` and `options`. + * + * ```js + * var extglob = require('extglob'); + * var re = extglob.makeRe('*.!(*a)'); + * console.log(re); + * //=> /^[^\/]*?\.(?![^\/]*?a)[^\/]*?$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +extglob.makeRe = function(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected pattern to be a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + function makeRe() { + var opts = extend({strictErrors: false}, options); + if (opts.strictErrors === true) opts.strict = true; + var res = extglob.create(pattern, opts); + return toRegex(res.output, opts); + } + + var regex = utils.memoize('makeRe', pattern, options, makeRe); + if (regex.source.length > MAX_LENGTH) { + throw new SyntaxError('potentially malicious regex detected'); + } + + return regex; +}; + +/** + * Cache + */ + +extglob.cache = utils.cache; +extglob.clearCache = function() { + extglob.cache.__data__ = {}; +}; + +/** + * Expose `Extglob` constructor, parsers and compilers + */ + +extglob.Extglob = Extglob; +extglob.compilers = compilers; +extglob.parsers = parsers; + +/** + * Expose `extglob` + * @type {Function} + */ + +module.exports = extglob; diff --git a/node_modules/extglob/lib/.DS_Store b/node_modules/extglob/lib/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 1) { + val += '{' + node.val.length + '}'; + } + return this.emit(val, node); + }) + + /** + * Plus: "+" + */ + + .set('plus', function(node) { + var prev = node.parsed.slice(-1); + if (prev === ']' || prev === ')') { + return this.emit(node.val, node); + } + var ch = this.output.slice(-1); + if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) { + return this.emit('\\+', node); + } + if (/\w/.test(ch) && !node.inside) { + return this.emit('+\\+?', node); + } + return this.emit('+', node); + }) + + /** + * Star: "*" + */ + + .set('star', function(node) { + var prev = this.prev(); + var prefix = prev.type !== 'text' && prev.type !== 'escape' + ? '(?!\\.)' + : ''; + + return this.emit(prefix + star.call(this, node), node); + }) + + /** + * Parens + */ + + .set('paren', function(node) { + return this.mapVisit(node.nodes); + }) + .set('paren.open', function(node) { + var capture = this.options.capture ? '(' : ''; + + switch (node.parent.prefix) { + case '!': + case '^': + return this.emit(capture + '(?:(?!(?:', node); + case '*': + case '+': + case '?': + case '@': + return this.emit(capture + '(?:', node); + default: { + var val = node.val; + if (this.options.bash === true) { + val = '\\' + val; + } else if (!this.options.capture && val === '(' && node.parent.rest[0] !== '?') { + val += '?:'; + } + + return this.emit(val, node); + } + } + }) + .set('paren.close', function(node) { + var capture = this.options.capture ? ')' : ''; + + switch (node.prefix) { + case '!': + case '^': + var prefix = /^(\)|$)/.test(node.rest) ? '$' : ''; + var str = star.call(this, node); + + // if the extglob has a slash explicitly defined, we know the user wants + // to match slashes, so we need to ensure the "star" regex allows for it + if (node.parent.hasSlash && !this.options.star && this.options.slash !== false) { + str = '.*?'; + } + + return this.emit(prefix + ('))' + str + ')') + capture, node); + case '*': + case '+': + case '?': + return this.emit(')' + node.prefix + capture, node); + case '@': + return this.emit(')' + capture, node); + default: { + var val = (this.options.bash === true ? '\\' : '') + ')'; + return this.emit(val, node); + } + } + }) + + /** + * Text + */ + + .set('text', function(node) { + var val = node.val.replace(/[\[\]]/g, '\\$&'); + return this.emit(val, node); + }); +}; diff --git a/node_modules/extglob/lib/extglob.js b/node_modules/extglob/lib/extglob.js new file mode 100644 index 0000000..015f928 --- /dev/null +++ b/node_modules/extglob/lib/extglob.js @@ -0,0 +1,78 @@ +'use strict'; + +/** + * Module dependencies + */ + +var Snapdragon = require('snapdragon'); +var define = require('define-property'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./compilers'); +var parsers = require('./parsers'); + +/** + * Customize Snapdragon parser and renderer + */ + +function Extglob(options) { + this.options = extend({source: 'extglob'}, options); + this.snapdragon = this.options.snapdragon || new Snapdragon(this.options); + this.snapdragon.patterns = this.snapdragon.patterns || {}; + this.compiler = this.snapdragon.compiler; + this.parser = this.snapdragon.parser; + + compilers(this.snapdragon); + parsers(this.snapdragon); + + /** + * Override Snapdragon `.parse` method + */ + + define(this.snapdragon, 'parse', function(str, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + parsed.input = str; + + // escape unmatched brace/bracket/parens + var last = this.parser.stack.pop(); + if (last && this.options.strict !== true) { + var node = last.nodes[0]; + node.val = '\\' + node.val; + var sibling = node.parent.nodes[1]; + if (sibling.type === 'star') { + sibling.loose = true; + } + } + + // add non-enumerable parser reference + define(parsed, 'parser', this.parser); + return parsed; + }); + + /** + * Decorate `.parse` method + */ + + define(this, 'parse', function(ast, options) { + return this.snapdragon.parse.apply(this.snapdragon, arguments); + }); + + /** + * Decorate `.compile` method + */ + + define(this, 'compile', function(ast, options) { + return this.snapdragon.compile.apply(this.snapdragon, arguments); + }); + +} + +/** + * Expose `Extglob` + */ + +module.exports = Extglob; diff --git a/node_modules/extglob/lib/parsers.js b/node_modules/extglob/lib/parsers.js new file mode 100644 index 0000000..2ba7352 --- /dev/null +++ b/node_modules/extglob/lib/parsers.js @@ -0,0 +1,156 @@ +'use strict'; + +var brackets = require('expand-brackets'); +var define = require('define-property'); +var utils = require('./utils'); + +/** + * Characters to use in text regex (we want to "not" match + * characters that are matched by other parsers) + */ + +var TEXT_REGEX = '([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+'; +var not = utils.createRegex(TEXT_REGEX); + +/** + * Extglob parsers + */ + +function parsers(extglob) { + extglob.state = extglob.state || {}; + + /** + * Use `expand-brackets` parsers + */ + + extglob.use(brackets.parsers); + extglob.parser.sets.paren = extglob.parser.sets.paren || []; + extglob.parser + + /** + * Extglob open: "*(" + */ + + .capture('paren.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^([!@*?+])?\(/); + if (!m) return; + + var prev = this.prev(); + var prefix = m[1]; + var val = m[0]; + + var open = pos({ + type: 'paren.open', + parsed: parsed, + val: val + }); + + var node = pos({ + type: 'paren', + prefix: prefix, + nodes: [open] + }); + + // if nested negation extglobs, just cancel them out to simplify + if (prefix === '!' && prev.type === 'paren' && prev.prefix === '!') { + prev.prefix = '@'; + node.prefix = '@'; + } + + define(node, 'rest', this.input); + define(node, 'parsed', parsed); + define(node, 'parent', prev); + define(open, 'parent', node); + + this.push('paren', node); + prev.nodes.push(node); + }) + + /** + * Extglob close: ")" + */ + + .capture('paren.close', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\)/); + if (!m) return; + + var parent = this.pop('paren'); + var node = pos({ + type: 'paren.close', + rest: this.input, + parsed: parsed, + val: m[0] + }); + + if (!this.isType(parent, 'paren')) { + if (this.options.strict) { + throw new Error('missing opening paren: "("'); + } + node.escaped = true; + return node; + } + + node.prefix = parent.prefix; + parent.nodes.push(node); + define(node, 'parent', parent); + }) + + /** + * Escape: "\\." + */ + + .capture('escape', function() { + var pos = this.position(); + var m = this.match(/^\\(.)/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[0], + ch: m[1] + }); + }) + + /** + * Question marks: "?" + */ + + .capture('qmark', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\?+(?!\()/); + if (!m) return; + extglob.state.metachar = true; + return pos({ + type: 'qmark', + rest: this.input, + parsed: parsed, + val: m[0] + }); + }) + + /** + * Character parsers + */ + + .capture('star', /^\*(?!\()/) + .capture('plus', /^\+(?!\()/) + .capture('dot', /^\./) + .capture('text', not); +}; + +/** + * Expose text regex string + */ + +module.exports.TEXT_REGEX = TEXT_REGEX; + +/** + * Extglob parsers + */ + +module.exports = parsers; diff --git a/node_modules/extglob/lib/utils.js b/node_modules/extglob/lib/utils.js new file mode 100644 index 0000000..37a59fb --- /dev/null +++ b/node_modules/extglob/lib/utils.js @@ -0,0 +1,69 @@ +'use strict'; + +var regex = require('regex-not'); +var Cache = require('fragment-cache'); + +/** + * Utils + */ + +var utils = module.exports; +var cache = utils.cache = new Cache(); + +/** + * Cast `val` to an array + * @return {Array} + */ + +utils.arrayify = function(val) { + if (!Array.isArray(val)) { + return [val]; + } + return val; +}; + +/** + * Memoize a generated regex or function + */ + +utils.memoize = function(type, pattern, options, fn) { + var key = utils.createKey(type + pattern, options); + + if (cache.has(type, key)) { + return cache.get(type, key); + } + + var val = fn(pattern, options); + if (options && options.cache === false) { + return val; + } + + cache.set(type, key, val); + return val; +}; + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + var key = pattern; + if (typeof options === 'undefined') { + return key; + } + for (var prop in options) { + key += ';' + prop + '=' + String(options[prop]); + } + return key; +}; + +/** + * Create the regex to use for matching text + */ + +utils.createRegex = function(str) { + var opts = {contains: true, strictClose: false}; + return regex(str, opts); +}; diff --git a/node_modules/extglob/node_modules/define-property/LICENSE b/node_modules/extglob/node_modules/define-property/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/node_modules/extglob/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +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/node_modules/extglob/node_modules/define-property/README.md b/node_modules/extglob/node_modules/define-property/README.md new file mode 100644 index 0000000..2f1af05 --- /dev/null +++ b/node_modules/extglob/node_modules/define-property/README.md @@ -0,0 +1,95 @@ +# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save define-property +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add define-property +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## About + +### Related projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._ \ No newline at end of file diff --git a/node_modules/extglob/node_modules/define-property/index.js b/node_modules/extglob/node_modules/define-property/index.js new file mode 100644 index 0000000..27c19eb --- /dev/null +++ b/node_modules/extglob/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/extglob/node_modules/define-property/package.json b/node_modules/extglob/node_modules/define-property/package.json new file mode 100644 index 0000000..fcf7f33 --- /dev/null +++ b/node_modules/extglob/node_modules/define-property/package.json @@ -0,0 +1,93 @@ +{ + "_from": "define-property@^1.0.0", + "_id": "define-property@1.0.0", + "_inBundle": false, + "_integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "_location": "/extglob/define-property", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "define-property@^1.0.0", + "name": "define-property", + "escapedName": "define-property", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/extglob" + ], + "_resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "_shasum": "769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6", + "_spec": "define-property@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/extglob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "deprecated": false, + "description": "Define a non-enumerable property on an object.", + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/define-property", + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "define-property", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/define-property.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "extend-shallow", + "merge-deep", + "assign-deep", + "mixin-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.0" +} diff --git a/node_modules/extglob/node_modules/extend-shallow/LICENSE b/node_modules/extglob/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/extglob/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +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/node_modules/extglob/node_modules/extend-shallow/README.md b/node_modules/extglob/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..cdc45d4 --- /dev/null +++ b/node_modules/extglob/node_modules/extend-shallow/README.md @@ -0,0 +1,61 @@ +# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i extend-shallow --save +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## Related + +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) +* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._ \ No newline at end of file diff --git a/node_modules/extglob/node_modules/extend-shallow/index.js b/node_modules/extglob/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..92a067f --- /dev/null +++ b/node_modules/extglob/node_modules/extend-shallow/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var isObject = require('is-extendable'); + +module.exports = function extend(o/*, objects*/) { + if (!isObject(o)) { o = {}; } + + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + + if (isObject(obj)) { + assign(o, obj); + } + } + return o; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} diff --git a/node_modules/extglob/node_modules/extend-shallow/package.json b/node_modules/extglob/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..cf1d3f1 --- /dev/null +++ b/node_modules/extglob/node_modules/extend-shallow/package.json @@ -0,0 +1,87 @@ +{ + "_from": "extend-shallow@^2.0.1", + "_id": "extend-shallow@2.0.1", + "_inBundle": false, + "_integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "_location": "/extglob/extend-shallow", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "extend-shallow@^2.0.1", + "name": "extend-shallow", + "escapedName": "extend-shallow", + "rawSpec": "^2.0.1", + "saveSpec": null, + "fetchSpec": "^2.0.1" + }, + "_requiredBy": [ + "/extglob" + ], + "_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "_shasum": "51af7d614ad9a9f610ea1bafbb989d6b1c56890f", + "_spec": "extend-shallow@^2.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/extglob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "deprecated": false, + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "devDependencies": { + "array-slice": "^0.2.3", + "benchmarked": "^0.1.4", + "chalk": "^1.0.0", + "for-own": "^0.1.3", + "glob": "^5.0.12", + "is-plain-object": "^2.0.1", + "kind-of": "^2.0.0", + "minimist": "^1.1.1", + "mocha": "^2.2.5", + "should": "^7.0.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "extend-shallow", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/extend-shallow.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.1" +} diff --git a/node_modules/extglob/package.json b/node_modules/extglob/package.json new file mode 100644 index 0000000..f5df325 --- /dev/null +++ b/node_modules/extglob/package.json @@ -0,0 +1,160 @@ +{ + "_from": "extglob@^2.0.4", + "_id": "extglob@2.0.4", + "_inBundle": false, + "_integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "_location": "/extglob", + "_phantomChildren": { + "is-descriptor": "1.0.2", + "is-extendable": "0.1.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "extglob@^2.0.4", + "name": "extglob", + "escapedName": "extglob", + "rawSpec": "^2.0.4", + "saveSpec": null, + "fetchSpec": "^2.0.4" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "_shasum": "ad00fe4dc612a9232e8718711dc5cb5ab0285543", + "_spec": "extglob@^2.0.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/micromatch/extglob/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Devon Govett", + "url": "http://badassjs.com" + }, + { + "name": "Isiah Meadows", + "url": "https://www.isiahmeadows.com" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Matt Bierner", + "url": "http://mattbierner.com" + }, + { + "name": "Shinnosuke Watanabe", + "url": "https://shinnn.github.io" + } + ], + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "deprecated": false, + "description": "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.", + "devDependencies": { + "bash-match": "^1.0.2", + "for-own": "^1.0.0", + "gulp": "^3.9.1", + "gulp-eslint": "^4.0.0", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.2", + "gulp-mocha": "^3.0.1", + "gulp-unused": "^0.2.1", + "helper-changelog": "^0.3.0", + "is-windows": "^1.0.1", + "micromatch": "^3.0.4", + "minimatch": "^3.0.4", + "minimist": "^1.2.0", + "mocha": "^3.5.0", + "multimatch": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/micromatch/extglob", + "keywords": [ + "bash", + "extended", + "extglob", + "glob", + "globbing", + "ksh", + "match", + "pattern", + "patterns", + "regex", + "test", + "wildcard" + ], + "license": "MIT", + "lintDeps": { + "devDependencies": { + "files": { + "options": { + "ignore": [ + "benchmark/**/*.js" + ] + } + } + } + }, + "main": "index.js", + "name": "extglob", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/extglob.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "expand-range", + "fill-range", + "micromatch" + ] + }, + "helpers": [ + "helper-changelog" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "2.0.4" +} diff --git a/node_modules/fill-range/LICENSE b/node_modules/fill-range/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/fill-range/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/fill-range/README.md b/node_modules/fill-range/README.md new file mode 100644 index 0000000..bc1f8a0 --- /dev/null +++ b/node_modules/fill-range/README.md @@ -0,0 +1,250 @@ +# fill-range [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range) + +> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex` + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [Examples](#examples) +- [Options](#options) + * [options.step](#optionsstep) + * [options.strictRanges](#optionsstrictranges) + * [options.stringify](#optionsstringify) + * [options.toRegex](#optionstoregex) + * [options.transform](#optionstransform) +- [About](#about) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save fill-range +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add fill-range +``` + +## Usage + +Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_. + +```js +var fill = require('fill-range'); +fill(from, to[, step, options]); + +// examples +console.log(fill('1', '10')); //=> '[ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ]' +console.log(fill('1', '10', {toRegex: true})); //=> [1-9]|10 +``` + +**Params** + +* `from`: **{String|Number}** the number or letter to start with +* `to`: **{String|Number}** the number or letter to end with +* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use. +* `options`: **{Object|Function}**: See all available [options](#options) + +## Examples + +By default, an array of values is returned. + +**Alphabetical ranges** + +```js +console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e'] +console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ] +``` + +**Numerical ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ] +``` + +**Negative ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ] +console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ] +``` + +**Steps (increments)** + +```js +// numerical ranges with increments +console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ] +console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ] +console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ] + +// alphabetical ranges with increments +console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ] +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ] +``` + +## Options + +### options.step + +**Type**: `number` (formatted as a string or number) + +**Default**: `undefined` + +**Description**: The increment to use for the range. Can be used with letters or numbers. + +**Example(s)** + +```js +// numbers +console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ] +console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ] +console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ] + +// letters +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ] +console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ] +``` + +### options.strictRanges + +**Type**: `boolean` + +**Default**: `false` + +**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges. + +**Example(s)** + +The following are all invalid: + +```js +fill('1.1', '2'); // decimals not supported in ranges +fill('a', '2'); // incompatible range values +fill(1, 10, 'foo'); // invalid "step" argument +``` + +### options.stringify + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Cast all returned values to strings. By default, integers are returned as numbers. + +**Example(s)** + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill(1, 5, {stringify: true})); //=> [ '1', '2', '3', '4', '5' ] +``` + +### options.toRegex + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Create a regex-compatible source string, instead of expanding values to an array. + +**Example(s)** + +```js +// alphabetical range +console.log(fill('a', 'e', {toRegex: true})); //=> '[a-e]' +// alphabetical with step +console.log(fill('a', 'z', 3, {toRegex: true})); //=> 'a|d|g|j|m|p|s|v|y' +// numerical range +console.log(fill('1', '100', {toRegex: true})); //=> '[1-9]|[1-9][0-9]|100' +// numerical range with zero padding +console.log(fill('000001', '100000', {toRegex: true})); +//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000' +``` + +### options.transform + +**Type**: `function` + +**Default**: `undefined` + +**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_. + +**Example(s)** + +```js +// increase padding by two +var arr = fill('01', '05', function(val, a, b, step, idx, arr, options) { + return repeat('0', (options.maxLength + 2) - val.length) + val; +}); + +console.log(arr); +//=> ['0001', '0002', '0003', '0004', '0005'] +``` + +## About + +### Related projects + +* [braces](https://www.npmjs.com/package/braces): Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces specification, without sacrificing speed.") +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [to-regex-range](https://www.npmjs.com/package/to-regex-range): Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than… [more](https://github.com/jonschlinkert/to-regex-range) | [homepage](https://github.com/jonschlinkert/to-regex-range "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.87 million test assertions.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 103 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulmillr](https://github.com/paulmillr) | +| 1 | [edorivai](https://github.com/edorivai) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 23, 2017._ \ No newline at end of file diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js new file mode 100644 index 0000000..294a2ed --- /dev/null +++ b/node_modules/fill-range/index.js @@ -0,0 +1,208 @@ +/*! + * fill-range + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var util = require('util'); +var isNumber = require('is-number'); +var extend = require('extend-shallow'); +var repeat = require('repeat-string'); +var toRegex = require('to-regex-range'); + +/** + * Return a range of numbers or letters. + * + * @param {String} `start` Start of the range + * @param {String} `stop` End of the range + * @param {String} `step` Increment or decrement to use. + * @param {Function} `fn` Custom function to modify each element in the range. + * @return {Array} + */ + +function fillRange(start, stop, step, options) { + if (typeof start === 'undefined') { + return []; + } + + if (typeof stop === 'undefined' || start === stop) { + // special case, for handling negative zero + var isString = typeof start === 'string'; + if (isNumber(start) && !toNumber(start)) { + return [isString ? '0' : 0]; + } + return [start]; + } + + if (typeof step !== 'number' && typeof step !== 'string') { + options = step; + step = undefined; + } + + if (typeof options === 'function') { + options = { transform: options }; + } + + var opts = extend({step: step}, options); + if (opts.step && !isValidNumber(opts.step)) { + if (opts.strictRanges === true) { + throw new TypeError('expected options.step to be a number'); + } + return []; + } + + opts.isNumber = isValidNumber(start) && isValidNumber(stop); + if (!opts.isNumber && !isValid(start, stop)) { + if (opts.strictRanges === true) { + throw new RangeError('invalid range arguments: ' + util.inspect([start, stop])); + } + return []; + } + + opts.isPadded = isPadded(start) || isPadded(stop); + opts.toString = opts.stringify + || typeof opts.step === 'string' + || typeof start === 'string' + || typeof stop === 'string' + || !opts.isNumber; + + if (opts.isPadded) { + opts.maxLength = Math.max(String(start).length, String(stop).length); + } + + // support legacy minimatch/fill-range options + if (typeof opts.optimize === 'boolean') opts.toRegex = opts.optimize; + if (typeof opts.makeRe === 'boolean') opts.toRegex = opts.makeRe; + return expand(start, stop, opts); +} + +function expand(start, stop, options) { + var a = options.isNumber ? toNumber(start) : start.charCodeAt(0); + var b = options.isNumber ? toNumber(stop) : stop.charCodeAt(0); + + var step = Math.abs(toNumber(options.step)) || 1; + if (options.toRegex && step === 1) { + return toRange(a, b, start, stop, options); + } + + var zero = {greater: [], lesser: []}; + var asc = a < b; + var arr = new Array(Math.round((asc ? b - a : a - b) / step)); + var idx = 0; + + while (asc ? a <= b : a >= b) { + var val = options.isNumber ? a : String.fromCharCode(a); + if (options.toRegex && (val >= 0 || !options.isNumber)) { + zero.greater.push(val); + } else { + zero.lesser.push(Math.abs(val)); + } + + if (options.isPadded) { + val = zeros(val, options); + } + + if (options.toString) { + val = String(val); + } + + if (typeof options.transform === 'function') { + arr[idx++] = options.transform(val, a, b, step, idx, arr, options); + } else { + arr[idx++] = val; + } + + if (asc) { + a += step; + } else { + a -= step; + } + } + + if (options.toRegex === true) { + return toSequence(arr, zero, options); + } + return arr; +} + +function toRange(a, b, start, stop, options) { + if (options.isPadded) { + return toRegex(start, stop, options); + } + + if (options.isNumber) { + return toRegex(Math.min(a, b), Math.max(a, b), options); + } + + var start = String.fromCharCode(Math.min(a, b)); + var stop = String.fromCharCode(Math.max(a, b)); + return '[' + start + '-' + stop + ']'; +} + +function toSequence(arr, zeros, options) { + var greater = '', lesser = ''; + if (zeros.greater.length) { + greater = zeros.greater.join('|'); + } + if (zeros.lesser.length) { + lesser = '-(' + zeros.lesser.join('|') + ')'; + } + var res = greater && lesser + ? greater + '|' + lesser + : greater || lesser; + + if (options.capture) { + return '(' + res + ')'; + } + return res; +} + +function zeros(val, options) { + if (options.isPadded) { + var str = String(val); + var len = str.length; + var dash = ''; + if (str.charAt(0) === '-') { + dash = '-'; + str = str.slice(1); + } + var diff = options.maxLength - len; + var pad = repeat('0', diff); + val = (dash + pad + str); + } + if (options.stringify) { + return String(val); + } + return val; +} + +function toNumber(val) { + return Number(val) || 0; +} + +function isPadded(str) { + return /^-?0\d/.test(str); +} + +function isValid(min, max) { + return (isValidNumber(min) || isValidLetter(min)) + && (isValidNumber(max) || isValidLetter(max)); +} + +function isValidLetter(ch) { + return typeof ch === 'string' && ch.length === 1 && /^\w+$/.test(ch); +} + +function isValidNumber(n) { + return isNumber(n) && !/\./.test(n); +} + +/** + * Expose `fillRange` + * @type {Function} + */ + +module.exports = fillRange; diff --git a/node_modules/fill-range/node_modules/extend-shallow/LICENSE b/node_modules/fill-range/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/node_modules/fill-range/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +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/node_modules/fill-range/node_modules/extend-shallow/README.md b/node_modules/fill-range/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..cdc45d4 --- /dev/null +++ b/node_modules/fill-range/node_modules/extend-shallow/README.md @@ -0,0 +1,61 @@ +# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i extend-shallow --save +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## Related + +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) +* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._ \ No newline at end of file diff --git a/node_modules/fill-range/node_modules/extend-shallow/index.js b/node_modules/fill-range/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..92a067f --- /dev/null +++ b/node_modules/fill-range/node_modules/extend-shallow/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var isObject = require('is-extendable'); + +module.exports = function extend(o/*, objects*/) { + if (!isObject(o)) { o = {}; } + + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + + if (isObject(obj)) { + assign(o, obj); + } + } + return o; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} diff --git a/node_modules/fill-range/node_modules/extend-shallow/package.json b/node_modules/fill-range/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..78a07ae --- /dev/null +++ b/node_modules/fill-range/node_modules/extend-shallow/package.json @@ -0,0 +1,87 @@ +{ + "_from": "extend-shallow@^2.0.1", + "_id": "extend-shallow@2.0.1", + "_inBundle": false, + "_integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "_location": "/fill-range/extend-shallow", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "extend-shallow@^2.0.1", + "name": "extend-shallow", + "escapedName": "extend-shallow", + "rawSpec": "^2.0.1", + "saveSpec": null, + "fetchSpec": "^2.0.1" + }, + "_requiredBy": [ + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "_shasum": "51af7d614ad9a9f610ea1bafbb989d6b1c56890f", + "_spec": "extend-shallow@^2.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "deprecated": false, + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "devDependencies": { + "array-slice": "^0.2.3", + "benchmarked": "^0.1.4", + "chalk": "^1.0.0", + "for-own": "^0.1.3", + "glob": "^5.0.12", + "is-plain-object": "^2.0.1", + "kind-of": "^2.0.0", + "minimist": "^1.1.1", + "mocha": "^2.2.5", + "should": "^7.0.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "extend-shallow", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/extend-shallow.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.1" +} diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json new file mode 100644 index 0000000..23a0d29 --- /dev/null +++ b/node_modules/fill-range/package.json @@ -0,0 +1,130 @@ +{ + "_from": "fill-range@^4.0.0", + "_id": "fill-range@4.0.0", + "_inBundle": false, + "_integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "_location": "/fill-range", + "_phantomChildren": { + "is-extendable": "0.1.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "fill-range@^4.0.0", + "name": "fill-range", + "escapedName": "fill-range", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/braces" + ], + "_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "_shasum": "d544811d428f98eb06a63dc402d2403c328c38f7", + "_spec": "fill-range@^4.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/fill-range/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "email": "wtgtybhertgeghgtwtg@gmail.com", + "url": "https://github.com/wtgtybhertgeghgtwtg" + }, + { + "name": "Edo Rivai", + "email": "edo.rivai@gmail.com", + "url": "edo.rivai.nl" + }, + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Paul Miller", + "email": "paul+gh@paulmillr.com", + "url": "paulmillr.com" + } + ], + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "deprecated": false, + "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^1.0.0", + "gulp-format-md": "^0.1.12", + "minimist": "^1.2.0", + "mocha": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/fill-range", + "keywords": [ + "alpha", + "alphabetical", + "array", + "bash", + "brace", + "expand", + "expansion", + "fill", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sh" + ], + "license": "MIT", + "main": "index.js", + "name": "fill-range", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/fill-range.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "braces", + "expand-range", + "micromatch", + "to-regex-range" + ] + }, + "toc": true, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "4.0.0" +} diff --git a/node_modules/finalhandler/HISTORY.md b/node_modules/finalhandler/HISTORY.md new file mode 100644 index 0000000..4f7244d --- /dev/null +++ b/node_modules/finalhandler/HISTORY.md @@ -0,0 +1,172 @@ +1.1.0 / 2017-09-24 +================== + + * Use `res.headersSent` when available + +1.0.6 / 2017-09-22 +================== + + * deps: debug@2.6.9 + +1.0.5 / 2017-09-15 +================== + + * deps: parseurl@~1.3.2 + - perf: reduce overhead for full URLs + - perf: unroll the "fast-path" `RegExp` + +1.0.4 / 2017-08-03 +================== + + * deps: debug@2.6.8 + +1.0.3 / 2017-05-16 +================== + + * deps: debug@2.6.7 + - deps: ms@2.0.0 + +1.0.2 / 2017-04-22 +================== + + * deps: debug@2.6.4 + - deps: ms@0.7.3 + +1.0.1 / 2017-03-21 +================== + + * Fix missing `` in HTML document + * deps: debug@2.6.3 + - Fix: `DEBUG_MAX_ARRAY_LENGTH` + +1.0.0 / 2017-02-15 +================== + + * Fix exception when `err` cannot be converted to a string + * Fully URL-encode the pathname in the 404 message + * Only include the pathname in the 404 message + * Send complete HTML document + * Set `Content-Security-Policy: default-src 'self'` header + * deps: debug@2.6.1 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable set to `3` or higher + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@0.7.2 + +0.5.1 / 2016-11-12 +================== + + * Fix exception when `err.headers` is not an object + * deps: statuses@~1.3.1 + * perf: hoist regular expressions + * perf: remove duplicate validation path + +0.5.0 / 2016-06-15 +================== + + * Change invalid or non-numeric status code to 500 + * Overwrite status message to match set status code + * Prefer `err.statusCode` if `err.status` is invalid + * Set response headers from `err.headers` object + * Use `statuses` instead of `http` module for status messages + - Includes all defined status messages + +0.4.1 / 2015-12-02 +================== + + * deps: escape-html@~1.0.3 + - perf: enable strict mode + - perf: optimize string replacement + - perf: use faster string coercion + +0.4.0 / 2015-06-14 +================== + + * Fix a false-positive when unpiping in Node.js 0.8 + * Support `statusCode` property on `Error` objects + * Use `unpipe` module for unpiping requests + * deps: escape-html@1.0.2 + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * perf: enable strict mode + * perf: remove argument reassignment + +0.3.6 / 2015-05-11 +================== + + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + +0.3.5 / 2015-04-22 +================== + + * deps: on-finished@~2.2.1 + - Fix `isFinished(req)` when data buffered + +0.3.4 / 2015-03-15 +================== + + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + +0.3.3 / 2015-01-01 +================== + + * deps: debug@~2.1.1 + * deps: on-finished@~2.2.0 + +0.3.2 / 2014-10-22 +================== + + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + +0.3.1 / 2014-10-16 +================== + + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + +0.3.0 / 2014-09-17 +================== + + * Terminate in progress response only on error + * Use `on-finished` to determine request status + +0.2.0 / 2014-09-03 +================== + + * Set `X-Content-Type-Options: nosniff` header + * deps: debug@~2.0.0 + +0.1.0 / 2014-07-16 +================== + + * Respond after request fully read + - prevents hung responses and socket hang ups + * deps: debug@1.0.4 + +0.0.3 / 2014-07-11 +================== + + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + +0.0.2 / 2014-06-19 +================== + + * Handle invalid status codes + +0.0.1 / 2014-06-05 +================== + + * deps: debug@1.0.2 + +0.0.0 / 2014-06-05 +================== + + * Extracted from connect/express diff --git a/node_modules/finalhandler/LICENSE b/node_modules/finalhandler/LICENSE new file mode 100644 index 0000000..fb30982 --- /dev/null +++ b/node_modules/finalhandler/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +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/node_modules/finalhandler/README.md b/node_modules/finalhandler/README.md new file mode 100644 index 0000000..6756f0c --- /dev/null +++ b/node_modules/finalhandler/README.md @@ -0,0 +1,148 @@ +# finalhandler + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Node.js function to invoke as the final step to respond to HTTP request. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install finalhandler +``` + +## API + + + +```js +var finalhandler = require('finalhandler') +``` + +### finalhandler(req, res, [options]) + +Returns function to be invoked as the final step for the given `req` and `res`. +This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will +write out a 404 response to the `res`. If it is truthy, an error response will +be written out to the `res`. + +When an error is written, the following information is added to the response: + + * The `res.statusCode` is set from `err.status` (or `err.statusCode`). If + this value is outside the 4xx or 5xx range, it will be set to 500. + * The `res.statusMessage` is set according to the status code. + * The body will be the HTML of the status code message if `env` is + `'production'`, otherwise will be `err.stack`. + * Any headers specified in an `err.headers` object. + +The final handler will also unpipe anything from `req` when it is invoked. + +#### options.env + +By default, the environment is determined by `NODE_ENV` variable, but it can be +overridden by this option. + +#### options.onerror + +Provide a function to be called with the `err` when it exists. Can be used for +writing errors to a central location without excessive function generation. Called +as `onerror(err, req, res)`. + +## Examples + +### always 404 + +```js +var finalhandler = require('finalhandler') +var http = require('http') + +var server = http.createServer(function (req, res) { + var done = finalhandler(req, res) + done() +}) + +server.listen(3000) +``` + +### perform simple action + +```js +var finalhandler = require('finalhandler') +var fs = require('fs') +var http = require('http') + +var server = http.createServer(function (req, res) { + var done = finalhandler(req, res) + + fs.readFile('index.html', function (err, buf) { + if (err) return done(err) + res.setHeader('Content-Type', 'text/html') + res.end(buf) + }) +}) + +server.listen(3000) +``` + +### use with middleware-style functions + +```js +var finalhandler = require('finalhandler') +var http = require('http') +var serveStatic = require('serve-static') + +var serve = serveStatic('public') + +var server = http.createServer(function (req, res) { + var done = finalhandler(req, res) + serve(req, res, done) +}) + +server.listen(3000) +``` + +### keep log of all errors + +```js +var finalhandler = require('finalhandler') +var fs = require('fs') +var http = require('http') + +var server = http.createServer(function (req, res) { + var done = finalhandler(req, res, {onerror: logerror}) + + fs.readFile('index.html', function (err, buf) { + if (err) return done(err) + res.setHeader('Content-Type', 'text/html') + res.end(buf) + }) +}) + +server.listen(3000) + +function logerror (err) { + console.error(err.stack || err.toString()) +} +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/finalhandler.svg +[npm-url]: https://npmjs.org/package/finalhandler +[node-image]: https://img.shields.io/node/v/finalhandler.svg +[node-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/pillarjs/finalhandler.svg +[travis-url]: https://travis-ci.org/pillarjs/finalhandler +[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg +[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master +[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg +[downloads-url]: https://npmjs.org/package/finalhandler diff --git a/node_modules/finalhandler/index.js b/node_modules/finalhandler/index.js new file mode 100644 index 0000000..42f0f74 --- /dev/null +++ b/node_modules/finalhandler/index.js @@ -0,0 +1,314 @@ +/*! + * finalhandler + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var debug = require('debug')('finalhandler') +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') +var onFinished = require('on-finished') +var parseUrl = require('parseurl') +var statuses = require('statuses') +var unpipe = require('unpipe') + +/** + * Module variables. + * @private + */ + +var DOUBLE_SPACE_REGEXP = /\x20{2}/g +var NEWLINE_REGEXP = /\n/g + +/* istanbul ignore next */ +var defer = typeof setImmediate === 'function' + ? setImmediate + : function (fn) { process.nextTick(fn.bind.apply(fn, arguments)) } +var isFinished = onFinished.isFinished + +/** + * Create a minimal HTML document. + * + * @param {string} message + * @private + */ + +function createHtmlDocument (message) { + var body = escapeHtml(message) + .replace(NEWLINE_REGEXP, '
') + .replace(DOUBLE_SPACE_REGEXP, '  ') + + return '\n' + + '\n' + + '\n' + + '\n' + + 'Error\n' + + '\n' + + '\n' + + '
' + body + '
\n' + + '\n' + + '\n' +} + +/** + * Module exports. + * @public + */ + +module.exports = finalhandler + +/** + * Create a function to handle the final response. + * + * @param {Request} req + * @param {Response} res + * @param {Object} [options] + * @return {Function} + * @public + */ + +function finalhandler (req, res, options) { + var opts = options || {} + + // get environment + var env = opts.env || process.env.NODE_ENV || 'development' + + // get error callback + var onerror = opts.onerror + + return function (err) { + var headers + var msg + var status + + // ignore 404 on in-flight response + if (!err && headersSent(res)) { + debug('cannot 404 after headers sent') + return + } + + // unhandled error + if (err) { + // respect status code from error + status = getErrorStatusCode(err) + + // respect headers from error + if (status !== undefined) { + headers = getErrorHeaders(err) + } + + // fallback to status code on response + if (status === undefined) { + status = getResponseStatusCode(res) + } + + // get error message + msg = getErrorMessage(err, status, env) + } else { + // not found + status = 404 + msg = 'Cannot ' + req.method + ' ' + encodeUrl(parseUrl.original(req).pathname) + } + + debug('default %s', status) + + // schedule onerror callback + if (err && onerror) { + defer(onerror, err, req, res) + } + + // cannot actually respond + if (headersSent(res)) { + debug('cannot %d after headers sent', status) + req.socket.destroy() + return + } + + // send response + send(req, res, status, headers, msg) + } +} + +/** + * Get headers from Error object. + * + * @param {Error} err + * @return {object} + * @private + */ + +function getErrorHeaders (err) { + if (!err.headers || typeof err.headers !== 'object') { + return undefined + } + + var headers = Object.create(null) + var keys = Object.keys(err.headers) + + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + headers[key] = err.headers[key] + } + + return headers +} + +/** + * Get message from Error object, fallback to status message. + * + * @param {Error} err + * @param {number} status + * @param {string} env + * @return {string} + * @private + */ + +function getErrorMessage (err, status, env) { + var msg + + if (env !== 'production') { + // use err.stack, which typically includes err.message + msg = err.stack + + // fallback to err.toString() when possible + if (!msg && typeof err.toString === 'function') { + msg = err.toString() + } + } + + return msg || statuses[status] +} + +/** + * Get status code from Error object. + * + * @param {Error} err + * @return {number} + * @private + */ + +function getErrorStatusCode (err) { + // check err.status + if (typeof err.status === 'number' && err.status >= 400 && err.status < 600) { + return err.status + } + + // check err.statusCode + if (typeof err.statusCode === 'number' && err.statusCode >= 400 && err.statusCode < 600) { + return err.statusCode + } + + return undefined +} + +/** + * Get status code from response. + * + * @param {OutgoingMessage} res + * @return {number} + * @private + */ + +function getResponseStatusCode (res) { + var status = res.statusCode + + // default status code to 500 if outside valid range + if (typeof status !== 'number' || status < 400 || status > 599) { + status = 500 + } + + return status +} + +/** + * Determine if the response headers have been sent. + * + * @param {object} res + * @returns {boolean} + * @private + */ + +function headersSent (res) { + return typeof res.headersSent !== 'boolean' + ? Boolean(res._header) + : res.headersSent +} + +/** + * Send response. + * + * @param {IncomingMessage} req + * @param {OutgoingMessage} res + * @param {number} status + * @param {object} headers + * @param {string} message + * @private + */ + +function send (req, res, status, headers, message) { + function write () { + // response body + var body = createHtmlDocument(message) + + // response status + res.statusCode = status + res.statusMessage = statuses[status] + + // response headers + setHeaders(res, headers) + + // security headers + res.setHeader('Content-Security-Policy', "default-src 'self'") + res.setHeader('X-Content-Type-Options', 'nosniff') + + // standard headers + res.setHeader('Content-Type', 'text/html; charset=utf-8') + res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8')) + + if (req.method === 'HEAD') { + res.end() + return + } + + res.end(body, 'utf8') + } + + if (isFinished(req)) { + write() + return + } + + // unpipe everything from the request + unpipe(req) + + // flush the request + onFinished(req, write) + req.resume() +} + +/** + * Set response headers from an object. + * + * @param {OutgoingMessage} res + * @param {object} headers + * @private + */ + +function setHeaders (res, headers) { + if (!headers) { + return + } + + var keys = Object.keys(headers) + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + res.setHeader(key, headers[key]) + } +} diff --git a/node_modules/finalhandler/node_modules/statuses/HISTORY.md b/node_modules/finalhandler/node_modules/statuses/HISTORY.md new file mode 100644 index 0000000..3015a5f --- /dev/null +++ b/node_modules/finalhandler/node_modules/statuses/HISTORY.md @@ -0,0 +1,55 @@ +1.3.1 / 2016-11-11 +================== + + * Fix return type in JSDoc + +1.3.0 / 2016-05-17 +================== + + * Add `421 Misdirected Request` + * perf: enable strict mode + +1.2.1 / 2015-02-01 +================== + + * Fix message for status 451 + - `451 Unavailable For Legal Reasons` + +1.2.0 / 2014-09-28 +================== + + * Add `208 Already Repored` + * Add `226 IM Used` + * Add `306 (Unused)` + * Add `415 Unable For Legal Reasons` + * Add `508 Loop Detected` + +1.1.1 / 2014-09-24 +================== + + * Add missing 308 to `codes.json` + +1.1.0 / 2014-09-21 +================== + + * Add `codes.json` for universal support + +1.0.4 / 2014-08-20 +================== + + * Package cleanup + +1.0.3 / 2014-06-08 +================== + + * Add 308 to `.redirect` category + +1.0.2 / 2014-03-13 +================== + + * Add `.retry` category + +1.0.1 / 2014-03-12 +================== + + * Initial release diff --git a/node_modules/finalhandler/node_modules/statuses/LICENSE b/node_modules/finalhandler/node_modules/statuses/LICENSE new file mode 100644 index 0000000..82af4df --- /dev/null +++ b/node_modules/finalhandler/node_modules/statuses/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.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/node_modules/finalhandler/node_modules/statuses/README.md b/node_modules/finalhandler/node_modules/statuses/README.md new file mode 100644 index 0000000..2bf0756 --- /dev/null +++ b/node_modules/finalhandler/node_modules/statuses/README.md @@ -0,0 +1,103 @@ +# Statuses + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP status utility for node. + +## API + +```js +var status = require('statuses') +``` + +### var code = status(Integer || String) + +If `Integer` or `String` is a valid HTTP code or status message, then the appropriate `code` will be returned. Otherwise, an error will be thrown. + +```js +status(403) // => 403 +status('403') // => 403 +status('forbidden') // => 403 +status('Forbidden') // => 403 +status(306) // throws, as it's not supported by node.js +``` + +### status.codes + +Returns an array of all the status codes as `Integer`s. + +### var msg = status[code] + +Map of `code` to `status message`. `undefined` for invalid `code`s. + +```js +status[404] // => 'Not Found' +``` + +### var code = status[msg] + +Map of `status message` to `code`. `msg` can either be title-cased or lower-cased. `undefined` for invalid `status message`s. + +```js +status['not found'] // => 404 +status['Not Found'] // => 404 +``` + +### status.redirect[code] + +Returns `true` if a status code is a valid redirect status. + +```js +status.redirect[200] // => undefined +status.redirect[301] // => true +``` + +### status.empty[code] + +Returns `true` if a status code expects an empty body. + +```js +status.empty[200] // => undefined +status.empty[204] // => true +status.empty[304] // => true +``` + +### status.retry[code] + +Returns `true` if you should retry the rest. + +```js +status.retry[501] // => undefined +status.retry[503] // => true +``` + +## Adding Status Codes + +The status codes are primarily sourced from http://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv. +Additionally, custom codes are added from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes. +These are added manually in the `lib/*.json` files. +If you would like to add a status code, add it to the appropriate JSON file. + +To rebuild `codes.json`, run the following: + +```bash +# update src/iana.json +npm run fetch +# build codes.json +npm run build +``` + +[npm-image]: https://img.shields.io/npm/v/statuses.svg +[npm-url]: https://npmjs.org/package/statuses +[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg +[travis-url]: https://travis-ci.org/jshttp/statuses +[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg +[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master +[downloads-image]: https://img.shields.io/npm/dm/statuses.svg +[downloads-url]: https://npmjs.org/package/statuses diff --git a/node_modules/finalhandler/node_modules/statuses/codes.json b/node_modules/finalhandler/node_modules/statuses/codes.json new file mode 100644 index 0000000..e765123 --- /dev/null +++ b/node_modules/finalhandler/node_modules/statuses/codes.json @@ -0,0 +1,65 @@ +{ + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "306": "(Unused)", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} \ No newline at end of file diff --git a/node_modules/finalhandler/node_modules/statuses/index.js b/node_modules/finalhandler/node_modules/statuses/index.js new file mode 100644 index 0000000..9f955c6 --- /dev/null +++ b/node_modules/finalhandler/node_modules/statuses/index.js @@ -0,0 +1,110 @@ +/*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var codes = require('./codes.json') + +/** + * Module exports. + * @public + */ + +module.exports = status + +// array of status codes +status.codes = populateStatusesMap(status, codes) + +// status codes for redirects +status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true +} + +// status codes for empty bodies +status.empty = { + 204: true, + 205: true, + 304: true +} + +// status codes for when you should retry the request +status.retry = { + 502: true, + 503: true, + 504: true +} + +/** + * Populate the statuses map for given codes. + * @private + */ + +function populateStatusesMap (statuses, codes) { + var arr = [] + + Object.keys(codes).forEach(function forEachCode (code) { + var message = codes[code] + var status = Number(code) + + // Populate properties + statuses[status] = message + statuses[message] = status + statuses[message.toLowerCase()] = status + + // Add to array + arr.push(status) + }) + + return arr +} + +/** + * Get the status code. + * + * Given a number, this will throw if it is not a known status + * code, otherwise the code will be returned. Given a string, + * the string will be parsed for a number and return the code + * if valid, otherwise will lookup the code assuming this is + * the status message. + * + * @param {string|number} code + * @returns {number} + * @public + */ + +function status (code) { + if (typeof code === 'number') { + if (!status[code]) throw new Error('invalid status code: ' + code) + return code + } + + if (typeof code !== 'string') { + throw new TypeError('code must be a number or string') + } + + // '403' + var n = parseInt(code, 10) + if (!isNaN(n)) { + if (!status[n]) throw new Error('invalid status code: ' + n) + return n + } + + n = status[code.toLowerCase()] + if (!n) throw new Error('invalid status message: "' + code + '"') + return n +} diff --git a/node_modules/finalhandler/node_modules/statuses/package.json b/node_modules/finalhandler/node_modules/statuses/package.json new file mode 100644 index 0000000..1867233 --- /dev/null +++ b/node_modules/finalhandler/node_modules/statuses/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "statuses@1.3.1", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "statuses@1.3.1", + "_id": "statuses@1.3.1", + "_inBundle": false, + "_integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "_location": "/finalhandler/statuses", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "statuses@1.3.1", + "name": "statuses", + "escapedName": "statuses", + "rawSpec": "1.3.1", + "saveSpec": null, + "fetchSpec": "1.3.1" + }, + "_requiredBy": [ + "/finalhandler" + ], + "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "_spec": "1.3.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/jshttp/statuses/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "description": "HTTP status utility", + "devDependencies": { + "csv-parse": "1.1.7", + "eslint": "3.10.0", + "eslint-config-standard": "6.2.1", + "eslint-plugin-promise": "3.3.2", + "eslint-plugin-standard": "2.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5", + "stream-to-array": "2.3.0" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "index.js", + "codes.json", + "LICENSE" + ], + "homepage": "https://github.com/jshttp/statuses#readme", + "keywords": [ + "http", + "status", + "code" + ], + "license": "MIT", + "name": "statuses", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/statuses.git" + }, + "scripts": { + "build": "node scripts/build.js", + "fetch": "node scripts/fetch.js", + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "update": "npm run fetch && npm run build" + }, + "version": "1.3.1" +} diff --git a/node_modules/finalhandler/package.json b/node_modules/finalhandler/package.json new file mode 100644 index 0000000..ba8b30c --- /dev/null +++ b/node_modules/finalhandler/package.json @@ -0,0 +1,83 @@ +{ + "_args": [ + [ + "finalhandler@1.1.0", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "finalhandler@1.1.0", + "_id": "finalhandler@1.1.0", + "_inBundle": false, + "_integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "_location": "/finalhandler", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "finalhandler@1.1.0", + "name": "finalhandler", + "escapedName": "finalhandler", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/express" + ], + "_resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + "bugs": { + "url": "https://github.com/pillarjs/finalhandler/issues" + }, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + }, + "description": "Node.js final http responder", + "devDependencies": { + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "2.5.3", + "readable-stream": "2.3.3", + "safe-buffer": "5.1.1", + "supertest": "1.1.0" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "homepage": "https://github.com/pillarjs/finalhandler#readme", + "license": "MIT", + "name": "finalhandler", + "repository": { + "type": "git", + "url": "git+https://github.com/pillarjs/finalhandler.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" + }, + "version": "1.1.0" +} diff --git a/node_modules/find-up/index.js b/node_modules/find-up/index.js new file mode 100644 index 0000000..939c955 --- /dev/null +++ b/node_modules/find-up/index.js @@ -0,0 +1,48 @@ +'use strict'; +const path = require('path'); +const locatePath = require('locate-path'); + +module.exports = (filename, opts) => { + opts = opts || {}; + + const startDir = path.resolve(opts.cwd || ''); + const root = path.parse(startDir).root; + + const filenames = [].concat(filename); + + return new Promise(resolve => { + (function find(dir) { + locatePath(filenames, {cwd: dir}).then(file => { + if (file) { + resolve(path.join(dir, file)); + } else if (dir === root) { + resolve(null); + } else { + find(path.dirname(dir)); + } + }); + })(startDir); + }); +}; + +module.exports.sync = (filename, opts) => { + opts = opts || {}; + + let dir = path.resolve(opts.cwd || ''); + const root = path.parse(dir).root; + + const filenames = [].concat(filename); + + // eslint-disable-next-line no-constant-condition + while (true) { + const file = locatePath.sync(filenames, {cwd: dir}); + + if (file) { + return path.join(dir, file); + } else if (dir === root) { + return null; + } + + dir = path.dirname(dir); + } +}; diff --git a/node_modules/find-up/license b/node_modules/find-up/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/find-up/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/node_modules/find-up/package.json b/node_modules/find-up/package.json new file mode 100644 index 0000000..ea683e5 --- /dev/null +++ b/node_modules/find-up/package.json @@ -0,0 +1,85 @@ +{ + "_from": "find-up@^2.0.0", + "_id": "find-up@2.1.0", + "_inBundle": false, + "_integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "_location": "/find-up", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "find-up@^2.0.0", + "name": "find-up", + "escapedName": "find-up", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/read-pkg-up" + ], + "_resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "_shasum": "45d1b7e506c717ddd482775a2b77920a3c0c57a7", + "_spec": "find-up@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/read-pkg-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/find-up/issues" + }, + "bundleDependencies": false, + "dependencies": { + "locate-path": "^2.0.0" + }, + "deprecated": false, + "description": "Find a file by walking up parent directories", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.1", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/find-up#readme", + "keywords": [ + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "dir", + "walk", + "walking", + "path" + ], + "license": "MIT", + "name": "find-up", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/find-up.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/find-up/readme.md b/node_modules/find-up/readme.md new file mode 100644 index 0000000..b5ad694 --- /dev/null +++ b/node_modules/find-up/readme.md @@ -0,0 +1,85 @@ +# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master) + +> Find a file by walking up parent directories + + +## Install + +``` +$ npm install --save find-up +``` + + +## Usage + +``` +/ +└── Users + └── sindresorhus + ├── unicorn.png + └── foo + └── bar + ├── baz + └── example.js +``` + +```js +// example.js +const findUp = require('find-up'); + +findUp('unicorn.png').then(filepath => { + console.log(filepath); + //=> '/Users/sindresorhus/unicorn.png' +}); + +findUp(['rainbow.png', 'unicorn.png']).then(filepath => { + console.log(filepath); + //=> '/Users/sindresorhus/unicorn.png' +}); +``` + + +## API + +### findUp(filename, [options]) + +Returns a `Promise` for the filepath or `null`. + +### findUp([filenameA, filenameB], [options]) + +Returns a `Promise` for the first filepath found (by respecting the order) or `null`. + +### findUp.sync(filename, [options]) + +Returns a filepath or `null`. + +### findUp.sync([filenameA, filenameB], [options]) + +Returns the first filepath found (by respecting the order) or `null`. + +#### filename + +Type: `string` + +Filename of the file to find. + +#### options + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Directory to start from. + + +## 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 + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/for-in/LICENSE b/node_modules/for-in/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/for-in/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/for-in/README.md b/node_modules/for-in/README.md new file mode 100644 index 0000000..874e189 --- /dev/null +++ b/node_modules/for-in/README.md @@ -0,0 +1,85 @@ +# for-in [![NPM version](https://img.shields.io/npm/v/for-in.svg?style=flat)](https://www.npmjs.com/package/for-in) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![NPM total downloads](https://img.shields.io/npm/dt/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-in.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-in) + +> Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save for-in +``` + +## Usage + +```js +var forIn = require('for-in'); + +var obj = {a: 'foo', b: 'bar', c: 'baz'}; +var values = []; +var keys = []; + +forIn(obj, function (value, key, o) { + keys.push(key); + values.push(value); +}); + +console.log(keys); +//=> ['a', 'b', 'c']; + +console.log(values); +//=> ['foo', 'bar', 'baz']; +``` + +## About + +### Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") +* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 16 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulirish](https://github.com/paulirish) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 28, 2017._ \ No newline at end of file diff --git a/node_modules/for-in/index.js b/node_modules/for-in/index.js new file mode 100644 index 0000000..0b5f95f --- /dev/null +++ b/node_modules/for-in/index.js @@ -0,0 +1,16 @@ +/*! + * for-in + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function forIn(obj, fn, thisArg) { + for (var key in obj) { + if (fn.call(thisArg, obj[key], key, obj) === false) { + break; + } + } +}; diff --git a/node_modules/for-in/package.json b/node_modules/for-in/package.json new file mode 100644 index 0000000..b7cc619 --- /dev/null +++ b/node_modules/for-in/package.json @@ -0,0 +1,106 @@ +{ + "_from": "for-in@^1.0.2", + "_id": "for-in@1.0.2", + "_inBundle": false, + "_integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "_location": "/for-in", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "for-in@^1.0.2", + "name": "for-in", + "escapedName": "for-in", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/mixin-deep" + ], + "_resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "_shasum": "81068d295a8142ec0ac726c6e2200c30fb6d5e80", + "_spec": "for-in@^1.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/mixin-deep", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/for-in/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Paul Irish", + "url": "http://paulirish.com" + } + ], + "deprecated": false, + "description": "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js", + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/for-in", + "keywords": [ + "for", + "for-in", + "for-own", + "has", + "has-own", + "hasOwn", + "in", + "key", + "keys", + "object", + "own", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "for-in", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/for-in.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "collection-map", + "for-own" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.2" +} diff --git a/node_modules/forwarded/HISTORY.md b/node_modules/forwarded/HISTORY.md new file mode 100644 index 0000000..2599a55 --- /dev/null +++ b/node_modules/forwarded/HISTORY.md @@ -0,0 +1,16 @@ +0.1.2 / 2017-09-14 +================== + + * perf: improve header parsing + * perf: reduce overhead when no `X-Forwarded-For` header + +0.1.1 / 2017-09-10 +================== + + * Fix trimming leading / trailing OWS + * perf: hoist regular expression + +0.1.0 / 2014-09-21 +================== + + * Initial release diff --git a/node_modules/forwarded/LICENSE b/node_modules/forwarded/LICENSE new file mode 100644 index 0000000..84441fb --- /dev/null +++ b/node_modules/forwarded/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +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/node_modules/forwarded/README.md b/node_modules/forwarded/README.md new file mode 100644 index 0000000..c776ee5 --- /dev/null +++ b/node_modules/forwarded/README.md @@ -0,0 +1,57 @@ +# forwarded + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Parse HTTP X-Forwarded-For header + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install forwarded +``` + +## API + +```js +var forwarded = require('forwarded') +``` + +### forwarded(req) + +```js +var addresses = forwarded(req) +``` + +Parse the `X-Forwarded-For` header from the request. Returns an array +of the addresses, including the socket address for the `req`, in reverse +order (i.e. index `0` is the socket address and the last index is the +furthest address, typically the end-user). + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/forwarded.svg +[npm-url]: https://npmjs.org/package/forwarded +[node-version-image]: https://img.shields.io/node/v/forwarded.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/forwarded/master.svg +[travis-url]: https://travis-ci.org/jshttp/forwarded +[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master +[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg +[downloads-url]: https://npmjs.org/package/forwarded diff --git a/node_modules/forwarded/index.js b/node_modules/forwarded/index.js new file mode 100644 index 0000000..7833b3d --- /dev/null +++ b/node_modules/forwarded/index.js @@ -0,0 +1,76 @@ +/*! + * forwarded + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = forwarded + +/** + * Get all addresses in the request, using the `X-Forwarded-For` header. + * + * @param {object} req + * @return {array} + * @public + */ + +function forwarded (req) { + if (!req) { + throw new TypeError('argument req is required') + } + + // simple header parsing + var proxyAddrs = parse(req.headers['x-forwarded-for'] || '') + var socketAddr = req.connection.remoteAddress + var addrs = [socketAddr].concat(proxyAddrs) + + // return all addresses + return addrs +} + +/** + * Parse the X-Forwarded-For header. + * + * @param {string} header + * @private + */ + +function parse (header) { + var end = header.length + var list = [] + var start = header.length + + // gather addresses, backwards + for (var i = header.length - 1; i >= 0; i--) { + switch (header.charCodeAt(i)) { + case 0x20: /* */ + if (start === end) { + start = end = i + } + break + case 0x2c: /* , */ + if (start !== end) { + list.push(header.substring(start, end)) + } + start = end = i + break + default: + start = i + break + } + } + + // final address + if (start !== end) { + list.push(header.substring(start, end)) + } + + return list +} diff --git a/node_modules/forwarded/package.json b/node_modules/forwarded/package.json new file mode 100644 index 0000000..e2ef9ce --- /dev/null +++ b/node_modules/forwarded/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "forwarded@0.1.2", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "forwarded@0.1.2", + "_id": "forwarded@0.1.2", + "_inBundle": false, + "_integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "_location": "/forwarded", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "forwarded@0.1.2", + "name": "forwarded", + "escapedName": "forwarded", + "rawSpec": "0.1.2", + "saveSpec": null, + "fetchSpec": "0.1.2" + }, + "_requiredBy": [ + "/proxy-addr" + ], + "_resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "_spec": "0.1.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/jshttp/forwarded/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "description": "Parse HTTP X-Forwarded-For header", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "homepage": "https://github.com/jshttp/forwarded#readme", + "keywords": [ + "x-forwarded-for", + "http", + "req" + ], + "license": "MIT", + "name": "forwarded", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/forwarded.git" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "0.1.2" +} diff --git a/node_modules/fragment-cache/LICENSE b/node_modules/fragment-cache/LICENSE new file mode 100644 index 0000000..b11cb79 --- /dev/null +++ b/node_modules/fragment-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2017, Jon Schlinkert + +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/node_modules/fragment-cache/README.md b/node_modules/fragment-cache/README.md new file mode 100644 index 0000000..541ef0f --- /dev/null +++ b/node_modules/fragment-cache/README.md @@ -0,0 +1,156 @@ +# fragment-cache [![NPM version](https://img.shields.io/npm/v/fragment-cache.svg?style=flat)](https://www.npmjs.com/package/fragment-cache) [![NPM downloads](https://img.shields.io/npm/dm/fragment-cache.svg?style=flat)](https://npmjs.org/package/fragment-cache) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fragment-cache.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fragment-cache) + +> A cache for managing namespaced sub-caches + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save fragment-cache +``` + +## Usage + +```js +var Fragment = require('fragment-cache'); +var fragment = new Fragment(); +``` + +## API + +### [FragmentCache](index.js#L24) + +Create a new `FragmentCache` with an optional object to use for `caches`. + +**Example** + +```js +var fragment = new FragmentCache(); +``` + +**Params** + +* `cacheName` **{String}** +* `returns` **{Object}**: Returns the [map-cache](https://github.com/jonschlinkert/map-cache) instance. + +### [.cache](index.js#L49) + +Get cache `name` from the `fragment.caches` object. Creates a new `MapCache` if it doesn't already exist. + +**Example** + +```js +var cache = fragment.cache('files'); +console.log(fragment.caches.hasOwnProperty('files')); +//=> true +``` + +**Params** + +* `cacheName` **{String}** +* `returns` **{Object}**: Returns the [map-cache](https://github.com/jonschlinkert/map-cache) instance. + +### [.set](index.js#L67) + +Set a value for property `key` on cache `name` + +**Example** + +```js +fragment.set('files', 'somefile.js', new File({path: 'somefile.js'})); +``` + +**Params** + +* `name` **{String}** +* `key` **{String}**: Property name to set +* `val` **{any}**: The value of `key` +* `returns` **{Object}**: The cache instance for chaining + +### [.has](index.js#L93) + +Returns true if a non-undefined value is set for `key` on fragment cache `name`. + +**Example** + +```js +var cache = fragment.cache('files'); +cache.set('somefile.js'); + +console.log(cache.has('somefile.js')); +//=> true + +console.log(cache.has('some-other-file.js')); +//=> false +``` + +**Params** + +* `name` **{String}**: Cache name +* `key` **{String}**: Optionally specify a property to check for on cache `name` +* `returns` **{Boolean}** + +### [.get](index.js#L115) + +Get `name`, or if specified, the value of `key`. Invokes the [cache](#cache) method, so that cache `name` will be created it doesn't already exist. If `key` is not passed, the entire cache (`name`) is returned. + +**Example** + +```js +var Vinyl = require('vinyl'); +var cache = fragment.cache('files'); +cache.set('somefile.js', new Vinyl({path: 'somefile.js'})); +console.log(cache.get('somefile.js')); +//=> +``` + +**Params** + +* `name` **{String}** +* `returns` **{Object}**: Returns cache `name`, or the value of `key` if specified + +## About + +### Related projects + +* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [map-cache](https://www.npmjs.com/package/map-cache): Basic cache object for storing key-value pairs. | [homepage](https://github.com/jonschlinkert/map-cache "Basic cache object for storing key-value pairs.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/fragment-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 17, 2016._ \ No newline at end of file diff --git a/node_modules/fragment-cache/index.js b/node_modules/fragment-cache/index.js new file mode 100644 index 0000000..8ce6216 --- /dev/null +++ b/node_modules/fragment-cache/index.js @@ -0,0 +1,128 @@ +/*! + * fragment-cache + * + * Copyright (c) 2016-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var MapCache = require('map-cache'); + +/** + * Create a new `FragmentCache` with an optional object to use for `caches`. + * + * ```js + * var fragment = new FragmentCache(); + * ``` + * @name FragmentCache + * @param {String} `cacheName` + * @return {Object} Returns the [map-cache][] instance. + * @api public + */ + +function FragmentCache(caches) { + this.caches = caches || {}; +} + +/** + * Prototype + */ + +FragmentCache.prototype = { + + /** + * Get cache `name` from the `fragment.caches` object. Creates a new + * `MapCache` if it doesn't already exist. + * + * ```js + * var cache = fragment.cache('files'); + * console.log(fragment.caches.hasOwnProperty('files')); + * //=> true + * ``` + * @name .cache + * @param {String} `cacheName` + * @return {Object} Returns the [map-cache][] instance. + * @api public + */ + + cache: function(cacheName) { + return this.caches[cacheName] || (this.caches[cacheName] = new MapCache()); + }, + + /** + * Set a value for property `key` on cache `name` + * + * ```js + * fragment.set('files', 'somefile.js', new File({path: 'somefile.js'})); + * ``` + * @name .set + * @param {String} `name` + * @param {String} `key` Property name to set + * @param {any} `val` The value of `key` + * @return {Object} The cache instance for chaining + * @api public + */ + + set: function(cacheName, key, val) { + var cache = this.cache(cacheName); + cache.set(key, val); + return cache; + }, + + /** + * Returns true if a non-undefined value is set for `key` on fragment cache `name`. + * + * ```js + * var cache = fragment.cache('files'); + * cache.set('somefile.js'); + * + * console.log(cache.has('somefile.js')); + * //=> true + * + * console.log(cache.has('some-other-file.js')); + * //=> false + * ``` + * @name .has + * @param {String} `name` Cache name + * @param {String} `key` Optionally specify a property to check for on cache `name` + * @return {Boolean} + * @api public + */ + + has: function(cacheName, key) { + return typeof this.get(cacheName, key) !== 'undefined'; + }, + + /** + * Get `name`, or if specified, the value of `key`. Invokes the [cache]() method, + * so that cache `name` will be created it doesn't already exist. If `key` is not passed, + * the entire cache (`name`) is returned. + * + * ```js + * var Vinyl = require('vinyl'); + * var cache = fragment.cache('files'); + * cache.set('somefile.js', new Vinyl({path: 'somefile.js'})); + * console.log(cache.get('somefile.js')); + * //=> + * ``` + * @name .get + * @param {String} `name` + * @return {Object} Returns cache `name`, or the value of `key` if specified + * @api public + */ + + get: function(name, key) { + var cache = this.cache(name); + if (typeof key === 'string') { + return cache.get(key); + } + return cache; + } +}; + +/** + * Expose `FragmentCache` + */ + +exports = module.exports = FragmentCache; diff --git a/node_modules/fragment-cache/package.json b/node_modules/fragment-cache/package.json new file mode 100644 index 0000000..509ac18 --- /dev/null +++ b/node_modules/fragment-cache/package.json @@ -0,0 +1,93 @@ +{ + "_from": "fragment-cache@^0.2.1", + "_id": "fragment-cache@0.2.1", + "_inBundle": false, + "_integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "_location": "/fragment-cache", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "fragment-cache@^0.2.1", + "name": "fragment-cache", + "escapedName": "fragment-cache", + "rawSpec": "^0.2.1", + "saveSpec": null, + "fetchSpec": "^0.2.1" + }, + "_requiredBy": [ + "/extglob", + "/micromatch", + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "_shasum": "4290fad27f13e89be7f33799c6bc5a0abfff0d19", + "_spec": "fragment-cache@^0.2.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/fragment-cache/issues" + }, + "bundleDependencies": false, + "dependencies": { + "map-cache": "^0.2.2" + }, + "deprecated": false, + "description": "A cache for managing namespaced sub-caches", + "devDependencies": { + "gulp": "^3.9.1", + "gulp-eslint": "^3.0.1", + "gulp-format-md": "^0.1.11", + "gulp-istanbul": "^1.1.1", + "gulp-mocha": "^3.0.1", + "mocha": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/fragment-cache", + "keywords": [ + "cache", + "fragment" + ], + "license": "MIT", + "main": "index.js", + "name": "fragment-cache", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/fragment-cache.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "map-cache", + "verb" + ], + "related": { + "list": [ + "base", + "map-cache" + ] + }, + "layout": "default", + "toc": false, + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "0.2.1" +} diff --git a/node_modules/fresh/HISTORY.md b/node_modules/fresh/HISTORY.md new file mode 100644 index 0000000..4586996 --- /dev/null +++ b/node_modules/fresh/HISTORY.md @@ -0,0 +1,70 @@ +0.5.2 / 2017-09-13 +================== + + * Fix regression matching multiple ETags in `If-None-Match` + * perf: improve `If-None-Match` token parsing + +0.5.1 / 2017-09-11 +================== + + * Fix handling of modified headers with invalid dates + * perf: improve ETag match loop + +0.5.0 / 2017-02-21 +================== + + * Fix incorrect result when `If-None-Match` has both `*` and ETags + * Fix weak `ETag` matching to match spec + * perf: delay reading header values until needed + * perf: skip checking modified time if ETag check failed + * perf: skip parsing `If-None-Match` when no `ETag` header + * perf: use `Date.parse` instead of `new Date` + +0.4.0 / 2017-02-05 +================== + + * Fix false detection of `no-cache` request directive + * perf: enable strict mode + * perf: hoist regular expressions + * perf: remove duplicate conditional + * perf: remove unnecessary boolean coercions + +0.3.0 / 2015-05-12 +================== + + * Add weak `ETag` matching support + +0.2.4 / 2014-09-07 +================== + + * Support Node.js 0.6 + +0.2.3 / 2014-09-07 +================== + + * Move repository to jshttp + +0.2.2 / 2014-02-19 +================== + + * Revert "Fix for blank page on Safari reload" + +0.2.1 / 2014-01-29 +================== + + * Fix for blank page on Safari reload + +0.2.0 / 2013-08-11 +================== + + * Return stale for `Cache-Control: no-cache` + +0.1.0 / 2012-06-15 +================== + + * Add `If-None-Match: *` support + +0.0.1 / 2012-06-10 +================== + + * Initial release diff --git a/node_modules/fresh/LICENSE b/node_modules/fresh/LICENSE new file mode 100644 index 0000000..1434ade --- /dev/null +++ b/node_modules/fresh/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk +Copyright (c) 2016-2017 Douglas Christopher Wilson + +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/node_modules/fresh/README.md b/node_modules/fresh/README.md new file mode 100644 index 0000000..1c1c680 --- /dev/null +++ b/node_modules/fresh/README.md @@ -0,0 +1,119 @@ +# fresh + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP response freshness testing + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +``` +$ npm install fresh +``` + +## API + + + +```js +var fresh = require('fresh') +``` + +### fresh(reqHeaders, resHeaders) + +Check freshness of the response using request and response headers. + +When the response is still "fresh" in the client's cache `true` is +returned, otherwise `false` is returned to indicate that the client +cache is now stale and the full response should be sent. + +When a client sends the `Cache-Control: no-cache` request header to +indicate an end-to-end reload request, this module will return `false` +to make handling these requests transparent. + +## Known Issues + +This module is designed to only follow the HTTP specifications, not +to work-around all kinda of client bugs (especially since this module +typically does not recieve enough information to understand what the +client actually is). + +There is a known issue that in certain versions of Safari, Safari +will incorrectly make a request that allows this module to validate +freshness of the resource even when Safari does not have a +representation of the resource in the cache. The module +[jumanji](https://www.npmjs.com/package/jumanji) can be used in +an Express application to work-around this issue and also provides +links to further reading on this Safari bug. + +## Example + +### API usage + + + +```js +var reqHeaders = { 'if-none-match': '"foo"' } +var resHeaders = { 'etag': '"bar"' } +fresh(reqHeaders, resHeaders) +// => false + +var reqHeaders = { 'if-none-match': '"foo"' } +var resHeaders = { 'etag': '"foo"' } +fresh(reqHeaders, resHeaders) +// => true +``` + +### Using with Node.js http server + +```js +var fresh = require('fresh') +var http = require('http') + +var server = http.createServer(function (req, res) { + // perform server logic + // ... including adding ETag / Last-Modified response headers + + if (isFresh(req, res)) { + // client has a fresh copy of resource + res.statusCode = 304 + res.end() + return + } + + // send the resource + res.statusCode = 200 + res.end('hello, world!') +}) + +function isFresh (req, res) { + return fresh(req.headers, { + 'etag': res.getHeader('ETag'), + 'last-modified': res.getHeader('Last-Modified') + }) +} + +server.listen(3000) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/fresh.svg +[npm-url]: https://npmjs.org/package/fresh +[node-version-image]: https://img.shields.io/node/v/fresh.svg +[node-version-url]: https://nodejs.org/en/ +[travis-image]: https://img.shields.io/travis/jshttp/fresh/master.svg +[travis-url]: https://travis-ci.org/jshttp/fresh +[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master +[downloads-image]: https://img.shields.io/npm/dm/fresh.svg +[downloads-url]: https://npmjs.org/package/fresh diff --git a/node_modules/fresh/index.js b/node_modules/fresh/index.js new file mode 100644 index 0000000..d154f5a --- /dev/null +++ b/node_modules/fresh/index.js @@ -0,0 +1,137 @@ +/*! + * fresh + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2016-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * RegExp to check for no-cache token in Cache-Control. + * @private + */ + +var CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/ + +/** + * Module exports. + * @public + */ + +module.exports = fresh + +/** + * Check freshness of the response using request and response headers. + * + * @param {Object} reqHeaders + * @param {Object} resHeaders + * @return {Boolean} + * @public + */ + +function fresh (reqHeaders, resHeaders) { + // fields + var modifiedSince = reqHeaders['if-modified-since'] + var noneMatch = reqHeaders['if-none-match'] + + // unconditional request + if (!modifiedSince && !noneMatch) { + return false + } + + // Always return stale when Cache-Control: no-cache + // to support end-to-end reload requests + // https://tools.ietf.org/html/rfc2616#section-14.9.4 + var cacheControl = reqHeaders['cache-control'] + if (cacheControl && CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) { + return false + } + + // if-none-match + if (noneMatch && noneMatch !== '*') { + var etag = resHeaders['etag'] + + if (!etag) { + return false + } + + var etagStale = true + var matches = parseTokenList(noneMatch) + for (var i = 0; i < matches.length; i++) { + var match = matches[i] + if (match === etag || match === 'W/' + etag || 'W/' + match === etag) { + etagStale = false + break + } + } + + if (etagStale) { + return false + } + } + + // if-modified-since + if (modifiedSince) { + var lastModified = resHeaders['last-modified'] + var modifiedStale = !lastModified || !(parseHttpDate(lastModified) <= parseHttpDate(modifiedSince)) + + if (modifiedStale) { + return false + } + } + + return true +} + +/** + * Parse an HTTP Date into a number. + * + * @param {string} date + * @private + */ + +function parseHttpDate (date) { + var timestamp = date && Date.parse(date) + + // istanbul ignore next: guard against date.js Date.parse patching + return typeof timestamp === 'number' + ? timestamp + : NaN +} + +/** + * Parse a HTTP token list. + * + * @param {string} str + * @private + */ + +function parseTokenList (str) { + var end = 0 + var list = [] + var start = 0 + + // gather tokens + for (var i = 0, len = str.length; i < len; i++) { + switch (str.charCodeAt(i)) { + case 0x20: /* */ + if (start === end) { + start = end = i + 1 + } + break + case 0x2c: /* , */ + list.push(str.substring(start, end)) + start = end = i + 1 + break + default: + end = i + 1 + break + } + } + + // final token + list.push(str.substring(start, end)) + + return list +} diff --git a/node_modules/fresh/package.json b/node_modules/fresh/package.json new file mode 100644 index 0000000..6a7cf81 --- /dev/null +++ b/node_modules/fresh/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "fresh@0.5.2", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "fresh@0.5.2", + "_id": "fresh@0.5.2", + "_inBundle": false, + "_integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "_location": "/fresh", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "fresh@0.5.2", + "name": "fresh", + "escapedName": "fresh", + "rawSpec": "0.5.2", + "saveSpec": null, + "fetchSpec": "0.5.2" + }, + "_requiredBy": [ + "/express", + "/send" + ], + "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "_spec": "0.5.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca", + "url": "http://tjholowaychuk.com" + }, + "bugs": { + "url": "https://github.com/jshttp/fresh/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "description": "HTTP response freshness testing", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "homepage": "https://github.com/jshttp/fresh#readme", + "keywords": [ + "fresh", + "http", + "conditional", + "cache" + ], + "license": "MIT", + "name": "fresh", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/fresh.git" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "0.5.2" +} diff --git a/node_modules/from/.npmignore b/node_modules/from/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/from/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/from/.travis.yml b/node_modules/from/.travis.yml new file mode 100644 index 0000000..76db03f --- /dev/null +++ b/node_modules/from/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "node" + - "6" + - "5" + - "4" diff --git a/node_modules/from/LICENSE.APACHE2 b/node_modules/from/LICENSE.APACHE2 new file mode 100644 index 0000000..6366c04 --- /dev/null +++ b/node_modules/from/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/from/LICENSE.MIT b/node_modules/from/LICENSE.MIT new file mode 100644 index 0000000..6eafbd7 --- /dev/null +++ b/node_modules/from/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +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/node_modules/from/index.js b/node_modules/from/index.js new file mode 100644 index 0000000..e3e7bfd --- /dev/null +++ b/node_modules/from/index.js @@ -0,0 +1,68 @@ + +'use strict'; + +var Stream = require('stream') + +// from +// +// a stream that reads from an source. +// source may be an array, or a function. +// from handles pause behaviour for you. + +module.exports = +function from (source) { + if(Array.isArray(source)) { + var source_index = 0, source_len = source.length; + return from (function (i) { + if(source_index < source_len) + this.emit('data', source[source_index++]) + else + this.emit('end') + return true + }) + } + var s = new Stream(), i = 0 + s.ended = false + s.started = false + s.readable = true + s.writable = false + s.paused = false + s.ended = false + s.pause = function () { + s.started = true + s.paused = true + } + function next () { + s.started = true + if(s.ended) return + while(!s.ended && !s.paused && source.call(s, i++, function () { + if(!s.ended && !s.paused) + process.nextTick(next); + })) + ; + } + s.resume = function () { + s.started = true + s.paused = false + next() + } + s.on('end', function () { + s.ended = true + s.readable = false + process.nextTick(s.destroy) + }) + s.destroy = function () { + s.ended = true + s.emit('close') + } + /* + by default, the stream will start emitting at nextTick + if you want, you can pause it, after pipeing. + you can also resume before next tick, and that will also + work. + */ + process.nextTick(function () { + if(!s.started) s.resume() + }) + return s +} diff --git a/node_modules/from/package.json b/node_modules/from/package.json new file mode 100644 index 0000000..9cfbafd --- /dev/null +++ b/node_modules/from/package.json @@ -0,0 +1,59 @@ +{ + "_from": "from@~0", + "_id": "from@0.1.7", + "_inBundle": false, + "_integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "_location": "/from", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "from@~0", + "name": "from", + "escapedName": "from", + "rawSpec": "~0", + "saveSpec": null, + "fetchSpec": "~0" + }, + "_requiredBy": [ + "/event-stream" + ], + "_resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "_shasum": "83c60afc58b9c56997007ed1a768b3ab303a44fe", + "_spec": "from@~0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/event-stream", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "bugs": { + "url": "https://github.com/dominictarr/from/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Easy way to make a Readable Stream", + "devDependencies": { + "assertions": "~2.3.0", + "asynct": "1", + "stream-spec": "0" + }, + "homepage": "https://github.com/dominictarr/from#readme", + "keywords": [ + "stream", + "streams", + "readable", + "easy" + ], + "license": "MIT", + "main": "index.js", + "name": "from", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/from.git" + }, + "scripts": { + "test": "asynct test/*.js" + }, + "version": "0.1.7" +} diff --git a/node_modules/from/readme.markdown b/node_modules/from/readme.markdown new file mode 100644 index 0000000..c84fc9b --- /dev/null +++ b/node_modules/from/readme.markdown @@ -0,0 +1,40 @@ +[![TravisCI Build Status](https://travis-ci.org/nmhnmh/from.svg?branch=master)](https://travis-ci.org/nmhnmh/from) + +# from + +An easy way to create a `readable Stream`. + +## from(function getChunk(count, next)) + +from takes a `getChunk` function and returns a stream. + +`getChunk` is called again and again, after each time the user calls `next()`, +until the user emits `'end'` + +if `pause()` is called, the `getChunk` won't be called again untill `resume()` is called. + + +```js +var from = require('from') + +var stream = + from(function getChunk(count, next) { + //do some sort of data + this.emit('data', whatever) + + if(itsOver) + this.emit('end') + + //ready to handle the next chunk + next() + //or, if it's sync: + return true + }) +``` + +## from(array) + +from also takes an `Array` whose elements it emits one after another. + +## License +MIT / Apache2 diff --git a/node_modules/from/test/index.js b/node_modules/from/test/index.js new file mode 100644 index 0000000..5e2f161 --- /dev/null +++ b/node_modules/from/test/index.js @@ -0,0 +1,210 @@ +var from = require('..') +var spec = require('stream-spec') +var a = require('assertions') + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +function pause(stream) { + stream.on('data', function () { + if(Math.random() > 0.1) return + stream.pause() + process.nextTick(function () { + stream.resume() + }) + }) +} + +exports['inc'] = function (test) { + + var fs = from(function (i) { + this.emit('data', i) + if(i >= 99) + return this.emit('end') + return true + }) + + spec(fs).readable().validateOnExit() + + read(fs, function (err, arr) { + test.equal(arr.length, 100) + test.done() + }) +} + +exports['inc - async'] = function (test) { + + var fs = from(function (i, next) { + this.emit('data', i) + if(i >= 99) + return this.emit('end') + next(); + }) + + spec(fs).readable().validateOnExit() + + read(fs, function (err, arr) { + test.equal(arr.length, 100) + test.done() + }) +} + +exports['large stream - from an array'] = function (test) { + + var l = 100000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var fs = from(expected.slice()) + + spec(fs).readable().validateOnExit() + + read(fs, function (err, arr) { + a.deepEqual(arr, expected) + test.done() + }) +} + +exports['large stream - callback return true'] = function (test) { + + var fs = from(function (i, next) { + this.emit('data', i) + if(i >= 99999) + return this.emit('end') + return true; + }) + + spec(fs).readable().validateOnExit() + + read(fs, function (err, arr) { + test.equal(arr.length, 100000) + test.done() + }) +} + +exports['large stream - callback call next()'] = function (test) { + + var fs = from(function (i, next) { + this.emit('data', i) + if(i >= 99999) + return this.emit('end') + next(); + }) + + spec(fs).readable().validateOnExit() + + read(fs, function (err, arr) { + test.equal(arr.length, 100000) + test.done() + }) +} + +exports['simple'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = from(expected.slice()) + + spec(t) + .readable() + .pausable({strict: true}) + .validateOnExit() + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + +} + +exports['simple pausable'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = from(expected.slice()) + + spec(t) + .readable() + .pausable({strict: true}) + .validateOnExit() + + pause(t) + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + +} + +exports['simple (not strictly pausable) setTimeout'] = function (test) { + + var l = 10 + , expected = [] + while(l--) expected.push(l * Math.random()) + + + var _expected = expected.slice() + var t = from(function (i, n) { + var self = this + setTimeout(function () { + if(_expected.length) + self.emit('data', _expected.shift()) + else + if(!self.ended) + self.emit('end') + n() + }, 3) + }) + + /* + using from in this way will not be strictly pausable. + it could be extended to buffer outputs, but I think a better + way would be to use a PauseStream that implements strict pause. + */ + + spec(t) + .readable() + .pausable({strict: false }) + .validateOnExit() + + //pause(t) + var paused = false + var i = setInterval(function () { + if(!paused) t.pause() + else t.resume() + paused = !paused + }, 2) + + t.on('end', function () { + clearInterval(i) + }) + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + +} + + diff --git a/node_modules/fs-extra/CHANGELOG.md b/node_modules/fs-extra/CHANGELOG.md new file mode 100644 index 0000000..f5a8cf4 --- /dev/null +++ b/node_modules/fs-extra/CHANGELOG.md @@ -0,0 +1,812 @@ +5.0.0 / 2017-12-11 +------------------ + +Significant refactor of `copy()` & `copySync()`, including breaking changes. No changes to other functions in this release. + +Huge thanks to **[@manidlou](https://github.com/manidlou)** for doing most of the work on this release. + +- The `filter` option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. [#512](https://github.com/jprichardson/node-fs-extra/pull/512) +- `copy()`'s `filter` option can now be a function that returns a Promise. [#518](https://github.com/jprichardson/node-fs-extra/pull/518) +- `copy()` & `copySync()` now use `fs.copyFile()`/`fs.copyFileSync()` in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. [#505](https://github.com/jprichardson/node-fs-extra/pull/505) +- Don't allow copying a directory into itself. [#83](https://github.com/jprichardson/node-fs-extra/issues/83) +- Handle copying between identical files. [#198](https://github.com/jprichardson/node-fs-extra/issues/198) +- Error out when copying an empty folder to a path that already exists. [#464](https://github.com/jprichardson/node-fs-extra/issues/464) +- Don't create `dest`'s parent if the `filter` function aborts the `copy()` operation. [#517](https://github.com/jprichardson/node-fs-extra/pull/517) +- Fix `writeStream` not being closed if there was an error in `copy()`. [#516](https://github.com/jprichardson/node-fs-extra/pull/516) + +4.0.3 / 2017-12-05 +------------------ + +- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501) +- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520) + +4.0.2 / 2017-09-12 +------------------ + +- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4) +- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+ +- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485) + +4.0.1 / 2017-07-31 +------------------ + +### Fixed + +- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470) + +4.0.0 / 2017-07-14 +------------------ + +### Changed + +- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449) +- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458) +- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459) + +### Fixed + +- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428) + +Also clarified the docs in a few places. + +3.0.1 / 2017-05-04 +------------------ + +- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415) + +3.0.0 / 2017-04-27 +------------------ + +### Added + +- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403) +- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406) + +### Removed + +- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402) + +### Changed + +- Upgraded jsonfile dependency to v3.0.0: + - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`. +- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402) +- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394) + +### Fixed + +- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408) + +2.1.2 / 2017-03-16 +------------------ + +### Fixed + +- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393) + +2.1.1 / 2017-03-15 +------------------ + +### Fixed + +- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`. +- Remove `Buffer.alloc()` usage in `moveSync()`. + +2.1.0 / 2017-03-15 +------------------ + +Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release! + +### Added +- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou)) +- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou)) + +### Changed +- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou)) +- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264) +- Refactored docs. ([@manidlou](https://github.com/manidlou)) + +### Fixed + +- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton)) + +2.0.0 / 2017-01-16 +------------------ + +### Removed +- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it +on Jan 1st, 2017. +- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little +over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just +an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339] + +### Changed +- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333] +- Moved docs, to `docs/`. [#340] + +### Fixed +- Apply filters to directories in `copySync()` like in `copy()`. [#324] +- A specific condition when disk is under heavy use, `copy()` can fail. [#326] + + +1.0.0 / 2016-11-01 +------------------ + +After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes +to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release! + +### Added +- `walkSync()` + +### Changed +- **BREAKING**: dropped Node v0.10 support. +- disabled `rimaf` globbing, wasn't used. [#280] +- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function. +- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300] + +### Fixed +- bug fix proper closing of file handle on `utimesMillis()` [#271] +- proper escaping of files with dollar signs [#291] +- `copySync()` failed if user didn't own file. [#199], [#301] + + +0.30.0 / 2016-04-28 +------------------- +- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**. + +0.29.0 / 2016-04-27 +------------------- +- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well. + +0.28.0 / 2016-04-17 +------------------- +- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192] +- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237] +- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93] + +0.27.0 / 2016-04-15 +------------------- +- add `dereference` option to `copySync()`. [#235][#235] + +0.26.7 / 2016-03-16 +------------------- +- fixed `copy()` if source and dest are the same. [#230][#230] + +0.26.6 / 2016-03-15 +------------------- +- fixed if `emptyDir()` does not have a callback: [#229][#229] + +0.26.5 / 2016-01-27 +------------------- +- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215] + +0.26.4 / 2016-01-05 +------------------- +- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208] + +0.26.3 / 2015-12-17 +------------------- +- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193] + +0.26.2 / 2015-11-02 +------------------- +- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces` + +0.26.1 / 2015-11-02 +------------------- +- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190] + +0.26.0 / 2015-10-25 +------------------- +- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw). + +0.25.0 / 2015-10-24 +------------------- +- now has a file walker `walk()` + +0.24.0 / 2015-08-28 +------------------- +- removed alias `delete()` and `deleteSync()`. See: [#171][#171] + +0.23.1 / 2015-08-07 +------------------- +- Better handling of errors for `move()` when moving across devices. [#170][#170] +- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169] + +0.23.0 / 2015-08-06 +------------------- +- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165] + +0.22.1 / 2015-07-09 +------------------- +- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149]. +Fixes regression that was introduced in `0.21.0`. + +0.22.0 / 2015-07-09 +------------------- +- preserve permissions / ownership in `copy()`. See: [#54][#54] + +0.21.0 / 2015-07-04 +------------------- +- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141] +- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks) + +0.20.1 / 2015-06-23 +------------------- +- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26 + +0.20.0 / 2015-06-19 +------------------- +- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g. +this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`. +- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code. +- started moving tests inline +- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()` + +0.19.0 / 2015-06-08 +------------------- +- `fs.copy()` had support for Node v0.8, dropped support + +0.18.4 / 2015-05-22 +------------------- +- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0 + +0.18.3 / 2015-05-08 +------------------- +- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134] + +0.18.2 / 2015-04-17 +------------------- +- bugfix: allow `F_OK` ([#120][#120]) + +0.18.1 / 2015-04-15 +------------------- +- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b +- fixed a lot of tests for Windows (appveyor) + +0.18.0 / 2015-03-31 +------------------- +- added `emptyDir()` and `emptyDirSync()` + +0.17.0 / 2015-03-28 +------------------- +- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists). +**Only works with files at the moment.** +- `createOutputStream()` added. See: [#118][#118] + +0.16.5 / 2015-03-08 +------------------- +- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114] + +0.16.4 / 2015-03-01 +------------------- +- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66 + +0.16.3 / 2015-01-28 +------------------- +- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9 + + +0.16.2 / 2015-01-28 +------------------- +- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future) + +0.16.1 / 2015-01-28 +------------------- +- if `setImmediate` is not available, fall back to `process.nextTick` + +0.16.0 / 2015-01-28 +------------------- +- bugfix `fs.move()` into itself. Closes [#104] +- bugfix `fs.move()` moving directory across device. Closes [#108] +- added coveralls support +- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98] +- misc fs.copy code cleanups + +0.15.0 / 2015-01-21 +------------------- +- dropped `ncp`, imported code in +- because of previous, now supports `io.js` +- `graceful-fs` is now a dependency + +0.14.0 / 2015-01-05 +------------------- +- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100] +- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests) + +0.13.0 / 2014-12-10 +------------------- +- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch) +- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"` +- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59]) + +0.12.0 / 2014-09-22 +------------------- +- copy symlinks in `copySync()` [#85][#85] + +0.11.1 / 2014-09-02 +------------------- +- bugfix `copySync()` preserve file permissions [#80][#80] + +0.11.0 / 2014-08-11 +------------------- +- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"` +- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()` +see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details. + +0.10.0 / 2014-06-29 +------------------ +* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change +from `~` to `^`. [#67] + +0.9.1 / 2014-05-22 +------------------ +* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there + +0.9.0 / 2014-05-22 +------------------ +* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58] +* upgraded `rimraf` from `~2.2.6` to `^2.2.8` +* upgraded `mkdirp` from `0.3.x` to `^0.5.0` +* added methods `ensureFile()`, `ensureFileSync()` +* added methods `ensureDir()`, `ensureDirSync()` [#31] +* added `move()` method. From: https://github.com/andrewrk/node-mv + + +0.8.1 / 2013-10-24 +------------------ +* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39]) + +0.8.0 / 2013-10-14 +------------------ +* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36]) + +0.7.1 / 2013-10-12 +------------------ +* `copySync()` implemented (Srirangan / [#33]) +* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32] + +0.7.0 / 2013-10-07 +------------------ +* update readme conventions +* `copy()` now works if destination directory does not exist. Closes [#29] + +0.6.4 / 2013-09-05 +------------------ +* changed `homepage` field in package.json to remove NPM warning + +0.6.3 / 2013-06-28 +------------------ +* changed JSON spacing default from `4` to `2` to follow Node conventions +* updated `jsonfile` dep +* updated `rimraf` dep + +0.6.2 / 2013-06-28 +------------------ +* added .npmignore, [#25] + +0.6.1 / 2013-05-14 +------------------ +* modified for `strict` mode, closes [#24] +* added `outputJson()/outputJsonSync()`, closes [#23] + +0.6.0 / 2013-03-18 +------------------ +* removed node 0.6 support +* added node 0.10 support +* upgraded to latest `ncp` and `rimraf`. +* optional `graceful-fs` support. Closes [#17] + + +0.5.0 / 2013-02-03 +------------------ +* Removed `readTextFile`. +* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write. +* Restructured documentation a bit. Added roadmap. + +0.4.0 / 2013-01-28 +------------------ +* Set default spaces in `jsonfile` from 4 to 2. +* Updated `testutil` deps for tests. +* Renamed `touch()` to `createFile()` +* Added `outputFile()` and `outputFileSync()` +* Changed creation of testing diretories so the /tmp dir is not littered. +* Added `readTextFile()` and `readTextFileSync()`. + +0.3.2 / 2012-11-01 +------------------ +* Added `touch()` and `touchSync()` methods. + +0.3.1 / 2012-10-11 +------------------ +* Fixed some stray globals. + +0.3.0 / 2012-10-09 +------------------ +* Removed all CoffeeScript from tests. +* Renamed `mkdir` to `mkdirs`/`mkdirp`. + +0.2.1 / 2012-09-11 +------------------ +* Updated `rimraf` dep. + +0.2.0 / 2012-09-10 +------------------ +* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript) +* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile) +* Added Travis-CI. + +0.1.3 / 2012-08-13 +------------------ +* Added method `readJSONFile`. + +0.1.2 / 2012-06-15 +------------------ +* Bug fix: `deleteSync()` didn't exist. +* Verified Node v0.8 compatibility. + +0.1.1 / 2012-06-15 +------------------ +* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed. + +0.1.0 / 2012-05-31 +------------------ +* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too. +* Renamed `rmrf()` to `remove()`. +* `remove()` aliased with `delete()`. +* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`. +* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead. + +0.0.4 / 2012-03-14 +------------------ +* Removed CoffeeScript dependency + +0.0.3 / 2012-01-11 +------------------ +* Added methods rmrf and rmrfSync +* Moved tests from Jasmine to Mocha + + +[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year" +[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme" +[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move" +[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]" +[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]" +[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]" +[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]" +[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value" +[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]" +[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]" +[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]" +[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]" +[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support" +[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]" +[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]" +[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]" +[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]" +[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]" +[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]" +[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]" +[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]" +[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?" +[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative" +[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]" +[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink " +[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists" +[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]" +[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms" +[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]" +[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug." +[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]" +[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters." +[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]" +[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]" +[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]" +[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]" +[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link" +[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage" +[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error" +[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls" +[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]" +[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]" +[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated" +[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]" +[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]" +[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]" +[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]" +[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node" +[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]" +[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]" +[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]" +[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs" +[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]" +[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying" +[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]" +[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error" +[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error" +[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]" +[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function" +[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390" +[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not" +[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()" +[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()" +[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?" +[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing" +[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]" +[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership" +[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options" +[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]" +[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API" +[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]" +[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`" +[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]" +[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error" +[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]" +[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]" +[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111" +[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!" +[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra" +[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?" +[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]" +[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]" +[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()" +[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined" +[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require" +[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty" +[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp" +[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails" +[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme " +[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version" +[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method" +[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists" +[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission" +[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you" +[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)" +[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers" +[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy" +[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package" +[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file" +[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]" +[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories" +[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?" +[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]" +[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream" +[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request" +[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]" +[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread." +[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..." +[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo" +[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)" +[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci" +[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]" +[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. " +[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML" +[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test" +[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir" +[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out" +[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]" +[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory" +[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink" +[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error" +[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync" +[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function" +[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md" +[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods." +[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example" +[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug" +[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug" +[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug" +[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]" +[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag" +[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo" +[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE" +[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files" +[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]" +[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]" +[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]" +[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions" +[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync" +[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]" +[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files" +[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]" +[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?" +[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]" +[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync" +[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]" +[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]" +[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]" +[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]" +[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?" +[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file" +[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]" +[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()" +[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]" +[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true" +[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows" +[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform" +[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]" +[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]" +[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x" +[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra" +[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]" +[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified" +[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]" +[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]" +[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir" +[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync " +[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]" +[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event" +[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]" +[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter" +[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs" +[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`" +[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases" +[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives" +[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error" +[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error" +[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]" +[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content" +[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink" +[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content" +[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]" +[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link" +[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link" +[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link" +[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link" +[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods" +[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted" +[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods" +[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme" +[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync" +[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152" +[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]" +[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]" +[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code." +[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync" +[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation" +[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty" +[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works" +[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist." +[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing" +[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs" +[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature" +[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps" +[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'" +[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138" +[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files" +[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input" +[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute" +[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided" +[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir" +[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`" +[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method" +[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]" +[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features." +[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?" +[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;" +[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists" +[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object # has no method 'access'" +[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync" +[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'" +[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory" +[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids." +[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined" +[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'" +[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows" +[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream" +[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows" +[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]" +[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]" +[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true" +[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists" +[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory" +[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory " +[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory" +[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails" +[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work" +[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it" +[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]" +[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs" +[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]" +[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy" +[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?" +[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified" +[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp" +[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]" +[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]" +[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug" +[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined." +[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp" +[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]" +[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]" +[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird" +[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]" +[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine" +[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows" +[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries" +[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?" +[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?" +[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync" +[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?" +[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]" +[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move" +[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move" +[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync" +[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty" +[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories" +[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird" +[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript" +[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]" +[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module" +[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme" +[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality" +[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work" +[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]" +[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name" +[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]" +[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options" +[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG" +[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy" +[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls" +[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk" +[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work" +[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies" +[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs" +[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]" +[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error" +[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?" +[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy " +[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?" +[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons" +[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode" +[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync" +[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README" +[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile" +[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6" +[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]" +[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0" +[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year" +[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites" +[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support" +[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting " +[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?" +[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now" +[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime " +[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error" +[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null" +[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]" +[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`" +[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` " +[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]" +[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync" +[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]" +[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]" +[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`" +[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?" +[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted." +[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme" +[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]" +[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file" +[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]" +[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories" +[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()" +[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0" +[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted" +[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array" +[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function" +[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`" +[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md" +[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]" +[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1" +[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]" +[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global" +[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]" +[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]" +[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra" +[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version" +[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency" +[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming" +[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2" +[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!" +[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp" +[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist" diff --git a/node_modules/fs-extra/LICENSE b/node_modules/fs-extra/LICENSE new file mode 100644 index 0000000..93546df --- /dev/null +++ b/node_modules/fs-extra/LICENSE @@ -0,0 +1,15 @@ +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +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/node_modules/fs-extra/README.md b/node_modules/fs-extra/README.md new file mode 100644 index 0000000..7dbb9f7 --- /dev/null +++ b/node_modules/fs-extra/README.md @@ -0,0 +1,242 @@ +Node.js: fs-extra +================= + +`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It should be a drop in replacement for `fs`. + +[![npm Package](https://img.shields.io/npm/v/fs-extra.svg?style=flat-square)](https://www.npmjs.org/package/fs-extra) +[![build status](https://api.travis-ci.org/jprichardson/node-fs-extra.svg)](http://travis-ci.org/jprichardson/node-fs-extra) +[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master) +[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra) +[![Coverage Status](https://img.shields.io/coveralls/jprichardson/node-fs-extra.svg)](https://coveralls.io/r/jprichardson/node-fs-extra) + +Standard JavaScript + + +Why? +---- + +I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects. + + + + +Installation +------------ + + npm install --save fs-extra + + + +Usage +----- + +`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed. + +You don't ever need to include the original `fs` module again: + +```js +const fs = require('fs') // this is no longer necessary +``` + +you can now do this: + +```js +const fs = require('fs-extra') +``` + +or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want +to name your `fs` variable `fse` like so: + +```js +const fse = require('fs-extra') +``` + +you can also keep both, but it's redundant: + +```js +const fs = require('fs') +const fse = require('fs-extra') +``` + +Sync vs Async +------------- +Most methods are async by default. All async methods will return a promise if the callback isn't passed. + +Sync methods on the other hand will throw if an error occurs. + +Example: + +```js +const fs = require('fs-extra') + +// Async with promises: +fs.copy('/tmp/myfile', '/tmp/mynewfile') + .then(() => console.log('success!')) + .catch(err => console.error(err)) + +// Async with callbacks: +fs.copy('/tmp/myfile', '/tmp/mynewfile', err => { + if (err) return console.error(err) + console.log('success!') +}) + +// Sync: +try { + fs.copySync('/tmp/myfile', '/tmp/mynewfile') + console.log('success!') +} catch (err) { + console.error(err) +} +``` + + +Methods +------- + +### Async + +- [copy](docs/copy.md) +- [emptyDir](docs/emptyDir.md) +- [ensureFile](docs/ensureFile.md) +- [ensureDir](docs/ensureDir.md) +- [ensureLink](docs/ensureLink.md) +- [ensureSymlink](docs/ensureSymlink.md) +- [mkdirs](docs/ensureDir.md) +- [move](docs/move.md) +- [outputFile](docs/outputFile.md) +- [outputJson](docs/outputJson.md) +- [pathExists](docs/pathExists.md) +- [readJson](docs/readJson.md) +- [remove](docs/remove.md) +- [writeJson](docs/writeJson.md) + +### Sync + +- [copySync](docs/copy-sync.md) +- [emptyDirSync](docs/emptyDir-sync.md) +- [ensureFileSync](docs/ensureFile-sync.md) +- [ensureDirSync](docs/ensureDir-sync.md) +- [ensureLinkSync](docs/ensureLink-sync.md) +- [ensureSymlinkSync](docs/ensureSymlink-sync.md) +- [mkdirsSync](docs/ensureDir-sync.md) +- [moveSync](docs/move-sync.md) +- [outputFileSync](docs/outputFile-sync.md) +- [outputJsonSync](docs/outputJson-sync.md) +- [pathExistsSync](docs/pathExists-sync.md) +- [readJsonSync](docs/readJson-sync.md) +- [removeSync](docs/remove-sync.md) +- [writeJsonSync](docs/writeJson-sync.md) + + +**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()` & `fs.write()`](docs/fs-read-write.md) + +### What happened to `walk()` and `walkSync()`? + +They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync). + + +Third Party +----------- + + +### TypeScript + +If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra + + +### File / Directory Watching + +If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar). + + +### Misc. + +- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls. + + + +Hacking on fs-extra +------------------- + +Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project +uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you, +you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`. + +[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + +What's needed? +- First, take a look at existing issues. Those are probably going to be where the priority lies. +- More tests for edge cases. Specifically on different platforms. There can never be enough tests. +- Improve test coverage. See coveralls output for more info. + +Note: If you make any big changes, **you should definitely file an issue for discussion first.** + +### Running the Test Suite + +fs-extra contains hundreds of tests. + +- `npm run lint`: runs the linter ([standard](http://standardjs.com/)) +- `npm run unit`: runs the unit tests +- `npm test`: runs both the linter and the tests + + +### Windows + +If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's +because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's +account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7 +However, I didn't have much luck doing this. + +Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows. +I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command: + + net use z: "\\vmware-host\Shared Folders" + +I can then navigate to my `fs-extra` directory and run the tests. + + +Naming +------ + +I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here: + +* https://github.com/jprichardson/node-fs-extra/issues/2 +* https://github.com/flatiron/utile/issues/11 +* https://github.com/ryanmcgrath/wrench-js/issues/29 +* https://github.com/substack/node-mkdirp/issues/17 + +First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes. + +For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc. + +We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`? + +My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too. + +So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`. + + +Credit +------ + +`fs-extra` wouldn't be possible without using the modules from the following authors: + +- [Isaac Shlueter](https://github.com/isaacs) +- [Charlie McConnel](https://github.com/avianflu) +- [James Halliday](https://github.com/substack) +- [Andrew Kelley](https://github.com/andrewrk) + + + + +License +------- + +Licensed under MIT + +Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson) + +[1]: http://nodejs.org/docs/latest/api/fs.html + + +[jsonfile]: https://github.com/jprichardson/node-jsonfile diff --git a/node_modules/fs-extra/docs/copy-sync.md b/node_modules/fs-extra/docs/copy-sync.md new file mode 100644 index 0000000..0a33e47 --- /dev/null +++ b/node_modules/fs-extra/docs/copy-sync.md @@ -0,0 +1,37 @@ +# copySync(src, dest, [options]) + +Copy a file or directory. The directory can have contents. Like `cp -r`. + +- `src` `` +- `dest` `` +- `options` `` + - `overwrite` ``: overwrite existing file or directory, default is `true`. _Note that the copy operation will silently fail if you set this to `false` and the destination exists._ Use the `errorOnExist` option to change this behavior. + - `errorOnExist` ``: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`. + - `dereference` ``: dereference symlinks, default is `false`. + - `preserveTimestamps` ``: will set last modification and access times to the ones of the original source files, default is `false`. + - `filter` ``: Function to filter copied files. Return `true` to include, `false` to exclude. + +## Example: + +```js +const fs = require('fs-extra') + +// copy file +fs.copySync('/tmp/myfile', '/tmp/mynewfile') + +// copy directory, even if it has subdirectories or files +fs.copySync('/tmp/mydir', '/tmp/mynewdir') +``` + +**Using filter function** + +```js +const fs = require('fs-extra') + +const filterFunc = (src, dest) => { + // your logic here + // it will be copied if return true +} + +fs.copySync('/tmp/mydir', '/tmp/mynewdir', { filter: filterFunc }) +``` diff --git a/node_modules/fs-extra/docs/copy.md b/node_modules/fs-extra/docs/copy.md new file mode 100644 index 0000000..f7909d0 --- /dev/null +++ b/node_modules/fs-extra/docs/copy.md @@ -0,0 +1,57 @@ +# copy(src, dest, [options, callback]) + +Copy a file or directory. The directory can have contents. Like `cp -r`. + +- `src` `` +- `dest` `` Note that if `src` is a file, `dest` cannot be a directory (see [issue #323](https://github.com/jprichardson/node-fs-extra/issues/323)). +- `options` `` + - `overwrite` ``: overwrite existing file or directory, default is `true`. _Note that the copy operation will silently fail if you set this to `false` and the destination exists._ Use the `errorOnExist` option to change this behavior. + - `errorOnExist` ``: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`. + - `dereference` ``: dereference symlinks, default is `false`. + - `preserveTimestamps` ``: will set last modification and access times to the ones of the original source files, default is `false`. + - `filter` ``: Function to filter copied files. Return `true` to include, `false` to exclude. Can also return a `Promise` that resolves to `true` or `false` (or pass in an `async` function). +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +fs.copy('/tmp/myfile', '/tmp/mynewfile', err => { + if (err) return console.error(err) + + console.log('success!') +}) // copies file + +fs.copy('/tmp/mydir', '/tmp/mynewdir', err => { + if (err) return console.error(err) + + console.log('success!') +}) // copies directory, even if it has subdirectories or files + +// Promise usage: +fs.copy('/tmp/myfile', '/tmp/mynewfile') +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` + +**Using filter function** + +```js +const fs = require('fs-extra') + +const filterFunc = (src, dest) => { + // your logic here + // it will be copied if return true +} + +fs.copy('/tmp/mydir', '/tmp/mynewdir', { filter: filterFunc }, err => { + if (err) return console.error(err) + + console.log('success!') +}) +``` diff --git a/node_modules/fs-extra/docs/emptyDir-sync.md b/node_modules/fs-extra/docs/emptyDir-sync.md new file mode 100644 index 0000000..7decdbc --- /dev/null +++ b/node_modules/fs-extra/docs/emptyDir-sync.md @@ -0,0 +1,16 @@ +# emptyDirSync(dir) + +Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. + +**Alias:** `emptydirSync()` + +- `dir` `` + +## Example: + +```js +const fs = require('fs-extra') + +// assume this directory has a lot of files and folders +fs.emptyDirSync('/tmp/some/dir') +``` diff --git a/node_modules/fs-extra/docs/emptyDir.md b/node_modules/fs-extra/docs/emptyDir.md new file mode 100644 index 0000000..6553e9a --- /dev/null +++ b/node_modules/fs-extra/docs/emptyDir.md @@ -0,0 +1,30 @@ +# emptyDir(dir, [callback]) + +Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. + +**Alias:** `emptydir()` + +- `dir` `` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +// assume this directory has a lot of files and folders +fs.emptyDir('/tmp/some/dir', err => { + if (err) return console.error(err) + + console.log('success!') +}) + +// With promises +fs.emptyDir('/tmp/some/dir') +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` diff --git a/node_modules/fs-extra/docs/ensureDir-sync.md b/node_modules/fs-extra/docs/ensureDir-sync.md new file mode 100644 index 0000000..8f083d2 --- /dev/null +++ b/node_modules/fs-extra/docs/ensureDir-sync.md @@ -0,0 +1,17 @@ +# ensureDirSync(dir) + +Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`. + +**Aliases:** `mkdirsSync()`, `mkdirpSync()` + +- `dir` `` + +## Example: + +```js +const fs = require('fs-extra') + +const dir = '/tmp/this/path/does/not/exist' +fs.ensureDirSync(dir) +// dir has now been created, including the directory it is to be placed in +``` diff --git a/node_modules/fs-extra/docs/ensureDir.md b/node_modules/fs-extra/docs/ensureDir.md new file mode 100644 index 0000000..d030d86 --- /dev/null +++ b/node_modules/fs-extra/docs/ensureDir.md @@ -0,0 +1,29 @@ +# ensureDir(dir, [callback]) + +Ensures that the directory exists. If the directory structure does not exist, it is created. Like `mkdir -p`. + +**Aliases:** `mkdirs()`, `mkdirp()` + +- `dir` `` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +const dir = '/tmp/this/path/does/not/exist' +fs.ensureDir(dir, err => { + console.log(err) // => null + // dir has now been created, including the directory it is to be placed in +}) + +// With Promises: +fs.ensureDir(dir) +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` diff --git a/node_modules/fs-extra/docs/ensureFile-sync.md b/node_modules/fs-extra/docs/ensureFile-sync.md new file mode 100644 index 0000000..25ac39d --- /dev/null +++ b/node_modules/fs-extra/docs/ensureFile-sync.md @@ -0,0 +1,17 @@ +# ensureFileSync(file) + +Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**. + +**Alias:** `createFileSync()` + +- `file` `` + +## Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/this/path/does/not/exist/file.txt' +fs.ensureFileSync(file) +// file has now been created, including the directory it is to be placed in +``` diff --git a/node_modules/fs-extra/docs/ensureFile.md b/node_modules/fs-extra/docs/ensureFile.md new file mode 100644 index 0000000..987be63 --- /dev/null +++ b/node_modules/fs-extra/docs/ensureFile.md @@ -0,0 +1,29 @@ +# ensureFile(file, [callback]) + +Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**. + +**Alias:** `createFile()` + +- `file` `` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/this/path/does/not/exist/file.txt' +fs.ensureFile(file, err => { + console.log(err) // => null + // file has now been created, including the directory it is to be placed in +}) + +// With Promises: +fs.ensureFile(file) +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` diff --git a/node_modules/fs-extra/docs/ensureLink-sync.md b/node_modules/fs-extra/docs/ensureLink-sync.md new file mode 100644 index 0000000..74769d3 --- /dev/null +++ b/node_modules/fs-extra/docs/ensureLink-sync.md @@ -0,0 +1,17 @@ +# ensureLinkSync(srcpath, dstpath) + +Ensures that the link exists. If the directory structure does not exist, it is created. + +- `srcpath` `` +- `dstpath` `` + +## Example: + +```js +const fs = require('fs-extra') + +const srcpath = '/tmp/file.txt' +const dstpath = '/tmp/this/path/does/not/exist/file.txt' +fs.ensureLinkSync(srcpath, dstpath) +// link has now been created, including the directory it is to be placed in +``` diff --git a/node_modules/fs-extra/docs/ensureLink.md b/node_modules/fs-extra/docs/ensureLink.md new file mode 100644 index 0000000..90d2a5d --- /dev/null +++ b/node_modules/fs-extra/docs/ensureLink.md @@ -0,0 +1,29 @@ +# ensureLink(srcpath, dstpath, [callback]) + +Ensures that the link exists. If the directory structure does not exist, it is created. + +- `srcpath` `` +- `dstpath` `` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +const srcpath = '/tmp/file.txt' +const dstpath = '/tmp/this/path/does/not/exist/file.txt' +fs.ensureLink(srcpath, dstpath, err => { + console.log(err) // => null + // link has now been created, including the directory it is to be placed in +}) + +// With Promises: +fs.ensureLink(srcpath, dstpath) +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` diff --git a/node_modules/fs-extra/docs/ensureSymlink-sync.md b/node_modules/fs-extra/docs/ensureSymlink-sync.md new file mode 100644 index 0000000..328d4c4 --- /dev/null +++ b/node_modules/fs-extra/docs/ensureSymlink-sync.md @@ -0,0 +1,18 @@ +# ensureSymlinkSync(srcpath, dstpath, [type]) + +Ensures that the symlink exists. If the directory structure does not exist, it is created. + +- `srcpath` `` +- `dstpath` `` +- `type` `` + +## Example: + +```js +const fs = require('fs-extra') + +const srcpath = '/tmp/file.txt' +const dstpath = '/tmp/this/path/does/not/exist/file.txt' +fs.ensureSymlinkSync(srcpath, dstpath) +// symlink has now been created, including the directory it is to be placed in +``` diff --git a/node_modules/fs-extra/docs/ensureSymlink.md b/node_modules/fs-extra/docs/ensureSymlink.md new file mode 100644 index 0000000..45524f1 --- /dev/null +++ b/node_modules/fs-extra/docs/ensureSymlink.md @@ -0,0 +1,30 @@ +# ensureSymlink(srcpath, dstpath, [type, callback]) + +Ensures that the symlink exists. If the directory structure does not exist, it is created. + +- `srcpath` `` +- `dstpath` `` +- `type` `` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +const srcpath = '/tmp/file.txt' +const dstpath = '/tmp/this/path/does/not/exist/file.txt' +fs.ensureSymlink(srcpath, dstpath, err => { + console.log(err) // => null + // symlink has now been created, including the directory it is to be placed in +}) + +// With Promises: +fs.ensureSymlink(srcpath, dstpath) +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` diff --git a/node_modules/fs-extra/docs/fs-read-write.md b/node_modules/fs-extra/docs/fs-read-write.md new file mode 100644 index 0000000..805ea3c --- /dev/null +++ b/node_modules/fs-extra/docs/fs-read-write.md @@ -0,0 +1,39 @@ +# About `fs.read()` & `fs.write()` + +[`fs.read()`](https://nodejs.org/api/fs.html#fs_fs_read_fd_buffer_offset_length_position_callback) & [`fs.write()`](https://nodejs.org/api/fs.html#fs_fs_write_fd_buffer_offset_length_position_callback) are different from other `fs` methods in that their callbacks are called with 3 arguments instead of the usual 2 arguments. + +If you're using them with callbacks, they will behave as usual. However, their promise usage is a little different. `fs-extra` promisifies these methods like [`util.promisify()`](https://nodejs.org/api/util.html#util_util_promisify_original) (only available in Node 8+) does. + +Here's the example promise usage: + +## `fs.read()` + +```js +// Basic promises +fs.read(fd, buffer, offset, length, position) + .then(results => { + console.log(results) + // { bytesRead: 20, buffer: } + }) + +// Async/await usage: +async function example () { + const { bytesRead, buffer } = await fs.read(fd, Buffer.alloc(length), offset, length, position) +} +``` + +## `fs.write()` + +```js +// Basic promises +fs.write(fd, buffer, offset, length, position) + .then(results => { + console.log(results) + // { bytesWritten: 20, buffer: } + }) + +// Async/await usage: +async function example () { + const { bytesWritten, buffer } = await fs.write(fd, Buffer.alloc(length), offset, length, position) +} +``` diff --git a/node_modules/fs-extra/docs/move-sync.md b/node_modules/fs-extra/docs/move-sync.md new file mode 100644 index 0000000..cd701fe --- /dev/null +++ b/node_modules/fs-extra/docs/move-sync.md @@ -0,0 +1,24 @@ +# moveSync(src, dest, [options]) + +Moves a file or directory, even across devices. + +- `src` `` +- `dest` `` +- `options` `` + - `overwrite` ``: overwrite existing file or directory, default is `false`. + +## Example: + +```js +const fs = require('fs-extra') + +fs.moveSync('/tmp/somefile', '/tmp/does/not/exist/yet/somefile') +``` + +**Using `overwrite` option** + +```js +const fs = require('fs-extra') + +fs.moveSync('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true }) +``` diff --git a/node_modules/fs-extra/docs/move.md b/node_modules/fs-extra/docs/move.md new file mode 100644 index 0000000..0dd210c --- /dev/null +++ b/node_modules/fs-extra/docs/move.md @@ -0,0 +1,41 @@ +# move(src, dest, [options, callback]) + +Moves a file or directory, even across devices. + +- `src` `` +- `dest` `` +- `options` `` + - `overwrite` ``: overwrite existing file or directory, default is `false`. +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +fs.move('/tmp/somefile', '/tmp/does/not/exist/yet/somefile', err => { + if (err) return console.error(err) + + console.log('success!') +}) + +fs.move('/tmp/somefile', '/tmp/does/not/exist/yet/somefile') +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` + +**Using `overwrite` option** + +```js +const fs = require('fs-extra') + +fs.move('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true }, err => { + if (err) return console.error(err) + + console.log('success!') +}) +``` diff --git a/node_modules/fs-extra/docs/outputFile-sync.md b/node_modules/fs-extra/docs/outputFile-sync.md new file mode 100644 index 0000000..38eee8b --- /dev/null +++ b/node_modules/fs-extra/docs/outputFile-sync.md @@ -0,0 +1,19 @@ +# outputFileSync(file, data, [options]) + +Almost the same as `writeFileSync` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFileSync()`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options). + +- `file` `` +- `data` ` | | ` +- `options` ` | ` + +## Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/this/path/does/not/exist/file.txt' +fs.outputFileSync(file, 'hello!') + +const data = fs.readFileSync(file, 'utf8') +console.log(data) // => hello! +``` diff --git a/node_modules/fs-extra/docs/outputFile.md b/node_modules/fs-extra/docs/outputFile.md new file mode 100644 index 0000000..766787d --- /dev/null +++ b/node_modules/fs-extra/docs/outputFile.md @@ -0,0 +1,34 @@ +# outputFile(file, data, [options, callback]) + +Almost the same as `writeFile` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFile()`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback). + +- `file` `` +- `data` ` | | ` +- `options` ` | ` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/this/path/does/not/exist/file.txt' +fs.outputFile(file, 'hello!', err => { + console.log(err) // => null + + fs.readFile(file, 'utf8', (err, data) => { + if (err) return console.error(err) + console.log(data) // => hello! + }) +}) + +// With Promises: +fs.outputFile(file, 'hello!') +.then(() => fs.readFile(file, 'utf8')) +.then(data => { + console.log(data) // => hello! +}) +.catch(err => { + console.error(err) +}) +``` diff --git a/node_modules/fs-extra/docs/outputJson-sync.md b/node_modules/fs-extra/docs/outputJson-sync.md new file mode 100644 index 0000000..ef78f80 --- /dev/null +++ b/node_modules/fs-extra/docs/outputJson-sync.md @@ -0,0 +1,25 @@ +# outputJsonSync(file, object, [options]) + +Almost the same as [`writeJsonSync`](writeJson-sync.md), except that if the directory does not exist, it's created. + +**Alias:** `outputJSONSync()` + +- `file` `` +- `object` `` +- `options` `` + - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. + - `EOL` `` Set EOL character. Default is `\n`. + - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) + - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) + +## Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/this/path/does/not/exist/file.json' +fs.outputJsonSync(file, {name: 'JP'}) + +const data = fs.readJsonSync(file) +console.log(data.name) // => JP +``` diff --git a/node_modules/fs-extra/docs/outputJson.md b/node_modules/fs-extra/docs/outputJson.md new file mode 100644 index 0000000..7156991 --- /dev/null +++ b/node_modules/fs-extra/docs/outputJson.md @@ -0,0 +1,40 @@ +# outputJson(file, object, [options, callback]) + +Almost the same as [`writeJson`](writeJson.md), except that if the directory does not exist, it's created. + +**Alias:** `outputJSON()` + +- `file` `` +- `object` `` +- `options` `` + - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. + - `EOL` `` Set EOL character. Default is `\n`. + - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) + - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/this/path/does/not/exist/file.json' +fs.outputJson(file, {name: 'JP'}, err => { + console.log(err) // => null + + fs.readJson(file, (err, data) => { + if (err) return console.error(err) + console.log(data.name) // => JP + }) +}) + +// With Promises: +fs.outputJson(file, {name: 'JP'}) +.then(() => fs.readJson(file)) +.then(data => { + console.log(data.name) // => JP +}) +.catch(err => { + console.error(err) +}) +``` diff --git a/node_modules/fs-extra/docs/pathExists-sync.md b/node_modules/fs-extra/docs/pathExists-sync.md new file mode 100644 index 0000000..3ef973c --- /dev/null +++ b/node_modules/fs-extra/docs/pathExists-sync.md @@ -0,0 +1,3 @@ +# pathExistsSync(file) + +An alias for [`fs.existsSync()`](https://nodejs.org/api/fs.html#fs_fs_existssync_path), created for consistency with [`pathExists()`](pathExists.md). diff --git a/node_modules/fs-extra/docs/pathExists.md b/node_modules/fs-extra/docs/pathExists.md new file mode 100644 index 0000000..0302b09 --- /dev/null +++ b/node_modules/fs-extra/docs/pathExists.md @@ -0,0 +1,22 @@ +# pathExists(file[, callback]) + +Test whether or not the given path exists by checking with the file system. Like [`fs.exists`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback), but with a normal callback signature (err, exists). Uses `fs.access` under the hood. + +- `file` `` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/this/path/does/not/exist/file.txt' +// Promise usage: +fs.pathExists(file) + .then(exists => console.log(exists)) // => false +// Callback usage: +fs.pathExists(file, (err, exists) => { + console.log(err) // => null + console.log(exists) // => false +}) +``` diff --git a/node_modules/fs-extra/docs/readJson-sync.md b/node_modules/fs-extra/docs/readJson-sync.md new file mode 100644 index 0000000..a135637 --- /dev/null +++ b/node_modules/fs-extra/docs/readJson-sync.md @@ -0,0 +1,33 @@ +# readJsonSync(file, [options]) + +Reads a JSON file and then parses it into an object. `options` are the same +that you'd pass to [`jsonFile.readFileSync`](https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options). + +**Alias:** `readJSONSync()` + +- `file` `` +- `options` `` + +## Example: + +```js +const fs = require('fs-extra') + +const packageObj = fs.readJsonSync('./package.json') +console.log(packageObj.version) // => 2.0.0 +``` + +--- + +`readJsonSync()` can take a `throws` option set to `false` and it won't throw if the JSON is invalid. Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/some-invalid.json' +const data = '{not valid JSON' +fs.writeFileSync(file, data) + +const obj = fs.readJsonSync(file, { throws: false }) +console.log(obj) // => null +``` diff --git a/node_modules/fs-extra/docs/readJson.md b/node_modules/fs-extra/docs/readJson.md new file mode 100644 index 0000000..6edc329 --- /dev/null +++ b/node_modules/fs-extra/docs/readJson.md @@ -0,0 +1,58 @@ +# readJson(file, [options, callback]) + +Reads a JSON file and then parses it into an object. `options` are the same +that you'd pass to [`jsonFile.readFile`](https://github.com/jprichardson/node-jsonfile#readfilefilename-options-callback). + +**Alias:** `readJSON()` + +- `file` `` +- `options` `` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +fs.readJson('./package.json', (err, packageObj) => { + if (err) console.error(err) + + console.log(packageObj.version) // => 0.1.3 +}) + +// Promise Usage +fs.readJson('./package.json') +.then(packageObj => { + console.log(packageObj.version) // => 0.1.3 +}) +.catch(err => { + console.error(err) +}) +``` + +--- + +`readJson()` can take a `throws` option set to `false` and it won't throw if the JSON is invalid. Example: + +```js +const fs = require('fs-extra') + +const file = '/tmp/some-invalid.json' +const data = '{not valid JSON' +fs.writeFileSync(file, data) + +fs.readJson(file, { throws: false }, (err, obj) => { + if (err) console.error(err) + + console.log(obj) // => null +}) + +// Promise Usage +fs.readJson(file, { throws: false }) +.then(obj => { + console.log(obj) // => null +}) +.catch(err => { + console.error(err) // Not called +}) +``` diff --git a/node_modules/fs-extra/docs/remove-sync.md b/node_modules/fs-extra/docs/remove-sync.md new file mode 100644 index 0000000..fb01fe8 --- /dev/null +++ b/node_modules/fs-extra/docs/remove-sync.md @@ -0,0 +1,16 @@ +# removeSync(path) + +Removes a file or directory. The directory can have contents. Like `rm -rf`. + +- `path` `` + +## Example: + +```js +const fs = require('fs-extra') + +// remove file +fs.removeSync('/tmp/myfile') + +fs.removeSync('/home/jprichardson') // I just deleted my entire HOME directory. +``` diff --git a/node_modules/fs-extra/docs/remove.md b/node_modules/fs-extra/docs/remove.md new file mode 100644 index 0000000..3640293 --- /dev/null +++ b/node_modules/fs-extra/docs/remove.md @@ -0,0 +1,34 @@ +# remove(path, [callback]) + +Removes a file or directory. The directory can have contents. Like `rm -rf`. + +- `path` `` +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +// remove file +fs.remove('/tmp/myfile', err => { + if (err) return console.error(err) + + console.log('success!') +}) + +fs.remove('/home/jprichardson', err => { + if (err) return console.error(err) + + console.log('success!') // I just deleted my entire HOME directory. +}) + +// Promise Usage +fs.remove('/tmp/myfile') +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` diff --git a/node_modules/fs-extra/docs/writeJson-sync.md b/node_modules/fs-extra/docs/writeJson-sync.md new file mode 100644 index 0000000..c22459d --- /dev/null +++ b/node_modules/fs-extra/docs/writeJson-sync.md @@ -0,0 +1,24 @@ +# writeJsonSync(file, object, [options]) + +Writes an object to a JSON file. + +**Alias:** `writeJSONSync()` + +- `file` `` +- `object` `` +- `options` `` + - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. + - `EOL` `` Set EOL character. Default is `\n`. + - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) + - Also accepts [`fs.writeFileSync` options](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) + +## Example: + +```js +const fs = require('fs-extra') + +fs.writeJsonSync('./package.json', {name: 'fs-extra'}) +``` +--- + +**See also:** [`outputJsonSync()`](outputJson-sync.md) diff --git a/node_modules/fs-extra/docs/writeJson.md b/node_modules/fs-extra/docs/writeJson.md new file mode 100644 index 0000000..8e35271 --- /dev/null +++ b/node_modules/fs-extra/docs/writeJson.md @@ -0,0 +1,39 @@ +# writeJson(file, object, [options, callback]) + +Writes an object to a JSON file. + +**Alias:** `writeJSON()` + +- `file` `` +- `object` `` +- `options` `` + - `spaces` `` Number of spaces to indent; or a string to use for indentation (i.e. pass `'\t'` for tab indentation). See [the docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument) for more info. + - `EOL` `` Set EOL character. Default is `\n`. + - `replacer` [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) + - Also accepts [`fs.writeFile` options](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) +- `callback` `` + +## Example: + +```js +const fs = require('fs-extra') + +fs.writeJson('./package.json', {name: 'fs-extra'}, err => { + if (err) return console.error(err) + + console.log('success!') +}) + +// With Promises +fs.writeJson('./package.json', {name: 'fs-extra'}) +.then(() => { + console.log('success!') +}) +.catch(err => { + console.error(err) +}) +``` + +--- + +**See also:** [`outputJson()`](outputJson.md) diff --git a/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/fs-extra/lib/copy-sync/copy-sync.js new file mode 100644 index 0000000..c4742db --- /dev/null +++ b/node_modules/fs-extra/lib/copy-sync/copy-sync.js @@ -0,0 +1,209 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const mkdirpSync = require('../mkdirs').mkdirsSync +const utimesSync = require('../util/utimes.js').utimesMillisSync + +const notExist = Symbol('notExist') +const existsReg = Symbol('existsReg') + +function copySync (src, dest, opts) { + if (typeof opts === 'function') { + opts = {filter: opts} + } + + opts = opts || {} + opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now + opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber + + // Warn about using preserveTimestamps on 32-bit node + if (opts.preserveTimestamps && process.arch === 'ia32') { + console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`) + } + + src = path.resolve(src) + dest = path.resolve(dest) + + // don't allow src and dest to be the same + if (src === dest) throw new Error('Source and destination must not be the same.') + + if (opts.filter && !opts.filter(src, dest)) return + + const destParent = path.dirname(dest) + if (!fs.existsSync(destParent)) mkdirpSync(destParent) + return startCopy(src, dest, opts) +} + +function startCopy (src, dest, opts) { + if (opts.filter && !opts.filter(src, dest)) return + return getStats(src, dest, opts) +} + +function getStats (src, dest, opts) { + const statSync = opts.dereference ? fs.statSync : fs.lstatSync + const st = statSync(src) + + if (st.isDirectory()) return onDir(st, src, dest, opts) + else if (st.isFile() || + st.isCharacterDevice() || + st.isBlockDevice()) return onFile(st, src, dest, opts) + else if (st.isSymbolicLink()) return onLink(src, dest, opts) +} + +function onFile (srcStat, src, dest, opts) { + const resolvedPath = checkDest(dest) + if (resolvedPath === notExist) { + return copyFile(srcStat, src, dest, opts) + } else if (resolvedPath === existsReg) { + return mayCopyFile(srcStat, src, dest, opts) + } else { + if (src === resolvedPath) return + return mayCopyFile(srcStat, src, dest, opts) + } +} + +function mayCopyFile (srcStat, src, dest, opts) { + if (opts.overwrite) { + fs.unlinkSync(dest) + return copyFile(srcStat, src, dest, opts) + } else if (opts.errorOnExist) { + throw new Error(`'${dest}' already exists`) + } +} + +function copyFile (srcStat, src, dest, opts) { + if (typeof fs.copyFileSync === 'function') { + fs.copyFileSync(src, dest) + fs.chmodSync(dest, srcStat.mode) + if (opts.preserveTimestamps) { + return utimesSync(dest, srcStat.atime, srcStat.mtime) + } + return + } + return copyFileFallback(srcStat, src, dest, opts) +} + +function copyFileFallback (srcStat, src, dest, opts) { + const BUF_LENGTH = 64 * 1024 + const _buff = require('../util/buffer')(BUF_LENGTH) + + const fdr = fs.openSync(src, 'r') + const fdw = fs.openSync(dest, 'w', srcStat.mode) + let bytesRead = 1 + let pos = 0 + + while (bytesRead > 0) { + bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) + fs.writeSync(fdw, _buff, 0, bytesRead) + pos += bytesRead + } + + if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime) + + fs.closeSync(fdr) + fs.closeSync(fdw) +} + +function onDir (srcStat, src, dest, opts) { + const resolvedPath = checkDest(dest) + if (resolvedPath === notExist) { + if (isSrcSubdir(src, dest)) { + throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`) + } + return mkDirAndCopy(srcStat, src, dest, opts) + } else if (resolvedPath === existsReg) { + if (isSrcSubdir(src, dest)) { + throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`) + } + return mayCopyDir(src, dest, opts) + } else { + if (src === resolvedPath) return + return copyDir(src, dest, opts) + } +} + +function mayCopyDir (src, dest, opts) { + if (!fs.statSync(dest).isDirectory()) { + throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`) + } + return copyDir(src, dest, opts) +} + +function mkDirAndCopy (srcStat, src, dest, opts) { + fs.mkdirSync(dest, srcStat.mode) + fs.chmodSync(dest, srcStat.mode) + return copyDir(src, dest, opts) +} + +function copyDir (src, dest, opts) { + fs.readdirSync(src).forEach(item => { + startCopy(path.join(src, item), path.join(dest, item), opts) + }) +} + +function onLink (src, dest, opts) { + let resolvedSrcPath = fs.readlinkSync(src) + + if (opts.dereference) { + resolvedSrcPath = path.resolve(process.cwd(), resolvedSrcPath) + } + + let resolvedDestPath = checkDest(dest) + if (resolvedDestPath === notExist || resolvedDestPath === existsReg) { + // if dest already exists, fs throws error anyway, + // so no need to guard against it here. + return fs.symlinkSync(resolvedSrcPath, dest) + } else { + if (opts.dereference) { + resolvedDestPath = path.resolve(process.cwd(), resolvedDestPath) + } + if (resolvedDestPath === resolvedSrcPath) return + + // prevent copy if src is a subdir of dest since unlinking + // dest in this case would result in removing src contents + // and therefore a broken symlink would be created. + if (fs.statSync(dest).isDirectory() && isSrcSubdir(resolvedDestPath, resolvedSrcPath)) { + throw new Error(`Cannot overwrite '${resolvedDestPath}' with '${resolvedSrcPath}'.`) + } + return copyLink(resolvedSrcPath, dest) + } +} + +function copyLink (resolvedSrcPath, dest) { + fs.unlinkSync(dest) + return fs.symlinkSync(resolvedSrcPath, dest) +} + +// check if dest exists and/or is a symlink +function checkDest (dest) { + let resolvedPath + try { + resolvedPath = fs.readlinkSync(dest) + } catch (err) { + if (err.code === 'ENOENT') return notExist + + // dest exists and is a regular file or directory, Windows may throw UNKNOWN error + if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return existsReg + + throw err + } + return resolvedPath // dest exists and is a symlink +} + +// return true if dest is a subdir of src, otherwise false. +// extract dest base dir and check if that is the same as src basename +function isSrcSubdir (src, dest) { + const baseDir = dest.split(path.dirname(src) + path.sep)[1] + if (baseDir) { + const destBasename = baseDir.split(path.sep)[0] + if (destBasename) { + return src !== dest && dest.indexOf(src) > -1 && destBasename === path.basename(src) + } + return false + } + return false +} + +module.exports = copySync diff --git a/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/fs-extra/lib/copy-sync/index.js new file mode 100644 index 0000000..ebc7e0b --- /dev/null +++ b/node_modules/fs-extra/lib/copy-sync/index.js @@ -0,0 +1,3 @@ +module.exports = { + copySync: require('./copy-sync') +} diff --git a/node_modules/fs-extra/lib/copy/copy.js b/node_modules/fs-extra/lib/copy/copy.js new file mode 100644 index 0000000..fd9687f --- /dev/null +++ b/node_modules/fs-extra/lib/copy/copy.js @@ -0,0 +1,264 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const mkdirp = require('../mkdirs').mkdirs +const pathExists = require('../path-exists').pathExists +const utimes = require('../util/utimes').utimesMillis + +const notExist = Symbol('notExist') +const existsReg = Symbol('existsReg') + +function copy (src, dest, opts, cb) { + if (typeof opts === 'function' && !cb) { + cb = opts + opts = {} + } else if (typeof opts === 'function') { + opts = {filter: opts} + } + + cb = cb || function () {} + opts = opts || {} + + opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now + opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber + + // Warn about using preserveTimestamps on 32-bit node + if (opts.preserveTimestamps && process.arch === 'ia32') { + console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`) + } + + src = path.resolve(src) + dest = path.resolve(dest) + + // don't allow src and dest to be the same + if (src === dest) return cb(new Error('Source and destination must not be the same.')) + + if (opts.filter) return handleFilter(checkParentDir, src, dest, opts, cb) + return checkParentDir(src, dest, opts, cb) +} + +function checkParentDir (src, dest, opts, cb) { + const destParent = path.dirname(dest) + pathExists(destParent, (err, dirExists) => { + if (err) return cb(err) + if (dirExists) return startCopy(src, dest, opts, cb) + mkdirp(destParent, err => { + if (err) return cb(err) + return startCopy(src, dest, opts, cb) + }) + }) +} + +function startCopy (src, dest, opts, cb) { + if (opts.filter) return handleFilter(getStats, src, dest, opts, cb) + return getStats(src, dest, opts, cb) +} + +function handleFilter (onInclude, src, dest, opts, cb) { + Promise.resolve(opts.filter(src, dest)) + .then(include => { + if (include) return onInclude(src, dest, opts, cb) + return cb() + }, error => cb(error)) +} + +function getStats (src, dest, opts, cb) { + const stat = opts.dereference ? fs.stat : fs.lstat + stat(src, (err, st) => { + if (err) return cb(err) + + if (st.isDirectory()) return onDir(st, src, dest, opts, cb) + else if (st.isFile() || + st.isCharacterDevice() || + st.isBlockDevice()) return onFile(st, src, dest, opts, cb) + else if (st.isSymbolicLink()) return onLink(src, dest, opts, cb) + }) +} + +function onFile (srcStat, src, dest, opts, cb) { + checkDest(dest, (err, resolvedPath) => { + if (err) return cb(err) + if (resolvedPath === notExist) { + return copyFile(srcStat, src, dest, opts, cb) + } else if (resolvedPath === existsReg) { + return mayCopyFile(srcStat, src, dest, opts, cb) + } else { + if (src === resolvedPath) return cb() + return mayCopyFile(srcStat, src, dest, opts, cb) + } + }) +} + +function mayCopyFile (srcStat, src, dest, opts, cb) { + if (opts.overwrite) { + fs.unlink(dest, err => { + if (err) return cb(err) + return copyFile(srcStat, src, dest, opts, cb) + }) + } else if (opts.errorOnExist) { + return cb(new Error(`'${dest}' already exists`)) + } else return cb() +} + +function copyFile (srcStat, src, dest, opts, cb) { + if (typeof fs.copyFile === 'function') { + return fs.copyFile(src, dest, err => { + if (err) return cb(err) + return setDestModeAndTimestamps(srcStat, dest, opts, cb) + }) + } + return copyFileFallback(srcStat, src, dest, opts, cb) +} + +function copyFileFallback (srcStat, src, dest, opts, cb) { + const rs = fs.createReadStream(src) + rs.on('error', err => cb(err)) + .once('open', () => { + const ws = fs.createWriteStream(dest, { mode: srcStat.mode }) + ws.on('error', err => cb(err)) + .on('open', () => rs.pipe(ws)) + .once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb)) + }) +} + +function setDestModeAndTimestamps (srcStat, dest, opts, cb) { + fs.chmod(dest, srcStat.mode, err => { + if (err) return cb(err) + if (opts.preserveTimestamps) { + return utimes(dest, srcStat.atime, srcStat.mtime, cb) + } + return cb() + }) +} + +function onDir (srcStat, src, dest, opts, cb) { + checkDest(dest, (err, resolvedPath) => { + if (err) return cb(err) + if (resolvedPath === notExist) { + if (isSrcSubdir(src, dest)) { + return cb(new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`)) + } + return mkDirAndCopy(srcStat, src, dest, opts, cb) + } else if (resolvedPath === existsReg) { + if (isSrcSubdir(src, dest)) { + return cb(new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`)) + } + return mayCopyDir(src, dest, opts, cb) + } else { + if (src === resolvedPath) return cb() + return copyDir(src, dest, opts, cb) + } + }) +} + +function mayCopyDir (src, dest, opts, cb) { + fs.stat(dest, (err, st) => { + if (err) return cb(err) + if (!st.isDirectory()) { + return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)) + } + return copyDir(src, dest, opts, cb) + }) +} + +function mkDirAndCopy (srcStat, src, dest, opts, cb) { + fs.mkdir(dest, srcStat.mode, err => { + if (err) return cb(err) + fs.chmod(dest, srcStat.mode, err => { + if (err) return cb(err) + return copyDir(src, dest, opts, cb) + }) + }) +} + +function copyDir (src, dest, opts, cb) { + fs.readdir(src, (err, items) => { + if (err) return cb(err) + return copyDirItems(items, src, dest, opts, cb) + }) +} + +function copyDirItems (items, src, dest, opts, cb) { + const item = items.pop() + if (!item) return cb() + startCopy(path.join(src, item), path.join(dest, item), opts, err => { + if (err) return cb(err) + return copyDirItems(items, src, dest, opts, cb) + }) +} + +function onLink (src, dest, opts, cb) { + fs.readlink(src, (err, resolvedSrcPath) => { + if (err) return cb(err) + + if (opts.dereference) { + resolvedSrcPath = path.resolve(process.cwd(), resolvedSrcPath) + } + + checkDest(dest, (err, resolvedDestPath) => { + if (err) return cb(err) + + if (resolvedDestPath === notExist || resolvedDestPath === existsReg) { + // if dest already exists, fs throws error anyway, + // so no need to guard against it here. + return fs.symlink(resolvedSrcPath, dest, cb) + } else { + if (opts.dereference) { + resolvedDestPath = path.resolve(process.cwd(), resolvedDestPath) + } + if (resolvedDestPath === resolvedSrcPath) return cb() + + // prevent copy if src is a subdir of dest since unlinking + // dest in this case would result in removing src contents + // and therefore a broken symlink would be created. + fs.stat(dest, (err, st) => { + if (err) return cb(err) + if (st.isDirectory() && isSrcSubdir(resolvedDestPath, resolvedSrcPath)) { + return cb(new Error(`Cannot overwrite '${resolvedDestPath}' with '${resolvedSrcPath}'.`)) + } + return copyLink(resolvedSrcPath, dest, cb) + }) + } + }) + }) +} + +function copyLink (resolvedSrcPath, dest, cb) { + fs.unlink(dest, err => { + if (err) return cb(err) + return fs.symlink(resolvedSrcPath, dest, cb) + }) +} + +// check if dest exists and/or is a symlink +function checkDest (dest, cb) { + fs.readlink(dest, (err, resolvedPath) => { + if (err) { + if (err.code === 'ENOENT') return cb(null, notExist) + + // dest exists and is a regular file or directory, Windows may throw UNKNOWN error. + if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return cb(null, existsReg) + + return cb(err) + } + return cb(null, resolvedPath) // dest exists and is a symlink + }) +} + +// return true if dest is a subdir of src, otherwise false. +// extract dest base dir and check if that is the same as src basename +function isSrcSubdir (src, dest) { + const baseDir = dest.split(path.dirname(src) + path.sep)[1] + if (baseDir) { + const destBasename = baseDir.split(path.sep)[0] + if (destBasename) { + return src !== dest && dest.indexOf(src) > -1 && destBasename === path.basename(src) + } + return false + } + return false +} + +module.exports = copy diff --git a/node_modules/fs-extra/lib/copy/index.js b/node_modules/fs-extra/lib/copy/index.js new file mode 100644 index 0000000..a6a51da --- /dev/null +++ b/node_modules/fs-extra/lib/copy/index.js @@ -0,0 +1,4 @@ +const u = require('universalify').fromCallback +module.exports = { + copy: u(require('./copy')) +} diff --git a/node_modules/fs-extra/lib/empty/index.js b/node_modules/fs-extra/lib/empty/index.js new file mode 100644 index 0000000..db05c17 --- /dev/null +++ b/node_modules/fs-extra/lib/empty/index.js @@ -0,0 +1,48 @@ +'use strict' + +const u = require('universalify').fromCallback +const fs = require('fs') +const path = require('path') +const mkdir = require('../mkdirs') +const remove = require('../remove') + +const emptyDir = u(function emptyDir (dir, callback) { + callback = callback || function () {} + fs.readdir(dir, (err, items) => { + if (err) return mkdir.mkdirs(dir, callback) + + items = items.map(item => path.join(dir, item)) + + deleteItem() + + function deleteItem () { + const item = items.pop() + if (!item) return callback() + remove.remove(item, err => { + if (err) return callback(err) + deleteItem() + }) + } + }) +}) + +function emptyDirSync (dir) { + let items + try { + items = fs.readdirSync(dir) + } catch (err) { + return mkdir.mkdirsSync(dir) + } + + items.forEach(item => { + item = path.join(dir, item) + remove.removeSync(item) + }) +} + +module.exports = { + emptyDirSync, + emptydirSync: emptyDirSync, + emptyDir, + emptydir: emptyDir +} diff --git a/node_modules/fs-extra/lib/ensure/file.js b/node_modules/fs-extra/lib/ensure/file.js new file mode 100644 index 0000000..67eed30 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/file.js @@ -0,0 +1,49 @@ +'use strict' + +const u = require('universalify').fromCallback +const path = require('path') +const fs = require('graceful-fs') +const mkdir = require('../mkdirs') +const pathExists = require('../path-exists').pathExists + +function createFile (file, callback) { + function makeFile () { + fs.writeFile(file, '', err => { + if (err) return callback(err) + callback() + }) + } + + fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err + if (!err && stats.isFile()) return callback() + const dir = path.dirname(file) + pathExists(dir, (err, dirExists) => { + if (err) return callback(err) + if (dirExists) return makeFile() + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + makeFile() + }) + }) + }) +} + +function createFileSync (file) { + let stats + try { + stats = fs.statSync(file) + } catch (e) {} + if (stats && stats.isFile()) return + + const dir = path.dirname(file) + if (!fs.existsSync(dir)) { + mkdir.mkdirsSync(dir) + } + + fs.writeFileSync(file, '') +} + +module.exports = { + createFile: u(createFile), + createFileSync +} diff --git a/node_modules/fs-extra/lib/ensure/index.js b/node_modules/fs-extra/lib/ensure/index.js new file mode 100644 index 0000000..c1f67b7 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/index.js @@ -0,0 +1,23 @@ +'use strict' + +const file = require('./file') +const link = require('./link') +const symlink = require('./symlink') + +module.exports = { + // file + createFile: file.createFile, + createFileSync: file.createFileSync, + ensureFile: file.createFile, + ensureFileSync: file.createFileSync, + // link + createLink: link.createLink, + createLinkSync: link.createLinkSync, + ensureLink: link.createLink, + ensureLinkSync: link.createLinkSync, + // symlink + createSymlink: symlink.createSymlink, + createSymlinkSync: symlink.createSymlinkSync, + ensureSymlink: symlink.createSymlink, + ensureSymlinkSync: symlink.createSymlinkSync +} diff --git a/node_modules/fs-extra/lib/ensure/link.js b/node_modules/fs-extra/lib/ensure/link.js new file mode 100644 index 0000000..49fe379 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/link.js @@ -0,0 +1,61 @@ +'use strict' + +const u = require('universalify').fromCallback +const path = require('path') +const fs = require('graceful-fs') +const mkdir = require('../mkdirs') +const pathExists = require('../path-exists').pathExists + +function createLink (srcpath, dstpath, callback) { + function makeLink (srcpath, dstpath) { + fs.link(srcpath, dstpath, err => { + if (err) return callback(err) + callback(null) + }) + } + + pathExists(dstpath, (err, destinationExists) => { + if (err) return callback(err) + if (destinationExists) return callback(null) + fs.lstat(srcpath, (err, stat) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureLink') + return callback(err) + } + + const dir = path.dirname(dstpath) + pathExists(dir, (err, dirExists) => { + if (err) return callback(err) + if (dirExists) return makeLink(srcpath, dstpath) + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + makeLink(srcpath, dstpath) + }) + }) + }) + }) +} + +function createLinkSync (srcpath, dstpath, callback) { + const destinationExists = fs.existsSync(dstpath) + if (destinationExists) return undefined + + try { + fs.lstatSync(srcpath) + } catch (err) { + err.message = err.message.replace('lstat', 'ensureLink') + throw err + } + + const dir = path.dirname(dstpath) + const dirExists = fs.existsSync(dir) + if (dirExists) return fs.linkSync(srcpath, dstpath) + mkdir.mkdirsSync(dir) + + return fs.linkSync(srcpath, dstpath) +} + +module.exports = { + createLink: u(createLink), + createLinkSync +} diff --git a/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/fs-extra/lib/ensure/symlink-paths.js new file mode 100644 index 0000000..4a6b78a --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/symlink-paths.js @@ -0,0 +1,99 @@ +'use strict' + +const path = require('path') +const fs = require('graceful-fs') +const pathExists = require('../path-exists').pathExists + +/** + * Function that returns two types of paths, one relative to symlink, and one + * relative to the current working directory. Checks if path is absolute or + * relative. If the path is relative, this function checks if the path is + * relative to symlink or relative to current working directory. This is an + * initiative to find a smarter `srcpath` to supply when building symlinks. + * This allows you to determine which path to use out of one of three possible + * types of source paths. The first is an absolute path. This is detected by + * `path.isAbsolute()`. When an absolute path is provided, it is checked to + * see if it exists. If it does it's used, if not an error is returned + * (callback)/ thrown (sync). The other two options for `srcpath` are a + * relative url. By default Node's `fs.symlink` works by creating a symlink + * using `dstpath` and expects the `srcpath` to be relative to the newly + * created symlink. If you provide a `srcpath` that does not exist on the file + * system it results in a broken symlink. To minimize this, the function + * checks to see if the 'relative to symlink' source file exists, and if it + * does it will use it. If it does not, it checks if there's a file that + * exists that is relative to the current working directory, if does its used. + * This preserves the expectations of the original fs.symlink spec and adds + * the ability to pass in `relative to current working direcotry` paths. + */ + +function symlinkPaths (srcpath, dstpath, callback) { + if (path.isAbsolute(srcpath)) { + return fs.lstat(srcpath, (err, stat) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureSymlink') + return callback(err) + } + return callback(null, { + 'toCwd': srcpath, + 'toDst': srcpath + }) + }) + } else { + const dstdir = path.dirname(dstpath) + const relativeToDst = path.join(dstdir, srcpath) + return pathExists(relativeToDst, (err, exists) => { + if (err) return callback(err) + if (exists) { + return callback(null, { + 'toCwd': relativeToDst, + 'toDst': srcpath + }) + } else { + return fs.lstat(srcpath, (err, stat) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureSymlink') + return callback(err) + } + return callback(null, { + 'toCwd': srcpath, + 'toDst': path.relative(dstdir, srcpath) + }) + }) + } + }) + } +} + +function symlinkPathsSync (srcpath, dstpath) { + let exists + if (path.isAbsolute(srcpath)) { + exists = fs.existsSync(srcpath) + if (!exists) throw new Error('absolute srcpath does not exist') + return { + 'toCwd': srcpath, + 'toDst': srcpath + } + } else { + const dstdir = path.dirname(dstpath) + const relativeToDst = path.join(dstdir, srcpath) + exists = fs.existsSync(relativeToDst) + if (exists) { + return { + 'toCwd': relativeToDst, + 'toDst': srcpath + } + } else { + exists = fs.existsSync(srcpath) + if (!exists) throw new Error('relative srcpath does not exist') + return { + 'toCwd': srcpath, + 'toDst': path.relative(dstdir, srcpath) + } + } + } +} + +module.exports = { + symlinkPaths, + symlinkPathsSync +} diff --git a/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/fs-extra/lib/ensure/symlink-type.js new file mode 100644 index 0000000..4f8787c --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/symlink-type.js @@ -0,0 +1,31 @@ +'use strict' + +const fs = require('graceful-fs') + +function symlinkType (srcpath, type, callback) { + callback = (typeof type === 'function') ? type : callback + type = (typeof type === 'function') ? false : type + if (type) return callback(null, type) + fs.lstat(srcpath, (err, stats) => { + if (err) return callback(null, 'file') + type = (stats && stats.isDirectory()) ? 'dir' : 'file' + callback(null, type) + }) +} + +function symlinkTypeSync (srcpath, type) { + let stats + + if (type) return type + try { + stats = fs.lstatSync(srcpath) + } catch (e) { + return 'file' + } + return (stats && stats.isDirectory()) ? 'dir' : 'file' +} + +module.exports = { + symlinkType, + symlinkTypeSync +} diff --git a/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/fs-extra/lib/ensure/symlink.js new file mode 100644 index 0000000..847c1b9 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/symlink.js @@ -0,0 +1,66 @@ +'use strict' + +const u = require('universalify').fromCallback +const path = require('path') +const fs = require('graceful-fs') +const _mkdirs = require('../mkdirs') +const mkdirs = _mkdirs.mkdirs +const mkdirsSync = _mkdirs.mkdirsSync + +const _symlinkPaths = require('./symlink-paths') +const symlinkPaths = _symlinkPaths.symlinkPaths +const symlinkPathsSync = _symlinkPaths.symlinkPathsSync + +const _symlinkType = require('./symlink-type') +const symlinkType = _symlinkType.symlinkType +const symlinkTypeSync = _symlinkType.symlinkTypeSync + +const pathExists = require('../path-exists').pathExists + +function createSymlink (srcpath, dstpath, type, callback) { + callback = (typeof type === 'function') ? type : callback + type = (typeof type === 'function') ? false : type + + pathExists(dstpath, (err, destinationExists) => { + if (err) return callback(err) + if (destinationExists) return callback(null) + symlinkPaths(srcpath, dstpath, (err, relative) => { + if (err) return callback(err) + srcpath = relative.toDst + symlinkType(relative.toCwd, type, (err, type) => { + if (err) return callback(err) + const dir = path.dirname(dstpath) + pathExists(dir, (err, dirExists) => { + if (err) return callback(err) + if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) + mkdirs(dir, err => { + if (err) return callback(err) + fs.symlink(srcpath, dstpath, type, callback) + }) + }) + }) + }) + }) +} + +function createSymlinkSync (srcpath, dstpath, type, callback) { + callback = (typeof type === 'function') ? type : callback + type = (typeof type === 'function') ? false : type + + const destinationExists = fs.existsSync(dstpath) + if (destinationExists) return undefined + + const relative = symlinkPathsSync(srcpath, dstpath) + srcpath = relative.toDst + type = symlinkTypeSync(relative.toCwd, type) + const dir = path.dirname(dstpath) + const exists = fs.existsSync(dir) + if (exists) return fs.symlinkSync(srcpath, dstpath, type) + mkdirsSync(dir) + return fs.symlinkSync(srcpath, dstpath, type) +} + +module.exports = { + createSymlink: u(createSymlink), + createSymlinkSync +} diff --git a/node_modules/fs-extra/lib/fs/index.js b/node_modules/fs-extra/lib/fs/index.js new file mode 100644 index 0000000..1821fd0 --- /dev/null +++ b/node_modules/fs-extra/lib/fs/index.js @@ -0,0 +1,107 @@ +// This is adapted from https://github.com/normalize/mz +// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors +const u = require('universalify').fromCallback +const fs = require('graceful-fs') + +const api = [ + 'access', + 'appendFile', + 'chmod', + 'chown', + 'close', + 'copyFile', + 'fchmod', + 'fchown', + 'fdatasync', + 'fstat', + 'fsync', + 'ftruncate', + 'futimes', + 'lchown', + 'link', + 'lstat', + 'mkdir', + 'mkdtemp', + 'open', + 'readFile', + 'readdir', + 'readlink', + 'realpath', + 'rename', + 'rmdir', + 'stat', + 'symlink', + 'truncate', + 'unlink', + 'utimes', + 'writeFile' +].filter(key => { + // Some commands are not available on some systems. Ex: + // fs.copyFile was added in Node.js v8.5.0 + // fs.mkdtemp was added in Node.js v5.10.0 + // fs.lchown is not available on at least some Linux + return typeof fs[key] === 'function' +}) + +// Export all keys: +Object.keys(fs).forEach(key => { + exports[key] = fs[key] +}) + +// Universalify async methods: +api.forEach(method => { + exports[method] = u(fs[method]) +}) + +// We differ from mz/fs in that we still ship the old, broken, fs.exists() +// since we are a drop-in replacement for the native module +exports.exists = function (filename, callback) { + if (typeof callback === 'function') { + return fs.exists(filename, callback) + } + return new Promise(resolve => { + return fs.exists(filename, resolve) + }) +} + +// fs.read() & fs.write need special treatment due to multiple callback args + +exports.read = function (fd, buffer, offset, length, position, callback) { + if (typeof callback === 'function') { + return fs.read(fd, buffer, offset, length, position, callback) + } + return new Promise((resolve, reject) => { + fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { + if (err) return reject(err) + resolve({ bytesRead, buffer }) + }) + }) +} + +// Function signature can be +// fs.write(fd, buffer[, offset[, length[, position]]], callback) +// OR +// fs.write(fd, string[, position[, encoding]], callback) +// so we need to handle both cases +exports.write = function (fd, buffer, a, b, c, callback) { + if (typeof arguments[arguments.length - 1] === 'function') { + return fs.write(fd, buffer, a, b, c, callback) + } + + // Check for old, depricated fs.write(fd, string[, position[, encoding]], callback) + if (typeof buffer === 'string') { + return new Promise((resolve, reject) => { + fs.write(fd, buffer, a, b, (err, bytesWritten, buffer) => { + if (err) return reject(err) + resolve({ bytesWritten, buffer }) + }) + }) + } + + return new Promise((resolve, reject) => { + fs.write(fd, buffer, a, b, c, (err, bytesWritten, buffer) => { + if (err) return reject(err) + resolve({ bytesWritten, buffer }) + }) + }) +} diff --git a/node_modules/fs-extra/lib/index.js b/node_modules/fs-extra/lib/index.js new file mode 100644 index 0000000..cb7dd9e --- /dev/null +++ b/node_modules/fs-extra/lib/index.js @@ -0,0 +1,22 @@ +'use strict' + +const assign = require('./util/assign') + +const fs = {} + +// Export graceful-fs: +assign(fs, require('./fs')) +// Export extra methods: +assign(fs, require('./copy')) +assign(fs, require('./copy-sync')) +assign(fs, require('./mkdirs')) +assign(fs, require('./remove')) +assign(fs, require('./json')) +assign(fs, require('./move')) +assign(fs, require('./move-sync')) +assign(fs, require('./empty')) +assign(fs, require('./ensure')) +assign(fs, require('./output')) +assign(fs, require('./path-exists')) + +module.exports = fs diff --git a/node_modules/fs-extra/lib/json/index.js b/node_modules/fs-extra/lib/json/index.js new file mode 100644 index 0000000..bae68d4 --- /dev/null +++ b/node_modules/fs-extra/lib/json/index.js @@ -0,0 +1,16 @@ +'use strict' + +const u = require('universalify').fromCallback +const jsonFile = require('./jsonfile') + +jsonFile.outputJson = u(require('./output-json')) +jsonFile.outputJsonSync = require('./output-json-sync') +// aliases +jsonFile.outputJSON = jsonFile.outputJson +jsonFile.outputJSONSync = jsonFile.outputJsonSync +jsonFile.writeJSON = jsonFile.writeJson +jsonFile.writeJSONSync = jsonFile.writeJsonSync +jsonFile.readJSON = jsonFile.readJson +jsonFile.readJSONSync = jsonFile.readJsonSync + +module.exports = jsonFile diff --git a/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/fs-extra/lib/json/jsonfile.js new file mode 100644 index 0000000..59cdb3e --- /dev/null +++ b/node_modules/fs-extra/lib/json/jsonfile.js @@ -0,0 +1,12 @@ +'use strict' + +const u = require('universalify').fromCallback +const jsonFile = require('jsonfile') + +module.exports = { + // jsonfile exports + readJson: u(jsonFile.readFile), + readJsonSync: jsonFile.readFileSync, + writeJson: u(jsonFile.writeFile), + writeJsonSync: jsonFile.writeFileSync +} diff --git a/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/fs-extra/lib/json/output-json-sync.js new file mode 100644 index 0000000..6f76710 --- /dev/null +++ b/node_modules/fs-extra/lib/json/output-json-sync.js @@ -0,0 +1,18 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const mkdir = require('../mkdirs') +const jsonFile = require('./jsonfile') + +function outputJsonSync (file, data, options) { + const dir = path.dirname(file) + + if (!fs.existsSync(dir)) { + mkdir.mkdirsSync(dir) + } + + jsonFile.writeJsonSync(file, data, options) +} + +module.exports = outputJsonSync diff --git a/node_modules/fs-extra/lib/json/output-json.js b/node_modules/fs-extra/lib/json/output-json.js new file mode 100644 index 0000000..d45edb8 --- /dev/null +++ b/node_modules/fs-extra/lib/json/output-json.js @@ -0,0 +1,27 @@ +'use strict' + +const path = require('path') +const mkdir = require('../mkdirs') +const pathExists = require('../path-exists').pathExists +const jsonFile = require('./jsonfile') + +function outputJson (file, data, options, callback) { + if (typeof options === 'function') { + callback = options + options = {} + } + + const dir = path.dirname(file) + + pathExists(dir, (err, itDoes) => { + if (err) return callback(err) + if (itDoes) return jsonFile.writeJson(file, data, options, callback) + + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + jsonFile.writeJson(file, data, options, callback) + }) + }) +} + +module.exports = outputJson diff --git a/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/fs-extra/lib/mkdirs/index.js new file mode 100644 index 0000000..29975c5 --- /dev/null +++ b/node_modules/fs-extra/lib/mkdirs/index.js @@ -0,0 +1,14 @@ +'use strict' +const u = require('universalify').fromCallback +const mkdirs = u(require('./mkdirs')) +const mkdirsSync = require('./mkdirs-sync') + +module.exports = { + mkdirs: mkdirs, + mkdirsSync: mkdirsSync, + // alias + mkdirp: mkdirs, + mkdirpSync: mkdirsSync, + ensureDir: mkdirs, + ensureDirSync: mkdirsSync +} diff --git a/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js b/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js new file mode 100644 index 0000000..a3ece40 --- /dev/null +++ b/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js @@ -0,0 +1,59 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const invalidWin32Path = require('./win32').invalidWin32Path + +const o777 = parseInt('0777', 8) + +function mkdirsSync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts } + } + + let mode = opts.mode + const xfs = opts.fs || fs + + if (process.platform === 'win32' && invalidWin32Path(p)) { + const errInval = new Error(p + ' contains invalid WIN32 path characters.') + errInval.code = 'EINVAL' + throw errInval + } + + if (mode === undefined) { + mode = o777 & (~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': + if (path.dirname(p) === p) throw err0 + made = mkdirsSync(path.dirname(p), opts, made) + mkdirsSync(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: + let stat + try { + stat = xfs.statSync(p) + } catch (err1) { + throw err0 + } + if (!stat.isDirectory()) throw err0 + break + } + } + + return made +} + +module.exports = mkdirsSync diff --git a/node_modules/fs-extra/lib/mkdirs/mkdirs.js b/node_modules/fs-extra/lib/mkdirs/mkdirs.js new file mode 100644 index 0000000..1897533 --- /dev/null +++ b/node_modules/fs-extra/lib/mkdirs/mkdirs.js @@ -0,0 +1,63 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const invalidWin32Path = require('./win32').invalidWin32Path + +const o777 = parseInt('0777', 8) + +function mkdirs (p, opts, callback, made) { + if (typeof opts === 'function') { + callback = opts + opts = {} + } else if (!opts || typeof opts !== 'object') { + opts = { mode: opts } + } + + if (process.platform === 'win32' && invalidWin32Path(p)) { + const errInval = new Error(p + ' contains invalid WIN32 path characters.') + errInval.code = 'EINVAL' + return callback(errInval) + } + + let mode = opts.mode + const xfs = opts.fs || fs + + if (mode === undefined) { + mode = o777 & (~process.umask()) + } + if (!made) made = null + + callback = callback || function () {} + p = path.resolve(p) + + xfs.mkdir(p, mode, er => { + if (!er) { + made = made || p + return callback(null, made) + } + switch (er.code) { + case 'ENOENT': + if (path.dirname(p) === p) return callback(er) + mkdirs(path.dirname(p), opts, (er, made) => { + if (er) callback(er, made) + else mkdirs(p, opts, callback, 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, (er2, stat) => { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) callback(er, made) + else callback(null, made) + }) + break + } + }) +} + +module.exports = mkdirs diff --git a/node_modules/fs-extra/lib/mkdirs/win32.js b/node_modules/fs-extra/lib/mkdirs/win32.js new file mode 100644 index 0000000..99b3920 --- /dev/null +++ b/node_modules/fs-extra/lib/mkdirs/win32.js @@ -0,0 +1,25 @@ +'use strict' + +const path = require('path') + +// get drive on windows +function getRootPath (p) { + p = path.normalize(path.resolve(p)).split(path.sep) + if (p.length > 0) return p[0] + return null +} + +// http://stackoverflow.com/a/62888/10333 contains more accurate +// TODO: expand to include the rest +const INVALID_PATH_CHARS = /[<>:"|?*]/ + +function invalidWin32Path (p) { + const rp = getRootPath(p) + p = p.replace(rp, '') + return INVALID_PATH_CHARS.test(p) +} + +module.exports = { + getRootPath, + invalidWin32Path +} diff --git a/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/fs-extra/lib/move-sync/index.js new file mode 100644 index 0000000..a5e9114 --- /dev/null +++ b/node_modules/fs-extra/lib/move-sync/index.js @@ -0,0 +1,118 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const copySync = require('../copy-sync').copySync +const removeSync = require('../remove').removeSync +const mkdirpSync = require('../mkdirs').mkdirsSync +const buffer = require('../util/buffer') + +function moveSync (src, dest, options) { + options = options || {} + const overwrite = options.overwrite || options.clobber || false + + src = path.resolve(src) + dest = path.resolve(dest) + + if (src === dest) return fs.accessSync(src) + + if (isSrcSubdir(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`) + + mkdirpSync(path.dirname(dest)) + tryRenameSync() + + function tryRenameSync () { + if (overwrite) { + try { + return fs.renameSync(src, dest) + } catch (err) { + if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST' || err.code === 'EPERM') { + removeSync(dest) + options.overwrite = false // just overwriteed it, no need to do it again + return moveSync(src, dest, options) + } + + if (err.code !== 'EXDEV') throw err + return moveSyncAcrossDevice(src, dest, overwrite) + } + } else { + try { + fs.linkSync(src, dest) + return fs.unlinkSync(src) + } catch (err) { + if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') { + return moveSyncAcrossDevice(src, dest, overwrite) + } + throw err + } + } + } +} + +function moveSyncAcrossDevice (src, dest, overwrite) { + const stat = fs.statSync(src) + + if (stat.isDirectory()) { + return moveDirSyncAcrossDevice(src, dest, overwrite) + } else { + return moveFileSyncAcrossDevice(src, dest, overwrite) + } +} + +function moveFileSyncAcrossDevice (src, dest, overwrite) { + const BUF_LENGTH = 64 * 1024 + const _buff = buffer(BUF_LENGTH) + + const flags = overwrite ? 'w' : 'wx' + + const fdr = fs.openSync(src, 'r') + const stat = fs.fstatSync(fdr) + const fdw = fs.openSync(dest, flags, stat.mode) + let bytesRead = 1 + let pos = 0 + + while (bytesRead > 0) { + bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) + fs.writeSync(fdw, _buff, 0, bytesRead) + pos += bytesRead + } + + fs.closeSync(fdr) + fs.closeSync(fdw) + return fs.unlinkSync(src) +} + +function moveDirSyncAcrossDevice (src, dest, overwrite) { + const options = { + overwrite: false + } + + if (overwrite) { + removeSync(dest) + tryCopySync() + } else { + tryCopySync() + } + + function tryCopySync () { + copySync(src, dest, options) + return removeSync(src) + } +} + +// return true if dest is a subdir of src, otherwise false. +// extract dest base dir and check if that is the same as src basename +function isSrcSubdir (src, dest) { + try { + return fs.statSync(src).isDirectory() && + src !== dest && + dest.indexOf(src) > -1 && + dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src) + } catch (e) { + return false + } +} + +module.exports = { + moveSync +} diff --git a/node_modules/fs-extra/lib/move/index.js b/node_modules/fs-extra/lib/move/index.js new file mode 100644 index 0000000..a718135 --- /dev/null +++ b/node_modules/fs-extra/lib/move/index.js @@ -0,0 +1,170 @@ +'use strict' + +// most of this code was written by Andrew Kelley +// licensed under the BSD license: see +// https://github.com/andrewrk/node-mv/blob/master/package.json + +// this needs a cleanup + +const u = require('universalify').fromCallback +const fs = require('graceful-fs') +const copy = require('../copy/copy') +const path = require('path') +const remove = require('../remove').remove +const mkdirp = require('../mkdirs').mkdirs + +function move (src, dest, options, callback) { + if (typeof options === 'function') { + callback = options + options = {} + } + + const overwrite = options.overwrite || options.clobber || false + + isSrcSubdir(src, dest, (err, itIs) => { + if (err) return callback(err) + if (itIs) return callback(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`)) + mkdirp(path.dirname(dest), err => { + if (err) return callback(err) + doRename() + }) + }) + + function doRename () { + if (path.resolve(src) === path.resolve(dest)) { + fs.access(src, callback) + } else if (overwrite) { + fs.rename(src, dest, err => { + if (!err) return callback() + + if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST') { + remove(dest, err => { + if (err) return callback(err) + options.overwrite = false // just overwriteed it, no need to do it again + move(src, dest, options, callback) + }) + return + } + + // weird Windows shit + if (err.code === 'EPERM') { + setTimeout(() => { + remove(dest, err => { + if (err) return callback(err) + options.overwrite = false + move(src, dest, options, callback) + }) + }, 200) + return + } + + if (err.code !== 'EXDEV') return callback(err) + moveAcrossDevice(src, dest, overwrite, callback) + }) + } else { + fs.link(src, dest, err => { + if (err) { + if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') { + return moveAcrossDevice(src, dest, overwrite, callback) + } + return callback(err) + } + return fs.unlink(src, callback) + }) + } + } +} + +function moveAcrossDevice (src, dest, overwrite, callback) { + fs.stat(src, (err, stat) => { + if (err) return callback(err) + + if (stat.isDirectory()) { + moveDirAcrossDevice(src, dest, overwrite, callback) + } else { + moveFileAcrossDevice(src, dest, overwrite, callback) + } + }) +} + +function moveFileAcrossDevice (src, dest, overwrite, callback) { + const flags = overwrite ? 'w' : 'wx' + const ins = fs.createReadStream(src) + const outs = fs.createWriteStream(dest, { flags }) + + ins.on('error', err => { + ins.destroy() + outs.destroy() + outs.removeListener('close', onClose) + + // may want to create a directory but `out` line above + // creates an empty file for us: See #108 + // don't care about error here + fs.unlink(dest, () => { + // note: `err` here is from the input stream errror + if (err.code === 'EISDIR' || err.code === 'EPERM') { + moveDirAcrossDevice(src, dest, overwrite, callback) + } else { + callback(err) + } + }) + }) + + outs.on('error', err => { + ins.destroy() + outs.destroy() + outs.removeListener('close', onClose) + callback(err) + }) + + outs.once('close', onClose) + ins.pipe(outs) + + function onClose () { + fs.unlink(src, callback) + } +} + +function moveDirAcrossDevice (src, dest, overwrite, callback) { + const options = { + overwrite: false + } + + if (overwrite) { + remove(dest, err => { + if (err) return callback(err) + startCopy() + }) + } else { + startCopy() + } + + function startCopy () { + copy(src, dest, options, err => { + if (err) return callback(err) + remove(src, callback) + }) + } +} + +// return true if dest is a subdir of src, otherwise false. +// extract dest base dir and check if that is the same as src basename +function isSrcSubdir (src, dest, cb) { + fs.stat(src, (err, st) => { + if (err) return cb(err) + if (st.isDirectory()) { + const baseDir = dest.split(path.dirname(src) + path.sep)[1] + if (baseDir) { + const destBasename = baseDir.split(path.sep)[0] + if (destBasename) return cb(null, src !== dest && dest.indexOf(src) > -1 && destBasename === path.basename(src)) + return cb(null, false) + } + return cb(null, false) + } + return cb(null, false) + }) +} + +module.exports = { + move: u(move) +} diff --git a/node_modules/fs-extra/lib/output/index.js b/node_modules/fs-extra/lib/output/index.js new file mode 100644 index 0000000..53d5905 --- /dev/null +++ b/node_modules/fs-extra/lib/output/index.js @@ -0,0 +1,40 @@ +'use strict' + +const u = require('universalify').fromCallback +const fs = require('graceful-fs') +const path = require('path') +const mkdir = require('../mkdirs') +const pathExists = require('../path-exists').pathExists + +function outputFile (file, data, encoding, callback) { + if (typeof encoding === 'function') { + callback = encoding + encoding = 'utf8' + } + + const dir = path.dirname(file) + pathExists(dir, (err, itDoes) => { + if (err) return callback(err) + if (itDoes) return fs.writeFile(file, data, encoding, callback) + + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + + fs.writeFile(file, data, encoding, callback) + }) + }) +} + +function outputFileSync (file, data, encoding) { + const dir = path.dirname(file) + if (fs.existsSync(dir)) { + return fs.writeFileSync.apply(fs, arguments) + } + mkdir.mkdirsSync(dir) + fs.writeFileSync.apply(fs, arguments) +} + +module.exports = { + outputFile: u(outputFile), + outputFileSync +} diff --git a/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/fs-extra/lib/path-exists/index.js new file mode 100644 index 0000000..ddd9bc7 --- /dev/null +++ b/node_modules/fs-extra/lib/path-exists/index.js @@ -0,0 +1,12 @@ +'use strict' +const u = require('universalify').fromPromise +const fs = require('../fs') + +function pathExists (path) { + return fs.access(path).then(() => true).catch(() => false) +} + +module.exports = { + pathExists: u(pathExists), + pathExistsSync: fs.existsSync +} diff --git a/node_modules/fs-extra/lib/remove/index.js b/node_modules/fs-extra/lib/remove/index.js new file mode 100644 index 0000000..cee5340 --- /dev/null +++ b/node_modules/fs-extra/lib/remove/index.js @@ -0,0 +1,9 @@ +'use strict' + +const u = require('universalify').fromCallback +const rimraf = require('./rimraf') + +module.exports = { + remove: u(rimraf), + removeSync: rimraf.sync +} diff --git a/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/fs-extra/lib/remove/rimraf.js new file mode 100644 index 0000000..f078694 --- /dev/null +++ b/node_modules/fs-extra/lib/remove/rimraf.js @@ -0,0 +1,314 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const assert = require('assert') + +const isWindows = (process.platform === 'win32') + +function defaults (options) { + const methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(m => { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 +} + +function rimraf (p, options, cb) { + let busyTries = 0 + + 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) + + rimraf_(p, options, function CB (er) { + if (er) { + if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && + busyTries < options.maxBusyTries) { + busyTries++ + let time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(() => rimraf_(p, options, CB), time) + } + + // already gone + if (er.code === 'ENOENT') er = null + } + + cb(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, (er, st) => { + if (er && er.code === 'ENOENT') { + return cb(null) + } + + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === 'EPERM' && isWindows) { + return fixWinEPERM(p, options, er, cb) + } + + if (st && st.isDirectory()) { + return rmdir(p, options, er, cb) + } + + options.unlink(p, 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, 0o666, er2 => { + if (er2) { + cb(er2.code === 'ENOENT' ? null : er) + } else { + options.stat(p, (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) { + let stats + + assert(p) + assert(options) + if (er) { + assert(er instanceof Error) + } + + try { + options.chmodSync(p, 0o666) + } catch (er2) { + if (er2.code === 'ENOENT') { + return + } else { + throw er + } + } + + try { + 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, 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, (er, files) => { + if (er) return cb(er) + + let n = files.length + let errState + + if (n === 0) return options.rmdir(p, cb) + + files.forEach(f => { + rimraf(path.join(p, f), options, 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) { + let st + + 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') + + try { + 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 + } else if (er.code === 'EPERM') { + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + } else 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 === 'ENOTDIR') { + throw originalEr + } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { + rmkidsSync(p, options) + } else if (er.code !== 'ENOENT') { + throw er + } + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(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. + const retries = isWindows ? 100 : 1 + let i = 0 + do { + let threw = true + try { + const ret = options.rmdirSync(p, options) + threw = false + return ret + } finally { + if (++i < retries && threw) continue // eslint-disable-line + } + } while (true) +} + +module.exports = rimraf +rimraf.sync = rimrafSync diff --git a/node_modules/fs-extra/lib/util/assign.js b/node_modules/fs-extra/lib/util/assign.js new file mode 100644 index 0000000..317e5ec --- /dev/null +++ b/node_modules/fs-extra/lib/util/assign.js @@ -0,0 +1,16 @@ +'use strict' + +// simple mutable assign +function assign () { + const args = [].slice.call(arguments).filter(i => i) + const dest = args.shift() + args.forEach(src => { + Object.keys(src).forEach(key => { + dest[key] = src[key] + }) + }) + + return dest +} + +module.exports = assign diff --git a/node_modules/fs-extra/lib/util/buffer.js b/node_modules/fs-extra/lib/util/buffer.js new file mode 100644 index 0000000..93af51b --- /dev/null +++ b/node_modules/fs-extra/lib/util/buffer.js @@ -0,0 +1,11 @@ +/* eslint-disable node/no-deprecated-api */ +module.exports = function (size) { + if (typeof Buffer.allocUnsafe === 'function') { + try { + return Buffer.allocUnsafe(size) + } catch (e) { + return new Buffer(size) + } + } + return new Buffer(size) +} diff --git a/node_modules/fs-extra/lib/util/utimes.js b/node_modules/fs-extra/lib/util/utimes.js new file mode 100644 index 0000000..8916a1b --- /dev/null +++ b/node_modules/fs-extra/lib/util/utimes.js @@ -0,0 +1,79 @@ +'use strict' + +const fs = require('graceful-fs') +const os = require('os') +const path = require('path') + +// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not +function hasMillisResSync () { + let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2)) + tmpfile = path.join(os.tmpdir(), tmpfile) + + // 550 millis past UNIX epoch + const d = new Date(1435410243862) + fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141') + const fd = fs.openSync(tmpfile, 'r+') + fs.futimesSync(fd, d, d) + fs.closeSync(fd) + return fs.statSync(tmpfile).mtime > 1435410243000 +} + +function hasMillisRes (callback) { + let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2)) + tmpfile = path.join(os.tmpdir(), tmpfile) + + // 550 millis past UNIX epoch + const d = new Date(1435410243862) + fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => { + if (err) return callback(err) + fs.open(tmpfile, 'r+', (err, fd) => { + if (err) return callback(err) + fs.futimes(fd, d, d, err => { + if (err) return callback(err) + fs.close(fd, err => { + if (err) return callback(err) + fs.stat(tmpfile, (err, stats) => { + if (err) return callback(err) + callback(null, stats.mtime > 1435410243000) + }) + }) + }) + }) + }) +} + +function timeRemoveMillis (timestamp) { + if (typeof timestamp === 'number') { + return Math.floor(timestamp / 1000) * 1000 + } else if (timestamp instanceof Date) { + return new Date(Math.floor(timestamp.getTime() / 1000) * 1000) + } else { + throw new Error('fs-extra: timeRemoveMillis() unknown parameter type') + } +} + +function utimesMillis (path, atime, mtime, callback) { + // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) + fs.open(path, 'r+', (err, fd) => { + if (err) return callback(err) + fs.futimes(fd, atime, mtime, futimesErr => { + fs.close(fd, closeErr => { + if (callback) callback(futimesErr || closeErr) + }) + }) + }) +} + +function utimesMillisSync (path, atime, mtime) { + const fd = fs.openSync(path, 'r+') + fs.futimesSync(fd, atime, mtime) + return fs.closeSync(fd) +} + +module.exports = { + hasMillisRes, + hasMillisResSync, + timeRemoveMillis, + utimesMillis, + utimesMillisSync +} diff --git a/node_modules/fs-extra/package.json b/node_modules/fs-extra/package.json new file mode 100644 index 0000000..0f65abb --- /dev/null +++ b/node_modules/fs-extra/package.json @@ -0,0 +1,95 @@ +{ + "_from": "fs-extra@^5.0.0", + "_id": "fs-extra@5.0.0", + "_inBundle": false, + "_integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "_location": "/fs-extra", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "fs-extra@^5.0.0", + "name": "fs-extra", + "escapedName": "fs-extra", + "rawSpec": "^5.0.0", + "saveSpec": null, + "fetchSpec": "^5.0.0" + }, + "_requiredBy": [ + "/sequelize-cli" + ], + "_resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "_shasum": "414d0110cdd06705734d055652c5411260c31abd", + "_spec": "fs-extra@^5.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/sequelize-cli", + "author": { + "name": "JP Richardson", + "email": "jprichardson@gmail.com" + }, + "bugs": { + "url": "https://github.com/jprichardson/node-fs-extra/issues" + }, + "bundleDependencies": false, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "deprecated": false, + "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.", + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.4.5", + "klaw": "^1.0.0", + "klaw-sync": "^1.1.2", + "minimist": "^1.1.1", + "mocha": "^3.1.2", + "proxyquire": "^1.7.10", + "read-dir-files": "^0.1.1", + "rimraf": "^2.2.8", + "secure-random": "^1.1.1", + "semver": "^5.3.0", + "standard": "^10.0.2", + "standard-markdown": "^4.0.1" + }, + "homepage": "https://github.com/jprichardson/node-fs-extra", + "keywords": [ + "fs", + "file", + "file system", + "copy", + "directory", + "extra", + "mkdirp", + "mkdir", + "mkdirs", + "recursive", + "json", + "read", + "write", + "extra", + "delete", + "remove", + "touch", + "create", + "text", + "output", + "move" + ], + "license": "MIT", + "main": "./lib/index.js", + "name": "fs-extra", + "repository": { + "type": "git", + "url": "git+https://github.com/jprichardson/node-fs-extra.git" + }, + "scripts": { + "coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js", + "coveralls": "coveralls < coverage/lcov.info", + "lint": "standard && standard-markdown", + "test": "npm run lint && npm run unit", + "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha", + "unit": "node test.js" + }, + "version": "5.0.0" +} diff --git a/node_modules/generic-pool/.eslintignore b/node_modules/generic-pool/.eslintignore new file mode 100644 index 0000000..09a8422 --- /dev/null +++ b/node_modules/generic-pool/.eslintignore @@ -0,0 +1 @@ +!.eslintrc.js diff --git a/node_modules/generic-pool/.eslintrc.js b/node_modules/generic-pool/.eslintrc.js new file mode 100644 index 0000000..57ffb2e --- /dev/null +++ b/node_modules/generic-pool/.eslintrc.js @@ -0,0 +1,8 @@ +module.exports = { + parserOptions: { ecmaVersion: 6 }, + plugins: ["prettier"], + rules: { + "prettier/prettier": "error" + }, + extends: ["prettier"] +}; diff --git a/node_modules/generic-pool/.travis.yml b/node_modules/generic-pool/.travis.yml new file mode 100644 index 0000000..0e86c0b --- /dev/null +++ b/node_modules/generic-pool/.travis.yml @@ -0,0 +1,20 @@ +language: node_js +node_js: + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + +install: + - make install + +script: + - make lint + - make test + +sudo: false + +matrix: + fast_finish: true diff --git a/node_modules/generic-pool/CHANGELOG.md b/node_modules/generic-pool/CHANGELOG.md new file mode 100644 index 0000000..37a1dc4 --- /dev/null +++ b/node_modules/generic-pool/CHANGELOG.md @@ -0,0 +1,209 @@ +# Change Log + +## [3.4.2] - Febuary 16 2018 +- fix `pool.use` to resolve after user supplied function has finished. (@asannes) + +## [3.4.1] - Febuary 1 2018 +- prevent timed-out resource requests from being issued resources (@rebareba) + +## [3.4.0] - December 27 2017 +- #218 fix numerous docblock annotations and minor errors in internal classes (@geovanisouza92) + +## [3.3.0] - December 27 2017 +- add `use` method to simplify basic pool usage (@san00) + +## [3.2.0] - October 15 2017 +- add `isBorrowedResource` method to check if objects are currently on loan from pool (@C-h-e-r-r-y) + +## [3.1.8] - September 14 2017 +- fix undefined and annoying `autostart=false` behaviour (@sushantdhiman) +- document `autostart` behaviour (@sandfox) +- fix typos (@wvanderdeijl @AlexTes) + +## [3.1.7] - Febuary 9 2017 +- fix warning when using bluebird promise impl (@benny-medflyt) + +## [3.1.6] - December 28 2016 +- fix #173 where pool would not attempt to dispense reources upon `pool.destroy` +- fix some out of date readme section +- fix test warning for unhandled rejection on dispense + +## [3.1.5] - December 20 2016 +- fix drain code to correctly wait on borrowed resources (@drew-r) +- fix drain example in readme (@watson) + +## [3.1.4] - November 28 2016 +- fix faulty Promise detection where user supplied promise lib would be ignored + +## [3.1.3] - November 26 2016 +- internal refactoring and comment improvements +- fix #159 so draining and closing don't leave resources behind +- stop the evictor from keeping the event loop open after draining + +## [3.1.2] - November 22 2016 +- Readme tidy up +- Add missing changelog entry + +## [3.1.1] - November 18 2016 +- Add Readme link for legacy branch + +## [3.1.0] - November 6 2016 +- Inject dependencies into Pool to allow easier user extension + +## [3.0.1] - November 1 2016 +- Passthrough Pool's promise impl to deferreds so they are used internally and exposed correctly on pool.acquire (@eide) + +## [3.0.0] - October 30 2016 +- This is pretty big and the migration guide in the README has more detailed set of changes! +- switch support to nodejs v4 and above +- change external interfaces to use promises instead of callbacks +- remove logging +- decouple create/destroy operations from acquire/release operations +- pool should now be created via `poolCreate` factory method instead of constructor. +- huge internal rewrite and flow control changes +- Pool is now an eventEmitter + +## [2.4.3] - October 15 2016 +- Use domain.bind to preserve domain context (@LewisJEllis) + +## [2.4.2] - March 26 2016 +- Travis now runs and fails lint checks (@kevinburke) +- fixed bug #128 where using async validation incorrectly tracked resource state (@johnjdooley and @robfyfe) +- fixed broken readme example that had aged badly + +## [2.4.1] - February 20 2016 +- Documented previously created/fixed bug #122 (thanks @jasonrhodes) +- Improved Makefile and test runner docs thanks (@kevinburke) +- fixed bug documented in #121 where pool could make incorrect decisions about which resources were eligible for removal. (thanks @mikemorris) + +## [2.4.0] - January 18 2016 +- Merged #118 - closes #110 - optional eslinting for test and lib using "standard" ruleset +- Merged #114 - closes #113 - "classes" now used internally instead of object literals and exports support being called as a constructor (along with old factory behaviour) (contributed by @felixfbecker) +- Move history from README.md to CHANGELOG.md and reformat +- Closes #122 - fixes trapped connection bug when destroying a connection while others are in use + +## [2.3.1] - January 7 2016 +- Documentation fixes and widened number of nodejs versions tested on travis + +## [2.3.0] - January 1 2016 +- Merged #105 - allow asynchronous validate functions (contributed by @felipou) + +## [2.2.2] - December 13 2015 +- Merged #106 - fix condition where non "resource pool" created objects could be returned to the pool. (contributed by @devzer01) + +## [2.2.1] - October 30 2015 +- Merged #104 - fix #103 - condition where pool can create > specified max number of connections (contributed by @devzer01) + +## [2.2.0] - March 26 2015 +- Merged #92 - add getMaxPoolSize function (contributed by platypusMaximus) + +## [2.1.1] - July 5 2015 +- fix README error about priority queueing (spotted by @kmdm) + +## [2.1.0] - June 19 2014 +- Merged #72 - Add optional returnToHead flag, if true, resources are returned to head of queue (stack like behaviour) upon release (contributed by calibr), also see #68 for further discussion. + +## [2.0.4] - July 27 2013 +- Merged #64 - Fix for not removing idle objects (contributed by PiotrWpl) + +## [2.0.3] - January 16 2013 +- Merged #56/#57 - Add optional refreshIdle flag. If false, idle resources at the pool minimum will not be destroyed/re-created. (contributed by wshaver) +- Merged #54 - Factory can be asked to validate pooled objects (contributed by tikonen) + +## [2.0.2] - October 22 2012 +- Fix #51, #48 - createResource() should check for null clientCb in err case (contributed by pooyasencha) +- Merged #52 - fix bug of infinite wait when create object aync error (contributed by windyrobin) +- Merged #53 - change the position of dispense and callback to ensure the time order (contributed by windyrobin) + +## [2.0.1] - August 29 2012 +- Fix #44 - leak of 'err' and 'obj' in createResource() +- Add devDependencies block to package.json +- Add travis-ci.org integration + +## [2.0.0] - July 31 2012 +- Non-backwards compatible change: remove adjustCallback + - acquire() callback must accept two params: (err, obj) +- Add optional 'min' param to factory object that specifies minimum number of resources to keep in pool +- Merged #38 (package.json/Makefile changes - contributed by strk) + +## [1.0.12] - June 27 2012 +- Merged #37 (Clear remove idle timer after destroyAllNow - contributed by dougwilson) + +## [1.0.11] - June 17 2012 +- Merged #36 ("pooled" method to perform function decoration for pooled methods - contributed by cosbynator) + +## [1.0.10] - May 3 2012 +- Merged #35 (Remove client from availbleObjects on destroy(client) - contributed by blax) + +## [1.0.9] - Dec 18 2011 +- Merged #25 (add getName() - contributed by BryanDonovan) +- Merged #27 (remove sys import - contributed by botker) +- Merged #26 (log levels - contributed by JoeZ99) + +## [1.0.8] - Nov 16 2011 +- Merged #21 (add getter methods to see pool size, etc. - contributed by BryanDonovan) + +## [1.0.7] - Oct 17 2011 +- Merged #19 (prevent release on the same obj twice - contributed by tkrynski) +- Merged #20 (acquire() returns boolean indicating whether pool is full - contributed by tilgovi) + +## [1.0.6] - May 23 2011 +- Merged #13 (support error variable in acquire callback - contributed by tmcw) + - Note: This change is backwards compatible. But new code should use the two parameter callback format in pool.create() functions from now on. +- Merged #15 (variable scope issue in dispense() - contributed by eevans) + +## [1.0.5] - Apr 20 2011 +- Merged #12 (ability to drain pool - contributed by gdusbabek) + +## [1.0.4] - Jan 25 2011 +- Fixed #6 (objects reaped with undefined timeouts) +- Fixed #7 (objectTimeout issue) + +## [1.0.3] - Dec 9 2010 +- Added priority queueing (thanks to sylvinus) +- Contributions from Poetro + - Name changes to match conventions described here: http://en.wikipedia.org/wiki/Object_pool_pattern + - borrow() renamed to acquire() + - returnToPool() renamed to release() + - destroy() removed from public interface + - added JsDoc comments + - Priority queueing enhancements + +## [1.0.2] - Nov 9 2010 +- First NPM release + +======= + +[unreleased]: https://github.com/coopernurse/node-pool/compare/v3.4.2...HEAD +[3.4.2]: https://github.com/coopernurse/node-pool/compare/v3.4.1...v3.4.2 +[3.4.1]: https://github.com/coopernurse/node-pool/compare/v3.4.0...v3.4.1 +[3.4.0]: https://github.com/coopernurse/node-pool/compare/v3.3.0...v3.4.0 +[3.3.0]: https://github.com/coopernurse/node-pool/compare/v3.2.0...v3.3.0 +[3.2.0]: https://github.com/coopernurse/node-pool/compare/v3.1.8...v3.2.0 +[3.1.8]: https://github.com/coopernurse/node-pool/compare/v3.1.7...v3.1.8 +[3.1.7]: https://github.com/coopernurse/node-pool/compare/v3.1.6...v3.1.7 +[3.1.6]: https://github.com/coopernurse/node-pool/compare/v3.1.5...v3.1.6 +[3.1.5]: https://github.com/coopernurse/node-pool/compare/v3.1.4...v3.1.5 +[3.1.4]: https://github.com/coopernurse/node-pool/compare/v3.1.3...v3.1.4 +[3.1.3]: https://github.com/coopernurse/node-pool/compare/v3.1.2...v3.1.3 +[3.1.2]: https://github.com/coopernurse/node-pool/compare/v3.1.1...v3.1.2 +[3.1.1]: https://github.com/coopernurse/node-pool/compare/v3.1.0...v3.1.1 +[3.1.0]: https://github.com/coopernurse/node-pool/compare/v3.0.1...v3.1.0 +[3.0.1]: https://github.com/coopernurse/node-pool/compare/v3.0.0...v3.0.1 +[3.0.0]: https://github.com/coopernurse/node-pool/compare/v2.4.3...v3.0.0 +[2.4.3]: https://github.com/coopernurse/node-pool/compare/v2.4.2...v2.4.3 +[2.4.2]: https://github.com/coopernurse/node-pool/compare/v2.4.1...v2.4.2 +[2.4.1]: https://github.com/coopernurse/node-pool/compare/v2.4.0...v2.4.1 +[2.4.0]: https://github.com/coopernurse/node-pool/compare/v2.3.1...v2.4.0 +[2.3.1]: https://github.com/coopernurse/node-pool/compare/v2.3.0...v2.3.1 +[2.3.0]: https://github.com/coopernurse/node-pool/compare/v2.2.2...v2.3.0 +[2.2.2]: https://github.com/coopernurse/node-pool/compare/v2.2.1...v2.2.2 +[2.2.1]: https://github.com/coopernurse/node-pool/compare/v2.2.0...v2.2.1 +[2.2.0]: https://github.com/coopernurse/node-pool/compare/v2.1.1...v2.2.0 +[2.1.1]: https://github.com/coopernurse/node-pool/compare/v2.1.0...v2.1.1 +[2.1.0]: https://github.com/coopernurse/node-pool/compare/v2.0.4...v2.1.0 +[2.0.4]: https://github.com/coopernurse/node-pool/compare/v2.0.3...v2.0.4 +[2.0.3]: https://github.com/coopernurse/node-pool/compare/v2.0.2...v2.0.3 +[2.0.2]: https://github.com/coopernurse/node-pool/compare/v2.0.1...v2.0.2 +[2.0.1]: https://github.com/coopernurse/node-pool/compare/v2.0.0...v2.0.1 +[2.0.0]: https://github.com/coopernurse/node-pool/compare/v1.0.12...v2.0.0 diff --git a/node_modules/generic-pool/Makefile b/node_modules/generic-pool/Makefile new file mode 100644 index 0000000..405a7a4 --- /dev/null +++ b/node_modules/generic-pool/Makefile @@ -0,0 +1,18 @@ +.PHONY: all clean install check test lint + +all: + +clean: + rm -rf node_modules + +install: + npm install + +check: + npm test + +test: + npm test + +lint: + npm run lint diff --git a/node_modules/generic-pool/README.md b/node_modules/generic-pool/README.md new file mode 100644 index 0000000..faefbac --- /dev/null +++ b/node_modules/generic-pool/README.md @@ -0,0 +1,397 @@ +[![build status](https://secure.travis-ci.org/coopernurse/node-pool.png)](http://travis-ci.org/coopernurse/node-pool) + +# Generic Pool + +## About + + Generic resource pool with Promise based API. Can be used to reuse or throttle usage of expensive resources such as database connections. + + + +**V3 upgrade warning** + +Version 3 contains many breaking changes. The differences are mostly minor and I hope easy to accommodate. There is a very rough and basic [upgrade guide](https://gist.github.com/sandfox/5ca20648b60a0cb959638c0cd6fcd02d) I've written, improvements and other attempts most welcome. + +If you are after the older version 2 of this library you should look at the [current github branch](https://github.com/coopernurse/node-pool/tree/v2.5) for it. + + +## History + +The history has been moved to the [CHANGELOG](CHANGELOG.md) + + +## Installation + +```sh +$ npm install generic-pool [--save] +``` + + +## Example + +Here is an example using a fictional generic database driver that doesn't implement any pooling whatsoever itself. + +```js +const genericPool = require("generic-pool"); +const DbDriver = require("some-db-driver"); + +/** + * Step 1 - Create pool using a factory object + */ +const factory = { + create: function() { + return DbDriver.createClient(); + }, + destroy: function(client) { + client.disconnect(); + } +}; + +const opts = { + max: 10, // maximum size of the pool + min: 2 // minimum size of the pool +}; + +const myPool = genericPool.createPool(factory, opts); + +/** + * Step 2 - Use pool in your code to acquire/release resources + */ + +// acquire connection - Promise is resolved +// once a resource becomes available +const resourcePromise = myPool.acquire(); + +resourcePromise + .then(function(client) { + client.query("select * from foo", [], function() { + // return object back to pool + myPool.release(client); + }); + }) + .catch(function(err) { + // handle error - this is generally a timeout or maxWaitingClients + // error + }); + +/** + * Step 3 - Drain pool during shutdown (optional) + */ +// Only call this once in your application -- at the point you want +// to shutdown and stop using this pool. +myPool.drain().then(function() { + myPool.clear(); +}); + +``` + + +## Documentation + + + +### Creating a pool + +Whilst it is possible to directly instantiate the Pool class directly, it is recommended to use the `createPool` function exported by module as the constructor method signature may change in the future. + +### createPool + +The createPool function takes two arguments: + +- `factory` : an object containing functions to create/destroy/test resources for the `Pool` +- `opts` : an optional object/dictonary to allow configuring/altering behaviour the of the `Pool` + +```js +const genericPool = require('generic-pool') +const pool = genericPool.createPool(factory, opts) +``` + +**factory** + +Can be any object/instance but must have the following properties: + +- `create` : a function that the pool will call when it wants a new resource. It should return a Promise that either resolves to a `resource` or rejects to an `Error` if it is unable to create a resource for whatever reason. +- `destroy`: a function that the pool will call when it wants to destroy a resource. It should accept one argument `resource` where `resource` is whatever `factory.create` made. The `destroy` function should return a `Promise` that resolves once it has destroyed the resource. + + +optionally it can also have the following property: + +- `validate`: a function that the pool will call if it wants to validate a resource. It should accept one argument `resource` where `resource` is whatever `factory.create` made. Should return a `Promise` that resolves a `boolean` where `true` indicates the resource is still valid or `false` if the resource is invalid. + +_Note: The values returned from `create`, `destroy`, and `validate` are all wrapped in a `Promise.resolve` by the pool before being used internally._ + +**opts** + +An optional object/dictionary with the any of the following properties: + +- `max`: maximum number of resources to create at any given time. (default=1) +- `min`: minimum number of resources to keep in pool at any given time. If this is set >= max, the pool will silently set the min to equal `max`. (default=0) +- `maxWaitingClients`: maximum number of queued requests allowed, additional `acquire` calls will be callback with an `err` in a future cycle of the event loop. +- `testOnBorrow`: `boolean`: should the pool validate resources before giving them to clients. Requires that either `factory.validate` or `factory.validateAsync` to be specified +- `acquireTimeoutMillis`: max milliseconds an `acquire` call will wait for a resource before timing out. (default no limit), if supplied should non-zero positive integer. +- `fifo` : if true the oldest resources will be first to be allocated. If false the most recently released resources will be the first to be allocated. This in effect turns the pool's behaviour from a queue into a stack. `boolean`, (default true) +- `priorityRange`: int between 1 and x - if set, borrowers can specify their relative priority in the queue if no resources are available. + see example. (default 1) +- `autostart`: boolean, should the pool start creating resources, initialize the evictor, etc once the constructor is called. If false, the pool can be started by calling `pool.start`, otherwise the first call to `acquire` will start the pool. (default true) +- `evictionRunIntervalMillis`: How often to run eviction checks. Default: 0 (does not run). +- `numTestsPerRun`: Number of resources to check each eviction run. Default: 3. +- `softIdleTimeoutMillis`: amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any), with the extra condition that at least "min idle" object instances remain in the pool. Default -1 (nothing can get evicted) +- `idleTimeoutMillis`: the minimum amount of time that an object may sit idle in the pool before it is eligible for eviction due to idle time. Supercedes `softIdleTimeoutMillis` Default: 30000 +- `Promise`: Promise lib, a Promises/A+ implementation that the pool should use. Defaults to whatever `global.Promise` is (usually native promises). + +### pool.acquire + +```js +const onfulfilled = function(resource){ + resource.doStuff() + // release/destroy/etc +} + +pool.acquire().then(onfulfilled) +//or +const priority = 2 +pool.acquire(priority).then(onfulfilled) +``` + +This function is for when you want to "borrow" a resource from the pool. + +`acquire` takes one optional argument: + +- `priority`: optional, number, see **Priority Queueing** below. + +and returns a `Promise` +Once a resource in the pool is available, the promise will be resolved with a `resource` (whatever `factory.create` makes for you). If the Pool is unable to give a resource (e.g timeout) then the promise will be rejected with an `Error` + +### pool.release + +```js +pool.release(resource) +``` + +This function is for when you want to return a resource to the pool. + +`release` takes one required argument: + +- `resource`: a previously borrowed resource + +and returns a `Promise`. This promise will resolve once the `resource` is accepted by the pool, or reject if the pool is unable to accept the `resource` for any reason (e.g `resource` is not a resource or object that came from the pool). If you do not care the outcome it is safe to ignore this promise. + +### pool.isBorrowedResource + +```js +pool.isBorrowedResource(resource) +``` + +This function is for when you need to check if a resource has been acquired from the pool and not yet released/destroyed. + +`isBorrowedResource` takes one required argument: + +- `resource`: any object which you need to test + +and returns true (primitive, not Promise) if resource is currently borrowed from the pool, false otherwise. + +### pool.destroy + +```js +pool.destroy(resource) +``` + +This function is for when you want to return a resource to the pool but want it destroyed rather than being made available to other resources. E.g you may know the resource has timed out or crashed. + +`destroy` takes one required argument: + +- `resource`: a previously borrowed resource + +and returns a `Promise`. This promise will resolve once the `resource` is accepted by the pool, or reject if the pool is unable to accept the `resource` for any reason (e.g `resource` is not a resource or object that came from the pool). If you do not care the outcome it is safe to ignore this promise. + +### pool.on + +```js +pool.on('factoryCreateError', function(err){ + //log stuff maybe +}) + +pool.on('factoryDestroyError', function(err){ + //log stuff maybe +}) +``` + +The pool is an event emitter. Below are the events it emits and any args for those events + +- `factoryCreateError` : emitted when a promise returned by `factory.create` is rejected. If this event has no listeners then the `error` will be silently discarded + - `error`: whatever `reason` the promise was rejected with. + +- `factoryDestroyError` : emitted when a promise returned by `factory.destroy` is rejected. If this event has no listeners then the `error` will be silently discarded + - `error`: whatever `reason` the promise was rejected with. + +### pool.start + +```js +pool.start() +``` + +If `autostart` is `false` then this method can be used to start the pool and therefore begin creation of resources, start the evictor, and any other internal logic. + +### pool.use + +```js + +const myTask = dbClient => { + return new Promise( (resolve, reject) => { + // do something with the client and resolve/reject + }) +} + +pool.use(myTask).then(/* a promise that will run after myTask resolves */) +``` + +This method handles acquiring a `resource` from the pool, handing it to your function and then calling `pool.release` or `pool.destroy` with resource after your function has finished. + +`use` takes one required argument: + +- `fn`: a function that accepts a `resource` and returns a `Promise`. Once that promise `resolve`s the `resource` is returned to the pool, else if it `reject`s then the resource is destroyed. + +and returns a `Promise` that either `resolve`s with the value from the user supplied `fn` or `reject`s with an error. + +## Idle Object Eviction + +The pool has an evictor (off by default) which will inspect idle items in the pool and `destroy` them if they are too old. + +By default the evictor does not run, to enable it you must set the `evictionRunIntervalMillis` option to a non-zero value. Once enable the evictor will check at most `numTestsPerEvictionRun` each time, this is to stop it blocking your application if you have lots of resources in the pool. + + +## Priority Queueing + +The pool supports optional priority queueing. This becomes relevant when no resources are available and the caller has to wait. `acquire()` accepts an optional priority int which +specifies the caller's relative position in the queue. Each priority slot has it's own internal queue created for it. When a resource is available for borrowing, the first request in the highest priority queue will be given it. + +Specifying a `priority` to `acquire` that is outside the `priorityRange` set at `Pool` creation time will result in the `priority` being converted the lowest possible `priority` + +```js +// create pool with priorityRange of 3 +// borrowers can specify a priority 0 to 2 +const opts = { + priorityRange : 3 +} +const pool = genericPool.createPool(someFactory,opts); + +// acquire connection - no priority specified - will go onto lowest priority queue +pool.acquire().then(function(client) { + pool.release(client); +}); + +// acquire connection - high priority - will go into highest priority queue +pool.acquire(0).then(function(client) { + pool.release(client); +}); + +// acquire connection - medium priority - will go into 'mid' priority queue +pool.acquire(1).then(function(client) { + pool.release(client); +}); + +// etc.. +``` + +## Draining + +If you are shutting down a long-lived process, you may notice +that node fails to exit for 30 seconds or so. This is a side +effect of the idleTimeoutMillis behavior -- the pool has a +setTimeout() call registered that is in the event loop queue, so +node won't terminate until all resources have timed out, and the pool +stops trying to manage them. + +This behavior will be more problematic when you set factory.min > 0, +as the pool will never become empty, and the setTimeout calls will +never end. + +In these cases, use the pool.drain() function. This sets the pool +into a "draining" state which will gracefully wait until all +idle resources have timed out. For example, you can call: + +If you do this, your node process will exit gracefully. + +If you know you would like to terminate all the available resources in your pool before any timeouts they might have are reached, you can use `clear()` in conjunction with `drain()`: + +```js +const p = pool.drain() +.then(function() { + return pool.clear(); +}); +``` +The `promise` returned will resolve once all waiting clients have acquired and return resources, and any available resources have been destroyed + +One side-effect of calling `drain()` is that subsequent calls to `acquire()` +will throw an Error. + +## Pooled function decoration + +This has now been extracted out it's own module [generic-pool-decorator](https://github.com/sandfox/generic-pool-decorator) + +## Pool info + +The following properties will let you get information about the pool: + +```js + +// How many many more resources can the pool manage/create +pool.spareResourceCapacity + +// returns number of resources in the pool regardless of +// whether they are free or in use +pool.size + +// returns number of unused resources in the pool +pool.available + +// number of resources that are currently acquired by userland code +pool.borrowed + +// returns number of callers waiting to acquire a resource +pool.pending + +// returns number of maxixmum number of resources allowed by pool +pool.max + +// returns number of minimum number of resources allowed by pool +pool.min + +``` + +## Run Tests + + $ npm install + $ npm test + +The tests are run/written using Tap. Most are ports from the old espresso tests and are not in great condition. Most cases are inside `test/generic-pool-test.js` with newer cases in their own files (legacy reasons). + +## Linting + +We use eslint combined with prettier + + +## License + +(The MIT License) + +Copyright (c) 2010-2016 James Cooper <james@bitmechanic.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/node_modules/generic-pool/index.js b/node_modules/generic-pool/index.js new file mode 100644 index 0000000..ddb53ae --- /dev/null +++ b/node_modules/generic-pool/index.js @@ -0,0 +1,13 @@ +const Pool = require("./lib/Pool"); +const Deque = require("./lib/Deque"); +const PriorityQueue = require("./lib/PriorityQueue"); +const DefaultEvictor = require("./lib/DefaultEvictor"); +module.exports = { + Pool: Pool, + Deque: Deque, + PriorityQueue: PriorityQueue, + DefaultEvictor: DefaultEvictor, + createPool: function(factory, config) { + return new Pool(DefaultEvictor, Deque, PriorityQueue, factory, config); + } +}; diff --git a/node_modules/generic-pool/lib/DefaultEvictor.js b/node_modules/generic-pool/lib/DefaultEvictor.js new file mode 100644 index 0000000..918defa --- /dev/null +++ b/node_modules/generic-pool/lib/DefaultEvictor.js @@ -0,0 +1,22 @@ +"use strict"; + +class DefaultEvictor { + evict(config, pooledResource, availableObjectsCount) { + const idleTime = Date.now() - pooledResource.lastIdleTime; + + if ( + config.softIdleTimeoutMillis < idleTime && + config.min < availableObjectsCount + ) { + return true; + } + + if (config.idleTimeoutMillis < idleTime) { + return true; + } + + return false; + } +} + +module.exports = DefaultEvictor; diff --git a/node_modules/generic-pool/lib/Deferred.js b/node_modules/generic-pool/lib/Deferred.js new file mode 100644 index 0000000..b38c22a --- /dev/null +++ b/node_modules/generic-pool/lib/Deferred.js @@ -0,0 +1,49 @@ +"use strict"; + +/** + * This is apparently a bit like a Jquery deferred, hence the name + */ + +class Deferred { + constructor(Promise) { + this._state = Deferred.PENDING; + this._resolve = undefined; + this._reject = undefined; + + this._promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + }); + } + + get state() { + return this._state; + } + + get promise() { + return this._promise; + } + + reject(reason) { + if (this._state !== Deferred.PENDING) { + return; + } + this._state = Deferred.REJECTED; + this._reject(reason); + } + + resolve(value) { + if (this._state !== Deferred.PENDING) { + return; + } + this._state = Deferred.FULFILLED; + this._resolve(value); + } +} + +// TODO: should these really live here? or be a seperate 'state' enum +Deferred.PENDING = "PENDING"; +Deferred.FULFILLED = "FULFILLED"; +Deferred.REJECTED = "REJECTED"; + +module.exports = Deferred; diff --git a/node_modules/generic-pool/lib/Deque.js b/node_modules/generic-pool/lib/Deque.js new file mode 100644 index 0000000..552ec3b --- /dev/null +++ b/node_modules/generic-pool/lib/Deque.js @@ -0,0 +1,106 @@ +"use strict"; + +const DoublyLinkedList = require("./DoublyLinkedList"); +const DequeIterator = require("./DequeIterator"); +/** + * DoublyLinkedList backed double ended queue + * implements just enough to keep the Pool + */ +class Deque { + constructor() { + this._list = new DoublyLinkedList(); + } + + /** + * removes and returns the first element from the queue + * @return {any} [description] + */ + shift() { + if (this.length === 0) { + return undefined; + } + + const node = this._list.head; + this._list.remove(node); + + return node.data; + } + + /** + * adds one elemts to the beginning of the queue + * @param {any} element [description] + * @return {any} [description] + */ + unshift(element) { + const node = DoublyLinkedList.createNode(element); + + this._list.insertBeginning(node); + } + + /** + * adds one to the end of the queue + * @param {any} element [description] + * @return {any} [description] + */ + push(element) { + const node = DoublyLinkedList.createNode(element); + + this._list.insertEnd(node); + } + + /** + * removes and returns the last element from the queue + */ + pop() { + if (this.length === 0) { + return undefined; + } + + const node = this._list.tail; + this._list.remove(node); + + return node.data; + } + + [Symbol.iterator]() { + return new DequeIterator(this._list); + } + + iterator() { + return new DequeIterator(this._list); + } + + reverseIterator() { + return new DequeIterator(this._list, true); + } + + /** + * get a reference to the item at the head of the queue + * @return {any} [description] + */ + get head() { + if (this.length === 0) { + return undefined; + } + const node = this._list.head; + return node.data; + } + + /** + * get a reference to the item at the tail of the queue + * @return {any} [description] + */ + get tail() { + if (this.length === 0) { + return undefined; + } + const node = this._list.tail; + return node.data; + } + + get length() { + return this._list.length; + } +} + +module.exports = Deque; diff --git a/node_modules/generic-pool/lib/DequeIterator.js b/node_modules/generic-pool/lib/DequeIterator.js new file mode 100644 index 0000000..0f1f461 --- /dev/null +++ b/node_modules/generic-pool/lib/DequeIterator.js @@ -0,0 +1,20 @@ +"use strict"; + +const DoublyLinkedListIterator = require("./DoublyLinkedListIterator"); +/** + * Thin wrapper around an underlying DDL iterator + */ +class DequeIterator extends DoublyLinkedListIterator { + next() { + const result = super.next(); + + // unwrap the node... + if (result.value) { + result.value = result.value.data; + } + + return result; + } +} + +module.exports = DequeIterator; diff --git a/node_modules/generic-pool/lib/DoublyLinkedList.js b/node_modules/generic-pool/lib/DoublyLinkedList.js new file mode 100644 index 0000000..a207a40 --- /dev/null +++ b/node_modules/generic-pool/lib/DoublyLinkedList.js @@ -0,0 +1,94 @@ +"use strict"; + +/** + * A Doubly Linked List, because there aren't enough in the world... + * this is pretty much a direct JS port of the one wikipedia + * https://en.wikipedia.org/wiki/Doubly_linked_list + * + * For most usage 'insertBeginning' and 'insertEnd' should be enough + * + * nodes are expected to something like a POJSO like + * { + * prev: null, + * next: null, + * something: 'whatever you like' + * } + */ +class DoublyLinkedList { + constructor() { + this.head = null; + this.tail = null; + this.length = 0; + } + + insertBeginning(node) { + if (this.head === null) { + this.head = node; + this.tail = node; + node.prev = null; + node.next = null; + this.length++; + } else { + this.insertBefore(this.head, node); + } + } + + insertEnd(node) { + if (this.tail === null) { + this.insertBeginning(node); + } else { + this.insertAfter(this.tail, node); + } + } + + insertAfter(node, newNode) { + newNode.prev = node; + newNode.next = node.next; + if (node.next === null) { + this.tail = newNode; + } else { + node.next.prev = newNode; + } + node.next = newNode; + this.length++; + } + + insertBefore(node, newNode) { + newNode.prev = node.prev; + newNode.next = node; + if (node.prev === null) { + this.head = newNode; + } else { + node.prev.next = newNode; + } + node.prev = newNode; + this.length++; + } + + remove(node) { + if (node.prev === null) { + this.head = node.next; + } else { + node.prev.next = node.next; + } + if (node.next === null) { + this.tail = node.prev; + } else { + node.next.prev = node.prev; + } + node.prev = null; + node.next = null; + this.length--; + } + + // FIXME: this should not live here and has become a dumping ground... + static createNode(data) { + return { + prev: null, + next: null, + data: data + }; + } +} + +module.exports = DoublyLinkedList; diff --git a/node_modules/generic-pool/lib/DoublyLinkedListIterator.js b/node_modules/generic-pool/lib/DoublyLinkedListIterator.js new file mode 100644 index 0000000..7304a1a --- /dev/null +++ b/node_modules/generic-pool/lib/DoublyLinkedListIterator.js @@ -0,0 +1,100 @@ +"use strict"; + +/** + * Creates an interator for a DoublyLinkedList starting at the given node + * It's internal cursor will remains relative to the last "iterated" node as that + * node moves through the list until it either iterates to the end of the list, + * or the the node it's tracking is removed from the list. Until the first 'next' + * call it tracks the head/tail of the linked list. This means that one can create + * an iterator on an empty list, then add nodes, and then the iterator will follow + * those nodes. Because the DoublyLinkedList nodes don't track their owning "list" and + * it's highly inefficient to walk the list for every iteration, the iterator won't know + * if the node has been detached from one List and added to another list, or if the iterator + * + * The created object is an es6 compatible iterator + */ +class DoublyLinkedListIterator { + /** + * @param {Object} doublyLinkedList a node that is part of a doublyLinkedList + * @param {Boolean} [reverse=false] is this a reverse iterator? default: false + */ + constructor(doublyLinkedList, reverse) { + this._list = doublyLinkedList; + // NOTE: these key names are tied to the DoublyLinkedListIterator + this._direction = reverse === true ? "prev" : "next"; + this._startPosition = reverse === true ? "tail" : "head"; + this._started = false; + this._cursor = null; + this._done = false; + } + + _start() { + this._cursor = this._list[this._startPosition]; + this._started = true; + } + + _advanceCursor() { + if (this._started === false) { + this._started = true; + this._cursor = this._list[this._startPosition]; + return; + } + this._cursor = this._cursor[this._direction]; + } + + reset() { + this._done = false; + this._started = false; + this._cursor = null; + } + + remove() { + if ( + this._started === false || + this._done === true || + this._isCursorDetached() + ) { + return false; + } + this._list.remove(this._cursor); + } + + next() { + if (this._done === true) { + return { done: true }; + } + + this._advanceCursor(); + + // if there is no node at the cursor or the node at the cursor is no longer part of + // a doubly linked list then we are done/finished/kaput + if (this._cursor === null || this._isCursorDetached()) { + this._done = true; + return { done: true }; + } + + return { + value: this._cursor, + done: false + }; + } + + /** + * Is the node detached from a list? + * NOTE: you can trick/bypass/confuse this check by removing a node from one DoublyLinkedList + * and adding it to another. + * TODO: We can make this smarter by checking the direction of travel and only checking + * the required next/prev/head/tail rather than all of them + * @return {Boolean} [description] + */ + _isCursorDetached() { + return ( + this._cursor.prev === null && + this._cursor.next === null && + this._list.tail !== this._cursor && + this._list.head !== this._cursor + ); + } +} + +module.exports = DoublyLinkedListIterator; diff --git a/node_modules/generic-pool/lib/Pool.js b/node_modules/generic-pool/lib/Pool.js new file mode 100644 index 0000000..c0a9a6c --- /dev/null +++ b/node_modules/generic-pool/lib/Pool.js @@ -0,0 +1,709 @@ +"use strict"; + +const EventEmitter = require("events").EventEmitter; + +const factoryValidator = require("./factoryValidator"); +const PoolOptions = require("./PoolOptions"); +const ResourceRequest = require("./ResourceRequest"); +const ResourceLoan = require("./ResourceLoan"); +const PooledResource = require("./PooledResource"); +const DefaultEvictor = require("./DefaultEvictor"); +const Deque = require("./Deque"); +const Deferred = require("./Deferred"); +const PriorityQueue = require("./PriorityQueue"); +const DequeIterator = require("./DequeIterator"); + +const reflector = require("./utils").reflector; + +/** + * TODO: move me + */ +const FACTORY_CREATE_ERROR = "factoryCreateError"; +const FACTORY_DESTROY_ERROR = "factoryDestroyError"; + +class Pool extends EventEmitter { + /** + * Generate an Object pool with a specified `factory` and `config`. + * + * @param {typeof DefaultEvictor} Evictor + * @param {typeof Deque} Deque + * @param {typeof PriorityQueue} PriorityQueue + * @param {Object} factory + * Factory to be used for generating and destroying the items. + * @param {Function} factory.create + * Should create the item to be acquired, + * and call it's first callback argument with the generated item as it's argument. + * @param {Function} factory.destroy + * Should gently close any resources that the item is using. + * Called before the items is destroyed. + * @param {Function} factory.validate + * Test if a resource is still valid .Should return a promise that resolves to a boolean, true if resource is still valid and false + * If it should be removed from pool. + * @param {Object} options + */ + constructor(Evictor, Deque, PriorityQueue, factory, options) { + super(); + + factoryValidator(factory); + + this._config = new PoolOptions(options); + + // TODO: fix up this ugly glue-ing + this._Promise = this._config.Promise; + + this._factory = factory; + this._draining = false; + this._started = false; + /** + * Holds waiting clients + * @type {PriorityQueue} + */ + this._waitingClientsQueue = new PriorityQueue(this._config.priorityRange); + + /** + * Collection of promises for resource creation calls made by the pool to factory.create + * @type {Set} + */ + this._factoryCreateOperations = new Set(); + + /** + * Collection of promises for resource destruction calls made by the pool to factory.destroy + * @type {Set} + */ + this._factoryDestroyOperations = new Set(); + + /** + * A queue/stack of pooledResources awaiting acquisition + * TODO: replace with LinkedList backed array + * @type {Deque} + */ + this._availableObjects = new Deque(); + + /** + * Collection of references for any resource that are undergoing validation before being acquired + * @type {Set} + */ + this._testOnBorrowResources = new Set(); + + /** + * Collection of references for any resource that are undergoing validation before being returned + * @type {Set} + */ + this._testOnReturnResources = new Set(); + + /** + * Collection of promises for any validations currently in process + * @type {Set} + */ + this._validationOperations = new Set(); + + /** + * All objects associated with this pool in any state (except destroyed) + * @type {Set} + */ + this._allObjects = new Set(); + + /** + * Loans keyed by the borrowed resource + * @type {Map} + */ + this._resourceLoans = new Map(); + + /** + * Infinitely looping iterator over available object + * @type {DequeIterator} + */ + this._evictionIterator = this._availableObjects.iterator(); + + this._evictor = new Evictor(); + + /** + * handle for setTimeout for next eviction run + * @type {(number|null)} + */ + this._scheduledEviction = null; + + // create initial resources (if factory.min > 0) + if (this._config.autostart === true) { + this.start(); + } + } + + _destroy(pooledResource) { + // FIXME: do we need another state for "in destruction"? + pooledResource.invalidate(); + this._allObjects.delete(pooledResource); + // NOTE: this maybe very bad promise usage? + const destroyPromise = this._factory.destroy(pooledResource.obj); + const wrappedDestroyPromise = this._Promise.resolve(destroyPromise); + + this._trackOperation( + wrappedDestroyPromise, + this._factoryDestroyOperations + ).catch(reason => { + this.emit(FACTORY_DESTROY_ERROR, reason); + }); + + // TODO: maybe ensuring minimum pool size should live outside here + this._ensureMinimum(); + } + + /** + * Attempt to move an available resource into test and then onto a waiting client + * @return {Boolean} could we move an available resource into test + */ + _testOnBorrow() { + if (this._availableObjects.length < 1) { + return false; + } + + const pooledResource = this._availableObjects.shift(); + // Mark the resource as in test + pooledResource.test(); + this._testOnBorrowResources.add(pooledResource); + const validationPromise = this._factory.validate(pooledResource.obj); + const wrappedValidationPromise = this._Promise.resolve(validationPromise); + + this._trackOperation( + wrappedValidationPromise, + this._validationOperations + ).then(isValid => { + this._testOnBorrowResources.delete(pooledResource); + + if (isValid === false) { + pooledResource.invalidate(); + this._destroy(pooledResource); + this._dispense(); + return; + } + this._dispatchPooledResourceToNextWaitingClient(pooledResource); + }); + + return true; + } + + /** + * Attempt to move an available resource to a waiting client + * @return {Boolean} [description] + */ + _dispatchResource() { + if (this._availableObjects.length < 1) { + return false; + } + + const pooledResource = this._availableObjects.shift(); + this._dispatchPooledResourceToNextWaitingClient(pooledResource); + return false; + } + + /** + * Attempt to resolve an outstanding resource request using an available resource from + * the pool, or creating new ones + * + * @private + */ + _dispense() { + /** + * Local variables for ease of reading/writing + * these don't (shouldn't) change across the execution of this fn + */ + const numWaitingClients = this._waitingClientsQueue.length; + + // If there aren't any waiting requests then there is nothing to do + // so lets short-circuit + if (numWaitingClients < 1) { + return; + } + + const resourceShortfall = + numWaitingClients - this._potentiallyAllocableResourceCount; + + const actualNumberOfResourcesToCreate = Math.min( + this.spareResourceCapacity, + resourceShortfall + ); + for (let i = 0; actualNumberOfResourcesToCreate > i; i++) { + this._createResource(); + } + + // If we are doing test-on-borrow see how many more resources need to be moved into test + // to help satisfy waitingClients + if (this._config.testOnBorrow === true) { + // how many available resources do we need to shift into test + const desiredNumberOfResourcesToMoveIntoTest = + numWaitingClients - this._testOnBorrowResources.size; + const actualNumberOfResourcesToMoveIntoTest = Math.min( + this._availableObjects.length, + desiredNumberOfResourcesToMoveIntoTest + ); + for (let i = 0; actualNumberOfResourcesToMoveIntoTest > i; i++) { + this._testOnBorrow(); + } + } + + // if we aren't testing-on-borrow then lets try to allocate what we can + if (this._config.testOnBorrow === false) { + const actualNumberOfResourcesToDispatch = Math.min( + this._availableObjects.length, + numWaitingClients + ); + for (let i = 0; actualNumberOfResourcesToDispatch > i; i++) { + this._dispatchResource(); + } + } + } + + /** + * Dispatches a pooledResource to the next waiting client (if any) else + * puts the PooledResource back on the available list + * @param {PooledResource} pooledResource [description] + * @return {Boolean} [description] + */ + _dispatchPooledResourceToNextWaitingClient(pooledResource) { + const clientResourceRequest = this._waitingClientsQueue.dequeue(); + if ( + clientResourceRequest === undefined || + clientResourceRequest.state !== Deferred.PENDING + ) { + // While we were away either all the waiting clients timed out + // or were somehow fulfilled. put our pooledResource back. + this._addPooledResourceToAvailableObjects(pooledResource); + // TODO: do need to trigger anything before we leave? + return false; + } + const loan = new ResourceLoan(pooledResource, this._Promise); + this._resourceLoans.set(pooledResource.obj, loan); + pooledResource.allocate(); + clientResourceRequest.resolve(pooledResource.obj); + return true; + } + + /** + * tracks on operation using given set + * handles adding/removing from the set and resolve/rejects the value/reason + * @param {Promise} operation + * @param {Set} set Set holding operations + * @return {Promise} Promise that resolves once operation has been removed from set + */ + _trackOperation(operation, set) { + set.add(operation); + + return operation.then( + v => { + set.delete(operation); + return this._Promise.resolve(v); + }, + e => { + set.delete(operation); + return this._Promise.reject(e); + } + ); + } + + /** + * @private + */ + _createResource() { + // An attempt to create a resource + const factoryPromise = this._factory.create(); + const wrappedFactoryPromise = this._Promise.resolve(factoryPromise); + + this._trackOperation(wrappedFactoryPromise, this._factoryCreateOperations) + .then(resource => { + this._handleNewResource(resource); + return null; + }) + .catch(reason => { + this.emit(FACTORY_CREATE_ERROR, reason); + this._dispense(); + }); + } + + _handleNewResource(resource) { + const pooledResource = new PooledResource(resource); + this._allObjects.add(pooledResource); + // TODO: check we aren't exceding our maxPoolSize before doing + this._dispatchPooledResourceToNextWaitingClient(pooledResource); + } + + /** + * @private + */ + _ensureMinimum() { + if (this._draining === true) { + return; + } + const minShortfall = this._config.min - this._count; + for (let i = 0; i < minShortfall; i++) { + this._createResource(); + } + } + + _evict() { + const testsToRun = Math.min( + this._config.numTestsPerEvictionRun, + this._availableObjects.length + ); + const evictionConfig = { + softIdleTimeoutMillis: this._config.softIdleTimeoutMillis, + idleTimeoutMillis: this._config.idleTimeoutMillis, + min: this._config.min + }; + for (let testsHaveRun = 0; testsHaveRun < testsToRun; ) { + const iterationResult = this._evictionIterator.next(); + + // Safety check incase we could get stuck in infinite loop because we + // somehow emptied the array after chekcing it's length + if (iterationResult.done === true && this._availableObjects.length < 1) { + this._evictionIterator.reset(); + return; + } + // if this happens it should just mean we reached the end of the + // list and can reset the cursor. + if (iterationResult.done === true && this._availableObjects.length > 0) { + this._evictionIterator.reset(); + break; + } + + const resource = iterationResult.value; + + const shouldEvict = this._evictor.evict( + evictionConfig, + resource, + this._availableObjects.length + ); + testsHaveRun++; + + if (shouldEvict === true) { + // take it out of the _availableObjects list + this._evictionIterator.remove(); + this._destroy(resource); + } + } + } + + _scheduleEvictorRun() { + // Start eviction if set + if (this._config.evictionRunIntervalMillis > 0) { + // @ts-ignore + this._scheduledEviction = setTimeout(() => { + this._evict(); + this._scheduleEvictorRun(); + }, this._config.evictionRunIntervalMillis); + } + } + + _descheduleEvictorRun() { + if (this._scheduledEviction) { + clearTimeout(this._scheduledEviction); + } + this._scheduledEviction = null; + } + + start() { + if (this._draining === true) { + return; + } + if (this._started === true) { + return; + } + this._started = true; + this._scheduleEvictorRun(); + this._ensureMinimum(); + } + + /** + * Request a new resource. The callback will be called, + * when a new resource is available, passing the resource to the callback. + * TODO: should we add a seperate "acquireWithPriority" function + * + * @param {Number} [priority=0] + * Optional. Integer between 0 and (priorityRange - 1). Specifies the priority + * of the caller if there are no available resources. Lower numbers mean higher + * priority. + * + * @returns {Promise} + */ + acquire(priority) { + if (this._started === false && this._config.autostart === false) { + this.start(); + } + + if (this._draining) { + return this._Promise.reject( + new Error("pool is draining and cannot accept work") + ); + } + + // TODO: should we defer this check till after this event loop incase "the situation" changes in the meantime + if ( + this._config.maxWaitingClients !== undefined && + this._waitingClientsQueue.length >= this._config.maxWaitingClients + ) { + return this._Promise.reject( + new Error("max waitingClients count exceeded") + ); + } + + const resourceRequest = new ResourceRequest( + this._config.acquireTimeoutMillis, + this._Promise + ); + this._waitingClientsQueue.enqueue(resourceRequest, priority); + this._dispense(); + + return resourceRequest.promise; + } + + /** + * [use method, aquires a resource, passes the resource to a user supplied function and releases it] + * @param {Function} fn [a function that accepts a resource and returns a promise that resolves/rejects once it has finished using the resource] + * @return {Promise} [resolves once the resource is released to the pool] + */ + use(fn) { + return this.acquire().then(resource => { + return fn(resource).then( + result => { + this.release(resource); + return result; + }, + err => { + this.release(resource); + throw err; + } + ); + }); + } + + /** + * Check if resource is currently on loan from the pool + * + * @param {Function} resource + * Resource for checking. + * + * @returns {Boolean} + * True if resource belongs to this pool and false otherwise + */ + isBorrowedResource(resource) { + return this._resourceLoans.get(resource) !== undefined; + } + + /** + * Return the resource to the pool when it is no longer required. + * + * @param {Object} resource + * The acquired object to be put back to the pool. + */ + release(resource) { + // check for an outstanding loan + const loan = this._resourceLoans.get(resource); + + if (loan === undefined) { + return this._Promise.reject( + new Error("Resource not currently part of this pool") + ); + } + + this._resourceLoans.delete(resource); + loan.resolve(); + const pooledResource = loan.pooledResource; + + pooledResource.deallocate(); + this._addPooledResourceToAvailableObjects(pooledResource); + + this._dispense(); + return this._Promise.resolve(); + } + + /** + * Request the resource to be destroyed. The factory's destroy handler + * will also be called. + * + * This should be called within an acquire() block as an alternative to release(). + * + * @param {Object} resource + * The acquired resource to be destoyed. + */ + destroy(resource) { + // check for an outstanding loan + const loan = this._resourceLoans.get(resource); + + if (loan === undefined) { + return this._Promise.reject( + new Error("Resource not currently part of this pool") + ); + } + + this._resourceLoans.delete(resource); + loan.resolve(); + const pooledResource = loan.pooledResource; + + pooledResource.deallocate(); + this._destroy(pooledResource); + + this._dispense(); + return this._Promise.resolve(); + } + + _addPooledResourceToAvailableObjects(pooledResource) { + pooledResource.idle(); + if (this._config.fifo === true) { + this._availableObjects.push(pooledResource); + } else { + this._availableObjects.unshift(pooledResource); + } + } + + /** + * Disallow any new acquire calls and let the request backlog dissapate. + * The Pool will no longer attempt to maintain a "min" number of resources + * and will only make new resources on demand. + * Resolves once all resource requests are fulfilled and all resources are returned to pool and available... + * Should probably be called "drain work" + * @returns {Promise} + */ + drain() { + this._draining = true; + return this.__allResourceRequestsSettled() + .then(() => { + return this.__allResourcesReturned(); + }) + .then(() => { + this._descheduleEvictorRun(); + }); + } + + __allResourceRequestsSettled() { + if (this._waitingClientsQueue.length > 0) { + // wait for last waiting client to be settled + // FIXME: what if they can "resolve" out of order....? + return reflector(this._waitingClientsQueue.tail.promise); + } + return this._Promise.resolve(); + } + + // FIXME: this is a horrific mess + __allResourcesReturned() { + const ps = Array.from(this._resourceLoans.values()) + .map(loan => loan.promise) + .map(reflector); + return this._Promise.all(ps); + } + + /** + * Forcibly destroys all available resources regardless of timeout. Intended to be + * invoked as part of a drain. Does not prevent the creation of new + * resources as a result of subsequent calls to acquire. + * + * Note that if factory.min > 0 and the pool isn't "draining", the pool will destroy all idle resources + * in the pool, but replace them with newly created resources up to the + * specified factory.min value. If this is not desired, set factory.min + * to zero before calling clear() + * + */ + clear() { + const reflectedCreatePromises = Array.from( + this._factoryCreateOperations + ).map(reflector); + + // wait for outstanding factory.create to complete + return this._Promise.all(reflectedCreatePromises).then(() => { + // Destroy existing resources + // @ts-ignore + for (const resource of this._availableObjects) { + this._destroy(resource); + } + const reflectedDestroyPromises = Array.from( + this._factoryDestroyOperations + ).map(reflector); + return this._Promise.all(reflectedDestroyPromises); + }); + } + + /** + * How many resources are available to allocated + * (includes resources that have not been tested and may faul validation) + * NOTE: internal for now as the name is awful and might not be useful to anyone + * @return {Number} number of resources the pool has to allocate + */ + get _potentiallyAllocableResourceCount() { + return ( + this._availableObjects.length + + this._testOnBorrowResources.size + + this._testOnReturnResources.size + + this._factoryCreateOperations.size + ); + } + + /** + * The combined count of the currently created objects and those in the + * process of being created + * Does NOT include resources in the process of being destroyed + * sort of legacy... + * @return {Number} + */ + get _count() { + return this._allObjects.size + this._factoryCreateOperations.size; + } + + /** + * How many more resources does the pool have room for + * @return {Number} number of resources the pool could create before hitting any limits + */ + get spareResourceCapacity() { + return ( + this._config.max - + (this._allObjects.size + this._factoryCreateOperations.size) + ); + } + + /** + * see _count above + * @return {Number} [description] + */ + get size() { + return this._count; + } + + /** + * number of available resources + * @return {Number} [description] + */ + get available() { + return this._availableObjects.length; + } + + /** + * number of resources that are currently acquired + * @return {Number} [description] + */ + get borrowed() { + return this._resourceLoans.size; + } + + /** + * number of waiting acquire calls + * @return {Number} [description] + */ + get pending() { + return this._waitingClientsQueue.length; + } + + /** + * maximum size of the pool + * @return {Number} [description] + */ + get max() { + return this._config.max; + } + + /** + * minimum size of the pool + * @return {Number} [description] + */ + get min() { + return this._config.min; + } +} + +module.exports = Pool; diff --git a/node_modules/generic-pool/lib/PoolDefaults.js b/node_modules/generic-pool/lib/PoolDefaults.js new file mode 100644 index 0000000..34b3606 --- /dev/null +++ b/node_modules/generic-pool/lib/PoolDefaults.js @@ -0,0 +1,33 @@ +"use strict"; +/** + * Create the default settings used by the pool + * + * @class + */ +class PoolDefaults { + constructor() { + this.fifo = true; + this.priorityRange = 1; + + this.testOnBorrow = false; + this.testOnReturn = false; + + this.autostart = true; + + this.evictionRunIntervalMillis = 0; + this.numTestsPerEvictionRun = 3; + this.softIdleTimeoutMillis = -1; + this.idleTimeoutMillis = 30000; + + // FIXME: no defaults! + this.acquireTimeoutMillis = null; + this.maxWaitingClients = null; + + this.min = null; + this.max = null; + // FIXME: this seems odd? + this.Promise = Promise; + } +} + +module.exports = PoolDefaults; diff --git a/node_modules/generic-pool/lib/PoolOptions.js b/node_modules/generic-pool/lib/PoolOptions.js new file mode 100644 index 0000000..498c0e3 --- /dev/null +++ b/node_modules/generic-pool/lib/PoolOptions.js @@ -0,0 +1,101 @@ +"use strict"; + +const PoolDefaults = require("./PoolDefaults"); + +class PoolOptions { + /** + * @param {Object} opts + * configuration for the pool + * @param {Number} [opts.max=null] + * Maximum number of items that can exist at the same time. Default: 1. + * Any further acquire requests will be pushed to the waiting list. + * @param {Number} [opts.min=null] + * Minimum number of items in pool (including in-use). Default: 0. + * When the pool is created, or a resource destroyed, this minimum will + * be checked. If the pool resource count is below the minimum, a new + * resource will be created and added to the pool. + * @param {Number} [opts.maxWaitingClients=null] + * maximum number of queued requests allowed after which acquire calls will be rejected + * @param {Boolean} [opts.testOnBorrow=false] + * should the pool validate resources before giving them to clients. Requires that either + * `factory.validate` or `factory.validateAsync` to be specified. + * @param {Boolean} [opts.testOnReturn=false] + * should the pool validate resources before returning them to the pool. + * @param {Number} [opts.acquireTimeoutMillis=null] + * Delay in milliseconds after which the an `acquire` call will fail. optional. + * Default: undefined. Should be positive and non-zero + * @param {Number} [opts.priorityRange=1] + * The range from 1 to be treated as a valid priority + * @param {Boolean} [opts.fifo=true] + * Sets whether the pool has LIFO (last in, first out) behaviour with respect to idle objects. + * if false then pool has FIFO behaviour + * @param {Boolean} [opts.autostart=true] + * Should the pool start creating resources etc once the constructor is called + * @param {Number} [opts.evictionRunIntervalMillis=0] + * How often to run eviction checks. Default: 0 (does not run). + * @param {Number} [opts.numTestsPerEvictionRun=3] + * Number of resources to check each eviction run. Default: 3. + * @param {Number} [opts.softIdleTimeoutMillis=-1] + * amount of time an object may sit idle in the pool before it is eligible + * for eviction by the idle object evictor (if any), with the extra condition + * that at least "min idle" object instances remain in the pool. Default -1 (nothing can get evicted) + * @param {Number} [opts.idleTimeoutMillis=30000] + * the minimum amount of time that an object may sit idle in the pool before it is eligible for eviction + * due to idle time. Supercedes "softIdleTimeoutMillis" Default: 30000 + * @param {typeof Promise} [opts.Promise=Promise] + * What promise implementation should the pool use, defaults to native promises. + */ + constructor(opts) { + const poolDefaults = new PoolDefaults(); + + opts = opts || {}; + + this.fifo = typeof opts.fifo === "boolean" ? opts.fifo : poolDefaults.fifo; + this.priorityRange = opts.priorityRange || poolDefaults.priorityRange; + + this.testOnBorrow = + typeof opts.testOnBorrow === "boolean" + ? opts.testOnBorrow + : poolDefaults.testOnBorrow; + this.testOnReturn = + typeof opts.testOnReturn === "boolean" + ? opts.testOnReturn + : poolDefaults.testOnReturn; + + this.autostart = + typeof opts.autostart === "boolean" + ? opts.autostart + : poolDefaults.autostart; + + if (opts.acquireTimeoutMillis) { + // @ts-ignore + this.acquireTimeoutMillis = parseInt(opts.acquireTimeoutMillis, 10); + } + + if (opts.maxWaitingClients) { + // @ts-ignore + this.maxWaitingClients = parseInt(opts.maxWaitingClients, 10); + } + + // @ts-ignore + this.max = parseInt(opts.max, 10); + // @ts-ignore + this.min = parseInt(opts.min, 10); + + this.max = Math.max(isNaN(this.max) ? 1 : this.max, 1); + this.min = Math.min(isNaN(this.min) ? 0 : this.min, this.max); + + this.evictionRunIntervalMillis = + opts.evictionRunIntervalMillis || poolDefaults.evictionRunIntervalMillis; + this.numTestsPerEvictionRun = + opts.numTestsPerEvictionRun || poolDefaults.numTestsPerEvictionRun; + this.softIdleTimeoutMillis = + opts.softIdleTimeoutMillis || poolDefaults.softIdleTimeoutMillis; + this.idleTimeoutMillis = + opts.idleTimeoutMillis || poolDefaults.idleTimeoutMillis; + + this.Promise = opts.Promise != null ? opts.Promise : poolDefaults.Promise; + } +} + +module.exports = PoolOptions; diff --git a/node_modules/generic-pool/lib/PooledResource.js b/node_modules/generic-pool/lib/PooledResource.js new file mode 100644 index 0000000..9748748 --- /dev/null +++ b/node_modules/generic-pool/lib/PooledResource.js @@ -0,0 +1,49 @@ +"use strict"; + +const PooledResourceStateEnum = require("./PooledResourceStateEnum"); + +/** + * @class + * @private + */ +class PooledResource { + constructor(resource) { + this.creationTime = Date.now(); + this.lastReturnTime = null; + this.lastBorrowTime = null; + this.lastIdleTime = null; + this.obj = resource; + this.state = PooledResourceStateEnum.IDLE; + } + + // mark the resource as "allocated" + allocate() { + this.lastBorrowTime = Date.now(); + this.state = PooledResourceStateEnum.ALLOCATED; + } + + // mark the resource as "deallocated" + deallocate() { + this.lastReturnTime = Date.now(); + this.state = PooledResourceStateEnum.IDLE; + } + + invalidate() { + this.state = PooledResourceStateEnum.INVALID; + } + + test() { + this.state = PooledResourceStateEnum.VALIDATION; + } + + idle() { + this.lastIdleTime = Date.now(); + this.state = PooledResourceStateEnum.IDLE; + } + + returning() { + this.state = PooledResourceStateEnum.RETURNING; + } +} + +module.exports = PooledResource; diff --git a/node_modules/generic-pool/lib/PooledResourceStateEnum.js b/node_modules/generic-pool/lib/PooledResourceStateEnum.js new file mode 100644 index 0000000..aaab2d7 --- /dev/null +++ b/node_modules/generic-pool/lib/PooledResourceStateEnum.js @@ -0,0 +1,11 @@ +"use strict"; + +const PooledResourceStateEnum = { + ALLOCATED: "ALLOCATED", // In use + IDLE: "IDLE", // In the queue, not in use. + INVALID: "INVALID", // Failed validation + RETURNING: "RETURNING", // Resource is in process of returning + VALIDATION: "VALIDATION" // Currently being tested +}; + +module.exports = PooledResourceStateEnum; diff --git a/node_modules/generic-pool/lib/PriorityQueue.js b/node_modules/generic-pool/lib/PriorityQueue.js new file mode 100644 index 0000000..ca9916b --- /dev/null +++ b/node_modules/generic-pool/lib/PriorityQueue.js @@ -0,0 +1,69 @@ +"use strict"; + +const Queue = require("./Queue"); + +/** + * @class + * @private + */ +class PriorityQueue { + constructor(size) { + this._size = Math.max(+size | 0, 1); + /** @type {Queue[]} */ + this._slots = []; + // initialize arrays to hold queue elements + for (let i = 0; i < this._size; i++) { + this._slots.push(new Queue()); + } + } + + get length() { + let _length = 0; + for (let i = 0, slots = this._slots.length; i < slots; i++) { + _length += this._slots[i].length; + } + return _length; + } + + enqueue(obj, priority) { + // Convert to integer with a default value of 0. + priority = (priority && +priority | 0) || 0; + + if (priority) { + if (priority < 0 || priority >= this._size) { + priority = this._size - 1; + // put obj at the end of the line + } + } + this._slots[priority].push(obj); + } + + dequeue() { + for (let i = 0, sl = this._slots.length; i < sl; i += 1) { + if (this._slots[i].length) { + return this._slots[i].shift(); + } + } + return; + } + + get head() { + for (let i = 0, sl = this._slots.length; i < sl; i += 1) { + if (this._slots[i].length > 0) { + return this._slots[i].head; + } + } + return; + } + + get tail() { + for (let i = this._slots.length - 1; i >= 0; i--) { + if (this._slots[i].length > 0) { + return this._slots[i].tail; + } + } + return; + } +} + +module.exports = PriorityQueue; diff --git a/node_modules/generic-pool/lib/Queue.js b/node_modules/generic-pool/lib/Queue.js new file mode 100644 index 0000000..94cab13 --- /dev/null +++ b/node_modules/generic-pool/lib/Queue.js @@ -0,0 +1,35 @@ +"use strict"; + +const DoublyLinkedList = require("./DoublyLinkedList"); +const Deque = require("./Deque"); + +/** + * Sort of a internal queue for holding the waiting + * resource requets for a given "priority". + * Also handles managing timeouts rejections on items (is this the best place for this?) + * This is the last point where we know which queue a resourceRequest is in + * + */ +class Queue extends Deque { + /** + * Adds the obj to the end of the list for this slot + * we completely override the parent method because we need access to the + * node for our rejection handler + * @param {any} resourceRequest [description] + */ + push(resourceRequest) { + const node = DoublyLinkedList.createNode(resourceRequest); + resourceRequest.promise.catch(this._createTimeoutRejectionHandler(node)); + this._list.insertEnd(node); + } + + _createTimeoutRejectionHandler(node) { + return reason => { + if (reason.name === "TimeoutError") { + this._list.remove(node); + } + }; + } +} + +module.exports = Queue; diff --git a/node_modules/generic-pool/lib/ResourceLoan.js b/node_modules/generic-pool/lib/ResourceLoan.js new file mode 100644 index 0000000..f657cb4 --- /dev/null +++ b/node_modules/generic-pool/lib/ResourceLoan.js @@ -0,0 +1,29 @@ +"use strict"; + +const Deferred = require("./Deferred"); + +/** + * Plan is to maybe add tracking via Error objects + * and other fun stuff! + */ + +class ResourceLoan extends Deferred { + /** + * + * @param {any} pooledResource the PooledResource this loan belongs to + * @return {any} [description] + */ + constructor(pooledResource, Promise) { + super(Promise); + this._creationTimestamp = Date.now(); + this.pooledResource = pooledResource; + } + + reject() { + /** + * Loans can only be resolved at the moment + */ + } +} + +module.exports = ResourceLoan; diff --git a/node_modules/generic-pool/lib/ResourceRequest.js b/node_modules/generic-pool/lib/ResourceRequest.js new file mode 100644 index 0000000..aa30619 --- /dev/null +++ b/node_modules/generic-pool/lib/ResourceRequest.js @@ -0,0 +1,76 @@ +"use strict"; + +const Deferred = require("./Deferred"); +const errors = require("./errors"); + +function fbind(fn, ctx) { + return function bound() { + return fn.apply(ctx, arguments); + }; +} + +/** + * Wraps a users request for a resource + * Basically a promise mashed in with a timeout + * @private + */ +class ResourceRequest extends Deferred { + /** + * [constructor description] + * @param {Number} ttl timeout + */ + constructor(ttl, Promise) { + super(Promise); + this._creationTimestamp = Date.now(); + this._timeout = null; + + if (ttl !== undefined) { + this.setTimeout(ttl); + } + } + + setTimeout(delay) { + if (this._state !== ResourceRequest.PENDING) { + return; + } + const ttl = parseInt(delay, 10); + + if (isNaN(ttl) || ttl <= 0) { + throw new Error("delay must be a positive int"); + } + + const age = Date.now() - this._creationTimestamp; + + if (this._timeout) { + this.removeTimeout(); + } + + this._timeout = setTimeout( + fbind(this._fireTimeout, this), + Math.max(ttl - age, 0) + ); + } + + removeTimeout() { + if (this._timeout) { + clearTimeout(this._timeout); + } + this._timeout = null; + } + + _fireTimeout() { + this.reject(new errors.TimeoutError("ResourceRequest timed out")); + } + + reject(reason) { + this.removeTimeout(); + super.reject(reason); + } + + resolve(value) { + this.removeTimeout(); + super.resolve(value); + } +} + +module.exports = ResourceRequest; diff --git a/node_modules/generic-pool/lib/errors.js b/node_modules/generic-pool/lib/errors.js new file mode 100644 index 0000000..b02d822 --- /dev/null +++ b/node_modules/generic-pool/lib/errors.js @@ -0,0 +1,27 @@ +"use strict"; + +class ExtendableError extends Error { + constructor(message) { + super(message); + // @ts-ignore + this.name = this.constructor.name; + this.message = message; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error(message).stack; + } + } +} + +/* eslint-disable no-useless-constructor */ +class TimeoutError extends ExtendableError { + constructor(m) { + super(m); + } +} +/* eslint-enable no-useless-constructor */ + +module.exports = { + TimeoutError: TimeoutError +}; diff --git a/node_modules/generic-pool/lib/factoryValidator.js b/node_modules/generic-pool/lib/factoryValidator.js new file mode 100644 index 0000000..2f2fb5e --- /dev/null +++ b/node_modules/generic-pool/lib/factoryValidator.js @@ -0,0 +1,16 @@ +module.exports = function(factory) { + if (typeof factory.create !== "function") { + throw new TypeError("factory.create must be a function"); + } + + if (typeof factory.destroy !== "function") { + throw new TypeError("factory.destroy must be a function"); + } + + if ( + typeof factory.validate !== "undefined" && + typeof factory.validate !== "function" + ) { + throw new TypeError("factory.validate must be a function"); + } +}; diff --git a/node_modules/generic-pool/lib/utils.js b/node_modules/generic-pool/lib/utils.js new file mode 100644 index 0000000..19d7f31 --- /dev/null +++ b/node_modules/generic-pool/lib/utils.js @@ -0,0 +1,13 @@ +"use strict"; + +function noop() {} + +/** + * Reflects a promise but does not expose any + * underlying value or rejection from that promise. + * @param {Promise} promise [description] + * @return {Promise} [description] + */ +exports.reflector = function(promise) { + return promise.then(noop, noop); +}; diff --git a/node_modules/generic-pool/package.json b/node_modules/generic-pool/package.json new file mode 100644 index 0000000..1395d89 --- /dev/null +++ b/node_modules/generic-pool/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + "generic-pool@3.4.2", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "generic-pool@3.4.2", + "_id": "generic-pool@3.4.2", + "_inBundle": false, + "_integrity": "sha512-H7cUpwCQSiJmAHM4c/aFu6fUfrhWXW1ncyh8ftxEPMu6AiYkHw9K8br720TGPZJbk5eOH2bynjZD1yPvdDAmag==", + "_location": "/generic-pool", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "generic-pool@3.4.2", + "name": "generic-pool", + "escapedName": "generic-pool", + "rawSpec": "3.4.2", + "saveSpec": null, + "fetchSpec": "3.4.2" + }, + "_requiredBy": [ + "/sequelize" + ], + "_resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.4.2.tgz", + "_spec": "3.4.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "James Cooper", + "email": "james@bitmechanic.com" + }, + "bugs": { + "url": "https://github.com/coopernurse/node-pool/issues" + }, + "contributors": [ + { + "name": "James Cooper", + "email": "james@bitmechanic.com" + }, + { + "name": "Peter Galiba", + "email": "poetro@poetro.hu", + "url": "http://poetro.hu/" + }, + { + "name": "Gary Dusbabek" + }, + { + "name": "Tom MacWright", + "url": "http://www.developmentseed.org/" + }, + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com", + "url": "http://somethingdoug.com/" + }, + { + "name": "calibr" + }, + { + "name": "Justin Robinson", + "email": "jrobinson@redventures.com" + }, + { + "name": "Nayana Hettiarachchi", + "email": "nayana@corp-gems.com" + }, + { + "name": "Felipe Machado", + "email": "felipou@gmail.com" + }, + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + }, + { + "name": "sandfox", + "email": "james.butler@sandfox.co.uk" + }, + { + "name": "Lewis J Ellis", + "email": "me@lewisjellis.com" + } + ], + "description": "Generic resource pooling for Node.JS", + "devDependencies": { + "@types/node": "^8.5.1", + "eslint": "^4.9.0", + "eslint-config-prettier": "^2.6.0", + "eslint-plugin-prettier": "^2.3.1", + "eslint-plugin-promise": "^3.3.0", + "prettier": "^1.7.4", + "tap": "^8.0.0", + "typescript": "^2.6.2" + }, + "engines": { + "node": ">= 4" + }, + "homepage": "https://github.com/coopernurse/node-pool#readme", + "keywords": [ + "pool", + "pooling", + "throttle" + ], + "license": "MIT", + "main": "index.js", + "name": "generic-pool", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/coopernurse/node-pool.git" + }, + "scripts": { + "lint": "eslint lib test index.js .eslintrc.js", + "lint-fix": "eslint --fix lib test index.js .eslintrc.js", + "test": "tap test/*-test.js " + }, + "version": "3.4.2" +} diff --git a/node_modules/generic-pool/test/doubly-linked-list-iterator-test.js b/node_modules/generic-pool/test/doubly-linked-list-iterator-test.js new file mode 100644 index 0000000..bbf846c --- /dev/null +++ b/node_modules/generic-pool/test/doubly-linked-list-iterator-test.js @@ -0,0 +1,144 @@ +const tap = require("tap"); +const DLL = require("../lib/DoublyLinkedList"); +const Iterator = require("../lib/DoublyLinkedListIterator"); + +tap.test("iterates forward", function(t) { + const dll = new DLL(); + + const node1 = DLL.createNode({ id: 1 }); + const node2 = DLL.createNode({ id: 2 }); + const node3 = DLL.createNode({ id: 3 }); + const node4 = DLL.createNode({ id: 4 }); + + dll.insertBeginning(node1); + dll.insertBeginning(node2); + dll.insertBeginning(node3); + dll.insertBeginning(node4); + + const iterator = new Iterator(dll); + + const iterationResult1 = iterator.next(); + t.notOk(iterationResult1.done); + t.same(iterationResult1.value, node4); + + iterator.next(); + iterator.next(); + + const iterationResult4 = iterator.next(); + t.notOk(iterationResult4.done); + t.same(iterationResult4.value, node1); + + const iterationResult5 = iterator.next(); + t.ok(iterationResult5.done); + + t.end(); +}); + +tap.test("iterates backwards", function(t) { + const dll = new DLL(); + + const node1 = DLL.createNode({ id: 1 }); + const node2 = DLL.createNode({ id: 2 }); + const node3 = DLL.createNode({ id: 3 }); + const node4 = DLL.createNode({ id: 4 }); + + dll.insertBeginning(node1); + dll.insertBeginning(node2); + dll.insertBeginning(node3); + dll.insertBeginning(node4); + + const iterator = new Iterator(dll, true); + + const iterationResult1 = iterator.next(); + t.notOk(iterationResult1.done); + t.same(iterationResult1.value, node1); + + iterator.next(); + iterator.next(); + + const iterationResult4 = iterator.next(); + t.notOk(iterationResult4.done); + t.same(iterationResult4.value, node4); + + const iterationResult5 = iterator.next(); + t.ok(iterationResult5.done); + + t.end(); +}); + +tap.test("iterates forward when adding nodes after creating iterator", function( + t +) { + const dll = new DLL(); + + const node1 = DLL.createNode({ id: 1 }); + const node2 = DLL.createNode({ id: 2 }); + + const iterator = new Iterator(dll); + + dll.insertBeginning(node1); + dll.insertBeginning(node2); + + const iterationResult1 = iterator.next(); + t.notOk(iterationResult1.done); + t.same(iterationResult1.value, node2); + + const iterationResult2 = iterator.next(); + t.notOk(iterationResult2.done); + t.same(iterationResult2.value, node1); + + const iterationResult3 = iterator.next(); + t.ok(iterationResult3.done); + + t.end(); +}); + +tap.test( + "iterates backwards when adding nodes after creating iterator", + function(t) { + const dll = new DLL(); + + const node1 = DLL.createNode({ id: 1 }); + const node2 = DLL.createNode({ id: 2 }); + + const iterator = new Iterator(dll, true); + + dll.insertBeginning(node1); + dll.insertBeginning(node2); + + const iterationResult1 = iterator.next(); + t.notOk(iterationResult1.done); + t.same(iterationResult1.value, node1); + + const iterationResult2 = iterator.next(); + t.notOk(iterationResult2.done); + t.same(iterationResult2.value, node2); + + const iterationResult3 = iterator.next(); + t.ok(iterationResult3.done); + + t.end(); + } +); + +tap.test("stops iterating when node is detached", function(t) { + const dll = new DLL(); + const iterator = new Iterator(dll); + + const node1 = DLL.createNode({ id: 1 }); + const node2 = DLL.createNode({ id: 2 }); + + dll.insertBeginning(node1); + dll.insertBeginning(node2); + + const iterationResult1 = iterator.next(); + t.notOk(iterationResult1.done); + t.same(iterationResult1.value, node2); + + dll.remove(node1); + + const iterationResult3 = iterator.next(); + t.ok(iterationResult3.done); + + t.end(); +}); diff --git a/node_modules/generic-pool/test/doubly-linked-list-test.js b/node_modules/generic-pool/test/doubly-linked-list-test.js new file mode 100644 index 0000000..2207a50 --- /dev/null +++ b/node_modules/generic-pool/test/doubly-linked-list-test.js @@ -0,0 +1,28 @@ +var tap = require("tap"); +var DLL = require("../lib/DoublyLinkedList"); + +tap.test("operations", function(t) { + var dll = new DLL(); + + var item1 = { id: 1 }; + var item2 = { id: 2 }; + var item3 = { id: 3 }; + var item4 = { id: 4 }; + + dll.insertBeginning(DLL.createNode(item1)); + t.equal(dll.head.data, item1); + + dll.insertEnd(DLL.createNode(item2)); + t.equal(dll.tail.data, item2); + + dll.insertAfter(dll.tail, DLL.createNode(item3)); + t.equal(dll.tail.data, item3); + + dll.insertBefore(dll.tail, DLL.createNode(item4)); + t.equal(dll.tail.data, item3); + + dll.remove(dll.tail); + t.equal(dll.tail.data, item4); + + t.end(); +}); diff --git a/node_modules/generic-pool/test/generic-pool-acquiretimeout-test.js b/node_modules/generic-pool/test/generic-pool-acquiretimeout-test.js new file mode 100644 index 0000000..ce2b779 --- /dev/null +++ b/node_modules/generic-pool/test/generic-pool-acquiretimeout-test.js @@ -0,0 +1,77 @@ +"use strict"; + +const tap = require("tap"); +const createPool = require("../").createPool; + +tap.test("acquireTimeout handles timed out acquire calls", function(t) { + const factory = { + create: function() { + return new Promise(function(resolve) { + setTimeout(function() { + resolve({}); + }, 100); + }); + }, + destroy: function() { + return Promise.resolve(); + } + }; + const config = { + acquireTimeoutMillis: 20, + idleTimeoutMillis: 150, + log: false + }; + + const pool = createPool(factory, config); + + pool + .acquire() + .then(function(resource) { + t.fail("wooops"); + }) + .catch(function(err) { + t.match(err, /ResourceRequest timed out/); + return pool.drain(); + }) + .then(function() { + return pool.clear(); + }) + .then(function() {}) + .then(t.end) + .catch(t.error); +}); + +tap.test("acquireTimeout handles non timed out acquire calls", function(t) { + const myResource = {}; + const factory = { + create: function() { + return new Promise(function(resolve) { + setTimeout(function() { + resolve(myResource); + }, 10); + }); + }, + destroy: function() { + return Promise.resolve(); + } + }; + + const config = { + acquireTimeoutMillis: 400 + }; + + const pool = createPool(factory, config); + + pool + .acquire() + .then(function(resource) { + t.equal(resource, myResource); + pool.release(resource); + return pool.drain(); + }) + .then(function() { + return pool.clear(); + }) + .then(t.end) + .catch(t.error); +}); diff --git a/node_modules/generic-pool/test/generic-pool-test.js b/node_modules/generic-pool/test/generic-pool-test.js new file mode 100644 index 0000000..f207994 --- /dev/null +++ b/node_modules/generic-pool/test/generic-pool-test.js @@ -0,0 +1,750 @@ +"use strict"; + +const tap = require("tap"); +const createPool = require("../").createPool; +const utils = require("./utils"); +const ResourceFactory = utils.ResourceFactory; + +// tap.test('Pool expands only to max limit', function (t) { +// const resourceFactory = new ResourceFactory() + +// const config = { +// max: 1 +// } + +// const pool = createPool(resourceFactory, config) + +// // NOTES: +// // - request a resource +// // - once we have it, request another and check the pool is fool +// pool.acquire(function (err, obj) { +// t.error(err) +// const poolIsFull = !pool.acquire(function (err, obj) { +// t.error(err) +// t.equal(1, resourceFactory.created) +// pool.release(obj) +// utils.stopPool(pool) +// t.end() +// }) +// t.ok(poolIsFull) +// t.equal(1, resourceFactory.created) +// pool.release(obj) +// }) +// }) + +// tap.test('Pool respects min limit', function (t) { +// const resourceFactory = new ResourceFactory() + +// const config +// min: 1, +// max: 2 +// } + +// const pool = createPool(resourceFactory, config) + +// // FIXME: this logic only works because we know it takes ~1ms to create a resource +// // we need better hooks into the pool probably to observe this... +// setTimeout(function () { +// t.equal(resourceFactory.created, 1) +// utils.stopPool(pool) +// t.end() +// }, 10) +// }) + +tap.test("min and max limit defaults", function(t) { + const resourceFactory = new ResourceFactory(); + + const pool = createPool(resourceFactory); + + t.equal(1, pool.max); + t.equal(0, pool.min); + utils.stopPool(pool); + t.end(); +}); + +tap.test("malformed min and max limits are ignored", function(t) { + const resourceFactory = new ResourceFactory(); + + const config = { + min: "asf", + max: [] + }; + const pool = createPool(resourceFactory, config); + + t.equal(1, pool.max); + t.equal(0, pool.min); + utils.stopPool(pool); + t.end(); +}); + +tap.test("min greater than max sets to max", function(t) { + const resourceFactory = new ResourceFactory(); + + const config = { + min: 5, + max: 3 + }; + const pool = createPool(resourceFactory, config); + + t.equal(3, pool.max); + t.equal(3, pool.min); + utils.stopPool(pool); + t.end(); +}); + +tap.test("supports priority on borrow", function(t) { + // NOTE: this test is pretty opaque about what it's really testing/expecting... + let borrowTimeLow = 0; + let borrowTimeHigh = 0; + let borrowCount = 0; + + const resourceFactory = new ResourceFactory(); + + const config = { + max: 1, + priorityRange: 2 + }; + + const pool = createPool(resourceFactory, config); + + function lowPriorityOnFulfilled(obj) { + const time = Date.now(); + if (time > borrowTimeLow) { + borrowTimeLow = time; + } + borrowCount++; + pool.release(obj); + } + + function highPriorityOnFulfilled(obj) { + const time = Date.now(); + if (time > borrowTimeHigh) { + borrowTimeHigh = time; + } + borrowCount++; + pool.release(obj); + } + + const operations = []; + + for (let i = 0; i < 10; i++) { + const op = pool.acquire(1).then(lowPriorityOnFulfilled); + operations.push(op); + } + + for (let i = 0; i < 10; i++) { + const op = pool.acquire(0).then(highPriorityOnFulfilled); + operations.push(op); + } + + Promise.all(operations) + .then(function() { + t.equal(20, borrowCount); + t.equal(true, borrowTimeLow >= borrowTimeHigh); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +// FIXME: bad test! +// pool.destroy makes no obligations to user about when it will destroy the resource +// we should test that "destroyed" objects are not acquired again instead +// tap.test('removes correct object on reap', function (t) { +// const resourceFactory = new ResourceFactory() + +// const config +// max: 2 +// } + +// const pool = createPool(resourceFactory, config) + +// const op1 = pool.acquire() +// .then(function (client) { +// return new Promise(function (resolve, reject) { +// // should be removed second +// setTimeout(function () { +// pool.destroy(client) +// resolve() +// }, 5) +// }) +// }) + +// const op2 = pool.acquire() +// .then(function (client) { +// pool.destroy(client) +// }) + +// Promise.all([op1, op2]).then(function () { +// t.equal(1, resourceFactory.bin[0].id) +// t.equal(0, resourceFactory.bin[1].id) +// utils.stopPool(pool) +// t.end() +// }) +// .catch(t.threw) +// }) + +tap.test("evictor removes instances on idletimeout", function(t) { + const resourceFactory = new ResourceFactory(); + const config = { + min: 2, + max: 2, + idleTimeoutMillis: 50, + evictionRunIntervalMillis: 10 + }; + const pool = createPool(resourceFactory, config); + + setTimeout(function() { + pool + .acquire() + .then(res => { + t.ok(res.id > 1); + return pool.release(res); + }) + .then(() => { + utils.stopPool(pool); + t.end(); + }); + }, 120); +}); + +tap.test("tests drain", function(t) { + const count = 5; + let acquired = 0; + + const resourceFactory = new ResourceFactory(); + const config = { + max: 2, + idletimeoutMillis: 300000 + }; + const pool = createPool(resourceFactory, config); + + const operations = []; + + function onAcquire(client) { + acquired += 1; + t.equal(typeof client.id, "number"); + setTimeout(function() { + pool.release(client); + }, 250); + } + + // request 5 resources that release after 250ms + for (let i = 0; i < count; i++) { + const op = pool.acquire().then(onAcquire); + operations.push(op); + } + // FIXME: what does this assertion prove? + t.notEqual(count, acquired); + + Promise.all(operations) + .then(function() { + return pool.drain(); + }) + .then(function() { + t.equal(count, acquired); + // short circuit the absurdly long timeouts above. + pool.clear(); + }) + .then(function() { + // subsequent calls to acquire should resolve an error. + return pool.acquire().then(t.fail, function(e) { + t.type(e, Error); + }); + }) + .then(function() { + t.end(); + }); +}); + +tap.test("handle creation errors", function(t) { + let created = 0; + const resourceFactory = { + create: function() { + created++; + if (created < 5) { + return Promise.reject(new Error("Error occurred.")); + } else { + return Promise.resolve({ id: created }); + } + }, + destroy: function(client) {} + }; + const config = { + max: 1 + }; + + const pool = createPool(resourceFactory, config); + + // FIXME: this section no longer proves anything as factory + // errors no longer bubble up through the acquire call + // we need to make the Pool an Emitter + + // ensure that creation errors do not populate the pool. + // for (const i = 0; i < 5; i++) { + // pool.acquire(function (err, client) { + // t.ok(err instanceof Error) + // t.ok(client === null) + // }) + // } + + let called = false; + pool + .acquire() + .then(function(client) { + t.equal(typeof client.id, "number"); + called = true; + pool.release(client); + }) + .then(function() { + t.ok(called); + t.equal(pool.pending, 0); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +tap.test("handle creation errors for delayed creates", function(t) { + let attempts = 0; + + const resourceFactory = { + create: function() { + attempts++; + if (attempts <= 5) { + return Promise.reject(new Error("Error occurred.")); + } else { + return Promise.resolve({ id: attempts }); + } + }, + destroy: function(client) { + return Promise.resolve(); + } + }; + + const config = { + max: 1 + }; + + const pool = createPool(resourceFactory, config); + + let errorCount = 0; + pool.on("factoryCreateError", function(err) { + t.ok(err instanceof Error); + errorCount++; + }); + + let called = false; + pool + .acquire() + .then(function(client) { + t.equal(typeof client.id, "number"); + called = true; + pool.release(client); + }) + .then(function() { + t.ok(called); + t.equal(errorCount, 5); + t.equal(pool.pending, 0); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +tap.test("getPoolSize", function(t) { + let assertionCount = 0; + const resourceFactory = new ResourceFactory(); + const config = { + max: 2 + }; + + const pool = createPool(resourceFactory, config); + + const borrowedResources = []; + + t.equal(pool.size, 0); + assertionCount += 1; + + pool + .acquire() + .then(function(obj) { + borrowedResources.push(obj); + t.equal(pool.size, 1); + assertionCount += 1; + }) + .then(function() { + return pool.acquire(); + }) + .then(function(obj) { + borrowedResources.push(obj); + t.equal(pool.size, 2); + assertionCount += 1; + }) + .then(function() { + pool.release(borrowedResources.shift()); + pool.release(borrowedResources.shift()); + }) + .then(function() { + return pool.acquire(); + }) + .then(function(obj) { + // should still be 2 + t.equal(pool.size, 2); + assertionCount += 1; + pool.release(obj); + }) + .then(function() { + t.equal(assertionCount, 4); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +tap.test("availableObjectsCount", function(t) { + let assertionCount = 0; + const resourceFactory = new ResourceFactory(); + const config = { + max: 2 + }; + + const pool = createPool(resourceFactory, config); + + const borrowedResources = []; + + t.equal(pool.available, 0); + assertionCount += 1; + + pool + .acquire() + .then(function(obj) { + borrowedResources.push(obj); + t.equal(pool.available, 0); + assertionCount += 1; + }) + .then(function() { + return pool.acquire(); + }) + .then(function(obj) { + borrowedResources.push(obj); + t.equal(pool.available, 0); + assertionCount += 1; + }) + .then(function() { + pool.release(borrowedResources.shift()); + t.equal(pool.available, 1); + assertionCount += 1; + + pool.release(borrowedResources.shift()); + t.equal(pool.available, 2); + assertionCount += 1; + }) + .then(function() { + return pool.acquire(); + }) + .then(function(obj) { + t.equal(pool.available, 1); + assertionCount += 1; + pool.release(obj); + + t.equal(pool.available, 2); + assertionCount += 1; + }) + .then(function() { + t.equal(assertionCount, 7); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +// FIXME: bad test! +// pool.destroy makes no obligations to user about when it will destroy the resource +// we should test that "destroyed" objects are not acquired again instead +// tap.test('removes from available objects on destroy', function (t) { +// let destroyCalled = false +// const factory = { +// create: function () { return Promise.resolve({}) }, +// destroy: function (client) { destroyCalled = true; return Promise.resolve() } +// } + +// const config +// max: 2 +// } + +// const pool = createPool(factory, config) + +// pool.acquire().then(function (obj) { +// pool.destroy(obj) +// }) +// .then(function () { +// t.equal(destroyCalled, true) +// t.equal(pool.available, 0) +// utils.stopPool(pool) +// t.end() +// }) +// .catch(t.threw) +// }) + +// FIXME: bad test! +// pool.destroy makes no obligations to user about when it will destroy the resource +// we should test that "destroyed" objects are not acquired again instead +// tap.test('removes from available objects on validation failure', function (t) { +// const destroyCalled = false +// const validateCalled = false +// const count = 0 +// const factory = { +// create: function () { return Promise.resolve({count: count++}) }, +// destroy: function (client) { destroyCalled = client.count }, +// validate: function (client) { +// validateCalled = true +// return Promise.resolve(client.count > 0) +// } +// } + +// const config +// max: 2, +// testOnBorrow: true +// } + +// const pool = createPool(factory, config) + +// pool.acquire() +// .then(function (obj) { +// pool.release(obj) +// t.equal(obj.count, 0) +// }) +// .then(function () { +// return pool.acquire() +// }) +// .then(function (obj2) { +// pool.release(obj2) +// t.equal(obj2.count, 1) +// }) +// .then(function () { +// t.equal(validateCalled, true) +// t.equal(destroyCalled, 0) +// t.equal(pool.available, 1) +// utils.stopPool(pool) +// t.end() +// }) +// .catch(t.threw) +// }) + +tap.test( + "do schedule again if error occured when creating new Objects async", + function(t) { + // NOTE: we're simulating the first few resource attempts failing + let resourceCreationAttempts = 0; + + const factory = { + create: function() { + resourceCreationAttempts++; + if (resourceCreationAttempts < 2) { + return Promise.reject(new Error("Create Error")); + } + return Promise.resolve({}); + }, + destroy: function(client) {} + }; + + const config = { + max: 1 + }; + + const pool = createPool(factory, config); + // pool.acquire(function () {}) + pool + .acquire() + .then(function(obj) { + t.equal(pool.available, 0); + pool.release(obj); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); + } +); + +tap.test("returns only valid object to the pool", function(t) { + const pool = createPool(new ResourceFactory(), { max: 1 }); + + pool + .acquire() + .then(function(obj) { + t.equal(pool.available, 0); + t.equal(pool.borrowed, 1); + + // Invalid release + pool + .release({}) + .catch(function(err) { + t.match(err.message, /Resource not currently part of this pool/); + }) + .then(function() { + t.equal(pool.available, 0); + t.equal(pool.borrowed, 1); + + // Valid release + pool.release(obj).catch(t.error); + t.equal(pool.available, 1); + t.equal(pool.borrowed, 0); + utils.stopPool(pool); + t.end(); + }); + }) + .catch(t.threw); +}); + +tap.test("validate acquires object from the pool", function(t) { + const pool = createPool(new ResourceFactory(), { max: 1 }); + + pool + .acquire() + .then(function(obj) { + t.equal(pool.available, 0); + t.equal(pool.borrowed, 1); + pool.release(obj); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +tap.test("release to pool should work", function(t) { + const pool = createPool(new ResourceFactory(), { max: 1 }); + + pool + .acquire() + .then(function(obj) { + t.equal(pool.available, 0); + t.equal(pool.borrowed, 1); + t.equal(pool.pending, 1); + pool.release(obj); + }) + .catch(t.threw); + + pool + .acquire() + .then(function(obj) { + t.equal(pool.available, 0); + t.equal(pool.borrowed, 1); + t.equal(pool.pending, 0); + pool.release(obj); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +tap.test( + "isBorrowedResource should return true for borrowed resource", + function(t) { + const pool = createPool(new ResourceFactory(), { max: 1 }); + + pool + .acquire() + .then(function(obj) { + t.equal(pool.isBorrowedResource(obj), true); + pool.release(obj); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); + } +); + +tap.test( + "isBorrowedResource should return false for released resource", + function(t) { + const pool = createPool(new ResourceFactory(), { max: 1 }); + + pool + .acquire() + .then(function(obj) { + pool.release(obj); + return obj; + }) + .then(function(obj) { + t.equal(pool.isBorrowedResource(obj), false); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); + } +); + +tap.test("destroy should redispense", function(t) { + const pool = createPool(new ResourceFactory(), { max: 1 }); + + pool + .acquire() + .then(function(obj) { + t.equal(pool.available, 0); + t.equal(pool.borrowed, 1); + t.equal(pool.pending, 1); + pool.destroy(obj); + }) + .catch(t.threw); + + pool + .acquire() + .then(function(obj) { + t.equal(pool.available, 0); + t.equal(pool.borrowed, 1); + t.equal(pool.pending, 0); + pool.release(obj); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +tap.test("evictor start with acquire when autostart is false", function(t) { + const pool = createPool(new ResourceFactory(), { + evictionRunIntervalMillis: 10000, + autostart: false + }); + + t.equal(pool._scheduledEviction, null); + + pool + .acquire() + .then(function(obj) { + t.notEqual(pool._scheduledEviction, null); + pool.release(obj); + utils.stopPool(pool); + t.end(); + }) + .catch(t.threw); +}); + +tap.test("use method", function(t) { + const pool = createPool(new ResourceFactory()); + const result = pool.use(function(resource) { + t.equal(0, resource.id); + return Promise.resolve(); + }); + result.then(function() { + t.end(); + }); +}); + +tap.test("use method should resolve after fn promise is resolved", function(t) { + const pool = createPool(new ResourceFactory()); + let done_with_resource = false; + const result = pool.use(function(resource) { + return new Promise(function(resolve, reject) { + setImmediate(function() { + done_with_resource = true; + resolve("value"); + }); + }); + }); + result.then(val => { + t.equal(done_with_resource, true); + t.equal(val, "value"); + t.end(); + }); +}); diff --git a/node_modules/generic-pool/test/resource-request-test.js b/node_modules/generic-pool/test/resource-request-test.js new file mode 100644 index 0000000..47a8ab2 --- /dev/null +++ b/node_modules/generic-pool/test/resource-request-test.js @@ -0,0 +1,60 @@ +var tap = require("tap"); +var ResourceRequest = require("../lib/ResourceRequest"); + +tap.test("can be created", function(t) { + var create = function() { + var request = new ResourceRequest(undefined, Promise); // eslint-disable-line no-unused-vars + }; + t.doesNotThrow(create); + t.end(); +}); + +tap.test("times out when created with a ttl", function(t) { + var reject = function(err) { + t.match(err, /ResourceRequest timed out/); + t.end(); + }; + var resolve = function(r) { + t.fail("should not resolve"); + }; + var request = new ResourceRequest(10, Promise); // eslint-disable-line no-unused-vars + + request.promise.then(resolve, reject); +}); + +tap.test("calls resolve when resolved", function(t) { + var resource = {}; + var resolve = function(r) { + t.equal(r, resource); + t.end(); + }; + var reject = function(err) { + t.error(err); + }; + var request = new ResourceRequest(undefined, Promise); + request.promise.then(resolve, reject); + request.resolve(resource); +}); + +tap.test("removeTimeout removes the timeout", function(t) { + var reject = function(err) { + t.error(err); + }; + var request = new ResourceRequest(10, Promise); + request.promise.then(undefined, reject); + request.removeTimeout(); + setTimeout(function() { + t.end(); + }, 20); +}); + +tap.test("does nothing if resolved more than once", function(t) { + var request = new ResourceRequest(undefined, Promise); + t.doesNotThrow(function() { + request.resolve({}); + }); + t.doesNotThrow(function() { + request.resolve({}); + }); + t.end(); +}); diff --git a/node_modules/generic-pool/test/utils.js b/node_modules/generic-pool/test/utils.js new file mode 100644 index 0000000..5b1e72f --- /dev/null +++ b/node_modules/generic-pool/test/utils.js @@ -0,0 +1,42 @@ +"use strict"; + +const Pool = require("../lib/Pool"); + +/** + * Generic class for handling creation of resources + * for testing + */ +class ResourceFactory { + constructor() { + this.created = 0; + this.destroyed = 0; + this.bin = []; + } + + create() { + return Promise.resolve({ id: this.created++ }); + } + + validate() { + return Promise.resolve(true); + } + + destroy(resource) { + this.destroyed++; + this.bin.push(resource); + return Promise.resolve(); + } +} +exports.ResourceFactory = ResourceFactory; + +/** + * drains and terminates the pool + * + * @param {Pool} pool [description] + * @return {Promise} [description] + */ +exports.stopPool = function(pool) { + return pool.drain().then(function() { + return pool.clear(); + }); +}; diff --git a/node_modules/generic-pool/tsconfig.json b/node_modules/generic-pool/tsconfig.json new file mode 100644 index 0000000..8ea6901 --- /dev/null +++ b/node_modules/generic-pool/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "lib": ["es6", "dom"], + "outDir": "dist/", + "allowJs": true, + "checkJs": true, + "declaration": true, + "noEmit": true, + "strict": false + } +} \ No newline at end of file diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md new file mode 100644 index 0000000..c32df54 --- /dev/null +++ b/node_modules/get-caller-file/README.md @@ -0,0 +1,4 @@ +# get-caller-file + +[![Build Status](https://travis-ci.org/ember-cli/ember-cli.svg?branch=master)](https://travis-ci.org/ember-cli/ember-cli) +[![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master) diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js new file mode 100644 index 0000000..03e7dfc --- /dev/null +++ b/node_modules/get-caller-file/index.js @@ -0,0 +1,20 @@ +'use strict'; + +// Call this function in a another function to find out the file from +// which that function was called from. (Inspects the v8 stack trace) +// +// Inspired by http://stackoverflow.com/questions/13227489 + +module.exports = function getCallerFile(_position) { + var oldPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function(err, stack) { return stack; }; + var stack = new Error().stack; + Error.prepareStackTrace = oldPrepareStackTrace; + + var position = _position ? _position : 2; + + // stack[0] holds this file + // stack[1] holds where this function was called + // stack[2] holds the file we're interested in + return stack[position] ? stack[position].getFileName() : undefined; +}; diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json new file mode 100644 index 0000000..3dd1620 --- /dev/null +++ b/node_modules/get-caller-file/package.json @@ -0,0 +1,58 @@ +{ + "_from": "get-caller-file@^1.0.1", + "_id": "get-caller-file@1.0.2", + "_inBundle": false, + "_integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "_location": "/get-caller-file", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "get-caller-file@^1.0.1", + "name": "get-caller-file", + "escapedName": "get-caller-file", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "_shasum": "f702e63127e7e231c160a80c1554acb70d5047e5", + "_spec": "get-caller-file@^1.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/yargs", + "author": { + "name": "Stefan Penner" + }, + "bugs": { + "url": "https://github.com/stefanpenner/get-caller-file/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "[![Build Status](https://travis-ci.org/ember-cli/ember-cli.svg?branch=master)](https://travis-ci.org/ember-cli/ember-cli) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)", + "devDependencies": { + "chai": "^3.4.1", + "ensure-posix-path": "^1.0.1", + "mocha": "^2.3.4" + }, + "directories": { + "test": "tests" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/stefanpenner/get-caller-file#readme", + "license": "ISC", + "main": "index.js", + "name": "get-caller-file", + "repository": { + "type": "git", + "url": "git+https://github.com/stefanpenner/get-caller-file.git" + }, + "scripts": { + "test": "mocha test", + "test:debug": "mocha test" + }, + "version": "1.0.2" +} diff --git a/node_modules/get-stream/buffer-stream.js b/node_modules/get-stream/buffer-stream.js new file mode 100644 index 0000000..ae45d3d --- /dev/null +++ b/node_modules/get-stream/buffer-stream.js @@ -0,0 +1,51 @@ +'use strict'; +const PassThrough = require('stream').PassThrough; + +module.exports = opts => { + opts = Object.assign({}, opts); + + const array = opts.array; + let encoding = opts.encoding; + const buffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } + + if (buffer) { + encoding = null; + } + + let len = 0; + const ret = []; + const stream = new PassThrough({objectMode}); + + if (encoding) { + stream.setEncoding(encoding); + } + + stream.on('data', chunk => { + ret.push(chunk); + + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); + + stream.getBufferedValue = () => { + if (array) { + return ret; + } + + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; + + stream.getBufferedLength = () => len; + + return stream; +}; diff --git a/node_modules/get-stream/index.js b/node_modules/get-stream/index.js new file mode 100644 index 0000000..2dc5ee9 --- /dev/null +++ b/node_modules/get-stream/index.js @@ -0,0 +1,51 @@ +'use strict'; +const bufferStream = require('./buffer-stream'); + +function getStream(inputStream, opts) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + opts = Object.assign({maxBuffer: Infinity}, opts); + + const maxBuffer = opts.maxBuffer; + let stream; + let clean; + + const p = new Promise((resolve, reject) => { + const error = err => { + if (err) { // null check + err.bufferedData = stream.getBufferedValue(); + } + + reject(err); + }; + + stream = bufferStream(opts); + inputStream.once('error', error); + inputStream.pipe(stream); + + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + reject(new Error('maxBuffer exceeded')); + } + }); + stream.once('error', error); + stream.on('end', resolve); + + clean = () => { + // some streams doesn't implement the `stream.Readable` interface correctly + if (inputStream.unpipe) { + inputStream.unpipe(stream); + } + }; + }); + + p.then(clean, clean); + + return p.then(() => stream.getBufferedValue()); +} + +module.exports = getStream; +module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'})); +module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true})); diff --git a/node_modules/get-stream/license b/node_modules/get-stream/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/get-stream/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/node_modules/get-stream/package.json b/node_modules/get-stream/package.json new file mode 100644 index 0000000..35657f9 --- /dev/null +++ b/node_modules/get-stream/package.json @@ -0,0 +1,81 @@ +{ + "_from": "get-stream@^3.0.0", + "_id": "get-stream@3.0.0", + "_inBundle": false, + "_integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "_location": "/get-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "get-stream@^3.0.0", + "name": "get-stream", + "escapedName": "get-stream", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/execa", + "/got" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "_shasum": "8e943d1358dc37555054ecbe2edb05aa174ede14", + "_spec": "get-stream@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/execa", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "ava": "*", + "into-stream": "^3.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "buffer-stream.js" + ], + "homepage": "https://github.com/sindresorhus/get-stream#readme", + "keywords": [ + "get", + "stream", + "promise", + "concat", + "string", + "str", + "text", + "buffer", + "read", + "data", + "consume", + "readable", + "readablestream", + "array", + "object", + "obj" + ], + "license": "MIT", + "name": "get-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/get-stream/readme.md b/node_modules/get-stream/readme.md new file mode 100644 index 0000000..73b188f --- /dev/null +++ b/node_modules/get-stream/readme.md @@ -0,0 +1,117 @@ +# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) + +> Get a stream as a string, buffer, or array + + +## Install + +``` +$ npm install --save get-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const getStream = require('get-stream'); +const stream = fs.createReadStream('unicorn.txt'); + +getStream(stream).then(str => { + console.log(str); + /* + ,,))))))));, + __)))))))))))))), + \|/ -\(((((''''((((((((. + -*-==//////(('' . `)))))), + /|\ ))| o ;-. '((((( ,(, + ( `| / ) ;))))' ,_))^;(~ + | | | ,))((((_ _____------~~~-. %,;(;(>';'~ + o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ + ; ''''```` `: `:::|\,__,%% );`'; ~ + | _ ) / `:|`----' `-' + ______/\/~ | / / + /~;;.____/;;' / ___--,-( `;;;/ + / // _;______;'------~~~~~ /;;/\ / + // | | / ; \;;,\ + (<_ | ; /',/-----' _> + \_| ||_ //~;~~~~~~~~~ + `\_| (,~~ + \~\ + ~~ + */ +}); +``` + + +## API + +The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. + +### getStream(stream, [options]) + +Get the `stream` as a string. + +#### options + +##### encoding + +Type: `string`
+Default: `utf8` + +[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. + +##### maxBuffer + +Type: `number`
+Default: `Infinity` + +Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected. + +### getStream.buffer(stream, [options]) + +Get the `stream` as a buffer. + +It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. + +### getStream.array(stream, [options]) + +Get the `stream` as an array of values. + +It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: + +- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). + +- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. + +- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. + + +## Errors + +If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. + +```js +getStream(streamThatErrorsAtTheEnd('unicorn')) + .catch(err => { + console.log(err.bufferedData); + //=> 'unicorn' + }); +``` + + +## FAQ + +### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? + +This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. + + +## Related + +- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/get-value/LICENSE b/node_modules/get-value/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/get-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +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/node_modules/get-value/index.js b/node_modules/get-value/index.js new file mode 100644 index 0000000..5879a88 --- /dev/null +++ b/node_modules/get-value/index.js @@ -0,0 +1,50 @@ +/*! + * get-value + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function(obj, prop, a, b, c) { + if (!isObject(obj) || !prop) { + return obj; + } + + prop = toString(prop); + + // allowing for multiple properties to be passed as + // a string or array, but much faster (3-4x) than doing + // `[].slice.call(arguments)` + if (a) prop += '.' + toString(a); + if (b) prop += '.' + toString(b); + if (c) prop += '.' + toString(c); + + if (prop in obj) { + return obj[prop]; + } + + var segs = prop.split('.'); + var len = segs.length; + var i = -1; + + while (obj && (++i < len)) { + var key = segs[i]; + while (key[key.length - 1] === '\\') { + key = key.slice(0, -1) + '.' + segs[++i]; + } + obj = obj[key]; + } + return obj; +}; + +function isObject(val) { + return val !== null && (typeof val === 'object' || typeof val === 'function'); +} + +function toString(val) { + if (!val) return ''; + if (Array.isArray(val)) { + return val.join('.'); + } + return val; +} diff --git a/node_modules/get-value/package.json b/node_modules/get-value/package.json new file mode 100644 index 0000000..6f4e868 --- /dev/null +++ b/node_modules/get-value/package.json @@ -0,0 +1,113 @@ +{ + "_from": "get-value@^2.0.6", + "_id": "get-value@2.0.6", + "_inBundle": false, + "_integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "_location": "/get-value", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "get-value@^2.0.6", + "name": "get-value", + "escapedName": "get-value", + "rawSpec": "^2.0.6", + "saveSpec": null, + "fetchSpec": "^2.0.6" + }, + "_requiredBy": [ + "/cache-base", + "/has-value", + "/union-value", + "/unset-value/has-value" + ], + "_resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "_shasum": "dc15ca1c672387ca76bd37ac0a395ba2042a2c28", + "_spec": "get-value@^2.0.6", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/cache-base", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/get-value/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Use property paths (`a.b.c`) to get a nested value from an object.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "arr-reduce": "^1.0.1", + "benchmarked": "^0.1.4", + "dot-prop": "^2.2.0", + "getobject": "^0.1.0", + "gulp": "^3.9.0", + "gulp-eslint": "^1.1.1", + "gulp-format-md": "^0.1.5", + "gulp-istanbul": "^0.10.2", + "gulp-mocha": "^2.1.3", + "isobject": "^2.0.0", + "matched": "^0.3.2", + "minimist": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/get-value", + "keywords": [ + "get", + "key", + "nested", + "object", + "path", + "paths", + "prop", + "properties", + "property", + "props", + "segment", + "value", + "values" + ], + "license": "MIT", + "main": "index.js", + "name": "get-value", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/get-value.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-any", + "has-any-deep", + "has-value", + "set-value", + "unset-value" + ] + }, + "reflinks": [ + "verb", + "verb-readme-generator" + ], + "lint": { + "reflinks": true + } + }, + "version": "2.0.6" +} diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE new file mode 100644 index 0000000..734076d --- /dev/null +++ b/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2015 Elan Shanker + +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/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md new file mode 100644 index 0000000..3bec5c7 --- /dev/null +++ b/node_modules/glob-parent/README.md @@ -0,0 +1,109 @@ +glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) +====== +Javascript module to extract the non-magic parent path from a glob string. + +[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) +[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) + +Usage +----- +```sh +npm install glob-parent --save +``` + +**Examples** + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) +``` + +## Escaping + +The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: + +- `?` (question mark) +- `*` (star) +- `|` (pipe) +- `(` (opening parenthesis) +- `)` (closing parenthesis) +- `{` (opening curly brace) +- `}` (closing curly brace) +- `[` (opening bracket) +- `]` (closing bracket) + +**Example** + +```js +globParent('foo/[bar]/') // 'foo' +globParent('foo/\\[bar]/') // 'foo/[bar]' +``` + +## Limitations + +#### Braces & Brackets +This library attempts a quick and imperfect method of determining which path +parts have glob magic without fully parsing/lexing the pattern. There are some +advanced use cases that can trip it up, such as nested braces where the outer +pair is escaped and the inner one contains a path separator. If you find +yourself in the unlikely circumstance of being affected by this or need to +ensure higher-fidelity glob handling in your library, it is recommended that you +pre-process your input with [expand-braces] and/or [expand-brackets]. + +#### Windows +Backslashes are not valid path separators for globs. If a path with backslashes +is provided anyway, for simple cases, glob-parent will replace the path +separator for you and return the non-glob parent path (now with +forward-slashes, which are still valid as Windows path separators). + +This cannot be used in conjunction with escape characters. + +```js +// BAD +globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)' + +// GOOD +globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)' +``` + +If you are using escape characters for a pattern without path parts (i.e. +relative to `cwd`), prefix with `./` to avoid confusing glob-parent. + +```js +// BAD +globParent('foo \\[bar]') // 'foo ' +globParent('foo \\[bar]*') // 'foo ' + +// GOOD +globParent('./foo \\[bar]') // 'foo [bar]' +globParent('./foo \\[bar]*') // '.' +``` + + +Change Log +---------- +[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) + +License +------- +[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) + +[expand-braces]: https://github.com/jonschlinkert/expand-braces +[expand-brackets]: https://github.com/jonschlinkert/expand-brackets diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js new file mode 100644 index 0000000..3a14a53 --- /dev/null +++ b/node_modules/glob-parent/index.js @@ -0,0 +1,24 @@ +'use strict'; + +var path = require('path'); +var isglob = require('is-glob'); +var pathDirname = require('path-dirname'); +var isWin32 = require('os').platform() === 'win32'; + +module.exports = function globParent(str) { + // flip windows path separators + if (isWin32 && str.indexOf('/') < 0) str = str.split('\\').join('/'); + + // special case for strings ending in enclosure containing path separator + if (/[\{\[].*[\/]*.*[\}\]]$/.test(str)) str += '/'; + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do {str = pathDirname.posix(str)} + while (isglob(str) || /(^|[^\\])([\{\[]|\([^\)]+$)/.test(str)); + + // remove escape chars and return result + return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1'); +}; diff --git a/node_modules/glob-parent/node_modules/is-glob/LICENSE b/node_modules/glob-parent/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/node_modules/glob-parent/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +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/node_modules/glob-parent/node_modules/is-glob/README.md b/node_modules/glob-parent/node_modules/is-glob/README.md new file mode 100644 index 0000000..6f4404f --- /dev/null +++ b/node_modules/glob-parent/node_modules/is-glob/README.md @@ -0,0 +1,142 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +isGlob('abc/?.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +isGlob('abc/\\?.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +## About + +### Related projects + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
| +| --- | --- | +| 40 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [tuvistavie](https://github.com/tuvistavie) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/glob-parent/node_modules/is-glob/index.js b/node_modules/glob-parent/node_modules/is-glob/index.js new file mode 100644 index 0000000..2ecbe2a --- /dev/null +++ b/node_modules/glob-parent/node_modules/is-glob/index.js @@ -0,0 +1,25 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +var isExtglob = require('is-extglob'); + +module.exports = function isGlob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) return true; + + var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/; + var match; + + while ((match = regex.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + return false; +}; diff --git a/node_modules/glob-parent/node_modules/is-glob/package.json b/node_modules/glob-parent/node_modules/is-glob/package.json new file mode 100644 index 0000000..75d291d --- /dev/null +++ b/node_modules/glob-parent/node_modules/is-glob/package.json @@ -0,0 +1,119 @@ +{ + "_from": "is-glob@^3.1.0", + "_id": "is-glob@3.1.0", + "_inBundle": false, + "_integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "_location": "/glob-parent/is-glob", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-glob@^3.1.0", + "name": "is-glob", + "escapedName": "is-glob", + "rawSpec": "^3.1.0", + "saveSpec": null, + "fetchSpec": "^3.1.0" + }, + "_requiredBy": [ + "/glob-parent" + ], + "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "_shasum": "7ba5ae24217804ac70707b96922567486cc3e84a", + "_spec": "is-glob@^3.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/glob-parent", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-glob/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Daniel Perez", + "email": "daniel@claudetech.com", + "url": "http://tuvistavie.com" + }, + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + } + ], + "dependencies": { + "is-extglob": "^2.1.0" + }, + "deprecated": false, + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-glob", + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "license": "MIT", + "main": "index.js", + "name": "is-glob", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-glob.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + }, + "version": "3.1.0" +} diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json new file mode 100644 index 0000000..007c444 --- /dev/null +++ b/node_modules/glob-parent/package.json @@ -0,0 +1,72 @@ +{ + "_from": "glob-parent@^3.1.0", + "_id": "glob-parent@3.1.0", + "_inBundle": false, + "_integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "_location": "/glob-parent", + "_phantomChildren": { + "is-extglob": "2.1.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "glob-parent@^3.1.0", + "name": "glob-parent", + "escapedName": "glob-parent", + "rawSpec": "^3.1.0", + "saveSpec": null, + "fetchSpec": "^3.1.0" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "_shasum": "9e6af6299d8d3bd2bd40430832bd113df906c5ae", + "_spec": "glob-parent@^3.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/chokidar", + "author": { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + "bugs": { + "url": "https://github.com/es128/glob-parent/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "deprecated": false, + "description": "Strips glob magic from a string to provide the parent directory path", + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.5", + "mocha": "^2.1.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/es128/glob-parent", + "keywords": [ + "glob", + "parent", + "strip", + "path", + "dirname", + "directory", + "base", + "wildcard" + ], + "license": "ISC", + "main": "index.js", + "name": "glob-parent", + "repository": { + "type": "git", + "url": "git+https://github.com/es128/glob-parent.git" + }, + "scripts": { + "ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls", + "test": "istanbul test node_modules/mocha/bin/_mocha" + }, + "version": "3.1.0" +} diff --git a/node_modules/global-dirs/index.js b/node_modules/global-dirs/index.js new file mode 100644 index 0000000..2b61d4e --- /dev/null +++ b/node_modules/global-dirs/index.js @@ -0,0 +1,90 @@ +'use strict'; +const path = require('path'); +const os = require('os'); +const fs = require('fs'); +const ini = require('ini'); + +const readRc = fp => { + try { + return ini.parse(fs.readFileSync(fp, 'utf8')).prefix; + } catch (err) {} +}; + +const defaultNpmPrefix = (() => { + if (process.env.PREFIX) { + return process.env.PREFIX; + } + + if (process.platform === 'win32') { + // `c:\node\node.exe` → `prefix=c:\node\` + return path.dirname(process.execPath); + } + + // `/usr/local/bin/node` → `prefix=/usr/local` + return path.dirname(path.dirname(process.execPath)); +})(); + +const getNpmPrefix = () => { + if (process.env.PREFIX) { + return process.env.PREFIX; + } + + const homePrefix = readRc(path.join(os.homedir(), '.npmrc')); + if (homePrefix) { + return homePrefix; + } + + const globalConfigPrefix = readRc(path.resolve(defaultNpmPrefix, 'etc', 'npmrc')); + if (globalConfigPrefix) { + return globalConfigPrefix; + } + + if (process.platform === 'win32' && process.env.APPDATA) { + // Hardcoded contents of `c:\Program Files\nodejs\node_modules\npm\.npmrc` + const prefix = path.join(process.env.APPDATA, 'npm'); + if (fs.existsSync(prefix)) { + return prefix; + } + } + + return defaultNpmPrefix; +}; + +const npmPrefix = path.resolve(getNpmPrefix()); + +const getYarnPrefix = () => { + if (process.env.PREFIX) { + return process.env.PREFIX; + } + + if (process.platform === 'win32' && process.env.LOCALAPPDATA) { + const prefix = path.join(process.env.LOCALAPPDATA, 'Yarn'); + if (fs.existsSync(prefix)) { + return prefix; + } + } + + const configPrefix = path.join(os.homedir(), '.config/yarn'); + if (fs.existsSync(configPrefix)) { + return configPrefix; + } + + const homePrefix = path.join(os.homedir(), '.yarn-config'); + if (fs.existsSync(homePrefix)) { + return homePrefix; + } + + // Yarn supports the npm conventions but the inverse is not true + return npmPrefix; +}; + +exports.npm = {}; +exports.npm.prefix = npmPrefix; +exports.npm.packages = path.join(npmPrefix, process.platform === 'win32' ? 'node_modules' : 'lib/node_modules'); +exports.npm.binaries = process.platform === 'win32' ? npmPrefix : path.join(npmPrefix, 'bin'); + +const yarnPrefix = path.resolve(getYarnPrefix()); +exports.yarn = {}; +exports.yarn.prefix = yarnPrefix; +exports.yarn.packages = path.join(yarnPrefix, process.platform === 'win32' ? 'config/global/node_modules' : 'global/node_modules'); +exports.yarn.binaries = path.join(exports.yarn.packages, '.bin'); diff --git a/node_modules/global-dirs/license b/node_modules/global-dirs/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/global-dirs/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/node_modules/global-dirs/package.json b/node_modules/global-dirs/package.json new file mode 100644 index 0000000..dd60c36 --- /dev/null +++ b/node_modules/global-dirs/package.json @@ -0,0 +1,84 @@ +{ + "_from": "global-dirs@^0.1.0", + "_id": "global-dirs@0.1.1", + "_inBundle": false, + "_integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "_location": "/global-dirs", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "global-dirs@^0.1.0", + "name": "global-dirs", + "escapedName": "global-dirs", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/is-installed-globally" + ], + "_resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "_shasum": "b319c0dd4607f353f3be9cca4c72fc148c49f445", + "_spec": "global-dirs@^0.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/is-installed-globally", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/global-dirs/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ini": "^1.3.4" + }, + "deprecated": false, + "description": "Get the directory of globally installed packages and binaries", + "devDependencies": { + "ava": "*", + "execa": "^0.7.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/global-dirs#readme", + "keywords": [ + "global", + "prefix", + "path", + "paths", + "npm", + "yarn", + "node", + "modules", + "node-modules", + "package", + "packages", + "binary", + "binaries", + "bin", + "directory", + "directories", + "npmrc", + "rc", + "config", + "root", + "resolve" + ], + "license": "MIT", + "name": "global-dirs", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/global-dirs.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "0.1.1" +} diff --git a/node_modules/global-dirs/readme.md b/node_modules/global-dirs/readme.md new file mode 100644 index 0000000..1acea6d --- /dev/null +++ b/node_modules/global-dirs/readme.md @@ -0,0 +1,69 @@ +# global-dirs [![Build Status](https://travis-ci.org/sindresorhus/global-dirs.svg?branch=master)](https://travis-ci.org/sindresorhus/global-dirs) + +> Get the directory of globally installed packages and binaries + +Uses the same resolution logic as `npm` and `yarn`. + + +## Install + +``` +$ npm install global-dirs +``` + + +## Usage + +```js +const globalDirs = require('global-dirs'); + +console.log(globalDirs.npm.prefix); +//=> '/usr/local' + +console.log(globalDirs.npm.packages); +//=> '/usr/local/lib/node_modules' + +console.log(globalDirs.npm.binaries); +//=> '/usr/local/bin' + +console.log(globalDirs.yarn.packages); +//=> '/Users/sindresorhus/.config/yarn/global/node_modules' +``` + + +## API + +### globalDirs + +#### npm +#### yarn + +##### packages + +Directory with globally installed packages. + +Equivalent to `npm root --global`. + +##### binaries + +Directory with globally installed binaries. + +Equivalent to `npm bin --global`. + +##### prefix + +Directory with directories for packages and binaries. You probably want either of the above. + +Equivalent to `npm prefix --global`. + + +## Related + +- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module +- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module +- [is-installed-globally](https://github.com/sindresorhus/is-installed-globally) - Check if your package was installed globally + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/got/index.js b/node_modules/got/index.js new file mode 100644 index 0000000..31a64dd --- /dev/null +++ b/node_modules/got/index.js @@ -0,0 +1,364 @@ +'use strict'; +const EventEmitter = require('events'); +const http = require('http'); +const https = require('https'); +const PassThrough = require('stream').PassThrough; +const urlLib = require('url'); +const querystring = require('querystring'); +const duplexer3 = require('duplexer3'); +const isStream = require('is-stream'); +const getStream = require('get-stream'); +const timedOut = require('timed-out'); +const urlParseLax = require('url-parse-lax'); +const lowercaseKeys = require('lowercase-keys'); +const isRedirect = require('is-redirect'); +const unzipResponse = require('unzip-response'); +const createErrorClass = require('create-error-class'); +const isRetryAllowed = require('is-retry-allowed'); +const Buffer = require('safe-buffer').Buffer; +const pkg = require('./package'); + +function requestAsEventEmitter(opts) { + opts = opts || {}; + + const ee = new EventEmitter(); + const requestUrl = opts.href || urlLib.resolve(urlLib.format(opts), opts.path); + let redirectCount = 0; + let retryCount = 0; + let redirectUrl; + + const get = opts => { + const fn = opts.protocol === 'https:' ? https : http; + + const req = fn.request(opts, res => { + const statusCode = res.statusCode; + + if (isRedirect(statusCode) && opts.followRedirect && 'location' in res.headers && (opts.method === 'GET' || opts.method === 'HEAD')) { + res.resume(); + + if (++redirectCount > 10) { + ee.emit('error', new got.MaxRedirectsError(statusCode, opts), null, res); + return; + } + + const bufferString = Buffer.from(res.headers.location, 'binary').toString(); + + redirectUrl = urlLib.resolve(urlLib.format(opts), bufferString); + const redirectOpts = Object.assign({}, opts, urlLib.parse(redirectUrl)); + + ee.emit('redirect', res, redirectOpts); + + get(redirectOpts); + + return; + } + + setImmediate(() => { + const response = typeof unzipResponse === 'function' && req.method !== 'HEAD' ? unzipResponse(res) : res; + response.url = redirectUrl || requestUrl; + response.requestUrl = requestUrl; + + ee.emit('response', response); + }); + }); + + req.once('error', err => { + const backoff = opts.retries(++retryCount, err); + + if (backoff) { + setTimeout(get, backoff, opts); + return; + } + + ee.emit('error', new got.RequestError(err, opts)); + }); + + if (opts.gotTimeout) { + timedOut(req, opts.gotTimeout); + } + + setImmediate(() => { + ee.emit('request', req); + }); + }; + + get(opts); + return ee; +} + +function asPromise(opts) { + return new Promise((resolve, reject) => { + const ee = requestAsEventEmitter(opts); + + ee.on('request', req => { + if (isStream(opts.body)) { + opts.body.pipe(req); + opts.body = undefined; + return; + } + + req.end(opts.body); + }); + + ee.on('response', res => { + const stream = opts.encoding === null ? getStream.buffer(res) : getStream(res, opts); + + stream + .catch(err => reject(new got.ReadError(err, opts))) + .then(data => { + const statusCode = res.statusCode; + const limitStatusCode = opts.followRedirect ? 299 : 399; + + res.body = data; + + if (opts.json && res.body) { + try { + res.body = JSON.parse(res.body); + } catch (e) { + throw new got.ParseError(e, statusCode, opts, data); + } + } + + if (statusCode < 200 || statusCode > limitStatusCode) { + throw new got.HTTPError(statusCode, opts); + } + + resolve(res); + }) + .catch(err => { + Object.defineProperty(err, 'response', {value: res}); + reject(err); + }); + }); + + ee.on('error', reject); + }); +} + +function asStream(opts) { + const input = new PassThrough(); + const output = new PassThrough(); + const proxy = duplexer3(input, output); + + if (opts.json) { + throw new Error('got can not be used as stream when options.json is used'); + } + + if (opts.body) { + proxy.write = () => { + throw new Error('got\'s stream is not writable when options.body is used'); + }; + } + + const ee = requestAsEventEmitter(opts); + + ee.on('request', req => { + proxy.emit('request', req); + + if (isStream(opts.body)) { + opts.body.pipe(req); + return; + } + + if (opts.body) { + req.end(opts.body); + return; + } + + if (opts.method === 'POST' || opts.method === 'PUT' || opts.method === 'PATCH') { + input.pipe(req); + return; + } + + req.end(); + }); + + ee.on('response', res => { + const statusCode = res.statusCode; + + res.pipe(output); + + if (statusCode < 200 || statusCode > 299) { + proxy.emit('error', new got.HTTPError(statusCode, opts), null, res); + return; + } + + proxy.emit('response', res); + }); + + ee.on('redirect', proxy.emit.bind(proxy, 'redirect')); + ee.on('error', proxy.emit.bind(proxy, 'error')); + + return proxy; +} + +function normalizeArguments(url, opts) { + if (typeof url !== 'string' && typeof url !== 'object') { + throw new Error(`Parameter \`url\` must be a string or object, not ${typeof url}`); + } + + if (typeof url === 'string') { + url = url.replace(/^unix:/, 'http://$&'); + url = urlParseLax(url); + + if (url.auth) { + throw new Error('Basic authentication must be done with auth option'); + } + } + + opts = Object.assign( + { + protocol: 'http:', + path: '', + retries: 5 + }, + url, + opts + ); + + opts.headers = Object.assign({ + 'user-agent': `${pkg.name}/${pkg.version} (https://github.com/sindresorhus/got)`, + 'accept-encoding': 'gzip,deflate' + }, lowercaseKeys(opts.headers)); + + const query = opts.query; + + if (query) { + if (typeof query !== 'string') { + opts.query = querystring.stringify(query); + } + + opts.path = `${opts.path.split('?')[0]}?${opts.query}`; + delete opts.query; + } + + if (opts.json && opts.headers.accept === undefined) { + opts.headers.accept = 'application/json'; + } + + let body = opts.body; + + if (body) { + if (typeof body !== 'string' && !(body !== null && typeof body === 'object')) { + throw new Error('options.body must be a ReadableStream, string, Buffer or plain Object'); + } + + opts.method = opts.method || 'POST'; + + if (isStream(body) && typeof body.getBoundary === 'function') { + // Special case for https://github.com/form-data/form-data + opts.headers['content-type'] = opts.headers['content-type'] || `multipart/form-data; boundary=${body.getBoundary()}`; + } else if (body !== null && typeof body === 'object' && !Buffer.isBuffer(body) && !isStream(body)) { + opts.headers['content-type'] = opts.headers['content-type'] || 'application/x-www-form-urlencoded'; + body = opts.body = querystring.stringify(body); + } + + if (opts.headers['content-length'] === undefined && opts.headers['transfer-encoding'] === undefined && !isStream(body)) { + const length = typeof body === 'string' ? Buffer.byteLength(body) : body.length; + opts.headers['content-length'] = length; + } + } + + opts.method = (opts.method || 'GET').toUpperCase(); + + if (opts.hostname === 'unix') { + const matches = /(.+):(.+)/.exec(opts.path); + + if (matches) { + opts.socketPath = matches[1]; + opts.path = matches[2]; + opts.host = null; + } + } + + if (typeof opts.retries !== 'function') { + const retries = opts.retries; + + opts.retries = (iter, err) => { + if (iter > retries || !isRetryAllowed(err)) { + return 0; + } + + const noise = Math.random() * 100; + + return ((1 << iter) * 1000) + noise; + }; + } + + if (opts.followRedirect === undefined) { + opts.followRedirect = true; + } + + if (opts.timeout) { + opts.gotTimeout = opts.timeout; + delete opts.timeout; + } + + return opts; +} + +function got(url, opts) { + try { + return asPromise(normalizeArguments(url, opts)); + } catch (err) { + return Promise.reject(err); + } +} + +const helpers = [ + 'get', + 'post', + 'put', + 'patch', + 'head', + 'delete' +]; + +helpers.forEach(el => { + got[el] = (url, opts) => got(url, Object.assign({}, opts, {method: el})); +}); + +got.stream = (url, opts) => asStream(normalizeArguments(url, opts)); + +for (const el of helpers) { + got.stream[el] = (url, opts) => got.stream(url, Object.assign({}, opts, {method: el})); +} + +function stdError(error, opts) { + if (error.code !== undefined) { + this.code = error.code; + } + + Object.assign(this, { + message: error.message, + host: opts.host, + hostname: opts.hostname, + method: opts.method, + path: opts.path + }); +} + +got.RequestError = createErrorClass('RequestError', stdError); +got.ReadError = createErrorClass('ReadError', stdError); +got.ParseError = createErrorClass('ParseError', function (e, statusCode, opts, data) { + stdError.call(this, e, opts); + this.statusCode = statusCode; + this.statusMessage = http.STATUS_CODES[this.statusCode]; + this.message = `${e.message} in "${urlLib.format(opts)}": \n${data.slice(0, 77)}...`; +}); + +got.HTTPError = createErrorClass('HTTPError', function (statusCode, opts) { + stdError.call(this, {}, opts); + this.statusCode = statusCode; + this.statusMessage = http.STATUS_CODES[this.statusCode]; + this.message = `Response code ${this.statusCode} (${this.statusMessage})`; +}); + +got.MaxRedirectsError = createErrorClass('MaxRedirectsError', function (statusCode, opts) { + stdError.call(this, {}, opts); + this.statusCode = statusCode; + this.statusMessage = http.STATUS_CODES[this.statusCode]; + this.message = 'Redirected 10 times. Aborting.'; +}); + +module.exports = got; diff --git a/node_modules/got/license b/node_modules/got/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/got/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/node_modules/got/package.json b/node_modules/got/package.json new file mode 100644 index 0000000..8875d5b --- /dev/null +++ b/node_modules/got/package.json @@ -0,0 +1,110 @@ +{ + "_from": "got@^6.7.1", + "_id": "got@6.7.1", + "_inBundle": false, + "_integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "_location": "/got", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "got@^6.7.1", + "name": "got", + "escapedName": "got", + "rawSpec": "^6.7.1", + "saveSpec": null, + "fetchSpec": "^6.7.1" + }, + "_requiredBy": [ + "/package-json" + ], + "_resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "_shasum": "240cd05785a9a18e561dc1b44b41c763ef1e8db0", + "_spec": "got@^6.7.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/package-json", + "ava": { + "concurrency": 4 + }, + "browser": { + "unzip-response": false + }, + "bugs": { + "url": "https://github.com/sindresorhus/got/issues" + }, + "bundleDependencies": false, + "dependencies": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "deprecated": false, + "description": "Simplified HTTP requests", + "devDependencies": { + "ava": "^0.17.0", + "coveralls": "^2.11.4", + "form-data": "^2.1.1", + "get-port": "^2.0.0", + "into-stream": "^3.0.0", + "nyc": "^10.0.0", + "pem": "^1.4.4", + "pify": "^2.3.0", + "tempfile": "^1.1.1", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/got#readme", + "keywords": [ + "http", + "https", + "get", + "got", + "url", + "uri", + "request", + "util", + "utility", + "simple", + "curl", + "wget", + "fetch" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + } + ], + "name": "got", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/got.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "6.7.1", + "xo": { + "esnext": true + } +} diff --git a/node_modules/got/readme.md b/node_modules/got/readme.md new file mode 100644 index 0000000..bfab067 --- /dev/null +++ b/node_modules/got/readme.md @@ -0,0 +1,335 @@ +

+
+ got +
+
+
+

+ +> Simplified HTTP requests + +[![Build Status](https://travis-ci.org/sindresorhus/got.svg?branch=master)](https://travis-ci.org/sindresorhus/got) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/got/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/got?branch=master) [![Downloads](https://img.shields.io/npm/dm/got.svg)](https://npmjs.com/got) + +A nicer interface to the built-in [`http`](http://nodejs.org/api/http.html) module. + +It supports following redirects, promises, streams, retries, automagically handling gzip/deflate and some convenience options. + +Created because [`request`](https://github.com/request/request) is bloated *(several megabytes!)*. + + +## Install + +**WARNING: Node.js 4 or higher is required for got@6 and above.** For older Node.js versions use [got@5](https://github.com/sindresorhus/got/tree/v5.x). + +``` +$ npm install --save got +``` + + +## Usage + +```js +const fs = require('fs'); +const got = require('got'); + +got('todomvc.com') + .then(response => { + console.log(response.body); + //=> ' ...' + }) + .catch(error => { + console.log(error.response.body); + //=> 'Internal server error ...' + }); + +// Streams +got.stream('todomvc.com').pipe(fs.createWriteStream('index.html')); + +// For POST, PUT and PATCH methods got.stream returns a WritableStream +fs.createReadStream('index.html').pipe(got.stream.post('todomvc.com')); +``` + + +### API + +It's a `GET` request by default, but can be changed in `options`. + +#### got(url, [options]) + +Returns a Promise for a `response` object with a `body` property, a `url` property with the request URL or the final URL after redirects, and a `requestUrl` property with the original request URL. + +##### url + +Type: `string`, `object` + +The URL to request or a [`http.request` options](https://nodejs.org/api/http.html#http_http_request_options_callback) object. + +Properties from `options` will override properties in the parsed `url`. + +##### options + +Type: `object` + +Any of the [`http.request`](http://nodejs.org/api/http.html#http_http_request_options_callback) options. + +###### body + +Type: `string`, `buffer`, `readableStream`, `object` + +*This is mutually exclusive with stream mode.* + +Body that will be sent with a `POST` request. + +If present in `options` and `options.method` is not set, `options.method` will be set to `POST`. + +If `content-length` or `transfer-encoding` is not set in `options.headers` and `body` is a string or buffer, `content-length` will be set to the body length. + +If `body` is a plain object, it will be stringified with [`querystring.stringify`](https://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) and sent as `application/x-www-form-urlencoded`. + +###### encoding + +Type: `string`, `null`
+Default: `'utf8'` + +Encoding to be used on `setEncoding` of the response data. If `null`, the body is returned as a Buffer. + +###### json + +Type: `boolean`
+Default: `false` + +*This is mutually exclusive with stream mode.* + +Parse response body with `JSON.parse` and set `accept` header to `application/json`. + +###### query + +Type: `string`, `object`
+ +Query string object that will be added to the request URL. This will override the query string in `url`. + +###### timeout + +Type: `number`, `object` + +Milliseconds to wait for a server to send response headers before aborting request with `ETIMEDOUT` error. + +Option accepts `object` with separate `connect` and `socket` fields for connection and socket inactivity timeouts. + +###### retries + +Type: `number`, `function`
+Default: `5` + +Number of request retries when network errors happens. Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 0). + +Option accepts `function` with `retry` and `error` arguments. Function must return delay in milliseconds (`0` return value cancels retry). + +**Note:** if `retries` is `number`, `ENOTFOUND` and `ENETUNREACH` error will not be retried (see full list in [`is-retry-allowed`](https://github.com/floatdrop/is-retry-allowed/blob/master/index.js#L12) module). + +###### followRedirect + +Type: `boolean`
+Default: `true` + +Defines if redirect responses should be followed automatically. + + +#### Streams + +#### got.stream(url, [options]) + +`stream` method will return Duplex stream with additional events: + +##### .on('request', request) + +`request` event to get the request object of the request. + +**Tip**: You can use `request` event to abort request: + +```js +got.stream('github.com') + .on('request', req => setTimeout(() => req.abort(), 50)); +``` + +##### .on('response', response) + +`response` event to get the response object of the final request. + +##### .on('redirect', response, nextOptions) + +`redirect` event to get the response object of a redirect. The second argument is options for the next request to the redirect location. + +##### .on('error', error, body, response) + +`error` event emitted in case of protocol error (like `ENOTFOUND` etc.) or status error (4xx or 5xx). The second argument is the body of the server response in case of status error. The third argument is response object. + +#### got.get(url, [options]) +#### got.post(url, [options]) +#### got.put(url, [options]) +#### got.patch(url, [options]) +#### got.head(url, [options]) +#### got.delete(url, [options]) + +Sets `options.method` to the method name and makes a request. + + +## Errors + +Each error contains (if available) `statusCode`, `statusMessage`, `host`, `hostname`, `method` and `path` properties to make debugging easier. + +In Promise mode, the `response` is attached to the error. + +#### got.RequestError + +When a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`. + +#### got.ReadError + +When reading from response stream fails. + +#### got.ParseError + +When `json` option is enabled and `JSON.parse` fails. + +#### got.HTTPError + +When server response code is not 2xx. Contains `statusCode` and `statusMessage`. + +#### got.MaxRedirectsError + +When server redirects you more than 10 times. + + +## Proxies + +You can use the [`tunnel`](https://github.com/koichik/node-tunnel) module with the `agent` option to work with proxies: + +```js +const got = require('got'); +const tunnel = require('tunnel'); + +got('todomvc.com', { + agent: tunnel.httpOverHttp({ + proxy: { + host: 'localhost' + } + }) +}); +``` + + +## Cookies + +You can use the [`cookie`](https://github.com/jshttp/cookie) module to include cookies in a request: + +```js +const got = require('got'); +const cookie = require('cookie'); + +got('google.com', { + headers: { + cookie: cookie.serialize('foo', 'bar') + } +}); +``` + + +## Form data + +You can use the [`form-data`](https://github.com/form-data/form-data) module to create POST request with form data: + +```js +const fs = require('fs'); +const got = require('got'); +const FormData = require('form-data'); +const form = new FormData(); + +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); + +got.post('google.com', { + body: form +}); +``` + + +## OAuth + +You can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) module to create a signed OAuth request: + +```js +const got = require('got'); +const crypto = require('crypto'); +const OAuth = require('oauth-1.0a'); + +const oauth = OAuth({ + consumer: { + key: process.env.CONSUMER_KEY, + secret: process.env.CONSUMER_SECRET + }, + signature_method: 'HMAC-SHA1', + hash_function: (baseString, key) => crypto.createHmac('sha1', key).update(baseString).digest('base64') +}); + +const token = { + key: process.env.ACCESS_TOKEN, + secret: process.env.ACCESS_TOKEN_SECRET +}; + +const url = 'https://api.twitter.com/1.1/statuses/home_timeline.json'; + +got(url, { + headers: oauth.toHeader(oauth.authorize({url, method: 'GET'}, token)), + json: true +}); +``` + + +## Unix Domain Sockets + +Requests can also be sent via [unix domain sockets](http://serverfault.com/questions/124517/whats-the-difference-between-unix-socket-and-tcp-ip-socket). Use the following URL scheme: `PROTOCOL://unix:SOCKET:PATH`. + +- `PROTOCOL` - `http` or `https` *(optional)* +- `SOCKET` - absolute path to a unix domain socket, e.g. `/var/run/docker.sock` +- `PATH` - request path, e.g. `/v2/keys` + +```js +got('http://unix:/var/run/docker.sock:/containers/json'); + +// or without protocol (http by default) +got('unix:/var/run/docker.sock:/containers/json'); +``` + + +## Tip + +It's a good idea to set the `'user-agent'` header so the provider can more easily see how their resource is used. By default, it's the URL to this repo. + +```js +const got = require('got'); +const pkg = require('./package.json'); + +got('todomvc.com', { + headers: { + 'user-agent': `my-module/${pkg.version} (https://github.com/username/my-module)` + } +}); +``` + + +## Related + +- [gh-got](https://github.com/sindresorhus/gh-got) - Convenience wrapper for interacting with the GitHub API +- [travis-got](https://github.com/samverschueren/travis-got) - Convenience wrapper for interacting with the Travis API + + +## Created by + +[![Sindre Sorhus](https://avatars.githubusercontent.com/u/170270?v=3&s=100)](https://sindresorhus.com) | [![Vsevolod Strukchinsky](https://avatars.githubusercontent.com/u/365089?v=3&s=100)](https://github.com/floatdrop) +---|--- +[Sindre Sorhus](https://sindresorhus.com) | [Vsevolod Strukchinsky](https://github.com/floatdrop) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/graceful-fs/LICENSE b/node_modules/graceful-fs/LICENSE new file mode 100644 index 0000000..9d2c803 --- /dev/null +++ b/node_modules/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/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md new file mode 100644 index 0000000..5273a50 --- /dev/null +++ b/node_modules/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/node_modules/graceful-fs/fs.js b/node_modules/graceful-fs/fs.js new file mode 100644 index 0000000..8ad4a38 --- /dev/null +++ b/node_modules/graceful-fs/fs.js @@ -0,0 +1,21 @@ +'use strict' + +var fs = require('fs') + +module.exports = clone(fs) + +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/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 0000000..33b30d2 --- /dev/null +++ b/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,262 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var queue = [] + +var util = require('util') + +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) + } + +if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(queue) + require('assert').equal(queue.length, 0) + }) +} + +module.exports = patch(require('./fs.js')) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { + module.exports = patch(fs) +} + +// Always patch fs.close/closeSync, because we want 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. +module.exports.close = +fs.close = (function (fs$close) { return function (fd, cb) { + return fs$close.call(fs, fd, function (err) { + if (!err) + retry() + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) +}})(fs.close) + +module.exports.closeSync = +fs.closeSync = (function (fs$closeSync) { return function (fd) { + // Note that graceful-fs also retries when fs.closeSync() fails. + // Looks like a bug to me, although it's probably a harmless one. + var rval = fs$closeSync.apply(fs, arguments) + retry() + return rval +}})(fs.closeSync) + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + fs.FileReadStream = ReadStream; // Legacy name. + fs.FileWriteStream = WriteStream; // Legacy name. + 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 + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + + var fs$WriteStream = fs.WriteStream + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + + fs.ReadStream = ReadStream + fs.WriteStream = WriteStream + + 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 ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new 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]) + queue.push(elem) +} + +function retry () { + var elem = queue.shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} diff --git a/node_modules/graceful-fs/legacy-streams.js b/node_modules/graceful-fs/legacy-streams.js new file mode 100644 index 0000000..d617b50 --- /dev/null +++ b/node_modules/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/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json new file mode 100644 index 0000000..cd12a98 --- /dev/null +++ b/node_modules/graceful-fs/package.json @@ -0,0 +1,78 @@ +{ + "_from": "graceful-fs@^4.1.2", + "_id": "graceful-fs@4.1.11", + "_inBundle": false, + "_integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "_location": "/graceful-fs", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "graceful-fs@^4.1.2", + "name": "graceful-fs", + "escapedName": "graceful-fs", + "rawSpec": "^4.1.2", + "saveSpec": null, + "fetchSpec": "^4.1.2" + }, + "_requiredBy": [ + "/configstore", + "/readdirp", + "/write-file-atomic" + ], + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "_shasum": "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658", + "_spec": "graceful-fs@^4.1.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/readdirp", + "bugs": { + "url": "https://github.com/isaacs/node-graceful-fs/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A drop-in replacement for fs, making various improvements.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^5.4.2" + }, + "directories": { + "test": "test" + }, + "engines": { + "node": ">=0.4.0" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js" + ], + "homepage": "https://github.com/isaacs/node-graceful-fs#readme", + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "main": "graceful-fs.js", + "name": "graceful-fs", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/node-graceful-fs.git" + }, + "scripts": { + "test": "node test.js | tap -" + }, + "version": "4.1.11" +} diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js new file mode 100644 index 0000000..4c6aca7 --- /dev/null +++ b/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,330 @@ +var fs = require('./fs.js') +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) { return function (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) + }})(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, cb) { + return orig.call(fs, target, function (er, stats) { + if (!stats) return cb.apply(this, arguments) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + if (cb) cb.apply(this, arguments) + }) + } +} + +function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target) { + var stats = orig.call(fs, target) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + return stats; + } +} + +// ENOSYS means that the fs doesn't support the op. Just ignore +// that, because it doesn't matter. +// +// 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/node_modules/has-flag/index.js b/node_modules/has-flag/index.js new file mode 100644 index 0000000..5139728 --- /dev/null +++ b/node_modules/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/node_modules/has-flag/license b/node_modules/has-flag/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/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/node_modules/has-flag/package.json b/node_modules/has-flag/package.json new file mode 100644 index 0000000..1dc5629 --- /dev/null +++ b/node_modules/has-flag/package.json @@ -0,0 +1,76 @@ +{ + "_from": "has-flag@^3.0.0", + "_id": "has-flag@3.0.0", + "_inBundle": false, + "_integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "_location": "/has-flag", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "has-flag@^3.0.0", + "name": "has-flag", + "escapedName": "has-flag", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/supports-color" + ], + "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "_shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd", + "_spec": "has-flag@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/has-flag/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if argv has a specific flag", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/has-flag#readme", + "keywords": [ + "has", + "check", + "detect", + "contains", + "find", + "flag", + "cli", + "command-line", + "argv", + "process", + "arg", + "args", + "argument", + "arguments", + "getopt", + "minimist", + "optimist" + ], + "license": "MIT", + "name": "has-flag", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/has-flag.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/has-flag/readme.md b/node_modules/has-flag/readme.md new file mode 100644 index 0000000..677893c --- /dev/null +++ b/node_modules/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/node_modules/has-value/LICENSE b/node_modules/has-value/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/has-value/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/has-value/README.md b/node_modules/has-value/README.md new file mode 100644 index 0000000..f9b428c --- /dev/null +++ b/node_modules/has-value/README.md @@ -0,0 +1,149 @@ +# has-value [![NPM version](https://img.shields.io/npm/v/has-value.svg?style=flat)](https://www.npmjs.com/package/has-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/has-value.svg?style=flat)](https://npmjs.org/package/has-value) [![NPM total downloads](https://img.shields.io/npm/dt/has-value.svg?style=flat)](https://npmjs.org/package/has-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/has-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/has-value) + +> Returns true if a value exists, false if empty. Works with deeply nested values using object paths. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save has-value +``` + +**Works for:** + +* booleans +* functions +* numbers +* strings +* nulls +* object +* arrays + +## Usage + +Works with property values (supports object-path notation, like `foo.bar`) or a single value: + +```js +var hasValue = require('has-value'); + +hasValue('foo'); +hasValue({foo: 'bar'}, 'foo'); +hasValue({a: {b: {c: 'foo'}}}, 'a.b.c'); +//=> true + +hasValue(''); +hasValue({foo: ''}, 'foo'); +//=> false + +hasValue(0); +hasValue(1); +hasValue({foo: 0}, 'foo'); +hasValue({foo: 1}, 'foo'); +hasValue({foo: null}, 'foo'); +hasValue({foo: {bar: 'a'}}}, 'foo'); +hasValue({foo: {bar: 'a'}}}, 'foo.bar'); +//=> true + +hasValue({foo: {}}}, 'foo'); +hasValue({foo: {bar: {}}}}, 'foo.bar'); +hasValue({foo: undefined}, 'foo'); +//=> false + +hasValue([]); +hasValue([[]]); +hasValue([[], []]); +hasValue([undefined]); +hasValue({foo: []}, 'foo'); +//=> false + +hasValue([0]); +hasValue([null]); +hasValue(['foo']); +hasValue({foo: ['a']}, 'foo'); +//=> true + +hasValue(function() {}) +hasValue(function(foo) {}) +hasValue({foo: function(foo) {}}, 'foo'); +hasValue({foo: function() {}}, 'foo'); +//=> true + +hasValue(true); +hasValue(false); +hasValue({foo: true}, 'foo'); +hasValue({foo: false}, 'foo'); +//=> true +``` + +## isEmpty + +To do the opposite and test for empty values, do: + +```js +function isEmpty(o) { + return !hasValue.apply(hasValue, arguments); +} +``` + +## Release history + +### v1.0.0 + +* `zero` always returns true +* `array` now recurses, so that an array of empty arrays will return `false` +* `null` now returns true + +## About + +### Related projects + +* [define-property](https://www.npmjs.com/package/define-property): Define a non-enumerable property on an object. | [homepage](https://github.com/jonschlinkert/define-property "Define a non-enumerable property on an object.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [rmharrison](https://github.com/rmharrison) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 19, 2017._ \ No newline at end of file diff --git a/node_modules/has-value/index.js b/node_modules/has-value/index.js new file mode 100644 index 0000000..c237494 --- /dev/null +++ b/node_modules/has-value/index.js @@ -0,0 +1,16 @@ +/*! + * has-value + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); +var hasValues = require('has-values'); +var get = require('get-value'); + +module.exports = function(val, prop) { + return hasValues(isObject(val) && prop ? get(val, prop) : val); +}; diff --git a/node_modules/has-value/package.json b/node_modules/has-value/package.json new file mode 100644 index 0000000..e03708b --- /dev/null +++ b/node_modules/has-value/package.json @@ -0,0 +1,120 @@ +{ + "_from": "has-value@^1.0.0", + "_id": "has-value@1.0.0", + "_inBundle": false, + "_integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "_location": "/has-value", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "has-value@^1.0.0", + "name": "has-value", + "escapedName": "has-value", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/cache-base" + ], + "_resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "_shasum": "18b281da585b1c5c51def24c930ed29a0be6b177", + "_spec": "has-value@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/cache-base", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/has-value/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ryan M Harrison", + "url": "https://linkedin.com/in/harrisonrm" + } + ], + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "deprecated": false, + "description": "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.", + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/has-value", + "keywords": [ + "array", + "boolean", + "empty", + "find", + "function", + "has", + "hasOwn", + "javascript", + "js", + "key", + "keys", + "node.js", + "null", + "number", + "object", + "properties", + "property", + "string", + "type", + "util", + "utilities", + "utility", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "has-value", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/has-value.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "define-property", + "get-value", + "set-value", + "unset-value" + ] + }, + "reflinks": [], + "lint": { + "reflinks": true + } + }, + "version": "1.0.0" +} diff --git a/node_modules/has-values/LICENSE b/node_modules/has-values/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/has-values/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/has-values/README.md b/node_modules/has-values/README.md new file mode 100644 index 0000000..98d4367 --- /dev/null +++ b/node_modules/has-values/README.md @@ -0,0 +1,129 @@ +# has-values [![NPM version](https://img.shields.io/npm/v/has-values.svg?style=flat)](https://www.npmjs.com/package/has-values) [![NPM monthly downloads](https://img.shields.io/npm/dm/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![NPM total downloads](https://img.shields.io/npm/dt/has-values.svg?style=flat)](https://npmjs.org/package/has-values) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/has-values.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/has-values) + +> Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save has-values +``` + +## Usage + +```js +var hasValue = require('has-values'); + +hasValue('a'); +//=> true + +hasValue(''); +//=> false + +hasValue(1); +//=> true + +hasValue(0); +//=> false + +hasValue({a: 'a'}}); +//=> true + +hasValue({}); +hasValue({foo: undefined}); +//=> false + +hasValue({foo: null}); +//=> true + +hasValue(['a']); +//=> true + +hasValue([]); +hasValue([[], []]); +hasValue([[[]]]); +//=> false + +hasValue(['foo']); +hasValue([0]); +//=> true + +hasValue(function(foo) {}); +//=> true + +hasValue(function() {}); +//=> true + +hasValue(true); +//=> true + +hasValue(false); +//=> true +``` + +## isEmpty + +To test for empty values, do: + +```js +function isEmpty(o, isZero) { + return !hasValue(o, isZero); +} +``` + +## Release history + +### v1.0.0 + +* `zero` always returns true +* `array` now recurses, so that an array of empty arrays will return `false` +* `null` now returns true + +## About + +### Related projects + +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 19, 2017._ \ No newline at end of file diff --git a/node_modules/has-values/index.js b/node_modules/has-values/index.js new file mode 100644 index 0000000..9bebb9f --- /dev/null +++ b/node_modules/has-values/index.js @@ -0,0 +1,60 @@ +/*! + * has-values + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var isNumber = require('is-number'); + +module.exports = function hasValue(val) { + // is-number checks for NaN and other edge cases + if (isNumber(val)) { + return true; + } + + switch (typeOf(val)) { + case 'null': + case 'boolean': + case 'function': + return true; + case 'string': + case 'arguments': + return val.length !== 0; + case 'error': + return val.message !== ''; + case 'array': + var len = val.length; + if (len === 0) { + return false; + } + for (var i = 0; i < len; i++) { + if (hasValue(val[i])) { + return true; + } + } + return false; + case 'file': + case 'map': + case 'set': + return val.size !== 0; + case 'object': + var keys = Object.keys(val); + if (keys.length === 0) { + return false; + } + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (hasValue(val[key])) { + return true; + } + } + return false; + default: { + return false; + } + } +}; diff --git a/node_modules/has-values/node_modules/kind-of/LICENSE b/node_modules/has-values/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/has-values/node_modules/kind-of/README.md b/node_modules/has-values/node_modules/kind-of/README.md new file mode 100644 index 0000000..83469b0 --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/README.md @@ -0,0 +1,267 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Release history + +### v4.0.0 + +**Added** + +* `promise` support + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 64 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 19, 2017._ \ No newline at end of file diff --git a/node_modules/has-values/node_modules/kind-of/index.js b/node_modules/has-values/node_modules/kind-of/index.js new file mode 100644 index 0000000..4c0233b --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/index.js @@ -0,0 +1,119 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/has-values/node_modules/kind-of/package.json b/node_modules/has-values/node_modules/kind-of/package.json new file mode 100644 index 0000000..c3f3ffc --- /dev/null +++ b/node_modules/has-values/node_modules/kind-of/package.json @@ -0,0 +1,139 @@ +{ + "_from": "kind-of@^4.0.0", + "_id": "kind-of@4.0.0", + "_inBundle": false, + "_integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "_location": "/has-values/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^4.0.0", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/has-values" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "_shasum": "20813df3d712928b207378691a45066fae72dd57", + "_spec": "kind-of@^4.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/has-values", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "is-buffer": "^1.1.5" + }, + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.1.1", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.1", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "4.0.0" +} diff --git a/node_modules/has-values/package.json b/node_modules/has-values/package.json new file mode 100644 index 0000000..9e5883a --- /dev/null +++ b/node_modules/has-values/package.json @@ -0,0 +1,115 @@ +{ + "_from": "has-values@^1.0.0", + "_id": "has-values@1.0.0", + "_inBundle": false, + "_integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "_location": "/has-values", + "_phantomChildren": { + "is-buffer": "1.1.6" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "has-values@^1.0.0", + "name": "has-values", + "escapedName": "has-values", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/has-value" + ], + "_resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "_shasum": "95b0b63fec2146619a6fe57fe75628d5a39efe4f", + "_spec": "has-values@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/has-value", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/has-values/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "deprecated": false, + "description": "Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays. ", + "devDependencies": { + "gulp-format-md": "^0.1.12", + "mocha": "^3.4.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/has-values", + "keywords": [ + "array", + "boolean", + "empty", + "find", + "function", + "has", + "hasOwn", + "javascript", + "js", + "key", + "keys", + "node.js", + "null", + "number", + "object", + "properties", + "property", + "string", + "type", + "util", + "utilities", + "utility", + "value", + "values" + ], + "license": "MIT", + "main": "index.js", + "name": "has-values", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/has-values.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-value", + "kind-of", + "is-number", + "is-plain-object", + "isobject" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.0" +} diff --git a/node_modules/hosted-git-info/LICENSE b/node_modules/hosted-git-info/LICENSE new file mode 100644 index 0000000..4505576 --- /dev/null +++ b/node_modules/hosted-git-info/LICENSE @@ -0,0 +1,13 @@ +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/node_modules/hosted-git-info/README.md b/node_modules/hosted-git-info/README.md new file mode 100644 index 0000000..f9db5dd --- /dev/null +++ b/node_modules/hosted-git-info/README.md @@ -0,0 +1,132 @@ +# hosted-git-info + +This will let you identify and transform various git hosts URLs between +protocols. It also can tell you what the URL is for the raw path for +particular file for direct access without git. + +## Example + +```javascript +var hostedGitInfo = require("hosted-git-info") +var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git", opts) +/* info looks like: +{ + type: "github", + domain: "github.com", + user: "npm", + project: "hosted-git-info" +} +*/ +``` + +If the URL can't be matched with a git host, `null` will be returned. We +can match git, ssh and https urls. Additionally, we can match ssh connect +strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg, +`github:npm/hosted-git-info`). Github specifically, is detected in the case +of a third, unprefixed, form: `npm/hosted-git-info`. + +If it does match, the returned object has properties of: + +* info.type -- The short name of the service +* info.domain -- The domain for git protocol use +* info.user -- The name of the user/org on the git host +* info.project -- The name of the project on the git host + +## Version Contract + +The major version will be bumped any time… + +* The constructor stops accepting URLs that it previously accepted. +* A method is removed. +* A method can no longer accept the number and type of arguments it previously accepted. +* A method can return a different type than it currently returns. + +Implications: + +* I do not consider the specific format of the urls returned from, say + `.https()` to be a part of the contract. The contract is that it will + return a string that can be used to fetch the repo via HTTPS. But what + that string looks like, specifically, can change. +* Dropping support for a hosted git provider would constitute a breaking + change. + +## Usage + +### var info = hostedGitInfo.fromUrl(gitSpecifier[, options]) + +* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one. +* *options* is an optional object. It can have the following properties: + * *noCommittish* — If true then committishes won't be included in generated URLs. + * *noGitPlus* — If true then `git+` won't be prefixed on URLs. + +## Methods + +All of the methods take the same options as the `fromUrl` factory. Options +provided to a method override those provided to the constructor. + +* info.file(path, opts) + +Given the path of a file relative to the repository, returns a URL for +directly fetching it from the githost. If no committish was set then +`master` will be used as the default. + +For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")` +would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json` + +* info.shortcut(opts) + +eg, `github:npm/hosted-git-info` + +* info.browse(opts) + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0` + +* info.bugs(opts) + +eg, `https://github.com/npm/hosted-git-info/issues` + +* info.docs(opts) + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme` + +* info.https(opts) + +eg, `git+https://github.com/npm/hosted-git-info.git` + +* info.sshurl(opts) + +eg, `git+ssh://git@github.com/npm/hosted-git-info.git` + +* info.ssh(opts) + +eg, `git@github.com:npm/hosted-git-info.git` + +* info.path(opts) + +eg, `npm/hosted-git-info` + +* info.tarball(opts) + +eg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz` + +* info.getDefaultRepresentation() + +Returns the default output type. The default output type is based on the +string you passed in to be parsed + +* info.toString(opts) + +Uses the getDefaultRepresentation to call one of the other methods to get a URL for +this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give +you a normalized version of the URL that still uses the same protocol. + +Shortcuts will still be returned as shortcuts, but the special case github +form of `org/project` will be normalized to `github:org/project`. + +SSH connect strings will be normalized into `git+ssh` URLs. + +## Supported hosts + +Currently this supports Github, Bitbucket and Gitlab. Pull requests for +additional hosts welcome. + diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js new file mode 100644 index 0000000..93cf617 --- /dev/null +++ b/node_modules/hosted-git-info/git-host-info.js @@ -0,0 +1,68 @@ +'use strict' + +var gitHosts = module.exports = { + github: { + // First two are insecure and generally shouldn't be used any more, but + // they are still supported. + 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'github.com', + 'treepath': 'tree', + 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + }, + bitbucket: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'bitbucket.org', + 'treepath': 'src', + 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' + }, + gitlab: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gitlab.com', + 'treepath': 'tree', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}' + }, + gist: { + 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gist.github.com', + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/, + 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', + 'bugstemplate': 'https://{domain}/{project}', + 'gittemplate': 'git://{domain}/{project}.git{#committish}', + 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{project}{/committish}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + } +} + +var gitHostDefaults = { + 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', + 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', + 'shortcuttemplate': '{type}:{user}/{project}{#committish}', + 'pathtemplate': '{user}/{project}{#committish}', + 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/ +} + +Object.keys(gitHosts).forEach(function (name) { + Object.keys(gitHostDefaults).forEach(function (key) { + if (gitHosts[name][key]) return + gitHosts[name][key] = gitHostDefaults[key] + }) + gitHosts[name].protocols_re = RegExp('^(' + + gitHosts[name].protocols.map(function (protocol) { + return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') + }).join('|') + '):$') +}) diff --git a/node_modules/hosted-git-info/git-host.js b/node_modules/hosted-git-info/git-host.js new file mode 100644 index 0000000..4c6641b --- /dev/null +++ b/node_modules/hosted-git-info/git-host.js @@ -0,0 +1,114 @@ +'use strict' +var gitHosts = require('./git-host-info.js') +var extend = Object.assign || require('util')._extend + +var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { + var gitHostInfo = this + gitHostInfo.type = type + Object.keys(gitHosts[type]).forEach(function (key) { + gitHostInfo[key] = gitHosts[type][key] + }) + gitHostInfo.user = user + gitHostInfo.auth = auth + gitHostInfo.project = project + gitHostInfo.committish = committish + gitHostInfo.default = defaultRepresentation + gitHostInfo.opts = opts || {} +} +GitHost.prototype = {} + +GitHost.prototype.hash = function () { + return this.committish ? '#' + this.committish : '' +} + +GitHost.prototype._fill = function (template, opts) { + if (!template) return + var vars = extend({}, opts) + opts = extend(extend({}, this.opts), opts) + var self = this + Object.keys(this).forEach(function (key) { + if (self[key] != null && vars[key] == null) vars[key] = self[key] + }) + var rawAuth = vars.auth + var rawComittish = vars.committish + Object.keys(vars).forEach(function (key) { + vars[key] = encodeURIComponent(vars[key]) + }) + vars['auth@'] = rawAuth ? rawAuth + '@' : '' + if (opts.noCommittish) { + vars['#committish'] = '' + vars['/tree/committish'] = '' + vars['/comittish'] = '' + vars.comittish = '' + } else { + vars['#committish'] = rawComittish ? '#' + rawComittish : '' + vars['/tree/committish'] = vars.committish + ? '/' + vars.treepath + '/' + vars.committish + : '' + vars['/committish'] = vars.committish ? '/' + vars.committish : '' + vars.committish = vars.committish || 'master' + } + var res = template + Object.keys(vars).forEach(function (key) { + res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) + }) + if (opts.noGitPlus) { + return res.replace(/^git[+]/, '') + } else { + return res + } +} + +GitHost.prototype.ssh = function (opts) { + return this._fill(this.sshtemplate, opts) +} + +GitHost.prototype.sshurl = function (opts) { + return this._fill(this.sshurltemplate, opts) +} + +GitHost.prototype.browse = function (opts) { + return this._fill(this.browsetemplate, opts) +} + +GitHost.prototype.docs = function (opts) { + return this._fill(this.docstemplate, opts) +} + +GitHost.prototype.bugs = function (opts) { + return this._fill(this.bugstemplate, opts) +} + +GitHost.prototype.https = function (opts) { + return this._fill(this.httpstemplate, opts) +} + +GitHost.prototype.git = function (opts) { + return this._fill(this.gittemplate, opts) +} + +GitHost.prototype.shortcut = function (opts) { + return this._fill(this.shortcuttemplate, opts) +} + +GitHost.prototype.path = function (opts) { + return this._fill(this.pathtemplate, opts) +} + +GitHost.prototype.tarball = function (opts) { + return this._fill(this.tarballtemplate, opts) +} + +GitHost.prototype.file = function (P, opts) { + return this._fill(this.filetemplate, extend({ + path: P.replace(/^[/]+/g, '') + }, opts)) +} + +GitHost.prototype.getDefaultRepresentation = function () { + return this.default +} + +GitHost.prototype.toString = function (opts) { + return (this[this.default] || this.sshurl).call(this, opts) +} diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js new file mode 100644 index 0000000..9055ab1 --- /dev/null +++ b/node_modules/hosted-git-info/index.js @@ -0,0 +1,121 @@ +'use strict' +var url = require('url') +var gitHosts = require('./git-host-info.js') +var GitHost = module.exports = require('./git-host.js') + +var protocolToRepresentationMap = { + 'git+ssh': 'sshurl', + 'git+https': 'https', + 'ssh': 'sshurl', + 'git': 'git' +} + +function protocolToRepresentation (protocol) { + if (protocol.substr(-1) === ':') protocol = protocol.slice(0, -1) + return protocolToRepresentationMap[protocol] || protocol +} + +var authProtocols = { + 'git:': true, + 'https:': true, + 'git+https:': true, + 'http:': true, + 'git+http:': true +} + +var cache = {} + +module.exports.fromUrl = function (giturl, opts) { + var key = giturl + JSON.stringify(opts || {}) + + if (!(key in cache)) { + cache[key] = fromUrl(giturl, opts) + } + + return cache[key] +} + +function fromUrl (giturl, opts) { + if (giturl == null || giturl === '') return + var url = fixupUnqualifiedGist( + isGitHubShorthand(giturl) ? 'github:' + giturl : giturl + ) + var parsed = parseGitUrl(url) + var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')) + var matches = Object.keys(gitHosts).map(function (gitHostName) { + try { + var gitHostInfo = gitHosts[gitHostName] + var auth = null + if (parsed.auth && authProtocols[parsed.protocol]) { + auth = decodeURIComponent(parsed.auth) + } + var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null + var user = null + var project = null + var defaultRepresentation = null + if (shortcutMatch && shortcutMatch[1] === gitHostName) { + user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) + project = decodeURIComponent(shortcutMatch[3]) + defaultRepresentation = 'shortcut' + } else { + if (parsed.host !== gitHostInfo.domain) return + if (!gitHostInfo.protocols_re.test(parsed.protocol)) return + if (!parsed.path) return + var pathmatch = gitHostInfo.pathmatch + var matched = parsed.path.match(pathmatch) + if (!matched) return + if (matched[1] != null) user = decodeURIComponent(matched[1].replace(/^:/, '')) + if (matched[2] != null) project = decodeURIComponent(matched[2]) + defaultRepresentation = protocolToRepresentation(parsed.protocol) + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) + } catch (ex) { + if (!(ex instanceof URIError)) throw ex + } + }).filter(function (gitHostInfo) { return gitHostInfo }) + if (matches.length !== 1) return + return matches[0] +} + +function isGitHubShorthand (arg) { + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) +} + +function fixupUnqualifiedGist (giturl) { + // necessary for round-tripping gists + var parsed = url.parse(giturl) + if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { + return parsed.protocol + '/' + parsed.host + } else { + return giturl + } +} + +function parseGitUrl (giturl) { + if (typeof giturl !== 'string') giturl = '' + giturl + var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) + if (!matched) return url.parse(giturl) + return { + protocol: 'git+ssh:', + slashes: true, + auth: matched[1], + host: matched[2], + port: null, + hostname: matched[2], + hash: matched[4], + search: null, + query: null, + pathname: '/' + matched[3], + path: '/' + matched[3], + href: 'git+ssh://' + matched[1] + '@' + matched[2] + + '/' + matched[3] + (matched[4] || '') + } +} diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json new file mode 100644 index 0000000..3997828 --- /dev/null +++ b/node_modules/hosted-git-info/package.json @@ -0,0 +1,63 @@ +{ + "_from": "hosted-git-info@^2.1.4", + "_id": "hosted-git-info@2.5.0", + "_inBundle": false, + "_integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "_location": "/hosted-git-info", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "hosted-git-info@^2.1.4", + "name": "hosted-git-info", + "escapedName": "hosted-git-info", + "rawSpec": "^2.1.4", + "saveSpec": null, + "fetchSpec": "^2.1.4" + }, + "_requiredBy": [ + "/normalize-package-data" + ], + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "_shasum": "6d60e34b3abbc8313062c3b798ef8d901a07af3c", + "_spec": "hosted-git-info@^2.1.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/normalize-package-data", + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org" + }, + "bugs": { + "url": "https://github.com/npm/hosted-git-info/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", + "devDependencies": { + "standard": "^9.0.2", + "tap": "^10.3.0" + }, + "files": [ + "index.js", + "git-host.js", + "git-host-info.js" + ], + "homepage": "https://github.com/npm/hosted-git-info", + "keywords": [ + "git", + "github", + "bitbucket", + "gitlab" + ], + "license": "ISC", + "main": "index.js", + "name": "hosted-git-info", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/hosted-git-info.git" + }, + "scripts": { + "test": "standard && tap -J --coverage test/*.js" + }, + "version": "2.5.0" +} diff --git a/node_modules/http-errors/HISTORY.md b/node_modules/http-errors/HISTORY.md new file mode 100644 index 0000000..b6ee4a0 --- /dev/null +++ b/node_modules/http-errors/HISTORY.md @@ -0,0 +1,124 @@ +2017-08-04 / 1.6.2 +================== + + * deps: depd@1.1.1 + - Remove unnecessary `Buffer` loading + +2017-02-20 / 1.6.1 +================== + + * deps: setprototypeof@1.0.3 + - Fix shim for old browsers + +2017-02-14 / 1.6.0 +================== + + * Accept custom 4xx and 5xx status codes in factory + * Add deprecation message to `"I'mateapot"` export + * Deprecate passing status code as anything except first argument in factory + * Deprecate using non-error status codes + * Make `message` property enumerable for `HttpError`s + +2016-11-16 / 1.5.1 +================== + + * deps: inherits@2.0.3 + - Fix issue loading in browser + * deps: setprototypeof@1.0.2 + * deps: statuses@'>= 1.3.1 < 2' + +2016-05-18 / 1.5.0 +================== + + * Support new code `421 Misdirected Request` + * Use `setprototypeof` module to replace `__proto__` setting + * deps: statuses@'>= 1.3.0 < 2' + - Add `421 Misdirected Request` + - perf: enable strict mode + * perf: enable strict mode + +2016-01-28 / 1.4.0 +================== + + * Add `HttpError` export, for `err instanceof createError.HttpError` + * deps: inherits@2.0.1 + * deps: statuses@'>= 1.2.1 < 2' + - Fix message for status 451 + - Remove incorrect nginx status code + +2015-02-02 / 1.3.1 +================== + + * Fix regression where status can be overwritten in `createError` `props` + +2015-02-01 / 1.3.0 +================== + + * Construct errors using defined constructors from `createError` + * Fix error names that are not identifiers + - `createError["I'mateapot"]` is now `createError.ImATeapot` + * Set a meaningful `name` property on constructed errors + +2014-12-09 / 1.2.8 +================== + + * Fix stack trace from exported function + * Remove `arguments.callee` usage + +2014-10-14 / 1.2.7 +================== + + * Remove duplicate line + +2014-10-02 / 1.2.6 +================== + + * Fix `expose` to be `true` for `ClientError` constructor + +2014-09-28 / 1.2.5 +================== + + * deps: statuses@1 + +2014-09-21 / 1.2.4 +================== + + * Fix dependency version to work with old `npm`s + +2014-09-21 / 1.2.3 +================== + + * deps: statuses@~1.1.0 + +2014-09-21 / 1.2.2 +================== + + * Fix publish error + +2014-09-21 / 1.2.1 +================== + + * Support Node.js 0.6 + * Use `inherits` instead of `util` + +2014-09-09 / 1.2.0 +================== + + * Fix the way inheriting functions + * Support `expose` being provided in properties argument + +2014-09-08 / 1.1.0 +================== + + * Default status to 500 + * Support provided `error` to extend + +2014-09-08 / 1.0.1 +================== + + * Fix accepting string message + +2014-09-08 / 1.0.0 +================== + + * Initial release diff --git a/node_modules/http-errors/LICENSE b/node_modules/http-errors/LICENSE new file mode 100644 index 0000000..82af4df --- /dev/null +++ b/node_modules/http-errors/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.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/node_modules/http-errors/README.md b/node_modules/http-errors/README.md new file mode 100644 index 0000000..79663d8 --- /dev/null +++ b/node_modules/http-errors/README.md @@ -0,0 +1,135 @@ +# http-errors + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create HTTP errors for Express, Koa, Connect, etc. with ease. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install http-errors +``` + +## Example + +```js +var createError = require('http-errors') +var express = require('express') +var app = express() + +app.use(function (req, res, next) { + if (!req.user) return next(createError(401, 'Please login to view this page.')) + next() +}) +``` + +## API + +This is the current API, currently extracted from Koa and subject to change. + +All errors inherit from JavaScript `Error` and the exported `createError.HttpError`. + +### Error Properties + +- `expose` - can be used to signal if `message` should be sent to the client, + defaulting to `false` when `status` >= 500 +- `headers` - can be an object of header names to values to be sent to the + client, defaulting to `undefined`. When defined, the key names should all + be lower-cased +- `message` - the traditional error message, which should be kept short and all + single line +- `status` - the status code of the error, mirroring `statusCode` for general + compatibility +- `statusCode` - the status code of the error, defaulting to `500` + +### createError([status], [message], [properties]) + + + +```js +var err = createError(404, 'This video does not exist!') +``` + +- `status: 500` - the status code as a number +- `message` - the message of the error, defaulting to node's text for that status code. +- `properties` - custom properties to attach to the object + +### new createError\[code || name\](\[msg]\)) + + + +```js +var err = new createError.NotFound() +``` + +- `code` - the status code as a number +- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`. + +#### List of all constructors + +|Status Code|Constructor Name | +|-----------|-----------------------------| +|400 |BadRequest | +|401 |Unauthorized | +|402 |PaymentRequired | +|403 |Forbidden | +|404 |NotFound | +|405 |MethodNotAllowed | +|406 |NotAcceptable | +|407 |ProxyAuthenticationRequired | +|408 |RequestTimeout | +|409 |Conflict | +|410 |Gone | +|411 |LengthRequired | +|412 |PreconditionFailed | +|413 |PayloadTooLarge | +|414 |URITooLong | +|415 |UnsupportedMediaType | +|416 |RangeNotSatisfiable | +|417 |ExpectationFailed | +|418 |ImATeapot | +|421 |MisdirectedRequest | +|422 |UnprocessableEntity | +|423 |Locked | +|424 |FailedDependency | +|425 |UnorderedCollection | +|426 |UpgradeRequired | +|428 |PreconditionRequired | +|429 |TooManyRequests | +|431 |RequestHeaderFieldsTooLarge | +|451 |UnavailableForLegalReasons | +|500 |InternalServerError | +|501 |NotImplemented | +|502 |BadGateway | +|503 |ServiceUnavailable | +|504 |GatewayTimeout | +|505 |HTTPVersionNotSupported | +|506 |VariantAlsoNegotiates | +|507 |InsufficientStorage | +|508 |LoopDetected | +|509 |BandwidthLimitExceeded | +|510 |NotExtended | +|511 |NetworkAuthenticationRequired| + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/http-errors.svg +[npm-url]: https://npmjs.org/package/http-errors +[node-version-image]: https://img.shields.io/node/v/http-errors.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/http-errors.svg +[travis-url]: https://travis-ci.org/jshttp/http-errors +[coveralls-image]: https://img.shields.io/coveralls/jshttp/http-errors.svg +[coveralls-url]: https://coveralls.io/r/jshttp/http-errors +[downloads-image]: https://img.shields.io/npm/dm/http-errors.svg +[downloads-url]: https://npmjs.org/package/http-errors diff --git a/node_modules/http-errors/index.js b/node_modules/http-errors/index.js new file mode 100644 index 0000000..9509303 --- /dev/null +++ b/node_modules/http-errors/index.js @@ -0,0 +1,260 @@ +/*! + * http-errors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var deprecate = require('depd')('http-errors') +var setPrototypeOf = require('setprototypeof') +var statuses = require('statuses') +var inherits = require('inherits') + +/** + * Module exports. + * @public + */ + +module.exports = createError +module.exports.HttpError = createHttpErrorConstructor() + +// Populate exports for all constructors +populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError) + +/** + * Get the code class of a status code. + * @private + */ + +function codeClass (status) { + return Number(String(status).charAt(0) + '00') +} + +/** + * Create a new HTTP Error. + * + * @returns {Error} + * @public + */ + +function createError () { + // so much arity going on ~_~ + var err + var msg + var status = 500 + var props = {} + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i] + if (arg instanceof Error) { + err = arg + status = err.status || err.statusCode || status + continue + } + switch (typeof arg) { + case 'string': + msg = arg + break + case 'number': + status = arg + if (i !== 0) { + deprecate('non-first-argument status code; replace with createError(' + arg + ', ...)') + } + break + case 'object': + props = arg + break + } + } + + if (typeof status === 'number' && (status < 400 || status >= 600)) { + deprecate('non-error status code; use only 4xx or 5xx status codes') + } + + if (typeof status !== 'number' || + (!statuses[status] && (status < 400 || status >= 600))) { + status = 500 + } + + // constructor + var HttpError = createError[status] || createError[codeClass(status)] + + if (!err) { + // create error + err = HttpError + ? new HttpError(msg) + : new Error(msg || statuses[status]) + Error.captureStackTrace(err, createError) + } + + if (!HttpError || !(err instanceof HttpError) || err.status !== status) { + // add properties to generic error + err.expose = status < 500 + err.status = err.statusCode = status + } + + for (var key in props) { + if (key !== 'status' && key !== 'statusCode') { + err[key] = props[key] + } + } + + return err +} + +/** + * Create HTTP error abstract base class. + * @private + */ + +function createHttpErrorConstructor () { + function HttpError () { + throw new TypeError('cannot construct abstract class') + } + + inherits(HttpError, Error) + + return HttpError +} + +/** + * Create a constructor for a client error. + * @private + */ + +function createClientErrorConstructor (HttpError, name, code) { + var className = name.match(/Error$/) ? name : name + 'Error' + + function ClientError (message) { + // create the error object + var msg = message != null ? message : statuses[code] + var err = new Error(msg) + + // capture a stack trace to the construction point + Error.captureStackTrace(err, ClientError) + + // adjust the [[Prototype]] + setPrototypeOf(err, ClientError.prototype) + + // redefine the error message + Object.defineProperty(err, 'message', { + enumerable: true, + configurable: true, + value: msg, + writable: true + }) + + // redefine the error name + Object.defineProperty(err, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + + return err + } + + inherits(ClientError, HttpError) + + ClientError.prototype.status = code + ClientError.prototype.statusCode = code + ClientError.prototype.expose = true + + return ClientError +} + +/** + * Create a constructor for a server error. + * @private + */ + +function createServerErrorConstructor (HttpError, name, code) { + var className = name.match(/Error$/) ? name : name + 'Error' + + function ServerError (message) { + // create the error object + var msg = message != null ? message : statuses[code] + var err = new Error(msg) + + // capture a stack trace to the construction point + Error.captureStackTrace(err, ServerError) + + // adjust the [[Prototype]] + setPrototypeOf(err, ServerError.prototype) + + // redefine the error message + Object.defineProperty(err, 'message', { + enumerable: true, + configurable: true, + value: msg, + writable: true + }) + + // redefine the error name + Object.defineProperty(err, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + + return err + } + + inherits(ServerError, HttpError) + + ServerError.prototype.status = code + ServerError.prototype.statusCode = code + ServerError.prototype.expose = false + + return ServerError +} + +/** + * Populate the exports object with constructors for every error class. + * @private + */ + +function populateConstructorExports (exports, codes, HttpError) { + codes.forEach(function forEachCode (code) { + var CodeError + var name = toIdentifier(statuses[code]) + + switch (codeClass(code)) { + case 400: + CodeError = createClientErrorConstructor(HttpError, name, code) + break + case 500: + CodeError = createServerErrorConstructor(HttpError, name, code) + break + } + + if (CodeError) { + // export the constructor + exports[code] = CodeError + exports[name] = CodeError + } + }) + + // backwards-compatibility + exports["I'mateapot"] = deprecate.function(exports.ImATeapot, + '"I\'mateapot"; use "ImATeapot" instead') +} + +/** + * Convert a string of words to a JavaScript identifier. + * @private + */ + +function toIdentifier (str) { + return str.split(' ').map(function (token) { + return token.slice(0, 1).toUpperCase() + token.slice(1) + }).join('').replace(/[^ _0-9a-z]/gi, '') +} diff --git a/node_modules/http-errors/node_modules/depd/History.md b/node_modules/http-errors/node_modules/depd/History.md new file mode 100644 index 0000000..f001649 --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/History.md @@ -0,0 +1,90 @@ +1.1.1 / 2017-07-27 +================== + + * Remove unnecessary `Buffer` loading + * Support Node.js 0.6 to 8.x + +1.1.0 / 2015-09-14 +================== + + * Enable strict mode in more places + * Support io.js 3.x + * Support io.js 2.x + * Support web browser loading + - Requires bundler like Browserify or webpack + +1.0.1 / 2015-04-07 +================== + + * Fix `TypeError`s when under `'use strict'` code + * Fix useless type name on auto-generated messages + * Support io.js 1.x + * Support Node.js 0.12 + +1.0.0 / 2014-09-17 +================== + + * No changes + +0.4.5 / 2014-09-09 +================== + + * Improve call speed to functions using the function wrapper + * Support Node.js 0.6 + +0.4.4 / 2014-07-27 +================== + + * Work-around v8 generating empty stack traces + +0.4.3 / 2014-07-26 +================== + + * Fix exception when global `Error.stackTraceLimit` is too low + +0.4.2 / 2014-07-19 +================== + + * Correct call site for wrapped functions and properties + +0.4.1 / 2014-07-19 +================== + + * Improve automatic message generation for function properties + +0.4.0 / 2014-07-19 +================== + + * Add `TRACE_DEPRECATION` environment variable + * Remove non-standard grey color from color output + * Support `--no-deprecation` argument + * Support `--trace-deprecation` argument + * Support `deprecate.property(fn, prop, message)` + +0.3.0 / 2014-06-16 +================== + + * Add `NO_DEPRECATION` environment variable + +0.2.0 / 2014-06-15 +================== + + * Add `deprecate.property(obj, prop, message)` + * Remove `supports-color` dependency for node.js 0.8 + +0.1.0 / 2014-06-15 +================== + + * Add `deprecate.function(fn, message)` + * Add `process.on('deprecation', fn)` emitter + * Automatically generate message when omitted from `deprecate()` + +0.0.1 / 2014-06-15 +================== + + * Fix warning for dynamic calls at singe call site + +0.0.0 / 2014-06-15 +================== + + * Initial implementation diff --git a/node_modules/http-errors/node_modules/depd/LICENSE b/node_modules/http-errors/node_modules/depd/LICENSE new file mode 100644 index 0000000..84441fb --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +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/node_modules/http-errors/node_modules/depd/Readme.md b/node_modules/http-errors/node_modules/depd/Readme.md new file mode 100644 index 0000000..9e7d872 --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/Readme.md @@ -0,0 +1,283 @@ +# depd + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![Coverage Status][coveralls-image]][coveralls-url] +[![Gratipay][gratipay-image]][gratipay-url] + +Deprecate all the things + +> With great modules comes great responsibility; mark things deprecated! + +## Install + +This module is installed directly using `npm`: + +```sh +$ npm install depd +``` + +This module can also be bundled with systems like +[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/), +though by default this module will alter it's API to no longer display or +track deprecations. + +## API + + + +```js +var deprecate = require('depd')('my-module') +``` + +This library allows you to display deprecation messages to your users. +This library goes above and beyond with deprecation warnings by +introspection of the call stack (but only the bits that it is interested +in). + +Instead of just warning on the first invocation of a deprecated +function and never again, this module will warn on the first invocation +of a deprecated function per unique call site, making it ideal to alert +users of all deprecated uses across the code base, rather than just +whatever happens to execute first. + +The deprecation warnings from this module also include the file and line +information for the call into the module that the deprecated function was +in. + +**NOTE** this library has a similar interface to the `debug` module, and +this module uses the calling file to get the boundary for the call stacks, +so you should always create a new `deprecate` object in each file and not +within some central file. + +### depd(namespace) + +Create a new deprecate function that uses the given namespace name in the +messages and will display the call site prior to the stack entering the +file this function was called from. It is highly suggested you use the +name of your module as the namespace. + +### deprecate(message) + +Call this function from deprecated code to display a deprecation message. +This message will appear once per unique caller site. Caller site is the +first call site in the stack in a different file from the caller of this +function. + +If the message is omitted, a message is generated for you based on the site +of the `deprecate()` call and will display the name of the function called, +similar to the name displayed in a stack trace. + +### deprecate.function(fn, message) + +Call this function to wrap a given function in a deprecation message on any +call to the function. An optional message can be supplied to provide a custom +message. + +### deprecate.property(obj, prop, message) + +Call this function to wrap a given property on object in a deprecation message +on any accessing or setting of the property. An optional message can be supplied +to provide a custom message. + +The method must be called on the object where the property belongs (not +inherited from the prototype). + +If the property is a data descriptor, it will be converted to an accessor +descriptor in order to display the deprecation message. + +### process.on('deprecation', fn) + +This module will allow easy capturing of deprecation errors by emitting the +errors as the type "deprecation" on the global `process`. If there are no +listeners for this type, the errors are written to STDERR as normal, but if +there are any listeners, nothing will be written to STDERR and instead only +emitted. From there, you can write the errors in a different format or to a +logging source. + +The error represents the deprecation and is emitted only once with the same +rules as writing to STDERR. The error has the following properties: + + - `message` - This is the message given by the library + - `name` - This is always `'DeprecationError'` + - `namespace` - This is the namespace the deprecation came from + - `stack` - This is the stack of the call to the deprecated thing + +Example `error.stack` output: + +``` +DeprecationError: my-cool-module deprecated oldfunction + at Object. ([eval]-wrapper:6:22) + at Module._compile (module.js:456:26) + at evalScript (node.js:532:25) + at startup (node.js:80:7) + at node.js:902:3 +``` + +### process.env.NO_DEPRECATION + +As a user of modules that are deprecated, the environment variable `NO_DEPRECATION` +is provided as a quick solution to silencing deprecation warnings from being +output. The format of this is similar to that of `DEBUG`: + +```sh +$ NO_DEPRECATION=my-module,othermod node app.js +``` + +This will suppress deprecations from being output for "my-module" and "othermod". +The value is a list of comma-separated namespaces. To suppress every warning +across all namespaces, use the value `*` for a namespace. + +Providing the argument `--no-deprecation` to the `node` executable will suppress +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not suppress the deperecations given to any "deprecation" +event listeners, just the output to STDERR. + +### process.env.TRACE_DEPRECATION + +As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION` +is provided as a solution to getting more detailed location information in deprecation +warnings by including the entire stack trace. The format of this is the same as +`NO_DEPRECATION`: + +```sh +$ TRACE_DEPRECATION=my-module,othermod node app.js +``` + +This will include stack traces for deprecations being output for "my-module" and +"othermod". The value is a list of comma-separated namespaces. To trace every +warning across all namespaces, use the value `*` for a namespace. + +Providing the argument `--trace-deprecation` to the `node` executable will trace +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`. + +## Display + +![message](files/message.png) + +When a user calls a function in your library that you mark deprecated, they +will see the following written to STDERR (in the given colors, similar colors +and layout to the `debug` module): + +``` +bright cyan bright yellow +| | reset cyan +| | | | +▼ ▼ ▼ ▼ +my-cool-module deprecated oldfunction [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ +| | | | +namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +If the user redirects their STDERR to a file or somewhere that does not support +colors, they see (similar layout to the `debug` module): + +``` +Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ ▲ +| | | | | +timestamp of message namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +## Examples + +### Deprecating all calls to a function + +This will display a deprecated message about "oldfunction" being deprecated +from "my-module" on STDERR. + +```js +var deprecate = require('depd')('my-cool-module') + +// message automatically derived from function name +// Object.oldfunction +exports.oldfunction = deprecate.function(function oldfunction () { + // all calls to function are deprecated +}) + +// specific message +exports.oldfunction = deprecate.function(function () { + // all calls to function are deprecated +}, 'oldfunction') +``` + +### Conditionally deprecating a function call + +This will display a deprecated message about "weirdfunction" being deprecated +from "my-module" on STDERR when called with less than 2 arguments. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } +} +``` + +When calling `deprecate` as a function, the warning is counted per call site +within your own module, so you can display different deprecations depending +on different situations and the users will still get all the warnings: + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } else if (typeof arguments[0] !== 'string') { + // calls with non-string first argument are deprecated + deprecate('weirdfunction non-string first arg') + } +} +``` + +### Deprecating property access + +This will display a deprecated message about "oldprop" being deprecated +from "my-module" on STDERR when accessed. A deprecation will be displayed +when setting the value and when getting the value. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.oldprop = 'something' + +// message automatically derives from property name +deprecate.property(exports, 'oldprop') + +// explicit message +deprecate.property(exports, 'oldprop', 'oldprop >= 0.10') +``` + +## License + +[MIT](LICENSE) + +[npm-version-image]: https://img.shields.io/npm/v/depd.svg +[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg +[npm-url]: https://npmjs.org/package/depd +[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux +[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd +[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd +[coveralls-image]: https://img.shields.io/coveralls/dougwilson/nodejs-depd/master.svg +[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master +[node-image]: https://img.shields.io/node/v/depd.svg +[node-url]: https://nodejs.org/en/download/ +[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg +[gratipay-url]: https://www.gratipay.com/dougwilson/ diff --git a/node_modules/http-errors/node_modules/depd/index.js b/node_modules/http-errors/node_modules/depd/index.js new file mode 100644 index 0000000..73d81ab --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/index.js @@ -0,0 +1,520 @@ +/*! + * depd + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module dependencies. + */ + +var callSiteToString = require('./lib/compat').callSiteToString +var eventListenerCount = require('./lib/compat').eventListenerCount +var relative = require('path').relative + +/** + * Module exports. + */ + +module.exports = depd + +/** + * Get the path to base files on. + */ + +var basePath = process.cwd() + +/** + * Determine if namespace is contained in the string. + */ + +function containsNamespace (str, namespace) { + var val = str.split(/[ ,]+/) + + namespace = String(namespace).toLowerCase() + + for (var i = 0; i < val.length; i++) { + if (!(str = val[i])) continue + + // namespace contained + if (str === '*' || str.toLowerCase() === namespace) { + return true + } + } + + return false +} + +/** + * Convert a data descriptor to accessor descriptor. + */ + +function convertDataDescriptorToAccessor (obj, prop, message) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + var value = descriptor.value + + descriptor.get = function getter () { return value } + + if (descriptor.writable) { + descriptor.set = function setter (val) { return (value = val) } + } + + delete descriptor.value + delete descriptor.writable + + Object.defineProperty(obj, prop, descriptor) + + return descriptor +} + +/** + * Create arguments string to keep arity. + */ + +function createArgumentsString (arity) { + var str = '' + + for (var i = 0; i < arity; i++) { + str += ', arg' + i + } + + return str.substr(2) +} + +/** + * Create stack string from stack. + */ + +function createStackString (stack) { + var str = this.name + ': ' + this.namespace + + if (this.message) { + str += ' deprecated ' + this.message + } + + for (var i = 0; i < stack.length; i++) { + str += '\n at ' + callSiteToString(stack[i]) + } + + return str +} + +/** + * Create deprecate for namespace in caller. + */ + +function depd (namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } + + var stack = getStack() + var site = callSiteLocation(stack[1]) + var file = site[0] + + function deprecate (message) { + // call to self as log + log.call(deprecate, message) + } + + deprecate._file = file + deprecate._ignored = isignored(namespace) + deprecate._namespace = namespace + deprecate._traced = istraced(namespace) + deprecate._warned = Object.create(null) + + deprecate.function = wrapfunction + deprecate.property = wrapproperty + + return deprecate +} + +/** + * Determine if namespace is ignored. + */ + +function isignored (namespace) { + /* istanbul ignore next: tested in a child processs */ + if (process.noDeprecation) { + // --no-deprecation support + return true + } + + var str = process.env.NO_DEPRECATION || '' + + // namespace ignored + return containsNamespace(str, namespace) +} + +/** + * Determine if namespace is traced. + */ + +function istraced (namespace) { + /* istanbul ignore next: tested in a child processs */ + if (process.traceDeprecation) { + // --trace-deprecation support + return true + } + + var str = process.env.TRACE_DEPRECATION || '' + + // namespace traced + return containsNamespace(str, namespace) +} + +/** + * Display deprecation message. + */ + +function log (message, site) { + var haslisteners = eventListenerCount(process, 'deprecation') !== 0 + + // abort early if no destination + if (!haslisteners && this._ignored) { + return + } + + var caller + var callFile + var callSite + var i = 0 + var seen = false + var stack = getStack() + var file = this._file + + if (site) { + // provided site + callSite = callSiteLocation(stack[1]) + callSite.name = site.name + file = callSite[0] + } else { + // get call site + i = 2 + site = callSiteLocation(stack[i]) + callSite = site + } + + // get caller of deprecated thing in relation to file + for (; i < stack.length; i++) { + caller = callSiteLocation(stack[i]) + callFile = caller[0] + + if (callFile === file) { + seen = true + } else if (callFile === this._file) { + file = this._file + } else if (seen) { + break + } + } + + var key = caller + ? site.join(':') + '__' + caller.join(':') + : undefined + + if (key !== undefined && key in this._warned) { + // already warned + return + } + + this._warned[key] = true + + // generate automatic message from call site + if (!message) { + message = callSite === site || !callSite.name + ? defaultMessage(site) + : defaultMessage(callSite) + } + + // emit deprecation if listeners exist + if (haslisteners) { + var err = DeprecationError(this._namespace, message, stack.slice(i)) + process.emit('deprecation', err) + return + } + + // format and write message + var format = process.stderr.isTTY + ? formatColor + : formatPlain + var msg = format.call(this, message, caller, stack.slice(i)) + process.stderr.write(msg + '\n', 'utf8') +} + +/** + * Get call site location as array. + */ + +function callSiteLocation (callSite) { + var file = callSite.getFileName() || '' + var line = callSite.getLineNumber() + var colm = callSite.getColumnNumber() + + if (callSite.isEval()) { + file = callSite.getEvalOrigin() + ', ' + file + } + + var site = [file, line, colm] + + site.callSite = callSite + site.name = callSite.getFunctionName() + + return site +} + +/** + * Generate a default message from the site. + */ + +function defaultMessage (site) { + var callSite = site.callSite + var funcName = site.name + + // make useful anonymous name + if (!funcName) { + funcName = '' + } + + var context = callSite.getThis() + var typeName = context && callSite.getTypeName() + + // ignore useless type name + if (typeName === 'Object') { + typeName = undefined + } + + // make useful type name + if (typeName === 'Function') { + typeName = context.name || typeName + } + + return typeName && callSite.getMethodName() + ? typeName + '.' + funcName + : funcName +} + +/** + * Format deprecation message without color. + */ + +function formatPlain (msg, caller, stack) { + var timestamp = new Date().toUTCString() + + var formatted = timestamp + + ' ' + this._namespace + + ' deprecated ' + msg + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n at ' + callSiteToString(stack[i]) + } + + return formatted + } + + if (caller) { + formatted += ' at ' + formatLocation(caller) + } + + return formatted +} + +/** + * Format deprecation message with color. + */ + +function formatColor (msg, caller, stack) { + var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan + ' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow + ' \x1b[0m' + msg + '\x1b[39m' // reset + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan + } + + return formatted + } + + if (caller) { + formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan + } + + return formatted +} + +/** + * Format call site location. + */ + +function formatLocation (callSite) { + return relative(basePath, callSite[0]) + + ':' + callSite[1] + + ':' + callSite[2] +} + +/** + * Get the stack as array of call sites. + */ + +function getStack () { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace + + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = Math.max(10, limit) + + // capture the stack + Error.captureStackTrace(obj) + + // slice this function off the top + var stack = obj.stack.slice(1) + + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit + + return stack +} + +/** + * Capture call site stack from v8. + */ + +function prepareObjectStackTrace (obj, stack) { + return stack +} + +/** + * Return a wrapped function in a deprecation message. + */ + +function wrapfunction (fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + + var args = createArgumentsString(fn.length) + var deprecate = this // eslint-disable-line no-unused-vars + var stack = getStack() + var site = callSiteLocation(stack[1]) + + site.name = fn.name + + // eslint-disable-next-line no-eval + var deprecatedfn = eval('(function (' + args + ') {\n' + + '"use strict"\n' + + 'log.call(deprecate, message, site)\n' + + 'return fn.apply(this, arguments)\n' + + '})') + + return deprecatedfn +} + +/** + * Wrap property in a deprecation message. + */ + +function wrapproperty (obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } + + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } + + var deprecate = this + var stack = getStack() + var site = callSiteLocation(stack[1]) + + // set site name + site.name = prop + + // convert data descriptor + if ('value' in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj, prop, message) + } + + var get = descriptor.get + var set = descriptor.set + + // wrap getter + if (typeof get === 'function') { + descriptor.get = function getter () { + log.call(deprecate, message, site) + return get.apply(this, arguments) + } + } + + // wrap setter + if (typeof set === 'function') { + descriptor.set = function setter () { + log.call(deprecate, message, site) + return set.apply(this, arguments) + } + } + + Object.defineProperty(obj, prop, descriptor) +} + +/** + * Create DeprecationError for deprecation + */ + +function DeprecationError (namespace, message, stack) { + var error = new Error() + var stackString + + Object.defineProperty(error, 'constructor', { + value: DeprecationError + }) + + Object.defineProperty(error, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }) + + Object.defineProperty(error, 'name', { + enumerable: false, + configurable: true, + value: 'DeprecationError', + writable: true + }) + + Object.defineProperty(error, 'namespace', { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }) + + Object.defineProperty(error, 'stack', { + configurable: true, + enumerable: false, + get: function () { + if (stackString !== undefined) { + return stackString + } + + // prepare stack trace + return (stackString = createStackString.call(this, stack)) + }, + set: function setter (val) { + stackString = val + } + }) + + return error +} diff --git a/node_modules/http-errors/node_modules/depd/lib/browser/index.js b/node_modules/http-errors/node_modules/depd/lib/browser/index.js new file mode 100644 index 0000000..6be45cc --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/lib/browser/index.js @@ -0,0 +1,77 @@ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = depd + +/** + * Create deprecate for namespace in caller. + */ + +function depd (namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } + + function deprecate (message) { + // no-op in browser + } + + deprecate._file = undefined + deprecate._ignored = true + deprecate._namespace = namespace + deprecate._traced = false + deprecate._warned = Object.create(null) + + deprecate.function = wrapfunction + deprecate.property = wrapproperty + + return deprecate +} + +/** + * Return a wrapped function in a deprecation message. + * + * This is a no-op version of the wrapper, which does nothing but call + * validation. + */ + +function wrapfunction (fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + + return fn +} + +/** + * Wrap property in a deprecation message. + * + * This is a no-op version of the wrapper, which does nothing but call + * validation. + */ + +function wrapproperty (obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } + + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } +} diff --git a/node_modules/http-errors/node_modules/depd/lib/compat/callsite-tostring.js b/node_modules/http-errors/node_modules/depd/lib/compat/callsite-tostring.js new file mode 100644 index 0000000..73186dc --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/lib/compat/callsite-tostring.js @@ -0,0 +1,103 @@ +/*! + * depd + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + */ + +module.exports = callSiteToString + +/** + * Format a CallSite file location to a string. + */ + +function callSiteFileLocation (callSite) { + var fileName + var fileLocation = '' + + if (callSite.isNative()) { + fileLocation = 'native' + } else if (callSite.isEval()) { + fileName = callSite.getScriptNameOrSourceURL() + if (!fileName) { + fileLocation = callSite.getEvalOrigin() + } + } else { + fileName = callSite.getFileName() + } + + if (fileName) { + fileLocation += fileName + + var lineNumber = callSite.getLineNumber() + if (lineNumber != null) { + fileLocation += ':' + lineNumber + + var columnNumber = callSite.getColumnNumber() + if (columnNumber) { + fileLocation += ':' + columnNumber + } + } + } + + return fileLocation || 'unknown source' +} + +/** + * Format a CallSite to a string. + */ + +function callSiteToString (callSite) { + var addSuffix = true + var fileLocation = callSiteFileLocation(callSite) + var functionName = callSite.getFunctionName() + var isConstructor = callSite.isConstructor() + var isMethodCall = !(callSite.isToplevel() || isConstructor) + var line = '' + + if (isMethodCall) { + var methodName = callSite.getMethodName() + var typeName = getConstructorName(callSite) + + if (functionName) { + if (typeName && functionName.indexOf(typeName) !== 0) { + line += typeName + '.' + } + + line += functionName + + if (methodName && functionName.lastIndexOf('.' + 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 { + addSuffix = false + line += fileLocation + } + + if (addSuffix) { + line += ' (' + fileLocation + ')' + } + + return line +} + +/** + * Get constructor name of reviver. + */ + +function getConstructorName (obj) { + var receiver = obj.receiver + return (receiver.constructor && receiver.constructor.name) || null +} diff --git a/node_modules/http-errors/node_modules/depd/lib/compat/event-listener-count.js b/node_modules/http-errors/node_modules/depd/lib/compat/event-listener-count.js new file mode 100644 index 0000000..3a8925d --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/lib/compat/event-listener-count.js @@ -0,0 +1,22 @@ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = eventListenerCount + +/** + * Get the count of listeners on an event emitter of a specific type. + */ + +function eventListenerCount (emitter, type) { + return emitter.listeners(type).length +} diff --git a/node_modules/http-errors/node_modules/depd/lib/compat/index.js b/node_modules/http-errors/node_modules/depd/lib/compat/index.js new file mode 100644 index 0000000..955b333 --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/lib/compat/index.js @@ -0,0 +1,79 @@ +/*! + * depd + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var EventEmitter = require('events').EventEmitter + +/** + * Module exports. + * @public + */ + +lazyProperty(module.exports, 'callSiteToString', function callSiteToString () { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace + + function prepareObjectStackTrace (obj, stack) { + return stack + } + + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = 2 + + // capture the stack + Error.captureStackTrace(obj) + + // slice the stack + var stack = obj.stack.slice() + + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit + + return stack[0].toString ? toString : require('./callsite-tostring') +}) + +lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () { + return EventEmitter.listenerCount || require('./event-listener-count') +}) + +/** + * Define a lazy property. + */ + +function lazyProperty (obj, prop, getter) { + function get () { + var val = getter() + + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + value: val + }) + + return val + } + + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + get: get + }) +} + +/** + * Call toString() on the obj + */ + +function toString (obj) { + return obj.toString() +} diff --git a/node_modules/http-errors/node_modules/depd/package.json b/node_modules/http-errors/node_modules/depd/package.json new file mode 100644 index 0000000..1b73994 --- /dev/null +++ b/node_modules/http-errors/node_modules/depd/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "depd@1.1.1", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "depd@1.1.1", + "_id": "depd@1.1.1", + "_inBundle": false, + "_integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "_location": "/http-errors/depd", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "depd@1.1.1", + "name": "depd", + "escapedName": "depd", + "rawSpec": "1.1.1", + "saveSpec": null, + "fetchSpec": "1.1.1" + }, + "_requiredBy": [ + "/http-errors" + ], + "_resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "_spec": "1.1.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + "browser": "lib/browser/index.js", + "bugs": { + "url": "https://github.com/dougwilson/nodejs-depd/issues" + }, + "description": "Deprecate all the things", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "3.19.0", + "eslint-config-standard": "7.1.0", + "eslint-plugin-markdown": "1.0.0-beta.7", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "2.3.1", + "istanbul": "0.4.5", + "mocha": "~1.21.5" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "lib/", + "History.md", + "LICENSE", + "index.js", + "Readme.md" + ], + "homepage": "https://github.com/dougwilson/nodejs-depd#readme", + "keywords": [ + "deprecate", + "deprecated" + ], + "license": "MIT", + "name": "depd", + "repository": { + "type": "git", + "url": "git+https://github.com/dougwilson/nodejs-depd.git" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/" + }, + "version": "1.1.1" +} diff --git a/node_modules/http-errors/package.json b/node_modules/http-errors/package.json new file mode 100644 index 0000000..df9b526 --- /dev/null +++ b/node_modules/http-errors/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "http-errors@1.6.2", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "http-errors@1.6.2", + "_id": "http-errors@1.6.2", + "_inBundle": false, + "_integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "_location": "/http-errors", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "http-errors@1.6.2", + "name": "http-errors", + "escapedName": "http-errors", + "rawSpec": "1.6.2", + "saveSpec": null, + "fetchSpec": "1.6.2" + }, + "_requiredBy": [ + "/body-parser", + "/raw-body", + "/send" + ], + "_resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "_spec": "1.6.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + }, + "bugs": { + "url": "https://github.com/jshttp/http-errors/issues" + }, + "contributors": [ + { + "name": "Alan Plum", + "email": "me@pluma.io" + }, + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + } + ], + "dependencies": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + }, + "description": "Create HTTP error objects", + "devDependencies": { + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "index.js", + "HISTORY.md", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/jshttp/http-errors#readme", + "keywords": [ + "http", + "error" + ], + "license": "MIT", + "name": "http-errors", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/http-errors.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" + }, + "version": "1.6.2" +} diff --git a/node_modules/iconv-lite/.npmignore b/node_modules/iconv-lite/.npmignore new file mode 100644 index 0000000..5cd2673 --- /dev/null +++ b/node_modules/iconv-lite/.npmignore @@ -0,0 +1,6 @@ +*~ +*sublime-* +generation +test +wiki +coverage diff --git a/node_modules/iconv-lite/.travis.yml b/node_modules/iconv-lite/.travis.yml new file mode 100644 index 0000000..3eab7fd --- /dev/null +++ b/node_modules/iconv-lite/.travis.yml @@ -0,0 +1,23 @@ + sudo: false + language: node_js + node_js: + - "0.10" + - "0.11" + - "0.12" + - "iojs" + - "4" + - "6" + - "8" + - "node" + + + env: + - CXX=g++-4.8 + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 + diff --git a/node_modules/iconv-lite/Changelog.md b/node_modules/iconv-lite/Changelog.md new file mode 100644 index 0000000..64aae34 --- /dev/null +++ b/node_modules/iconv-lite/Changelog.md @@ -0,0 +1,134 @@ + +# 0.4.19 / 2017-09-09 + + * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147) + * Re-generated windows1255 codec, because it was updated in iconv project + * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8 + + +# 0.4.18 / 2017-06-13 + + * Fixed CESU-8 regression in Node v8. + + +# 0.4.17 / 2017-04-22 + + * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) + + +# 0.4.16 / 2017-04-22 + + * Added support for React Native (#150) + * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) + * Fixed typo in Readme (#138 by @jiangzhuo) + * Fixed build for Node v6.10+ by making correct version comparison + * Added a warning if iconv-lite is loaded not as utf-8 (see #142) + + +# 0.4.15 / 2016-11-21 + + * Fixed typescript type definition (#137) + + +# 0.4.14 / 2016-11-20 + + * Preparation for v1.0 + * Added Node v6 and latest Node versions to Travis CI test rig + * Deprecated Node v0.8 support + * Typescript typings (@larssn) + * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) + * Add ms prefix to dbcs windows encodings (@rokoroku) + + +# 0.4.13 / 2015-10-01 + + * Fix silly mistake in deprecation notice. + + +# 0.4.12 / 2015-09-26 + + * Node v4 support: + * Added CESU-8 decoding (#106) + * Added deprecation notice for `extendNodeEncodings` + * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) + + +# 0.4.11 / 2015-07-03 + + * Added CESU-8 encoding. + + +# 0.4.10 / 2015-05-26 + + * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not + just spaces. This should minimize the importance of "default" endianness. + + +# 0.4.9 / 2015-05-24 + + * Streamlined BOM handling: strip BOM by default, add BOM when encoding if + addBOM: true. Added docs to Readme. + * UTF16 now uses UTF16-LE by default. + * Fixed minor issue with big5 encoding. + * Added io.js testing on Travis; updated node-iconv version to test against. + Now we just skip testing SBCS encodings that node-iconv doesn't support. + * (internal refactoring) Updated codec interface to use classes. + * Use strict mode in all files. + + +# 0.4.8 / 2015-04-14 + + * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) + + +# 0.4.7 / 2015-02-05 + + * stop official support of Node.js v0.8. Should still work, but no guarantees. + reason: Packages needed for testing are hard to get on Travis CI. + * work in environment where Object.prototype is monkey patched with enumerable + props (#89). + + +# 0.4.6 / 2015-01-12 + + * fix rare aliases of single-byte encodings (thanks @mscdex) + * double the timeout for dbcs tests to make them less flaky on travis + + +# 0.4.5 / 2014-11-20 + + * fix windows-31j and x-sjis encoding support (@nleush) + * minor fix: undefined variable reference when internal error happens + + +# 0.4.4 / 2014-07-16 + + * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) + * fixed streaming base64 encoding + + +# 0.4.3 / 2014-06-14 + + * added encodings UTF-16BE and UTF-16 with BOM + + +# 0.4.2 / 2014-06-12 + + * don't throw exception if `extendNodeEncodings()` is called more than once + + +# 0.4.1 / 2014-06-11 + + * codepage 808 added + + +# 0.4.0 / 2014-06-10 + + * code is rewritten from scratch + * all widespread encodings are supported + * streaming interface added + * browserify compatibility added + * (optional) extend core primitive encodings to make usage even simpler + * moved from vows to mocha as the testing framework + + diff --git a/node_modules/iconv-lite/LICENSE b/node_modules/iconv-lite/LICENSE new file mode 100644 index 0000000..d518d83 --- /dev/null +++ b/node_modules/iconv-lite/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011 Alexander Shtuchkin + +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/node_modules/iconv-lite/README.md b/node_modules/iconv-lite/README.md new file mode 100644 index 0000000..767daed --- /dev/null +++ b/node_modules/iconv-lite/README.md @@ -0,0 +1,160 @@ +## Pure JS character encoding conversion [![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite) + + * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io). + * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), + [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. + * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). + * Intuitive encode/decode API + * Streaming support for Node v0.10+ + * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings. + * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included). + * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. + * React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`). + * License: MIT. + +[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/) + +## Usage +### Basic API +```javascript +var iconv = require('iconv-lite'); + +// Convert from an encoded buffer to js string. +str = iconv.decode(new Buffer([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); + +// Convert from js string to an encoded buffer. +buf = iconv.encode("Sample input string", 'win1251'); + +// Check if encoding is supported +iconv.encodingExists("us-ascii") +``` + +### Streaming API (Node v0.10+) +```javascript + +// Decode stream (from binary stream to js strings) +http.createServer(function(req, res) { + var converterStream = iconv.decodeStream('win1251'); + req.pipe(converterStream); + + converterStream.on('data', function(str) { + console.log(str); // Do something with decoded strings, chunk-by-chunk. + }); +}); + +// Convert encoding streaming example +fs.createReadStream('file-in-win1251.txt') + .pipe(iconv.decodeStream('win1251')) + .pipe(iconv.encodeStream('ucs2')) + .pipe(fs.createWriteStream('file-in-ucs2.txt')); + +// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. +http.createServer(function(req, res) { + req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { + assert(typeof body == 'string'); + console.log(body); // full request body string + }); +}); +``` + +### [Deprecated] Extend Node.js own encodings +> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility). + +```javascript +// After this call all Node basic primitives will understand iconv-lite encodings. +iconv.extendNodeEncodings(); + +// Examples: +buf = new Buffer(str, 'win1251'); +buf.write(str, 'gbk'); +str = buf.toString('latin1'); +assert(Buffer.isEncoding('iso-8859-15')); +Buffer.byteLength(str, 'us-ascii'); + +http.createServer(function(req, res) { + req.setEncoding('big5'); + req.collect(function(err, body) { + console.log(body); + }); +}); + +fs.createReadStream("file.txt", "shift_jis"); + +// External modules are also supported (if they use Node primitives, which they probably do). +request = require('request'); +request({ + url: "http://github.com/", + encoding: "cp932" +}); + +// To remove extensions +iconv.undoExtendNodeEncodings(); +``` + +## Supported encodings + + * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. + * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap. + * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, + IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. + Aliases like 'latin1', 'us-ascii' also supported. + * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. + +See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). + +Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! + +Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! + + +## Encoding/decoding speed + +Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). +Note: your results may vary, so please always check on your hardware. + + operation iconv@2.1.4 iconv-lite@0.4.7 + ---------------------------------------------------------- + encode('win1251') ~96 Mb/s ~320 Mb/s + decode('win1251') ~95 Mb/s ~246 Mb/s + +## BOM handling + + * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options + (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). + A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. + * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. + * Encoding: No BOM added, unless overridden by `addBOM: true` option. + +## UTF-16 Encodings + +This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be +smart about endianness in the following ways: + * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be + overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. + * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. + +## Other notes + +When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). +Untranslatable characters are set to � or ?. No transliteration is currently supported. +Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). + +## Testing + +```bash +$ git clone git@github.com:ashtuchkin/iconv-lite.git +$ cd iconv-lite +$ npm install +$ npm test + +$ # To view performance: +$ node test/performance.js + +$ # To view test coverage: +$ npm run coverage +$ open coverage/lcov-report/index.html +``` + +## Adoption +[![NPM](https://nodei.co/npm-dl/iconv-lite.png)](https://nodei.co/npm/iconv-lite/) +[![Codeship Status for ashtuchkin/iconv-lite](https://www.codeship.com/projects/81670840-fa72-0131-4520-4a01a6c01acc/status)](https://www.codeship.com/projects/29053) diff --git a/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/iconv-lite/encodings/dbcs-codec.js new file mode 100644 index 0000000..7b3c980 --- /dev/null +++ b/node_modules/iconv-lite/encodings/dbcs-codec.js @@ -0,0 +1,555 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. +// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. +// To save memory and loading time, we read table files only when requested. + +exports._dbcs = DBCSCodec; + +var UNASSIGNED = -1, + GB18030_CODE = -2, + SEQ_START = -10, + NODE_START = -1000, + UNASSIGNED_NODE = new Array(0x100), + DEF_CHAR = -1; + +for (var i = 0; i < 0x100; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; + + +// Class DBCSCodec reads and initializes mapping tables. +function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data.") + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + + // Load tables. + var mappingTable = codecOptions.table(); + + + // Decode tables: MBCS -> Unicode. + + // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. + // Trie root is decodeTables[0]. + // Values: >= 0 -> unicode character code. can be > 0xFFFF + // == UNASSIGNED -> unknown/unassigned sequence. + // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. + // <= NODE_START -> index of the next node in our trie to process next byte. + // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. + + // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. + this.decodeTableSeq = []; + + // Actual mapping tables consist of chunks. Use them to fill up decode tables. + for (var i = 0; i < mappingTable.length; i++) + this._addDecodeChunk(mappingTable[i]); + + this.defaultCharUnicode = iconv.defaultCharUnicode; + + + // Encode tables: Unicode -> DBCS. + + // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. + // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. + // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). + // == UNASSIGNED -> no conversion found. Output a default char. + // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. + this.encodeTable = []; + + // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of + // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key + // means end of sequence (needed when one sequence is a strict subsequence of another). + // Objects are kept separately from encodeTable to increase performance. + this.encodeTableSeq = []; + + // Some chars can be decoded, but need not be encoded. + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { + var val = codecOptions.encodeSkipVals[i]; + if (typeof val === 'number') + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + + // Use decode trie to recursively fill out encode tables. + this._fillEncodeTable(0, 0, skipEncodeChars); + + // Add more encoding pairs when needed. + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); + } + + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); + + + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. + + // Add GB18030 decode tables. + var thirdByteNodeIdx = this.decodeTables.length; + var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + var fourthByteNodeIdx = this.decodeTables.length; + var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; + var secondByteNode = this.decodeTables[secondByteNodeIdx]; + for (var j = 0x30; j <= 0x39; j++) + secondByteNode[j] = NODE_START - thirdByteNodeIdx; + } + for (var i = 0x81; i <= 0xFE; i++) + thirdByteNode[i] = NODE_START - fourthByteNodeIdx; + for (var i = 0x30; i <= 0x39; i++) + fourthByteNode[i] = GB18030_CODE + } +} + +DBCSCodec.prototype.encoder = DBCSEncoder; +DBCSCodec.prototype.decoder = DBCSDecoder; + +// Decoder helpers +DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>= 8) + bytes.push(addr & 0xFF); + if (bytes.length == 0) + bytes.push(0); + + var node = this.decodeTables[0]; + for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. + var val = node[bytes[i]]; + + if (val == UNASSIGNED) { // Create new node. + node[bytes[i]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } + else if (val <= NODE_START) { // Existing node. + node = this.decodeTables[NODE_START - val]; + } + else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; +} + + +DBCSCodec.prototype._addDecodeChunk = function(chunk) { + // First element of chunk is the hex mbcs code where we start. + var curAddr = parseInt(chunk[0], 16); + + // Choose the decoding node where we'll write our chars. + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 0xFF; + + // Write all other elements of the chunk to the table. + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { // String, write as-is. + for (var l = 0; l < part.length;) { + var code = part.charCodeAt(l++); + if (0xD800 <= code && code < 0xDC00) { // Decode surrogate + var codeTrail = part.charCodeAt(l++); + if (0xDC00 <= codeTrail && codeTrail < 0xE000) + writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } + else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) + var len = 0xFFF - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. + + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } + else + writeTable[curAddr++] = code; // Basic char + } + } + else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. + var charCode = writeTable[curAddr - 1] + 1; + for (var l = 0; l < part; l++) + writeTable[curAddr++] = charCode++; + } + else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 0xFF) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); +} + +// Encoder helpers +DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; // This could be > 0xFF because of astral characters. + if (this.encodeTable[high] === undefined) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. + return this.encodeTable[high]; +} + +DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; +} + +DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + + // Get the root of character tree according to first character of the sequence. + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + + var node; + if (bucket[low] <= SEQ_START) { + // There's already a sequence with - use it. + node = this.encodeTableSeq[SEQ_START-bucket[low]]; + } + else { + // There was no sequence object - allocate a new one. + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } + + // Traverse the character tree, allocating new nodes as needed. + for (var j = 1; j < seq.length-1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === 'object') + node = oldVal; + else { + node = node[uCode] = {} + if (oldVal !== undefined) + node[DEF_CHAR] = oldVal + } + } + + // Set the leaf to given dbcsCode. + uCode = seq[seq.length-1]; + node[uCode] = dbcsCode; +} + +DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + for (var i = 0; i < 0x100; i++) { + var uCode = node[i]; + var mbCode = prefix + i; + if (skipEncodeChars[mbCode]) + continue; + + if (uCode >= 0) + this._setEncodeChar(uCode, mbCode); + else if (uCode <= NODE_START) + this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); + else if (uCode <= SEQ_START) + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + } +} + + + +// == Encoder ================================================================== + +function DBCSEncoder(options, codec) { + // Encoder state + this.leadSurrogate = -1; + this.seqObj = undefined; + + // Static data + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; +} + +DBCSEncoder.prototype.write = function(str) { + var newBuf = new Buffer(str.length * (this.gb18030 ? 4 : 3)), + leadSurrogate = this.leadSurrogate, + seqObj = this.seqObj, nextChar = -1, + i = 0, j = 0; + + while (true) { + // 0. Get next character. + if (nextChar === -1) { + if (i == str.length) break; + var uCode = str.charCodeAt(i++); + } + else { + var uCode = nextChar; + nextChar = -1; + } + + // 1. Handle surrogates. + if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. + if (uCode < 0xDC00) { // We've got lead surrogate. + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + // Double lead surrogate found. + uCode = UNASSIGNED; + } + } else { // We've got trail surrogate. + if (leadSurrogate !== -1) { + uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); + leadSurrogate = -1; + } else { + // Incomplete surrogate pair - only trail surrogate found. + uCode = UNASSIGNED; + } + + } + } + else if (leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. + leadSurrogate = -1; + } + + // 2. Convert uCode character. + var dbcsCode = UNASSIGNED; + if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence + var resCode = seqObj[uCode]; + if (typeof resCode === 'object') { // Sequence continues. + seqObj = resCode; + continue; + + } else if (typeof resCode == 'number') { // Sequence finished. Write it. + dbcsCode = resCode; + + } else if (resCode == undefined) { // Current character is not part of the sequence. + + // Try default character for this sequence + resCode = seqObj[DEF_CHAR]; + if (resCode !== undefined) { + dbcsCode = resCode; // Found. Write it. + nextChar = uCode; // Current character will be written too in the next iteration. + + } else { + // TODO: What if we have no default? (resCode == undefined) + // Then, we should write first char of the sequence as-is and try the rest recursively. + // Didn't do it for now because no encoding has this situation yet. + // Currently, just skip the sequence and write current char. + } + } + seqObj = undefined; + } + else if (uCode >= 0) { // Regular character + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== undefined) + dbcsCode = subtable[uCode & 0xFF]; + + if (dbcsCode <= SEQ_START) { // Sequence start + seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; + continue; + } + + if (dbcsCode == UNASSIGNED && this.gb18030) { + // Use GB18030 algorithm to find character(s) to write. + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; + newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; + newBuf[j++] = 0x30 + dbcsCode; + continue; + } + } + } + + // 3. Write dbcsCode character. + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else if (dbcsCode < 0x10000) { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + else { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = (dbcsCode >> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } + } + + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); +} + +DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === undefined) + return; // All clean. Most often case. + + var newBuf = new Buffer(10), j = 0; + + if (this.seqObj) { // We're in the sequence. + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== undefined) { // Write beginning of the sequence. + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + } else { + // See todo above. + } + this.seqObj = undefined; + } + + if (this.leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + + return newBuf.slice(0, j); +} + +// Export for testing +DBCSEncoder.prototype.findIdx = findIdx; + + +// == Decoder ================================================================== + +function DBCSDecoder(options, codec) { + // Decoder state + this.nodeIdx = 0; + this.prevBuf = new Buffer(0); + + // Static data + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; +} + +DBCSDecoder.prototype.write = function(buf) { + var newBuf = new Buffer(buf.length*2), + nodeIdx = this.nodeIdx, + prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, + seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. + uCode; + + if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. + prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); + + for (var i = 0, j = 0; i < buf.length; i++) { + var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; + + // Lookup in current trie node. + var uCode = this.decodeTables[nodeIdx][curByte]; + + if (uCode >= 0) { + // Normal character, just use it. + } + else if (uCode === UNASSIGNED) { // Unknown char. + // TODO: Callback with seq. + //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). + uCode = this.defaultCharUnicode.charCodeAt(0); + } + else if (uCode === GB18030_CODE) { + var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } + else if (uCode <= NODE_START) { // Go to next trie node. + nodeIdx = NODE_START - uCode; + continue; + } + else if (uCode <= SEQ_START) { // Output a sequence of chars. + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length-1]; + } + else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + + // Write the character to buffer, handling higher planes using surrogate pair. + if (uCode > 0xFFFF) { + uCode -= 0x10000; + var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); + newBuf[j++] = uCodeLead & 0xFF; + newBuf[j++] = uCodeLead >> 8; + + uCode = 0xDC00 + uCode % 0x400; + } + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + + // Reset trie node. + nodeIdx = 0; seqStart = i+1; + } + + this.nodeIdx = nodeIdx; + this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); + return newBuf.slice(0, j).toString('ucs2'); +} + +DBCSDecoder.prototype.end = function() { + var ret = ''; + + // Try to parse all remaining chars. + while (this.prevBuf.length > 0) { + // Skip 1 character in the buffer. + ret += this.defaultCharUnicode; + var buf = this.prevBuf.slice(1); + + // Parse remaining as usual. + this.prevBuf = new Buffer(0); + this.nodeIdx = 0; + if (buf.length > 0) + ret += this.write(buf); + } + + this.nodeIdx = 0; + return ret; +} + +// Binary search for GB18030. Returns largest i such that table[i] <= val. +function findIdx(table, val) { + if (table[0] > val) + return -1; + + var l = 0, r = table.length; + while (l < r-1) { // always table[l] <= val < table[r] + var mid = l + Math.floor((r-l+1)/2); + if (table[mid] <= val) + l = mid; + else + r = mid; + } + return l; +} + diff --git a/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/iconv-lite/encodings/dbcs-data.js new file mode 100644 index 0000000..4b61914 --- /dev/null +++ b/node_modules/iconv-lite/encodings/dbcs-data.js @@ -0,0 +1,176 @@ +"use strict"; + +// Description of supported double byte encodings and aliases. +// Tables are not require()-d until they are needed to speed up library load. +// require()-s are direct to support Browserify. + +module.exports = { + + // == Japanese/ShiftJIS ==================================================== + // All japanese encodings are based on JIS X set of standards: + // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. + // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. + // Has several variations in 1978, 1983, 1990 and 1997. + // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. + // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. + // 2 planes, first is superset of 0208, second - revised 0212. + // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + + // Byte encodings are: + // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte + // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. + // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. + // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. + // 0x00-0x7F - lower part of 0201 + // 0x8E, 0xA1-0xDF - upper part of 0201 + // (0xA1-0xFE)x2 - 0208 plane (94x94). + // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). + // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. + // Used as-is in ISO2022 family. + // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, + // 0201-1976 Roman, 0208-1978, 0208-1983. + // * ISO2022-JP-1: Adds esc seq for 0212-1990. + // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. + // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. + // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. + // + // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. + // + // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + + 'shiftjis': { + type: '_dbcs', + table: function() { return require('./tables/shiftjis.json') }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + encodeSkipVals: [{from: 0xED40, to: 0xF940}], + }, + 'csshiftjis': 'shiftjis', + 'mskanji': 'shiftjis', + 'sjis': 'shiftjis', + 'windows31j': 'shiftjis', + 'ms31j': 'shiftjis', + 'xsjis': 'shiftjis', + 'windows932': 'shiftjis', + 'ms932': 'shiftjis', + '932': 'shiftjis', + 'cp932': 'shiftjis', + + 'eucjp': { + type: '_dbcs', + table: function() { return require('./tables/eucjp.json') }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + }, + + // TODO: KDDI extension to Shift_JIS + // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. + // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + + + // == Chinese/GBK ========================================================== + // http://en.wikipedia.org/wiki/GBK + // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + + // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 + 'gb2312': 'cp936', + 'gb231280': 'cp936', + 'gb23121980': 'cp936', + 'csgb2312': 'cp936', + 'csiso58gb231280': 'cp936', + 'euccn': 'cp936', + + // Microsoft's CP936 is a subset and approximation of GBK. + 'windows936': 'cp936', + 'ms936': 'cp936', + '936': 'cp936', + 'cp936': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json') }, + }, + + // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. + 'gbk': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, + }, + 'xgbk': 'gbk', + 'isoir58': 'gbk', + + // GB18030 is an algorithmic extension of GBK. + // Main source: https://www.w3.org/TR/encoding/#gbk-encoder + // http://icu-project.org/docs/papers/gb18030.html + // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml + // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 + 'gb18030': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, + gb18030: function() { return require('./tables/gb18030-ranges.json') }, + encodeSkipVals: [0x80], + encodeAdd: {'€': 0xA2E3}, + }, + + 'chinese': 'gb18030', + + + // == Korean =============================================================== + // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. + 'windows949': 'cp949', + 'ms949': 'cp949', + '949': 'cp949', + 'cp949': { + type: '_dbcs', + table: function() { return require('./tables/cp949.json') }, + }, + + 'cseuckr': 'cp949', + 'csksc56011987': 'cp949', + 'euckr': 'cp949', + 'isoir149': 'cp949', + 'korean': 'cp949', + 'ksc56011987': 'cp949', + 'ksc56011989': 'cp949', + 'ksc5601': 'cp949', + + + // == Big5/Taiwan/Hong Kong ================================================ + // There are lots of tables for Big5 and cp950. Please see the following links for history: + // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html + // Variations, in roughly number of defined chars: + // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT + // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ + // * Big5-2003 (Taiwan standard) almost superset of cp950. + // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. + // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. + // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. + // Plus, it has 4 combining sequences. + // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 + // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. + // Implementations are not consistent within browsers; sometimes labeled as just big5. + // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. + // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 + // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. + // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt + // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt + // + // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder + // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. + + 'windows950': 'cp950', + 'ms950': 'cp950', + '950': 'cp950', + 'cp950': { + type: '_dbcs', + table: function() { return require('./tables/cp950.json') }, + }, + + // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. + 'big5': 'big5hkscs', + 'big5hkscs': { + type: '_dbcs', + table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, + encodeSkipVals: [0xa2cc], + }, + + 'cnbig5': 'big5hkscs', + 'csbig5': 'big5hkscs', + 'xxbig5': 'big5hkscs', +}; diff --git a/node_modules/iconv-lite/encodings/index.js b/node_modules/iconv-lite/encodings/index.js new file mode 100644 index 0000000..e304003 --- /dev/null +++ b/node_modules/iconv-lite/encodings/index.js @@ -0,0 +1,22 @@ +"use strict"; + +// Update this array if you add/rename/remove files in this directory. +// We support Browserify by skipping automatic module discovery and requiring modules directly. +var modules = [ + require("./internal"), + require("./utf16"), + require("./utf7"), + require("./sbcs-codec"), + require("./sbcs-data"), + require("./sbcs-data-generated"), + require("./dbcs-codec"), + require("./dbcs-data"), +]; + +// Put all encoding/alias/codec definitions to single object and export it. +for (var i = 0; i < modules.length; i++) { + var module = modules[i]; + for (var enc in module) + if (Object.prototype.hasOwnProperty.call(module, enc)) + exports[enc] = module[enc]; +} diff --git a/node_modules/iconv-lite/encodings/internal.js b/node_modules/iconv-lite/encodings/internal.js new file mode 100644 index 0000000..b0adf6a --- /dev/null +++ b/node_modules/iconv-lite/encodings/internal.js @@ -0,0 +1,188 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// Export Node.js internal encodings. + +module.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true}, + cesu8: { type: "_internal", bomAware: true}, + unicode11utf8: "utf8", + + ucs2: { type: "_internal", bomAware: true}, + utf16le: "ucs2", + + binary: { type: "_internal" }, + base64: { type: "_internal" }, + hex: { type: "_internal" }, + + // Codec. + _internal: InternalCodec, +}; + +//------------------------------------------------------------------------------ + +function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; + + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; // Use utf8 for decoding. + this.encoder = InternalEncoderCesu8; + + // Add decoder for versions of Node not supporting CESU-8 + if (new Buffer('eda0bdedb2a9', 'hex').toString() !== '💩') { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } +} + +InternalCodec.prototype.encoder = InternalEncoder; +InternalCodec.prototype.decoder = InternalDecoder; + +//------------------------------------------------------------------------------ + +// We use node.js internal decoder. Its signature is the same as ours. +var StringDecoder = require('string_decoder').StringDecoder; + +if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. + StringDecoder.prototype.end = function() {}; + + +function InternalDecoder(options, codec) { + StringDecoder.call(this, codec.enc); +} + +InternalDecoder.prototype = StringDecoder.prototype; + + +//------------------------------------------------------------------------------ +// Encoder is mostly trivial + +function InternalEncoder(options, codec) { + this.enc = codec.enc; +} + +InternalEncoder.prototype.write = function(str) { + return new Buffer(str, this.enc); +} + +InternalEncoder.prototype.end = function() { +} + + +//------------------------------------------------------------------------------ +// Except base64 encoder, which must keep its state. + +function InternalEncoderBase64(options, codec) { + this.prevStr = ''; +} + +InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - (str.length % 4); + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); + + return new Buffer(str, "base64"); +} + +InternalEncoderBase64.prototype.end = function() { + return new Buffer(this.prevStr, "base64"); +} + + +//------------------------------------------------------------------------------ +// CESU-8 encoder is also special. + +function InternalEncoderCesu8(options, codec) { +} + +InternalEncoderCesu8.prototype.write = function(str) { + var buf = new Buffer(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + // Naive implementation, but it works because CESU-8 is especially easy + // to convert from UTF-16 (which all JS strings are encoded in). + if (charCode < 0x80) + buf[bufIdx++] = charCode; + else if (charCode < 0x800) { + buf[bufIdx++] = 0xC0 + (charCode >>> 6); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + else { // charCode will always be < 0x10000 in javascript. + buf[bufIdx++] = 0xE0 + (charCode >>> 12); + buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + } + return buf.slice(0, bufIdx); +} + +InternalEncoderCesu8.prototype.end = function() { +} + +//------------------------------------------------------------------------------ +// CESU-8 decoder is not implemented in Node v4.0+ + +function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; +} + +InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, + res = ''; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 0xC0) !== 0x80) { // Leading byte + if (contBytes > 0) { // Previous code is invalid + res += this.defaultCharUnicode; + contBytes = 0; + } + + if (curByte < 0x80) { // Single-byte code + res += String.fromCharCode(curByte); + } else if (curByte < 0xE0) { // Two-byte code + acc = curByte & 0x1F; + contBytes = 1; accBytes = 1; + } else if (curByte < 0xF0) { // Three-byte code + acc = curByte & 0x0F; + contBytes = 2; accBytes = 1; + } else { // Four or more are not supported for CESU-8. + res += this.defaultCharUnicode; + } + } else { // Continuation byte + if (contBytes > 0) { // We're waiting for it. + acc = (acc << 6) | (curByte & 0x3f); + contBytes--; accBytes++; + if (contBytes === 0) { + // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) + if (accBytes === 2 && acc < 0x80 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 0x800) + res += this.defaultCharUnicode; + else + // Actually add character. + res += String.fromCharCode(acc); + } + } else { // Unexpected continuation byte + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; + return res; +} + +InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; +} diff --git a/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/iconv-lite/encodings/sbcs-codec.js new file mode 100644 index 0000000..7789e00 --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-codec.js @@ -0,0 +1,73 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that +// correspond to encoded bytes (if 128 - then lower half is ASCII). + +exports._sbcs = SBCSCodec; +function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data.") + + // Prepare char buffer for decoding. + if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) + throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); + + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + + this.decodeBuf = new Buffer(codecOptions.chars, 'ucs2'); + + // Encoding buffer. + var encodeBuf = new Buffer(65536); + encodeBuf.fill(iconv.defaultCharSingleByte.charCodeAt(0)); + + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + + this.encodeBuf = encodeBuf; +} + +SBCSCodec.prototype.encoder = SBCSEncoder; +SBCSCodec.prototype.decoder = SBCSDecoder; + + +function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; +} + +SBCSEncoder.prototype.write = function(str) { + var buf = new Buffer(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + + return buf; +} + +SBCSEncoder.prototype.end = function() { +} + + +function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; +} + +SBCSDecoder.prototype.write = function(buf) { + // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. + var decodeBuf = this.decodeBuf; + var newBuf = new Buffer(buf.length*2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i]*2; idx2 = i*2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2+1] = decodeBuf[idx1+1]; + } + return newBuf.toString('ucs2'); +} + +SBCSDecoder.prototype.end = function() { +} diff --git a/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/iconv-lite/encodings/sbcs-data-generated.js new file mode 100644 index 0000000..9b48236 --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-data-generated.js @@ -0,0 +1,451 @@ +"use strict"; + +// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. +module.exports = { + "437": "cp437", + "737": "cp737", + "775": "cp775", + "850": "cp850", + "852": "cp852", + "855": "cp855", + "856": "cp856", + "857": "cp857", + "858": "cp858", + "860": "cp860", + "861": "cp861", + "862": "cp862", + "863": "cp863", + "864": "cp864", + "865": "cp865", + "866": "cp866", + "869": "cp869", + "874": "windows874", + "922": "cp922", + "1046": "cp1046", + "1124": "cp1124", + "1125": "cp1125", + "1129": "cp1129", + "1133": "cp1133", + "1161": "cp1161", + "1162": "cp1162", + "1163": "cp1163", + "1250": "windows1250", + "1251": "windows1251", + "1252": "windows1252", + "1253": "windows1253", + "1254": "windows1254", + "1255": "windows1255", + "1256": "windows1256", + "1257": "windows1257", + "1258": "windows1258", + "28591": "iso88591", + "28592": "iso88592", + "28593": "iso88593", + "28594": "iso88594", + "28595": "iso88595", + "28596": "iso88596", + "28597": "iso88597", + "28598": "iso88598", + "28599": "iso88599", + "28600": "iso885910", + "28601": "iso885911", + "28603": "iso885913", + "28604": "iso885914", + "28605": "iso885915", + "28606": "iso885916", + "windows874": { + "type": "_sbcs", + "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "win874": "windows874", + "cp874": "windows874", + "windows1250": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "win1250": "windows1250", + "cp1250": "windows1250", + "windows1251": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "win1251": "windows1251", + "cp1251": "windows1251", + "windows1252": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "win1252": "windows1252", + "cp1252": "windows1252", + "windows1253": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "win1253": "windows1253", + "cp1253": "windows1253", + "windows1254": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "win1254": "windows1254", + "cp1254": "windows1254", + "windows1255": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "win1255": "windows1255", + "cp1255": "windows1255", + "windows1256": { + "type": "_sbcs", + "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" + }, + "win1256": "windows1256", + "cp1256": "windows1256", + "windows1257": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" + }, + "win1257": "windows1257", + "cp1257": "windows1257", + "windows1258": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "win1258": "windows1258", + "cp1258": "windows1258", + "iso88591": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28591": "iso88591", + "iso88592": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "cp28592": "iso88592", + "iso88593": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" + }, + "cp28593": "iso88593", + "iso88594": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" + }, + "cp28594": "iso88594", + "iso88595": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" + }, + "cp28595": "iso88595", + "iso88596": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" + }, + "cp28596": "iso88596", + "iso88597": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "cp28597": "iso88597", + "iso88598": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "cp28598": "iso88598", + "iso88599": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "cp28599": "iso88599", + "iso885910": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" + }, + "cp28600": "iso885910", + "iso885911": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "cp28601": "iso885911", + "iso885913": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" + }, + "cp28603": "iso885913", + "iso885914": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" + }, + "cp28604": "iso885914", + "iso885915": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28605": "iso885915", + "iso885916": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" + }, + "cp28606": "iso885916", + "cp437": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm437": "cp437", + "csibm437": "cp437", + "cp737": { + "type": "_sbcs", + "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " + }, + "ibm737": "cp737", + "csibm737": "cp737", + "cp775": { + "type": "_sbcs", + "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " + }, + "ibm775": "cp775", + "csibm775": "cp775", + "cp850": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm850": "cp850", + "csibm850": "cp850", + "cp852": { + "type": "_sbcs", + "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " + }, + "ibm852": "cp852", + "csibm852": "cp852", + "cp855": { + "type": "_sbcs", + "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " + }, + "ibm855": "cp855", + "csibm855": "cp855", + "cp856": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm856": "cp856", + "csibm856": "cp856", + "cp857": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " + }, + "ibm857": "cp857", + "csibm857": "cp857", + "cp858": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm858": "cp858", + "csibm858": "cp858", + "cp860": { + "type": "_sbcs", + "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm860": "cp860", + "csibm860": "cp860", + "cp861": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm861": "cp861", + "csibm861": "cp861", + "cp862": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm862": "cp862", + "csibm862": "cp862", + "cp863": { + "type": "_sbcs", + "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm863": "cp863", + "csibm863": "cp863", + "cp864": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" + }, + "ibm864": "cp864", + "csibm864": "cp864", + "cp865": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm865": "cp865", + "csibm865": "cp865", + "cp866": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " + }, + "ibm866": "cp866", + "csibm866": "cp866", + "cp869": { + "type": "_sbcs", + "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " + }, + "ibm869": "cp869", + "csibm869": "cp869", + "cp922": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" + }, + "ibm922": "cp922", + "csibm922": "cp922", + "cp1046": { + "type": "_sbcs", + "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" + }, + "ibm1046": "cp1046", + "csibm1046": "cp1046", + "cp1124": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" + }, + "ibm1124": "cp1124", + "csibm1124": "cp1124", + "cp1125": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " + }, + "ibm1125": "cp1125", + "csibm1125": "cp1125", + "cp1129": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1129": "cp1129", + "csibm1129": "cp1129", + "cp1133": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" + }, + "ibm1133": "cp1133", + "csibm1133": "cp1133", + "cp1161": { + "type": "_sbcs", + "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " + }, + "ibm1161": "cp1161", + "csibm1161": "cp1161", + "cp1162": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "ibm1162": "cp1162", + "csibm1162": "cp1162", + "cp1163": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1163": "cp1163", + "csibm1163": "cp1163", + "maccroatian": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" + }, + "maccyrillic": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "macgreek": { + "type": "_sbcs", + "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" + }, + "maciceland": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macroman": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macromania": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macthai": { + "type": "_sbcs", + "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" + }, + "macturkish": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macukraine": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "koi8r": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8u": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8ru": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8t": { + "type": "_sbcs", + "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "armscii8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" + }, + "rk1048": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "tcvn": { + "type": "_sbcs", + "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" + }, + "georgianacademy": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "georgianps": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "pt154": { + "type": "_sbcs", + "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "viscii": { + "type": "_sbcs", + "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" + }, + "iso646cn": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "iso646jp": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "hproman8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" + }, + "macintosh": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "ascii": { + "type": "_sbcs", + "chars": "��������������������������������������������������������������������������������������������������������������������������������" + }, + "tis620": { + "type": "_sbcs", + "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + } +} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/iconv-lite/encodings/sbcs-data.js new file mode 100644 index 0000000..2d6f846 --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-data.js @@ -0,0 +1,169 @@ +"use strict"; + +// Manually added data to be used by sbcs codec in addition to generated one. + +module.exports = { + // Not supported by iconv, not sure why. + "10029": "maccenteuro", + "maccenteuro": { + "type": "_sbcs", + "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" + }, + + "808": "cp808", + "ibm808": "cp808", + "cp808": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " + }, + + // Aliases of generated encodings. + "ascii8bit": "ascii", + "usascii": "ascii", + "ansix34": "ascii", + "ansix341968": "ascii", + "ansix341986": "ascii", + "csascii": "ascii", + "cp367": "ascii", + "ibm367": "ascii", + "isoir6": "ascii", + "iso646us": "ascii", + "iso646irv": "ascii", + "us": "ascii", + + "latin1": "iso88591", + "latin2": "iso88592", + "latin3": "iso88593", + "latin4": "iso88594", + "latin5": "iso88599", + "latin6": "iso885910", + "latin7": "iso885913", + "latin8": "iso885914", + "latin9": "iso885915", + "latin10": "iso885916", + + "csisolatin1": "iso88591", + "csisolatin2": "iso88592", + "csisolatin3": "iso88593", + "csisolatin4": "iso88594", + "csisolatincyrillic": "iso88595", + "csisolatinarabic": "iso88596", + "csisolatingreek" : "iso88597", + "csisolatinhebrew": "iso88598", + "csisolatin5": "iso88599", + "csisolatin6": "iso885910", + + "l1": "iso88591", + "l2": "iso88592", + "l3": "iso88593", + "l4": "iso88594", + "l5": "iso88599", + "l6": "iso885910", + "l7": "iso885913", + "l8": "iso885914", + "l9": "iso885915", + "l10": "iso885916", + + "isoir14": "iso646jp", + "isoir57": "iso646cn", + "isoir100": "iso88591", + "isoir101": "iso88592", + "isoir109": "iso88593", + "isoir110": "iso88594", + "isoir144": "iso88595", + "isoir127": "iso88596", + "isoir126": "iso88597", + "isoir138": "iso88598", + "isoir148": "iso88599", + "isoir157": "iso885910", + "isoir166": "tis620", + "isoir179": "iso885913", + "isoir199": "iso885914", + "isoir203": "iso885915", + "isoir226": "iso885916", + + "cp819": "iso88591", + "ibm819": "iso88591", + + "cyrillic": "iso88595", + + "arabic": "iso88596", + "arabic8": "iso88596", + "ecma114": "iso88596", + "asmo708": "iso88596", + + "greek" : "iso88597", + "greek8" : "iso88597", + "ecma118" : "iso88597", + "elot928" : "iso88597", + + "hebrew": "iso88598", + "hebrew8": "iso88598", + + "turkish": "iso88599", + "turkish8": "iso88599", + + "thai": "iso885911", + "thai8": "iso885911", + + "celtic": "iso885914", + "celtic8": "iso885914", + "isoceltic": "iso885914", + + "tis6200": "tis620", + "tis62025291": "tis620", + "tis62025330": "tis620", + + "10000": "macroman", + "10006": "macgreek", + "10007": "maccyrillic", + "10079": "maciceland", + "10081": "macturkish", + + "cspc8codepage437": "cp437", + "cspc775baltic": "cp775", + "cspc850multilingual": "cp850", + "cspcp852": "cp852", + "cspc862latinhebrew": "cp862", + "cpgr": "cp869", + + "msee": "cp1250", + "mscyrl": "cp1251", + "msansi": "cp1252", + "msgreek": "cp1253", + "msturk": "cp1254", + "mshebr": "cp1255", + "msarab": "cp1256", + "winbaltrim": "cp1257", + + "cp20866": "koi8r", + "20866": "koi8r", + "ibm878": "koi8r", + "cskoi8r": "koi8r", + + "cp21866": "koi8u", + "21866": "koi8u", + "ibm1168": "koi8u", + + "strk10482002": "rk1048", + + "tcvn5712": "tcvn", + "tcvn57121": "tcvn", + + "gb198880": "iso646cn", + "cn": "iso646cn", + + "csiso14jisc6220ro": "iso646jp", + "jisc62201969ro": "iso646jp", + "jp": "iso646jp", + + "cshproman8": "hproman8", + "r8": "hproman8", + "roman8": "hproman8", + "xroman8": "hproman8", + "ibm1051": "hproman8", + + "mac": "macintosh", + "csmacintosh": "macintosh", +}; + diff --git a/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/iconv-lite/encodings/tables/big5-added.json new file mode 100644 index 0000000..3c3d3c2 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/big5-added.json @@ -0,0 +1,122 @@ +[ +["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], +["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], +["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], +["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], +["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], +["8940","𪎩𡅅"], +["8943","攊"], +["8946","丽滝鵎釟"], +["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], +["89a1","琑糼緍楆竉刧"], +["89ab","醌碸酞肼"], +["89b0","贋胶𠧧"], +["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], +["89c1","溚舾甙"], +["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], +["8a40","𧶄唥"], +["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], +["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], +["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], +["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], +["8aac","䠋𠆩㿺塳𢶍"], +["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], +["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], +["8ac9","𪘁𠸉𢫏𢳉"], +["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], +["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], +["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], +["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], +["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], +["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], +["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], +["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], +["8ca1","𣏹椙橃𣱣泿"], +["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], +["8cc9","顨杫䉶圽"], +["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], +["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], +["8d40","𠮟"], +["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], +["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], +["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], +["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], +["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], +["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], +["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], +["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], +["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], +["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], +["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], +["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], +["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], +["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], +["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], +["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], +["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], +["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], +["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], +["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], +["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], +["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], +["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], +["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], +["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], +["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], +["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], +["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], +["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], +["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], +["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], +["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], +["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], +["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], +["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], +["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], +["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], +["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], +["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], +["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], +["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], +["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], +["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], +["9fae","酙隁酜"], +["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], +["9fc1","𤤙盖鮝个𠳔莾衂"], +["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], +["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], +["9fe7","毺蠘罸"], +["9feb","嘠𪙊蹷齓"], +["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], +["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], +["a055","𡠻𦸅"], +["a058","詾𢔛"], +["a05b","惽癧髗鵄鍮鮏蟵"], +["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], +["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], +["a0a1","嵗𨯂迚𨸹"], +["a0a6","僙𡵆礆匲阸𠼻䁥"], +["a0ae","矾"], +["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], +["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], +["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], +["a3c0","␀",31,"␡"], +["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], +["c740","す",58,"ァアィイ"], +["c7a1","ゥ",81,"А",5,"ЁЖ",4], +["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], +["c8a1","龰冈龱𧘇"], +["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], +["c8f5","ʃɐɛɔɵœøŋʊɪ"], +["f9fe","■"], +["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], +["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], +["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], +["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], +["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], +["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], +["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], +["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], +["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], +["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/iconv-lite/encodings/tables/cp936.json new file mode 100644 index 0000000..49ddb9a --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp936.json @@ -0,0 +1,264 @@ +[ +["0","\u0000",127,"€"], +["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], +["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], +["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], +["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], +["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], +["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], +["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], +["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], +["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], +["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], +["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], +["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], +["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], +["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], +["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], +["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], +["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], +["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], +["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], +["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], +["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], +["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], +["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], +["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], +["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], +["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], +["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], +["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], +["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], +["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], +["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], +["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], +["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], +["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], +["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], +["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], +["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], +["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], +["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], +["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], +["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], +["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], +["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], +["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], +["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], +["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], +["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], +["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], +["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], +["9980","檧檨檪檭",114,"欥欦欨",6], +["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], +["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], +["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], +["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], +["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], +["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], +["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], +["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], +["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], +["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], +["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], +["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], +["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], +["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], +["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], +["a2a1","ⅰ",9], +["a2b1","⒈",19,"⑴",19,"①",9], +["a2e5","㈠",9], +["a2f1","Ⅰ",11], +["a3a1","!"#¥%",88," ̄"], +["a4a1","ぁ",82], +["a5a1","ァ",85], +["a6a1","Α",16,"Σ",6], +["a6c1","α",16,"σ",6], +["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], +["a6ee","︻︼︷︸︱"], +["a6f4","︳︴"], +["a7a1","А",5,"ЁЖ",25], +["a7d1","а",5,"ёж",25], +["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], +["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], +["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], +["a8bd","ńň"], +["a8c0","ɡ"], +["a8c5","ㄅ",36], +["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], +["a959","℡㈱"], +["a95c","‐"], +["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], +["a980","﹢",4,"﹨﹩﹪﹫"], +["a996","〇"], +["a9a4","─",75], +["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], +["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], +["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], +["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], +["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], +["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], +["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], +["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], +["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], +["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], +["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], +["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], +["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], +["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], +["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], +["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], +["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], +["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], +["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], +["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], +["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], +["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], +["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], +["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], +["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], +["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], +["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], +["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], +["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], +["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], +["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], +["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], +["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], +["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], +["bb40","籃",9,"籎",36,"籵",5,"籾",9], +["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], +["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], +["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], +["bd40","紷",54,"絯",7], +["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], +["be40","継",12,"綧",6,"綯",42], +["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], +["bf40","緻",62], +["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], +["c040","繞",35,"纃",23,"纜纝纞"], +["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], +["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], +["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], +["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], +["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], +["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], +["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], +["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], +["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], +["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], +["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], +["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], +["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], +["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], +["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], +["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], +["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], +["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], +["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], +["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], +["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], +["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], +["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], +["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], +["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], +["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], +["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], +["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], +["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], +["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], +["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], +["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], +["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], +["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], +["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], +["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], +["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], +["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], +["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], +["d440","訞",31,"訿",8,"詉",21], +["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], +["d540","誁",7,"誋",7,"誔",46], +["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], +["d640","諤",34,"謈",27], +["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], +["d740","譆",31,"譧",4,"譭",25], +["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], +["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], +["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], +["d940","貮",62], +["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], +["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], +["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], +["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], +["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], +["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], +["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], +["dd40","軥",62], +["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], +["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], +["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], +["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], +["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], +["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], +["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], +["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], +["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], +["e240","釦",62], +["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], +["e340","鉆",45,"鉵",16], +["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], +["e440","銨",5,"銯",24,"鋉",31], +["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], +["e540","錊",51,"錿",10], +["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], +["e640","鍬",34,"鎐",27], +["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], +["e740","鏎",7,"鏗",54], +["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], +["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], +["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], +["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], +["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], +["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], +["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], +["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], +["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], +["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], +["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], +["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], +["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], +["ee40","頏",62], +["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], +["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], +["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], +["f040","餈",4,"餎餏餑",28,"餯",26], +["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], +["f140","馌馎馚",10,"馦馧馩",47], +["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], +["f240","駺",62], +["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], +["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], +["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], +["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], +["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], +["f540","魼",62], +["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], +["f640","鯜",62], +["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], +["f740","鰼",62], +["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], +["f840","鳣",62], +["f880","鴢",32], +["f940","鵃",62], +["f980","鶂",32], +["fa40","鶣",62], +["fa80","鷢",32], +["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], +["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], +["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], +["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], +["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], +["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], +["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/iconv-lite/encodings/tables/cp949.json new file mode 100644 index 0000000..2022a00 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp949.json @@ -0,0 +1,273 @@ +[ +["0","\u0000",127], +["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], +["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], +["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], +["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], +["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], +["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], +["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], +["8361","긝",18,"긲긳긵긶긹긻긼"], +["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], +["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], +["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], +["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], +["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], +["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], +["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], +["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], +["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], +["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], +["8741","놞",9,"놩",15], +["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], +["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], +["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], +["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], +["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], +["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], +["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], +["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], +["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], +["8a61","둧",4,"둭",18,"뒁뒂"], +["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], +["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], +["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], +["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], +["8c41","똀",15,"똒똓똕똖똗똙",4], +["8c61","똞",6,"똦",5,"똭",6,"똵",5], +["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], +["8d41","뛃",16,"뛕",8], +["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], +["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], +["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], +["8e61","럂",4,"럈럊",19], +["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], +["8f41","뢅",7,"뢎",17], +["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], +["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], +["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], +["9061","륾",5,"릆릈릋릌릏",15], +["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], +["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], +["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], +["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], +["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], +["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], +["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], +["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], +["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], +["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], +["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], +["9461","봞",5,"봥",6,"봭",12], +["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], +["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], +["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], +["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], +["9641","뺸",23,"뻒뻓"], +["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], +["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], +["9741","뾃",16,"뾕",8], +["9761","뾞",17,"뾱",7], +["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], +["9841","쁀",16,"쁒",5,"쁙쁚쁛"], +["9861","쁝쁞쁟쁡",6,"쁪",15], +["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], +["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], +["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], +["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], +["9a41","숤숥숦숧숪숬숮숰숳숵",16], +["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], +["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], +["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], +["9b61","쌳",17,"썆",7], +["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], +["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], +["9c61","쏿",8,"쐉",6,"쐑",9], +["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], +["9d41","쒪",13,"쒹쒺쒻쒽",8], +["9d61","쓆",25], +["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], +["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], +["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], +["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], +["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], +["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], +["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], +["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], +["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], +["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], +["a141","좥좦좧좩",18,"좾좿죀죁"], +["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], +["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], +["a241","줐줒",5,"줙",18], +["a261","줭",6,"줵",18], +["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], +["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], +["a361","즑",6,"즚즜즞",16], +["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], +["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], +["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], +["a481","쨦쨧쨨쨪",28,"ㄱ",93], +["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], +["a561","쩫",17,"쩾",5,"쪅쪆"], +["a581","쪇",16,"쪙",14,"ⅰ",9], +["a5b0","Ⅰ",9], +["a5c1","Α",16,"Σ",6], +["a5e1","α",16,"σ",6], +["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], +["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], +["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], +["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], +["a761","쬪",22,"쭂쭃쭄"], +["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], +["a841","쭭",10,"쭺",14], +["a861","쮉",18,"쮝",6], +["a881","쮤",19,"쮹",11,"ÆЪĦ"], +["a8a6","IJ"], +["a8a8","ĿŁØŒºÞŦŊ"], +["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], +["a941","쯅",14,"쯕",10], +["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], +["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], +["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], +["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], +["aa81","챳챴챶",29,"ぁ",82], +["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], +["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], +["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], +["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], +["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], +["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], +["acd1","а",5,"ёж",25], +["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], +["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], +["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], +["ae41","췆",5,"췍췎췏췑",16], +["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], +["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], +["af41","츬츭츮츯츲츴츶",19], +["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], +["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], +["b041","캚",5,"캢캦",5,"캮",12], +["b061","캻",5,"컂",19], +["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], +["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], +["b161","켥",6,"켮켲",5,"켹",11], +["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], +["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], +["b261","쾎",18,"쾢",5,"쾩"], +["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], +["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], +["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], +["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], +["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], +["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], +["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], +["b541","킕",14,"킦킧킩킪킫킭",5], +["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], +["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], +["b641","턅",7,"턎",17], +["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], +["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], +["b741","텮",13,"텽",6,"톅톆톇톉톊"], +["b761","톋",20,"톢톣톥톦톧"], +["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], +["b841","퇐",7,"퇙",17], +["b861","퇫",8,"퇵퇶퇷퇹",13], +["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], +["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], +["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], +["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], +["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], +["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], +["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], +["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], +["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], +["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], +["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], +["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], +["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], +["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], +["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], +["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], +["be41","퐸",7,"푁푂푃푅",14], +["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], +["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], +["bf41","풞",10,"풪",14], +["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], +["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], +["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], +["c061","픞",25], +["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], +["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], +["c161","햌햍햎햏햑",19,"햦햧"], +["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], +["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], +["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], +["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], +["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], +["c361","홢",4,"홨홪",5,"홲홳홵",11], +["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], +["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], +["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], +["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], +["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], +["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], +["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], +["c641","힍힎힏힑",6,"힚힜힞",5], +["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], +["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], +["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], +["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], +["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], +["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], +["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], +["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], +["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], +["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], +["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], +["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], +["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], +["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], +["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], +["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], +["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], +["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], +["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], +["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], +["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], +["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], +["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], +["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], +["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], +["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], +["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], +["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], +["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], +["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], +["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], +["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], +["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], +["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], +["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], +["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], +["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], +["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], +["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], +["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], +["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], +["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], +["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], +["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], +["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], +["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], +["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], +["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], +["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], +["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], +["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], +["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], +["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], +["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], +["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/iconv-lite/encodings/tables/cp950.json new file mode 100644 index 0000000..d8bc871 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp950.json @@ -0,0 +1,177 @@ +[ +["0","\u0000",127], +["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], +["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], +["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], +["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], +["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], +["a3a1","ㄐ",25,"˙ˉˊˇˋ"], +["a3e1","€"], +["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], +["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], +["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], +["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], +["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], +["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], +["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], +["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], +["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], +["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], +["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], +["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], +["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], +["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], +["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], +["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], +["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], +["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], +["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], +["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], +["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], +["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], +["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], +["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], +["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], +["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], +["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], +["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], +["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], +["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], +["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], +["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], +["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], +["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], +["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], +["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], +["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], +["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], +["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], +["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], +["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], +["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], +["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], +["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], +["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], +["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], +["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], +["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], +["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], +["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], +["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], +["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], +["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], +["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], +["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], +["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], +["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], +["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], +["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], +["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], +["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], +["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], +["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], +["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], +["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], +["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], +["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], +["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], +["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], +["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], +["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], +["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], +["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], +["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], +["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], +["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], +["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], +["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], +["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], +["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], +["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], +["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], +["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], +["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], +["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], +["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], +["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], +["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], +["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], +["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], +["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], +["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], +["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], +["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], +["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], +["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], +["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], +["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], +["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], +["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], +["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], +["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], +["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], +["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], +["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], +["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], +["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], +["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], +["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], +["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], +["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], +["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], +["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], +["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], +["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], +["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], +["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], +["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], +["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], +["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], +["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], +["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], +["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], +["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], +["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], +["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], +["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], +["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], +["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], +["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], +["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], +["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], +["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], +["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], +["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], +["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], +["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], +["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], +["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], +["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], +["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], +["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], +["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], +["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], +["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], +["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], +["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], +["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], +["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], +["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], +["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], +["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], +["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], +["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], +["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], +["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], +["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], +["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], +["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], +["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], +["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], +["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], +["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], +["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], +["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], +["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], +["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] +] diff --git a/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/iconv-lite/encodings/tables/eucjp.json new file mode 100644 index 0000000..4fa61ca --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/eucjp.json @@ -0,0 +1,182 @@ +[ +["0","\u0000",127], +["8ea1","。",62], +["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], +["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], +["a2ba","∈∋⊆⊇⊂⊃∪∩"], +["a2ca","∧∨¬⇒⇔∀∃"], +["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], +["a2f2","ʼn♯♭♪†‡¶"], +["a2fe","◯"], +["a3b0","0",9], +["a3c1","A",25], +["a3e1","a",25], +["a4a1","ぁ",82], +["a5a1","ァ",85], +["a6a1","Α",16,"Σ",6], +["a6c1","α",16,"σ",6], +["a7a1","А",5,"ЁЖ",25], +["a7d1","а",5,"ёж",25], +["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], +["ada1","①",19,"Ⅰ",9], +["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], +["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], +["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], +["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], +["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], +["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], +["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], +["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], +["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], +["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], +["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], +["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], +["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], +["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], +["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], +["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], +["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], +["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], +["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], +["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], +["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], +["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], +["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], +["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], +["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], +["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], +["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], +["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], +["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], +["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], +["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], +["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], +["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], +["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], +["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], +["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], +["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], +["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], +["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], +["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], +["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], +["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], +["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], +["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], +["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], +["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], +["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], +["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], +["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], +["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], +["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], +["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], +["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], +["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], +["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], +["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], +["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], +["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], +["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], +["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], +["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], +["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], +["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], +["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], +["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], +["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], +["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], +["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], +["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], +["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], +["f4a1","堯槇遙瑤凜熙"], +["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], +["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], +["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], +["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], +["fcf1","ⅰ",9,"¬¦'""], +["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], +["8fa2c2","¡¦¿"], +["8fa2eb","ºª©®™¤№"], +["8fa6e1","ΆΈΉΊΪ"], +["8fa6e7","Ό"], +["8fa6e9","ΎΫ"], +["8fa6ec","Ώ"], +["8fa6f1","άέήίϊΐόςύϋΰώ"], +["8fa7c2","Ђ",10,"ЎЏ"], +["8fa7f2","ђ",10,"ўџ"], +["8fa9a1","ÆĐ"], +["8fa9a4","Ħ"], +["8fa9a6","IJ"], +["8fa9a8","ŁĿ"], +["8fa9ab","ŊØŒ"], +["8fa9af","ŦÞ"], +["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], +["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], +["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], +["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], +["8fabbd","ġĥíìïîǐ"], +["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], +["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], +["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], +["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], +["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], +["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], +["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], +["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], +["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], +["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], +["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], +["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], +["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], +["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], +["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], +["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], +["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], +["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], +["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], +["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], +["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], +["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], +["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], +["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], +["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], +["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], +["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], +["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], +["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], +["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], +["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], +["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], +["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], +["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], +["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], +["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], +["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], +["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], +["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], +["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], +["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], +["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], +["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], +["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], +["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], +["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], +["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], +["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], +["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], +["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], +["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], +["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], +["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], +["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], +["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], +["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], +["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], +["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], +["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], +["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], +["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], +["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], +["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] +] diff --git a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json new file mode 100644 index 0000000..85c6934 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json @@ -0,0 +1 @@ +{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/iconv-lite/encodings/tables/gbk-added.json new file mode 100644 index 0000000..8abfa9f --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/gbk-added.json @@ -0,0 +1,55 @@ +[ +["a140","",62], +["a180","",32], +["a240","",62], +["a280","",32], +["a2ab","",5], +["a2e3","€"], +["a2ef",""], +["a2fd",""], +["a340","",62], +["a380","",31," "], +["a440","",62], +["a480","",32], +["a4f4","",10], +["a540","",62], +["a580","",32], +["a5f7","",7], +["a640","",62], +["a680","",32], +["a6b9","",7], +["a6d9","",6], +["a6ec",""], +["a6f3",""], +["a6f6","",8], +["a740","",62], +["a780","",32], +["a7c2","",14], +["a7f2","",12], +["a896","",10], +["a8bc",""], +["a8bf","ǹ"], +["a8c1",""], +["a8ea","",20], +["a958",""], +["a95b",""], +["a95d",""], +["a989","〾⿰",11], +["a997","",12], +["a9f0","",14], +["aaa1","",93], +["aba1","",93], +["aca1","",93], +["ada1","",93], +["aea1","",93], +["afa1","",93], +["d7fa","",4], +["f8a1","",93], +["f9a1","",93], +["faa1","",93], +["fba1","",93], +["fca1","",93], +["fda1","",93], +["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], +["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93] +] diff --git a/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/iconv-lite/encodings/tables/shiftjis.json new file mode 100644 index 0000000..5a3a43c --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/shiftjis.json @@ -0,0 +1,125 @@ +[ +["0","\u0000",128], +["a1","。",62], +["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], +["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], +["81b8","∈∋⊆⊇⊂⊃∪∩"], +["81c8","∧∨¬⇒⇔∀∃"], +["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], +["81f0","ʼn♯♭♪†‡¶"], +["81fc","◯"], +["824f","0",9], +["8260","A",25], +["8281","a",25], +["829f","ぁ",82], +["8340","ァ",62], +["8380","ム",22], +["839f","Α",16,"Σ",6], +["83bf","α",16,"σ",6], +["8440","А",5,"ЁЖ",25], +["8470","а",5,"ёж",7], +["8480","о",17], +["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], +["8740","①",19,"Ⅰ",9], +["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], +["877e","㍻"], +["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], +["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], +["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], +["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], +["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], +["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], +["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], +["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], +["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], +["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], +["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], +["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], +["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], +["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], +["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], +["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], +["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], +["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], +["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], +["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], +["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], +["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], +["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], +["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], +["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], +["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], +["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], +["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], +["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], +["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], +["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], +["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], +["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], +["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], +["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], +["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], +["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], +["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], +["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], +["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], +["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], +["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], +["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], +["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], +["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], +["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], +["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], +["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], +["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], +["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], +["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], +["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], +["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], +["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], +["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], +["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], +["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], +["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], +["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], +["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], +["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], +["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], +["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], +["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], +["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], +["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], +["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], +["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], +["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], +["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], +["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], +["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], +["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], +["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], +["eeef","ⅰ",9,"¬¦'""], +["f040","",62], +["f080","",124], +["f140","",62], +["f180","",124], +["f240","",62], +["f280","",124], +["f340","",62], +["f380","",124], +["f440","",62], +["f480","",124], +["f540","",62], +["f580","",124], +["f640","",62], +["f680","",124], +["f740","",62], +["f780","",124], +["f840","",62], +["f880","",124], +["f940",""], +["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], +["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], +["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], +["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], +["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] +] diff --git a/node_modules/iconv-lite/encodings/utf16.js b/node_modules/iconv-lite/encodings/utf16.js new file mode 100644 index 0000000..7e8f159 --- /dev/null +++ b/node_modules/iconv-lite/encodings/utf16.js @@ -0,0 +1,177 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js + +// == UTF16-BE codec. ========================================================== + +exports.utf16be = Utf16BECodec; +function Utf16BECodec() { +} + +Utf16BECodec.prototype.encoder = Utf16BEEncoder; +Utf16BECodec.prototype.decoder = Utf16BEDecoder; +Utf16BECodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf16BEEncoder() { +} + +Utf16BEEncoder.prototype.write = function(str) { + var buf = new Buffer(str, 'ucs2'); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; + } + return buf; +} + +Utf16BEEncoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf16BEDecoder() { + this.overflowByte = -1; +} + +Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ''; + + var buf2 = new Buffer(buf.length + 1), + i = 0, j = 0; + + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; j = 2; + } + + for (; i < buf.length-1; i += 2, j+= 2) { + buf2[j] = buf[i+1]; + buf2[j+1] = buf[i]; + } + + this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; + + return buf2.slice(0, j).toString('ucs2'); +} + +Utf16BEDecoder.prototype.end = function() { +} + + +// == UTF-16 codec ============================================================= +// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. +// Defaults to UTF-16LE, as it's prevalent and default in Node. +// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le +// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); + +// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). + +exports.utf16 = Utf16Codec; +function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; +} + +Utf16Codec.prototype.encoder = Utf16Encoder; +Utf16Codec.prototype.decoder = Utf16Decoder; + + +// -- Encoding (pass-through) + +function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === undefined) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder('utf-16le', options); +} + +Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); +} + +Utf16Encoder.prototype.end = function() { + return this.encoder.end(); +} + + +// -- Decoding + +function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBytes = []; + this.initialBytesLen = 0; + + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBytes.push(buf); + this.initialBytesLen += buf.length; + + if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + this.initialBytes.length = this.initialBytesLen = 0; + } + + return this.decoder.write(buf); +} + +Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var res = this.decoder.write(buf), + trail = this.decoder.end(); + + return trail ? (res + trail) : res; + } + return this.decoder.end(); +} + +function detectEncoding(buf, defaultEncoding) { + var enc = defaultEncoding || 'utf-16le'; + + if (buf.length >= 2) { + // Check BOM. + if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM + enc = 'utf-16be'; + else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM + enc = 'utf-16le'; + else { + // No BOM found. Try to deduce encoding from initial content. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions + _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. + + for (var i = 0; i < _len; i += 2) { + if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; + if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; + } + + if (asciiCharsBE > asciiCharsLE) + enc = 'utf-16be'; + else if (asciiCharsBE < asciiCharsLE) + enc = 'utf-16le'; + } + } + + return enc; +} + + diff --git a/node_modules/iconv-lite/encodings/utf7.js b/node_modules/iconv-lite/encodings/utf7.js new file mode 100644 index 0000000..19b7194 --- /dev/null +++ b/node_modules/iconv-lite/encodings/utf7.js @@ -0,0 +1,290 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 +// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 + +exports.utf7 = Utf7Codec; +exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 +function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7Codec.prototype.encoder = Utf7Encoder; +Utf7Codec.prototype.decoder = Utf7Decoder; +Utf7Codec.prototype.bomAware = true; + + +// -- Encoding + +var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + +function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; +} + +Utf7Encoder.prototype.write = function(str) { + // Naive implementation. + // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". + return new Buffer(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === '+' ? '' : + this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + + "-"; + }.bind(this))); +} + +Utf7Encoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64Regex = /[A-Za-z0-9\/+]/; +var base64Chars = []; +for (var i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + +var plusChar = '+'.charCodeAt(0), + minusChar = '-'.charCodeAt(0), + andChar = '&'.charCodeAt(0); + +Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '+' + if (buf[i] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64Chars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" + res += "+"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString(); + res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus is absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString(); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + +// UTF-7-IMAP codec. +// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) +// Differences: +// * Base64 part is started by "&" instead of "+" +// * Direct characters are 0x20-0x7E, except "&" (0x26) +// * In Base64, "," is used instead of "/" +// * Base64 must not be used to represent direct characters. +// * No implicit shift back from Base64 (should always end with '-') +// * String must end in non-shifted position. +// * "-&" while in base64 is not allowed. + + +exports.utf7imap = Utf7IMAPCodec; +function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; +Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; +Utf7IMAPCodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = new Buffer(6); + this.base64AccumIdx = 0; +} + +Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, + base64Accum = this.base64Accum, + base64AccumIdx = this.base64AccumIdx, + buf = new Buffer(str.length*5 + 10), bufIdx = 0; + + for (var i = 0; i < str.length; i++) { + var uChar = str.charCodeAt(i); + if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + inBase64 = false; + } + + if (!inBase64) { + buf[bufIdx++] = uChar; // Write direct character + + if (uChar === andChar) // Ampersand -> '&-' + buf[bufIdx++] = minusChar; + } + + } else { // Non-direct character + if (!inBase64) { + buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 0xFF; + + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); + base64AccumIdx = 0; + } + } + } + } + + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + + return buf.slice(0, bufIdx); +} + +Utf7IMAPEncoder.prototype.end = function() { + var buf = new Buffer(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + this.base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + this.inBase64 = false; + } + + return buf.slice(0, bufIdx); +} + + +// -- Decoding + +function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64IMAPChars = base64Chars.slice(); +base64IMAPChars[','.charCodeAt(0)] = true; + +Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '&' + if (buf[i] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64IMAPChars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" + res += "&"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); + res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus may be absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + diff --git a/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/iconv-lite/lib/bom-handling.js new file mode 100644 index 0000000..1050872 --- /dev/null +++ b/node_modules/iconv-lite/lib/bom-handling.js @@ -0,0 +1,52 @@ +"use strict"; + +var BOMChar = '\uFEFF'; + +exports.PrependBOM = PrependBOMWrapper +function PrependBOMWrapper(encoder, options) { + this.encoder = encoder; + this.addBOM = true; +} + +PrependBOMWrapper.prototype.write = function(str) { + if (this.addBOM) { + str = BOMChar + str; + this.addBOM = false; + } + + return this.encoder.write(str); +} + +PrependBOMWrapper.prototype.end = function() { + return this.encoder.end(); +} + + +//------------------------------------------------------------------------------ + +exports.StripBOM = StripBOMWrapper; +function StripBOMWrapper(decoder, options) { + this.decoder = decoder; + this.pass = false; + this.options = options || {}; +} + +StripBOMWrapper.prototype.write = function(buf) { + var res = this.decoder.write(buf); + if (this.pass || !res) + return res; + + if (res[0] === BOMChar) { + res = res.slice(1); + if (typeof this.options.stripBOM === 'function') + this.options.stripBOM(); + } + + this.pass = true; + return res; +} + +StripBOMWrapper.prototype.end = function() { + return this.decoder.end(); +} + diff --git a/node_modules/iconv-lite/lib/extend-node.js b/node_modules/iconv-lite/lib/extend-node.js new file mode 100644 index 0000000..a120400 --- /dev/null +++ b/node_modules/iconv-lite/lib/extend-node.js @@ -0,0 +1,215 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// == Extend Node primitives to use iconv-lite ================================= + +module.exports = function (iconv) { + var original = undefined; // Place to keep original methods. + + // Node authors rewrote Buffer internals to make it compatible with + // Uint8Array and we cannot patch key functions since then. + iconv.supportsNodeEncodingsExtension = !(new Buffer(0) instanceof Uint8Array); + + iconv.extendNodeEncodings = function extendNodeEncodings() { + if (original) return; + original = {}; + + if (!iconv.supportsNodeEncodingsExtension) { + console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); + console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); + return; + } + + var nodeNativeEncodings = { + 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, + 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, + }; + + Buffer.isNativeEncoding = function(enc) { + return enc && nodeNativeEncodings[enc.toLowerCase()]; + } + + // -- SlowBuffer ----------------------------------------------------------- + var SlowBuffer = require('buffer').SlowBuffer; + + original.SlowBufferToString = SlowBuffer.prototype.toString; + SlowBuffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.SlowBufferWrite = SlowBuffer.prototype.write; + SlowBuffer.prototype.write = function(string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferWrite.call(this, string, offset, length, encoding); + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + } + + // -- Buffer --------------------------------------------------------------- + + original.BufferIsEncoding = Buffer.isEncoding; + Buffer.isEncoding = function(encoding) { + return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); + } + + original.BufferByteLength = Buffer.byteLength; + Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferByteLength.call(this, str, encoding); + + // Slow, I know, but we don't have a better way yet. + return iconv.encode(str, encoding).length; + } + + original.BufferToString = Buffer.prototype.toString; + Buffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.BufferWrite = Buffer.prototype.write; + Buffer.prototype.write = function(string, offset, length, encoding) { + var _offset = offset, _length = length, _encoding = encoding; + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferWrite.call(this, string, _offset, _length, _encoding); + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + + // TODO: Set _charsWritten. + } + + + // -- Readable ------------------------------------------------------------- + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + original.ReadableSetEncoding = Readable.prototype.setEncoding; + Readable.prototype.setEncoding = function setEncoding(enc, options) { + // Use our own decoder, it has the same interface. + // We cannot use original function as it doesn't handle BOM-s. + this._readableState.decoder = iconv.getDecoder(enc, options); + this._readableState.encoding = enc; + } + + Readable.prototype.collect = iconv._collect; + } + } + + // Remove iconv-lite Node primitive extensions. + iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { + if (!iconv.supportsNodeEncodingsExtension) + return; + if (!original) + throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") + + delete Buffer.isNativeEncoding; + + var SlowBuffer = require('buffer').SlowBuffer; + + SlowBuffer.prototype.toString = original.SlowBufferToString; + SlowBuffer.prototype.write = original.SlowBufferWrite; + + Buffer.isEncoding = original.BufferIsEncoding; + Buffer.byteLength = original.BufferByteLength; + Buffer.prototype.toString = original.BufferToString; + Buffer.prototype.write = original.BufferWrite; + + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + Readable.prototype.setEncoding = original.ReadableSetEncoding; + delete Readable.prototype.collect; + } + + original = undefined; + } +} diff --git a/node_modules/iconv-lite/lib/index.d.ts b/node_modules/iconv-lite/lib/index.d.ts new file mode 100644 index 0000000..b9c8361 --- /dev/null +++ b/node_modules/iconv-lite/lib/index.d.ts @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + * REQUIREMENT: This definition is dependent on the @types/node definition. + * Install with `npm install @types/node --save-dev` + *--------------------------------------------------------------------------------------------*/ + +declare module 'iconv-lite' { + export function decode(buffer: NodeBuffer, encoding: string, options?: Options): string; + + export function encode(content: string, encoding: string, options?: Options): NodeBuffer; + + export function encodingExists(encoding: string): boolean; + + export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; + + export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; +} + +export interface Options { + stripBOM?: boolean; + addBOM?: boolean; + defaultEncoding?: string; +} diff --git a/node_modules/iconv-lite/lib/index.js b/node_modules/iconv-lite/lib/index.js new file mode 100644 index 0000000..9a52472 --- /dev/null +++ b/node_modules/iconv-lite/lib/index.js @@ -0,0 +1,148 @@ +"use strict"; + +// Some environments don't have global Buffer (e.g. React Native). +// Solution would be installing npm modules "buffer" and "stream" explicitly. +var Buffer = require("buffer").Buffer; + +var bomHandling = require("./bom-handling"), + iconv = module.exports; + +// All codecs and aliases are kept here, keyed by encoding name/alias. +// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. +iconv.encodings = null; + +// Characters emitted in case of error. +iconv.defaultCharUnicode = '�'; +iconv.defaultCharSingleByte = '?'; + +// Public API. +iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); // Ensure string. + + var encoder = iconv.getEncoder(encoding, options); + + var res = encoder.write(str); + var trail = encoder.end(); + + return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; +} + +iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === 'string') { + if (!iconv.skipDecodeWarning) { + console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); + iconv.skipDecodeWarning = true; + } + + buf = new Buffer("" + (buf || ""), "binary"); // Ensure buffer. + } + + var decoder = iconv.getDecoder(encoding, options); + + var res = decoder.write(buf); + var trail = decoder.end(); + + return trail ? (res + trail) : res; +} + +iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; + } +} + +// Legacy aliases to convert functions +iconv.toEncoding = iconv.encode; +iconv.fromEncoding = iconv.decode; + +// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. +iconv._codecDataCache = {}; +iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) + iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. + + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + var enc = (''+encoding).toLowerCase().replace(/[^0-9a-z]|:\d{4}$/g, ""); + + // Traverse iconv.encodings to find actual codec. + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; + + var codecDef = iconv.encodings[enc]; + + switch (typeof codecDef) { + case "string": // Direct alias to other encoding. + enc = codecDef; + break; + + case "object": // Alias with options. Can be layered. + for (var key in codecDef) + codecOptions[key] = codecDef[key]; + + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + enc = codecDef.type; + break; + + case "function": // Codec itself. + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + // The codec function must load all tables and return object with .encoder and .decoder methods. + // It'll be called only once (for each different options object). + codec = new codecDef(codecOptions, iconv); + + iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. + return codec; + + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + } + } +} + +iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), + encoder = new codec.encoder(options, codec); + + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + + return encoder; +} + +iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), + decoder = new codec.decoder(options, codec); + + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); + + return decoder; +} + + +// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. +var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; +if (nodeVer) { + + // Load streaming support in Node v0.10+ + var nodeVerArr = nodeVer.split(".").map(Number); + if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { + require("./streams")(iconv); + } + + // Load Node primitive extensions. + require("./extend-node")(iconv); +} + +if ("Ā" != "\u0100") { + console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); +} diff --git a/node_modules/iconv-lite/lib/streams.js b/node_modules/iconv-lite/lib/streams.js new file mode 100644 index 0000000..4409552 --- /dev/null +++ b/node_modules/iconv-lite/lib/streams.js @@ -0,0 +1,121 @@ +"use strict"; + +var Buffer = require("buffer").Buffer, + Transform = require("stream").Transform; + + +// == Exports ================================================================== +module.exports = function(iconv) { + + // Additional Public API. + iconv.encodeStream = function encodeStream(encoding, options) { + return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + } + + iconv.decodeStream = function decodeStream(encoding, options) { + return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + } + + iconv.supportsStreams = true; + + + // Not published yet. + iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; + iconv._collect = IconvLiteDecoderStream.prototype.collect; +}; + + +// == Encoder stream ======================================================= +function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; // We accept only strings, so we don't need to decode them. + Transform.call(this, options); +} + +IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } +}); + +IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != 'string') + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on('error', cb); + this.on('data', function(chunk) { chunks.push(chunk); }); + this.on('end', function() { + cb(null, Buffer.concat(chunks)); + }); + return this; +} + + +// == Decoder stream ======================================================= +function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = 'utf8'; // We output strings. + Transform.call(this, options); +} + +IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } +}); + +IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer.isBuffer(chunk)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ''; + this.on('error', cb); + this.on('data', function(chunk) { res += chunk; }); + this.on('end', function() { + cb(null, res); + }); + return this; +} + diff --git a/node_modules/iconv-lite/package.json b/node_modules/iconv-lite/package.json new file mode 100644 index 0000000..9d9c1db --- /dev/null +++ b/node_modules/iconv-lite/package.json @@ -0,0 +1,127 @@ +{ + "_args": [ + [ + "iconv-lite@0.4.19", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "iconv-lite@0.4.19", + "_id": "iconv-lite@0.4.19", + "_inBundle": false, + "_integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "_location": "/iconv-lite", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "iconv-lite@0.4.19", + "name": "iconv-lite", + "escapedName": "iconv-lite", + "rawSpec": "0.4.19", + "saveSpec": null, + "fetchSpec": "0.4.19" + }, + "_requiredBy": [ + "/body-parser", + "/raw-body" + ], + "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "_spec": "0.4.19", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Alexander Shtuchkin", + "email": "ashtuchkin@gmail.com" + }, + "browser": { + "./extend-node": false, + "./streams": false + }, + "bugs": { + "url": "https://github.com/ashtuchkin/iconv-lite/issues" + }, + "contributors": [ + { + "name": "Jinwu Zhan", + "url": "https://github.com/jenkinv" + }, + { + "name": "Adamansky Anton", + "url": "https://github.com/adamansky" + }, + { + "name": "George Stagas", + "url": "https://github.com/stagas" + }, + { + "name": "Mike D Pilsbury", + "url": "https://github.com/pekim" + }, + { + "name": "Niggler", + "url": "https://github.com/Niggler" + }, + { + "name": "wychi", + "url": "https://github.com/wychi" + }, + { + "name": "David Kuo", + "url": "https://github.com/david50407" + }, + { + "name": "ChangZhuo Chen", + "url": "https://github.com/czchen" + }, + { + "name": "Lee Treveil", + "url": "https://github.com/leetreveil" + }, + { + "name": "Brian White", + "url": "https://github.com/mscdex" + }, + { + "name": "Mithgol", + "url": "https://github.com/Mithgol" + }, + { + "name": "Nazar Leush", + "url": "https://github.com/nleush" + } + ], + "description": "Convert character encodings in pure javascript.", + "devDependencies": { + "async": "*", + "errto": "*", + "iconv": "*", + "istanbul": "*", + "mocha": "*", + "request": "*", + "semver": "*", + "unorm": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/ashtuchkin/iconv-lite", + "keywords": [ + "iconv", + "convert", + "charset", + "icu" + ], + "license": "MIT", + "main": "./lib/index.js", + "name": "iconv-lite", + "repository": { + "type": "git", + "url": "git://github.com/ashtuchkin/iconv-lite.git" + }, + "scripts": { + "coverage": "istanbul cover _mocha -- --grep .", + "coverage-open": "open coverage/lcov-report/index.html", + "test": "mocha --reporter spec --grep ." + }, + "typings": "./lib/index.d.ts", + "version": "0.4.19" +} diff --git a/node_modules/ignore-by-default/LICENSE b/node_modules/ignore-by-default/LICENSE new file mode 100644 index 0000000..ee1e367 --- /dev/null +++ b/node_modules/ignore-by-default/LICENSE @@ -0,0 +1,14 @@ +ISC License (ISC) +Copyright (c) 2016, Mark Wubben + +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/node_modules/ignore-by-default/README.md b/node_modules/ignore-by-default/README.md new file mode 100644 index 0000000..ee77191 --- /dev/null +++ b/node_modules/ignore-by-default/README.md @@ -0,0 +1,26 @@ +# ignore-by-default + +This is a package aimed at Node.js development tools. It provides a list of +directories that should probably be ignored by such tools, e.g. when watching +for file changes. + +It's used by [AVA](https://www.npmjs.com/package/ava) and +[nodemon](https://www.npmjs.com/package/nodemon). + +[Please contribute!](./CONTRIBUTING.md) + +## Installation + +``` +npm install --save ignore-by-default +``` + +## Usage + +The `ignore-by-default` module exports a `directories()` function, which will +return an array of directory names. These are the ones you should ignore. + +```js +// ['.git', '.sass_cache', …] +var ignoredDirectories = require('ignore-by-default').directories() +``` diff --git a/node_modules/ignore-by-default/index.js b/node_modules/ignore-by-default/index.js new file mode 100644 index 0000000..c65857d --- /dev/null +++ b/node_modules/ignore-by-default/index.js @@ -0,0 +1,12 @@ +'use strict' + +exports.directories = function () { + return [ + '.git', // Git repository files, see + '.nyc_output', // Temporary directory where nyc stores coverage data, see + '.sass-cache', // Cache folder for node-sass, see + 'bower_components', // Where Bower packages are installed, see + 'coverage', // Standard output directory for code coverage reports, see + 'node_modules' // Where Node modules are installed, see + ] +} diff --git a/node_modules/ignore-by-default/package.json b/node_modules/ignore-by-default/package.json new file mode 100644 index 0000000..54f4ad1 --- /dev/null +++ b/node_modules/ignore-by-default/package.json @@ -0,0 +1,62 @@ +{ + "_from": "ignore-by-default@^1.0.1", + "_id": "ignore-by-default@1.0.1", + "_inBundle": false, + "_integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "_location": "/ignore-by-default", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ignore-by-default@^1.0.1", + "name": "ignore-by-default", + "escapedName": "ignore-by-default", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/nodemon" + ], + "_resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "_shasum": "48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09", + "_spec": "ignore-by-default@^1.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/nodemon", + "author": { + "name": "Mark Wubben", + "url": "https://novemberborn.net/" + }, + "bugs": { + "url": "https://github.com/novemberborn/ignore-by-default/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A list of directories you should ignore by default", + "devDependencies": { + "figures": "^1.4.0", + "standard": "^6.0.4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/novemberborn/ignore-by-default#readme", + "keywords": [ + "ignore", + "chokidar", + "watcher", + "exclude", + "glob", + "pattern" + ], + "license": "ISC", + "main": "index.js", + "name": "ignore-by-default", + "repository": { + "type": "git", + "url": "git+https://github.com/novemberborn/ignore-by-default.git" + }, + "scripts": { + "test": "standard && node test.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/import-lazy/index.js b/node_modules/import-lazy/index.js new file mode 100644 index 0000000..307f08f --- /dev/null +++ b/node_modules/import-lazy/index.js @@ -0,0 +1,53 @@ +'use strict'; +const lazy = (mod, fn, id) => mod === undefined ? fn(id) : mod; + +module.exports = fn => { + return id => { + let mod; + + return function () { + if (arguments.length === 0) { + mod = lazy(mod, fn, id); + return mod; + } + + const ret = {}; + + [].forEach.call(arguments, prop => { + Object.defineProperty(ret, prop, { + get: () => { + mod = lazy(mod, fn, id); + if (typeof mod[prop] === 'function') { + return function () { + return mod[prop].apply(mod, arguments); + }; + } + + return mod[prop]; + } + }); + }); + + return ret; + }; + }; +}; + +module.exports.proxy = fn => { + return id => { + let mod; + + const handler = { + get: (target, property) => { + mod = lazy(mod, fn, id); + return Reflect.get(mod, property); + }, + apply: (target, thisArg, argumentsList) => { + mod = lazy(mod, fn, id); + return Reflect.apply(mod, thisArg, argumentsList); + } + }; + + return new Proxy(() => {}, handler); + }; +}; diff --git a/node_modules/import-lazy/license b/node_modules/import-lazy/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/import-lazy/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/node_modules/import-lazy/package.json b/node_modules/import-lazy/package.json new file mode 100644 index 0000000..9a8134a --- /dev/null +++ b/node_modules/import-lazy/package.json @@ -0,0 +1,76 @@ +{ + "_from": "import-lazy@^2.1.0", + "_id": "import-lazy@2.1.0", + "_inBundle": false, + "_integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "_location": "/import-lazy", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "import-lazy@^2.1.0", + "name": "import-lazy", + "escapedName": "import-lazy", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "_shasum": "05698e3d45c88e8d7e9d92cb0584e77f096f3e43", + "_spec": "import-lazy@^2.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/import-lazy/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jorge Bucaran", + "email": "jbucaran@me.com" + } + ], + "deprecated": false, + "description": "Import modules lazily", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/import-lazy#readme", + "keywords": [ + "import", + "require", + "load", + "module", + "modules", + "lazy", + "lazily", + "defer", + "deferred", + "proxy", + "proxies" + ], + "license": "MIT", + "name": "import-lazy", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/import-lazy.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0" +} diff --git a/node_modules/import-lazy/readme.md b/node_modules/import-lazy/readme.md new file mode 100644 index 0000000..233e42e --- /dev/null +++ b/node_modules/import-lazy/readme.md @@ -0,0 +1,64 @@ +# import-lazy [![Build Status](https://travis-ci.org/sindresorhus/import-lazy.svg?branch=master)](https://travis-ci.org/sindresorhus/import-lazy) + +> Import modules lazily + + +## Install + +``` +$ npm install --save import-lazy +``` + + +## Usage + +```js +// Pass in `require` or a custom import function +const importLazy = require('import-lazy')(require); +const _ = importLazy('lodash'); + +// Where you would normally do +_.isNumber(2); + +// You now instead call it as a function +_().isNumber(2); + +// It's cached on consecutive calls +_().isString('unicorn'); + +// Extract lazy variations of the props you need +const members = importLazy('lodash')('isNumber', 'isString'); + +// Useful when using destructuring assignment in ES2015 +const {isNumber, isString} = importLazy('lodash')('isNumber', 'isString'); + +// Works out of the box for functions and regular properties +const stuff = importLazy('./math-lib')('sum', 'PHI'); +console.log(stuff.sum(1, 2)); // => 3 +console.log(stuff.PHI); // => 1.618033 +``` + +### Proxy support in Node.js 6 or later + +If you use Node.js 6 or later, you can take advantage of ES2015 proxies and don't need to call it as a function. + +```js +const importLazy = require('import-lazy').proxy(require); +const _ = importLazy('lodash'); + +// No need to call it as a function but still lazily imported +_.isNumber(2); +``` + +## Related + +- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module from a given path +- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path +- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point +- [lazy-value](https://github.com/sindresorhus/lazy-value) - Create a lazily evaluated value +- [define-lazy-prop](https://github.com/sindresorhus/define-lazy-prop) - Define a lazily evaluated property on an object + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/imurmurhash/README.md b/node_modules/imurmurhash/README.md new file mode 100644 index 0000000..f35b20a --- /dev/null +++ b/node_modules/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/node_modules/imurmurhash/imurmurhash.js b/node_modules/imurmurhash/imurmurhash.js new file mode 100644 index 0000000..e63146a --- /dev/null +++ b/node_modules/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/node_modules/imurmurhash/imurmurhash.min.js b/node_modules/imurmurhash/imurmurhash.min.js new file mode 100644 index 0000000..dc0ee88 --- /dev/null +++ b/node_modules/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/node_modules/imurmurhash/package.json b/node_modules/imurmurhash/package.json new file mode 100644 index 0000000..9a1e24a --- /dev/null +++ b/node_modules/imurmurhash/package.json @@ -0,0 +1,63 @@ +{ + "_from": "imurmurhash@^0.1.4", + "_id": "imurmurhash@0.1.4", + "_inBundle": false, + "_integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "_location": "/imurmurhash", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "imurmurhash@^0.1.4", + "name": "imurmurhash", + "escapedName": "imurmurhash", + "rawSpec": "^0.1.4", + "saveSpec": null, + "fetchSpec": "^0.1.4" + }, + "_requiredBy": [ + "/write-file-atomic" + ], + "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "_shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", + "_spec": "imurmurhash@^0.1.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/write-file-atomic", + "author": { + "name": "Jens Taylor", + "email": "jensyt@gmail.com", + "url": "https://github.com/homebrewing" + }, + "bugs": { + "url": "https://github.com/jensyt/imurmurhash-js/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "An incremental implementation of MurmurHash3", + "devDependencies": {}, + "engines": { + "node": ">=0.8.19" + }, + "files": [ + "imurmurhash.js", + "imurmurhash.min.js", + "package.json", + "README.md" + ], + "homepage": "https://github.com/jensyt/imurmurhash-js", + "keywords": [ + "murmur", + "murmurhash", + "murmurhash3", + "hash", + "incremental" + ], + "license": "MIT", + "main": "imurmurhash.js", + "name": "imurmurhash", + "repository": { + "type": "git", + "url": "git+https://github.com/jensyt/imurmurhash-js.git" + }, + "version": "0.1.4" +} diff --git a/node_modules/inflection/.npmignore b/node_modules/inflection/.npmignore new file mode 100644 index 0000000..f1250e5 --- /dev/null +++ b/node_modules/inflection/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/node_modules/inflection/History.md b/node_modules/inflection/History.md new file mode 100644 index 0000000..7786ddd --- /dev/null +++ b/node_modules/inflection/History.md @@ -0,0 +1,232 @@ +# History + +## 1.12.0 / 2017-01-27 +- [update packages] mocha->3.2.0, should->11.2.0 +- [bug fix] `minus` plural & singular form +- [bug fix] `save` plural & singular form + + + +## 1.11.0 / 2016-04-20 +- [update packages] mocha->3.0.2, should->11.1.0 +- [bug fix] `inflection.transform` in ES6 + + + +## 1.10.0 / 2016-04-20 +- [update packages] should->8.3.1 +- [bug fix] `campus` plural & singular form + + + +## 1.9.0 / 2016-04-06 +- [update packages] mocha->2.4.5, should->8.3.0 +- [bug fix] `genus` plural & singular form + + + +## 1.8.0 / 2015-11-22 +- [update packages] mocha->2.3.4, should->7.1.1 +- [bug fix] `criterion` plural & singular form + + + +## 1.7.2 / 2015-10-11 +- [update packages] mocha->2.3.3, should->7.1.0 + + + +## 1.7.1 / 2015-03-25 +- [bug fix] `woman` plural & singular form + + + +## 1.7.0 / 2015-03-25 +- [bug fix] `canvas` plural & singular form +- [update packages] mocha->2.2.1, should->5.2.0 + + + +## 1.6.0 / 2014-12-06 + +- [bug fix] Special rules for index, vertex, and matrix masked by general rule x +- [update packages] mocha->2.1.0, should->4.6.5 + + + +## 1.5.3 / 2014-12-06 + +- [bug fix] Remove invalid uncountable words + + + +## 1.5.2 / 2014-11-14 + +- [bug fix] `business` & `access` plural form + + + +## 1.5.1 / 2014-09-23 + +- [bug fix] Fix `whereas` plural & singular form + + + +## 1.5.0 / 2014-09-23 + +- [refactor] Add more rules and uncountable nouns + + + +## 1.4.2 / 2014-09-05 + +- [bug fix] Fix wrong implementation of `goose`, `tooth` & `foot` + + + +## 1.4.1 / 2014-08-31 + +- [bug fix] Fix `goose`, `tooth` & `foot` plural & singular form + + + +## 1.4.0 / 2014-08-23 + +- [new feature] Adds support for an `inflect` method that will choose to pluralize or singularize a noun based on an integer value + + + +## 1.3.8 / 2014-07-03 + +- [others] Syntax tuning + + + +## 1.3.7 / 2014-06-25 + +- [refactor] Adopt UMD import to work in a variety of different situations +- [update packages] should->4.0.4 + + + +## 1.3.6 / 2014-06-07 + +- [bug fix] Rearrange rules. `movies`->`movy` + + + +## 1.3.5 / 2014-02-12 + +- Unable to publsih v1.3.4 therefore jump to v1.3.5 + + + +## 1.3.4 / 2014-02-12 + +- [update packages] should->3.1.2 +- [refactor] Use `mocha` instead of hard coding tests + + + +## 1.3.3 / 2014-01-22 + +- [update packages] should->3.0.1 +- Added brower.json + + + +## 1.3.2 / 2013-12-12 + +- [update packages] node.flow->1.2.3 + + + +## 1.3.1 / 2013-12-12 + +- [refactor] Support `Requirejs` + + + +## 1.3.0 / 2013-12-11 + +- [refactor] Move `var` out of loops +- [refactor] Change the way `camelize` acts to mimic 100% `Rails ActiveSupport Inflector camelize` + + + +## 1.2.7 / 2013-12-11 + +- [new feature] Added transform, thnaks to `luk3thomas` +- [update packages] should->v2.1.1 + + + +## 1.2.6 / 2013-05-24 + +- [bug fix] Use instance instead of `this` + + + +## 1.2.5 / 2013-01-09 + +- [refactor] Allow all caps strings to be returned from underscore + + + +## 1.2.4 / 2013-01-06 + +- [bug fix] window obj does not have `call` method + + + +## 1.2.3 / 2012-08-02 + +- [bug fix] Singularize `status` produces `statu` +- [update packages] should->v1.1.0 + + + +## 1.2.2 / 2012-07-23 + +- [update packages] node.flow->v1.1.3 & should->v1.0.0 + + + +## 1.2.1 / 2012-06-22 + +- [bug fix] Singularize `address` produces `addres` + + + +## 1.2.0 / 2012-04-10 + +- [new feature] Browser support +- [update packages] node.flow->v1.1.1 + + + +## 1.1.1 / 2012-02-13 + +- [update packages] node.flow->v1.1.0 + + + +## 1.1.0 / 2012-02-13 + +- [update packages] node.flow->v1.0.0 +- [refactor] Read version number from package.json + + + +## 1.0.0 / 2012-02-08 + +- Remove make file +- Add pluralize rules +- Add pluralize tests +- [refactor] Use object.jey instead of for in + + + +## 0.0.1 / 2012-01-16 + +- Initial release diff --git a/node_modules/inflection/Readme.md b/node_modules/inflection/Readme.md new file mode 100644 index 0000000..3d1560c --- /dev/null +++ b/node_modules/inflection/Readme.md @@ -0,0 +1,504 @@ +# inflection + +A port of inflection-js to node.js module + + + +## Description +[inflection-js](http://code.google.com/p/inflection-js/) is a port of the functionality from Ruby on Rails' Active Support Inflection classes into Javascript. `inflection` is a port of `inflection-js` to node.js npm package. Instead of [extending JavaScript native](http://wonko.com/post/extending-javascript-natives) String object like `inflection-js` does, `inflection` separate the methods to a independent package to avoid unexpected behaviors. + +Note: This library uses [Wiktionary](http://en.wiktionary.org) as its reference. + + + +## Requires + +Checkout `package.json` for dependencies. + + + +## Angular Support + +Checkout [ngInflection](https://github.com/konsumer/ngInflection) from [konsumer](https://github.com/konsumer) + + + +## Meteor Support + +Checkout [Meteor Inflector](https://github.com/katrotz/meteor-inflector) from [Veaceslav Cotruta](https://github.com/katrotz) + + + +## Installation + +Install inflection through npm + + npm install inflection + + + +## API + +- inflection.indexOf( arr, item, from_index, compare_func ); +- inflection.pluralize( str, plural ); +- inflection.singularize( str, singular ); +- inflection.inflect( str, count, singular, plural ); +- inflection.camelize( str, low_first_letter ); +- inflection.underscore( str, all_upper_case ); +- inflection.humanize( str, low_first_letter ); +- inflection.capitalize( str ); +- inflection.dasherize( str ); +- inflection.titleize( str ); +- inflection.demodulize( str ); +- inflection.tableize( str ); +- inflection.classify( str ); +- inflection.foreign_key( str, drop_id_ubar ); +- inflection.ordinalize( str ); +- inflection.transform( str, arr ); + + + +## Usage + +> Require the module before using + + var inflection = require( 'inflection' ); + + + +### inflection.indexOf( arr, item, from_index, compare_func ); + +This lets us detect if an Array contains a given element. + +#### Arguments + +> arr + + type: Array + desc: The subject array. + +> item + + type: Object + desc: Object to locate in the Array. + +> from_index + + type: Number + desc: Starts checking from this position in the Array.(optional) + +> compare_func + + type: Function + desc: Function used to compare Array item vs passed item.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.indexOf([ 'hi','there' ], 'guys' ); // === -1 + inflection.indexOf([ 'hi','there' ], 'hi' ); // === 0 + + + +### inflection.pluralize( str, plural ); + +This function adds pluralization support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> plural + + type: String + desc: Overrides normal output with said String.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.pluralize( 'person' ); // === 'people' + inflection.pluralize( 'octopus' ); // === "octopi" + inflection.pluralize( 'Hat' ); // === 'Hats' + inflection.pluralize( 'person', 'guys' ); // === 'guys' + + + +### inflection.singularize( str, singular ); + +This function adds singularization support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> singular + + type: String + desc: Overrides normal output with said String.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.singularize( 'people' ); // === 'person' + inflection.singularize( 'octopi' ); // === "octopus" + inflection.singularize( 'Hats' ); // === 'Hat' + inflection.singularize( 'guys', 'person' ); // === 'person' + + + +### inflection.inflect( str, count, singular, plural ); + +This function will pluralize or singularlize a String appropriately based on an integer value. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> count + type: Number + desc: The number to base pluralization off of. + +> singular + + type: String + desc: Overrides normal output with said String.(optional) + +> plural + + type: String + desc: Overrides normal output with said String.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.inflect( 'people' 1 ); // === 'person' + inflection.inflect( 'octopi' 1 ); // === 'octopus' + inflection.inflect( 'Hats' 1 ); // === 'Hat' + inflection.inflect( 'guys', 1 , 'person' ); // === 'person' + inflection.inflect( 'person', 2 ); // === 'people' + inflection.inflect( 'octopus', 2 ); // === 'octopi' + inflection.inflect( 'Hat', 2 ); // === 'Hats' + inflection.inflect( 'person', 2, null, 'guys' ); // === 'guys' + + + +### inflection.camelize( str, low_first_letter ); + +This function transforms String object from underscore to camelcase. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> low_first_letter + + type: Boolean + desc: Default is to capitalize the first letter of the results. Passing true will lowercase it. (optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.camelize( 'message_properties' ); // === 'MessageProperties' + inflection.camelize( 'message_properties', true ); // === 'messageProperties' + + + +### inflection.underscore( str, all_upper_case ); + +This function transforms String object from camelcase to underscore. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> all_upper_case + + type: Boolean + desc: Default is to lowercase and add underscore prefix + + + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.underscore( 'MessageProperties' ); // === 'message_properties' + inflection.underscore( 'messageProperties' ); // === 'message_properties' + inflection.underscore( 'MP' ); // === 'm_p' + inflection.underscore( 'MP', true ); // === 'MP' + + + +### inflection.humanize( str, low_first_letter ); + +This function adds humanize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> low_first_letter + + type: Boolean + desc: Default is to capitalize the first letter of the results. Passing true will lowercase it. (optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.humanize( 'message_properties' ); // === 'Message properties' + inflection.humanize( 'message_properties', true ); // === 'message properties' + + + +### inflection.capitalize( str ); + +This function adds capitalization support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.capitalize( 'message_properties' ); // === 'Message_properties' + inflection.capitalize( 'message properties', true ); // === 'Message properties' + + + +### inflection.dasherize( str ); + +This function replaces underscores with dashes in the string. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.dasherize( 'message_properties' ); // === 'message-properties' + inflection.dasherize( 'Message Properties' ); // === 'Message-Properties' + + + +### inflection.titleize( str ); + +This function adds titleize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.titleize( 'message_properties' ); // === 'Message Properties' + inflection.titleize( 'message properties to keep' ); // === 'Message Properties to Keep' + + + +### inflection.demodulize( str ); + +This function adds demodulize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.demodulize( 'Message::Bus::Properties' ); // === 'Properties' + + + +### inflection.tableize( str ); + +This function adds tableize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.tableize( 'MessageBusProperty' ); // === 'message_bus_properties' + + + +### inflection.classify( str ); + +This function adds classification support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.classify( 'message_bus_properties' ); // === 'MessageBusProperty' + + + +### inflection.foreign_key( str, drop_id_ubar ); + +This function adds foreign key support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> low_first_letter + + type: Boolean + desc: Default is to seperate id with an underbar at the end of the class name, you can pass true to skip it.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.foreign_key( 'MessageBusProperty' ); // === 'message_bus_property_id' + inflection.foreign_key( 'MessageBusProperty', true ); // === 'message_bus_propertyid' + + + +### inflection.ordinalize( str ); + +This function adds ordinalize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.ordinalize( 'the 1 pitch' ); // === 'the 1st pitch' + + + +### inflection.transform( str, arr ); + +This function performs multiple inflection methods on a string. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> arr + + type: Array + desc: An array of inflection methods. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.transform( 'all job', [ 'pluralize', 'capitalize', 'dasherize' ]); // === 'All-jobs' + + + +## Credit + +- Ryan Schuft +- Lance Pollard (Browser support) +- Dane O'Connor +- brandondewitt +- luk3thomas +- Marcel Klehr +- Raymond Feng +- Kane Cohen +- Gianni Chiappetta +- Eric Brody +- overlookmotel +- Patrick Mowrer +- Greger Olsson +- Jason Crawford +- Ray Myers + + +## License + +(The MIT License) + +Copyright (c) 2011 dreamerslab <ben@dreamerslab.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/node_modules/inflection/bower.json b/node_modules/inflection/bower.json new file mode 100644 index 0000000..d58b6ca --- /dev/null +++ b/node_modules/inflection/bower.json @@ -0,0 +1,58 @@ +{ + "name": "inflection", + "version": "1.12.0", + "homepage": "https://github.com/dreamerslab/node.inflection", + "description": "JavaScript Inflection Support", + "authors": [ + "ben " + ], + "contributors": [ + { "name": "Ryan Schuft", "email": "ryan.schuft@gmail.com" }, + { "name": "Ben Lin", "email": "ben@dreamerslab.com" }, + { "name": "Lance Pollard", "email": "lancejpollard@gmail.com" }, + { "name": "Dane O'Connor", "email": "dane.oconnor@gmail.com" }, + { "name": "David Miró", "email": "lite.3engine@gmail.com" }, + { "name": "brandondewitt" }, + { "name": "luk3thomas" }, + { "name": "Marcel Klehr" }, + { "name": "Raymond Feng" }, + { "name": "Kane Cohen", "email": "kanecohen@gmail.com" }, + { "name": "Gianni Chiappetta", "email": "gianni@runlevel6.org" }, + { "name": "Eric Brody" }, + { "name": "overlookmotel" }, + { "name": "Patrick Mowrer" }, + { "name": "Greger Olsson" }, + { "name": "Jason Crawford", "email": "jason@jasoncrawford.org" }, + { "name": "Ray Myers", "email": "ray.myers@gmail.com" }, + { "name": "Dillon Shook", "email": "dshook@alumni.nmt.edu" } + + ], + "main": "lib/inflection.js", + "keywords": [ + "inflection", + "inflections", + "inflection-js", + "pluralize", + "singularize", + "inflect", + "camelize", + "underscore", + "humanize", + "capitalize", + "dasherize", + "titleize", + "demodulize", + "tableize", + "classify", + "foreign_key", + "ordinalize" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/node_modules/inflection/component.json b/node_modules/inflection/component.json new file mode 100644 index 0000000..c99265b --- /dev/null +++ b/node_modules/inflection/component.json @@ -0,0 +1,36 @@ +{ + "name": "inflection", + "version": "1.12.0", + "repo": "dreamerslab/node.inflection", + "description": "A port of inflection-js to node.js module", + "keywords" : [ + "inflection", "inflections", "inflection-js", "pluralize" , "singularize", + "camelize", "underscore", "humanize", "capitalize", "dasherize", "titleize", + "demodulize", "tableize", "classify", "foreign_key", "ordinalize" + ], + "author": "dreamerslab ", + "contributors": [ + { "name": "Ryan Schuft", "email": "ryan.schuft@gmail.com" }, + { "name": "Ben Lin", "email": "ben@dreamerslab.com" }, + { "name": "Lance Pollard", "email": "lancejpollard@gmail.com" }, + { "name": "Dane O'Connor", "email": "dane.oconnor@gmail.com" }, + { "name": "David Miró", "email": "lite.3engine@gmail.com" }, + { "name": "brandondewitt" }, + { "name": "luk3thomas" }, + { "name": "Marcel Klehr" }, + { "name": "Raymond Feng" }, + { "name": "Kane Cohen", "email": "kanecohen@gmail.com" }, + { "name": "Gianni Chiappetta", "email": "gianni@runlevel6.org" }, + { "name": "Eric Brody" }, + { "name": "overlookmotel" }, + { "name": "Patrick Mowrer" }, + { "name": "Greger Olsson" }, + { "name": "Jason Crawford", "email": "jason@jasoncrawford.org" }, + { "name": "Ray Myers", "email": "ray.myers@gmail.com" }, + { "name": "Dillon Shook", "email": "dshook@alumni.nmt.edu" } + ], + "dependencies": {}, + "license": "MIT", + "main": "./lib/inflection.js", + "scripts": ["./lib/inflection.js"] +} diff --git a/node_modules/inflection/inflection.min.js b/node_modules/inflection/inflection.min.js new file mode 100644 index 0000000..42f6c3f --- /dev/null +++ b/node_modules/inflection/inflection.min.js @@ -0,0 +1,31 @@ +/*! + * inflection + * Copyright(c) 2011 Ben Lin + * MIT Licensed + * + * @fileoverview + * A port of inflection-js to node.js module. + */ +(function(a,b){if(typeof define==="function"&&define.amd){define([],b); +}else{if(typeof exports==="object"){module.exports=b();}else{a.inflection=b();}}}(this,function(){var d=["accommodation","adulthood","advertising","advice","aggression","aid","air","aircraft","alcohol","anger","applause","arithmetic","assistance","athletics","bacon","baggage","beef","biology","blood","botany","bread","butter","carbon","cardboard","cash","chalk","chaos","chess","crossroads","countryside","dancing","deer","dignity","dirt","dust","economics","education","electricity","engineering","enjoyment","envy","equipment","ethics","evidence","evolution","fame","fiction","flour","flu","food","fuel","fun","furniture","gallows","garbage","garlic","genetics","gold","golf","gossip","grammar","gratitude","grief","guilt","gymnastics","happiness","hardware","harm","hate","hatred","health","heat","help","homework","honesty","honey","hospitality","housework","humour","hunger","hydrogen","ice","importance","inflation","information","innocence","iron","irony","jam","jewelry","judo","karate","knowledge","lack","laughter","lava","leather","leisure","lightning","linguine","linguini","linguistics","literature","litter","livestock","logic","loneliness","luck","luggage","macaroni","machinery","magic","management","mankind","marble","mathematics","mayonnaise","measles","methane","milk","minus","money","mud","music","mumps","nature","news","nitrogen","nonsense","nurture","nutrition","obedience","obesity","oxygen","pasta","patience","physics","poetry","pollution","poverty","pride","psychology","publicity","punctuation","quartz","racism","relaxation","reliability","research","respect","revenge","rice","rubbish","rum","safety","scenery","seafood","seaside","series","shame","sheep","shopping","sleep","smoke","smoking","snow","soap","software","soil","spaghetti","species","steam","stuff","stupidity","sunshine","symmetry","tennis","thirst","thunder","timber","traffic","transportation","trust","underwear","unemployment","unity","validity","veal","vegetation","vegetarianism","vengeance","violence","vitality","warmth","wealth","weather","welfare","wheat","wildlife","wisdom","yoga","zinc","zoology"]; +var i={plural:{men:new RegExp("^(m|wom)en$","gi"),people:new RegExp("(pe)ople$","gi"),children:new RegExp("(child)ren$","gi"),tia:new RegExp("([ti])a$","gi"),analyses:new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),hives:new RegExp("(hi|ti)ves$","gi"),curves:new RegExp("(curve)s$","gi"),lrves:new RegExp("([lr])ves$","gi"),aves:new RegExp("([a])ves$","gi"),foves:new RegExp("([^fo])ves$","gi"),movies:new RegExp("(m)ovies$","gi"),aeiouyies:new RegExp("([^aeiouy]|qu)ies$","gi"),series:new RegExp("(s)eries$","gi"),xes:new RegExp("(x|ch|ss|sh)es$","gi"),mice:new RegExp("([m|l])ice$","gi"),buses:new RegExp("(bus)es$","gi"),oes:new RegExp("(o)es$","gi"),shoes:new RegExp("(shoe)s$","gi"),crises:new RegExp("(cris|ax|test)es$","gi"),octopi:new RegExp("(octop|vir)i$","gi"),aliases:new RegExp("(alias|canvas|status|campus)es$","gi"),summonses:new RegExp("^(summons)es$","gi"),oxen:new RegExp("^(ox)en","gi"),matrices:new RegExp("(matr)ices$","gi"),vertices:new RegExp("(vert|ind)ices$","gi"),feet:new RegExp("^feet$","gi"),teeth:new RegExp("^teeth$","gi"),geese:new RegExp("^geese$","gi"),quizzes:new RegExp("(quiz)zes$","gi"),whereases:new RegExp("^(whereas)es$","gi"),criteria:new RegExp("^(criteri)a$","gi"),genera:new RegExp("^genera$","gi"),ss:new RegExp("ss$","gi"),s:new RegExp("s$","gi")},singular:{man:new RegExp("^(m|wom)an$","gi"),person:new RegExp("(pe)rson$","gi"),child:new RegExp("(child)$","gi"),ox:new RegExp("^(ox)$","gi"),axis:new RegExp("(ax|test)is$","gi"),octopus:new RegExp("(octop|vir)us$","gi"),alias:new RegExp("(alias|status|canvas|campus)$","gi"),summons:new RegExp("^(summons)$","gi"),bus:new RegExp("(bu)s$","gi"),buffalo:new RegExp("(buffal|tomat|potat)o$","gi"),tium:new RegExp("([ti])um$","gi"),sis:new RegExp("sis$","gi"),ffe:new RegExp("(?:([^f])fe|([lr])f)$","gi"),hive:new RegExp("(hi|ti)ve$","gi"),aeiouyy:new RegExp("([^aeiouy]|qu)y$","gi"),x:new RegExp("(x|ch|ss|sh)$","gi"),matrix:new RegExp("(matr)ix$","gi"),vertex:new RegExp("(vert|ind)ex$","gi"),mouse:new RegExp("([m|l])ouse$","gi"),foot:new RegExp("^foot$","gi"),tooth:new RegExp("^tooth$","gi"),goose:new RegExp("^goose$","gi"),quiz:new RegExp("(quiz)$","gi"),whereas:new RegExp("^(whereas)$","gi"),criterion:new RegExp("^(criteri)on$","gi"),genus:new RegExp("^genus$","gi"),s:new RegExp("s$","gi"),common:new RegExp("$","gi")}}; +var g=[[i.plural.men],[i.plural.people],[i.plural.children],[i.plural.tia],[i.plural.analyses],[i.plural.hives],[i.plural.curves],[i.plural.lrves],[i.plural.foves],[i.plural.aeiouyies],[i.plural.series],[i.plural.movies],[i.plural.xes],[i.plural.mice],[i.plural.buses],[i.plural.oes],[i.plural.shoes],[i.plural.crises],[i.plural.octopi],[i.plural.aliases],[i.plural.summonses],[i.plural.oxen],[i.plural.matrices],[i.plural.feet],[i.plural.teeth],[i.plural.geese],[i.plural.quizzes],[i.plural.whereases],[i.plural.criteria],[i.plural.genera],[i.singular.man,"$1en"],[i.singular.person,"$1ople"],[i.singular.child,"$1ren"],[i.singular.ox,"$1en"],[i.singular.axis,"$1es"],[i.singular.octopus,"$1i"],[i.singular.alias,"$1es"],[i.singular.summons,"$1es"],[i.singular.bus,"$1ses"],[i.singular.buffalo,"$1oes"],[i.singular.tium,"$1a"],[i.singular.sis,"ses"],[i.singular.ffe,"$1$2ves"],[i.singular.hive,"$1ves"],[i.singular.aeiouyy,"$1ies"],[i.singular.matrix,"$1ices"],[i.singular.vertex,"$1ices"],[i.singular.x,"$1es"],[i.singular.mouse,"$1ice"],[i.singular.foot,"feet"],[i.singular.tooth,"teeth"],[i.singular.goose,"geese"],[i.singular.quiz,"$1zes"],[i.singular.whereas,"$1es"],[i.singular.criterion,"$1a"],[i.singular.genus,"genera"],[i.singular.s,"s"],[i.singular.common,"s"]]; +var a=[[i.singular.man],[i.singular.person],[i.singular.child],[i.singular.ox],[i.singular.axis],[i.singular.octopus],[i.singular.alias],[i.singular.summons],[i.singular.bus],[i.singular.buffalo],[i.singular.tium],[i.singular.sis],[i.singular.ffe],[i.singular.hive],[i.singular.aeiouyy],[i.singular.x],[i.singular.matrix],[i.singular.mouse],[i.singular.foot],[i.singular.tooth],[i.singular.goose],[i.singular.quiz],[i.singular.whereas],[i.singular.criterion],[i.singular.genus],[i.plural.men,"$1an"],[i.plural.people,"$1rson"],[i.plural.children,"$1"],[i.plural.genera,"genus"],[i.plural.criteria,"$1on"],[i.plural.tia,"$1um"],[i.plural.analyses,"$1$2sis"],[i.plural.hives,"$1ve"],[i.plural.curves,"$1"],[i.plural.lrves,"$1f"],[i.plural.aves,"$1ve"],[i.plural.foves,"$1fe"],[i.plural.movies,"$1ovie"],[i.plural.aeiouyies,"$1y"],[i.plural.series,"$1eries"],[i.plural.xes,"$1"],[i.plural.mice,"$1ouse"],[i.plural.buses,"$1"],[i.plural.oes,"$1"],[i.plural.shoes,"$1"],[i.plural.crises,"$1is"],[i.plural.octopi,"$1us"],[i.plural.aliases,"$1"],[i.plural.summonses,"$1"],[i.plural.oxen,"$1"],[i.plural.matrices,"$1ix"],[i.plural.vertices,"$1ex"],[i.plural.feet,"foot"],[i.plural.teeth,"tooth"],[i.plural.geese,"goose"],[i.plural.quizzes,"$1"],[i.plural.whereases,"$1"],[i.plural.ss,"ss"],[i.plural.s,""]]; +var c=["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"];var k=new RegExp("(_ids|_id)$","g"); +var f=new RegExp("_","g");var j=new RegExp("[ _]","g");var e=new RegExp("([A-Z])","g");var h=new RegExp("^_");var b={_apply_rules:function(q,p,o,n){if(n){q=n; +}else{var r=(b.indexOf(o,q.toLowerCase())>-1);if(!r){var m=0;var l=p.length;for(;m1){return b._apply_rules(o,g,d,l);}else{return b._apply_rules(o,a,d,m);}},camelize:function(t,o){var v=t.split("/"); +var r=0;var q=v.length;var u,m,p,n,s;for(;r + * MIT Licensed + * + * @fileoverview + * A port of inflection-js to node.js module. + */ + +( function ( root, factory ){ + if( typeof define === 'function' && define.amd ){ + define([], factory ); + }else if( typeof exports === 'object' ){ + module.exports = factory(); + }else{ + root.inflection = factory(); + } +}( this, function (){ + + /** + * @description This is a list of nouns that use the same form for both singular and plural. + * This list should remain entirely in lower case to correctly match Strings. + * @private + */ + var uncountable_words = [ + // 'access', + 'accommodation', + 'adulthood', + 'advertising', + 'advice', + 'aggression', + 'aid', + 'air', + 'aircraft', + 'alcohol', + 'anger', + 'applause', + 'arithmetic', + // 'art', + 'assistance', + 'athletics', + // 'attention', + + 'bacon', + 'baggage', + // 'ballet', + // 'beauty', + 'beef', + // 'beer', + // 'behavior', + 'biology', + // 'billiards', + 'blood', + 'botany', + // 'bowels', + 'bread', + // 'business', + 'butter', + + 'carbon', + 'cardboard', + 'cash', + 'chalk', + 'chaos', + 'chess', + 'crossroads', + 'countryside', + + // 'damage', + 'dancing', + // 'danger', + 'deer', + // 'delight', + // 'dessert', + 'dignity', + 'dirt', + // 'distribution', + 'dust', + + 'economics', + 'education', + 'electricity', + // 'employment', + // 'energy', + 'engineering', + 'enjoyment', + // 'entertainment', + 'envy', + 'equipment', + 'ethics', + 'evidence', + 'evolution', + + // 'failure', + // 'faith', + 'fame', + 'fiction', + // 'fish', + 'flour', + 'flu', + 'food', + // 'freedom', + // 'fruit', + 'fuel', + 'fun', + // 'funeral', + 'furniture', + + 'gallows', + 'garbage', + 'garlic', + // 'gas', + 'genetics', + // 'glass', + 'gold', + 'golf', + 'gossip', + 'grammar', + // 'grass', + 'gratitude', + 'grief', + // 'ground', + 'guilt', + 'gymnastics', + + // 'hair', + 'happiness', + 'hardware', + 'harm', + 'hate', + 'hatred', + 'health', + 'heat', + // 'height', + 'help', + 'homework', + 'honesty', + 'honey', + 'hospitality', + 'housework', + 'humour', + 'hunger', + 'hydrogen', + + 'ice', + 'importance', + 'inflation', + 'information', + // 'injustice', + 'innocence', + // 'intelligence', + 'iron', + 'irony', + + 'jam', + // 'jealousy', + // 'jelly', + 'jewelry', + // 'joy', + 'judo', + // 'juice', + // 'justice', + + 'karate', + // 'kindness', + 'knowledge', + + // 'labour', + 'lack', + // 'land', + 'laughter', + 'lava', + 'leather', + 'leisure', + 'lightning', + 'linguine', + 'linguini', + 'linguistics', + 'literature', + 'litter', + 'livestock', + 'logic', + 'loneliness', + // 'love', + 'luck', + 'luggage', + + 'macaroni', + 'machinery', + 'magic', + // 'mail', + 'management', + 'mankind', + 'marble', + 'mathematics', + 'mayonnaise', + 'measles', + // 'meat', + // 'metal', + 'methane', + 'milk', + 'minus', + 'money', + // 'moose', + 'mud', + 'music', + 'mumps', + + 'nature', + 'news', + 'nitrogen', + 'nonsense', + 'nurture', + 'nutrition', + + 'obedience', + 'obesity', + // 'oil', + 'oxygen', + + // 'paper', + // 'passion', + 'pasta', + 'patience', + // 'permission', + 'physics', + 'poetry', + 'pollution', + 'poverty', + // 'power', + 'pride', + // 'production', + // 'progress', + // 'pronunciation', + 'psychology', + 'publicity', + 'punctuation', + + // 'quality', + // 'quantity', + 'quartz', + + 'racism', + // 'rain', + // 'recreation', + 'relaxation', + 'reliability', + 'research', + 'respect', + 'revenge', + 'rice', + 'rubbish', + 'rum', + + 'safety', + // 'salad', + // 'salt', + // 'sand', + // 'satire', + 'scenery', + 'seafood', + 'seaside', + 'series', + 'shame', + 'sheep', + 'shopping', + // 'silence', + 'sleep', + // 'slang' + 'smoke', + 'smoking', + 'snow', + 'soap', + 'software', + 'soil', + // 'sorrow', + // 'soup', + 'spaghetti', + // 'speed', + 'species', + // 'spelling', + // 'sport', + 'steam', + // 'strength', + 'stuff', + 'stupidity', + // 'success', + // 'sugar', + 'sunshine', + 'symmetry', + + // 'tea', + 'tennis', + 'thirst', + 'thunder', + 'timber', + // 'time', + // 'toast', + // 'tolerance', + // 'trade', + 'traffic', + 'transportation', + // 'travel', + 'trust', + + // 'understanding', + 'underwear', + 'unemployment', + 'unity', + // 'usage', + + 'validity', + 'veal', + 'vegetation', + 'vegetarianism', + 'vengeance', + 'violence', + // 'vision', + 'vitality', + + 'warmth', + // 'water', + 'wealth', + 'weather', + // 'weight', + 'welfare', + 'wheat', + // 'whiskey', + // 'width', + 'wildlife', + // 'wine', + 'wisdom', + // 'wood', + // 'wool', + // 'work', + + // 'yeast', + 'yoga', + + 'zinc', + 'zoology' + ]; + + /** + * @description These rules translate from the singular form of a noun to its plural form. + * @private + */ + + var regex = { + plural : { + men : new RegExp( '^(m|wom)en$' , 'gi' ), + people : new RegExp( '(pe)ople$' , 'gi' ), + children : new RegExp( '(child)ren$' , 'gi' ), + tia : new RegExp( '([ti])a$' , 'gi' ), + analyses : new RegExp( '((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$','gi' ), + hives : new RegExp( '(hi|ti)ves$' , 'gi' ), + curves : new RegExp( '(curve)s$' , 'gi' ), + lrves : new RegExp( '([lr])ves$' , 'gi' ), + aves : new RegExp( '([a])ves$' , 'gi' ), + foves : new RegExp( '([^fo])ves$' , 'gi' ), + movies : new RegExp( '(m)ovies$' , 'gi' ), + aeiouyies : new RegExp( '([^aeiouy]|qu)ies$' , 'gi' ), + series : new RegExp( '(s)eries$' , 'gi' ), + xes : new RegExp( '(x|ch|ss|sh)es$' , 'gi' ), + mice : new RegExp( '([m|l])ice$' , 'gi' ), + buses : new RegExp( '(bus)es$' , 'gi' ), + oes : new RegExp( '(o)es$' , 'gi' ), + shoes : new RegExp( '(shoe)s$' , 'gi' ), + crises : new RegExp( '(cris|ax|test)es$' , 'gi' ), + octopi : new RegExp( '(octop|vir)i$' , 'gi' ), + aliases : new RegExp( '(alias|canvas|status|campus)es$', 'gi' ), + summonses : new RegExp( '^(summons)es$' , 'gi' ), + oxen : new RegExp( '^(ox)en' , 'gi' ), + matrices : new RegExp( '(matr)ices$' , 'gi' ), + vertices : new RegExp( '(vert|ind)ices$' , 'gi' ), + feet : new RegExp( '^feet$' , 'gi' ), + teeth : new RegExp( '^teeth$' , 'gi' ), + geese : new RegExp( '^geese$' , 'gi' ), + quizzes : new RegExp( '(quiz)zes$' , 'gi' ), + whereases : new RegExp( '^(whereas)es$' , 'gi' ), + criteria : new RegExp( '^(criteri)a$' , 'gi' ), + genera : new RegExp( '^genera$' , 'gi' ), + ss : new RegExp( 'ss$' , 'gi' ), + s : new RegExp( 's$' , 'gi' ) + }, + + singular : { + man : new RegExp( '^(m|wom)an$' , 'gi' ), + person : new RegExp( '(pe)rson$' , 'gi' ), + child : new RegExp( '(child)$' , 'gi' ), + ox : new RegExp( '^(ox)$' , 'gi' ), + axis : new RegExp( '(ax|test)is$' , 'gi' ), + octopus : new RegExp( '(octop|vir)us$' , 'gi' ), + alias : new RegExp( '(alias|status|canvas|campus)$', 'gi' ), + summons : new RegExp( '^(summons)$' , 'gi' ), + bus : new RegExp( '(bu)s$' , 'gi' ), + buffalo : new RegExp( '(buffal|tomat|potat)o$' , 'gi' ), + tium : new RegExp( '([ti])um$' , 'gi' ), + sis : new RegExp( 'sis$' , 'gi' ), + ffe : new RegExp( '(?:([^f])fe|([lr])f)$' , 'gi' ), + hive : new RegExp( '(hi|ti)ve$' , 'gi' ), + aeiouyy : new RegExp( '([^aeiouy]|qu)y$' , 'gi' ), + x : new RegExp( '(x|ch|ss|sh)$' , 'gi' ), + matrix : new RegExp( '(matr)ix$' , 'gi' ), + vertex : new RegExp( '(vert|ind)ex$' , 'gi' ), + mouse : new RegExp( '([m|l])ouse$' , 'gi' ), + foot : new RegExp( '^foot$' , 'gi' ), + tooth : new RegExp( '^tooth$' , 'gi' ), + goose : new RegExp( '^goose$' , 'gi' ), + quiz : new RegExp( '(quiz)$' , 'gi' ), + whereas : new RegExp( '^(whereas)$' , 'gi' ), + criterion : new RegExp( '^(criteri)on$' , 'gi' ), + genus : new RegExp( '^genus$' , 'gi' ), + s : new RegExp( 's$' , 'gi' ), + common : new RegExp( '$' , 'gi' ) + } + }; + + var plural_rules = [ + + // do not replace if its already a plural word + [ regex.plural.men ], + [ regex.plural.people ], + [ regex.plural.children ], + [ regex.plural.tia ], + [ regex.plural.analyses ], + [ regex.plural.hives ], + [ regex.plural.curves ], + [ regex.plural.lrves ], + [ regex.plural.foves ], + [ regex.plural.aeiouyies ], + [ regex.plural.series ], + [ regex.plural.movies ], + [ regex.plural.xes ], + [ regex.plural.mice ], + [ regex.plural.buses ], + [ regex.plural.oes ], + [ regex.plural.shoes ], + [ regex.plural.crises ], + [ regex.plural.octopi ], + [ regex.plural.aliases ], + [ regex.plural.summonses ], + [ regex.plural.oxen ], + [ regex.plural.matrices ], + [ regex.plural.feet ], + [ regex.plural.teeth ], + [ regex.plural.geese ], + [ regex.plural.quizzes ], + [ regex.plural.whereases ], + [ regex.plural.criteria ], + [ regex.plural.genera ], + + // original rule + [ regex.singular.man , '$1en' ], + [ regex.singular.person , '$1ople' ], + [ regex.singular.child , '$1ren' ], + [ regex.singular.ox , '$1en' ], + [ regex.singular.axis , '$1es' ], + [ regex.singular.octopus , '$1i' ], + [ regex.singular.alias , '$1es' ], + [ regex.singular.summons , '$1es' ], + [ regex.singular.bus , '$1ses' ], + [ regex.singular.buffalo , '$1oes' ], + [ regex.singular.tium , '$1a' ], + [ regex.singular.sis , 'ses' ], + [ regex.singular.ffe , '$1$2ves' ], + [ regex.singular.hive , '$1ves' ], + [ regex.singular.aeiouyy , '$1ies' ], + [ regex.singular.matrix , '$1ices' ], + [ regex.singular.vertex , '$1ices' ], + [ regex.singular.x , '$1es' ], + [ regex.singular.mouse , '$1ice' ], + [ regex.singular.foot , 'feet' ], + [ regex.singular.tooth , 'teeth' ], + [ regex.singular.goose , 'geese' ], + [ regex.singular.quiz , '$1zes' ], + [ regex.singular.whereas , '$1es' ], + [ regex.singular.criterion, '$1a' ], + [ regex.singular.genus , 'genera' ], + + [ regex.singular.s , 's' ], + [ regex.singular.common, 's' ] + ]; + + /** + * @description These rules translate from the plural form of a noun to its singular form. + * @private + */ + var singular_rules = [ + + // do not replace if its already a singular word + [ regex.singular.man ], + [ regex.singular.person ], + [ regex.singular.child ], + [ regex.singular.ox ], + [ regex.singular.axis ], + [ regex.singular.octopus ], + [ regex.singular.alias ], + [ regex.singular.summons ], + [ regex.singular.bus ], + [ regex.singular.buffalo ], + [ regex.singular.tium ], + [ regex.singular.sis ], + [ regex.singular.ffe ], + [ regex.singular.hive ], + [ regex.singular.aeiouyy ], + [ regex.singular.x ], + [ regex.singular.matrix ], + [ regex.singular.mouse ], + [ regex.singular.foot ], + [ regex.singular.tooth ], + [ regex.singular.goose ], + [ regex.singular.quiz ], + [ regex.singular.whereas ], + [ regex.singular.criterion ], + [ regex.singular.genus ], + + // original rule + [ regex.plural.men , '$1an' ], + [ regex.plural.people , '$1rson' ], + [ regex.plural.children , '$1' ], + [ regex.plural.genera , 'genus'], + [ regex.plural.criteria , '$1on'], + [ regex.plural.tia , '$1um' ], + [ regex.plural.analyses , '$1$2sis' ], + [ regex.plural.hives , '$1ve' ], + [ regex.plural.curves , '$1' ], + [ regex.plural.lrves , '$1f' ], + [ regex.plural.aves , '$1ve' ], + [ regex.plural.foves , '$1fe' ], + [ regex.plural.movies , '$1ovie' ], + [ regex.plural.aeiouyies, '$1y' ], + [ regex.plural.series , '$1eries' ], + [ regex.plural.xes , '$1' ], + [ regex.plural.mice , '$1ouse' ], + [ regex.plural.buses , '$1' ], + [ regex.plural.oes , '$1' ], + [ regex.plural.shoes , '$1' ], + [ regex.plural.crises , '$1is' ], + [ regex.plural.octopi , '$1us' ], + [ regex.plural.aliases , '$1' ], + [ regex.plural.summonses, '$1' ], + [ regex.plural.oxen , '$1' ], + [ regex.plural.matrices , '$1ix' ], + [ regex.plural.vertices , '$1ex' ], + [ regex.plural.feet , 'foot' ], + [ regex.plural.teeth , 'tooth' ], + [ regex.plural.geese , 'goose' ], + [ regex.plural.quizzes , '$1' ], + [ regex.plural.whereases, '$1' ], + + [ regex.plural.ss, 'ss' ], + [ regex.plural.s , '' ] + ]; + + /** + * @description This is a list of words that should not be capitalized for title case. + * @private + */ + var non_titlecased_words = [ + 'and', 'or', 'nor', 'a', 'an', 'the', 'so', 'but', 'to', 'of', 'at','by', + 'from', 'into', 'on', 'onto', 'off', 'out', 'in', 'over', 'with', 'for' + ]; + + /** + * @description These are regular expressions used for converting between String formats. + * @private + */ + var id_suffix = new RegExp( '(_ids|_id)$', 'g' ); + var underbar = new RegExp( '_', 'g' ); + var space_or_underbar = new RegExp( '[\ _]', 'g' ); + var uppercase = new RegExp( '([A-Z])', 'g' ); + var underbar_prefix = new RegExp( '^_' ); + + var inflector = { + + /** + * A helper method that applies rules based replacement to a String. + * @private + * @function + * @param {String} str String to modify and return based on the passed rules. + * @param {Array: [RegExp, String]} rules Regexp to match paired with String to use for replacement + * @param {Array: [String]} skip Strings to skip if they match + * @param {String} override String to return as though this method succeeded (used to conform to APIs) + * @returns {String} Return passed String modified by passed rules. + * @example + * + * this._apply_rules( 'cows', singular_rules ); // === 'cow' + */ + _apply_rules : function ( str, rules, skip, override ){ + if( override ){ + str = override; + }else{ + var ignore = ( inflector.indexOf( skip, str.toLowerCase()) > -1 ); + + if( !ignore ){ + var i = 0; + var j = rules.length; + + for( ; i < j; i++ ){ + if( str.match( rules[ i ][ 0 ])){ + if( rules[ i ][ 1 ] !== undefined ){ + str = str.replace( rules[ i ][ 0 ], rules[ i ][ 1 ]); + } + break; + } + } + } + } + + return str; + }, + + + + /** + * This lets us detect if an Array contains a given element. + * @public + * @function + * @param {Array} arr The subject array. + * @param {Object} item Object to locate in the Array. + * @param {Number} from_index Starts checking from this position in the Array.(optional) + * @param {Function} compare_func Function used to compare Array item vs passed item.(optional) + * @returns {Number} Return index position in the Array of the passed item. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.indexOf([ 'hi','there' ], 'guys' ); // === -1 + * inflection.indexOf([ 'hi','there' ], 'hi' ); // === 0 + */ + indexOf : function ( arr, item, from_index, compare_func ){ + if( !from_index ){ + from_index = -1; + } + + var index = -1; + var i = from_index; + var j = arr.length; + + for( ; i < j; i++ ){ + if( arr[ i ] === item || compare_func && compare_func( arr[ i ], item )){ + index = i; + break; + } + } + + return index; + }, + + + + /** + * This function adds pluralization support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {String} plural Overrides normal output with said String.(optional) + * @returns {String} Singular English language nouns are returned in plural form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.pluralize( 'person' ); // === 'people' + * inflection.pluralize( 'octopus' ); // === 'octopi' + * inflection.pluralize( 'Hat' ); // === 'Hats' + * inflection.pluralize( 'person', 'guys' ); // === 'guys' + */ + pluralize : function ( str, plural ){ + return inflector._apply_rules( str, plural_rules, uncountable_words, plural ); + }, + + + + /** + * This function adds singularization support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {String} singular Overrides normal output with said String.(optional) + * @returns {String} Plural English language nouns are returned in singular form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.singularize( 'people' ); // === 'person' + * inflection.singularize( 'octopi' ); // === 'octopus' + * inflection.singularize( 'Hats' ); // === 'Hat' + * inflection.singularize( 'guys', 'person' ); // === 'person' + */ + singularize : function ( str, singular ){ + return inflector._apply_rules( str, singular_rules, uncountable_words, singular ); + }, + + + /** + * This function will pluralize or singularlize a String appropriately based on an integer value + * @public + * @function + * @param {String} str The subject string. + * @param {Number} count The number to base pluralization off of. + * @param {String} singular Overrides normal output with said String.(optional) + * @param {String} plural Overrides normal output with said String.(optional) + * @returns {String} English language nouns are returned in the plural or singular form based on the count. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.inflect( 'people' 1 ); // === 'person' + * inflection.inflect( 'octopi' 1 ); // === 'octopus' + * inflection.inflect( 'Hats' 1 ); // === 'Hat' + * inflection.inflect( 'guys', 1 , 'person' ); // === 'person' + * inflection.inflect( 'person', 2 ); // === 'people' + * inflection.inflect( 'octopus', 2 ); // === 'octopi' + * inflection.inflect( 'Hat', 2 ); // === 'Hats' + * inflection.inflect( 'person', 2, null, 'guys' ); // === 'guys' + */ + inflect : function ( str, count, singular, plural ){ + count = parseInt( count, 10 ); + + if( isNaN( count )) return str; + + if( count === 0 || count > 1 ){ + return inflector._apply_rules( str, plural_rules, uncountable_words, plural ); + }else{ + return inflector._apply_rules( str, singular_rules, uncountable_words, singular ); + } + }, + + + + /** + * This function adds camelization support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {Boolean} low_first_letter Default is to capitalize the first letter of the results.(optional) + * Passing true will lowercase it. + * @returns {String} Lower case underscored words will be returned in camel case. + * additionally '/' is translated to '::' + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.camelize( 'message_properties' ); // === 'MessageProperties' + * inflection.camelize( 'message_properties', true ); // === 'messageProperties' + */ + camelize : function ( str, low_first_letter ){ + var str_path = str.split( '/' ); + var i = 0; + var j = str_path.length; + var str_arr, init_x, k, l, first; + + for( ; i < j; i++ ){ + str_arr = str_path[ i ].split( '_' ); + k = 0; + l = str_arr.length; + + for( ; k < l; k++ ){ + if( k !== 0 ){ + str_arr[ k ] = str_arr[ k ].toLowerCase(); + } + + first = str_arr[ k ].charAt( 0 ); + first = low_first_letter && i === 0 && k === 0 + ? first.toLowerCase() : first.toUpperCase(); + str_arr[ k ] = first + str_arr[ k ].substring( 1 ); + } + + str_path[ i ] = str_arr.join( '' ); + } + + return str_path.join( '::' ); + }, + + + + /** + * This function adds underscore support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {Boolean} all_upper_case Default is to lowercase and add underscore prefix.(optional) + * Passing true will return as entered. + * @returns {String} Camel cased words are returned as lower cased and underscored. + * additionally '::' is translated to '/'. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.underscore( 'MessageProperties' ); // === 'message_properties' + * inflection.underscore( 'messageProperties' ); // === 'message_properties' + * inflection.underscore( 'MP', true ); // === 'MP' + */ + underscore : function ( str, all_upper_case ){ + if( all_upper_case && str === str.toUpperCase()) return str; + + var str_path = str.split( '::' ); + var i = 0; + var j = str_path.length; + + for( ; i < j; i++ ){ + str_path[ i ] = str_path[ i ].replace( uppercase, '_$1' ); + str_path[ i ] = str_path[ i ].replace( underbar_prefix, '' ); + } + + return str_path.join( '/' ).toLowerCase(); + }, + + + + /** + * This function adds humanize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {Boolean} low_first_letter Default is to capitalize the first letter of the results.(optional) + * Passing true will lowercase it. + * @returns {String} Lower case underscored words will be returned in humanized form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.humanize( 'message_properties' ); // === 'Message properties' + * inflection.humanize( 'message_properties', true ); // === 'message properties' + */ + humanize : function ( str, low_first_letter ){ + str = str.toLowerCase(); + str = str.replace( id_suffix, '' ); + str = str.replace( underbar, ' ' ); + + if( !low_first_letter ){ + str = inflector.capitalize( str ); + } + + return str; + }, + + + + /** + * This function adds capitalization support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} All characters will be lower case and the first will be upper. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.capitalize( 'message_properties' ); // === 'Message_properties' + * inflection.capitalize( 'message properties', true ); // === 'Message properties' + */ + capitalize : function ( str ){ + str = str.toLowerCase(); + + return str.substring( 0, 1 ).toUpperCase() + str.substring( 1 ); + }, + + + + /** + * This function replaces underscores with dashes in the string. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Replaces all spaces or underscores with dashes. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.dasherize( 'message_properties' ); // === 'message-properties' + * inflection.dasherize( 'Message Properties' ); // === 'Message-Properties' + */ + dasherize : function ( str ){ + return str.replace( space_or_underbar, '-' ); + }, + + + + /** + * This function adds titleize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Capitalizes words as you would for a book title. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.titleize( 'message_properties' ); // === 'Message Properties' + * inflection.titleize( 'message properties to keep' ); // === 'Message Properties to Keep' + */ + titleize : function ( str ){ + str = str.toLowerCase().replace( underbar, ' ' ); + var str_arr = str.split( ' ' ); + var i = 0; + var j = str_arr.length; + var d, k, l; + + for( ; i < j; i++ ){ + d = str_arr[ i ].split( '-' ); + k = 0; + l = d.length; + + for( ; k < l; k++){ + if( inflector.indexOf( non_titlecased_words, d[ k ].toLowerCase()) < 0 ){ + d[ k ] = inflector.capitalize( d[ k ]); + } + } + + str_arr[ i ] = d.join( '-' ); + } + + str = str_arr.join( ' ' ); + str = str.substring( 0, 1 ).toUpperCase() + str.substring( 1 ); + + return str; + }, + + + + /** + * This function adds demodulize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Removes module names leaving only class names.(Ruby style) + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.demodulize( 'Message::Bus::Properties' ); // === 'Properties' + */ + demodulize : function ( str ){ + var str_arr = str.split( '::' ); + + return str_arr[ str_arr.length - 1 ]; + }, + + + + /** + * This function adds tableize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Return camel cased words into their underscored plural form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.tableize( 'MessageBusProperty' ); // === 'message_bus_properties' + */ + tableize : function ( str ){ + str = inflector.underscore( str ); + str = inflector.pluralize( str ); + + return str; + }, + + + + /** + * This function adds classification support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Underscored plural nouns become the camel cased singular form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.classify( 'message_bus_properties' ); // === 'MessageBusProperty' + */ + classify : function ( str ){ + str = inflector.camelize( str ); + str = inflector.singularize( str ); + + return str; + }, + + + + /** + * This function adds foreign key support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {Boolean} drop_id_ubar Default is to seperate id with an underbar at the end of the class name, + you can pass true to skip it.(optional) + * @returns {String} Underscored plural nouns become the camel cased singular form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.foreign_key( 'MessageBusProperty' ); // === 'message_bus_property_id' + * inflection.foreign_key( 'MessageBusProperty', true ); // === 'message_bus_propertyid' + */ + foreign_key : function ( str, drop_id_ubar ){ + str = inflector.demodulize( str ); + str = inflector.underscore( str ) + (( drop_id_ubar ) ? ( '' ) : ( '_' )) + 'id'; + + return str; + }, + + + + /** + * This function adds ordinalize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Return all found numbers their sequence like '22nd'. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.ordinalize( 'the 1 pitch' ); // === 'the 1st pitch' + */ + ordinalize : function ( str ){ + var str_arr = str.split( ' ' ); + var i = 0; + var j = str_arr.length; + + for( ; i < j; i++ ){ + var k = parseInt( str_arr[ i ], 10 ); + + if( !isNaN( k )){ + var ltd = str_arr[ i ].substring( str_arr[ i ].length - 2 ); + var ld = str_arr[ i ].substring( str_arr[ i ].length - 1 ); + var suf = 'th'; + + if( ltd != '11' && ltd != '12' && ltd != '13' ){ + if( ld === '1' ){ + suf = 'st'; + }else if( ld === '2' ){ + suf = 'nd'; + }else if( ld === '3' ){ + suf = 'rd'; + } + } + + str_arr[ i ] += suf; + } + } + + return str_arr.join( ' ' ); + }, + + /** + * This function performs multiple inflection methods on a string + * @public + * @function + * @param {String} str The subject string. + * @param {Array} arr An array of inflection methods. + * @returns {String} + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.transform( 'all job', [ 'pluralize', 'capitalize', 'dasherize' ]); // === 'All-jobs' + */ + transform : function ( str, arr ){ + var i = 0; + var j = arr.length; + + for( ;i < j; i++ ){ + var method = arr[ i ]; + + if( inflector.hasOwnProperty( method )){ + str = inflector[ method ]( str ); + } + } + + return str; + } + }; + +/** + * @public + */ + inflector.version = '1.12.0'; + + return inflector; +})); diff --git a/node_modules/inflection/package.json b/node_modules/inflection/package.json new file mode 100644 index 0000000..a0f1169 --- /dev/null +++ b/node_modules/inflection/package.json @@ -0,0 +1,142 @@ +{ + "_args": [ + [ + "inflection@1.12.0", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "inflection@1.12.0", + "_id": "inflection@1.12.0", + "_inBundle": false, + "_integrity": "sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=", + "_location": "/inflection", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "inflection@1.12.0", + "name": "inflection", + "escapedName": "inflection", + "rawSpec": "1.12.0", + "saveSpec": null, + "fetchSpec": "1.12.0" + }, + "_requiredBy": [ + "/sequelize" + ], + "_resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", + "_spec": "1.12.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "dreamerslab", + "email": "ben@dreamerslab.com" + }, + "bugs": { + "url": "https://github.com/dreamerslab/node.inflection/issues" + }, + "contributors": [ + { + "name": "Ryan Schuft", + "email": "ryan.schuft@gmail.com" + }, + { + "name": "Ben Lin", + "email": "ben@dreamerslab.com" + }, + { + "name": "Lance Pollard", + "email": "lancejpollard@gmail.com" + }, + { + "name": "Dane O'Connor", + "email": "dane.oconnor@gmail.com" + }, + { + "name": "David Miró", + "email": "lite.3engine@gmail.com" + }, + { + "name": "brandondewitt" + }, + { + "name": "luk3thomas" + }, + { + "name": "Marcel Klehr" + }, + { + "name": "Raymond Feng" + }, + { + "name": "Kane Cohen", + "email": "kanecohen@gmail.com" + }, + { + "name": "Gianni Chiappetta", + "email": "gianni@runlevel6.org" + }, + { + "name": "Eric Brody" + }, + { + "name": "overlookmotel" + }, + { + "name": "Patrick Mowrer" + }, + { + "name": "Greger Olsson" + }, + { + "name": "Jason Crawford", + "email": "jason@jasoncrawford.org" + }, + { + "name": "Ray Myers", + "email": "ray.myers@gmail.com" + }, + { + "name": "Dillon Shook", + "email": "dshook@alumni.nmt.edu" + } + ], + "dependencies": {}, + "description": "A port of inflection-js to node.js module", + "devDependencies": { + "mocha": "3.2.0", + "should": "11.2.0" + }, + "engines": [ + "node >= 0.4.0" + ], + "homepage": "https://github.com/dreamerslab/node.inflection#readme", + "keywords": [ + "inflection", + "inflections", + "inflection-js", + "pluralize", + "singularize", + "camelize", + "underscore", + "humanize", + "capitalize", + "dasherize", + "titleize", + "demodulize", + "tableize", + "classify", + "foreign_key", + "ordinalize" + ], + "license": "MIT", + "main": "./lib/inflection.js", + "name": "inflection", + "repository": { + "type": "git", + "url": "git+https://github.com/dreamerslab/node.inflection.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "1.12.0" +} diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/node_modules/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/node_modules/inherits/README.md b/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/node_modules/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/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js new file mode 100644 index 0000000..3b94763 --- /dev/null +++ b/node_modules/inherits/inherits.js @@ -0,0 +1,7 @@ +try { + var util = require('util'); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = require('./inherits_browser.js'); +} diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..c1e78a7 --- /dev/null +++ b/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, 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) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json new file mode 100644 index 0000000..e0e176f --- /dev/null +++ b/node_modules/inherits/package.json @@ -0,0 +1,64 @@ +{ + "_args": [ + [ + "inherits@2.0.3", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "inherits@2.0.3", + "_id": "inherits@2.0.3", + "_inBundle": false, + "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "_location": "/inherits", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "inherits@2.0.3", + "name": "inherits", + "escapedName": "inherits", + "rawSpec": "2.0.3", + "saveSpec": null, + "fetchSpec": "2.0.3" + }, + "_requiredBy": [ + "/http-errors" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "_spec": "2.0.3", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "devDependencies": { + "tap": "^7.1.0" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ], + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "license": "ISC", + "main": "./inherits.js", + "name": "inherits", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.0.3" +} diff --git a/node_modules/ini/LICENSE b/node_modules/ini/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/ini/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/node_modules/ini/README.md b/node_modules/ini/README.md new file mode 100644 index 0000000..33df258 --- /dev/null +++ b/node_modules/ini/README.md @@ -0,0 +1,102 @@ +An ini format parser and serializer for node. + +Sections are treated as nested objects. Items before the first +heading are saved on the object directly. + +## Usage + +Consider an ini-file `config.ini` that looks like this: + + ; this comment is being ignored + scope = global + + [database] + user = dbuser + password = dbpassword + database = use_this_database + + [paths.default] + datadir = /var/lib/data + array[] = first value + array[] = second value + array[] = third value + +You can read, manipulate and write the ini-file like so: + + var fs = require('fs') + , ini = require('ini') + + var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')) + + config.scope = 'local' + config.database.database = 'use_another_database' + config.paths.default.tmpdir = '/tmp' + delete config.paths.default.datadir + config.paths.default.array.push('fourth value') + + fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' })) + +This will result in a file called `config_modified.ini` being written +to the filesystem with the following content: + + [section] + scope=local + [section.database] + user=dbuser + password=dbpassword + database=use_another_database + [section.paths.default] + tmpdir=/tmp + array[]=first value + array[]=second value + array[]=third value + array[]=fourth value + + +## API + +### decode(inistring) + +Decode the ini-style formatted `inistring` into a nested object. + +### parse(inistring) + +Alias for `decode(inistring)` + +### encode(object, [options]) + +Encode the object `object` into an ini-style formatted string. If the +optional parameter `section` is given, then all top-level properties +of the object are put into this section and the `section`-string is +prepended to all sub-sections, see the usage example above. + +The `options` object may contain the following: + +* `section` A string which will be the first `section` in the encoded + ini data. Defaults to none. +* `whitespace` Boolean to specify whether to put whitespace around the + `=` character. By default, whitespace is omitted, to be friendly to + some persnickety old parsers that don't tolerate it well. But some + find that it's more human-readable and pretty with the whitespace. + +For backwards compatibility reasons, if a `string` options is passed +in, then it is assumed to be the `section` value. + +### stringify(object, [options]) + +Alias for `encode(object, [options])` + +### safe(val) + +Escapes the string `val` such that it is safe to be used as a key or +value in an ini-file. Basically escapes quotes. For example + + ini.safe('"unsafe string"') + +would result in + + "\"unsafe string\"" + +### unsafe(val) + +Unescapes the string `val` diff --git a/node_modules/ini/ini.js b/node_modules/ini/ini.js new file mode 100644 index 0000000..590195d --- /dev/null +++ b/node_modules/ini/ini.js @@ -0,0 +1,194 @@ +exports.parse = exports.decode = decode + +exports.stringify = exports.encode = encode + +exports.safe = safe +exports.unsafe = unsafe + +var eol = typeof process !== 'undefined' && + process.platform === 'win32' ? '\r\n' : '\n' + +function encode (obj, opt) { + var children = [] + var out = '' + + if (typeof opt === 'string') { + opt = { + section: opt, + whitespace: false + } + } else { + opt = opt || {} + opt.whitespace = opt.whitespace === true + } + + var separator = opt.whitespace ? ' = ' : '=' + + Object.keys(obj).forEach(function (k, _, __) { + var val = obj[k] + if (val && Array.isArray(val)) { + val.forEach(function (item) { + out += safe(k + '[]') + separator + safe(item) + '\n' + }) + } else if (val && typeof val === 'object') { + children.push(k) + } else { + out += safe(k) + separator + safe(val) + eol + } + }) + + if (opt.section && out.length) { + out = '[' + safe(opt.section) + ']' + eol + out + } + + children.forEach(function (k, _, __) { + var nk = dotSplit(k).join('\\.') + var section = (opt.section ? opt.section + '.' : '') + nk + var child = encode(obj[k], { + section: section, + whitespace: opt.whitespace + }) + if (out.length && child.length) { + out += eol + } + out += child + }) + + return out +} + +function dotSplit (str) { + return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') + .replace(/\\\./g, '\u0001') + .split(/\./).map(function (part) { + return part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') + }) +} + +function decode (str) { + var out = {} + var p = out + var section = null + // section |key = value + var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i + var lines = str.split(/[\r\n]+/g) + + lines.forEach(function (line, _, __) { + if (!line || line.match(/^\s*[;#]/)) return + var match = line.match(re) + if (!match) return + if (match[1] !== undefined) { + section = unsafe(match[1]) + p = out[section] = out[section] || {} + return + } + var key = unsafe(match[2]) + var value = match[3] ? unsafe(match[4]) : true + switch (value) { + case 'true': + case 'false': + case 'null': value = JSON.parse(value) + } + + // Convert keys with '[]' suffix to an array + if (key.length > 2 && key.slice(-2) === '[]') { + key = key.substring(0, key.length - 2) + if (!p[key]) { + p[key] = [] + } else if (!Array.isArray(p[key])) { + p[key] = [p[key]] + } + } + + // safeguard against resetting a previously defined + // array by accidentally forgetting the brackets + if (Array.isArray(p[key])) { + p[key].push(value) + } else { + p[key] = value + } + }) + + // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} + // use a filter to return the keys that have to be deleted. + Object.keys(out).filter(function (k, _, __) { + if (!out[k] || + typeof out[k] !== 'object' || + Array.isArray(out[k])) { + return false + } + // see if the parent section is also an object. + // if so, add it to that, and mark this one for deletion + var parts = dotSplit(k) + var p = out + var l = parts.pop() + var nl = l.replace(/\\\./g, '.') + parts.forEach(function (part, _, __) { + if (!p[part] || typeof p[part] !== 'object') p[part] = {} + p = p[part] + }) + if (p === out && nl === l) { + return false + } + p[nl] = out[k] + return true + }).forEach(function (del, _, __) { + delete out[del] + }) + + return out +} + +function isQuoted (val) { + return (val.charAt(0) === '"' && val.slice(-1) === '"') || + (val.charAt(0) === "'" && val.slice(-1) === "'") +} + +function safe (val) { + return (typeof val !== 'string' || + val.match(/[=\r\n]/) || + val.match(/^\[/) || + (val.length > 1 && + isQuoted(val)) || + val !== val.trim()) + ? JSON.stringify(val) + : val.replace(/;/g, '\\;').replace(/#/g, '\\#') +} + +function unsafe (val, doUnesc) { + val = (val || '').trim() + if (isQuoted(val)) { + // remove the single quotes before calling JSON.parse + if (val.charAt(0) === "'") { + val = val.substr(1, val.length - 2) + } + try { val = JSON.parse(val) } catch (_) {} + } else { + // walk the val to find the first not-escaped ; character + var esc = false + var unesc = '' + for (var i = 0, l = val.length; i < l; i++) { + var c = val.charAt(i) + if (esc) { + if ('\\;#'.indexOf(c) !== -1) { + unesc += c + } else { + unesc += '\\' + c + } + esc = false + } else if (';#'.indexOf(c) !== -1) { + break + } else if (c === '\\') { + esc = true + } else { + unesc += c + } + } + if (esc) { + unesc += '\\' + } + return unesc.trim() + } + return val +} diff --git a/node_modules/ini/package.json b/node_modules/ini/package.json new file mode 100644 index 0000000..f2ba5d2 --- /dev/null +++ b/node_modules/ini/package.json @@ -0,0 +1,64 @@ +{ + "_from": "ini@^1.3.4", + "_id": "ini@1.3.5", + "_inBundle": false, + "_integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "_location": "/ini", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ini@^1.3.4", + "name": "ini", + "escapedName": "ini", + "rawSpec": "^1.3.4", + "saveSpec": null, + "fetchSpec": "^1.3.4" + }, + "_requiredBy": [ + "/global-dirs", + "/rc" + ], + "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "_shasum": "eee25f56db1c9ec6085e0c22778083f596abf927", + "_spec": "ini@^1.3.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/global-dirs", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/ini/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "An ini encoder/decoder for node", + "devDependencies": { + "standard": "^10.0.3", + "tap": "^10.7.3 || 11" + }, + "engines": { + "node": "*" + }, + "files": [ + "ini.js" + ], + "homepage": "https://github.com/isaacs/ini#readme", + "license": "ISC", + "main": "ini.js", + "name": "ini", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/ini.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "pretest": "standard ini.js", + "preversion": "npm test", + "test": "tap test/*.js --100 -J" + }, + "version": "1.3.5" +} diff --git a/node_modules/invert-kv/index.js b/node_modules/invert-kv/index.js new file mode 100644 index 0000000..61e2196 --- /dev/null +++ b/node_modules/invert-kv/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (obj) { + if (typeof obj !== 'object') { + throw new TypeError('Expected an object'); + } + + var ret = {}; + + for (var key in obj) { + var val = obj[key]; + ret[val] = key; + } + + return ret; +}; diff --git a/node_modules/invert-kv/package.json b/node_modules/invert-kv/package.json new file mode 100644 index 0000000..9ca30e5 --- /dev/null +++ b/node_modules/invert-kv/package.json @@ -0,0 +1,65 @@ +{ + "_from": "invert-kv@^1.0.0", + "_id": "invert-kv@1.0.0", + "_inBundle": false, + "_integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "_location": "/invert-kv", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "invert-kv@^1.0.0", + "name": "invert-kv", + "escapedName": "invert-kv", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/lcid" + ], + "_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "_shasum": "104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6", + "_spec": "invert-kv@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/lcid", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/invert-kv/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/invert-kv#readme", + "keywords": [ + "object", + "obj", + "key", + "value", + "val", + "kv", + "invert" + ], + "license": "MIT", + "name": "invert-kv", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/invert-kv.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/node_modules/invert-kv/readme.md b/node_modules/invert-kv/readme.md new file mode 100644 index 0000000..039fc7c --- /dev/null +++ b/node_modules/invert-kv/readme.md @@ -0,0 +1,25 @@ +# invert-kv [![Build Status](https://travis-ci.org/sindresorhus/invert-kv.svg?branch=master)](https://travis-ci.org/sindresorhus/invert-kv) + +> Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}` + + +## Install + +```sh +$ npm install --save invert-kv +``` + + +## Usage + +```js +var invertKv = require('invert-kv'); + +invertKv({foo: 'bar', unicorn: 'rainbow'}); +//=> {bar: 'foo', rainbow: 'unicorn'} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/ipaddr.js/.npmignore b/node_modules/ipaddr.js/.npmignore new file mode 100644 index 0000000..7a1537b --- /dev/null +++ b/node_modules/ipaddr.js/.npmignore @@ -0,0 +1,2 @@ +.idea +node_modules diff --git a/node_modules/ipaddr.js/.travis.yml b/node_modules/ipaddr.js/.travis.yml new file mode 100644 index 0000000..aa3d14a --- /dev/null +++ b/node_modules/ipaddr.js/.travis.yml @@ -0,0 +1,10 @@ +language: node_js + +node_js: + - "0.10" + - "0.11" + - "0.12" + - "4.0" + - "4.1" + - "4.2" + - "5" diff --git a/node_modules/ipaddr.js/Cakefile b/node_modules/ipaddr.js/Cakefile new file mode 100644 index 0000000..801b905 --- /dev/null +++ b/node_modules/ipaddr.js/Cakefile @@ -0,0 +1,14 @@ +fs = require 'fs' +CoffeeScript = require 'coffee-script' +nodeunit = require 'nodeunit' +UglifyJS = require 'uglify-js' + +task 'build', 'build javascript files from sources', (cb) -> + source = fs.readFileSync 'src/ipaddr.coffee', 'utf-8' + fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString() + + source = fs.readFileSync 'lib/ipaddr.js', 'utf-8' + fs.writeFileSync('ipaddr.min.js', UglifyJS.minify(source).code) + +task 'test', 'run the bundled tests', (cb) -> + nodeunit.reporters.default.run ['test'] diff --git a/node_modules/ipaddr.js/LICENSE b/node_modules/ipaddr.js/LICENSE new file mode 100644 index 0000000..f6b37b5 --- /dev/null +++ b/node_modules/ipaddr.js/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011-2017 whitequark + +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/node_modules/ipaddr.js/README.md b/node_modules/ipaddr.js/README.md new file mode 100644 index 0000000..6876a3b --- /dev/null +++ b/node_modules/ipaddr.js/README.md @@ -0,0 +1,233 @@ +# ipaddr.js — an IPv6 and IPv4 address manipulation library [![Build Status](https://travis-ci.org/whitequark/ipaddr.js.svg)](https://travis-ci.org/whitequark/ipaddr.js) + +ipaddr.js is a small (1.9K minified and gzipped) library for manipulating +IP addresses in JavaScript environments. It runs on both CommonJS runtimes +(e.g. [nodejs]) and in a web browser. + +ipaddr.js allows you to verify and parse string representation of an IP +address, match it against a CIDR range or range list, determine if it falls +into some reserved ranges (examples include loopback and private ranges), +and convert between IPv4 and IPv4-mapped IPv6 addresses. + +[nodejs]: http://nodejs.org + +## Installation + +`npm install ipaddr.js` + +or + +`bower install ipaddr.js` + +## API + +ipaddr.js defines one object in the global scope: `ipaddr`. In CommonJS, +it is exported from the module: + +```js +var ipaddr = require('ipaddr.js'); +``` + +The API consists of several global methods and two classes: ipaddr.IPv6 and ipaddr.IPv4. + +### Global methods + +There are three global methods defined: `ipaddr.isValid`, `ipaddr.parse` and +`ipaddr.process`. All of them receive a string as a single parameter. + +The `ipaddr.isValid` method returns `true` if the address is a valid IPv4 or +IPv6 address, and `false` otherwise. It does not throw any exceptions. + +The `ipaddr.parse` method returns an object representing the IP address, +or throws an `Error` if the passed string is not a valid representation of an +IP address. + +The `ipaddr.process` method works just like the `ipaddr.parse` one, but it +automatically converts IPv4-mapped IPv6 addresses to their IPv4 counterparts +before returning. It is useful when you have a Node.js instance listening +on an IPv6 socket, and the `net.ivp6.bindv6only` sysctl parameter (or its +equivalent on non-Linux OS) is set to 0. In this case, you can accept IPv4 +connections on your IPv6-only socket, but the remote address will be mangled. +Use `ipaddr.process` method to automatically demangle it. + +### Object representation + +Parsing methods return an object which descends from `ipaddr.IPv6` or +`ipaddr.IPv4`. These objects share some properties, but most of them differ. + +#### Shared properties + +One can determine the type of address by calling `addr.kind()`. It will return +either `"ipv6"` or `"ipv4"`. + +An address can be converted back to its string representation with `addr.toString()`. +Note that this method: + * does not return the original string used to create the object (in fact, there is + no way of getting that string) + * returns a compact representation (when it is applicable) + +A `match(range, bits)` method can be used to check if the address falls into a +certain CIDR range. +Note that an address can be (obviously) matched only against an address of the same type. + +For example: + +```js +var addr = ipaddr.parse("2001:db8:1234::1"); +var range = ipaddr.parse("2001:db8::"); + +addr.match(range, 32); // => true +``` + +Alternatively, `match` can also be called as `match([range, bits])`. In this way, +it can be used together with the `parseCIDR(string)` method, which parses an IP +address together with a CIDR range. + +For example: + +```js +var addr = ipaddr.parse("2001:db8:1234::1"); + +addr.match(ipaddr.parseCIDR("2001:db8::/32")); // => true +``` + +A `range()` method returns one of predefined names for several special ranges defined +by IP protocols. The exact names (and their respective CIDR ranges) can be looked up +in the source: [IPv6 ranges] and [IPv4 ranges]. Some common ones include `"unicast"` +(the default one) and `"reserved"`. + +You can match against your own range list by using +`ipaddr.subnetMatch(address, rangeList, defaultName)` method. It can work with a mix of IPv6 or IPv4 addresses, and accepts a name-to-subnet map as the range list. For example: + +```js +var rangeList = { + documentationOnly: [ ipaddr.parse('2001:db8::'), 32 ], + tunnelProviders: [ + [ ipaddr.parse('2001:470::'), 32 ], // he.net + [ ipaddr.parse('2001:5c0::'), 32 ] // freenet6 + ] +}; +ipaddr.subnetMatch(ipaddr.parse('2001:470:8:66::1'), rangeList, 'unknown'); // => "tunnelProviders" +``` + +The addresses can be converted to their byte representation with `toByteArray()`. +(Actually, JavaScript mostly does not know about byte buffers. They are emulated with +arrays of numbers, each in range of 0..255.) + +```js +var bytes = ipaddr.parse('2a00:1450:8007::68').toByteArray(); // ipv6.google.com +bytes // => [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, , 0x00, 0x68 ] +``` + +The `ipaddr.IPv4` and `ipaddr.IPv6` objects have some methods defined, too. All of them +have the same interface for both protocols, and are similar to global methods. + +`ipaddr.IPvX.isValid(string)` can be used to check if the string is a valid address +for particular protocol, and `ipaddr.IPvX.parse(string)` is the error-throwing parser. + +`ipaddr.IPvX.isValid(string)` uses the same format for parsing as the POSIX `inet_ntoa` function, which accepts unusual formats like `0xc0.168.1.1` or `0x10000000`. The function `ipaddr.IPv4.isValidFourPartDecimal(string)` validates the IPv4 address and also ensures that it is written in four-part decimal format. + +[IPv6 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L186 +[IPv4 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L71 + +#### IPv6 properties + +Sometimes you will want to convert IPv6 not to a compact string representation (with +the `::` substitution); the `toNormalizedString()` method will return an address where +all zeroes are explicit. + +For example: + +```js +var addr = ipaddr.parse("2001:0db8::0001"); +addr.toString(); // => "2001:db8::1" +addr.toNormalizedString(); // => "2001:db8:0:0:0:0:0:1" +``` + +The `isIPv4MappedAddress()` method will return `true` if this address is an IPv4-mapped +one, and `toIPv4Address()` will return an IPv4 object address. + +To access the underlying binary representation of the address, use `addr.parts`. + +```js +var addr = ipaddr.parse("2001:db8:10::1234:DEAD"); +addr.parts // => [0x2001, 0xdb8, 0x10, 0, 0, 0, 0x1234, 0xdead] +``` + +A IPv6 zone index can be accessed via `addr.zoneId`: + +```js +var addr = ipaddr.parse("2001:db8::%eth0"); +addr.zoneId // => 'eth0' +``` + +#### IPv4 properties + +`toIPv4MappedAddress()` will return a corresponding IPv4-mapped IPv6 address. + +To access the underlying representation of the address, use `addr.octets`. + +```js +var addr = ipaddr.parse("192.168.1.1"); +addr.octets // => [192, 168, 1, 1] +``` + +`prefixLengthFromSubnetMask()` will return a CIDR prefix length for a valid IPv4 netmask or +false if the netmask is not valid. + +```js +ipaddr.IPv4.parse('255.255.255.240').prefixLengthFromSubnetMask() == 28 +ipaddr.IPv4.parse('255.192.164.0').prefixLengthFromSubnetMask() == null +``` + +`subnetMaskFromPrefixLength()` will return an IPv4 netmask for a valid CIDR prefix length. + +```js +ipaddr.IPv4.subnetMaskFromPrefixLength(24) == "255.255.255.0" +ipaddr.IPv4.subnetMaskFromPrefixLength(29) == "255.255.255.248" +``` + +`broadcastAddressFromCIDR()` will return the broadcast address for a given IPv4 interface and netmask in CIDR notation. +```js +ipaddr.IPv4.broadcastAddressFromCIDR("172.0.0.1/24") == "172.0.0.255" +``` +`networkAddressFromCIDR()` will return the network address for a given IPv4 interface and netmask in CIDR notation. +```js +ipaddr.IPv4.networkAddressFromCIDR("172.0.0.1/24") == "172.0.0.0" +``` + +#### Conversion + +IPv4 and IPv6 can be converted bidirectionally to and from network byte order (MSB) byte arrays. + +The `fromByteArray()` method will take an array and create an appropriate IPv4 or IPv6 object +if the input satisfies the requirements. For IPv4 it has to be an array of four 8-bit values, +while for IPv6 it has to be an array of sixteen 8-bit values. + +For example: +```js +var addr = ipaddr.fromByteArray([0x7f, 0, 0, 1]); +addr.toString(); // => "127.0.0.1" +``` + +or + +```js +var addr = ipaddr.fromByteArray([0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) +addr.toString(); // => "2001:db8::1" +``` + +Both objects also offer a `toByteArray()` method, which returns an array in network byte order (MSB). + +For example: +```js +var addr = ipaddr.parse("127.0.0.1"); +addr.toByteArray(); // => [0x7f, 0, 0, 1] +``` + +or + +```js +var addr = ipaddr.parse("2001:db8::1"); +addr.toByteArray(); // => [0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] +``` diff --git a/node_modules/ipaddr.js/bower.json b/node_modules/ipaddr.js/bower.json new file mode 100644 index 0000000..2913771 --- /dev/null +++ b/node_modules/ipaddr.js/bower.json @@ -0,0 +1,29 @@ +{ + "name": "ipaddr.js", + "version": "1.6.0", + "homepage": "https://github.com/whitequark/ipaddr.js", + "authors": [ + "whitequark " + ], + "description": "IP address manipulation library in JavaScript (CoffeeScript, actually)", + "main": "lib/ipaddr.js", + "moduleType": [ + "globals", + "node" + ], + "keywords": [ + "javscript", + "ip", + "address", + "ipv4", + "ipv6" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/node_modules/ipaddr.js/ipaddr.min.js b/node_modules/ipaddr.js/ipaddr.min.js new file mode 100644 index 0000000..d0cccf7 --- /dev/null +++ b/node_modules/ipaddr.js/ipaddr.min.js @@ -0,0 +1 @@ +(function(){var r,t,n,e,i,o,a,s;t={},s=this,"undefined"!=typeof module&&null!==module&&module.exports?module.exports=t:s.ipaddr=t,a=function(r,t,n,e){var i,o;if(r.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;e>0;){if((o=n-e)<0&&(o=0),r[i]>>o!=t[i]>>o)return!1;e-=n,i+=1}return!0},t.subnetMatch=function(r,t,n){var e,i,o,a,s;null==n&&(n="unicast");for(o in t)for(!(a=t[o])[0]||a[0]instanceof Array||(a=[a]),e=0,i=a.length;e=0;t=n+=-1){if(!((e=this.octets[t])in a))return null;if(o=a[e],i&&0!==o)return null;8!==o&&(i=!0),r+=o}return 32-r},r}(),n="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp("^"+n+"\\."+n+"\\."+n+"\\."+n+"$","i"),longValue:new RegExp("^"+n+"$","i")},t.IPv4.parser=function(r){var t,n,i,o,a;if(n=function(r){return"0"===r[0]&&"x"!==r[1]?parseInt(r,8):parseInt(r)},t=r.match(e.fourOctet))return function(){var r,e,o,a;for(a=[],r=0,e=(o=t.slice(1,6)).length;r4294967295||a<0)throw new Error("ipaddr: address outside defined range");return function(){var r,t;for(t=[],o=r=0;r<=24;o=r+=8)t.push(a>>o&255);return t}().reverse()}return null},t.IPv6=function(){function r(r,t){var n,e,i,o,a,s;if(16===r.length)for(this.parts=[],n=e=0;e<=14;n=e+=2)this.parts.push(r[n]<<8|r[n+1]);else{if(8!==r.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=r}for(i=0,o=(s=this.parts).length;i>8),r.push(255&e);return r},r.prototype.toNormalizedString=function(){var r,t,n;return r=function(){var r,n,e,i;for(i=[],r=0,n=(e=this.parts).length;r>8,255&r,n>>8,255&n])},r.prototype.prefixLengthFromSubnetMask=function(){var r,t,n,e,i,o,a;for(a={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},r=0,i=!1,t=n=7;n>=0;t=n+=-1){if(!((e=this.parts[t])in a))return null;if(o=a[e],i&&0!==o)return null;16!==o&&(i=!0),r+=o}return 128-r},r}(),i="(?:[0-9a-f]+::?)+",o={zoneIndex:new RegExp("%[0-9a-z]{1,}","i"),native:new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?(%[0-9a-z]{1,})?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+n+"\\."+n+"\\."+n+"\\."+n+"(%[0-9a-z]{1,})?$","i")},r=function(r,t){var n,e,i,a,s,p;if(r.indexOf("::")!==r.lastIndexOf("::"))return null;for((p=(r.match(o.zoneIndex)||[])[0])&&(p=p.substring(1),r=r.replace(/%.+$/,"")),n=0,e=-1;(e=r.indexOf(":",e+1))>=0;)n++;if("::"===r.substr(0,2)&&n--,"::"===r.substr(-2,2)&&n--,n>t)return null;for(s=t-n,a=":";s--;)a+="0:";return":"===(r=r.replace("::",a))[0]&&(r=r.slice(1)),":"===r[r.length-1]&&(r=r.slice(0,-1)),t=function(){var t,n,e,o;for(o=[],t=0,n=(e=r.split(":")).length;t=0&&t<=32)return[this.parse(n[1]),t];throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},t.IPv4.subnetMaskFromPrefixLength=function(r){var t,n,e;if((r=parseInt(r))<0||r>32)throw new Error("ipaddr: invalid IPv4 prefix length");for(e=[0,0,0,0],n=0,t=Math.floor(r/8);n=0&&t<=128)return[this.parse(n[1]),t];throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},t.isValid=function(r){return t.IPv6.isValid(r)||t.IPv4.isValid(r)},t.parse=function(r){if(t.IPv6.isValid(r))return t.IPv6.parse(r);if(t.IPv4.isValid(r))return t.IPv4.parse(r);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},t.parseCIDR=function(r){try{return t.IPv6.parseCIDR(r)}catch(n){n;try{return t.IPv4.parseCIDR(r)}catch(r){throw r,new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},t.fromByteArray=function(r){var n;if(4===(n=r.length))return new t.IPv4(r);if(16===n)return new t.IPv6(r);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},t.process=function(r){var t;return t=this.parse(r),"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t}}).call(this); \ No newline at end of file diff --git a/node_modules/ipaddr.js/lib/ipaddr.js b/node_modules/ipaddr.js/lib/ipaddr.js new file mode 100644 index 0000000..27ba2a2 --- /dev/null +++ b/node_modules/ipaddr.js/lib/ipaddr.js @@ -0,0 +1,624 @@ +(function() { + var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex; + + ipaddr = {}; + + root = this; + + if ((typeof module !== "undefined" && module !== null) && module.exports) { + module.exports = ipaddr; + } else { + root['ipaddr'] = ipaddr; + } + + matchCIDR = function(first, second, partSize, cidrBits) { + var part, shift; + if (first.length !== second.length) { + throw new Error("ipaddr: cannot match CIDR for objects with different lengths"); + } + part = 0; + while (cidrBits > 0) { + shift = partSize - cidrBits; + if (shift < 0) { + shift = 0; + } + if (first[part] >> shift !== second[part] >> shift) { + return false; + } + cidrBits -= partSize; + part += 1; + } + return true; + }; + + ipaddr.subnetMatch = function(address, rangeList, defaultName) { + var k, len, rangeName, rangeSubnets, subnet; + if (defaultName == null) { + defaultName = 'unicast'; + } + for (rangeName in rangeList) { + rangeSubnets = rangeList[rangeName]; + if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) { + rangeSubnets = [rangeSubnets]; + } + for (k = 0, len = rangeSubnets.length; k < len; k++) { + subnet = rangeSubnets[k]; + if (address.kind() === subnet[0].kind()) { + if (address.match.apply(address, subnet)) { + return rangeName; + } + } + } + } + return defaultName; + }; + + ipaddr.IPv4 = (function() { + function IPv4(octets) { + var k, len, octet; + if (octets.length !== 4) { + throw new Error("ipaddr: ipv4 octet count should be 4"); + } + for (k = 0, len = octets.length; k < len; k++) { + octet = octets[k]; + if (!((0 <= octet && octet <= 255))) { + throw new Error("ipaddr: ipv4 octet should fit in 8 bits"); + } + } + this.octets = octets; + } + + IPv4.prototype.kind = function() { + return 'ipv4'; + }; + + IPv4.prototype.toString = function() { + return this.octets.join("."); + }; + + IPv4.prototype.toNormalizedString = function() { + return this.toString(); + }; + + IPv4.prototype.toByteArray = function() { + return this.octets.slice(0); + }; + + IPv4.prototype.match = function(other, cidrRange) { + var ref; + if (cidrRange === void 0) { + ref = other, other = ref[0], cidrRange = ref[1]; + } + if (other.kind() !== 'ipv4') { + throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one"); + } + return matchCIDR(this.octets, other.octets, 8, cidrRange); + }; + + IPv4.prototype.SpecialRanges = { + unspecified: [[new IPv4([0, 0, 0, 0]), 8]], + broadcast: [[new IPv4([255, 255, 255, 255]), 32]], + multicast: [[new IPv4([224, 0, 0, 0]), 4]], + linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], + loopback: [[new IPv4([127, 0, 0, 0]), 8]], + carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]], + "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]], + reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]] + }; + + IPv4.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + + IPv4.prototype.toIPv4MappedAddress = function() { + return ipaddr.IPv6.parse("::ffff:" + (this.toString())); + }; + + IPv4.prototype.prefixLengthFromSubnetMask = function() { + var cidr, i, k, octet, stop, zeros, zerotable; + zerotable = { + 0: 8, + 128: 7, + 192: 6, + 224: 5, + 240: 4, + 248: 3, + 252: 2, + 254: 1, + 255: 0 + }; + cidr = 0; + stop = false; + for (i = k = 3; k >= 0; i = k += -1) { + octet = this.octets[i]; + if (octet in zerotable) { + zeros = zerotable[octet]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 8) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 32 - cidr; + }; + + return IPv4; + + })(); + + ipv4Part = "(0?\\d+|0x[a-f0-9]+)"; + + ipv4Regexes = { + fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", 'i'), + longValue: new RegExp("^" + ipv4Part + "$", 'i') + }; + + ipaddr.IPv4.parser = function(string) { + var match, parseIntAuto, part, shift, value; + parseIntAuto = function(string) { + if (string[0] === "0" && string[1] !== "x") { + return parseInt(string, 8); + } else { + return parseInt(string); + } + }; + if (match = string.match(ipv4Regexes.fourOctet)) { + return (function() { + var k, len, ref, results; + ref = match.slice(1, 6); + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(parseIntAuto(part)); + } + return results; + })(); + } else if (match = string.match(ipv4Regexes.longValue)) { + value = parseIntAuto(match[1]); + if (value > 0xffffffff || value < 0) { + throw new Error("ipaddr: address outside defined range"); + } + return ((function() { + var k, results; + results = []; + for (shift = k = 0; k <= 24; shift = k += 8) { + results.push((value >> shift) & 0xff); + } + return results; + })()).reverse(); + } else { + return null; + } + }; + + ipaddr.IPv6 = (function() { + function IPv6(parts, zoneId) { + var i, k, l, len, part, ref; + if (parts.length === 16) { + this.parts = []; + for (i = k = 0; k <= 14; i = k += 2) { + this.parts.push((parts[i] << 8) | parts[i + 1]); + } + } else if (parts.length === 8) { + this.parts = parts; + } else { + throw new Error("ipaddr: ipv6 part count should be 8 or 16"); + } + ref = this.parts; + for (l = 0, len = ref.length; l < len; l++) { + part = ref[l]; + if (!((0 <= part && part <= 0xffff))) { + throw new Error("ipaddr: ipv6 part should fit in 16 bits"); + } + } + if (zoneId) { + this.zoneId = zoneId; + } + } + + IPv6.prototype.kind = function() { + return 'ipv6'; + }; + + IPv6.prototype.toString = function() { + return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, '::'); + }; + + IPv6.prototype.toByteArray = function() { + var bytes, k, len, part, ref; + bytes = []; + ref = this.parts; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + bytes.push(part >> 8); + bytes.push(part & 0xff); + } + return bytes; + }; + + IPv6.prototype.toNormalizedString = function() { + var addr, part, suffix; + addr = ((function() { + var k, len, ref, results; + ref = this.parts; + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(part.toString(16)); + } + return results; + }).call(this)).join(":"); + suffix = ''; + if (this.zoneId) { + suffix = '%' + this.zoneId; + } + return addr + suffix; + }; + + IPv6.prototype.match = function(other, cidrRange) { + var ref; + if (cidrRange === void 0) { + ref = other, other = ref[0], cidrRange = ref[1]; + } + if (other.kind() !== 'ipv6') { + throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one"); + } + return matchCIDR(this.parts, other.parts, 16, cidrRange); + }; + + IPv6.prototype.SpecialRanges = { + unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], + linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10], + multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8], + loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], + uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7], + ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96], + rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96], + rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96], + '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16], + teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32], + reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]] + }; + + IPv6.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + + IPv6.prototype.isIPv4MappedAddress = function() { + return this.range() === 'ipv4Mapped'; + }; + + IPv6.prototype.toIPv4Address = function() { + var high, low, ref; + if (!this.isIPv4MappedAddress()) { + throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4"); + } + ref = this.parts.slice(-2), high = ref[0], low = ref[1]; + return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]); + }; + + IPv6.prototype.prefixLengthFromSubnetMask = function() { + var cidr, i, k, part, stop, zeros, zerotable; + zerotable = { + 0: 16, + 32768: 15, + 49152: 14, + 57344: 13, + 61440: 12, + 63488: 11, + 64512: 10, + 65024: 9, + 65280: 8, + 65408: 7, + 65472: 6, + 65504: 5, + 65520: 4, + 65528: 3, + 65532: 2, + 65534: 1, + 65535: 0 + }; + cidr = 0; + stop = false; + for (i = k = 7; k >= 0; i = k += -1) { + part = this.parts[i]; + if (part in zerotable) { + zeros = zerotable[part]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 16) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 128 - cidr; + }; + + return IPv6; + + })(); + + ipv6Part = "(?:[0-9a-f]+::?)+"; + + zoneIndex = "%[0-9a-z]{1,}"; + + ipv6Regexes = { + zoneIndex: new RegExp(zoneIndex, 'i'), + "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?(" + zoneIndex + ")?$", 'i'), + transitional: new RegExp(("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)") + (ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part) + ("(" + zoneIndex + ")?$"), 'i') + }; + + expandIPv6 = function(string, parts) { + var colonCount, lastColon, part, replacement, replacementCount, zoneId; + if (string.indexOf('::') !== string.lastIndexOf('::')) { + return null; + } + zoneId = (string.match(ipv6Regexes['zoneIndex']) || [])[0]; + if (zoneId) { + zoneId = zoneId.substring(1); + string = string.replace(/%.+$/, ''); + } + colonCount = 0; + lastColon = -1; + while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) { + colonCount++; + } + if (string.substr(0, 2) === '::') { + colonCount--; + } + if (string.substr(-2, 2) === '::') { + colonCount--; + } + if (colonCount > parts) { + return null; + } + replacementCount = parts - colonCount; + replacement = ':'; + while (replacementCount--) { + replacement += '0:'; + } + string = string.replace('::', replacement); + if (string[0] === ':') { + string = string.slice(1); + } + if (string[string.length - 1] === ':') { + string = string.slice(0, -1); + } + parts = (function() { + var k, len, ref, results; + ref = string.split(":"); + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(parseInt(part, 16)); + } + return results; + })(); + return { + parts: parts, + zoneId: zoneId + }; + }; + + ipaddr.IPv6.parser = function(string) { + var addr, k, len, match, octet, octets, zoneId; + if (ipv6Regexes['native'].test(string)) { + return expandIPv6(string, 8); + } else if (match = string.match(ipv6Regexes['transitional'])) { + zoneId = match[6] || ''; + addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6); + if (addr.parts) { + octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])]; + for (k = 0, len = octets.length; k < len; k++) { + octet = octets[k]; + if (!((0 <= octet && octet <= 255))) { + return null; + } + } + addr.parts.push(octets[0] << 8 | octets[1]); + addr.parts.push(octets[2] << 8 | octets[3]); + return { + parts: addr.parts, + zoneId: addr.zoneId + }; + } + } + return null; + }; + + ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) { + return this.parser(string) !== null; + }; + + ipaddr.IPv4.isValid = function(string) { + var e; + try { + new this(this.parser(string)); + return true; + } catch (error1) { + e = error1; + return false; + } + }; + + ipaddr.IPv4.isValidFourPartDecimal = function(string) { + if (ipaddr.IPv4.isValid(string) && string.match(/^\d+(\.\d+){3}$/)) { + return true; + } else { + return false; + } + }; + + ipaddr.IPv6.isValid = function(string) { + var addr, e; + if (typeof string === "string" && string.indexOf(":") === -1) { + return false; + } + try { + addr = this.parser(string); + new this(addr.parts, addr.zoneId); + return true; + } catch (error1) { + e = error1; + return false; + } + }; + + ipaddr.IPv4.parse = function(string) { + var parts; + parts = this.parser(string); + if (parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(parts); + }; + + ipaddr.IPv6.parse = function(string) { + var addr; + addr = this.parser(string); + if (addr.parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(addr.parts, addr.zoneId); + }; + + ipaddr.IPv4.parseCIDR = function(string) { + var maskLength, match; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 32) { + return [this.parse(match[1]), maskLength]; + } + } + throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range"); + }; + + ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) { + var filledOctetCount, j, octets; + prefix = parseInt(prefix); + if (prefix < 0 || prefix > 32) { + throw new Error('ipaddr: invalid IPv4 prefix length'); + } + octets = [0, 0, 0, 0]; + j = 0; + filledOctetCount = Math.floor(prefix / 8); + while (j < filledOctetCount) { + octets[j] = 255; + j++; + } + if (filledOctetCount < 4) { + octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8); + } + return new this(octets); + }; + + ipaddr.IPv4.broadcastAddressFromCIDR = function(string) { + var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); + i++; + } + return new this(octets); + } catch (error1) { + error = error1; + throw new Error('ipaddr: the address does not have IPv4 CIDR format'); + } + }; + + ipaddr.IPv4.networkAddressFromCIDR = function(string) { + var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); + i++; + } + return new this(octets); + } catch (error1) { + error = error1; + throw new Error('ipaddr: the address does not have IPv4 CIDR format'); + } + }; + + ipaddr.IPv6.parseCIDR = function(string) { + var maskLength, match; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 128) { + return [this.parse(match[1]), maskLength]; + } + } + throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range"); + }; + + ipaddr.isValid = function(string) { + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); + }; + + ipaddr.parse = function(string) { + if (ipaddr.IPv6.isValid(string)) { + return ipaddr.IPv6.parse(string); + } else if (ipaddr.IPv4.isValid(string)) { + return ipaddr.IPv4.parse(string); + } else { + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format"); + } + }; + + ipaddr.parseCIDR = function(string) { + var e; + try { + return ipaddr.IPv6.parseCIDR(string); + } catch (error1) { + e = error1; + try { + return ipaddr.IPv4.parseCIDR(string); + } catch (error1) { + e = error1; + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format"); + } + } + }; + + ipaddr.fromByteArray = function(bytes) { + var length; + length = bytes.length; + if (length === 4) { + return new ipaddr.IPv4(bytes); + } else if (length === 16) { + return new ipaddr.IPv6(bytes); + } else { + throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address"); + } + }; + + ipaddr.process = function(string) { + var addr; + addr = this.parse(string); + if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) { + return addr.toIPv4Address(); + } else { + return addr; + } + }; + +}).call(this); diff --git a/node_modules/ipaddr.js/lib/ipaddr.js.d.ts b/node_modules/ipaddr.js/lib/ipaddr.js.d.ts new file mode 100644 index 0000000..bdd0737 --- /dev/null +++ b/node_modules/ipaddr.js/lib/ipaddr.js.d.ts @@ -0,0 +1,71 @@ + + +declare module "ipaddr.js" { + + type IPv4Range = 'unspecified' | 'broadcast' | 'multicast' | 'linkLocal' | 'loopback' | 'carrierGradeNat' | 'private' | 'reserved'; + type IPv6Range = 'unspecified' | 'linkLocal' | 'multicast' | 'loopback' | 'uniqueLocal' | 'ipv4Mapped' | 'rfc6145' | 'rfc6052' | '6to4' | 'teredo' | 'reserved'; + + interface RangeList { + [name: string]: [T, number] | [T, number][]; + } + + + // Common methods/properties for IPv4 and IPv6 classes. + class IP { + + prefixLengthFromSubnetMask(): number | false; + toByteArray(): number[]; + toNormalizedString(): string; + toString(): string; + } + + namespace Address { + + export function isValid(addr: string): boolean; + export function fromByteArray(bytes: number[]): IPv4 | IPv6; + export function parse(addr: string): IPv4 | IPv6; + export function parseCIDR(mask: string): [IPv4 | IPv6, number]; + export function process(address: string): IPv4 | IPv6; + export function subnetMatch(addr: IPv4, rangeList: RangeList, defaultName?: string): boolean; + export function subnetMatch(addr: IPv6, rangeList: RangeList, defaultName?: string): boolean; + + export class IPv4 extends IP { + static broadcastAddressFromCIDR(addr: string): IPv4; + static isIPv4(addr: string): boolean; + static isValidFourPartDecimal(addr: string): boolean; + static isValid(addr: string): boolean; + static networkAddressFromCIDR(addr: string): IPv4; + static parse(addr: string): IPv4; + static parseCIDR(addr: string): [IPv4, number]; + static subnetMaskFromPrefixLength(prefix: number): IPv4; + constructor(octets: number[]); + + kind(): 'ipv4'; + match(addr: IPv4, bits: number): boolean; + match(mask: [IPv4, number]): boolean; + range(): IPv4Range; + subnetMatch(rangeList: RangeList, defaultName?: string): boolean; + toIPv4MappedAddress(): IPv6; + } + + export class IPv6 extends IP { + static broadcastAddressFromCIDR(addr: string): IPv6; + static isIPv6(addr: string): boolean; + static isValid(addr: string): boolean; + static parse(addr: string): IPv6; + static parseCIDR(addr: string): [IPv6, number]; + static subnetMaskFromPrefixLength(prefix: number): IPv6; + constructor(octets: number[]); + + isIPv4MappedAddress(): boolean; + kind(): 'ipv6'; + match(addr: IPv6, bits: number): boolean; + match(mask: [IPv6, number]): boolean; + range(): IPv6Range; + subnetMatch(rangeList: RangeList, defaultName?: string): boolean; + toIPv4Address(): IPv4; + } + } + + export = Address; +} \ No newline at end of file diff --git a/node_modules/ipaddr.js/package.json b/node_modules/ipaddr.js/package.json new file mode 100644 index 0000000..dd1e0f6 --- /dev/null +++ b/node_modules/ipaddr.js/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "ipaddr.js@1.6.0", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "ipaddr.js@1.6.0", + "_id": "ipaddr.js@1.6.0", + "_inBundle": false, + "_integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=", + "_location": "/ipaddr.js", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ipaddr.js@1.6.0", + "name": "ipaddr.js", + "escapedName": "ipaddr.js", + "rawSpec": "1.6.0", + "saveSpec": null, + "fetchSpec": "1.6.0" + }, + "_requiredBy": [ + "/proxy-addr" + ], + "_resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "_spec": "1.6.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "whitequark", + "email": "whitequark@whitequark.org" + }, + "bugs": { + "url": "https://github.com/whitequark/ipaddr.js/issues" + }, + "dependencies": {}, + "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.", + "devDependencies": { + "coffee-script": "~1.12.6", + "nodeunit": ">=0.8.2 <0.8.7", + "uglify-js": "~3.0.19" + }, + "directories": { + "lib": "./lib" + }, + "engines": { + "node": ">= 0.10" + }, + "homepage": "https://github.com/whitequark/ipaddr.js#readme", + "keywords": [ + "ip", + "ipv4", + "ipv6" + ], + "license": "MIT", + "main": "./lib/ipaddr.js", + "name": "ipaddr.js", + "repository": { + "type": "git", + "url": "git://github.com/whitequark/ipaddr.js.git" + }, + "scripts": { + "test": "cake build test" + }, + "types": "./lib/ipaddr.js.d.ts", + "version": "1.6.0" +} diff --git a/node_modules/ipaddr.js/src/ipaddr.coffee b/node_modules/ipaddr.js/src/ipaddr.coffee new file mode 100644 index 0000000..57c0217 --- /dev/null +++ b/node_modules/ipaddr.js/src/ipaddr.coffee @@ -0,0 +1,554 @@ +# Define the main object +ipaddr = {} + +root = this + +# Export for both the CommonJS and browser-like environment +if module? && module.exports + module.exports = ipaddr +else + root['ipaddr'] = ipaddr + +# A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher. +matchCIDR = (first, second, partSize, cidrBits) -> + if first.length != second.length + throw new Error "ipaddr: cannot match CIDR for objects with different lengths" + + part = 0 + while cidrBits > 0 + shift = partSize - cidrBits + shift = 0 if shift < 0 + + if first[part] >> shift != second[part] >> shift + return false + + cidrBits -= partSize + part += 1 + + return true + +# An utility function to ease named range matching. See examples below. +# rangeList can contain both IPv4 and IPv6 subnet entries and will not throw errors +# on matching IPv4 addresses to IPv6 ranges or vice versa. +ipaddr.subnetMatch = (address, rangeList, defaultName='unicast') -> + for rangeName, rangeSubnets of rangeList + # ECMA5 Array.isArray isn't available everywhere + if rangeSubnets[0] && !(rangeSubnets[0] instanceof Array) + rangeSubnets = [ rangeSubnets ] + + for subnet in rangeSubnets + if address.kind() == subnet[0].kind() + if address.match.apply(address, subnet) + return rangeName + + return defaultName + +# An IPv4 address (RFC791). +class ipaddr.IPv4 + # Constructs a new IPv4 address from an array of four octets + # in network order (MSB first) + # Verifies the input. + constructor: (octets) -> + if octets.length != 4 + throw new Error "ipaddr: ipv4 octet count should be 4" + + for octet in octets + if !(0 <= octet <= 255) + throw new Error "ipaddr: ipv4 octet should fit in 8 bits" + + @octets = octets + + # The 'kind' method exists on both IPv4 and IPv6 classes. + kind: -> + return 'ipv4' + + # Returns the address in convenient, decimal-dotted format. + toString: -> + return @octets.join "." + + # Symmetrical method strictly for aligning with the IPv6 methods. + toNormalizedString: -> + return this.toString() + + # Returns an array of byte-sized values in network order (MSB first) + toByteArray: -> + return @octets.slice(0) # octets.clone + + # Checks if this address matches other one within given CIDR range. + match: (other, cidrRange) -> + if cidrRange == undefined + [other, cidrRange] = other + + if other.kind() != 'ipv4' + throw new Error "ipaddr: cannot match ipv4 address with non-ipv4 one" + + return matchCIDR(this.octets, other.octets, 8, cidrRange) + + # Special IPv4 address ranges. + # See also https://en.wikipedia.org/wiki/Reserved_IP_addresses + SpecialRanges: + unspecified: [ + [ new IPv4([0, 0, 0, 0]), 8 ] + ] + broadcast: [ + [ new IPv4([255, 255, 255, 255]), 32 ] + ] + multicast: [ # RFC3171 + [ new IPv4([224, 0, 0, 0]), 4 ] + ] + linkLocal: [ # RFC3927 + [ new IPv4([169, 254, 0, 0]), 16 ] + ] + loopback: [ # RFC5735 + [ new IPv4([127, 0, 0, 0]), 8 ] + ] + carrierGradeNat: [ # RFC6598 + [ new IPv4([100, 64, 0, 0]), 10 ] + ] + private: [ # RFC1918 + [ new IPv4([10, 0, 0, 0]), 8 ] + [ new IPv4([172, 16, 0, 0]), 12 ] + [ new IPv4([192, 168, 0, 0]), 16 ] + ] + reserved: [ # Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700 + [ new IPv4([192, 0, 0, 0]), 24 ] + [ new IPv4([192, 0, 2, 0]), 24 ] + [ new IPv4([192, 88, 99, 0]), 24 ] + [ new IPv4([198, 51, 100, 0]), 24 ] + [ new IPv4([203, 0, 113, 0]), 24 ] + [ new IPv4([240, 0, 0, 0]), 4 ] + ] + + # Checks if the address corresponds to one of the special ranges. + range: -> + return ipaddr.subnetMatch(this, @SpecialRanges) + + # Convrets this IPv4 address to an IPv4-mapped IPv6 address. + toIPv4MappedAddress: -> + return ipaddr.IPv6.parse "::ffff:#{@toString()}" + + # returns a number of leading ones in IPv4 address, making sure that + # the rest is a solid sequence of 0's (valid netmask) + # returns either the CIDR length or null if mask is not valid + prefixLengthFromSubnetMask: -> + # number of zeroes in octet + zerotable = + 0: 8 + 128: 7 + 192: 6 + 224: 5 + 240: 4 + 248: 3 + 252: 2 + 254: 1 + 255: 0 + + cidr = 0 + # non-zero encountered stop scanning for zeroes + stop = false + for i in [3..0] by -1 + octet = @octets[i] + if octet of zerotable + zeros = zerotable[octet] + if stop and zeros != 0 + return null + unless zeros == 8 + stop = true + cidr += zeros + else + return null + return 32 - cidr + +# A list of regular expressions that match arbitrary IPv4 addresses, +# for which a number of weird notations exist. +# Note that an address like 0010.0xa5.1.1 is considered legal. +ipv4Part = "(0?\\d+|0x[a-f0-9]+)" +ipv4Regexes = + fourOctet: new RegExp "^#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}$", 'i' + longValue: new RegExp "^#{ipv4Part}$", 'i' + +# Classful variants (like a.b, where a is an octet, and b is a 24-bit +# value representing last three octets; this corresponds to a class C +# address) are omitted due to classless nature of modern Internet. +ipaddr.IPv4.parser = (string) -> + parseIntAuto = (string) -> + if string[0] == "0" && string[1] != "x" + parseInt(string, 8) + else + parseInt(string) + + # parseInt recognizes all that octal & hexadecimal weirdness for us + if match = string.match(ipv4Regexes.fourOctet) + return (parseIntAuto(part) for part in match[1..5]) + else if match = string.match(ipv4Regexes.longValue) + value = parseIntAuto(match[1]) + if value > 0xffffffff || value < 0 + throw new Error "ipaddr: address outside defined range" + return ((value >> shift) & 0xff for shift in [0..24] by 8).reverse() + else + return null + +# An IPv6 address (RFC2460) +class ipaddr.IPv6 + # Constructs an IPv6 address from an array of eight 16-bit parts + # or sixteen 8-bit parts in network order (MSB first). + # Throws an error if the input is invalid. + constructor: (parts, zoneId) -> + if parts.length == 16 + @parts = [] + for i in [0..14] by 2 + @parts.push((parts[i] << 8) | parts[i + 1]) + else if parts.length == 8 + @parts = parts + else + throw new Error "ipaddr: ipv6 part count should be 8 or 16" + + for part in @parts + if !(0 <= part <= 0xffff) + throw new Error "ipaddr: ipv6 part should fit in 16 bits" + + if zoneId + @zoneId = zoneId + + # The 'kind' method exists on both IPv4 and IPv6 classes. + kind: -> + return 'ipv6' + + # Returns the address in compact, human-readable format like + # 2001:db8:8:66::1 + toString: -> + # Replace the first sequence of 1 or more '0' parts with '::' + return @toNormalizedString().replace( /((^|:)(0(:|$))+)/, '::' ) + + # Returns an array of byte-sized values in network order (MSB first) + toByteArray: -> + bytes = [] + for part in @parts + bytes.push(part >> 8) + bytes.push(part & 0xff) + + return bytes + + # Returns the address in expanded format with all zeroes included, like + # 2001:db8:8:66:0:0:0:1 + toNormalizedString: -> + addr = (part.toString(16) for part in @parts).join ":" + + suffix = '' + if @zoneId + suffix = '%' + @zoneId + + return addr + suffix + + # Checks if this address matches other one within given CIDR range. + match: (other, cidrRange) -> + if cidrRange == undefined + [other, cidrRange] = other + + if other.kind() != 'ipv6' + throw new Error "ipaddr: cannot match ipv6 address with non-ipv6 one" + + return matchCIDR(this.parts, other.parts, 16, cidrRange) + + # Special IPv6 ranges + SpecialRanges: + unspecified: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128 ] # RFC4291, here and after + linkLocal: [ new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10 ] + multicast: [ new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8 ] + loopback: [ new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128 ] + uniqueLocal: [ new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7 ] + ipv4Mapped: [ new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96 ] + rfc6145: [ new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96 ] # RFC6145 + rfc6052: [ new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96 ] # RFC6052 + '6to4': [ new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16 ] # RFC3056 + teredo: [ new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32 ] # RFC6052, RFC6146 + reserved: [ + [ new IPv6([ 0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32 ] # RFC4291 + ] + + # Checks if the address corresponds to one of the special ranges. + range: -> + return ipaddr.subnetMatch(this, @SpecialRanges) + + # Checks if this address is an IPv4-mapped IPv6 address. + isIPv4MappedAddress: -> + return @range() == 'ipv4Mapped' + + # Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address. + # Throws an error otherwise. + toIPv4Address: -> + unless @isIPv4MappedAddress() + throw new Error "ipaddr: trying to convert a generic ipv6 address to ipv4" + + [high, low] = @parts[-2..-1] + + return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]) + + # returns a number of leading ones in IPv6 address, making sure that + # the rest is a solid sequence of 0's (valid netmask) + # returns either the CIDR length or null if mask is not valid + prefixLengthFromSubnetMask: -> + # number of zeroes in octet + zerotable = + 0 : 16 + 32768: 15 + 49152: 14 + 57344: 13 + 61440: 12 + 63488: 11 + 64512: 10 + 65024: 9 + 65280: 8 + 65408: 7 + 65472: 6 + 65504: 5 + 65520: 4 + 65528: 3 + 65532: 2 + 65534: 1 + 65535: 0 + + cidr = 0 + # non-zero encountered stop scanning for zeroes + stop = false + for i in [7..0] by -1 + part = @parts[i] + if part of zerotable + zeros = zerotable[part] + if stop and zeros != 0 + return null + unless zeros == 16 + stop = true + cidr += zeros + else + return null + return 128 - cidr + +# IPv6-matching regular expressions. +# For IPv6, the task is simpler: it is enough to match the colon-delimited +# hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at +# the end. +ipv6Part = "(?:[0-9a-f]+::?)+" +zoneIndex = "%[0-9a-z]{1,}" +ipv6Regexes = + zoneIndex: new RegExp zoneIndex, 'i' + native: new RegExp "^(::)?(#{ipv6Part})?([0-9a-f]+)?(::)?(#{zoneIndex})?$", 'i' + transitional: new RegExp "^((?:#{ipv6Part})|(?:::)(?:#{ipv6Part})?)" + + "#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}\\.#{ipv4Part}" + + "(#{zoneIndex})?$", 'i' + +# Expand :: in an IPv6 address or address part consisting of `parts` groups. +expandIPv6 = (string, parts) -> + # More than one '::' means invalid adddress + if string.indexOf('::') != string.lastIndexOf('::') + return null + + # Remove zone index and save it for later + zoneId = (string.match(ipv6Regexes['zoneIndex']) || [])[0] + if zoneId + zoneId = zoneId.substring(1) + string = string.replace(/%.+$/, '') + + # How many parts do we already have? + colonCount = 0 + lastColon = -1 + while (lastColon = string.indexOf(':', lastColon + 1)) >= 0 + colonCount++ + + # 0::0 is two parts more than :: + colonCount-- if string.substr(0, 2) == '::' + colonCount-- if string.substr(-2, 2) == '::' + + # The following loop would hang if colonCount > parts + if colonCount > parts + return null + + # replacement = ':' + '0:' * (parts - colonCount) + replacementCount = parts - colonCount + replacement = ':' + while replacementCount-- + replacement += '0:' + + # Insert the missing zeroes + string = string.replace('::', replacement) + + # Trim any garbage which may be hanging around if :: was at the edge in + # the source string + string = string[1..-1] if string[0] == ':' + string = string[0..-2] if string[string.length-1] == ':' + + parts = (parseInt(part, 16) for part in string.split(":")) + return { parts: parts, zoneId: zoneId } + +# Parse an IPv6 address. +ipaddr.IPv6.parser = (string) -> + if ipv6Regexes['native'].test(string) + return expandIPv6(string, 8) + + else if match = string.match(ipv6Regexes['transitional']) + zoneId = match[6] || '' + addr = expandIPv6(match[1][0..-2] + zoneId, 6) + if addr.parts + octets = [parseInt(match[2]), parseInt(match[3]), + parseInt(match[4]), parseInt(match[5])] + for octet in octets + if !(0 <= octet <= 255) + return null + + addr.parts.push(octets[0] << 8 | octets[1]) + addr.parts.push(octets[2] << 8 | octets[3]) + return { parts: addr.parts, zoneId: addr.zoneId } + + return null + +# Checks if a given string is formatted like IPv4/IPv6 address. +ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = (string) -> + return @parser(string) != null + +# Checks if a given string is a valid IPv4/IPv6 address. +ipaddr.IPv4.isValid = (string) -> + try + new this(@parser(string)) + return true + catch e + return false + +ipaddr.IPv4.isValidFourPartDecimal = (string) -> + if ipaddr.IPv4.isValid(string) and string.match(/^\d+(\.\d+){3}$/) + return true + else + return false + +ipaddr.IPv6.isValid = (string) -> + # Since IPv6.isValid is always called first, this shortcut + # provides a substantial performance gain. + if typeof string == "string" and string.indexOf(":") == -1 + return false + + try + addr = @parser(string) + new this(addr.parts, addr.zoneId) + return true + catch e + return false + +# Tries to parse and validate a string with IPv4/IPv6 address. +# Throws an error if it fails. +ipaddr.IPv4.parse = (string) -> + parts = @parser(string) + if parts == null + throw new Error "ipaddr: string is not formatted like ip address" + + return new this(parts) + +ipaddr.IPv6.parse = (string) -> + addr = @parser(string) + if addr.parts == null + throw new Error "ipaddr: string is not formatted like ip address" + + return new this(addr.parts, addr.zoneId) + +ipaddr.IPv4.parseCIDR = (string) -> + if match = string.match(/^(.+)\/(\d+)$/) + maskLength = parseInt(match[2]) + if maskLength >= 0 and maskLength <= 32 + return [@parse(match[1]), maskLength] + + throw new Error "ipaddr: string is not formatted like an IPv4 CIDR range" + +# A utility function to return subnet mask in IPv4 format given the prefix length +ipaddr.IPv4.subnetMaskFromPrefixLength = (prefix) -> + prefix = parseInt(prefix) + if prefix < 0 or prefix > 32 + throw new Error('ipaddr: invalid IPv4 prefix length') + octets = [0, 0, 0, 0] + j = 0 + filledOctetCount = Math.floor(prefix / 8) + while j < filledOctetCount + octets[j] = 255 + j++ + if filledOctetCount < 4 + octets[filledOctetCount] = Math.pow(2, (prefix % 8)) - 1 << 8 - (prefix % 8) + new @(octets) + +# A utility function to return broadcast address given the IPv4 interface and prefix length in CIDR notation +ipaddr.IPv4.broadcastAddressFromCIDR = (string) -> + try + cidr = @parseCIDR(string) + ipInterfaceOctets = cidr[0].toByteArray() + subnetMaskOctets = @subnetMaskFromPrefixLength(cidr[1]).toByteArray() + octets = [] + i = 0 + while i < 4 + # Broadcast address is bitwise OR between ip interface and inverted mask + octets.push parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255 + i++ + return new @(octets) + catch error + throw new Error('ipaddr: the address does not have IPv4 CIDR format') + return + +# A utility function to return network address given the IPv4 interface and prefix length in CIDR notation +ipaddr.IPv4.networkAddressFromCIDR = (string) -> + try + cidr = @parseCIDR(string) + ipInterfaceOctets = cidr[0].toByteArray() + subnetMaskOctets = @subnetMaskFromPrefixLength(cidr[1]).toByteArray() + octets = [] + i = 0 + while i < 4 + # Network address is bitwise AND between ip interface and mask + octets.push parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10) + i++ + return new @(octets) + catch error + throw new Error('ipaddr: the address does not have IPv4 CIDR format') + return + +ipaddr.IPv6.parseCIDR = (string) -> + if match = string.match(/^(.+)\/(\d+)$/) + maskLength = parseInt(match[2]) + if maskLength >= 0 and maskLength <= 128 + return [@parse(match[1]), maskLength] + + throw new Error "ipaddr: string is not formatted like an IPv6 CIDR range" + +# Checks if the address is valid IP address +ipaddr.isValid = (string) -> + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string) + +# Try to parse an address and throw an error if it is impossible +ipaddr.parse = (string) -> + if ipaddr.IPv6.isValid(string) + return ipaddr.IPv6.parse(string) + else if ipaddr.IPv4.isValid(string) + return ipaddr.IPv4.parse(string) + else + throw new Error "ipaddr: the address has neither IPv6 nor IPv4 format" + +ipaddr.parseCIDR = (string) -> + try + return ipaddr.IPv6.parseCIDR(string) + catch e + try + return ipaddr.IPv4.parseCIDR(string) + catch e + throw new Error "ipaddr: the address has neither IPv6 nor IPv4 CIDR format" + +# Try to parse an array in network order (MSB first) for IPv4 and IPv6 +ipaddr.fromByteArray = (bytes) -> + length = bytes.length + if length == 4 + return new ipaddr.IPv4(bytes) + else if length == 16 + return new ipaddr.IPv6(bytes) + else + throw new Error "ipaddr: the binary input is neither an IPv6 nor IPv4 address" + +# Parse an address and return plain IPv4 address if it is an IPv4-mapped address +ipaddr.process = (string) -> + addr = @parse(string) + if addr.kind() == 'ipv6' && addr.isIPv4MappedAddress() + return addr.toIPv4Address() + else + return addr diff --git a/node_modules/ipaddr.js/test/ipaddr.test.coffee b/node_modules/ipaddr.js/test/ipaddr.test.coffee new file mode 100644 index 0000000..8d77799 --- /dev/null +++ b/node_modules/ipaddr.js/test/ipaddr.test.coffee @@ -0,0 +1,491 @@ +ipaddr = require '../lib/ipaddr' + +module.exports = + 'should define main classes': (test) -> + test.ok(ipaddr.IPv4?, 'defines IPv4 class') + test.ok(ipaddr.IPv6?, 'defines IPv6 class') + test.done() + + 'can construct IPv4 from octets': (test) -> + test.doesNotThrow -> + new ipaddr.IPv4([192, 168, 1, 2]) + test.done() + + 'refuses to construct invalid IPv4': (test) -> + test.throws -> + new ipaddr.IPv4([300, 1, 2, 3]) + test.throws -> + new ipaddr.IPv4([8, 8, 8]) + test.done() + + 'converts IPv4 to string correctly': (test) -> + addr = new ipaddr.IPv4([192, 168, 1, 1]) + test.equal(addr.toString(), '192.168.1.1') + test.equal(addr.toNormalizedString(), '192.168.1.1') + test.done() + + 'returns correct kind for IPv4': (test) -> + addr = new ipaddr.IPv4([1, 2, 3, 4]) + test.equal(addr.kind(), 'ipv4') + test.done() + + 'allows to access IPv4 octets': (test) -> + addr = new ipaddr.IPv4([42, 0, 0, 0]) + test.equal(addr.octets[0], 42) + test.done() + + 'checks IPv4 address format': (test) -> + test.equal(ipaddr.IPv4.isIPv4('192.168.007.0xa'), true) + test.equal(ipaddr.IPv4.isIPv4('1024.0.0.1'), true) + test.equal(ipaddr.IPv4.isIPv4('8.0xa.wtf.6'), false) + test.done() + + 'validates IPv4 addresses': (test) -> + test.equal(ipaddr.IPv4.isValid('192.168.007.0xa'), true) + test.equal(ipaddr.IPv4.isValid('1024.0.0.1'), false) + test.equal(ipaddr.IPv4.isValid('8.0xa.wtf.6'), false) + test.done() + + 'parses IPv4 in several weird formats': (test) -> + test.deepEqual(ipaddr.IPv4.parse('192.168.1.1').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('0xc0.168.1.1').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('192.0250.1.1').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('0xc0a80101').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('030052000401').octets, [192, 168, 1, 1]) + test.deepEqual(ipaddr.IPv4.parse('3232235777').octets, [192, 168, 1, 1]) + test.done() + + 'barfs at invalid IPv4': (test) -> + test.throws -> + ipaddr.IPv4.parse('10.0.0.wtf') + test.done() + + 'matches IPv4 CIDR correctly': (test) -> + addr = new ipaddr.IPv4([10, 5, 0, 1]) + test.equal(addr.match(ipaddr.IPv4.parse('0.0.0.0'), 0), true) + test.equal(addr.match(ipaddr.IPv4.parse('11.0.0.0'), 8), false) + test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.0'), 8), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.1'), 8), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.0.0.10'), 8), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.5.5.0'), 16), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 16), false) + test.equal(addr.match(ipaddr.IPv4.parse('10.4.5.0'), 15), true) + test.equal(addr.match(ipaddr.IPv4.parse('10.5.0.2'), 32), false) + test.equal(addr.match(addr, 32), true) + test.done() + + 'parses IPv4 CIDR correctly': (test) -> + addr = new ipaddr.IPv4([10, 5, 0, 1]) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('0.0.0.0/0')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('11.0.0.0/8')), false) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.0/8')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.1/8')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.0.0.10/8')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.5.0/16')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.4.5.0/16')), false) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.4.5.0/15')), true) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.0.2/32')), false) + test.equal(addr.match(ipaddr.IPv4.parseCIDR('10.5.0.1/32')), true) + test.throws -> + ipaddr.IPv4.parseCIDR('10.5.0.1') + test.throws -> + ipaddr.IPv4.parseCIDR('0.0.0.0/-1') + test.throws -> + ipaddr.IPv4.parseCIDR('0.0.0.0/33') + test.done() + + 'detects reserved IPv4 networks': (test) -> + test.equal(ipaddr.IPv4.parse('0.0.0.0').range(), 'unspecified') + test.equal(ipaddr.IPv4.parse('0.1.0.0').range(), 'unspecified') + test.equal(ipaddr.IPv4.parse('10.1.0.1').range(), 'private') + test.equal(ipaddr.IPv4.parse('100.64.0.0').range(), 'carrierGradeNat') + test.equal(ipaddr.IPv4.parse('100.127.255.255').range(), 'carrierGradeNat') + test.equal(ipaddr.IPv4.parse('192.168.2.1').range(), 'private') + test.equal(ipaddr.IPv4.parse('224.100.0.1').range(), 'multicast') + test.equal(ipaddr.IPv4.parse('169.254.15.0').range(), 'linkLocal') + test.equal(ipaddr.IPv4.parse('127.1.1.1').range(), 'loopback') + test.equal(ipaddr.IPv4.parse('255.255.255.255').range(), 'broadcast') + test.equal(ipaddr.IPv4.parse('240.1.2.3').range(), 'reserved') + test.equal(ipaddr.IPv4.parse('8.8.8.8').range(), 'unicast') + test.done() + + 'checks the conventional IPv4 address format': (test) -> + test.equal(ipaddr.IPv4.isValidFourPartDecimal('192.168.1.1'), true) + test.equal(ipaddr.IPv4.isValidFourPartDecimal('0xc0.168.1.1'), false) + test.done() + + 'can construct IPv6 from 16bit parts': (test) -> + test.doesNotThrow -> + new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) + test.done() + + 'can construct IPv6 from 8bit parts': (test) -> + test.doesNotThrow -> + new ipaddr.IPv6([0x20, 0x01, 0xd, 0xb8, 0xf5, 0x3a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) + test.deepEqual(new ipaddr.IPv6([0x20, 0x01, 0xd, 0xb8, 0xf5, 0x3a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1])) + test.done() + + 'refuses to construct invalid IPv6': (test) -> + test.throws -> + new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 0, 1]) + test.throws -> + new ipaddr.IPv6([0xfffff, 0, 0, 0, 0, 0, 1]) + test.throws -> + new ipaddr.IPv6([0xffff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) + test.done() + + 'converts IPv6 to string correctly': (test) -> + addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) + test.equal(addr.toNormalizedString(), '2001:db8:f53a:0:0:0:0:1') + test.equal(addr.toString(), '2001:db8:f53a::1') + test.equal(new ipaddr.IPv6([0, 0, 0, 0, 0, 0, 0, 0]).toString(), '::') + test.equal(new ipaddr.IPv6([0, 0, 0, 0, 0, 0, 0, 1]).toString(), '::1') + test.equal(new ipaddr.IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]).toString(), '2001:db8::') + test.equal(new ipaddr.IPv6([0, 0xff, 0, 0, 0, 0, 0, 0]).toString(), '::ff:0:0:0:0:0:0') + test.equal(new ipaddr.IPv6([0, 0, 0, 0, 0, 0, 0xff, 0]).toString(), '::ff:0') + test.equal(new ipaddr.IPv6([0, 0, 0xff, 0, 0, 0, 0, 0]).toString(), '::ff:0:0:0:0:0') + test.equal(new ipaddr.IPv6([0, 0, 0, 0, 0, 0xff, 0, 0]).toString(), '::ff:0:0') + test.equal(new ipaddr.IPv6([0x2001, 0xdb8, 0xff, 0xabc, 0xdef, 0x123b, 0x456c, 0x78d]).toString(), '2001:db8:ff:abc:def:123b:456c:78d') + test.equal(new ipaddr.IPv6([0x2001, 0xdb8, 0xff, 0xabc, 0, 0x123b, 0x456c, 0x78d]).toString(), '2001:db8:ff:abc::123b:456c:78d') + test.equal(new ipaddr.IPv6([0x2001, 0xdb8, 0xff, 0xabc, 0, 0, 0x456c, 0x78d]).toString(), '2001:db8:ff:abc::456c:78d') + test.done() + + 'returns IPv6 zoneIndex': (test) -> + addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1], 'utun0') + test.equal(addr.toNormalizedString(), '2001:db8:f53a:0:0:0:0:1%utun0') + test.equal(addr.toString(), '2001:db8:f53a::1%utun0') + + test.equal( + ipaddr.parse('2001:db8:f53a::1%2').toString(), + '2001:db8:f53a::1%2' + ) + test.equal( + ipaddr.parse('2001:db8:f53a::1%WAT').toString(), + '2001:db8:f53a::1%WAT' + ) + test.equal( + ipaddr.parse('2001:db8:f53a::1%sUp').toString(), + '2001:db8:f53a::1%sUp' + ) + + test.done() + + 'returns IPv6 zoneIndex for IPv4-mapped IPv6 addresses': (test) -> + addr = ipaddr.parse('::ffff:192.168.1.1%eth0') + test.equal(addr.toNormalizedString(), '0:0:0:0:0:ffff:c0a8:101%eth0') + test.equal(addr.toString(), '::ffff:c0a8:101%eth0') + + test.equal( + ipaddr.parse('::ffff:192.168.1.1%2').toString(), + '::ffff:c0a8:101%2' + ) + test.equal( + ipaddr.parse('::ffff:192.168.1.1%WAT').toString(), + '::ffff:c0a8:101%WAT' + ) + test.equal( + ipaddr.parse('::ffff:192.168.1.1%sUp').toString(), + '::ffff:c0a8:101%sUp' + ) + + test.done() + + 'returns correct kind for IPv6': (test) -> + addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) + test.equal(addr.kind(), 'ipv6') + test.done() + + 'allows to access IPv6 address parts': (test) -> + addr = new ipaddr.IPv6([0x2001, 0xdb8, 0xf53a, 0, 0, 42, 0, 1]) + test.equal(addr.parts[5], 42) + test.done() + + 'checks IPv6 address format': (test) -> + test.equal(ipaddr.IPv6.isIPv6('2001:db8:F53A::1'), true) + test.equal(ipaddr.IPv6.isIPv6('200001::1'), true) + test.equal(ipaddr.IPv6.isIPv6('::ffff:192.168.1.1'), true) + test.equal(ipaddr.IPv6.isIPv6('::ffff:192.168.1.1%z'), true) + test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1'), false) + test.equal(ipaddr.IPv6.isIPv6('::ffff:300.168.1.1:0'), false) + test.equal(ipaddr.IPv6.isIPv6('fe80::wtf'), false) + test.equal(ipaddr.IPv6.isIPv6('fe80::%'), false) + test.done() + + 'validates IPv6 addresses': (test) -> + test.equal(ipaddr.IPv6.isValid('2001:db8:F53A::1'), true) + test.equal(ipaddr.IPv6.isValid('200001::1'), false) + test.equal(ipaddr.IPv6.isValid('::ffff:192.168.1.1'), true) + test.equal(ipaddr.IPv6.isValid('::ffff:192.168.1.1%z'), true) + test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1'), false) + test.equal(ipaddr.IPv6.isValid('::ffff:300.168.1.1:0'), false) + test.equal(ipaddr.IPv6.isValid('::ffff:222.1.41.9000'), false) + test.equal(ipaddr.IPv6.isValid('2001:db8::F53A::1'), false) + test.equal(ipaddr.IPv6.isValid('fe80::wtf'), false) + test.equal(ipaddr.IPv6.isValid('fe80::%'), false) + test.equal(ipaddr.IPv6.isValid('2002::2:'), false) + test.equal(ipaddr.IPv6.isValid('::%z'), true) + + test.equal(ipaddr.IPv6.isValid(undefined), false) + test.done() + + 'parses IPv6 in different formats': (test) -> + test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A:0:0:0:0:1').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 1]) + test.deepEqual(ipaddr.IPv6.parse('fe80::10').parts, [0xfe80, 0, 0, 0, 0, 0, 0, 0x10]) + test.deepEqual(ipaddr.IPv6.parse('2001:db8:F53A::').parts, [0x2001, 0xdb8, 0xf53a, 0, 0, 0, 0, 0]) + test.deepEqual(ipaddr.IPv6.parse('::1').parts, [0, 0, 0, 0, 0, 0, 0, 1]) + test.deepEqual(ipaddr.IPv6.parse('::').parts, [0, 0, 0, 0, 0, 0, 0, 0]) + test.deepEqual(ipaddr.IPv6.parse('::%z').parts, [0, 0, 0, 0, 0, 0, 0, 0]) + test.deepEqual(ipaddr.IPv6.parse('::%z').zoneId, 'z') + test.done() + + 'barfs at invalid IPv6': (test) -> + test.throws -> + ipaddr.IPv6.parse('fe80::0::1') + test.done() + + 'matches IPv6 CIDR correctly': (test) -> + addr = ipaddr.IPv6.parse('2001:db8:f53a::1') + test.equal(addr.match(ipaddr.IPv6.parse('::'), 0), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53a::1:1'), 64), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f53b::1:1'), 48), false) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f531::1:1'), 44), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f500::1'), 40), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db8:f500::1%z'), 40), true) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db9:f500::1'), 40), false) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db9:f500::1'), 40), false) + test.equal(addr.match(ipaddr.IPv6.parse('2001:db9:f500::1%z'), 40), false) + test.equal(addr.match(addr, 128), true) + test.done() + + 'parses IPv6 CIDR correctly': (test) -> + addr = ipaddr.IPv6.parse('2001:db8:f53a::1') + test.equal(addr.match(ipaddr.IPv6.parseCIDR('::/0')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53a::1:1/64')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53b::1:1/48')), false) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f531::1:1/44')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f500::1/40')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f500::1%z/40')), true) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db9:f500::1/40')), false) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db9:f500::1%z/40')), false) + test.equal(addr.match(ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/128')), true) + test.throws -> + ipaddr.IPv6.parseCIDR('2001:db8:f53a::1') + test.throws -> + ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/-1') + test.throws -> + ipaddr.IPv6.parseCIDR('2001:db8:f53a::1/129') + test.done() + + 'converts between IPv4-mapped IPv6 addresses and IPv4 addresses': (test) -> + addr = ipaddr.IPv4.parse('77.88.21.11') + mapped = addr.toIPv4MappedAddress() + test.deepEqual(mapped.parts, [0, 0, 0, 0, 0, 0xffff, 0x4d58, 0x150b]) + test.deepEqual(mapped.toIPv4Address().octets, addr.octets) + test.done() + + 'refuses to convert non-IPv4-mapped IPv6 address to IPv4 address': (test) -> + test.throws -> + ipaddr.IPv6.parse('2001:db8::1').toIPv4Address() + test.done() + + 'detects reserved IPv6 networks': (test) -> + test.equal(ipaddr.IPv6.parse('::').range(), 'unspecified') + test.equal(ipaddr.IPv6.parse('fe80::1234:5678:abcd:0123').range(), 'linkLocal') + test.equal(ipaddr.IPv6.parse('ff00::1234').range(), 'multicast') + test.equal(ipaddr.IPv6.parse('::1').range(), 'loopback') + test.equal(ipaddr.IPv6.parse('fc00::').range(), 'uniqueLocal') + test.equal(ipaddr.IPv6.parse('::ffff:192.168.1.10').range(), 'ipv4Mapped') + test.equal(ipaddr.IPv6.parse('::ffff:0:192.168.1.10').range(), 'rfc6145') + test.equal(ipaddr.IPv6.parse('64:ff9b::1234').range(), 'rfc6052') + test.equal(ipaddr.IPv6.parse('2002:1f63:45e8::1').range(), '6to4') + test.equal(ipaddr.IPv6.parse('2001::4242').range(), 'teredo') + test.equal(ipaddr.IPv6.parse('2001:db8::3210').range(), 'reserved') + test.equal(ipaddr.IPv6.parse('2001:470:8:66::1').range(), 'unicast') + test.equal(ipaddr.IPv6.parse('2001:470:8:66::1%z').range(), 'unicast') + test.done() + + 'is able to determine IP address type': (test) -> + test.equal(ipaddr.parse('8.8.8.8').kind(), 'ipv4') + test.equal(ipaddr.parse('2001:db8:3312::1').kind(), 'ipv6') + test.equal(ipaddr.parse('2001:db8:3312::1%z').kind(), 'ipv6') + test.done() + + 'throws an error if tried to parse an invalid address': (test) -> + test.throws -> + ipaddr.parse('::some.nonsense') + test.done() + + 'correctly processes IPv4-mapped addresses': (test) -> + test.equal(ipaddr.process('8.8.8.8').kind(), 'ipv4') + test.equal(ipaddr.process('2001:db8:3312::1').kind(), 'ipv6') + test.equal(ipaddr.process('::ffff:192.168.1.1').kind(), 'ipv4') + test.equal(ipaddr.process('::ffff:192.168.1.1%z').kind(), 'ipv4') + test.done() + + 'correctly converts IPv6 and IPv4 addresses to byte arrays': (test) -> + test.deepEqual(ipaddr.parse('1.2.3.4').toByteArray(), + [0x1, 0x2, 0x3, 0x4]); + # Fuck yeah. The first byte of Google's IPv6 address is 42. 42! + test.deepEqual(ipaddr.parse('2a00:1450:8007::68').toByteArray(), + [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68 ]) + test.deepEqual(ipaddr.parse('2a00:1450:8007::68%z').toByteArray(), + [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68 ]) + + test.done() + + 'correctly parses 1 as an IPv4 address': (test) -> + test.equal(ipaddr.IPv6.isValid('1'), false) + test.equal(ipaddr.IPv4.isValid('1'), true) + test.deepEqual(new ipaddr.IPv4([0, 0, 0, 1]), ipaddr.parse('1')) + test.done() + + 'correctly detects IPv4 and IPv6 CIDR addresses': (test) -> + test.deepEqual([ipaddr.IPv6.parse('fc00::'), 64], + ipaddr.parseCIDR('fc00::/64')) + test.deepEqual([ipaddr.IPv4.parse('1.2.3.4'), 5], + ipaddr.parseCIDR('1.2.3.4/5')) + test.done() + + 'does not consider a very large or very small number a valid IP address': (test) -> + test.equal(ipaddr.isValid('4999999999'), false) + test.equal(ipaddr.isValid('-1'), false) + test.done() + + 'does not hang on ::8:8:8:8:8:8:8:8:8': (test) -> + test.equal(ipaddr.IPv6.isValid('::8:8:8:8:8:8:8:8:8'), false) + test.equal(ipaddr.IPv6.isValid('::8:8:8:8:8:8:8:8:8%z'), false) + test.done() + + 'subnetMatch does not fail on empty range': (test) -> + ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {}, false) + ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {subnet: []}, false) + test.done() + + 'subnetMatch returns default subnet on empty range': (test) -> + test.equal(ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {}, false), false) + test.equal(ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), {subnet: []}, false), false) + test.done() + + 'subnetMatch does not fail on IPv4 when looking for IPv6': (test) -> + rangelist = {subnet6: ipaddr.parseCIDR('fe80::/64')} + test.equal(ipaddr.subnetMatch(new ipaddr.IPv4([1,2,3,4]), rangelist, false), false) + test.done() + + 'subnetMatch does not fail on IPv6 when looking for IPv4': (test) -> + rangelist = {subnet4: ipaddr.parseCIDR('1.2.3.0/24')} + test.equal(ipaddr.subnetMatch(new ipaddr.IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 1]), rangelist, false), false) + test.done() + + 'subnetMatch can use a hybrid IPv4/IPv6 range list': (test) -> + rangelist = {dual64: [ipaddr.parseCIDR('1.2.4.0/24'), ipaddr.parseCIDR('2001:1:2:3::/64')]} + test.equal(ipaddr.subnetMatch(new ipaddr.IPv4([1,2,4,1]), rangelist, false), 'dual64') + test.equal(ipaddr.subnetMatch(new ipaddr.IPv6([0x2001, 1, 2, 3, 0, 0, 0, 1]), rangelist, false), 'dual64') + test.done() + + 'is able to determine IP address type from byte array input': (test) -> + test.equal(ipaddr.fromByteArray([0x7f, 0, 0, 1]).kind(), 'ipv4') + test.equal(ipaddr.fromByteArray([0x20, 0x01, 0xd, 0xb8, 0xf5, 0x3a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]).kind(), 'ipv6') + test.throws -> + ipaddr.fromByteArray([1]) + test.done() + + 'prefixLengthFromSubnetMask returns proper CIDR notation for standard IPv4 masks': (test) -> + test.equal(ipaddr.IPv4.parse('255.255.255.255').prefixLengthFromSubnetMask(), 32) + test.equal(ipaddr.IPv4.parse('255.255.255.254').prefixLengthFromSubnetMask(), 31) + test.equal(ipaddr.IPv4.parse('255.255.255.252').prefixLengthFromSubnetMask(), 30) + test.equal(ipaddr.IPv4.parse('255.255.255.248').prefixLengthFromSubnetMask(), 29) + test.equal(ipaddr.IPv4.parse('255.255.255.240').prefixLengthFromSubnetMask(), 28) + test.equal(ipaddr.IPv4.parse('255.255.255.224').prefixLengthFromSubnetMask(), 27) + test.equal(ipaddr.IPv4.parse('255.255.255.192').prefixLengthFromSubnetMask(), 26) + test.equal(ipaddr.IPv4.parse('255.255.255.128').prefixLengthFromSubnetMask(), 25) + test.equal(ipaddr.IPv4.parse('255.255.255.0').prefixLengthFromSubnetMask(), 24) + test.equal(ipaddr.IPv4.parse('255.255.254.0').prefixLengthFromSubnetMask(), 23) + test.equal(ipaddr.IPv4.parse('255.255.252.0').prefixLengthFromSubnetMask(), 22) + test.equal(ipaddr.IPv4.parse('255.255.248.0').prefixLengthFromSubnetMask(), 21) + test.equal(ipaddr.IPv4.parse('255.255.240.0').prefixLengthFromSubnetMask(), 20) + test.equal(ipaddr.IPv4.parse('255.255.224.0').prefixLengthFromSubnetMask(), 19) + test.equal(ipaddr.IPv4.parse('255.255.192.0').prefixLengthFromSubnetMask(), 18) + test.equal(ipaddr.IPv4.parse('255.255.128.0').prefixLengthFromSubnetMask(), 17) + test.equal(ipaddr.IPv4.parse('255.255.0.0').prefixLengthFromSubnetMask(), 16) + test.equal(ipaddr.IPv4.parse('255.254.0.0').prefixLengthFromSubnetMask(), 15) + test.equal(ipaddr.IPv4.parse('255.252.0.0').prefixLengthFromSubnetMask(), 14) + test.equal(ipaddr.IPv4.parse('255.248.0.0').prefixLengthFromSubnetMask(), 13) + test.equal(ipaddr.IPv4.parse('255.240.0.0').prefixLengthFromSubnetMask(), 12) + test.equal(ipaddr.IPv4.parse('255.224.0.0').prefixLengthFromSubnetMask(), 11) + test.equal(ipaddr.IPv4.parse('255.192.0.0').prefixLengthFromSubnetMask(), 10) + test.equal(ipaddr.IPv4.parse('255.128.0.0').prefixLengthFromSubnetMask(), 9) + test.equal(ipaddr.IPv4.parse('255.0.0.0').prefixLengthFromSubnetMask(), 8) + test.equal(ipaddr.IPv4.parse('254.0.0.0').prefixLengthFromSubnetMask(), 7) + test.equal(ipaddr.IPv4.parse('252.0.0.0').prefixLengthFromSubnetMask(), 6) + test.equal(ipaddr.IPv4.parse('248.0.0.0').prefixLengthFromSubnetMask(), 5) + test.equal(ipaddr.IPv4.parse('240.0.0.0').prefixLengthFromSubnetMask(), 4) + test.equal(ipaddr.IPv4.parse('224.0.0.0').prefixLengthFromSubnetMask(), 3) + test.equal(ipaddr.IPv4.parse('192.0.0.0').prefixLengthFromSubnetMask(), 2) + test.equal(ipaddr.IPv4.parse('128.0.0.0').prefixLengthFromSubnetMask(), 1) + test.equal(ipaddr.IPv4.parse('0.0.0.0').prefixLengthFromSubnetMask(), 0) + # negative cases + test.equal(ipaddr.IPv4.parse('192.168.255.0').prefixLengthFromSubnetMask(), null) + test.equal(ipaddr.IPv4.parse('255.0.255.0').prefixLengthFromSubnetMask(), null) + test.done() + + 'prefixLengthFromSubnetMask returns proper CIDR notation for standard IPv6 masks': (test) -> + test.equal(ipaddr.IPv6.parse('ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff').prefixLengthFromSubnetMask(), 128) + test.equal(ipaddr.IPv6.parse('ffff:ffff:ffff:ffff::').prefixLengthFromSubnetMask(), 64) + test.equal(ipaddr.IPv6.parse('ffff:ffff:ffff:ff80::').prefixLengthFromSubnetMask(), 57) + test.equal(ipaddr.IPv6.parse('ffff:ffff:ffff::').prefixLengthFromSubnetMask(), 48) + test.equal(ipaddr.IPv6.parse('ffff:ffff:ffff::%z').prefixLengthFromSubnetMask(), 48) + test.equal(ipaddr.IPv6.parse('::').prefixLengthFromSubnetMask(), 0) + test.equal(ipaddr.IPv6.parse('::%z').prefixLengthFromSubnetMask(), 0) + # negative cases + test.equal(ipaddr.IPv6.parse('2001:db8::').prefixLengthFromSubnetMask(), null) + test.equal(ipaddr.IPv6.parse('ffff:0:0:ffff::').prefixLengthFromSubnetMask(), null) + test.equal(ipaddr.IPv6.parse('ffff:0:0:ffff::%z').prefixLengthFromSubnetMask(), null) + test.done() + + 'subnetMaskFromPrefixLength returns correct IPv4 subnet mask given prefix length': (test) -> + + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(0), "0.0.0.0"); + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(1), "128.0.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(2), "192.0.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(3), "224.0.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(4), "240.0.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(5), "248.0.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(6), "252.0.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(7), "254.0.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(8), "255.0.0.0"); + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(9), "255.128.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(10), "255.192.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(11), "255.224.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(12), "255.240.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(13), "255.248.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(14), "255.252.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(15), "255.254.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(16), "255.255.0.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(17), "255.255.128.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(18), "255.255.192.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(19), "255.255.224.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(20), "255.255.240.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(21), "255.255.248.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(22), "255.255.252.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(23), "255.255.254.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(24), "255.255.255.0") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(25), "255.255.255.128") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(26), "255.255.255.192") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(27), "255.255.255.224") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(28), "255.255.255.240") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(29), "255.255.255.248") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(30), "255.255.255.252") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(31), "255.255.255.254") + test.equal(ipaddr.IPv4.subnetMaskFromPrefixLength(32), "255.255.255.255") + test.done() + + 'broadcastAddressFromCIDR returns correct IPv4 broadcast address': (test) -> + test.equal(ipaddr.IPv4.broadcastAddressFromCIDR("172.0.0.1/24"), "172.0.0.255") + test.equal(ipaddr.IPv4.broadcastAddressFromCIDR("172.0.0.1/26"), "172.0.0.63") + test.done() + + 'networkAddressFromCIDR returns correct IPv4 network address': (test) -> + test.equal(ipaddr.IPv4.networkAddressFromCIDR("172.0.0.1/24"), "172.0.0.0") + test.equal(ipaddr.IPv4.networkAddressFromCIDR("172.0.0.1/5"), "168.0.0.0") + test.done() diff --git a/node_modules/is-accessor-descriptor/LICENSE b/node_modules/is-accessor-descriptor/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/is-accessor-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/is-accessor-descriptor/README.md b/node_modules/is-accessor-descriptor/README.md new file mode 100644 index 0000000..d198e1f --- /dev/null +++ b/node_modules/is-accessor-descriptor/README.md @@ -0,0 +1,144 @@ +# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-accessor-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-accessor-descriptor +``` + +## Usage + +```js +var isAccessor = require('is-accessor-descriptor'); + +isAccessor({get: function() {}}); +//=> true +``` + +You may also pass an object and property name to check if the property is an accessor: + +```js +isAccessor(foo, 'bar'); +``` + +## Examples + +`false` when not an object + +```js +isAccessor('a') +isAccessor(null) +isAccessor([]) +//=> false +``` + +`true` when the object has valid properties + +and the properties all have the correct JavaScript types: + +```js +isAccessor({get: noop, set: noop}) +isAccessor({get: noop}) +isAccessor({set: noop}) +//=> true +``` + +`false` when the object has invalid properties + +```js +isAccessor({get: noop, set: noop, bar: 'baz'}) +isAccessor({get: noop, writable: true}) +isAccessor({get: noop, value: true}) +//=> false +``` + +`false` when an accessor is not a function + +```js +isAccessor({get: noop, set: 'baz'}) +isAccessor({get: 'foo', set: noop}) +isAccessor({get: 'foo', bar: 'baz'}) +isAccessor({get: 'foo', set: 'baz'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isAccessor({get: noop, set: noop, enumerable: 'foo'}) +isAccessor({set: noop, configurable: 'foo'}) +isAccessor({get: noop, configurable: 'foo'}) +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 22 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._ \ No newline at end of file diff --git a/node_modules/is-accessor-descriptor/index.js b/node_modules/is-accessor-descriptor/index.js new file mode 100644 index 0000000..d2e6fe8 --- /dev/null +++ b/node_modules/is-accessor-descriptor/index.js @@ -0,0 +1,69 @@ +/*! + * is-accessor-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// accessor descriptor properties +var accessor = { + get: 'function', + set: 'function', + configurable: 'boolean', + enumerable: 'boolean' +}; + +function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (typeOf(obj) !== 'object') { + return false; + } + + if (has(obj, 'value') || has(obj, 'writable')) { + return false; + } + + if (!has(obj, 'get') || typeof obj.get !== 'function') { + return false; + } + + // tldr: it's valid to have "set" be undefined + // "set" might be undefined if `Object.getOwnPropertyDescriptor` + // was used to get the value, and only `get` was defined by the user + if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { + return false; + } + + for (var key in obj) { + if (!accessor.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === accessor[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +function has(obj, key) { + return {}.hasOwnProperty.call(obj, key); +} + +/** + * Expose `isAccessorDescriptor` + */ + +module.exports = isAccessorDescriptor; diff --git a/node_modules/is-accessor-descriptor/package.json b/node_modules/is-accessor-descriptor/package.json new file mode 100644 index 0000000..33b0999 --- /dev/null +++ b/node_modules/is-accessor-descriptor/package.json @@ -0,0 +1,110 @@ +{ + "_from": "is-accessor-descriptor@^1.0.0", + "_id": "is-accessor-descriptor@1.0.0", + "_inBundle": false, + "_integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "_location": "/is-accessor-descriptor", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-accessor-descriptor@^1.0.0", + "name": "is-accessor-descriptor", + "escapedName": "is-accessor-descriptor", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/is-descriptor" + ], + "_resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "_shasum": "169c2f6d3df1f992618072365c9b0ea1f6878656", + "_spec": "is-accessor-descriptor@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/is-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Rouven Weßling", + "url": "www.rouvenwessling.de" + } + ], + "dependencies": { + "kind-of": "^6.0.0" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-accessor-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-accessor-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-accessor-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "is-plain-object", + "isobject" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "1.0.0" +} diff --git a/node_modules/is-arrayish/.editorconfig b/node_modules/is-arrayish/.editorconfig new file mode 100644 index 0000000..4c017f8 --- /dev/null +++ b/node_modules/is-arrayish/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.coffee] +indent_style = space + +[{package.json,*.yml}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/node_modules/is-arrayish/.istanbul.yml b/node_modules/is-arrayish/.istanbul.yml new file mode 100644 index 0000000..19fbec3 --- /dev/null +++ b/node_modules/is-arrayish/.istanbul.yml @@ -0,0 +1,4 @@ +instrumentation: + excludes: + - test.js + - test/**/* diff --git a/node_modules/is-arrayish/.npmignore b/node_modules/is-arrayish/.npmignore new file mode 100644 index 0000000..8d5eacb --- /dev/null +++ b/node_modules/is-arrayish/.npmignore @@ -0,0 +1,5 @@ +/coverage/ +/test.js +/test/ +*.sw[a-p] +/node_modules/ diff --git a/node_modules/is-arrayish/.travis.yml b/node_modules/is-arrayish/.travis.yml new file mode 100644 index 0000000..5a04243 --- /dev/null +++ b/node_modules/is-arrayish/.travis.yml @@ -0,0 +1,17 @@ +language: node_js + +script: + - node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register + - cat coverage/lcov.info | node_modules/.bin/coveralls +node_js: + - "0.10" + - "0.11" + - "0.12" + - "iojs" +os: + - linux + - osx + +notifications: + slack: + secure: oOt8QGzdrPDsTMcyahtIq5Q+0U1iwfgJgFCxBLsomQ0bpIMn+y5m4viJydA2UinHPGc944HS3LMZS9iKQyv+DjTgbhUyNXqeVjtxCwRe37f5rKQlXVvdfmjHk2kln4H8DcK3r5Qd/+2hd9BeMsp2GImTrkRSud1CZQlhhe5IgZOboSoWpGVMMy1iazWT06tAtiB2LRVhmsdUaFZDWAhGZ+UAvCPf+mnBOAylIj+U0GDrofhfTi25RK0gddG2f/p2M1HCu49O6wECGWkt2hVei233DkNJyLLLJVcvmhf+aXkV5TjMyaoxh/HdcV4DrA7KvYuWmWWKsINa9hlwAsdd/FYmJ6PjRkKWas2JoQ1C+qOzDxyQvn3CaUZFKD99pdsq0rBBZujqXQKZZ/hWb/CE74BI6fKmqQkiEPaD/7uADj04FEg6HVBZaMCyauOaK5b3VC97twbALZ1qVxYV6mU+zSEvnUbpnjjvRO0fSl9ZHA+rzkW73kX3GmHY0wAozEZbSy7QLuZlQ2QtHmBLr+APaGMdL1sFF9qFfzqKy0WDbSE0WS6hpAEJpTsjYmeBrnI8UmK3m++iEgyQPvZoH9LhUT+ek7XIfHZMe04BmC6wuO24/RfpmR6bQK9VMarFCYlBiWxg/z30vkP0KTpUi3o/cqFm7/Noxc0i2LVqM3E0Sy4= diff --git a/node_modules/is-arrayish/LICENSE b/node_modules/is-arrayish/LICENSE new file mode 100644 index 0000000..0a5f461 --- /dev/null +++ b/node_modules/is-arrayish/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +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/node_modules/is-arrayish/README.md b/node_modules/is-arrayish/README.md new file mode 100644 index 0000000..7d36072 --- /dev/null +++ b/node_modules/is-arrayish/README.md @@ -0,0 +1,16 @@ +# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish) +> Determines if an object can be used like an Array + +## Example +```javascript +var isArrayish = require('is-arrayish'); + +isArrayish([]); // true +isArrayish({__proto__: []}); // true +isArrayish({}); // false +isArrayish({length:10}); // false +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/is-arrayish/index.js b/node_modules/is-arrayish/index.js new file mode 100644 index 0000000..5b97186 --- /dev/null +++ b/node_modules/is-arrayish/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function isArrayish(obj) { + if (!obj) { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && obj.splice instanceof Function); +}; diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json new file mode 100644 index 0000000..89153b9 --- /dev/null +++ b/node_modules/is-arrayish/package.json @@ -0,0 +1,66 @@ +{ + "_from": "is-arrayish@^0.2.1", + "_id": "is-arrayish@0.2.1", + "_inBundle": false, + "_integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "_location": "/is-arrayish", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-arrayish@^0.2.1", + "name": "is-arrayish", + "escapedName": "is-arrayish", + "rawSpec": "^0.2.1", + "saveSpec": null, + "fetchSpec": "^0.2.1" + }, + "_requiredBy": [ + "/error-ex" + ], + "_resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "_shasum": "77c99840527aa8ecb1a8ba697b80645a7a926a9d", + "_spec": "is-arrayish@^0.2.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/error-ex", + "author": { + "name": "Qix", + "url": "http://github.com/qix-" + }, + "bugs": { + "url": "https://github.com/qix-/node-is-arrayish/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Determines if an object can be used as an array", + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.6.1" + }, + "homepage": "https://github.com/qix-/node-is-arrayish#readme", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "name": "is-arrayish", + "repository": { + "type": "git", + "url": "git+https://github.com/qix-/node-is-arrayish.git" + }, + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "version": "0.2.1" +} diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js new file mode 100644 index 0000000..6c8c7e7 --- /dev/null +++ b/node_modules/is-binary-path/index.js @@ -0,0 +1,12 @@ +'use strict'; +var path = require('path'); +var binaryExtensions = require('binary-extensions'); +var exts = Object.create(null); + +binaryExtensions.forEach(function (el) { + exts[el] = true; +}); + +module.exports = function (filepath) { + return path.extname(filepath).slice(1).toLowerCase() in exts; +}; diff --git a/node_modules/is-binary-path/license b/node_modules/is-binary-path/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-binary-path/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/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json new file mode 100644 index 0000000..99482dd --- /dev/null +++ b/node_modules/is-binary-path/package.json @@ -0,0 +1,71 @@ +{ + "_from": "is-binary-path@^1.0.0", + "_id": "is-binary-path@1.0.1", + "_inBundle": false, + "_integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "_location": "/is-binary-path", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-binary-path@^1.0.0", + "name": "is-binary-path", + "escapedName": "is-binary-path", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "_shasum": "75f16642b480f187a711c814161fd3a4a7655898", + "_spec": "is-binary-path@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/chokidar", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-binary-path/issues" + }, + "bundleDependencies": false, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "deprecated": false, + "description": "Check if a filepath is a binary file", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-binary-path#readme", + "keywords": [ + "bin", + "binary", + "ext", + "extensions", + "extension", + "file", + "path", + "check", + "detect", + "is" + ], + "license": "MIT", + "name": "is-binary-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-binary-path.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.1" +} diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md new file mode 100644 index 0000000..a17d6a2 --- /dev/null +++ b/node_modules/is-binary-path/readme.md @@ -0,0 +1,34 @@ +# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) + +> Check if a filepath is a binary file + + +## Install + +``` +$ npm install --save is-binary-path +``` + + +## Usage + +```js +var isBinaryPath = require('is-binary-path'); + +isBinaryPath('src/unicorn.png'); +//=> true + +isBinaryPath('src/unicorn.txt'); +//=> false +``` + + +## Related + +- [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions +- [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-bluebird/License b/node_modules/is-bluebird/License new file mode 100644 index 0000000..bd8523b --- /dev/null +++ b/node_modules/is-bluebird/License @@ -0,0 +1,19 @@ +Copyright (c) 2016 Overlook Motel (theoverlookmotel@gmail.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/node_modules/is-bluebird/README.md b/node_modules/is-bluebird/README.md new file mode 100644 index 0000000..bcd6e77 --- /dev/null +++ b/node_modules/is-bluebird/README.md @@ -0,0 +1,86 @@ +# is-bluebird.js + +# Is this a bluebird promise I see before me? + +[![NPM version](https://img.shields.io/npm/v/is-bluebird.svg)](https://www.npmjs.com/package/is-bluebird) +[![Build Status](https://img.shields.io/travis/overlookmotel/is-bluebird/master.svg)](http://travis-ci.org/overlookmotel/is-bluebird) +[![Dependency Status](https://img.shields.io/david/overlookmotel/is-bluebird.svg)](https://david-dm.org/overlookmotel/is-bluebird) +[![Dev dependency Status](https://img.shields.io/david/dev/overlookmotel/is-bluebird.svg)](https://david-dm.org/overlookmotel/is-bluebird) +[![Coverage Status](https://img.shields.io/coveralls/overlookmotel/is-bluebird/master.svg)](https://coveralls.io/r/overlookmotel/is-bluebird) + +## Usage + +Tools to check whether some input is a [bluebird](http://bluebirdjs.com/) promise, a bluebird promise constructor, or determining the version of bluebird from a promise or constructor. + +#### `isBluebird( promise )` + +Returns true if is a bluebird promise, false if not. + +```js +var isBluebird = require('is-bluebird'); +var Bluebird = require('bluebird'); + +console.log( isBluebird( Bluebird.resolve() ) ); // true +console.log( isBluebird( Promise.resolve() ) ); // false (native JS promise) +``` + +#### `isBluebird.ctor( Promise )` + +Returns true if is bluebird promise constructor, false if not. + +```js +var isBluebird = require('is-bluebird'); +var Bluebird = require('bluebird'); + +console.log( isBluebird.ctor( Bluebird ) ); // true +console.log( isBluebird.ctor( Promise ) ); // false (native JS promise) +``` + +#### `isBluebird.v2( promise )` / `isBluebird.v3( promise )` + +Returns true if is a bluebird promise of the specified version. + +```js +var isBluebird = require('is-bluebird'); +var Bluebird2 = require('bluebird2'); +var Bluebird3 = require('bluebird3'); + +console.log( isBluebird.v2( Bluebird2.resolve() ) ); // true +console.log( isBluebird.v2( Bluebird3.resolve() ) ); // false +console.log( isBluebird.v2( Promise.resolve() ) ); // false (native JS promise) +``` + +#### `isBluebird.v2.ctor( Promise )` / `isBluebird.v3.ctor( Promise )` + +Returns true if is bluebird promise constructor of the specified version. + +```js +var isBluebird = require('is-bluebird'); +var Bluebird2 = require('bluebird2'); +var Bluebird3 = require('bluebird3'); + +console.log( isBluebird.v2.ctor( Bluebird2 ) ); // true +console.log( isBluebird.v2.ctor( Bluebird3 ) ); // false +console.log( isBluebird.v2.ctor( Promise ) ); // false (native JS promise) +``` + +## Tests + +Use `npm test` to run the tests. Use `npm run cover` to check coverage. + +## Changelog + +See [changelog.md](https://github.com/overlookmotel/is-bluebird/blob/master/changelog.md) + +## Issues + +If you discover a bug, please raise an issue on Github. https://github.com/overlookmotel/is-bluebird/issues + +## Contribution + +Pull requests are very welcome. Please: + +* ensure all tests pass before submitting PR +* add an entry to changelog +* add tests for new features +* document new functionality/API additions in README diff --git a/node_modules/is-bluebird/changelog.md b/node_modules/is-bluebird/changelog.md new file mode 100644 index 0000000..14d8f91 --- /dev/null +++ b/node_modules/is-bluebird/changelog.md @@ -0,0 +1,16 @@ +# Changelog + +## 1.0.0 + +* Initial release + +## 1.0.1 + +* Fix README typo + +## 1.0.2 + +* Update `bluebird` dev dependencies +* Update dev dependencies +* Additional tests +* Travis CI tests all branches (to enable `greenskeeper.io`) diff --git a/node_modules/is-bluebird/lib/index.js b/node_modules/is-bluebird/lib/index.js new file mode 100644 index 0000000..1a8bb52 --- /dev/null +++ b/node_modules/is-bluebird/lib/index.js @@ -0,0 +1,79 @@ +// -------------------- +// is-bluebird module +// -------------------- + +// exports + +/** + * Identifies whether input is a bluebird promise. + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird promise, false if not + */ +var isBluebird = function(promise) { + return isObject(promise) && isBluebird.ctor(promise.constructor); +}; + +/** + * Identifies whether input is a bluebird promise constructor. + * @param {*} Promise - Input to be tested + * @returns {boolean} - true if is bluebird promise constructor, false if not + */ +isBluebird.ctor = function(Promise) { + return typeof Promise == 'function' && !!Promise.prototype && typeof Promise.prototype._addCallbacks == 'function'; +}; + +/** + * Identifies whether input is a bluebird v2 promise. + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird v2 promise, false if not + */ +isBluebird.v2 = function(promise) { + return isObject(promise) && isBluebird.v2.ctor(promise.constructor); +}; + +/** + * Identifies whether input is bluebird v2 promise constructor. + * @alias isBluebird.ctor.v2 + * + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird v2 promise, false if not + */ +isBluebird.v2.ctor = function(Promise) { + return isBluebird.ctor(Promise) && Promise.prototype._addCallbacks.length == 6; +}; + +isBluebird.ctor.v2 = isBluebird.v2.ctor; + +/** + * Identifies whether input is a bluebird v3 promise. + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird v3 promise, false if not + */ +isBluebird.v3 = function(promise) { + return isObject(promise) && isBluebird.v3.ctor(promise.constructor); +}; + +/** + * Identifies whether input is bluebird v3 promise constructor. + * @alias isBluebird.ctor.v3 + * + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird v3 promise, false if not + */ +isBluebird.v3.ctor = function(Promise) { + return isBluebird.ctor(Promise) && Promise.prototype._addCallbacks.length == 5; +}; + +isBluebird.ctor.v3 = isBluebird.v3.ctor; + +/** + * Check if input is an object. + * @param {*} obj - Input to be tested + * @returns {boolean} - true if is an object, false if not + */ +function isObject(obj) { + return !!obj && typeof obj == 'object'; +} + +// export isBluebird +module.exports = isBluebird; diff --git a/node_modules/is-bluebird/package.json b/node_modules/is-bluebird/package.json new file mode 100644 index 0000000..cc0376c --- /dev/null +++ b/node_modules/is-bluebird/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "is-bluebird@1.0.2", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "is-bluebird@1.0.2", + "_id": "is-bluebird@1.0.2", + "_inBundle": false, + "_integrity": "sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI=", + "_location": "/is-bluebird", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-bluebird@1.0.2", + "name": "is-bluebird", + "escapedName": "is-bluebird", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/cls-bluebird" + ], + "_resolved": "https://registry.npmjs.org/is-bluebird/-/is-bluebird-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Overlook Motel" + }, + "bugs": { + "url": "https://github.com/overlookmotel/is-bluebird/issues" + }, + "dependencies": {}, + "description": "Is this a bluebird promise I see before me?", + "devDependencies": { + "bluebird2": "^3.0.0", + "bluebird3": "^3.0.6", + "chai": "^3.5.0", + "coveralls": "^2.11.12", + "istanbul": "^0.4.5", + "jshint": "^2.9.3", + "mocha": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/overlookmotel/is-bluebird#readme", + "keywords": [ + "bluebird", + "promise", + "is", + "instance", + "constructor", + "version", + "then", + "check", + "test" + ], + "license": "MIT", + "main": "./lib/", + "name": "is-bluebird", + "repository": { + "type": "git", + "url": "git+https://github.com/overlookmotel/is-bluebird.git" + }, + "scripts": { + "cover": "npm run cover-main && rm -rf coverage", + "cover-main": "COVERAGE=true ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -R spec 'test/**/*.test.js'", + "coveralls": "npm run cover-main && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", + "jshint": "jshint lib test", + "test": "if [ $COVERAGE ]; then npm run coveralls; else npm run jshint && npm run test-main; fi", + "test-main": "./node_modules/mocha/bin/mocha --check-leaks --colors -t 10000 --reporter spec 'test/**/*.test.js'" + }, + "version": "1.0.2" +} diff --git a/node_modules/is-buffer/LICENSE b/node_modules/is-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/node_modules/is-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/node_modules/is-buffer/README.md b/node_modules/is-buffer/README.md new file mode 100644 index 0000000..cce0a8c --- /dev/null +++ b/node_modules/is-buffer/README.md @@ -0,0 +1,53 @@ +# is-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/is-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/is-buffer +[npm-image]: https://img.shields.io/npm/v/is-buffer.svg +[npm-url]: https://npmjs.org/package/is-buffer +[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg +[downloads-url]: https://npmjs.org/package/is-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg +[saucelabs-url]: https://saucelabs.com/u/is-buffer + +## Why not use `Buffer.isBuffer`? + +This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). + +It's future-proof and works in node too! + +## install + +```bash +npm install is-buffer +``` + +## usage + +```js +var isBuffer = require('is-buffer') + +isBuffer(new Buffer(4)) // true + +isBuffer(undefined) // false +isBuffer(null) // false +isBuffer('') // false +isBuffer(true) // false +isBuffer(false) // false +isBuffer(0) // false +isBuffer(1) // false +isBuffer(1.0) // false +isBuffer('string') // false +isBuffer({}) // false +isBuffer(function foo () {}) // false +``` + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/is-buffer/index.js b/node_modules/is-buffer/index.js new file mode 100644 index 0000000..9cce396 --- /dev/null +++ b/node_modules/is-buffer/index.js @@ -0,0 +1,21 @@ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} diff --git a/node_modules/is-buffer/package.json b/node_modules/is-buffer/package.json new file mode 100644 index 0000000..b597a67 --- /dev/null +++ b/node_modules/is-buffer/package.json @@ -0,0 +1,91 @@ +{ + "_from": "is-buffer@^1.1.5", + "_id": "is-buffer@1.1.6", + "_inBundle": false, + "_integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "_location": "/is-buffer", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-buffer@^1.1.5", + "name": "is-buffer", + "escapedName": "is-buffer", + "rawSpec": "^1.1.5", + "saveSpec": null, + "fetchSpec": "^1.1.5" + }, + "_requiredBy": [ + "/class-utils/is-accessor-descriptor/kind-of", + "/class-utils/is-data-descriptor/kind-of", + "/expand-brackets/is-accessor-descriptor/kind-of", + "/expand-brackets/is-data-descriptor/kind-of", + "/has-values/kind-of", + "/is-number/kind-of", + "/object-copy/kind-of", + "/snapdragon-util/kind-of", + "/snapdragon/is-accessor-descriptor/kind-of", + "/snapdragon/is-data-descriptor/kind-of", + "/static-extend/is-accessor-descriptor/kind-of", + "/static-extend/is-data-descriptor/kind-of", + "/to-object-path/kind-of", + "/use/is-accessor-descriptor/kind-of", + "/use/is-data-descriptor/kind-of" + ], + "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "_shasum": "efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be", + "_spec": "is-buffer@^1.1.5", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/is-number/node_modules/kind-of", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/is-buffer/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Determine if an object is a Buffer", + "devDependencies": { + "standard": "*", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "homepage": "https://github.com/feross/is-buffer#readme", + "keywords": [ + "buffer", + "buffers", + "type", + "core buffer", + "browser buffer", + "browserify", + "typed array", + "uint32array", + "int16array", + "int32array", + "float32array", + "float64array", + "browser", + "arraybuffer", + "dataview" + ], + "license": "MIT", + "main": "index.js", + "name": "is-buffer", + "repository": { + "type": "git", + "url": "git://github.com/feross/is-buffer.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "zuul -- test/*.js", + "test-browser-local": "zuul --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "testling": { + "files": "test/*.js" + }, + "version": "1.1.6" +} diff --git a/node_modules/is-buffer/test/basic.js b/node_modules/is-buffer/test/basic.js new file mode 100644 index 0000000..be4f8e4 --- /dev/null +++ b/node_modules/is-buffer/test/basic.js @@ -0,0 +1,24 @@ +var isBuffer = require('../') +var test = require('tape') + +test('is-buffer', function (t) { + t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)') + t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)') + + t.equal(isBuffer(undefined), false, 'undefined') + t.equal(isBuffer(null), false, 'null') + t.equal(isBuffer(''), false, 'empty string') + t.equal(isBuffer(true), false, 'true') + t.equal(isBuffer(false), false, 'false') + t.equal(isBuffer(0), false, '0') + t.equal(isBuffer(1), false, '1') + t.equal(isBuffer(1.0), false, '1.0') + t.equal(isBuffer('string'), false, 'string') + t.equal(isBuffer({}), false, '{}') + t.equal(isBuffer([]), false, '[]') + t.equal(isBuffer(function foo () {}), false, 'function foo () {}') + t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') + t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') + + t.end() +}) diff --git a/node_modules/is-builtin-module/index.js b/node_modules/is-builtin-module/index.js new file mode 100644 index 0000000..b6cfa61 --- /dev/null +++ b/node_modules/is-builtin-module/index.js @@ -0,0 +1,10 @@ +'use strict'; +var builtinModules = require('builtin-modules'); + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return builtinModules.indexOf(str) !== -1; +}; diff --git a/node_modules/is-builtin-module/license b/node_modules/is-builtin-module/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-builtin-module/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/node_modules/is-builtin-module/package.json b/node_modules/is-builtin-module/package.json new file mode 100644 index 0000000..91a8e3e --- /dev/null +++ b/node_modules/is-builtin-module/package.json @@ -0,0 +1,75 @@ +{ + "_from": "is-builtin-module@^1.0.0", + "_id": "is-builtin-module@1.0.0", + "_inBundle": false, + "_integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "_location": "/is-builtin-module", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-builtin-module@^1.0.0", + "name": "is-builtin-module", + "escapedName": "is-builtin-module", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/normalize-package-data" + ], + "_resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "_shasum": "540572d34f7ac3119f8f76c30cbc1b1e037affbe", + "_spec": "is-builtin-module@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/normalize-package-data", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-builtin-module/issues" + }, + "bundleDependencies": false, + "dependencies": { + "builtin-modules": "^1.0.0" + }, + "deprecated": false, + "description": "Check if a string matches the name of a Node.js builtin module", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-builtin-module#readme", + "keywords": [ + "builtin", + "built-in", + "builtins", + "node", + "modules", + "core", + "bundled", + "list", + "array", + "names", + "is", + "detect", + "check", + "match" + ], + "license": "MIT", + "name": "is-builtin-module", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-builtin-module.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/is-builtin-module/readme.md b/node_modules/is-builtin-module/readme.md new file mode 100644 index 0000000..798dcf4 --- /dev/null +++ b/node_modules/is-builtin-module/readme.md @@ -0,0 +1,33 @@ +# is-builtin-module [![Build Status](https://travis-ci.org/sindresorhus/is-builtin-module.svg?branch=master)](https://travis-ci.org/sindresorhus/is-builtin-module) + +> Check if a string matches the name of a Node.js builtin module + + +## Install + +``` +$ npm install --save is-builtin-module +``` + + +## Usage + +```js +var isBuiltinModule = require('is-builtin-module'); + +isBuiltinModule('fs'); +//=> true + +isBuiltinModule('unicorn'); +//=> false :( +``` + + +## Related + +- [builtin-modules](https://github.com/sindresorhus/builtin-modules) - List of the Node.js builtin modules + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-data-descriptor/LICENSE b/node_modules/is-data-descriptor/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/is-data-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/is-data-descriptor/README.md b/node_modules/is-data-descriptor/README.md new file mode 100644 index 0000000..42b0714 --- /dev/null +++ b/node_modules/is-data-descriptor/README.md @@ -0,0 +1,161 @@ +# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-data-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-data-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript data descriptor. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-data-descriptor +``` + +## Usage + +```js +var isDataDesc = require('is-data-descriptor'); +``` + +## Examples + +`true` when the descriptor has valid properties with valid values. + +```js +// `value` can be anything +isDataDesc({value: 'foo'}) +isDataDesc({value: function() {}}) +isDataDesc({value: true}) +//=> true +``` + +`false` when not an object + +```js +isDataDesc('a') +//=> false +isDataDesc(null) +//=> false +isDataDesc([]) +//=> false +``` + +`false` when the object has invalid properties + +```js +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', get: function(){}}) +//=> false +isDataDesc({get: function(){}, value: 'foo'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isDataDesc({value: 'foo', enumerable: 'foo'}) +//=> false +isDataDesc({value: 'foo', configurable: 'foo'}) +//=> false +isDataDesc({value: 'foo', writable: 'foo'}) +//=> false +``` + +## Valid properties + +The only valid data descriptor properties are the following: + +* `configurable` (required) +* `enumerable` (required) +* `value` (optional) +* `writable` (optional) + +To be a valid data descriptor, either `value` or `writable` must be defined. + +**Invalid properties** + +A descriptor may have additional _invalid_ properties (an error will **not** be thrown). + +```js +var foo = {}; + +Object.defineProperty(foo, 'bar', { + enumerable: true, + whatever: 'blah', // invalid, but doesn't cause an error + get: function() { + return 'baz'; + } +}); + +console.log(foo.bar); +//=> 'baz' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 21 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._ \ No newline at end of file diff --git a/node_modules/is-data-descriptor/index.js b/node_modules/is-data-descriptor/index.js new file mode 100644 index 0000000..cfeae36 --- /dev/null +++ b/node_modules/is-data-descriptor/index.js @@ -0,0 +1,49 @@ +/*! + * is-data-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function isDataDescriptor(obj, prop) { + // data descriptor properties + var data = { + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean' + }; + + if (typeOf(obj) !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!('value' in obj) && !('writable' in obj)) { + return false; + } + + for (var key in obj) { + if (key === 'value') continue; + + if (!data.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === data[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +}; diff --git a/node_modules/is-data-descriptor/package.json b/node_modules/is-data-descriptor/package.json new file mode 100644 index 0000000..b494886 --- /dev/null +++ b/node_modules/is-data-descriptor/package.json @@ -0,0 +1,109 @@ +{ + "_from": "is-data-descriptor@^1.0.0", + "_id": "is-data-descriptor@1.0.0", + "_inBundle": false, + "_integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "_location": "/is-data-descriptor", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-data-descriptor@^1.0.0", + "name": "is-data-descriptor", + "escapedName": "is-data-descriptor", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/is-descriptor" + ], + "_resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "_shasum": "d84876321d0e7add03990406abbbbd36ba9268c7", + "_spec": "is-data-descriptor@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/is-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-data-descriptor/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Rouven Weßling", + "url": "www.rouvenwessling.de" + } + ], + "dependencies": { + "kind-of": "^6.0.0" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-data-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-data-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-data-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "1.0.0" +} diff --git a/node_modules/is-descriptor/LICENSE b/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/is-descriptor/README.md b/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..658e533 --- /dev/null +++ b/node_modules/is-descriptor/README.md @@ -0,0 +1,193 @@ +# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-descriptor +``` + +## Usage + +```js +var isDescriptor = require('is-descriptor'); + +isDescriptor({value: 'foo'}) +//=> true +isDescriptor({get: function(){}, set: function(){}}) +//=> true +isDescriptor({get: 'foo', set: function(){}}) +//=> false +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +var obj = {}; +obj.foo = 'abc'; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +isDescriptor(obj, 'foo'); +//=> true +isDescriptor(obj, 'bar'); +//=> true +``` + +## Examples + +### value type + +`false` when not an object + +```js +isDescriptor('a'); +//=> false +isDescriptor(null); +//=> false +isDescriptor([]); +//=> false +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({value: 'foo'}); +//=> true +isDescriptor({value: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', get: noop}); +//=> false +isDescriptor({get: noop, value: noop}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({value: 'foo', enumerable: 'foo'}); +//=> false +isDescriptor({value: 'foo', configurable: 'foo'}); +//=> false +isDescriptor({value: 'foo', writable: 'foo'}); +//=> false +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({get: noop, set: noop}); +//=> true +isDescriptor({get: noop}); +//=> true +isDescriptor({set: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({get: noop, set: noop, bar: 'baz'}); +//=> false +isDescriptor({get: noop, writable: true}); +//=> false +isDescriptor({get: noop, value: true}); +//=> false +``` + +`false` when an accessor is not a function + +```js +isDescriptor({get: noop, set: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: noop}); +//=> false +isDescriptor({get: 'foo', bar: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: 'baz'}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({get: noop, set: noop, enumerable: 'foo'}); +//=> false +isDescriptor({set: noop, configurable: 'foo'}); +//=> false +isDescriptor({get: noop, configurable: 'foo'}); +//=> false +``` + +## About + +### Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 24 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/node_modules/is-descriptor/index.js b/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9b91d7 --- /dev/null +++ b/node_modules/is-descriptor/index.js @@ -0,0 +1,22 @@ +/*! + * is-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (typeOf(obj) !== 'object') { + return false; + } + if ('get' in obj) { + return isAccessor(obj, key); + } + return isData(obj, key); +}; diff --git a/node_modules/is-descriptor/package.json b/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..45430a9 --- /dev/null +++ b/node_modules/is-descriptor/package.json @@ -0,0 +1,118 @@ +{ + "_from": "is-descriptor@^1.0.0", + "_id": "is-descriptor@1.0.2", + "_inBundle": false, + "_integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "_location": "/is-descriptor", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-descriptor@^1.0.0", + "name": "is-descriptor", + "escapedName": "is-descriptor", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/base/define-property", + "/braces/define-property", + "/define-property", + "/extglob/define-property", + "/snapdragon-node/define-property" + ], + "_resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "_shasum": "3b159746a66604b04f8c81524ba365c5f14d86ec", + "_spec": "is-descriptor@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/braces/node_modules/define-property", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-descriptor/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.2" +} diff --git a/node_modules/is-extendable/LICENSE b/node_modules/is-extendable/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/node_modules/is-extendable/README.md b/node_modules/is-extendable/README.md new file mode 100644 index 0000000..e4cfaeb --- /dev/null +++ b/node_modules/is-extendable/README.md @@ -0,0 +1,72 @@ +# is-extendable [![NPM version](https://badge.fury.io/js/is-extendable.svg)](http://badge.fury.io/js/is-extendable) + +> Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?" + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-extendable --save +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* `array` +* `regexp` +* `plain object` +* `function` +* `date` +* `error` + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is an `object`, `function` + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Related projects + +* [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [is-equal-shallow](https://github.com/jonschlinkert/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extendable/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._ \ No newline at end of file diff --git a/node_modules/is-extendable/index.js b/node_modules/is-extendable/index.js new file mode 100644 index 0000000..4ee71a4 --- /dev/null +++ b/node_modules/is-extendable/index.js @@ -0,0 +1,13 @@ +/*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function isExtendable(val) { + return typeof val !== 'undefined' && val !== null + && (typeof val === 'object' || typeof val === 'function'); +}; diff --git a/node_modules/is-extendable/package.json b/node_modules/is-extendable/package.json new file mode 100644 index 0000000..4cc4737 --- /dev/null +++ b/node_modules/is-extendable/package.json @@ -0,0 +1,91 @@ +{ + "_from": "is-extendable@^0.1.0", + "_id": "is-extendable@0.1.1", + "_inBundle": false, + "_integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "_location": "/is-extendable", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-extendable@^0.1.0", + "name": "is-extendable", + "escapedName": "is-extendable", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/braces/extend-shallow", + "/expand-brackets/extend-shallow", + "/extglob/extend-shallow", + "/fill-range/extend-shallow", + "/set-value", + "/set-value/extend-shallow", + "/snapdragon/extend-shallow", + "/union-value", + "/union-value/extend-shallow", + "/union-value/set-value" + ], + "_resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "_shasum": "62b110e289a471418e3ec36a617d472e301dfc89", + "_spec": "is-extendable@^0.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/braces/node_modules/extend-shallow", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. \"can the value have keys?\"", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-extendable", + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "license": "MIT", + "main": "index.js", + "name": "is-extendable", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extendable.git" + }, + "scripts": { + "test": "mocha" + }, + "verbiage": { + "related": { + "list": [ + "isobject", + "is-plain-object", + "kind-of", + "is-extendable", + "is-equal-shallow", + "extend-shallow", + "assign-deep" + ] + } + }, + "version": "0.1.1" +} diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +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/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md new file mode 100644 index 0000000..0416af5 --- /dev/null +++ b/node_modules/is-extglob/README.md @@ -0,0 +1,107 @@ +# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) + +> Returns true if a string has an extglob. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extglob +``` + +## Usage + +```js +var isExtglob = require('is-extglob'); +``` + +**True** + +```js +isExtglob('?(abc)'); +isExtglob('@(abc)'); +isExtglob('!(abc)'); +isExtglob('*(abc)'); +isExtglob('+(abc)'); +``` + +**False** + +Escaped extglobs: + +```js +isExtglob('\\?(abc)'); +isExtglob('\\@(abc)'); +isExtglob('\\!(abc)'); +isExtglob('\\*(abc)'); +isExtglob('\\+(abc)'); +``` + +Everything else... + +```js +isExtglob('foo.js'); +isExtglob('!foo.js'); +isExtglob('*.js'); +isExtglob('**/abc.js'); +isExtglob('abc/*.js'); +isExtglob('abc/(aaa|bbb).js'); +isExtglob('abc/[a-z].js'); +isExtglob('abc/{a,b}.js'); +isExtglob('abc/?.js'); +isExtglob('abc.js'); +isExtglob('abc/def/ghi.js'); +``` + +## History + +**v2.0** + +Adds support for escaping. Escaped exglobs no longer return true. + +## About + +### Related projects + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js new file mode 100644 index 0000000..c1d986f --- /dev/null +++ b/node_modules/is-extglob/index.js @@ -0,0 +1,20 @@ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + var match; + while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + + return false; +}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json new file mode 100644 index 0000000..c89b408 --- /dev/null +++ b/node_modules/is-extglob/package.json @@ -0,0 +1,101 @@ +{ + "_from": "is-extglob@^2.1.0", + "_id": "is-extglob@2.1.1", + "_inBundle": false, + "_integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "_location": "/is-extglob", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-extglob@^2.1.0", + "name": "is-extglob", + "escapedName": "is-extglob", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/glob-parent/is-glob", + "/is-glob" + ], + "_resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "_shasum": "a88c02535791f02ed37c76a1b9ea9773c833f8c2", + "_spec": "is-extglob@^2.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/glob-parent/node_modules/is-glob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Returns true if a string has an extglob.", + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-extglob", + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "license": "MIT", + "main": "index.js", + "name": "is-extglob", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extglob.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "2.1.1" +} diff --git a/node_modules/is-fullwidth-code-point/index.js b/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000..d506327 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +/* eslint-disable yoda */ +module.exports = x => { + if (Number.isNaN(x)) { + return false; + } + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= x && x <= 0x4dbf) || + // CJK Unified Ideographs .. Yi Radicals + (0x4e00 <= x && x <= 0xa4c6) || + // Hangul Jamo Extended-A + (0xa960 <= x && x <= 0xa97c) || + // Hangul Syllables + (0xac00 <= x && x <= 0xd7a3) || + // CJK Compatibility Ideographs + (0xf900 <= x && x <= 0xfaff) || + // Vertical Forms + (0xfe10 <= x && x <= 0xfe19) || + // CJK Compatibility Forms .. Small Form Variants + (0xfe30 <= x && x <= 0xfe6b) || + // Halfwidth and Fullwidth Forms + (0xff01 <= x && x <= 0xff60) || + (0xffe0 <= x && x <= 0xffe6) || + // Kana Supplement + (0x1b000 <= x && x <= 0x1b001) || + // Enclosed Ideographic Supplement + (0x1f200 <= x && x <= 0x1f251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= x && x <= 0x3fffd) + ) + ) { + return true; + } + + return false; +}; diff --git a/node_modules/is-fullwidth-code-point/license b/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-fullwidth-code-point/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/node_modules/is-fullwidth-code-point/package.json b/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000..34133f2 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,77 @@ +{ + "_from": "is-fullwidth-code-point@^2.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inBundle": false, + "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "_location": "/is-fullwidth-code-point", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-fullwidth-code-point@^2.0.0", + "name": "is-fullwidth-code-point", + "escapedName": "is-fullwidth-code-point", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "_spec": "is-fullwidth-code-point@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "license": "MIT", + "name": "is-fullwidth-code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/is-fullwidth-code-point/readme.md b/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000..093b028 --- /dev/null +++ b/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('谢'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/is-glob/README.md b/node_modules/is-glob/README.md new file mode 100644 index 0000000..7c25229 --- /dev/null +++ b/node_modules/is-glob/README.md @@ -0,0 +1,190 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-glob) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/is-glob.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/is-glob) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +### Default behavior + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob('abc/?.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +### Option strict + +When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that +some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not. + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js', {strict: false}); +isGlob('*.js', {strict: false}); +isGlob('**/abc.js', {strict: false}); +isGlob('abc/*.js', {strict: false}); +isGlob('abc/(aaa|bbb).js', {strict: false}); +isGlob('abc/[a-z].js', {strict: false}); +isGlob('abc/{a,b}.js', {strict: false}); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js', {strict: false}); +isGlob('abc/!(a).js', {strict: false}); +isGlob('abc/+(a).js', {strict: false}); +isGlob('abc/*(a).js', {strict: false}); +isGlob('abc/?(a).js', {strict: false}); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('\\!foo.js', {strict: false}); +isGlob('\\*.js', {strict: false}); +isGlob('\\*\\*/abc.js', {strict: false}); +isGlob('abc/\\*.js', {strict: false}); +isGlob('abc/\\(aaa|bbb).js', {strict: false}); +isGlob('abc/\\[a-z].js', {strict: false}); +isGlob('abc/\\{a,b}.js', {strict: false}); +//=> false +``` + +## About + +### Related projects + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality node.js applications, using plugins like building blocks") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 47 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [tuvistavie](https://github.com/tuvistavie) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 07, 2017._ \ No newline at end of file diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js new file mode 100644 index 0000000..711b8b2 --- /dev/null +++ b/node_modules/is-glob/index.js @@ -0,0 +1,46 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isExtglob = require('is-extglob'); +var chars = { '{': '}', '(': ')', '[': ']'}; + +module.exports = function isGlob(str, options) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) { + return true; + } + + var regex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; + var match; + + // optionally relax regex + if (options && options.strict === false) { + regex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; + } + + while ((match = regex.exec(str))) { + if (match[2]) return true; + var idx = match.index + match[0].length; + + // if an open bracket/brace/paren is escaped, + // set the index to the next closing character + var open = match[1]; + var close = open ? chars[open] : null; + if (open && close) { + var n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + + str = str.slice(idx); + } + return false; +}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json new file mode 100644 index 0000000..ae1730f --- /dev/null +++ b/node_modules/is-glob/package.json @@ -0,0 +1,121 @@ +{ + "_from": "is-glob@^4.0.0", + "_id": "is-glob@4.0.0", + "_inBundle": false, + "_integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "_location": "/is-glob", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-glob@^4.0.0", + "name": "is-glob", + "escapedName": "is-glob", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "_shasum": "9521c76845cc2610a85203ddf080a958c2ffabc0", + "_spec": "is-glob@^4.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/chokidar", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-glob/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Daniel Perez", + "url": "https://tuvistavie.com" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } + ], + "dependencies": { + "is-extglob": "^2.1.1" + }, + "deprecated": false, + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-glob", + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "license": "MIT", + "main": "index.js", + "name": "is-glob", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-glob.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + }, + "version": "4.0.0" +} diff --git a/node_modules/is-installed-globally/index.js b/node_modules/is-installed-globally/index.js new file mode 100644 index 0000000..5092c2b --- /dev/null +++ b/node_modules/is-installed-globally/index.js @@ -0,0 +1,5 @@ +'use strict'; +const globalDirs = require('global-dirs'); +const isPathInside = require('is-path-inside'); + +module.exports = isPathInside(__dirname, globalDirs.yarn.packages) || isPathInside(__dirname, globalDirs.npm.packages); diff --git a/node_modules/is-installed-globally/license b/node_modules/is-installed-globally/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/is-installed-globally/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/node_modules/is-installed-globally/package.json b/node_modules/is-installed-globally/package.json new file mode 100644 index 0000000..5bddf59 --- /dev/null +++ b/node_modules/is-installed-globally/package.json @@ -0,0 +1,80 @@ +{ + "_from": "is-installed-globally@^0.1.0", + "_id": "is-installed-globally@0.1.0", + "_inBundle": false, + "_integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "_location": "/is-installed-globally", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-installed-globally@^0.1.0", + "name": "is-installed-globally", + "escapedName": "is-installed-globally", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "_shasum": "0dfd98f5a9111716dd535dda6492f67bf3d25a80", + "_spec": "is-installed-globally@^0.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-installed-globally/issues" + }, + "bundleDependencies": false, + "dependencies": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + }, + "deprecated": false, + "description": "Check if your package was installed globally", + "devDependencies": { + "ava": "*", + "execa": "^0.7.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-installed-globally#readme", + "keywords": [ + "global", + "package", + "globally", + "module", + "install", + "installed", + "npm", + "yarn", + "is", + "check", + "detect", + "local", + "locally", + "cli", + "bin", + "binary" + ], + "license": "MIT", + "name": "is-installed-globally", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-installed-globally.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "0.1.0" +} diff --git a/node_modules/is-installed-globally/readme.md b/node_modules/is-installed-globally/readme.md new file mode 100644 index 0000000..f3c9338 --- /dev/null +++ b/node_modules/is-installed-globally/readme.md @@ -0,0 +1,39 @@ +# is-installed-globally [![Build Status](https://travis-ci.org/sindresorhus/is-installed-globally.svg?branch=master)](https://travis-ci.org/sindresorhus/is-installed-globally) + +> Check if your package was installed globally + +Can be useful if your CLI needs different behavior when installed globally and locally. + + +## Install + +``` +$ npm install is-installed-globally +``` + + +## Usage + +```js +const isInstalledGlobally = require('is-installed-globally'); + +// With `npm install your-package` +console.log(isInstalledGlobally); +//=> false + +// With `npm install --global your-package` +console.log(isInstalledGlobally); +//=> true +``` + + +## Related + +- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module +- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module +- [global-dirs](https://github.com/sindresorhus/global-dirs) - Get the directory of globally installed packages and binaries + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-npm/index.js b/node_modules/is-npm/index.js new file mode 100644 index 0000000..b5f3c27 --- /dev/null +++ b/node_modules/is-npm/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = 'npm_config_username' in process.env || + 'npm_package_name' in process.env || + 'npm_config_heading' in process.env; diff --git a/node_modules/is-npm/package.json b/node_modules/is-npm/package.json new file mode 100644 index 0000000..9405bad --- /dev/null +++ b/node_modules/is-npm/package.json @@ -0,0 +1,64 @@ +{ + "_from": "is-npm@^1.0.0", + "_id": "is-npm@1.0.0", + "_inBundle": false, + "_integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "_location": "/is-npm", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-npm@^1.0.0", + "name": "is-npm", + "escapedName": "is-npm", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "_shasum": "f2fb63a65e4905b406c86072765a1a4dc793b9f4", + "_spec": "is-npm@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-npm/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if your code is running as an npm script", + "devDependencies": { + "ava": "0.0.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-npm#readme", + "keywords": [ + "npm", + "is", + "check", + "detect", + "env", + "environment" + ], + "license": "MIT", + "name": "is-npm", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-npm.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/is-npm/readme.md b/node_modules/is-npm/readme.md new file mode 100644 index 0000000..84833ec --- /dev/null +++ b/node_modules/is-npm/readme.md @@ -0,0 +1,30 @@ +# is-npm [![Build Status](https://travis-ci.org/sindresorhus/is-npm.svg?branch=master)](https://travis-ci.org/sindresorhus/is-npm) + +> Check if your code is running as an [npm script](https://www.npmjs.org/doc/misc/npm-scripts.html) + + +## Install + +```sh +$ npm install --save is-npm +``` + + +## Usage + +```js +var isNpm = require('is-npm'); +console.log(isNpm); +``` + +```sh +$ node foo.js +#=> false +$ npm run foo +#=> true +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +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/node_modules/is-number/README.md b/node_modules/is-number/README.md new file mode 100644 index 0000000..281165d --- /dev/null +++ b/node_modules/is-number/README.md @@ -0,0 +1,115 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Usage + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## About + +### Related projects + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-number/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 10, 2016._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js new file mode 100644 index 0000000..7a2a45b --- /dev/null +++ b/node_modules/is-number/index.js @@ -0,0 +1,22 @@ +/*! + * is-number + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function isNumber(num) { + var type = typeOf(num); + + if (type === 'string') { + if (!num.trim()) return false; + } else if (type !== 'number') { + return false; + } + + return (num - num + 1) >= 0; +}; diff --git a/node_modules/is-number/node_modules/kind-of/LICENSE b/node_modules/is-number/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/is-number/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/is-number/node_modules/kind-of/README.md b/node_modules/is-number/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/is-number/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/is-number/node_modules/kind-of/index.js b/node_modules/is-number/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/is-number/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/is-number/node_modules/kind-of/package.json b/node_modules/is-number/node_modules/kind-of/package.json new file mode 100644 index 0000000..f8d5225 --- /dev/null +++ b/node_modules/is-number/node_modules/kind-of/package.json @@ -0,0 +1,139 @@ +{ + "_from": "kind-of@^3.0.2", + "_id": "kind-of@3.2.2", + "_inBundle": false, + "_integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "_location": "/is-number/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^3.0.2", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^3.0.2", + "saveSpec": null, + "fetchSpec": "^3.0.2" + }, + "_requiredBy": [ + "/is-number" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "_shasum": "31ea21a734bab9bbb0f32466d893aea51e4a3c64", + "_spec": "kind-of@^3.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/is-number", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "is-buffer": "^1.1.5" + }, + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "3.2.2" +} diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json new file mode 100644 index 0000000..a12e70f --- /dev/null +++ b/node_modules/is-number/package.json @@ -0,0 +1,125 @@ +{ + "_from": "is-number@^3.0.0", + "_id": "is-number@3.0.0", + "_inBundle": false, + "_integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "_location": "/is-number", + "_phantomChildren": { + "is-buffer": "1.1.6" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-number@^3.0.0", + "name": "is-number", + "escapedName": "is-number", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/fill-range", + "/has-values", + "/to-regex-range" + ], + "_resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "_shasum": "24fd6201a4782cf50561c810276afc7d12d71195", + "_spec": "is-number@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Charlike Mike Reagent", + "url": "http://www.tunnckocore.tk" + }, + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + } + ], + "dependencies": { + "kind-of": "^3.0.2" + }, + "deprecated": false, + "description": "Returns true if the value is a number. comprehensive tests.", + "devDependencies": { + "benchmarked": "^0.2.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-number", + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-number", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-number.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + }, + "version": "3.0.0" +} diff --git a/node_modules/is-obj/index.js b/node_modules/is-obj/index.js new file mode 100644 index 0000000..4d023bc --- /dev/null +++ b/node_modules/is-obj/index.js @@ -0,0 +1,5 @@ +'use strict'; +module.exports = function (x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +}; diff --git a/node_modules/is-obj/license b/node_modules/is-obj/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-obj/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/node_modules/is-obj/package.json b/node_modules/is-obj/package.json new file mode 100644 index 0000000..203a738 --- /dev/null +++ b/node_modules/is-obj/package.json @@ -0,0 +1,65 @@ +{ + "_from": "is-obj@^1.0.0", + "_id": "is-obj@1.0.1", + "_inBundle": false, + "_integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "_location": "/is-obj", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-obj@^1.0.0", + "name": "is-obj", + "escapedName": "is-obj", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/dot-prop" + ], + "_resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "_shasum": "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f", + "_spec": "is-obj@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/dot-prop", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-obj/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if a value is an object", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-obj#readme", + "keywords": [ + "obj", + "object", + "is", + "check", + "test", + "type" + ], + "license": "MIT", + "name": "is-obj", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-obj.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/is-obj/readme.md b/node_modules/is-obj/readme.md new file mode 100644 index 0000000..d311026 --- /dev/null +++ b/node_modules/is-obj/readme.md @@ -0,0 +1,34 @@ +# is-obj [![Build Status](https://travis-ci.org/sindresorhus/is-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-obj) + +> Check if a value is an object + +Keep in mind that array, function, regexp, etc, are objects in JavaScript.
+See [`is-plain-obj`](https://github.com/sindresorhus/is-plain-obj) if you want to check for plain objects. + + +## Install + +``` +$ npm install --save is-obj +``` + + +## Usage + +```js +const isObj = require('is-obj'); + +isObj({foo: 'bar'}); +//=> true + +isObj([1, 2, 3]); +//=> true + +isObj('foo'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-odd/LICENSE b/node_modules/is-odd/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/is-odd/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/is-odd/README.md b/node_modules/is-odd/README.md new file mode 100644 index 0000000..7c72082 --- /dev/null +++ b/node_modules/is-odd/README.md @@ -0,0 +1,94 @@ +# is-odd [![NPM version](https://img.shields.io/npm/v/is-odd.svg?style=flat)](https://www.npmjs.com/package/is-odd) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-odd.svg?style=flat)](https://npmjs.org/package/is-odd) [![NPM total downloads](https://img.shields.io/npm/dt/is-odd.svg?style=flat)](https://npmjs.org/package/is-odd) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-odd.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-odd) + +> Returns true if the given number is odd. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-odd +``` + +## Usage + +```js +var isOdd = require('is-odd'); + +isOdd(0); +//=> false +isOdd('1'); +//=> true +isOdd(2); +//=> false +isOdd('3'); +//=> true +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [exponential-moving-average](https://www.npmjs.com/package/exponential-moving-average): Calculate an exponential moving average from an array of numbers. | [homepage](https://github.com/jonschlinkert/exponential-moving-average "Calculate an exponential moving average from an array of numbers.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [sma](https://www.npmjs.com/package/sma): Calculate the simple moving average of an array. | [homepage](https://github.com/doowb/sma "Calculate the simple moving average of an array.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 11 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [noformnocontent](https://github.com/noformnocontent) | +| 1 | [Semigradsky](https://github.com/Semigradsky) | +| 1 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._ \ No newline at end of file diff --git a/node_modules/is-odd/index.js b/node_modules/is-odd/index.js new file mode 100644 index 0000000..c8950c1 --- /dev/null +++ b/node_modules/is-odd/index.js @@ -0,0 +1,20 @@ +/*! + * is-odd + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isNumber = require('is-number'); + +module.exports = function isOdd(i) { + if (!isNumber(i)) { + throw new TypeError('is-odd expects a number.'); + } + if (Number(i) !== Math.floor(i)) { + throw new RangeError('is-odd expects an integer.'); + } + return !!(~~i & 1); +}; diff --git a/node_modules/is-odd/node_modules/is-number/LICENSE b/node_modules/is-odd/node_modules/is-number/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-odd/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/is-odd/node_modules/is-number/README.md b/node_modules/is-odd/node_modules/is-number/README.md new file mode 100644 index 0000000..6436992 --- /dev/null +++ b/node_modules/is-odd/node_modules/is-number/README.md @@ -0,0 +1,135 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Usage + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 38 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 17, 2017._ \ No newline at end of file diff --git a/node_modules/is-odd/node_modules/is-number/index.js b/node_modules/is-odd/node_modules/is-number/index.js new file mode 100644 index 0000000..5221f40 --- /dev/null +++ b/node_modules/is-odd/node_modules/is-number/index.js @@ -0,0 +1,21 @@ +/*! + * is-number + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function isNumber(num) { + var type = typeof num; + + if (type === 'string' || num instanceof String) { + // an empty string would be coerced to true with the below logic + if (!num.trim()) return false; + } else if (type !== 'number' && !(num instanceof Number)) { + return false; + } + + return (num - num + 1) >= 0; +}; diff --git a/node_modules/is-odd/node_modules/is-number/package.json b/node_modules/is-odd/node_modules/is-number/package.json new file mode 100644 index 0000000..c287fd6 --- /dev/null +++ b/node_modules/is-odd/node_modules/is-number/package.json @@ -0,0 +1,113 @@ +{ + "_from": "is-number@^4.0.0", + "_id": "is-number@4.0.0", + "_inBundle": false, + "_integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "_location": "/is-odd/is-number", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-number@^4.0.0", + "name": "is-number", + "escapedName": "is-number", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/is-odd" + ], + "_resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "_shasum": "0026e37f5454d73e356dfe6564699867c6a7f0ff", + "_spec": "is-number@^4.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/is-odd", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "tunnckoCore", + "url": "https://i.am.charlike.online" + } + ], + "deprecated": false, + "description": "Returns true if the value is a number. comprehensive tests.", + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.1.0", + "gulp-format-md": "^1.0.0", + "mocha": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-number", + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-number", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-number.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "4.0.0" +} diff --git a/node_modules/is-odd/package.json b/node_modules/is-odd/package.json new file mode 100644 index 0000000..7e301ad --- /dev/null +++ b/node_modules/is-odd/package.json @@ -0,0 +1,110 @@ +{ + "_from": "is-odd@^2.0.0", + "_id": "is-odd@2.0.0", + "_inBundle": false, + "_integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "_location": "/is-odd", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-odd@^2.0.0", + "name": "is-odd", + "escapedName": "is-odd", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "_shasum": "7646624671fd7ea558ccd9a2795182f2958f1b24", + "_spec": "is-odd@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/nanomatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-odd/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Dmitry Semigradsky", + "url": "http://brainstorage.me/semigradsky" + }, + { + "name": "DYM", + "url": "https://dym.sh" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Rouven Weßling", + "url": "www.rouvenwessling.de" + } + ], + "dependencies": { + "is-number": "^4.0.0" + }, + "deprecated": false, + "description": "Returns true if the given number is odd.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-odd", + "keywords": [ + "array", + "count", + "even", + "filter", + "integer", + "is", + "math", + "numeric", + "odd", + "string" + ], + "license": "MIT", + "main": "index.js", + "name": "is-odd", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-odd.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "exponential-moving-average", + "is-even", + "sma" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "2.0.0" +} diff --git a/node_modules/is-path-inside/index.js b/node_modules/is-path-inside/index.js new file mode 100644 index 0000000..0a4d2fd --- /dev/null +++ b/node_modules/is-path-inside/index.js @@ -0,0 +1,14 @@ +'use strict'; +var path = require('path'); +var pathIsInside = require('path-is-inside'); + +module.exports = function (a, b) { + a = path.resolve(a); + b = path.resolve(b); + + if (a === b) { + return false; + } + + return pathIsInside(a, b); +}; diff --git a/node_modules/is-path-inside/license b/node_modules/is-path-inside/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-path-inside/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/node_modules/is-path-inside/package.json b/node_modules/is-path-inside/package.json new file mode 100644 index 0000000..4ab9a9a --- /dev/null +++ b/node_modules/is-path-inside/package.json @@ -0,0 +1,69 @@ +{ + "_from": "is-path-inside@^1.0.0", + "_id": "is-path-inside@1.0.1", + "_inBundle": false, + "_integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "_location": "/is-path-inside", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-path-inside@^1.0.0", + "name": "is-path-inside", + "escapedName": "is-path-inside", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/is-installed-globally" + ], + "_resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "_shasum": "8ef5b7de50437a3fdca6b4e865ef7aa55cb48036", + "_spec": "is-path-inside@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/is-installed-globally", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-path-inside/issues" + }, + "bundleDependencies": false, + "dependencies": { + "path-is-inside": "^1.0.1" + }, + "deprecated": false, + "description": "Check if a path is inside another path", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-path-inside#readme", + "keywords": [ + "path", + "inside", + "folder", + "directory", + "dir", + "file", + "resolve" + ], + "license": "MIT", + "name": "is-path-inside", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-path-inside.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/is-path-inside/readme.md b/node_modules/is-path-inside/readme.md new file mode 100644 index 0000000..cc5f516 --- /dev/null +++ b/node_modules/is-path-inside/readme.md @@ -0,0 +1,34 @@ +# is-path-inside [![Build Status](https://travis-ci.org/sindresorhus/is-path-inside.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-inside) + +> Check if a path is inside another path + + +## Install + +``` +$ npm install --save is-path-inside +``` + + +## Usage + +```js +var isPathInside = require('is-path-inside'); + +isPathInside('a/b/c', 'a/b'); +//=> true + +isPathInside('a/b/c', 'x/y'); +//=> false + +isPathInside('a/b/c', 'a/b/c'); +//=> false + +isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus'); +//=> true +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-plain-object/LICENSE b/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/is-plain-object/README.md b/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..1f9d0c8 --- /dev/null +++ b/node_modules/is-plain-object/README.md @@ -0,0 +1,104 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +var isPlainObject = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +### Related projects + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 17 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._ \ No newline at end of file diff --git a/node_modules/is-plain-object/index.d.ts b/node_modules/is-plain-object/index.d.ts new file mode 100644 index 0000000..74a44e9 --- /dev/null +++ b/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,5 @@ +export = isPlainObject; + +declare function isPlainObject(o: any): boolean; + +declare namespace isPlainObject {} diff --git a/node_modules/is-plain-object/index.js b/node_modules/is-plain-object/index.js new file mode 100644 index 0000000..c328484 --- /dev/null +++ b/node_modules/is-plain-object/index.js @@ -0,0 +1,37 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var isObject = require('isobject'); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/is-plain-object/package.json b/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..db95e01 --- /dev/null +++ b/node_modules/is-plain-object/package.json @@ -0,0 +1,124 @@ +{ + "_from": "is-plain-object@^2.0.3", + "_id": "is-plain-object@2.0.4", + "_inBundle": false, + "_integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "_location": "/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-plain-object@^2.0.3", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "^2.0.3", + "saveSpec": null, + "fetchSpec": "^2.0.3" + }, + "_requiredBy": [ + "/extend-shallow/is-extendable", + "/mixin-deep/is-extendable", + "/set-value", + "/union-value/set-value" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "_shasum": "2c163b3fafb1b606d9d17928f05c2a1c38e07677", + "_spec": "is-plain-object@^2.0.3", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/set-value", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "isobject": "^3.0.1" + }, + "deprecated": false, + "description": "Returns true if an object was created by the `Object` constructor.", + "devDependencies": { + "browserify": "^14.4.0", + "chai": "^4.0.2", + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2", + "mocha-phantomjs": "^4.1.0", + "phantomjs": "^2.1.7", + "uglify-js": "^3.0.24" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js", + "test": "npm run test_node && npm run browserify && npm run test_browser", + "test_browser": "mocha-phantomjs test/browser.html", + "test_node": "mocha" + }, + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "2.0.4" +} diff --git a/node_modules/is-promise/.npmignore b/node_modules/is-promise/.npmignore new file mode 100644 index 0000000..aeb7b45 --- /dev/null +++ b/node_modules/is-promise/.npmignore @@ -0,0 +1,6 @@ +component +build +node_modules +test.js +component.json +.gitignore \ No newline at end of file diff --git a/node_modules/is-promise/.travis.yml b/node_modules/is-promise/.travis.yml new file mode 100644 index 0000000..87f8cd9 --- /dev/null +++ b/node_modules/is-promise/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" \ No newline at end of file diff --git a/node_modules/is-promise/LICENSE b/node_modules/is-promise/LICENSE new file mode 100644 index 0000000..27cc9f3 --- /dev/null +++ b/node_modules/is-promise/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +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/node_modules/is-promise/index.js b/node_modules/is-promise/index.js new file mode 100644 index 0000000..ca2444c --- /dev/null +++ b/node_modules/is-promise/index.js @@ -0,0 +1,5 @@ +module.exports = isPromise; + +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} diff --git a/node_modules/is-promise/package.json b/node_modules/is-promise/package.json new file mode 100644 index 0000000..6e15422 --- /dev/null +++ b/node_modules/is-promise/package.json @@ -0,0 +1,50 @@ +{ + "_from": "is-promise@^2.1", + "_id": "is-promise@2.1.0", + "_inBundle": false, + "_integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "_location": "/is-promise", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-promise@^2.1", + "name": "is-promise", + "escapedName": "is-promise", + "rawSpec": "^2.1", + "saveSpec": null, + "fetchSpec": "^2.1" + }, + "_requiredBy": [ + "/memoizee" + ], + "_resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "_shasum": "79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa", + "_spec": "is-promise@^2.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/memoizee", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/then/is-promise/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Test whether an object looks like a promises-a+ promise", + "devDependencies": { + "better-assert": "~0.1.0", + "mocha": "~1.7.4" + }, + "homepage": "https://github.com/then/is-promise#readme", + "license": "MIT", + "main": "index.js", + "name": "is-promise", + "repository": { + "type": "git", + "url": "git+https://github.com/then/is-promise.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "2.1.0" +} diff --git a/node_modules/is-promise/readme.md b/node_modules/is-promise/readme.md new file mode 100644 index 0000000..50d5d98 --- /dev/null +++ b/node_modules/is-promise/readme.md @@ -0,0 +1,29 @@ + +# is-promise + + Test whether an object looks like a promises-a+ promise + + [![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise) + [![Dependency Status](https://img.shields.io/gemnasium/then/is-promise.svg)](https://gemnasium.com/then/is-promise) + [![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise) + +## Installation + + $ npm install is-promise + +You can also use it client side via npm. + +## API + +```javascript +var isPromise = require('is-promise'); + +isPromise({then:function () {...}});//=>true +isPromise(null);//=>false +isPromise({});//=>false +isPromise({then: true})//=>false +``` + +## License + + MIT diff --git a/node_modules/is-redirect/index.js b/node_modules/is-redirect/index.js new file mode 100644 index 0000000..75ec009 --- /dev/null +++ b/node_modules/is-redirect/index.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = function (x) { + if (typeof x !== 'number') { + throw new TypeError('Expected a number'); + } + + return x === 300 || + x === 301 || + x === 302 || + x === 303 || + x === 305 || + x === 307 || + x === 308; +}; diff --git a/node_modules/is-redirect/license b/node_modules/is-redirect/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-redirect/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/node_modules/is-redirect/package.json b/node_modules/is-redirect/package.json new file mode 100644 index 0000000..da5693b --- /dev/null +++ b/node_modules/is-redirect/package.json @@ -0,0 +1,67 @@ +{ + "_from": "is-redirect@^1.0.0", + "_id": "is-redirect@1.0.0", + "_inBundle": false, + "_integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "_location": "/is-redirect", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-redirect@^1.0.0", + "name": "is-redirect", + "escapedName": "is-redirect", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "_shasum": "1d03dded53bd8db0f30c26e4f95d36fc7c87dc24", + "_spec": "is-redirect@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/got", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-redirect/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if a number is a redirect HTTP status code", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-redirect#readme", + "keywords": [ + "redirect", + "http", + "https", + "status", + "code", + "codes", + "is", + "check", + "detect" + ], + "license": "MIT", + "name": "is-redirect", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-redirect.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/is-redirect/readme.md b/node_modules/is-redirect/readme.md new file mode 100644 index 0000000..e9f0a39 --- /dev/null +++ b/node_modules/is-redirect/readme.md @@ -0,0 +1,28 @@ +# is-redirect [![Build Status](https://travis-ci.org/sindresorhus/is-redirect.svg?branch=master)](https://travis-ci.org/sindresorhus/is-redirect) + +> Check if a number is a [redirect HTTP status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection) + + +## Install + +``` +$ npm install --save is-redirect +``` + + +## Usage + +```js +var isRedirect = require('is-redirect'); + +isRedirect(302); +//=> true + +isRedirect(200); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/is-retry-allowed/index.js b/node_modules/is-retry-allowed/index.js new file mode 100644 index 0000000..663ee33 --- /dev/null +++ b/node_modules/is-retry-allowed/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var WHITELIST = [ + 'ETIMEDOUT', + 'ECONNRESET', + 'EADDRINUSE', + 'ESOCKETTIMEDOUT', + 'ECONNREFUSED', + 'EPIPE' +]; + +var BLACKLIST = [ + 'ENOTFOUND', + 'ENETUNREACH', + + // SSL errors from https://github.com/nodejs/node/blob/ed3d8b13ee9a705d89f9e0397d9e96519e7e47ac/src/node_crypto.cc#L1950 + 'UNABLE_TO_GET_ISSUER_CERT', + 'UNABLE_TO_GET_CRL', + 'UNABLE_TO_DECRYPT_CERT_SIGNATURE', + 'UNABLE_TO_DECRYPT_CRL_SIGNATURE', + 'UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY', + 'CERT_SIGNATURE_FAILURE', + 'CRL_SIGNATURE_FAILURE', + 'CERT_NOT_YET_VALID', + 'CERT_HAS_EXPIRED', + 'CRL_NOT_YET_VALID', + 'CRL_HAS_EXPIRED', + 'ERROR_IN_CERT_NOT_BEFORE_FIELD', + 'ERROR_IN_CERT_NOT_AFTER_FIELD', + 'ERROR_IN_CRL_LAST_UPDATE_FIELD', + 'ERROR_IN_CRL_NEXT_UPDATE_FIELD', + 'OUT_OF_MEM', + 'DEPTH_ZERO_SELF_SIGNED_CERT', + 'SELF_SIGNED_CERT_IN_CHAIN', + 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', + 'UNABLE_TO_VERIFY_LEAF_SIGNATURE', + 'CERT_CHAIN_TOO_LONG', + 'CERT_REVOKED', + 'INVALID_CA', + 'PATH_LENGTH_EXCEEDED', + 'INVALID_PURPOSE', + 'CERT_UNTRUSTED', + 'CERT_REJECTED' +]; + +module.exports = function (err) { + if (!err || !err.code) { + return true; + } + + if (WHITELIST.indexOf(err.code) !== -1) { + return true; + } + + if (BLACKLIST.indexOf(err.code) !== -1) { + return false; + } + + return true; +}; diff --git a/node_modules/is-retry-allowed/license b/node_modules/is-retry-allowed/license new file mode 100644 index 0000000..1aeb74f --- /dev/null +++ b/node_modules/is-retry-allowed/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) + +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/node_modules/is-retry-allowed/package.json b/node_modules/is-retry-allowed/package.json new file mode 100644 index 0000000..150a214 --- /dev/null +++ b/node_modules/is-retry-allowed/package.json @@ -0,0 +1,59 @@ +{ + "_from": "is-retry-allowed@^1.0.0", + "_id": "is-retry-allowed@1.1.0", + "_inBundle": false, + "_integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "_location": "/is-retry-allowed", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-retry-allowed@^1.0.0", + "name": "is-retry-allowed", + "escapedName": "is-retry-allowed", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "_shasum": "11a060568b67339444033d0125a61a20d564fb34", + "_spec": "is-retry-allowed@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/got", + "author": { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + }, + "bugs": { + "url": "https://github.com/floatdrop/is-retry-allowed/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "My prime module", + "devDependencies": { + "ava": "^0.8.0", + "xo": "^0.12.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/floatdrop/is-retry-allowed#readme", + "keywords": [], + "license": "MIT", + "name": "is-retry-allowed", + "repository": { + "type": "git", + "url": "git+https://github.com/floatdrop/is-retry-allowed.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/node_modules/is-retry-allowed/readme.md b/node_modules/is-retry-allowed/readme.md new file mode 100644 index 0000000..4212d09 --- /dev/null +++ b/node_modules/is-retry-allowed/readme.md @@ -0,0 +1,42 @@ +# is-retry-allowed [![Build Status](https://travis-ci.org/floatdrop/is-retry-allowed.svg?branch=master)](https://travis-ci.org/floatdrop/is-retry-allowed) + +Is retry allowed for Error? + + +## Install + +``` +$ npm install --save is-retry-allowed +``` + + +## Usage + +```js +const isRetryAllowed = require('is-retry-allowed'); + +isRetryAllowed({code: 'ETIMEDOUT'}); +//=> true + +isRetryAllowed({code: 'ENOTFOUND'}); +//=> false + +isRetryAllowed({}); +//=> true +``` + + +## API + +### isRetryAllowed(error) + +#### error + +Type: `object` + +Object with `code` property, which will be used to determine retry. + + +## License + +MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/is-stream/index.js b/node_modules/is-stream/index.js new file mode 100644 index 0000000..6f7ec91 --- /dev/null +++ b/node_modules/is-stream/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var isStream = module.exports = function (stream) { + return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; +}; + +isStream.writable = function (stream) { + return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; +}; + +isStream.readable = function (stream) { + return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; +}; + +isStream.duplex = function (stream) { + return isStream.writable(stream) && isStream.readable(stream); +}; + +isStream.transform = function (stream) { + return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; +}; diff --git a/node_modules/is-stream/license b/node_modules/is-stream/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/is-stream/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/node_modules/is-stream/package.json b/node_modules/is-stream/package.json new file mode 100644 index 0000000..5731e1d --- /dev/null +++ b/node_modules/is-stream/package.json @@ -0,0 +1,71 @@ +{ + "_from": "is-stream@^1.1.0", + "_id": "is-stream@1.1.0", + "_inBundle": false, + "_integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "_location": "/is-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-stream@^1.1.0", + "name": "is-stream", + "escapedName": "is-stream", + "rawSpec": "^1.1.0", + "saveSpec": null, + "fetchSpec": "^1.1.0" + }, + "_requiredBy": [ + "/execa", + "/got" + ], + "_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "_shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44", + "_spec": "is-stream@^1.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/execa", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-stream/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if something is a Node.js stream", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.0", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-stream#readme", + "keywords": [ + "stream", + "type", + "streams", + "writable", + "readable", + "duplex", + "transform", + "check", + "detect", + "is" + ], + "license": "MIT", + "name": "is-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/node_modules/is-stream/readme.md b/node_modules/is-stream/readme.md new file mode 100644 index 0000000..d8afce8 --- /dev/null +++ b/node_modules/is-stream/readme.md @@ -0,0 +1,42 @@ +# is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream) + +> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html) + + +## Install + +``` +$ npm install --save is-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const isStream = require('is-stream'); + +isStream(fs.createReadStream('unicorn.png')); +//=> true + +isStream({}); +//=> false +``` + + +## API + +### isStream(stream) + +#### isStream.writable(stream) + +#### isStream.readable(stream) + +#### isStream.duplex(stream) + +#### isStream.transform(stream) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-windows/LICENSE b/node_modules/is-windows/LICENSE new file mode 100644 index 0000000..f8de063 --- /dev/null +++ b/node_modules/is-windows/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2018, Jon Schlinkert. + +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/node_modules/is-windows/README.md b/node_modules/is-windows/README.md new file mode 100644 index 0000000..485bfde --- /dev/null +++ b/node_modules/is-windows/README.md @@ -0,0 +1,95 @@ +# is-windows [![NPM version](https://img.shields.io/npm/v/is-windows.svg?style=flat)](https://www.npmjs.com/package/is-windows) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![NPM total downloads](https://img.shields.io/npm/dt/is-windows.svg?style=flat)](https://npmjs.org/package/is-windows) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-windows.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-windows) + +> Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-windows +``` + +## Heads up! + +As of `v0.2.0` this module always returns a function. + +## Node.js usage + +```js +var isWindows = require('is-windows'); + +console.log(isWindows()); +//=> returns true if the platform is windows +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [window-size](https://www.npmjs.com/package/window-size): Reliable way to get the height and width of terminal/console, since it's not calculated or… [more](https://github.com/jonschlinkert/window-size) | [homepage](https://github.com/jonschlinkert/window-size "Reliable way to get the height and width of terminal/console, since it's not calculated or updated the same way on all platforms, environments and node.js versions.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 11 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [SimenB](https://github.com/SimenB) | +| 1 | [gucong3000](https://github.com/gucong3000) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 14, 2018._ \ No newline at end of file diff --git a/node_modules/is-windows/index.js b/node_modules/is-windows/index.js new file mode 100644 index 0000000..55d43e0 --- /dev/null +++ b/node_modules/is-windows/index.js @@ -0,0 +1,27 @@ +/*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +(function(factory) { + if (exports && typeof exports === 'object' && typeof module !== 'undefined') { + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + define([], factory); + } else if (typeof window !== 'undefined') { + window.isWindows = factory(); + } else if (typeof global !== 'undefined') { + global.isWindows = factory(); + } else if (typeof self !== 'undefined') { + self.isWindows = factory(); + } else { + this.isWindows = factory(); + } +})(function() { + 'use strict'; + return function isWindows() { + return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; +}); diff --git a/node_modules/is-windows/package.json b/node_modules/is-windows/package.json new file mode 100644 index 0000000..094554f --- /dev/null +++ b/node_modules/is-windows/package.json @@ -0,0 +1,111 @@ +{ + "_from": "is-windows@^1.0.2", + "_id": "is-windows@1.0.2", + "_inBundle": false, + "_integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "_location": "/is-windows", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-windows@^1.0.2", + "name": "is-windows", + "escapedName": "is-windows", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "_shasum": "d1850eb9791ecd18e6182ce12a30f396634bb19d", + "_spec": "is-windows@^1.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/nanomatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-windows/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Simen Bekkhus", + "url": "https://github.com/SimenB" + }, + { + "name": "刘祺", + "url": "gucong.co.cc" + } + ], + "deprecated": false, + "description": "Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-windows", + "keywords": [ + "check", + "cywin", + "is", + "is-windows", + "nix", + "operating system", + "os", + "platform", + "process", + "unix", + "win", + "win32", + "windows" + ], + "license": "MIT", + "main": "index.js", + "name": "is-windows", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-windows.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-absolute", + "is-glob", + "is-relative", + "isobject", + "window-size" + ] + }, + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "1.0.2" +} diff --git a/node_modules/isarray/.npmignore b/node_modules/isarray/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/isarray/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/isarray/.travis.yml b/node_modules/isarray/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/isarray/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/isarray/Makefile b/node_modules/isarray/Makefile new file mode 100644 index 0000000..787d56e --- /dev/null +++ b/node_modules/isarray/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test.js + +.PHONY: test + diff --git a/node_modules/isarray/README.md b/node_modules/isarray/README.md new file mode 100644 index 0000000..16d2c59 --- /dev/null +++ b/node_modules/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/node_modules/isarray/component.json b/node_modules/isarray/component.json new file mode 100644 index 0000000..9e31b68 --- /dev/null +++ b/node_modules/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/node_modules/isarray/index.js b/node_modules/isarray/index.js new file mode 100644 index 0000000..a57f634 --- /dev/null +++ b/node_modules/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/node_modules/isarray/package.json b/node_modules/isarray/package.json new file mode 100644 index 0000000..ee714ac --- /dev/null +++ b/node_modules/isarray/package.json @@ -0,0 +1,74 @@ +{ + "_from": "isarray@1.0.0", + "_id": "isarray@1.0.0", + "_inBundle": false, + "_integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "_location": "/isarray", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isarray@1.0.0", + "name": "isarray", + "escapedName": "isarray", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/readable-stream", + "/unset-value/has-value/isobject" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", + "_spec": "isarray@1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/unset-value/node_modules/has-value/node_modules/isobject", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tape": "~2.13.4" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "name": "isarray", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tape test.js" + }, + "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" + ] + }, + "version": "1.0.0" +} diff --git a/node_modules/isarray/test.js b/node_modules/isarray/test.js new file mode 100644 index 0000000..e0c3444 --- /dev/null +++ b/node_modules/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/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore new file mode 100644 index 0000000..c1cb757 --- /dev/null +++ b/node_modules/isexe/.npmignore @@ -0,0 +1,2 @@ +.nyc_output/ +coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/isexe/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/node_modules/isexe/README.md b/node_modules/isexe/README.md new file mode 100644 index 0000000..35769e8 --- /dev/null +++ b/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js new file mode 100644 index 0000000..553fb32 --- /dev/null +++ b/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js new file mode 100644 index 0000000..1995ea4 --- /dev/null +++ b/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json new file mode 100644 index 0000000..331926a --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,60 @@ +{ + "_from": "isexe@^2.0.0", + "_id": "isexe@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "_location": "/isexe", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isexe@^2.0.0", + "name": "isexe", + "escapedName": "isexe", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_shasum": "e8fbf374dc556ff8947a10dcb0572d633f2cfa10", + "_spec": "isexe@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/which", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "isexe", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.0.0" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 0000000..d926df6 --- /dev/null +++ b/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js new file mode 100644 index 0000000..3499673 --- /dev/null +++ b/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/node_modules/isobject/LICENSE b/node_modules/isobject/LICENSE new file mode 100644 index 0000000..943e71d --- /dev/null +++ b/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/isobject/README.md b/node_modules/isobject/README.md new file mode 100644 index 0000000..d01feaa --- /dev/null +++ b/node_modules/isobject/README.md @@ -0,0 +1,122 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) + +> Returns true if the value is an object and not an array or null. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save isobject +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add isobject +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` +Install with [bower](https://bower.io/) + +```sh +$ bower install isobject +``` + +## Usage + +```js +var isObject = require('isobject'); +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## About + +### Related projects + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 29 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [magnudae](https://github.com/magnudae) | +| 1 | [LeSuisse](https://github.com/LeSuisse) | +| 1 | [tmcw](https://github.com/tmcw) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 30, 2017._ \ No newline at end of file diff --git a/node_modules/isobject/index.d.ts b/node_modules/isobject/index.d.ts new file mode 100644 index 0000000..55f81c2 --- /dev/null +++ b/node_modules/isobject/index.d.ts @@ -0,0 +1,5 @@ +export = isObject; + +declare function isObject(val: any): boolean; + +declare namespace isObject {} diff --git a/node_modules/isobject/index.js b/node_modules/isobject/index.js new file mode 100644 index 0000000..2d59958 --- /dev/null +++ b/node_modules/isobject/index.js @@ -0,0 +1,12 @@ +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; diff --git a/node_modules/isobject/package.json b/node_modules/isobject/package.json new file mode 100644 index 0000000..8244496 --- /dev/null +++ b/node_modules/isobject/package.json @@ -0,0 +1,130 @@ +{ + "_from": "isobject@^3.0.1", + "_id": "isobject@3.0.1", + "_inBundle": false, + "_integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "_location": "/isobject", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isobject@^3.0.1", + "name": "isobject", + "escapedName": "isobject", + "rawSpec": "^3.0.1", + "saveSpec": null, + "fetchSpec": "^3.0.1" + }, + "_requiredBy": [ + "/base", + "/braces", + "/cache-base", + "/class-utils", + "/define-property", + "/has-value", + "/is-plain-object", + "/object-visit", + "/object.pick", + "/snapdragon-node", + "/unset-value", + "/use" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "_shasum": "4e431e92b11a9731636aa1f9c8d1ccbcfdab78df", + "_spec": "isobject@^3.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "url": "https://github.com/LeSuisse" + }, + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Magnús Dæhlen", + "url": "https://github.com/magnudae" + }, + { + "name": "Tom MacWright", + "url": "https://macwright.org" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Returns true if the value is an object and not an array or null.", + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/isobject", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "isobject", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "test": "mocha" + }, + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "extend-shallow", + "is-plain-object", + "kind-of", + "merge-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "3.0.1" +} diff --git a/node_modules/js-beautify/CHANGELOG.md b/node_modules/js-beautify/CHANGELOG.md new file mode 100644 index 0000000..f77546e --- /dev/null +++ b/node_modules/js-beautify/CHANGELOG.md @@ -0,0 +1,526 @@ +# Changelog +## v1.7.5 + +### Description + + +### Closed Issues +* Strict mode: js_source_text is not defined [CSS] ([#1286](https://github.com/beautify-web/js-beautify/issues/1286)) +* Made brace_style option more inclusive ([#1277](https://github.com/beautify-web/js-beautify/pull/1277)) +* White space before"!important" tag missing in CSS beautify ([#1273](https://github.com/beautify-web/js-beautify/issues/1273)) + + +## v1.7.4 + +### Description +Thanks @cejast for contributing! + +### Closed Issues +* Whitespace after ES7 `async` keyword for arrow functions ([#896](https://github.com/beautify-web/js-beautify/issues/896)) + + +## v1.7.3 + +### Description +* Fixed broken installs + +Lessons learned: +* Don't publish and go to bed. +* I thought I had sufficient test coverage and I did not. Tests will be implemented to protect against this before the next release (#1254). +* Also, this break highlights the need to create a beta channel for releases and a way to request feedback on beta releases (#1255). +* The project has been maintained by mostly one person over the past year or so, with some additions by other individuals. This break also highlights the need for this project to have a few more people who have the ability address issues/emergencies (#1256). +* Many projects do not not lock or even limit their version dependencies. Those that do often use `^x.x.x` instead of `~x.x.x`. Consider switching to making major version updates under more circumstances to limit risk to dependent projects. (#1257) + + +### Closed Issues +* Version 1.7.0 fail to install through pip ([#1250](https://github.com/beautify-web/js-beautify/issues/1250)) +* Installing js-beautify fails ([#1247](https://github.com/beautify-web/js-beautify/issues/1247)) + + +## v1.7.0 + +### Description + + +### Closed Issues +* undindent-chained-methods option. Resolves #482 ([#1240](https://github.com/beautify-web/js-beautify/pull/1240)) +* Add test and tools folder to npmignore ([#1239](https://github.com/beautify-web/js-beautify/issues/1239)) +* incorrect new-line insertion after "yield" ([#1206](https://github.com/beautify-web/js-beautify/issues/1206)) +* Do not modify built-in objects ([#1205](https://github.com/beautify-web/js-beautify/issues/1205)) +* Fix label checking incorrect box when clicked ([#1169](https://github.com/beautify-web/js-beautify/pull/1169)) +* Webpack ([#1149](https://github.com/beautify-web/js-beautify/pull/1149)) +* daisy-chain indentation leads to over-indentation ([#482](https://github.com/beautify-web/js-beautify/issues/482)) + + +## v1.6.12 + +### Description + + +### Closed Issues +* CSS: Preserve Newlines ([#537](https://github.com/beautify-web/js-beautify/issues/537)) + + +## v1.6.11 + +### Description +Reverted #1117 - Preserve newlines broken + +### Closed Issues +* On beautify, new line before next CSS selector ([#1142](https://github.com/beautify-web/js-beautify/issues/1142)) + + +## v1.6.10 + +### Description +Added `preserver_newlines` to css beautifier + +### Closed Issues + + +## v1.6.9 + +### Description +* Fixed html formatting issue with attribute wrap (Thanks, @HookyQR!) +* Fixed python package publishing + + +### Closed Issues +* Wrong HTML beautification starting with v1.6.5 ([#1115](https://github.com/beautify-web/js-beautify/issues/1115)) +* Ignore linebreak when meet handlebar ([#1104](https://github.com/beautify-web/js-beautify/pull/1104)) +* Lines are not un-indented correctly when attributes are wrapped ([#1103](https://github.com/beautify-web/js-beautify/issues/1103)) +* force-aligned is not aligned when indenting with tabs ([#1102](https://github.com/beautify-web/js-beautify/issues/1102)) +* Python package fails to publish ([#1101](https://github.com/beautify-web/js-beautify/issues/1101)) +* Explaination of 'operator_position' is absent from README.md ([#1047](https://github.com/beautify-web/js-beautify/issues/1047)) + + +## v1.6.8 + +### Description +* Fixed a batch of comment and semicolon-less code bugs + + +### Closed Issues +* Incorrect indentation after loop with comment ([#1090](https://github.com/beautify-web/js-beautify/issues/1090)) +* Extra newline is inserted after beautifying code with anonymous function ([#1085](https://github.com/beautify-web/js-beautify/issues/1085)) +* end brace with next comment line make bad indent ([#1043](https://github.com/beautify-web/js-beautify/issues/1043)) +* Javascript comment in last line doesn't beautify well ([#964](https://github.com/beautify-web/js-beautify/issues/964)) +* indent doesn't work with comment (jsdoc) ([#913](https://github.com/beautify-web/js-beautify/issues/913)) +* Wrong indentation, when new line between chained methods ([#892](https://github.com/beautify-web/js-beautify/issues/892)) +* Comments in a non-semicolon style have extra indent ([#815](https://github.com/beautify-web/js-beautify/issues/815)) +* [bug] Incorrect indentation due to commented line(s) following a function call with a function argument. ([#713](https://github.com/beautify-web/js-beautify/issues/713)) +* Wrong indent formatting ([#569](https://github.com/beautify-web/js-beautify/issues/569)) + + +## v1.6.7 + +### Description +Added `content_unformatted` option (Thanks @arai-a) + +### Closed Issues +* HTML pre code indentation ([#928](https://github.com/beautify-web/js-beautify/issues/928)) +* Beautify script/style tags but ignore their inner JS/CSS content ([#906](https://github.com/beautify-web/js-beautify/issues/906)) + + +## v1.6.6 + +### Description +* Added support for editorconfig from stdin +* Added js-beautify to cdnjs +* Fixed CRLF to LF for HTML and CSS on windows +* Added inheritance/overriding to config format (Thanks @DaniGuardiola and @HookyQR) +* Added `force-align` to `wrap-attributes` (Thanks @Lukinos) +* Added `force-expand-multiline` to `wrap-attributes` (Thanks @tobias-zucali) +* Added `preserve-inline` as independent brace setting (Thanks @Coburn37) +* Fixed handlebars with angle-braces (Thanks @mmsqe) + + + +### Closed Issues +* Wrong indentation for comment after nested unbraced control constructs ([#1079](https://github.com/beautify-web/js-beautify/issues/1079)) +* Should prefer breaking the line after operator ? instead of before operator < ([#1073](https://github.com/beautify-web/js-beautify/issues/1073)) +* New option "force-expand-multiline" for "wrap_attributes" ([#1070](https://github.com/beautify-web/js-beautify/pull/1070)) +* Breaks if html file starts with comment ([#1068](https://github.com/beautify-web/js-beautify/issues/1068)) +* collapse-preserve-inline restricts users to collapse brace_style ([#1057](https://github.com/beautify-web/js-beautify/issues/1057)) +* Parsing failure on numbers with "e" ([#1054](https://github.com/beautify-web/js-beautify/issues/1054)) +* Issue with Browser Instructions ([#1053](https://github.com/beautify-web/js-beautify/issues/1053)) +* Add preserve inline function for expand style braces ([#1052](https://github.com/beautify-web/js-beautify/issues/1052)) +* Update years in LICENSE ([#1038](https://github.com/beautify-web/js-beautify/issues/1038)) +* JS. Switch with template literals. Unexpected indentation. ([#1030](https://github.com/beautify-web/js-beautify/issues/1030)) +* The object with spread object formatted not correctly ([#1023](https://github.com/beautify-web/js-beautify/issues/1023)) +* Bad output generator function in class ([#1013](https://github.com/beautify-web/js-beautify/issues/1013)) +* Support editorconfig for stdin ([#1012](https://github.com/beautify-web/js-beautify/issues/1012)) +* Publish to cdnjs ([#992](https://github.com/beautify-web/js-beautify/issues/992)) +* breaks if handlebars comments contain handlebars tags ([#930](https://github.com/beautify-web/js-beautify/issues/930)) +* Using jsbeautifyrc is broken ([#929](https://github.com/beautify-web/js-beautify/issues/929)) +* Option to put HTML attributes on their own lines, aligned ([#916](https://github.com/beautify-web/js-beautify/issues/916)) +* Erroneously changes CRLF to LF on Windows in HTML and CSS ([#899](https://github.com/beautify-web/js-beautify/issues/899)) +* Weird space in {get } vs { normal } ([#888](https://github.com/beautify-web/js-beautify/issues/888)) +* Bad for-of formatting with constant Array ([#875](https://github.com/beautify-web/js-beautify/issues/875)) +* Problems with filter property in css and scss ([#755](https://github.com/beautify-web/js-beautify/issues/755)) +* Add "collapse-one-line" option for non-collapse brace styles ([#487](https://github.com/beautify-web/js-beautify/issues/487)) + + +## v1.6.4 + +### Description +* Fixed JSX multi-line root element handling +* Fixed CSS Combinator spacing (NOTE: use `space_around_combinator` option) +* Fixed (more) CSS pseudo-class and pseudo-element selectors (Thanks @Konamiman!) +* Fixed Shorthand generator functions and `yield*` (Thanks @jgeurts!) +* Added EditorConfig support (Thanks @ethanluoyc!) +* Added indent_body_inner_html and indent_head_inner_html (Thanks @spontaliku-softaria!) +* Added js-beautify to https://cdn.rawgit.com (Thanks @zxqfox) + + + + + +### Closed Issues +* css-beautify sibling combinator space issue ([#1001](https://github.com/beautify-web/js-beautify/issues/1001)) +* Bug: Breaks when the source code it found an unclosed multiline comment. ([#996](https://github.com/beautify-web/js-beautify/issues/996)) +* CSS: Preserve white space before pseudo-class and pseudo-element selectors ([#985](https://github.com/beautify-web/js-beautify/pull/985)) +* Spelling error in token definition ([#984](https://github.com/beautify-web/js-beautify/issues/984)) +* collapse-preserve-inline does not preserve simple, single line ("return") statements ([#982](https://github.com/beautify-web/js-beautify/issues/982)) +* Publish the library via cdn ([#971](https://github.com/beautify-web/js-beautify/issues/971)) +* Bug with css calc() function ([#957](https://github.com/beautify-web/js-beautify/issues/957)) +* &:first-of-type:not(:last-child) when prettified insert erroneous white character ([#952](https://github.com/beautify-web/js-beautify/issues/952)) +* Shorthand generator functions are formatting strangely ([#941](https://github.com/beautify-web/js-beautify/issues/941)) +* Add handlebars support on cli for html ([#935](https://github.com/beautify-web/js-beautify/pull/935)) +* Do not put a space within `yield*` generator functions. ([#920](https://github.com/beautify-web/js-beautify/issues/920)) +* Possible to add an indent_inner_inner_html option? (Prevent indenting second-level tags) ([#917](https://github.com/beautify-web/js-beautify/issues/917)) +* Messing up jsx formatting ([#914](https://github.com/beautify-web/js-beautify/issues/914)) +* Bug report: Closing 'body' tag isn't formatted correctly ([#900](https://github.com/beautify-web/js-beautify/issues/900)) +* { throw … } not working with collapse-preserve-inline ([#898](https://github.com/beautify-web/js-beautify/issues/898)) +* ES6 concise method not propely indented ([#889](https://github.com/beautify-web/js-beautify/issues/889)) +* CSS beautify changing symantics ([#883](https://github.com/beautify-web/js-beautify/issues/883)) +* Dojo unsupported script types. ([#874](https://github.com/beautify-web/js-beautify/issues/874)) +* Readme version comment ([#868](https://github.com/beautify-web/js-beautify/issues/868)) +* Extra space after pseudo-elements within :not() ([#618](https://github.com/beautify-web/js-beautify/issues/618)) +* space in media queries after colon &: selectors ([#565](https://github.com/beautify-web/js-beautify/issues/565)) +* Integrating editor config ([#551](https://github.com/beautify-web/js-beautify/issues/551)) +* Preserve short expressions/statements on single line ([#338](https://github.com/beautify-web/js-beautify/issues/338)) + + +## v1.6.3 + +### Description +Bug fixes + +### Closed Issues +* CLI broken when output path is not set ([#933](https://github.com/beautify-web/js-beautify/issues/933)) +* huge memory leak ([#909](https://github.com/beautify-web/js-beautify/issues/909)) +* don't print unpacking errors on stdout (python) ([#884](https://github.com/beautify-web/js-beautify/pull/884)) +* Fix incomplete list of non-positionable operators (python lib) ([#878](https://github.com/beautify-web/js-beautify/pull/878)) +* Fix Issue #844 ([#873](https://github.com/beautify-web/js-beautify/pull/873)) +* assignment exponentiation operator ([#864](https://github.com/beautify-web/js-beautify/issues/864)) +* Bug in Less mixins ([#844](https://github.com/beautify-web/js-beautify/issues/844)) +* Can't Nest Conditionals ([#680](https://github.com/beautify-web/js-beautify/issues/680)) +* ternary operations ([#670](https://github.com/beautify-web/js-beautify/issues/670)) +* Support newline before logical or ternary operator ([#605](https://github.com/beautify-web/js-beautify/issues/605)) +* Provide config files for format and linting ([#336](https://github.com/beautify-web/js-beautify/issues/336)) + + +## v1.6.2 + +### Description + + +### Closed Issues +* Add missing 'collapse-preserve-inline' option to js module ([#861](https://github.com/beautify-web/js-beautify/pull/861)) + + +## v1.6.1 + +### Description +Fixes for regressions found in 1.6.0 + + +### Closed Issues +* Inconsistent formatting for arrays of objects ([#860](https://github.com/beautify-web/js-beautify/issues/860)) +* Publish v1.6.1 ([#859](https://github.com/beautify-web/js-beautify/issues/859)) +* Space added to "from++" due to ES6 keyword ([#858](https://github.com/beautify-web/js-beautify/issues/858)) +* Changelog generator doesn't sort versions above 9 right ([#778](https://github.com/beautify-web/js-beautify/issues/778)) +* space-after-anon-function not applied to object properties ([#761](https://github.com/beautify-web/js-beautify/issues/761)) +* Separating 'input' elements adds whitespace ([#580](https://github.com/beautify-web/js-beautify/issues/580)) +* Inline Format ([#572](https://github.com/beautify-web/js-beautify/issues/572)) +* Preserve attributes line break in HTML ([#455](https://github.com/beautify-web/js-beautify/issues/455)) +* Multiline Array ([#406](https://github.com/beautify-web/js-beautify/issues/406)) + + +## v1.6.0 + +### Description +* Inline/short object and json preservation (all rejoice!) +* ES6 annotations, module import/export, arrow functions, concise methods, and more +* JSX spread attributes +* HTML wrap attributes, inline element fixes, doctype and php fixes +* Test framework hardening +* Windows build fixed and covered by appveyor continuous integration + + + +### Closed Issues +* Individual tests pollute options object ([#855](https://github.com/beautify-web/js-beautify/issues/855)) +* Object attribute assigned fat arrow function with implicit return of a ternary causes next line to indent ([#854](https://github.com/beautify-web/js-beautify/issues/854)) +* Treat php tags as single in html ([#850](https://github.com/beautify-web/js-beautify/pull/850)) +* Read piped input by default ([#849](https://github.com/beautify-web/js-beautify/pull/849)) +* Replace makefile dependency with bash script ([#848](https://github.com/beautify-web/js-beautify/pull/848)) +* list of HTML inline elements incomplete; wraps inappropriately ([#840](https://github.com/beautify-web/js-beautify/issues/840)) +* Beautifying bracket-less if/elses ([#838](https://github.com/beautify-web/js-beautify/issues/838)) +* elements within a are getting indented incorrectly ([#836](https://github.com/beautify-web/js-beautify/issues/836)) +* single attribute breaks jsx beautification ([#834](https://github.com/beautify-web/js-beautify/issues/834)) +* Improve Python packaging ([#831](https://github.com/beautify-web/js-beautify/pull/831)) +* Erroneously changes CRLF to LF on Windows. ([#829](https://github.com/beautify-web/js-beautify/issues/829)) +* Can't deal with XHTML5 ([#828](https://github.com/beautify-web/js-beautify/issues/828)) +* HTML after PHP is indented ([#826](https://github.com/beautify-web/js-beautify/issues/826)) +* exponentiation operator ([#825](https://github.com/beautify-web/js-beautify/issues/825)) +* Add support for script type "application/ld+json" ([#821](https://github.com/beautify-web/js-beautify/issues/821)) +* package.json: Remove "preferGlobal" option ([#820](https://github.com/beautify-web/js-beautify/pull/820)) +* Don't use array.indexOf() to support legacy browsers ([#816](https://github.com/beautify-web/js-beautify/pull/816)) +* ES6 Object Shortand Indenting Weirdly Sometimes ([#810](https://github.com/beautify-web/js-beautify/issues/810)) +* Implicit Return Function on New Line not Preserved ([#806](https://github.com/beautify-web/js-beautify/issues/806)) +* Misformating "0b" Binary Strings ([#803](https://github.com/beautify-web/js-beautify/issues/803)) +* Beautifier breaks ES6 nested template strings ([#797](https://github.com/beautify-web/js-beautify/issues/797)) +* Misformating "0o" Octal Strings ([#792](https://github.com/beautify-web/js-beautify/issues/792)) +* Do not use hardcoded directory for tests ([#788](https://github.com/beautify-web/js-beautify/pull/788)) +* Handlebars {{else}} tag not given a newline ([#784](https://github.com/beautify-web/js-beautify/issues/784)) +* Wrong indentation for XML header () ([#783](https://github.com/beautify-web/js-beautify/issues/783)) +* is_whitespace for loop incrementing wrong variable ([#777](https://github.com/beautify-web/js-beautify/pull/777)) +* Newline is inserted after comment with comma_first ([#775](https://github.com/beautify-web/js-beautify/issues/775)) +* Cannot copy more than 1000 characters out of CodeMirror buffer ([#768](https://github.com/beautify-web/js-beautify/issues/768)) +* Missing 'var' in beautify-html.js; breaks strict mode ([#763](https://github.com/beautify-web/js-beautify/issues/763)) +* Fix typo in the example javascript code of index.html ([#753](https://github.com/beautify-web/js-beautify/pull/753)) + + +## v1.5.10 + +### Description +Hotfix for directives +Version jump due to release script tweaks + + +### Closed Issues +* Preserve directive doesn't work as intended ([#723](https://github.com/beautify-web/js-beautify/issues/723)) + + +## v1.5.7 + +### Description +* Beautifier does not break PHP and Underscore.js templates +* Fix for SCSS pseudo classes and intperpolation/mixins +* Alternative Newline Characters in CSS and HTML +* Preserve formatting or completely ignore section of javascript using comments + + +### Closed Issues +* Support for legacy JavaScript versions (e.g. WSH+JScript & Co) ([#720](https://github.com/beautify-web/js-beautify/pull/720)) +* Is \\n hard coded into CSS Beautifier logic? ([#715](https://github.com/beautify-web/js-beautify/issues/715)) +* Spaces and linebreaks after # and around { } messing up interpolation/mixins (SASS/SCSS) ([#689](https://github.com/beautify-web/js-beautify/issues/689)) +* Calls to functions get completely messed up in Sass (*.scss) ([#675](https://github.com/beautify-web/js-beautify/issues/675)) +* No new line after selector in scss files ([#666](https://github.com/beautify-web/js-beautify/issues/666)) +* using html-beautify on handlebars template deletes unclosed tag if on second line ([#623](https://github.com/beautify-web/js-beautify/issues/623)) +* more Extra space after scss pseudo classes ([#557](https://github.com/beautify-web/js-beautify/issues/557)) +* Unnecessary spaces in PHP code ([#490](https://github.com/beautify-web/js-beautify/issues/490)) +* Some underscore.js template tags are broken ([#417](https://github.com/beautify-web/js-beautify/issues/417)) +* Selective ignore using comments (feature request) ([#384](https://github.com/beautify-web/js-beautify/issues/384)) + + +## v1.5.6 + +### Description +* JSX support! +* Alternative Newline Characters +* CSS and JS comment formatting fixes +* General bug fixing + + +### Closed Issues +* Fix tokenizer's bracket pairs' open stack ([#693](https://github.com/beautify-web/js-beautify/pull/693)) +* Indentation is incorrect for HTML5 void tag ([#692](https://github.com/beautify-web/js-beautify/issues/692)) +* Line wrapping breaks at the wrong place when the line is indented. ([#691](https://github.com/beautify-web/js-beautify/issues/691)) +* Publish v1.5.6 ([#687](https://github.com/beautify-web/js-beautify/issues/687)) +* Replace existing file fails using python beautifier ([#686](https://github.com/beautify-web/js-beautify/issues/686)) +* Pseudo-classes formatted incorrectly and inconsistently with @page ([#661](https://github.com/beautify-web/js-beautify/issues/661)) +* doc: add end_with_newline option ([#650](https://github.com/beautify-web/js-beautify/pull/650)) +* Improve support for xml parts of jsx (React) => spaces, spread attributes and nested objects break the process ([#646](https://github.com/beautify-web/js-beautify/issues/646)) +* html-beautify formats handlebars comments but does not format html comments ([#635](https://github.com/beautify-web/js-beautify/issues/635)) +* Support for ES7 async ([#630](https://github.com/beautify-web/js-beautify/issues/630)) +* css beautify adding an extra newline after a comment line in a css block ([#609](https://github.com/beautify-web/js-beautify/issues/609)) +* No option to "Indent with tabs" for HTML files ([#587](https://github.com/beautify-web/js-beautify/issues/587)) +* Function body is indented when followed by a comment ([#583](https://github.com/beautify-web/js-beautify/issues/583)) +* JSX support ([#425](https://github.com/beautify-web/js-beautify/issues/425)) +* Alternative Newline Characters ([#260](https://github.com/beautify-web/js-beautify/issues/260)) + + +## v1.5.5 + +### Description +* Initial implementation of comma-first formatting - Diff-friendly literals! +* CSS: Add newline between rules +* LESS: improved function parameter formatting +* HTML: options for wrapping attributes +* General bug fixing + +### Closed Issues +* Add GUI support for `--indent-inner-html`. ([#633](https://github.com/beautify-web/js-beautify/pull/633)) +* Publish v1.5.5 ([#629](https://github.com/beautify-web/js-beautify/issues/629)) +* CSS: Updating the documentation for the 'newline_between_rules' ([#615](https://github.com/beautify-web/js-beautify/pull/615)) +* Equal Sign Removed from Filter Properties Alpha Opacity Assignment ([#599](https://github.com/beautify-web/js-beautify/issues/599)) +* Keep trailing spaces on comments ([#598](https://github.com/beautify-web/js-beautify/issues/598)) +* only print the file names of changed files ([#597](https://github.com/beautify-web/js-beautify/issues/597)) +* CSS: support add newline between rules ([#574](https://github.com/beautify-web/js-beautify/pull/574)) +* elem[array]++ changes to elem[array] ++ inserting unnecessary gap ([#570](https://github.com/beautify-web/js-beautify/issues/570)) +* add support to less functions paramters braces ([#568](https://github.com/beautify-web/js-beautify/pull/568)) +* selector_separator_newline: true for Sass doesn't work ([#563](https://github.com/beautify-web/js-beautify/issues/563)) +* yield statements are being beautified to their own newlines since 1.5.2 ([#560](https://github.com/beautify-web/js-beautify/issues/560)) +* HTML beautifier inserts extra newline into `
  • `s ending with `` ([#524](https://github.com/beautify-web/js-beautify/issues/524)) +* Add wrap_attributes option ([#476](https://github.com/beautify-web/js-beautify/issues/476)) +* Add or preserve empty line between CSS rules ([#467](https://github.com/beautify-web/js-beautify/issues/467)) +* Support comma first style of variable declaration ([#245](https://github.com/beautify-web/js-beautify/issues/245)) + + +## v1.5.4 + +### Description +* Fix for LESS/CSS pseudo/classes +* Fix for HTML img tag spaces + +https://github.com/beautify-web/js-beautify/compare/v1.5.3...v1.5.4 + +### Closed Issues +* TypeScript oddly formatted with 1.5.3 ([#552](https://github.com/beautify-web/js-beautify/issues/552)) +* HTML beautifier inserts double spaces between adjacent tags ([#525](https://github.com/beautify-web/js-beautify/issues/525)) +* Keep space in font rule ([#491](https://github.com/beautify-web/js-beautify/issues/491)) +* [Brackets plug in] Space after disappears ([#454](https://github.com/beautify-web/js-beautify/issues/454)) +* Support nested pseudo-classes and parent reference (LESS) ([#427](https://github.com/beautify-web/js-beautify/pull/427)) +* Alternate approach: preserve single spacing and treat img as inline element ([#415](https://github.com/beautify-web/js-beautify/pull/415)) + + +## v1.5.3 + +### Description +* High priority bug fixes +* Major fixes to css-beautifier to not blow up LESS/SCSS +* Lower priority bug fixes that were very ugly + +https://github.com/beautify-web/js-beautify/compare/v1.5.2...v1.5.3 + +### Closed Issues +* [TypeError: Cannot read property 'type' of undefined] ([#548](https://github.com/beautify-web/js-beautify/issues/548)) +* Bug with RegExp ([#547](https://github.com/beautify-web/js-beautify/issues/547)) +* Odd behaviour on less ([#520](https://github.com/beautify-web/js-beautify/issues/520)) +* css beauitify ([#506](https://github.com/beautify-web/js-beautify/issues/506)) +* Extra space after scss pseudo classes. ([#500](https://github.com/beautify-web/js-beautify/issues/500)) +* Generates invalid scss when formatting ampersand selectors ([#498](https://github.com/beautify-web/js-beautify/issues/498)) +* bad formatting of .less files using @variable or &:hover syntax ([#489](https://github.com/beautify-web/js-beautify/issues/489)) +* Incorrect beautifying of CSS comment including an url. ([#466](https://github.com/beautify-web/js-beautify/issues/466)) +* Handle SASS parent reference &: ([#414](https://github.com/beautify-web/js-beautify/issues/414)) +* Js-beautify breaking selectors in less code. ([#410](https://github.com/beautify-web/js-beautify/issues/410)) +* Problem with "content" ([#364](https://github.com/beautify-web/js-beautify/issues/364)) +* Space gets inserted between function and paren for function in Define ([#313](https://github.com/beautify-web/js-beautify/issues/313)) +* beautify-html returns null on broken html ([#301](https://github.com/beautify-web/js-beautify/issues/301)) +* Indentation of functions inside conditionals not passing jslint ([#298](https://github.com/beautify-web/js-beautify/issues/298)) + + +## v1.5.2 + +### Description +* Improved indenting for statements, array, variable declaration, "Starless" block-comments +* Support for bitwise-not, yield, get, set, let, const, generator functions +* Reserved words can be used as object property names +* Added options: space_after_anon_function, end-with-newline +* Properly tokenize Numbers (including decimals and exponents) +* Do not break "x++ + y" +* function declaration inside array behaves the same as in expression +* Close String literals at newline +* Support handlebar syntax +* Check ` + + + + + + + + + + +``` +Disclaimer: These are free services, so there are [no uptime or support guarantees](https://github.com/rgrove/rawgit/wiki/Frequently-Asked-Questions#i-need-guaranteed-100-uptime-should-i-use-cdnrawgitcom). + +## Web Browser +Open [jsbeautifier.org](http://jsbeautifier.org/). Options are available via the UI. + +## Python +To beautify using python: + +```bash +$ pip install jsbeautifier +$ js-beautify file.js +``` + +Beautified output goes to `stdout`. + +To use `jsbeautifier` as a library is simple: + +``` python +import jsbeautifier +res = jsbeautifier.beautify('your javascript string') +res = jsbeautifier.beautify_file('some_file.js') +``` + +...or, to specify some options: + +``` python +opts = jsbeautifier.default_options() +opts.indent_size = 2 +res = jsbeautifier.beautify('some javascript', opts) +``` + +## JavaScript + +As an alternative to the Python script, you may install the NPM package `js-beautify`. When installed globally, it provides an executable `js-beautify` script. As with the Python script, the beautified result is sent to `stdout` unless otherwise configured. + +```bash +$ npm -g install js-beautify +$ js-beautify foo.js +``` + +You can also use `js-beautify` as a `node` library (install locally, the `npm` default): + +```bash +$ npm install js-beautify +``` + +```js +var beautify = require('js-beautify').js_beautify, + fs = require('fs'); + +fs.readFile('foo.js', 'utf8', function (err, data) { + if (err) { + throw err; + } + console.log(beautify(data, { indent_size: 2 })); +}); +``` + +## Options + +These are the command-line flags for both Python and JS scripts: + +```text +CLI Options: + -f, --file Input file(s) (Pass '-' for stdin) + -r, --replace Write output in-place, replacing input + -o, --outfile Write output to file (default stdout) + --config Path to config file + --type [js|css|html] ["js"] + -q, --quiet Suppress logging to stdout + -h, --help Show this help + -v, --version Show the version + +Beautifier Options: + -s, --indent-size Indentation size [4] + -c, --indent-char Indentation character [" "] + -t, --indent-with-tabs Indent with tabs, overrides -s and -c + -e, --eol Character(s) to use as line terminators. + [first newline in file, otherwise "\n] + -n, --end-with-newline End output with newline + --editorconfig Use EditorConfig to set up the options + -l, --indent-level Initial indentation level [0] + -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables) + -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10] + -P, --space-in-paren Add padding spaces within paren, ie. f( a, b ) + -E, --space-in-empty-paren Add a single space inside empty paren, ie. f( ) + -j, --jslint-happy Enable jslint-stricter mode + -a, --space-after-anon-function Add a space before an anonymous function's parens, ie. function () + -b, --brace-style [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline] + -u, --unindent-chained-methods Don't indent chained method calls + -B, --break-chained-methods Break chained method calls across subsequent lines + -k, --keep-array-indentation Preserve array indentation + -x, --unescape-strings Decode printable characters encoded in xNN notation + -w, --wrap-line-length Wrap lines at next opportunity after N characters [0] + -X, --e4x Pass E4X xml literals through untouched + --good-stuff Warm the cockles of Crockford's heart + -C, --comma-first Put commas at the beginning of new line instead of end + -O, --operator-position Set operator position (before-newline|after-newline|preserve-newline) [before-newline] +``` + +Which correspond to the underscored option keys for both library interfaces + +**defaults per CLI options** +```json +{ + "indent_size": 4, + "indent_char": " ", + "indent_with_tabs": false, + "eol": "\n", + "end_with_newline": false, + "indent_level": 0, + "preserve_newlines": true, + "max_preserve_newlines": 10, + "space_in_paren": false, + "space_in_empty_paren": false, + "jslint_happy": false, + "space_after_anon_function": false, + "brace_style": "collapse", + "unindent_chained_methods": false, + "break_chained_methods": false, + "keep_array_indentation": false, + "unescape_strings": false, + "wrap_line_length": 0, + "e4x": false, + "comma_first": false, + "operator_position": "before-newline" +} +``` + +**defaults not exposed in the cli** +```json +{ + "eval_code": false, + "space_before_conditional": true +} +``` + +Notice not all defaults are exposed via the CLI. Historically, the Python and +JS APIs have not been 100% identical. For example, `space_before_conditional` is +currently JS-only, and not addressable from the CLI script. There are still a +few other additional cases keeping us from 100% API-compatibility. + + +### Loading settings from environment or .jsbeautifyrc (JavaScript-Only) + +In addition to CLI arguments, you may pass config to the JS executable via: + + * any `jsbeautify_`-prefixed environment variables + * a `JSON`-formatted file indicated by the `--config` parameter + * a `.jsbeautifyrc` file containing `JSON` data at any level of the filesystem above `$PWD` + +Configuration sources provided earlier in this stack will override later ones. + +### Setting inheritance and Language-specific overrides + +The settings are a shallow tree whose values are inherited for all languages, but +can be overridden. This works for settings passed directly to the API in either implementation. +In the Javascript implementation, settings loaded from a config file, such as .jsbeautifyrc, +can also use inheritance/overriding. + +Below is an example configuration tree showing all the supported locations +for language override nodes. We'll use `indent_size` to discuss how this configuration +would behave, but any number of settings can be inherited or overridden: + +```json +{ + "indent_size": 4, + "html": { + "end_with_newline": true, + "js": { + "indent_size": 2 + }, + "css": { + "indent_size": 2 + } + }, + "css": { + "indent_size": 1 + }, + "js": { + "preserve-newlines": true + } +} +``` + +Using the above example would have the following result: + +* HTML files + * Inherit `indent_size` of 4 spaces from the top-level setting. + * The files would also end with a newline. + * JavaScript and CSS inside HTML + * Inherit the HTML `end_with_newline` setting + * Override their indentation to 2 spaces +* CSS files + * Override the top-level setting to an `indent_size` of 1 space. +* JavaScript files + * Inherit `indent_size` of 4 spaces from the top-level setting + * Set `preserve-newlines` to `true` + +### CSS & HTML + +In addition to the `js-beautify` executable, `css-beautify` and `html-beautify` +are also provided as an easy interface into those scripts. Alternatively, +`js-beautify --css` or `js-beautify --html` will accomplish the same thing, respectively. + +```js +// Programmatic access +var beautify_js = require('js-beautify'); // also available under "js" export +var beautify_css = require('js-beautify').css; +var beautify_html = require('js-beautify').html; + +// All methods accept two arguments, the string to be beautified, and an options object. +``` + +The CSS & HTML beautifiers are much simpler in scope, and possess far fewer options. + +```text +CSS Beautifier Options: + -s, --indent-size Indentation size [4] + -c, --indent-char Indentation character [" "] + -t, --indent-with-tabs Indent with tabs, overrides -s and -c + -e, --eol Character(s) to use as line terminators. (default newline - "\\n") + -n, --end-with-newline End output with newline + -L, --selector-separator-newline Add a newline between multiple selectors + -N, --newline-between-rules Add a newline between CSS rules + +HTML Beautifier Options: + -s, --indent-size Indentation size [4] + -c, --indent-char Indentation character [" "] + -t, --indent-with-tabs Indent with tabs, overrides -s and -c + -e, --eol Character(s) to use as line terminators. (default newline - "\\n") + -n, --end-with-newline End output with newline + -p, --preserve-newlines Preserve existing line-breaks (--no-preserve-newlines disables) + -m, --max-preserve-newlines Maximum number of line-breaks to be preserved in one chunk [10] + -I, --indent-inner-html Indent and sections. Default is false. + -b, --brace-style [collapse-preserve-inline|collapse|expand|end-expand|none] ["collapse"] + -S, --indent-scripts [keep|separate|normal] ["normal"] + -w, --wrap-line-length Maximum characters per line (0 disables) [250] + -A, --wrap-attributes Wrap attributes to new lines [auto|force|force-aligned|force-expand-multiline] ["auto"] + -i, --wrap-attributes-indent-size Indent wrapped attributes to after N characters [indent-size] (ignored if wrap-attributes is "force-aligned") + -U, --unformatted List of tags (defaults to inline) that should not be reformatted + -T, --content_unformatted List of tags (defaults to pre) whose content should not be reformatted + -E, --extra_liners List of tags (defaults to [head,body,/html] that should have an extra newline before them. + --editorconfig Use EditorConfig to set up the options +``` + +## Directives to Ignore or Preserve sections (Javascript only) + +Beautifier for supports directives in comments inside the file. +This allows you to tell the beautifier to preserve the formatting of or completely ignore part of a file. +The example input below will remain changed after beautification + +```js +// Use preserve when the content is not javascript, but you don't want it reformatted. +/* beautify preserve:start */ +{ + browserName: 'internet explorer', + platform: 'Windows 7', + version: '8' +} +/* beautify preserve:end */ + +// Use ignore when the content is not parsable as javascript. +var a = 1; +/* beautify ignore:start */ + {This is some strange{template language{using open-braces? +/* beautify ignore:end */ +``` + +# License + +You are free to use this in any way you want, in case you find this +useful or working for you but you must keep the copyright notice and license. (MIT) + +# Credits + +* Created by Einar Lielmanis, +* Python version flourished by Stefano Sanfilippo +* Command-line for node.js by Daniel Stockman +* Maintained and expanded by Liam Newman + +Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, Dave +Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull, +Mathias Bynens, Vittorio Gambaletta and others. + +(README.md: js-beautify@1.7.5) diff --git a/node_modules/js-beautify/js/bin/css-beautify.js b/node_modules/js-beautify/js/bin/css-beautify.js new file mode 100755 index 0000000..77bbe52 --- /dev/null +++ b/node_modules/js-beautify/js/bin/css-beautify.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +var cli = require('../lib/cli'); cli.interpret(); + + diff --git a/node_modules/js-beautify/js/bin/html-beautify.js b/node_modules/js-beautify/js/bin/html-beautify.js new file mode 100755 index 0000000..77bbe52 --- /dev/null +++ b/node_modules/js-beautify/js/bin/html-beautify.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +var cli = require('../lib/cli'); cli.interpret(); + + diff --git a/node_modules/js-beautify/js/bin/js-beautify.js b/node_modules/js-beautify/js/bin/js-beautify.js new file mode 100755 index 0000000..b553ba1 --- /dev/null +++ b/node_modules/js-beautify/js/bin/js-beautify.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +var cli = require('../lib/cli'); +cli.interpret(); \ No newline at end of file diff --git a/node_modules/js-beautify/js/config/defaults.json b/node_modules/js-beautify/js/config/defaults.json new file mode 100644 index 0000000..6370982 --- /dev/null +++ b/node_modules/js-beautify/js/config/defaults.json @@ -0,0 +1,18 @@ +{ + "indent_size": 4, + "indent_char": " ", + "indent_level": 0, + "indent_with_tabs": false, + "preserve_newlines": true, + "max_preserve_newlines": 10, + "jslint_happy": false, + "space_after_anon_function": false, + "brace_style": "collapse", + "keep_array_indentation": false, + "keep_function_indentation": false, + "space_before_conditional": true, + "break_chained_methods": false, + "eval_code": false, + "unescape_strings": false, + "wrap_line_length": 0 +} diff --git a/node_modules/js-beautify/js/index.js b/node_modules/js-beautify/js/index.js new file mode 100644 index 0000000..95c41e5 --- /dev/null +++ b/node_modules/js-beautify/js/index.js @@ -0,0 +1,81 @@ +/* + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. + +*/ + +/** +The following batches are equivalent: + +var beautify_js = require('js-beautify'); +var beautify_js = require('js-beautify').js; +var beautify_js = require('js-beautify').js_beautify; + +var beautify_css = require('js-beautify').css; +var beautify_css = require('js-beautify').css_beautify; + +var beautify_html = require('js-beautify').html; +var beautify_html = require('js-beautify').html_beautify; + +All methods returned accept two arguments, the source string and an options object. +**/ + +function get_beautify(js_beautify, css_beautify, html_beautify) { + // the default is js + var beautify = function(src, config) { + return js_beautify.js_beautify(src, config); + }; + + // short aliases + beautify.js = js_beautify.js_beautify; + beautify.css = css_beautify.css_beautify; + beautify.html = html_beautify.html_beautify; + + // legacy aliases + beautify.js_beautify = js_beautify.js_beautify; + beautify.css_beautify = css_beautify.css_beautify; + beautify.html_beautify = html_beautify.html_beautify; + + return beautify; +} + +if (typeof define === "function" && define.amd) { + // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) + define([ + "./lib/beautify", + "./lib/beautify-css", + "./lib/beautify-html" + ], function(js_beautify, css_beautify, html_beautify) { + return get_beautify(js_beautify, css_beautify, html_beautify); + }); +} else { + (function(mod) { + var js_beautify = require('./lib/beautify'); + var css_beautify = require('./lib/beautify-css'); + var html_beautify = require('./lib/beautify-html'); + + mod.exports = get_beautify(js_beautify, css_beautify, html_beautify); + + })(module); +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/lib/beautify-css.js b/node_modules/js-beautify/js/lib/beautify-css.js new file mode 100644 index 0000000..589d691 --- /dev/null +++ b/node_modules/js-beautify/js/lib/beautify-css.js @@ -0,0 +1,1048 @@ +/*jshint curly:false, eqeqeq:true, laxbreak:true, noempty:false */ +/* AUTO-GENERATED. DO NOT MODIFY. */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. + + + CSS Beautifier +--------------- + + Written by Harutyun Amirjanyan, (amirjanyan@gmail.com) + + Based on code initially developed by: Einar Lielmanis, + http://jsbeautifier.org/ + + Usage: + css_beautify(source_text); + css_beautify(source_text, options); + + The options are (default in brackets): + indent_size (4) — indentation size, + indent_char (space) — character to indent with, + selector_separator_newline (true) - separate selectors with newline or + not (e.g. "a,\nbr" or "a, br") + end_with_newline (false) - end with a newline + newline_between_rules (true) - add a new line after every css rule + space_around_selector_separator (false) - ensure space around selector separators: + '>', '+', '~' (e.g. "a>b" -> "a > b") + e.g + + css_beautify(css_source_text, { + 'indent_size': 1, + 'indent_char': '\t', + 'selector_separator': ' ', + 'end_with_newline': false, + 'newline_between_rules': true, + 'space_around_selector_separator': true + }); +*/ + +// http://www.w3.org/TR/CSS21/syndata.html#tokenization +// http://www.w3.org/TR/css3-syntax/ + +(function() { +var legacy_beautify_css = +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 4); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 mergeOpts = __webpack_require__(2).mergeOpts; +var acorn = __webpack_require__(1); +var Output = __webpack_require__(3).Output; + + +var lineBreak = acorn.lineBreak; +var allLineBreaks = acorn.allLineBreaks; + +function Beautifier(source_text, options) { + options = options || {}; + + // Allow the setting of language/file-type specific options + // with inheritance of overall settings + options = mergeOpts(options, 'css'); + + source_text = source_text || ''; + + var newlinesFromLastWSEat = 0; + var indentSize = options.indent_size ? parseInt(options.indent_size, 10) : 4; + var indentCharacter = options.indent_char || ' '; + var preserve_newlines = (options.preserve_newlines === undefined) ? false : options.preserve_newlines; + var selectorSeparatorNewline = (options.selector_separator_newline === undefined) ? true : options.selector_separator_newline; + var end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline; + var newline_between_rules = (options.newline_between_rules === undefined) ? true : options.newline_between_rules; + var space_around_combinator = (options.space_around_combinator === undefined) ? false : options.space_around_combinator; + space_around_combinator = space_around_combinator || ((options.space_around_selector_separator === undefined) ? false : options.space_around_selector_separator); + var eol = options.eol ? options.eol : 'auto'; + + if (options.indent_with_tabs) { + indentCharacter = '\t'; + indentSize = 1; + } + + if (eol === 'auto') { + eol = '\n'; + if (source_text && lineBreak.test(source_text || '')) { + eol = source_text.match(lineBreak)[0]; + } + } + + eol = eol.replace(/\\r/, '\r').replace(/\\n/, '\n'); + + // HACK: newline parsing inconsistent. This brute force normalizes the input. + source_text = source_text.replace(allLineBreaks, '\n'); + + // tokenizer + var whiteRe = /^\s+$/; + + var pos = -1, + ch; + var parenLevel = 0; + + function next() { + ch = source_text.charAt(++pos); + return ch || ''; + } + + function peek(skipWhitespace) { + var result = ''; + var prev_pos = pos; + if (skipWhitespace) { + eatWhitespace(); + } + result = source_text.charAt(pos + 1) || ''; + pos = prev_pos - 1; + next(); + return result; + } + + function eatString(endChars) { + var start = pos; + while (next()) { + if (ch === "\\") { + next(); + } else if (endChars.indexOf(ch) !== -1) { + break; + } else if (ch === "\n") { + break; + } + } + return source_text.substring(start, pos + 1); + } + + function peekString(endChar) { + var prev_pos = pos; + var str = eatString(endChar); + pos = prev_pos - 1; + next(); + return str; + } + + function eatWhitespace(preserve_newlines_local) { + var result = 0; + while (whiteRe.test(peek())) { + next(); + if (ch === '\n' && preserve_newlines_local && preserve_newlines) { + output.add_new_line(true); + result++; + } + } + newlinesFromLastWSEat = result; + return result; + } + + function skipWhitespace() { + var result = ''; + if (ch && whiteRe.test(ch)) { + result = ch; + } + while (whiteRe.test(next())) { + result += ch; + } + return result; + } + + function eatComment() { + var start = pos; + var singleLine = peek() === "/"; + next(); + while (next()) { + if (!singleLine && ch === "*" && peek() === "/") { + next(); + break; + } else if (singleLine && ch === "\n") { + return source_text.substring(start, pos); + } + } + + return source_text.substring(start, pos) + ch; + } + + + function lookBack(str) { + return source_text.substring(pos - str.length, pos).toLowerCase() === + str; + } + + // Nested pseudo-class if we are insideRule + // and the next special character found opens + // a new block + function foundNestedPseudoClass() { + var openParen = 0; + for (var i = pos + 1; i < source_text.length; i++) { + var ch = source_text.charAt(i); + if (ch === "{") { + return true; + } else if (ch === '(') { + // pseudoclasses can contain () + openParen += 1; + } else if (ch === ')') { + if (openParen === 0) { + return false; + } + openParen -= 1; + } else if (ch === ";" || ch === "}") { + return false; + } + } + return false; + } + + // printer + var baseIndentString = ''; + var preindent_index = 0; + if (source_text && source_text.length) { + while ((source_text.charAt(preindent_index) === ' ' || + source_text.charAt(preindent_index) === '\t')) { + preindent_index += 1; + } + baseIndentString = source_text.substring(0, preindent_index); + source_text = source_text.substring(preindent_index); + } + + + var singleIndent = new Array(indentSize + 1).join(indentCharacter); + var indentLevel; + var nestedLevel; + var output; + + function print_string(output_string) { + if (output.just_added_newline()) { + output.set_indent(indentLevel); + } + output.add_token(output_string); + } + + function preserveSingleSpace(isAfterSpace) { + if (isAfterSpace) { + output.space_before_token = true; + } + } + + function indent() { + indentLevel++; + } + + function outdent() { + if (indentLevel > 0) { + indentLevel--; + } + } + + /*_____________________--------------------_____________________*/ + + this.beautify = function() { + // reset + output = new Output(singleIndent, baseIndentString); + indentLevel = 0; + nestedLevel = 0; + + pos = -1; + ch = null; + parenLevel = 0; + + var insideRule = false; + var insidePropertyValue = false; + var enteringConditionalGroup = false; + var top_ch = ''; + var last_top_ch = ''; + + while (true) { + var whitespace = skipWhitespace(); + var isAfterSpace = whitespace !== ''; + var isAfterNewline = whitespace.indexOf('\n') !== -1; + last_top_ch = top_ch; + top_ch = ch; + + if (!ch) { + break; + } else if (ch === '/' && peek() === '*') { /* css comment */ + var header = indentLevel === 0; + + if (isAfterNewline || header) { + output.add_new_line(); + } + + print_string(eatComment()); + output.add_new_line(); + if (header) { + output.add_new_line(true); + } + } else if (ch === '/' && peek() === '/') { // single line comment + if (!isAfterNewline && last_top_ch !== '{') { + output.trim(true); + } + output.space_before_token = true; + print_string(eatComment()); + output.add_new_line(); + } else if (ch === '@') { + preserveSingleSpace(isAfterSpace); + + // deal with less propery mixins @{...} + if (peek() === '{') { + print_string(eatString('}')); + } else { + print_string(ch); + + // strip trailing space, if present, for hash property checks + var variableOrRule = peekString(": ,;{}()[]/='\""); + + if (variableOrRule.match(/[ :]$/)) { + // we have a variable or pseudo-class, add it and insert one space before continuing + next(); + variableOrRule = eatString(": ").replace(/\s$/, ''); + print_string(variableOrRule); + output.space_before_token = true; + } + + variableOrRule = variableOrRule.replace(/\s$/, ''); + + // might be a nesting at-rule + if (variableOrRule in this.NESTED_AT_RULE) { + nestedLevel += 1; + if (variableOrRule in this.CONDITIONAL_GROUP_RULE) { + enteringConditionalGroup = true; + } + } + } + } else if (ch === '#' && peek() === '{') { + preserveSingleSpace(isAfterSpace); + print_string(eatString('}')); + } else if (ch === '{') { + if (peek(true) === '}') { + eatWhitespace(); + next(); + output.space_before_token = true; + print_string("{}"); + if (!eatWhitespace(true)) { + output.add_new_line(); + } + + if (newlinesFromLastWSEat < 2 && newline_between_rules && indentLevel === 0) { + output.add_new_line(true); + } + } else { + indent(); + output.space_before_token = true; + print_string(ch); + if (!eatWhitespace(true)) { + output.add_new_line(); + } + + // when entering conditional groups, only rulesets are allowed + if (enteringConditionalGroup) { + enteringConditionalGroup = false; + insideRule = (indentLevel > nestedLevel); + } else { + // otherwise, declarations are also allowed + insideRule = (indentLevel >= nestedLevel); + } + } + } else if (ch === '}') { + outdent(); + output.add_new_line(); + print_string(ch); + insideRule = false; + insidePropertyValue = false; + if (nestedLevel) { + nestedLevel--; + } + + if (!eatWhitespace(true)) { + output.add_new_line(); + } + + if (newlinesFromLastWSEat < 2 && newline_between_rules && indentLevel === 0) { + output.add_new_line(true); + } + } else if (ch === ":") { + eatWhitespace(); + if ((insideRule || enteringConditionalGroup) && + !(lookBack("&") || foundNestedPseudoClass()) && + !lookBack("(")) { + // 'property: value' delimiter + // which could be in a conditional group query + print_string(':'); + if (!insidePropertyValue) { + insidePropertyValue = true; + output.space_before_token = true; + } + } else { + // sass/less parent reference don't use a space + // sass nested pseudo-class don't use a space + + // preserve space before pseudoclasses/pseudoelements, as it means "in any child" + if (lookBack(" ")) { + output.space_before_token = true; + } + if (peek() === ":") { + // pseudo-element + next(); + print_string("::"); + } else { + // pseudo-class + print_string(':'); + } + } + } else if (ch === '"' || ch === '\'') { + preserveSingleSpace(isAfterSpace); + print_string(eatString(ch)); + } else if (ch === ';') { + insidePropertyValue = false; + print_string(ch); + if (!eatWhitespace(true)) { + output.add_new_line(); + } + } else if (ch === '(') { // may be a url + if (lookBack("url")) { + print_string(ch); + eatWhitespace(); + if (next()) { + if (ch !== ')' && ch !== '"' && ch !== '\'') { + print_string(eatString(')')); + } else { + pos--; + } + } + } else { + parenLevel++; + preserveSingleSpace(isAfterSpace); + print_string(ch); + eatWhitespace(); + } + } else if (ch === ')') { + print_string(ch); + parenLevel--; + } else if (ch === ',') { + print_string(ch); + if (!eatWhitespace(true) && selectorSeparatorNewline && !insidePropertyValue && parenLevel < 1) { + output.add_new_line(); + } else { + output.space_before_token = true; + } + } else if ((ch === '>' || ch === '+' || ch === '~') && + !insidePropertyValue && parenLevel < 1) { + //handle combinator spacing + if (space_around_combinator) { + output.space_before_token = true; + print_string(ch); + output.space_before_token = true; + } else { + print_string(ch); + eatWhitespace(); + // squash extra whitespace + if (ch && whiteRe.test(ch)) { + ch = ''; + } + } + } else if (ch === ']') { + print_string(ch); + } else if (ch === '[') { + preserveSingleSpace(isAfterSpace); + print_string(ch); + } else if (ch === '=') { // no whitespace before or after + eatWhitespace(); + print_string('='); + if (whiteRe.test(ch)) { + ch = ''; + } + } else if (ch === '!') { // !important + print_string(' '); + print_string(ch); + } else { + preserveSingleSpace(isAfterSpace); + print_string(ch); + } + } + + var sweetCode = output.get_code(end_with_newline, eol); + + return sweetCode; + }; + + // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule + this.NESTED_AT_RULE = { + "@page": true, + "@font-face": true, + "@keyframes": true, + // also in CONDITIONAL_GROUP_RULE below + "@media": true, + "@supports": true, + "@document": true + }; + this.CONDITIONAL_GROUP_RULE = { + "@media": true, + "@supports": true, + "@document": true + }; +} + +module.exports.Beautifier = Beautifier; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +/* jshint curly: false */ +// This section of code is taken from acorn. +// +// Acorn was written by Marijn Haverbeke and released under an MIT +// license. The Unicode regexps (for identifiers and whitespace) were +// taken from [Esprima](http://esprima.org) by Ariya Hidayat. +// +// Git repositories for Acorn are available at +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/marijnh/acorn.git + +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\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\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + +// Whether a single character denotes a newline. + +exports.newline = /[\n\r\u2028\u2029]/; + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +// in javascript, these two differ +// in python they are the same, different methods are called on them +exports.lineBreak = new RegExp('\r\n|' + exports.newline.source); +exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g'); + + +// Test whether a given character code starts an identifier. + +exports.isIdentifierStart = function(code) { + // permit $ (36) and @ (64). @ is used in ES7 decorators. + if (code < 65) return code === 36 || code === 64; + // 65 through 91 are uppercase letters. + if (code < 91) return true; + // permit _ (95). + if (code < 97) return code === 95; + // 97 through 123 are lowercase letters. + if (code < 123) return true; + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); +}; + +// Test whether a given character is part of an identifier. + +exports.isIdentifierChar = function(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); +}; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ + +function mergeOpts(allOptions, targetType) { + var finalOpts = {}; + var name; + + for (name in allOptions) { + if (name !== targetType) { + finalOpts[name] = allOptions[name]; + } + } + + //merge in the per type settings for the targetType + if (targetType in allOptions) { + for (name in allOptions[targetType]) { + finalOpts[name] = allOptions[targetType][name]; + } + } + return finalOpts; +} + +module.exports.mergeOpts = mergeOpts; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ + +function OutputLine(parent) { + var _character_count = 0; + // use indent_count as a marker for lines that have preserved indentation + var _indent_count = -1; + + var _items = []; + var _empty = true; + + this.set_indent = function(level) { + _character_count = parent.baseIndentLength + level * parent.indent_length; + _indent_count = level; + }; + + this.get_character_count = function() { + return _character_count; + }; + + this.is_empty = function() { + return _empty; + }; + + this.last = function() { + if (!this._empty) { + return _items[_items.length - 1]; + } else { + return null; + } + }; + + this.push = function(input) { + _items.push(input); + _character_count += input.length; + _empty = false; + }; + + this.pop = function() { + var item = null; + if (!_empty) { + item = _items.pop(); + _character_count -= item.length; + _empty = _items.length === 0; + } + return item; + }; + + this.remove_indent = function() { + if (_indent_count > 0) { + _indent_count -= 1; + _character_count -= parent.indent_length; + } + }; + + this.trim = function() { + while (this.last() === ' ') { + _items.pop(); + _character_count -= 1; + } + _empty = _items.length === 0; + }; + + this.toString = function() { + var result = ''; + if (!this._empty) { + if (_indent_count >= 0) { + result = parent.indent_cache[_indent_count]; + } + result += _items.join(''); + } + return result; + }; +} + +function Output(indent_string, baseIndentString) { + baseIndentString = baseIndentString || ''; + this.indent_cache = [baseIndentString]; + this.baseIndentLength = baseIndentString.length; + this.indent_length = indent_string.length; + this.raw = false; + + var lines = []; + this.baseIndentString = baseIndentString; + this.indent_string = indent_string; + this.previous_line = null; + this.current_line = null; + this.space_before_token = false; + + this.add_outputline = function() { + this.previous_line = this.current_line; + this.current_line = new OutputLine(this); + lines.push(this.current_line); + }; + + // initialize + this.add_outputline(); + + + this.get_line_number = function() { + return lines.length; + }; + + // Using object instead of string to allow for later expansion of info about each line + this.add_new_line = function(force_newline) { + if (this.get_line_number() === 1 && this.just_added_newline()) { + return false; // no newline on start of file + } + + if (force_newline || !this.just_added_newline()) { + if (!this.raw) { + this.add_outputline(); + } + return true; + } + + return false; + }; + + this.get_code = function(end_with_newline, eol) { + var sweet_code = lines.join('\n').replace(/[\r\n\t ]+$/, ''); + + if (end_with_newline) { + sweet_code += '\n'; + } + + if (eol !== '\n') { + sweet_code = sweet_code.replace(/[\n]/g, eol); + } + + return sweet_code; + }; + + this.set_indent = function(level) { + // Never indent your first output indent at the start of the file + if (lines.length > 1) { + while (level >= this.indent_cache.length) { + this.indent_cache.push(this.indent_cache[this.indent_cache.length - 1] + this.indent_string); + } + + this.current_line.set_indent(level); + return true; + } + this.current_line.set_indent(0); + return false; + }; + + this.add_raw_token = function(token) { + for (var x = 0; x < token.newlines; x++) { + this.add_outputline(); + } + this.current_line.push(token.whitespace_before); + this.current_line.push(token.text); + this.space_before_token = false; + }; + + this.add_token = function(printable_token) { + this.add_space_before_token(); + this.current_line.push(printable_token); + }; + + this.add_space_before_token = function() { + if (this.space_before_token && !this.just_added_newline()) { + this.current_line.push(' '); + } + this.space_before_token = false; + }; + + this.remove_indent = function(index) { + var output_length = lines.length; + while (index < output_length) { + lines[index].remove_indent(); + index++; + } + }; + + this.trim = function(eat_newlines) { + eat_newlines = (eat_newlines === undefined) ? false : eat_newlines; + + this.current_line.trim(indent_string, baseIndentString); + + while (eat_newlines && lines.length > 1 && + this.current_line.is_empty()) { + lines.pop(); + this.current_line = lines[lines.length - 1]; + this.current_line.trim(); + } + + this.previous_line = lines.length > 1 ? lines[lines.length - 2] : null; + }; + + this.just_added_newline = function() { + return this.current_line.is_empty(); + }; + + this.just_added_blankline = function() { + if (this.just_added_newline()) { + if (lines.length === 1) { + return true; // start of the file and newline = blank + } + + var line = lines[lines.length - 2]; + return line.is_empty(); + } + return false; + }; +} + +module.exports.Output = Output; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 Beautifier = __webpack_require__(0).Beautifier; + +function css_beautify(source_text, options) { + var beautifier = new Beautifier(source_text, options); + return beautifier.beautify(); +} + +module.exports = css_beautify; + +/***/ }) +/******/ ]); +var css_beautify = legacy_beautify_css; +/* Footer */ +if (typeof define === "function" && define.amd) { + // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) + define([], function() { + return { + css_beautify: css_beautify + }; + }); +} else if (typeof exports !== "undefined") { + // Add support for CommonJS. Just put this file somewhere on your require.paths + // and you will be able to `var html_beautify = require("beautify").html_beautify`. + exports.css_beautify = css_beautify; +} else if (typeof window !== "undefined") { + // If we're running a web page and don't have either of the above, add our one global + window.css_beautify = css_beautify; +} else if (typeof global !== "undefined") { + // If we don't even have window, try global. + global.css_beautify = css_beautify; +} + +}()); diff --git a/node_modules/js-beautify/js/lib/beautify-html.js b/node_modules/js-beautify/js/lib/beautify-html.js new file mode 100644 index 0000000..c7fcf6d --- /dev/null +++ b/node_modules/js-beautify/js/lib/beautify-html.js @@ -0,0 +1,1387 @@ +/*jshint curly:false, eqeqeq:true, laxbreak:true, noempty:false */ +/* AUTO-GENERATED. DO NOT MODIFY. */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. + + + Style HTML +--------------- + + Written by Nochum Sossonko, (nsossonko@hotmail.com) + + Based on code initially developed by: Einar Lielmanis, + http://jsbeautifier.org/ + + Usage: + style_html(html_source); + + style_html(html_source, options); + + The options are: + indent_inner_html (default false) — indent and sections, + indent_size (default 4) — indentation size, + indent_char (default space) — character to indent with, + wrap_line_length (default 250) - maximum amount of characters per line (0 = disable) + brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none" + put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are. + unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted + content_unformatted (defaults to pre tag) - list of tags, whose content shouldn't be reformatted + indent_scripts (default normal) - "keep"|"separate"|"normal" + preserve_newlines (default true) - whether existing line breaks before elements should be preserved + Only works before elements, not inside tags or for text. + max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk + indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}} + end_with_newline (false) - end with a newline + extra_liners (default [head,body,/html]) -List of tags that should have an extra newline before them. + + e.g. + + style_html(html_source, { + 'indent_inner_html': false, + 'indent_size': 2, + 'indent_char': ' ', + 'wrap_line_length': 78, + 'brace_style': 'expand', + 'preserve_newlines': true, + 'max_preserve_newlines': 5, + 'indent_handlebars': false, + 'extra_liners': ['/html'] + }); +*/ + +(function() { +var legacy_beautify_html = +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 3); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 mergeOpts = __webpack_require__(2).mergeOpts; +var acorn = __webpack_require__(1); + + +var lineBreak = acorn.lineBreak; +var allLineBreaks = acorn.allLineBreaks; + +// function trim(s) { +// return s.replace(/^\s+|\s+$/g, ''); +// } + +function ltrim(s) { + return s.replace(/^\s+/g, ''); +} + +function rtrim(s) { + return s.replace(/\s+$/g, ''); +} + +function Beautifier(html_source, options, js_beautify, css_beautify) { + //Wrapper function to invoke all the necessary constructors and deal with the output. + html_source = html_source || ''; + + var multi_parser, + indent_inner_html, + indent_body_inner_html, + indent_head_inner_html, + indent_size, + indent_character, + wrap_line_length, + brace_style, + unformatted, + content_unformatted, + preserve_newlines, + max_preserve_newlines, + indent_handlebars, + wrap_attributes, + wrap_attributes_indent_size, + is_wrap_attributes_force, + is_wrap_attributes_force_expand_multiline, + is_wrap_attributes_force_aligned, + end_with_newline, + extra_liners, + eol; + + options = options || {}; + + // Allow the setting of language/file-type specific options + // with inheritance of overall settings + options = mergeOpts(options, 'html'); + + // backwards compatibility to 1.3.4 + if ((options.wrap_line_length === undefined || parseInt(options.wrap_line_length, 10) === 0) && + (options.max_char !== undefined && parseInt(options.max_char, 10) !== 0)) { + options.wrap_line_length = options.max_char; + } + + indent_inner_html = (options.indent_inner_html === undefined) ? false : options.indent_inner_html; + indent_body_inner_html = (options.indent_body_inner_html === undefined) ? true : options.indent_body_inner_html; + indent_head_inner_html = (options.indent_head_inner_html === undefined) ? true : options.indent_head_inner_html; + indent_size = (options.indent_size === undefined) ? 4 : parseInt(options.indent_size, 10); + indent_character = (options.indent_char === undefined) ? ' ' : options.indent_char; + brace_style = (options.brace_style === undefined) ? 'collapse' : options.brace_style; + wrap_line_length = parseInt(options.wrap_line_length, 10) === 0 ? 32786 : parseInt(options.wrap_line_length || 250, 10); + unformatted = options.unformatted || [ + // https://www.w3.org/TR/html5/dom.html#phrasing-content + 'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite', + 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img', + 'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript', + 'object', 'output', 'progress', 'q', 'ruby', 's', 'samp', /* 'script', */ 'select', 'small', + 'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var', + 'video', 'wbr', 'text', + // prexisting - not sure of full effect of removing, leaving in + 'acronym', 'address', 'big', 'dt', 'ins', 'strike', 'tt', + ]; + content_unformatted = options.content_unformatted || [ + 'pre', + ]; + preserve_newlines = (options.preserve_newlines === undefined) ? true : options.preserve_newlines; + max_preserve_newlines = preserve_newlines ? + (isNaN(parseInt(options.max_preserve_newlines, 10)) ? 32786 : parseInt(options.max_preserve_newlines, 10)) : + 0; + indent_handlebars = (options.indent_handlebars === undefined) ? false : options.indent_handlebars; + wrap_attributes = (options.wrap_attributes === undefined) ? 'auto' : options.wrap_attributes; + wrap_attributes_indent_size = (isNaN(parseInt(options.wrap_attributes_indent_size, 10))) ? indent_size : parseInt(options.wrap_attributes_indent_size, 10); + is_wrap_attributes_force = wrap_attributes.substr(0, 'force'.length) === 'force'; + is_wrap_attributes_force_expand_multiline = (wrap_attributes === 'force-expand-multiline'); + is_wrap_attributes_force_aligned = (wrap_attributes === 'force-aligned'); + end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline; + extra_liners = (typeof options.extra_liners === 'object') && options.extra_liners ? + options.extra_liners.concat() : (typeof options.extra_liners === 'string') ? + options.extra_liners.split(',') : 'head,body,/html'.split(','); + eol = options.eol ? options.eol : 'auto'; + + if (options.indent_with_tabs) { + indent_character = '\t'; + indent_size = 1; + } + + if (eol === 'auto') { + eol = '\n'; + if (html_source && lineBreak.test(html_source || '')) { + eol = html_source.match(lineBreak)[0]; + } + } + + eol = eol.replace(/\\r/, '\r').replace(/\\n/, '\n'); + + // HACK: newline parsing inconsistent. This brute force normalizes the input. + html_source = html_source.replace(allLineBreaks, '\n'); + + function Parser() { + + this.pos = 0; //Parser position + this.token = ''; + this.current_mode = 'CONTENT'; //reflects the current Parser mode: TAG/CONTENT + this.tags = { //An object to hold tags, their position, and their parent-tags, initiated with default values + parent: 'parent1', + parentcount: 1, + parent1: '' + }; + this.tag_type = ''; + this.token_text = this.last_token = this.last_text = this.token_type = ''; + this.newlines = 0; + this.indent_content = indent_inner_html; + this.indent_body_inner_html = indent_body_inner_html; + this.indent_head_inner_html = indent_head_inner_html; + + this.Utils = { //Uilities made available to the various functions + whitespace: "\n\r\t ".split(''), + + single_token: options.void_elements || [ + // HTLM void elements - aka self-closing tags - aka singletons + // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements + 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', + 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr', + // NOTE: Optional tags - are not understood. + // https://www.w3.org/TR/html5/syntax.html#optional-tags + // The rules for optional tags are too complex for a simple list + // Also, the content of these tags should still be indented in many cases. + // 'li' is a good exmple. + + // Doctype and xml elements + '!doctype', '?xml', + // ?php tag + '?php', + // other tags that were in this list, keeping just in case + 'basefont', 'isindex' + ], + extra_liners: extra_liners, //for tags that need a line of whitespace before them + in_array: function(what, arr) { + for (var i = 0; i < arr.length; i++) { + if (what === arr[i]) { + return true; + } + } + return false; + } + }; + + // Return true if the given text is composed entirely of whitespace. + this.is_whitespace = function(text) { + for (var n = 0; n < text.length; n++) { + if (!this.Utils.in_array(text.charAt(n), this.Utils.whitespace)) { + return false; + } + } + return true; + }; + + this.traverse_whitespace = function() { + var input_char = ''; + + input_char = this.input.charAt(this.pos); + if (this.Utils.in_array(input_char, this.Utils.whitespace)) { + this.newlines = 0; + while (this.Utils.in_array(input_char, this.Utils.whitespace)) { + if (preserve_newlines && input_char === '\n' && this.newlines <= max_preserve_newlines) { + this.newlines += 1; + } + + this.pos++; + input_char = this.input.charAt(this.pos); + } + return true; + } + return false; + }; + + // Append a space to the given content (string array) or, if we are + // at the wrap_line_length, append a newline/indentation. + // return true if a newline was added, false if a space was added + this.space_or_wrap = function(content) { + if (this.line_char_count >= this.wrap_line_length) { //insert a line when the wrap_line_length is reached + this.print_newline(false, content); + this.print_indentation(content); + return true; + } else { + this.line_char_count++; + content.push(' '); + return false; + } + }; + + this.get_content = function() { //function to capture regular content between tags + var input_char = '', + content = [], + handlebarsStarted = 0; + + while (this.input.charAt(this.pos) !== '<' || handlebarsStarted === 2) { + if (this.pos >= this.input.length) { + return content.length ? content.join('') : ['', 'TK_EOF']; + } + + if (handlebarsStarted < 2 && this.traverse_whitespace()) { + this.space_or_wrap(content); + continue; + } + + input_char = this.input.charAt(this.pos); + + if (indent_handlebars) { + if (input_char === '{') { + handlebarsStarted += 1; + } else if (handlebarsStarted < 2) { + handlebarsStarted = 0; + } + + if (input_char === '}' && handlebarsStarted > 0) { + if (handlebarsStarted-- === 0) { + break; + } + } + // Handlebars parsing is complicated. + // {{#foo}} and {{/foo}} are formatted tags. + // {{something}} should get treated as content, except: + // {{else}} specifically behaves like {{#if}} and {{/if}} + var peek3 = this.input.substr(this.pos, 3); + if (peek3 === '{{#' || peek3 === '{{/') { + // These are tags and not content. + break; + } else if (peek3 === '{{!') { + return [this.get_tag(), 'TK_TAG_HANDLEBARS_COMMENT']; + } else if (this.input.substr(this.pos, 2) === '{{') { + if (this.get_tag(true) === '{{else}}') { + break; + } + } + } + + this.pos++; + this.line_char_count++; + content.push(input_char); //letter at-a-time (or string) inserted to an array + } + return content.length ? content.join('') : ''; + }; + + this.get_contents_to = function(name) { //get the full content of a script or style to pass to js_beautify + if (this.pos === this.input.length) { + return ['', 'TK_EOF']; + } + var content = ''; + var reg_match = new RegExp('', 'igm'); + reg_match.lastIndex = this.pos; + var reg_array = reg_match.exec(this.input); + var end_script = reg_array ? reg_array.index : this.input.length; //absolute end of script + if (this.pos < end_script) { //get everything in between the script tags + content = this.input.substring(this.pos, end_script); + this.pos = end_script; + } + return content; + }; + + this.record_tag = function(tag) { //function to record a tag and its parent in this.tags Object + if (this.tags[tag + 'count']) { //check for the existence of this tag type + this.tags[tag + 'count']++; + this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level + } else { //otherwise initialize this tag type + this.tags[tag + 'count'] = 1; + this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level + } + this.tags[tag + this.tags[tag + 'count'] + 'parent'] = this.tags.parent; //set the parent (i.e. in the case of a div this.tags.div1parent) + this.tags.parent = tag + this.tags[tag + 'count']; //and make this the current parent (i.e. in the case of a div 'div1') + }; + + this.retrieve_tag = function(tag) { //function to retrieve the opening tag to the corresponding closer + if (this.tags[tag + 'count']) { //if the openener is not in the Object we ignore it + var temp_parent = this.tags.parent; //check to see if it's a closable tag. + while (temp_parent) { //till we reach '' (the initial value); + if (tag + this.tags[tag + 'count'] === temp_parent) { //if this is it use it + break; + } + temp_parent = this.tags[temp_parent + 'parent']; //otherwise keep on climbing up the DOM Tree + } + if (temp_parent) { //if we caught something + this.indent_level = this.tags[tag + this.tags[tag + 'count']]; //set the indent_level accordingly + this.tags.parent = this.tags[temp_parent + 'parent']; //and set the current parent + } + delete this.tags[tag + this.tags[tag + 'count'] + 'parent']; //delete the closed tags parent reference... + delete this.tags[tag + this.tags[tag + 'count']]; //...and the tag itself + if (this.tags[tag + 'count'] === 1) { + delete this.tags[tag + 'count']; + } else { + this.tags[tag + 'count']--; + } + } + }; + + this.indent_to_tag = function(tag) { + // Match the indentation level to the last use of this tag, but don't remove it. + if (!this.tags[tag + 'count']) { + return; + } + var temp_parent = this.tags.parent; + while (temp_parent) { + if (tag + this.tags[tag + 'count'] === temp_parent) { + break; + } + temp_parent = this.tags[temp_parent + 'parent']; + } + if (temp_parent) { + this.indent_level = this.tags[tag + this.tags[tag + 'count']]; + } + }; + + this.get_tag = function(peek) { //function to get a full tag and parse its type + var input_char = '', + content = [], + comment = '', + space = false, + first_attr = true, + has_wrapped_attrs = false, + tag_start, tag_end, + tag_start_char, + orig_pos = this.pos, + orig_line_char_count = this.line_char_count, + is_tag_closed = false, + tail; + + peek = peek !== undefined ? peek : false; + + do { + if (this.pos >= this.input.length) { + if (peek) { + this.pos = orig_pos; + this.line_char_count = orig_line_char_count; + } + return content.length ? content.join('') : ['', 'TK_EOF']; + } + + input_char = this.input.charAt(this.pos); + this.pos++; + + if (this.Utils.in_array(input_char, this.Utils.whitespace)) { //don't want to insert unnecessary space + space = true; + continue; + } + + if (input_char === "'" || input_char === '"') { + input_char += this.get_unformatted(input_char); + space = true; + } + + if (input_char === '=') { //no space before = + space = false; + } + tail = this.input.substr(this.pos - 1); + if (is_wrap_attributes_force_expand_multiline && has_wrapped_attrs && !is_tag_closed && (input_char === '>' || input_char === '/')) { + if (tail.match(/^\/?\s*>/)) { + space = false; + is_tag_closed = true; + this.print_newline(false, content); + this.print_indentation(content); + } + } + if (content.length && content[content.length - 1] !== '=' && input_char !== '>' && space) { + //no space after = or before > + var wrapped = this.space_or_wrap(content); + var indentAttrs = wrapped && input_char !== '/' && !is_wrap_attributes_force; + space = false; + + if (is_wrap_attributes_force && input_char !== '/') { + var force_first_attr_wrap = false; + if (is_wrap_attributes_force_expand_multiline && first_attr) { + var is_only_attribute = tail.match(/^\S*(="([^"]|\\")*")?\s*\/?\s*>/) !== null; + force_first_attr_wrap = !is_only_attribute; + } + if (!first_attr || force_first_attr_wrap) { + this.print_newline(false, content); + this.print_indentation(content); + indentAttrs = true; + } + } + if (indentAttrs) { + has_wrapped_attrs = true; + + //indent attributes an auto, forced, or forced-align line-wrap + var alignment_size = wrap_attributes_indent_size; + if (is_wrap_attributes_force_aligned) { + alignment_size = content.indexOf(' ') + 1; + } + + for (var count = 0; count < alignment_size; count++) { + // only ever further indent with spaces since we're trying to align characters + content.push(' '); + } + } + if (first_attr) { + for (var i = 0; i < content.length; i++) { + if (content[i] === ' ') { + first_attr = false; + break; + } + } + } + } + + if (indent_handlebars && tag_start_char === '<') { + // When inside an angle-bracket tag, put spaces around + // handlebars not inside of strings. + if ((input_char + this.input.charAt(this.pos)) === '{{') { + input_char += this.get_unformatted('}}'); + if (content.length && content[content.length - 1] !== ' ' && content[content.length - 1] !== '<') { + input_char = ' ' + input_char; + } + space = true; + } + } + + if (input_char === '<' && !tag_start_char) { + tag_start = this.pos - 1; + tag_start_char = '<'; + } + + if (indent_handlebars && !tag_start_char) { + if (content.length >= 2 && content[content.length - 1] === '{' && content[content.length - 2] === '{') { + if (input_char === '#' || input_char === '/' || input_char === '!') { + tag_start = this.pos - 3; + } else { + tag_start = this.pos - 2; + } + tag_start_char = '{'; + } + } + + this.line_char_count++; + content.push(input_char); //inserts character at-a-time (or string) + + if (content[1] && (content[1] === '!' || content[1] === '?' || content[1] === '%')) { //if we're in a comment, do something special + // We treat all comments as literals, even more than preformatted tags + // we just look for the appropriate close tag + content = [this.get_comment(tag_start)]; + break; + } + + if (indent_handlebars && content[1] && content[1] === '{' && content[2] && content[2] === '!') { //if we're in a comment, do something special + // We treat all comments as literals, even more than preformatted tags + // we just look for the appropriate close tag + content = [this.get_comment(tag_start)]; + break; + } + + if (indent_handlebars && tag_start_char === '{' && content.length > 2 && content[content.length - 2] === '}' && content[content.length - 1] === '}') { + break; + } + } while (input_char !== '>'); + + var tag_complete = content.join(''); + var tag_index; + var tag_offset; + + // must check for space first otherwise the tag could have the first attribute included, and + // then not un-indent correctly + if (tag_complete.indexOf(' ') !== -1) { //if there's whitespace, thats where the tag name ends + tag_index = tag_complete.indexOf(' '); + } else if (tag_complete.indexOf('\n') !== -1) { //if there's a line break, thats where the tag name ends + tag_index = tag_complete.indexOf('\n'); + } else if (tag_complete.charAt(0) === '{') { + tag_index = tag_complete.indexOf('}'); + } else { //otherwise go with the tag ending + tag_index = tag_complete.indexOf('>'); + } + if (tag_complete.charAt(0) === '<' || !indent_handlebars) { + tag_offset = 1; + } else { + tag_offset = tag_complete.charAt(2) === '#' ? 3 : 2; + } + var tag_check = tag_complete.substring(tag_offset, tag_index).toLowerCase(); + if (tag_complete.charAt(tag_complete.length - 2) === '/' || + this.Utils.in_array(tag_check, this.Utils.single_token)) { //if this tag name is a single tag type (either in the list or has a closing /) + if (!peek) { + this.tag_type = 'SINGLE'; + } + } else if (indent_handlebars && tag_complete.charAt(0) === '{' && tag_check === 'else') { + if (!peek) { + this.indent_to_tag('if'); + this.tag_type = 'HANDLEBARS_ELSE'; + this.indent_content = true; + this.traverse_whitespace(); + } + } else if (this.is_unformatted(tag_check, unformatted) || + this.is_unformatted(tag_check, content_unformatted)) { + // do not reformat the "unformatted" or "content_unformatted" tags + comment = this.get_unformatted('', tag_complete); //...delegate to get_unformatted function + content.push(comment); + tag_end = this.pos - 1; + this.tag_type = 'SINGLE'; + } else if (tag_check === 'script' && + (tag_complete.search('type') === -1 || + (tag_complete.search('type') > -1 && + tag_complete.search(/\b(text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect)/) > -1))) { + if (!peek) { + this.record_tag(tag_check); + this.tag_type = 'SCRIPT'; + } + } else if (tag_check === 'style' && + (tag_complete.search('type') === -1 || + (tag_complete.search('type') > -1 && tag_complete.search('text/css') > -1))) { + if (!peek) { + this.record_tag(tag_check); + this.tag_type = 'STYLE'; + } + } else if (tag_check.charAt(0) === '!') { //peek for ', + matched = false; + + this.pos = start_pos; + var input_char = this.input.charAt(this.pos); + this.pos++; + + while (this.pos <= this.input.length) { + comment += input_char; + + // only need to check for the delimiter if the last chars match + if (comment.charAt(comment.length - 1) === delimiter.charAt(delimiter.length - 1) && + comment.indexOf(delimiter) !== -1) { + break; + } + + // only need to search for custom delimiter for the first few characters + if (!matched && comment.length < 10) { + if (comment.indexOf(''; + matched = true; + } else if (comment.indexOf(''; + matched = true; + } else if (comment.indexOf(''; + matched = true; + } else if (comment.indexOf(''; + matched = true; + } else if (comment.indexOf('{{!--') === 0) { // {{!-- handlebars comment + delimiter = '--}}'; + matched = true; + } else if (comment.indexOf('{{!') === 0) { // {{! handlebars comment + if (comment.length === 5 && comment.indexOf('{{!--') === -1) { + delimiter = '}}'; + matched = true; + } + } else if (comment.indexOf(''; + matched = true; + } else if (comment.indexOf('<%') === 0) { // {{! handlebars comment + delimiter = '%>'; + matched = true; + } + } + + input_char = this.input.charAt(this.pos); + this.pos++; + } + + return comment; + }; + + function tokenMatcher(delimiter) { + var token = ''; + + var add = function(str) { + var newToken = token + str.toLowerCase(); + token = newToken.length <= delimiter.length ? newToken : newToken.substr(newToken.length - delimiter.length, delimiter.length); + }; + + var doesNotMatch = function() { + return token.indexOf(delimiter) === -1; + }; + + return { + add: add, + doesNotMatch: doesNotMatch + }; + } + + this.get_unformatted = function(delimiter, orig_tag) { //function to return unformatted content in its entirety + if (orig_tag && orig_tag.toLowerCase().indexOf(delimiter) !== -1) { + return ''; + } + var input_char = ''; + var content = ''; + var space = true; + + var delimiterMatcher = tokenMatcher(delimiter); + + do { + + if (this.pos >= this.input.length) { + return content; + } + + input_char = this.input.charAt(this.pos); + this.pos++; + + if (this.Utils.in_array(input_char, this.Utils.whitespace)) { + if (!space) { + this.line_char_count--; + continue; + } + if (input_char === '\n' || input_char === '\r') { + content += '\n'; + /* Don't change tab indention for unformatted blocks. If using code for html editing, this will greatly affect
     tags if they are specified in the 'unformatted array'
    +            for (var i=0; i]*>\s*$/);
    +
    +            // if next_tag comes back but is not an isolated tag, then
    +            // let's treat the 'a' tag as having content
    +            // and respect the unformatted option
    +            if (!tag || this.Utils.in_array(tag[1], unformatted)) {
    +                return true;
    +            } else {
    +                return false;
    +            }
    +        };
    +
    +        this.printer = function(js_source, indent_character, indent_size, wrap_line_length, brace_style) { //handles input/output and some other printing functions
    +
    +            this.input = js_source || ''; //gets the input for the Parser
    +
    +            // HACK: newline parsing inconsistent. This brute force normalizes the input.
    +            this.input = this.input.replace(/\r\n|[\r\u2028\u2029]/g, '\n');
    +
    +            this.output = [];
    +            this.indent_character = indent_character;
    +            this.indent_string = '';
    +            this.indent_size = indent_size;
    +            this.brace_style = brace_style;
    +            this.indent_level = 0;
    +            this.wrap_line_length = wrap_line_length;
    +            this.line_char_count = 0; //count to see if wrap_line_length was exceeded
    +
    +            for (var i = 0; i < this.indent_size; i++) {
    +                this.indent_string += this.indent_character;
    +            }
    +
    +            this.print_newline = function(force, arr) {
    +                this.line_char_count = 0;
    +                if (!arr || !arr.length) {
    +                    return;
    +                }
    +                if (force || (arr[arr.length - 1] !== '\n')) { //we might want the extra line
    +                    if ((arr[arr.length - 1] !== '\n')) {
    +                        arr[arr.length - 1] = rtrim(arr[arr.length - 1]);
    +                    }
    +                    arr.push('\n');
    +                }
    +            };
    +
    +            this.print_indentation = function(arr) {
    +                for (var i = 0; i < this.indent_level; i++) {
    +                    arr.push(this.indent_string);
    +                    this.line_char_count += this.indent_string.length;
    +                }
    +            };
    +
    +            this.print_token = function(text) {
    +                // Avoid printing initial whitespace.
    +                if (this.is_whitespace(text) && !this.output.length) {
    +                    return;
    +                }
    +                if (text || text !== '') {
    +                    if (this.output.length && this.output[this.output.length - 1] === '\n') {
    +                        this.print_indentation(this.output);
    +                        text = ltrim(text);
    +                    }
    +                }
    +                this.print_token_raw(text);
    +            };
    +
    +            this.print_token_raw = function(text) {
    +                // If we are going to print newlines, truncate trailing
    +                // whitespace, as the newlines will represent the space.
    +                if (this.newlines > 0) {
    +                    text = rtrim(text);
    +                }
    +
    +                if (text && text !== '') {
    +                    if (text.length > 1 && text.charAt(text.length - 1) === '\n') {
    +                        // unformatted tags can grab newlines as their last character
    +                        this.output.push(text.slice(0, -1));
    +                        this.print_newline(false, this.output);
    +                    } else {
    +                        this.output.push(text);
    +                    }
    +                }
    +
    +                for (var n = 0; n < this.newlines; n++) {
    +                    this.print_newline(n > 0, this.output);
    +                }
    +                this.newlines = 0;
    +            };
    +
    +            this.indent = function() {
    +                this.indent_level++;
    +            };
    +
    +            this.unindent = function() {
    +                if (this.indent_level > 0) {
    +                    this.indent_level--;
    +                }
    +            };
    +        };
    +        return this;
    +    }
    +
    +    /*_____________________--------------------_____________________*/
    +
    +    this.beautify = function() {
    +        multi_parser = new Parser(); //wrapping functions Parser
    +        multi_parser.printer(html_source, indent_character, indent_size, wrap_line_length, brace_style); //initialize starting values
    +        while (true) {
    +            var t = multi_parser.get_token();
    +            multi_parser.token_text = t[0];
    +            multi_parser.token_type = t[1];
    +
    +            if (multi_parser.token_type === 'TK_EOF') {
    +                break;
    +            }
    +
    +            switch (multi_parser.token_type) {
    +                case 'TK_TAG_START':
    +                    multi_parser.print_newline(false, multi_parser.output);
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    if (multi_parser.indent_content) {
    +                        if ((multi_parser.indent_body_inner_html || !multi_parser.token_text.match(//)) &&
    +                            (multi_parser.indent_head_inner_html || !multi_parser.token_text.match(//))) {
    +
    +                            multi_parser.indent();
    +                        }
    +
    +                        multi_parser.indent_content = false;
    +                    }
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_STYLE':
    +                case 'TK_TAG_SCRIPT':
    +                    multi_parser.print_newline(false, multi_parser.output);
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_END':
    +                    //Print new line only if the tag has no content and has child
    +                    if (multi_parser.last_token === 'TK_CONTENT' && multi_parser.last_text === '') {
    +                        var tag_name = (multi_parser.token_text.match(/\w+/) || [])[0];
    +                        var tag_extracted_from_last_output = null;
    +                        if (multi_parser.output.length) {
    +                            tag_extracted_from_last_output = multi_parser.output[multi_parser.output.length - 1].match(/(?:<|{{#)\s*(\w+)/);
    +                        }
    +                        if (tag_extracted_from_last_output === null ||
    +                            (tag_extracted_from_last_output[1] !== tag_name && !multi_parser.Utils.in_array(tag_extracted_from_last_output[1], unformatted))) {
    +                            multi_parser.print_newline(false, multi_parser.output);
    +                        }
    +                    }
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_SINGLE':
    +                    // Don't add a newline before elements that should remain unformatted.
    +                    var tag_check = multi_parser.token_text.match(/^\s*<([a-z-]+)/i);
    +                    if (!tag_check || !multi_parser.Utils.in_array(tag_check[1], unformatted)) {
    +                        multi_parser.print_newline(false, multi_parser.output);
    +                    }
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_HANDLEBARS_ELSE':
    +                    // Don't add a newline if opening {{#if}} tag is on the current line
    +                    var foundIfOnCurrentLine = false;
    +                    for (var lastCheckedOutput = multi_parser.output.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
    +                        if (multi_parser.output[lastCheckedOutput] === '\n') {
    +                            break;
    +                        } else {
    +                            if (multi_parser.output[lastCheckedOutput].match(/{{#if/)) {
    +                                foundIfOnCurrentLine = true;
    +                                break;
    +                            }
    +                        }
    +                    }
    +                    if (!foundIfOnCurrentLine) {
    +                        multi_parser.print_newline(false, multi_parser.output);
    +                    }
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    if (multi_parser.indent_content) {
    +                        multi_parser.indent();
    +                        multi_parser.indent_content = false;
    +                    }
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_HANDLEBARS_COMMENT':
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'TAG';
    +                    break;
    +                case 'TK_CONTENT':
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'TAG';
    +                    break;
    +                case 'TK_STYLE':
    +                case 'TK_SCRIPT':
    +                    if (multi_parser.token_text !== '') {
    +                        multi_parser.print_newline(false, multi_parser.output);
    +                        var text = multi_parser.token_text,
    +                            _beautifier,
    +                            script_indent_level = 1;
    +                        if (multi_parser.token_type === 'TK_SCRIPT') {
    +                            _beautifier = typeof js_beautify === 'function' && js_beautify;
    +                        } else if (multi_parser.token_type === 'TK_STYLE') {
    +                            _beautifier = typeof css_beautify === 'function' && css_beautify;
    +                        }
    +
    +                        if (options.indent_scripts === "keep") {
    +                            script_indent_level = 0;
    +                        } else if (options.indent_scripts === "separate") {
    +                            script_indent_level = -multi_parser.indent_level;
    +                        }
    +
    +                        var indentation = multi_parser.get_full_indent(script_indent_level);
    +                        if (_beautifier) {
    +
    +                            // call the Beautifier if avaliable
    +                            var Child_options = function() {
    +                                this.eol = '\n';
    +                            };
    +                            Child_options.prototype = options;
    +                            var child_options = new Child_options();
    +                            text = _beautifier(text.replace(/^\s*/, indentation), child_options);
    +                        } else {
    +                            // simply indent the string otherwise
    +                            var white = text.match(/^\s*/)[0];
    +                            var _level = white.match(/[^\n\r]*$/)[0].split(multi_parser.indent_string).length - 1;
    +                            var reindent = multi_parser.get_full_indent(script_indent_level - _level);
    +                            text = text.replace(/^\s*/, indentation)
    +                                .replace(/\r\n|\r|\n/g, '\n' + reindent)
    +                                .replace(/\s+$/, '');
    +                        }
    +                        if (text) {
    +                            multi_parser.print_token_raw(text);
    +                            multi_parser.print_newline(true, multi_parser.output);
    +                        }
    +                    }
    +                    multi_parser.current_mode = 'TAG';
    +                    break;
    +                default:
    +                    // We should not be getting here but we don't want to drop input on the floor
    +                    // Just output the text and move on
    +                    if (multi_parser.token_text !== '') {
    +                        multi_parser.print_token(multi_parser.token_text);
    +                    }
    +                    break;
    +            }
    +            multi_parser.last_token = multi_parser.token_type;
    +            multi_parser.last_text = multi_parser.token_text;
    +        }
    +        var sweet_code = multi_parser.output.join('').replace(/[\r\n\t ]+$/, '');
    +
    +        // establish end_with_newline
    +        if (end_with_newline) {
    +            sweet_code += '\n';
    +        }
    +
    +        if (eol !== '\n') {
    +            sweet_code = sweet_code.replace(/[\n]/g, eol);
    +        }
    +
    +        return sweet_code;
    +    };
    +}
    +
    +module.exports.Beautifier = Beautifier;
    +
    +
    +/***/ }),
    +/* 1 */
    +/***/ (function(module, exports) {
    +
    +/* jshint curly: false */
    +// This section of code is taken from acorn.
    +//
    +// Acorn was written by Marijn Haverbeke and released under an MIT
    +// license. The Unicode regexps (for identifiers and whitespace) were
    +// taken from [Esprima](http://esprima.org) by Ariya Hidayat.
    +//
    +// Git repositories for Acorn are available at
    +//
    +//     http://marijnhaverbeke.nl/git/acorn
    +//     https://github.com/marijnh/acorn.git
    +
    +// ## Character categories
    +
    +// Big ugly regular expressions that match characters in the
    +// whitespace, identifier, and identifier-start categories. These
    +// are only applied when a character is found to actually have a
    +// code point above 128.
    +
    +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line
    +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\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\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
    +var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
    +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
    +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
    +
    +// Whether a single character denotes a newline.
    +
    +exports.newline = /[\n\r\u2028\u2029]/;
    +
    +// Matches a whole line break (where CRLF is considered a single
    +// line break). Used to count lines.
    +
    +// in javascript, these two differ
    +// in python they are the same, different methods are called on them
    +exports.lineBreak = new RegExp('\r\n|' + exports.newline.source);
    +exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');
    +
    +
    +// Test whether a given character code starts an identifier.
    +
    +exports.isIdentifierStart = function(code) {
    +    // permit $ (36) and @ (64). @ is used in ES7 decorators.
    +    if (code < 65) return code === 36 || code === 64;
    +    // 65 through 91 are uppercase letters.
    +    if (code < 91) return true;
    +    // permit _ (95).
    +    if (code < 97) return code === 95;
    +    // 97 through 123 are lowercase letters.
    +    if (code < 123) return true;
    +    return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
    +};
    +
    +// Test whether a given character is part of an identifier.
    +
    +exports.isIdentifierChar = function(code) {
    +    if (code < 48) return code === 36;
    +    if (code < 58) return true;
    +    if (code < 65) return false;
    +    if (code < 91) return true;
    +    if (code < 97) return code === 95;
    +    if (code < 123) return true;
    +    return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
    +};
    +
    +
    +/***/ }),
    +/* 2 */
    +/***/ (function(module, exports) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function mergeOpts(allOptions, targetType) {
    +    var finalOpts = {};
    +    var name;
    +
    +    for (name in allOptions) {
    +        if (name !== targetType) {
    +            finalOpts[name] = allOptions[name];
    +        }
    +    }
    +
    +    //merge in the per type settings for the targetType
    +    if (targetType in allOptions) {
    +        for (name in allOptions[targetType]) {
    +            finalOpts[name] = allOptions[targetType][name];
    +        }
    +    }
    +    return finalOpts;
    +}
    +
    +module.exports.mergeOpts = mergeOpts;
    +
    +
    +/***/ }),
    +/* 3 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 Beautifier = __webpack_require__(0).Beautifier;
    +
    +function style_html(html_source, options, js_beautify, css_beautify) {
    +    var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify);
    +    return beautifier.beautify();
    +}
    +
    +module.exports = style_html;
    +
    +/***/ })
    +/******/ ]);
    +var style_html = legacy_beautify_html;
    +/* Footer */
    +if (typeof define === "function" && define.amd) {
    +    // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- )
    +    define(["require", "./beautify", "./beautify-css"], function(requireamd) {
    +        var js_beautify = requireamd("./beautify");
    +        var css_beautify = requireamd("./beautify-css");
    +
    +        return {
    +            html_beautify: function(html_source, options) {
    +                return style_html(html_source, options, js_beautify.js_beautify, css_beautify.css_beautify);
    +            }
    +        };
    +    });
    +} else if (typeof exports !== "undefined") {
    +    // Add support for CommonJS. Just put this file somewhere on your require.paths
    +    // and you will be able to `var html_beautify = require("beautify").html_beautify`.
    +    var js_beautify = require('./beautify.js');
    +    var css_beautify = require('./beautify-css.js');
    +
    +    exports.html_beautify = function(html_source, options) {
    +        return style_html(html_source, options, js_beautify.js_beautify, css_beautify.css_beautify);
    +    };
    +} else if (typeof window !== "undefined") {
    +    // If we're running a web page and don't have either of the above, add our one global
    +    window.html_beautify = function(html_source, options) {
    +        return style_html(html_source, options, window.js_beautify, window.css_beautify);
    +    };
    +} else if (typeof global !== "undefined") {
    +    // If we don't even have window, try global.
    +    global.html_beautify = function(html_source, options) {
    +        return style_html(html_source, options, global.js_beautify, global.css_beautify);
    +    };
    +}
    +
    +}());
    diff --git a/node_modules/js-beautify/js/lib/beautify.js b/node_modules/js-beautify/js/lib/beautify.js
    new file mode 100644
    index 0000000..59843e2
    --- /dev/null
    +++ b/node_modules/js-beautify/js/lib/beautify.js
    @@ -0,0 +1,2827 @@
    +/*jshint curly:false, eqeqeq:true, laxbreak:true, noempty:false */
    +/* AUTO-GENERATED. DO NOT MODIFY. */
    +/* see js/src/javascript/index.js */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +
    + JS Beautifier
    +---------------
    +
    +
    +  Written by Einar Lielmanis, 
    +      http://jsbeautifier.org/
    +
    +  Originally converted to javascript by Vital, 
    +  "End braces on own line" added by Chris J. Shull, 
    +  Parsing improvements for brace-less statements by Liam Newman 
    +
    +
    +  Usage:
    +    js_beautify(js_source_text);
    +    js_beautify(js_source_text, options);
    +
    +  The options are:
    +    indent_size (default 4)          - indentation size,
    +    indent_char (default space)      - character to indent with,
    +    preserve_newlines (default true) - whether existing line breaks should be preserved,
    +    max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk,
    +
    +    jslint_happy (default false) - if true, then jslint-stricter mode is enforced.
    +
    +            jslint_happy        !jslint_happy
    +            ---------------------------------
    +            function ()         function()
    +
    +            switch () {         switch() {
    +            case 1:               case 1:
    +              break;                break;
    +            }                   }
    +
    +    space_after_anon_function (default false) - should the space before an anonymous function's parens be added, "function()" vs "function ()",
    +          NOTE: This option is overriden by jslint_happy (i.e. if jslint_happy is true, space_after_anon_function is true by design)
    +
    +    brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none" | any of the former + ",preserve-inline"
    +            put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.
    +            preserve-inline will try to preserve inline blocks of curly braces
    +
    +    space_before_conditional (default true) - should the space before conditional statement be added, "if(true)" vs "if (true)",
    +
    +    unescape_strings (default false) - should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65"
    +
    +    wrap_line_length (default unlimited) - lines should wrap at next opportunity after this number of characters.
    +          NOTE: This is not a hard limit. Lines will continue until a point where a newline would
    +                be preserved if it were present.
    +
    +    end_with_newline (default false)  - end output with a newline
    +
    +
    +    e.g
    +
    +    js_beautify(js_source_text, {
    +      'indent_size': 1,
    +      'indent_char': '\t'
    +    });
    +
    +*/
    +
    +(function() {
    +var legacy_beautify_js =
    +/******/ (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] = {
    +/******/ 			i: moduleId,
    +/******/ 			l: false,
    +/******/ 			exports: {}
    +/******/ 		};
    +/******/
    +/******/ 		// Execute the module function
    +/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
    +/******/
    +/******/ 		// Flag the module as loaded
    +/******/ 		module.l = 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;
    +/******/
    +/******/ 	// identity function for calling harmony imports with the correct context
    +/******/ 	__webpack_require__.i = function(value) { return value; };
    +/******/
    +/******/ 	// define getter function for harmony exports
    +/******/ 	__webpack_require__.d = function(exports, name, getter) {
    +/******/ 		if(!__webpack_require__.o(exports, name)) {
    +/******/ 			Object.defineProperty(exports, name, {
    +/******/ 				configurable: false,
    +/******/ 				enumerable: true,
    +/******/ 				get: getter
    +/******/ 			});
    +/******/ 		}
    +/******/ 	};
    +/******/
    +/******/ 	// getDefaultExport function for compatibility with non-harmony modules
    +/******/ 	__webpack_require__.n = function(module) {
    +/******/ 		var getter = module && module.__esModule ?
    +/******/ 			function getDefault() { return module['default']; } :
    +/******/ 			function getModuleExports() { return module; };
    +/******/ 		__webpack_require__.d(getter, 'a', getter);
    +/******/ 		return getter;
    +/******/ 	};
    +/******/
    +/******/ 	// Object.prototype.hasOwnProperty.call
    +/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
    +/******/
    +/******/ 	// __webpack_public_path__
    +/******/ 	__webpack_require__.p = "";
    +/******/
    +/******/ 	// Load entry module and return exports
    +/******/ 	return __webpack_require__(__webpack_require__.s = 6);
    +/******/ })
    +/************************************************************************/
    +/******/ ([
    +/* 0 */
    +/***/ (function(module, exports) {
    +
    +/* jshint curly: false */
    +// This section of code is taken from acorn.
    +//
    +// Acorn was written by Marijn Haverbeke and released under an MIT
    +// license. The Unicode regexps (for identifiers and whitespace) were
    +// taken from [Esprima](http://esprima.org) by Ariya Hidayat.
    +//
    +// Git repositories for Acorn are available at
    +//
    +//     http://marijnhaverbeke.nl/git/acorn
    +//     https://github.com/marijnh/acorn.git
    +
    +// ## Character categories
    +
    +// Big ugly regular expressions that match characters in the
    +// whitespace, identifier, and identifier-start categories. These
    +// are only applied when a character is found to actually have a
    +// code point above 128.
    +
    +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line
    +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\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\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
    +var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
    +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
    +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
    +
    +// Whether a single character denotes a newline.
    +
    +exports.newline = /[\n\r\u2028\u2029]/;
    +
    +// Matches a whole line break (where CRLF is considered a single
    +// line break). Used to count lines.
    +
    +// in javascript, these two differ
    +// in python they are the same, different methods are called on them
    +exports.lineBreak = new RegExp('\r\n|' + exports.newline.source);
    +exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');
    +
    +
    +// Test whether a given character code starts an identifier.
    +
    +exports.isIdentifierStart = function(code) {
    +    // permit $ (36) and @ (64). @ is used in ES7 decorators.
    +    if (code < 65) return code === 36 || code === 64;
    +    // 65 through 91 are uppercase letters.
    +    if (code < 91) return true;
    +    // permit _ (95).
    +    if (code < 97) return code === 95;
    +    // 97 through 123 are lowercase letters.
    +    if (code < 123) return true;
    +    return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
    +};
    +
    +// Test whether a given character is part of an identifier.
    +
    +exports.isIdentifierChar = function(code) {
    +    if (code < 48) return code === 36;
    +    if (code < 58) return true;
    +    if (code < 65) return false;
    +    if (code < 91) return true;
    +    if (code < 97) return code === 95;
    +    if (code < 123) return true;
    +    return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
    +};
    +
    +
    +/***/ }),
    +/* 1 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 mergeOpts = __webpack_require__(3).mergeOpts;
    +var acorn = __webpack_require__(0);
    +var Output = __webpack_require__(4).Output;
    +var Tokenizer = __webpack_require__(7).Tokenizer;
    +
    +function remove_redundant_indentation(output, frame) {
    +    // This implementation is effective but has some issues:
    +    //     - can cause line wrap to happen too soon due to indent removal
    +    //           after wrap points are calculated
    +    // These issues are minor compared to ugly indentation.
    +
    +    if (frame.multiline_frame ||
    +        frame.mode === MODE.ForInitializer ||
    +        frame.mode === MODE.Conditional) {
    +        return;
    +    }
    +
    +    // remove one indent from each line inside this section
    +    var start_index = frame.start_line_index;
    +
    +    output.remove_indent(start_index);
    +}
    +
    +function in_array(what, arr) {
    +    for (var i = 0; i < arr.length; i += 1) {
    +        if (arr[i] === what) {
    +            return true;
    +        }
    +    }
    +    return false;
    +}
    +
    +function trim(s) {
    +    return s.replace(/^\s+|\s+$/g, '');
    +}
    +
    +function ltrim(s) {
    +    return s.replace(/^\s+/g, '');
    +}
    +
    +// function rtrim(s) {
    +//     return s.replace(/\s+$/g, '');
    +// }
    +
    +
    +function generateMapFromStrings(list) {
    +    var result = {};
    +    for (var x = 0; x < list.length; x++) {
    +        // make the mapped names underscored instead of dash
    +        result[list[x].replace(/-/g, '_')] = list[x];
    +    }
    +    return result;
    +}
    +
    +function sanitizeOperatorPosition(opPosition) {
    +    opPosition = opPosition || OPERATOR_POSITION.before_newline;
    +
    +    if (!in_array(opPosition, validPositionValues)) {
    +        throw new Error("Invalid Option Value: The option 'operator_position' must be one of the following values\n" +
    +            validPositionValues +
    +            "\nYou passed in: '" + opPosition + "'");
    +    }
    +
    +    return opPosition;
    +}
    +
    +var validPositionValues = ['before-newline', 'after-newline', 'preserve-newline'];
    +
    +// Generate map from array
    +var OPERATOR_POSITION = generateMapFromStrings(validPositionValues);
    +
    +var OPERATOR_POSITION_BEFORE_OR_PRESERVE = [OPERATOR_POSITION.before_newline, OPERATOR_POSITION.preserve_newline];
    +
    +var MODE = {
    +    BlockStatement: 'BlockStatement', // 'BLOCK'
    +    Statement: 'Statement', // 'STATEMENT'
    +    ObjectLiteral: 'ObjectLiteral', // 'OBJECT',
    +    ArrayLiteral: 'ArrayLiteral', //'[EXPRESSION]',
    +    ForInitializer: 'ForInitializer', //'(FOR-EXPRESSION)',
    +    Conditional: 'Conditional', //'(COND-EXPRESSION)',
    +    Expression: 'Expression' //'(EXPRESSION)'
    +};
    +
    +function Beautifier(js_source_text, options) {
    +    "use strict";
    +    var output;
    +    var tokens = [],
    +        token_pos;
    +    var tokenizer;
    +    var current_token;
    +    var last_type, last_last_text, indent_string;
    +    var flags, previous_flags, flag_store;
    +    var prefix;
    +
    +    var handlers, opt;
    +    var baseIndentString = '';
    +
    +    handlers = {
    +        'TK_START_EXPR': handle_start_expr,
    +        'TK_END_EXPR': handle_end_expr,
    +        'TK_START_BLOCK': handle_start_block,
    +        'TK_END_BLOCK': handle_end_block,
    +        'TK_WORD': handle_word,
    +        'TK_RESERVED': handle_word,
    +        'TK_SEMICOLON': handle_semicolon,
    +        'TK_STRING': handle_string,
    +        'TK_EQUALS': handle_equals,
    +        'TK_OPERATOR': handle_operator,
    +        'TK_COMMA': handle_comma,
    +        'TK_BLOCK_COMMENT': handle_block_comment,
    +        'TK_COMMENT': handle_comment,
    +        'TK_DOT': handle_dot,
    +        'TK_UNKNOWN': handle_unknown,
    +        'TK_EOF': handle_eof
    +    };
    +
    +    function create_flags(flags_base, mode) {
    +        var next_indent_level = 0;
    +        if (flags_base) {
    +            next_indent_level = flags_base.indentation_level;
    +            if (!output.just_added_newline() &&
    +                flags_base.line_indent_level > next_indent_level) {
    +                next_indent_level = flags_base.line_indent_level;
    +            }
    +        }
    +
    +        var next_flags = {
    +            mode: mode,
    +            parent: flags_base,
    +            last_text: flags_base ? flags_base.last_text : '', // last token text
    +            last_word: flags_base ? flags_base.last_word : '', // last 'TK_WORD' passed
    +            declaration_statement: false,
    +            declaration_assignment: false,
    +            multiline_frame: false,
    +            inline_frame: false,
    +            if_block: false,
    +            else_block: false,
    +            do_block: false,
    +            do_while: false,
    +            import_block: false,
    +            in_case_statement: false, // switch(..){ INSIDE HERE }
    +            in_case: false, // we're on the exact line with "case 0:"
    +            case_body: false, // the indented case-action block
    +            indentation_level: next_indent_level,
    +            line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level,
    +            start_line_index: output.get_line_number(),
    +            ternary_depth: 0
    +        };
    +        return next_flags;
    +    }
    +
    +    // Some interpreters have unexpected results with foo = baz || bar;
    +    options = options ? options : {};
    +
    +    // Allow the setting of language/file-type specific options
    +    // with inheritance of overall settings
    +    options = mergeOpts(options, 'js');
    +
    +    opt = {};
    +
    +    // compatibility, re
    +    if (options.brace_style === "expand-strict") { //graceful handling of deprecated option
    +        options.brace_style = "expand";
    +    } else if (options.brace_style === "collapse-preserve-inline") { //graceful handling of deprecated option
    +        options.brace_style = "collapse,preserve-inline";
    +    } else if (options.braces_on_own_line !== undefined) { //graceful handling of deprecated option
    +        options.brace_style = options.braces_on_own_line ? "expand" : "collapse";
    +    } else if (!options.brace_style) { //Nothing exists to set it
    +        options.brace_style = "collapse";
    +    }
    +
    +    //preserve-inline in delimited string will trigger brace_preserve_inline, everything
    +    //else is considered a brace_style and the last one only will have an effect
    +    var brace_style_split = options.brace_style.split(/[^a-zA-Z0-9_\-]+/);
    +    opt.brace_preserve_inline = false; //Defaults in case one or other was not specified in meta-option
    +    opt.brace_style = "collapse";
    +    for (var bs = 0; bs < brace_style_split.length; bs++) {
    +        if (brace_style_split[bs] === "preserve-inline") {
    +            opt.brace_preserve_inline = true;
    +        } else {
    +            opt.brace_style = brace_style_split[bs];
    +        }
    +    }
    +
    +    opt.indent_size = options.indent_size ? parseInt(options.indent_size, 10) : 4;
    +    opt.indent_char = options.indent_char ? options.indent_char : ' ';
    +    opt.eol = options.eol ? options.eol : 'auto';
    +    opt.preserve_newlines = (options.preserve_newlines === undefined) ? true : options.preserve_newlines;
    +    opt.unindent_chained_methods = (options.unindent_chained_methods === undefined) ? false : options.unindent_chained_methods;
    +    opt.break_chained_methods = (options.break_chained_methods === undefined) ? false : options.break_chained_methods;
    +    opt.max_preserve_newlines = (options.max_preserve_newlines === undefined) ? 0 : parseInt(options.max_preserve_newlines, 10);
    +    opt.space_in_paren = (options.space_in_paren === undefined) ? false : options.space_in_paren;
    +    opt.space_in_empty_paren = (options.space_in_empty_paren === undefined) ? false : options.space_in_empty_paren;
    +    opt.jslint_happy = (options.jslint_happy === undefined) ? false : options.jslint_happy;
    +    opt.space_after_anon_function = (options.space_after_anon_function === undefined) ? false : options.space_after_anon_function;
    +    opt.keep_array_indentation = (options.keep_array_indentation === undefined) ? false : options.keep_array_indentation;
    +    opt.space_before_conditional = (options.space_before_conditional === undefined) ? true : options.space_before_conditional;
    +    opt.unescape_strings = (options.unescape_strings === undefined) ? false : options.unescape_strings;
    +    opt.wrap_line_length = (options.wrap_line_length === undefined) ? 0 : parseInt(options.wrap_line_length, 10);
    +    opt.e4x = (options.e4x === undefined) ? false : options.e4x;
    +    opt.end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline;
    +    opt.comma_first = (options.comma_first === undefined) ? false : options.comma_first;
    +    opt.operator_position = sanitizeOperatorPosition(options.operator_position);
    +
    +    // For testing of beautify ignore:start directive
    +    opt.test_output_raw = (options.test_output_raw === undefined) ? false : options.test_output_raw;
    +
    +    // force opt.space_after_anon_function to true if opt.jslint_happy
    +    if (opt.jslint_happy) {
    +        opt.space_after_anon_function = true;
    +    }
    +
    +    if (options.indent_with_tabs) {
    +        opt.indent_char = '\t';
    +        opt.indent_size = 1;
    +    }
    +
    +    if (opt.eol === 'auto') {
    +        opt.eol = '\n';
    +        if (js_source_text && acorn.lineBreak.test(js_source_text || '')) {
    +            opt.eol = js_source_text.match(acorn.lineBreak)[0];
    +        }
    +    }
    +
    +    opt.eol = opt.eol.replace(/\\r/, '\r').replace(/\\n/, '\n');
    +
    +    //----------------------------------
    +    indent_string = '';
    +    while (opt.indent_size > 0) {
    +        indent_string += opt.indent_char;
    +        opt.indent_size -= 1;
    +    }
    +
    +    var preindent_index = 0;
    +    if (js_source_text && js_source_text.length) {
    +        while ((js_source_text.charAt(preindent_index) === ' ' ||
    +                js_source_text.charAt(preindent_index) === '\t')) {
    +            preindent_index += 1;
    +        }
    +        baseIndentString = js_source_text.substring(0, preindent_index);
    +        js_source_text = js_source_text.substring(preindent_index);
    +    }
    +
    +    last_type = 'TK_START_BLOCK'; // last token type
    +    last_last_text = ''; // pre-last token text
    +    output = new Output(indent_string, baseIndentString);
    +
    +    // If testing the ignore directive, start with output disable set to true
    +    output.raw = opt.test_output_raw;
    +
    +
    +    // Stack of parsing/formatting states, including MODE.
    +    // We tokenize, parse, and output in an almost purely a forward-only stream of token input
    +    // and formatted output.  This makes the beautifier less accurate than full parsers
    +    // but also far more tolerant of syntax errors.
    +    //
    +    // For example, the default mode is MODE.BlockStatement. If we see a '{' we push a new frame of type
    +    // MODE.BlockStatement on the the stack, even though it could be object literal.  If we later
    +    // encounter a ":", we'll switch to to MODE.ObjectLiteral.  If we then see a ";",
    +    // most full parsers would die, but the beautifier gracefully falls back to
    +    // MODE.BlockStatement and continues on.
    +    flag_store = [];
    +    set_mode(MODE.BlockStatement);
    +
    +    this.beautify = function() {
    +
    +        /*jshint onevar:true */
    +        var sweet_code;
    +        tokenizer = new Tokenizer(js_source_text, opt, indent_string);
    +        tokens = tokenizer.tokenize();
    +        token_pos = 0;
    +
    +        current_token = get_token();
    +        while (current_token) {
    +            handlers[current_token.type]();
    +
    +            last_last_text = flags.last_text;
    +            last_type = current_token.type;
    +            flags.last_text = current_token.text;
    +
    +            token_pos += 1;
    +            current_token = get_token();
    +        }
    +
    +        sweet_code = output.get_code(opt.end_with_newline, opt.eol);
    +
    +        return sweet_code;
    +    };
    +
    +    function handle_whitespace_and_comments(local_token, preserve_statement_flags) {
    +        var newlines = local_token.newlines;
    +        var keep_whitespace = opt.keep_array_indentation && is_array(flags.mode);
    +        var temp_token = current_token;
    +
    +        for (var h = 0; h < local_token.comments_before.length; h++) {
    +            // The cleanest handling of inline comments is to treat them as though they aren't there.
    +            // Just continue formatting and the behavior should be logical.
    +            // Also ignore unknown tokens.  Again, this should result in better behavior.
    +            current_token = local_token.comments_before[h];
    +            handle_whitespace_and_comments(current_token, preserve_statement_flags);
    +            handlers[current_token.type](preserve_statement_flags);
    +        }
    +        current_token = temp_token;
    +
    +        if (keep_whitespace) {
    +            for (var i = 0; i < newlines; i += 1) {
    +                print_newline(i > 0, preserve_statement_flags);
    +            }
    +        } else {
    +            if (opt.max_preserve_newlines && newlines > opt.max_preserve_newlines) {
    +                newlines = opt.max_preserve_newlines;
    +            }
    +
    +            if (opt.preserve_newlines) {
    +                if (local_token.newlines > 1) {
    +                    print_newline(false, preserve_statement_flags);
    +                    for (var j = 1; j < newlines; j += 1) {
    +                        print_newline(true, preserve_statement_flags);
    +                    }
    +                }
    +            }
    +        }
    +
    +    }
    +
    +    // we could use just string.split, but
    +    // IE doesn't like returning empty strings
    +    function split_linebreaks(s) {
    +        //return s.split(/\x0d\x0a|\x0a/);
    +
    +        s = s.replace(acorn.allLineBreaks, '\n');
    +        var out = [],
    +            idx = s.indexOf("\n");
    +        while (idx !== -1) {
    +            out.push(s.substring(0, idx));
    +            s = s.substring(idx + 1);
    +            idx = s.indexOf("\n");
    +        }
    +        if (s.length) {
    +            out.push(s);
    +        }
    +        return out;
    +    }
    +
    +    var newline_restricted_tokens = ['break', 'continue', 'return', 'throw', 'yield'];
    +
    +    function allow_wrap_or_preserved_newline(force_linewrap) {
    +        force_linewrap = (force_linewrap === undefined) ? false : force_linewrap;
    +
    +        // Never wrap the first token on a line
    +        if (output.just_added_newline()) {
    +            return;
    +        }
    +
    +        var shouldPreserveOrForce = (opt.preserve_newlines && current_token.wanted_newline) || force_linewrap;
    +        var operatorLogicApplies = in_array(flags.last_text, tokenizer.positionable_operators) || in_array(current_token.text, tokenizer.positionable_operators);
    +
    +        if (operatorLogicApplies) {
    +            var shouldPrintOperatorNewline = (
    +                    in_array(flags.last_text, tokenizer.positionable_operators) &&
    +                    in_array(opt.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)
    +                ) ||
    +                in_array(current_token.text, tokenizer.positionable_operators);
    +            shouldPreserveOrForce = shouldPreserveOrForce && shouldPrintOperatorNewline;
    +        }
    +
    +        if (shouldPreserveOrForce) {
    +            print_newline(false, true);
    +        } else if (opt.wrap_line_length) {
    +            if (last_type === 'TK_RESERVED' && in_array(flags.last_text, newline_restricted_tokens)) {
    +                // These tokens should never have a newline inserted
    +                // between them and the following expression.
    +                return;
    +            }
    +            var proposed_line_length = output.current_line.get_character_count() + current_token.text.length +
    +                (output.space_before_token ? 1 : 0);
    +            if (proposed_line_length >= opt.wrap_line_length) {
    +                print_newline(false, true);
    +            }
    +        }
    +    }
    +
    +    function print_newline(force_newline, preserve_statement_flags) {
    +        if (!preserve_statement_flags) {
    +            if (flags.last_text !== ';' && flags.last_text !== ',' && flags.last_text !== '=' && last_type !== 'TK_OPERATOR') {
    +                var next_token = get_token(1);
    +                while (flags.mode === MODE.Statement &&
    +                    !(flags.if_block && next_token && next_token.type === 'TK_RESERVED' && next_token.text === 'else') &&
    +                    !flags.do_block) {
    +                    restore_mode();
    +                }
    +            }
    +        }
    +
    +        if (output.add_new_line(force_newline)) {
    +            flags.multiline_frame = true;
    +        }
    +    }
    +
    +    function print_token_line_indentation() {
    +        if (output.just_added_newline()) {
    +            if (opt.keep_array_indentation && is_array(flags.mode) && current_token.wanted_newline) {
    +                output.current_line.push(current_token.whitespace_before);
    +                output.space_before_token = false;
    +            } else if (output.set_indent(flags.indentation_level)) {
    +                flags.line_indent_level = flags.indentation_level;
    +            }
    +        }
    +    }
    +
    +    function print_token(printable_token) {
    +        if (output.raw) {
    +            output.add_raw_token(current_token);
    +            return;
    +        }
    +
    +        if (opt.comma_first && last_type === 'TK_COMMA' &&
    +            output.just_added_newline()) {
    +            if (output.previous_line.last() === ',') {
    +                var popped = output.previous_line.pop();
    +                // if the comma was already at the start of the line,
    +                // pull back onto that line and reprint the indentation
    +                if (output.previous_line.is_empty()) {
    +                    output.previous_line.push(popped);
    +                    output.trim(true);
    +                    output.current_line.pop();
    +                    output.trim();
    +                }
    +
    +                // add the comma in front of the next token
    +                print_token_line_indentation();
    +                output.add_token(',');
    +                output.space_before_token = true;
    +            }
    +        }
    +
    +        printable_token = printable_token || current_token.text;
    +        print_token_line_indentation();
    +        output.add_token(printable_token);
    +    }
    +
    +    function indent() {
    +        flags.indentation_level += 1;
    +    }
    +
    +    function deindent() {
    +        if (flags.indentation_level > 0 &&
    +            ((!flags.parent) || flags.indentation_level > flags.parent.indentation_level)) {
    +            flags.indentation_level -= 1;
    +
    +        }
    +    }
    +
    +    function set_mode(mode) {
    +        if (flags) {
    +            flag_store.push(flags);
    +            previous_flags = flags;
    +        } else {
    +            previous_flags = create_flags(null, mode);
    +        }
    +
    +        flags = create_flags(previous_flags, mode);
    +    }
    +
    +    function is_array(mode) {
    +        return mode === MODE.ArrayLiteral;
    +    }
    +
    +    function is_expression(mode) {
    +        return in_array(mode, [MODE.Expression, MODE.ForInitializer, MODE.Conditional]);
    +    }
    +
    +    function restore_mode() {
    +        if (flag_store.length > 0) {
    +            previous_flags = flags;
    +            flags = flag_store.pop();
    +            if (previous_flags.mode === MODE.Statement && !opt.unindent_chained_methods) {
    +                remove_redundant_indentation(output, previous_flags);
    +            }
    +        }
    +    }
    +
    +    function start_of_object_property() {
    +        return flags.parent.mode === MODE.ObjectLiteral && flags.mode === MODE.Statement && (
    +            (flags.last_text === ':' && flags.ternary_depth === 0) || (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set'])));
    +    }
    +
    +    function start_of_statement() {
    +        if (
    +            (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const']) && current_token.type === 'TK_WORD') ||
    +            (last_type === 'TK_RESERVED' && flags.last_text === 'do') ||
    +            (last_type === 'TK_RESERVED' && in_array(flags.last_text, newline_restricted_tokens) && !current_token.wanted_newline) ||
    +            (last_type === 'TK_RESERVED' && flags.last_text === 'else' &&
    +                !(current_token.type === 'TK_RESERVED' && current_token.text === 'if' && !current_token.comments_before.length)) ||
    +            (last_type === 'TK_END_EXPR' && (previous_flags.mode === MODE.ForInitializer || previous_flags.mode === MODE.Conditional)) ||
    +            (last_type === 'TK_WORD' && flags.mode === MODE.BlockStatement &&
    +                !flags.in_case &&
    +                !(current_token.text === '--' || current_token.text === '++') &&
    +                last_last_text !== 'function' &&
    +                current_token.type !== 'TK_WORD' && current_token.type !== 'TK_RESERVED') ||
    +            (flags.mode === MODE.ObjectLiteral && (
    +                (flags.last_text === ':' && flags.ternary_depth === 0) || (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set']))))
    +        ) {
    +
    +            set_mode(MODE.Statement);
    +            if (!opt.unindent_chained_methods) {
    +                indent();
    +            }
    +
    +            handle_whitespace_and_comments(current_token, true);
    +
    +            // Issue #276:
    +            // If starting a new statement with [if, for, while, do], push to a new line.
    +            // if (a) if (b) if(c) d(); else e(); else f();
    +            if (!start_of_object_property()) {
    +                allow_wrap_or_preserved_newline(
    +                    current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['do', 'for', 'if', 'while']));
    +            }
    +
    +            return true;
    +        }
    +        return false;
    +    }
    +
    +    function all_lines_start_with(lines, c) {
    +        for (var i = 0; i < lines.length; i++) {
    +            var line = trim(lines[i]);
    +            if (line.charAt(0) !== c) {
    +                return false;
    +            }
    +        }
    +        return true;
    +    }
    +
    +    function each_line_matches_indent(lines, indent) {
    +        var i = 0,
    +            len = lines.length,
    +            line;
    +        for (; i < len; i++) {
    +            line = lines[i];
    +            // allow empty lines to pass through
    +            if (line && line.indexOf(indent) !== 0) {
    +                return false;
    +            }
    +        }
    +        return true;
    +    }
    +
    +    function is_special_word(word) {
    +        return in_array(word, ['case', 'return', 'do', 'if', 'throw', 'else']);
    +    }
    +
    +    function get_token(offset) {
    +        var index = token_pos + (offset || 0);
    +        return (index < 0 || index >= tokens.length) ? null : tokens[index];
    +    }
    +
    +    function handle_start_expr() {
    +        // The conditional starts the statement if appropriate.
    +        if (!start_of_statement()) {
    +            handle_whitespace_and_comments(current_token);
    +        }
    +
    +        var next_mode = MODE.Expression;
    +        if (current_token.text === '[') {
    +
    +            if (last_type === 'TK_WORD' || flags.last_text === ')') {
    +                // this is array index specifier, break immediately
    +                // a[x], fn()[x]
    +                if (last_type === 'TK_RESERVED' && in_array(flags.last_text, tokenizer.line_starters)) {
    +                    output.space_before_token = true;
    +                }
    +                set_mode(next_mode);
    +                print_token();
    +                indent();
    +                if (opt.space_in_paren) {
    +                    output.space_before_token = true;
    +                }
    +                return;
    +            }
    +
    +            next_mode = MODE.ArrayLiteral;
    +            if (is_array(flags.mode)) {
    +                if (flags.last_text === '[' ||
    +                    (flags.last_text === ',' && (last_last_text === ']' || last_last_text === '}'))) {
    +                    // ], [ goes to new line
    +                    // }, [ goes to new line
    +                    if (!opt.keep_array_indentation) {
    +                        print_newline();
    +                    }
    +                }
    +            }
    +
    +        } else {
    +            if (last_type === 'TK_RESERVED' && flags.last_text === 'for') {
    +                next_mode = MODE.ForInitializer;
    +            } else if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['if', 'while'])) {
    +                next_mode = MODE.Conditional;
    +            } else {
    +                // next_mode = MODE.Expression;
    +            }
    +        }
    +
    +        if (flags.last_text === ';' || last_type === 'TK_START_BLOCK') {
    +            print_newline();
    +        } else if (last_type === 'TK_END_EXPR' || last_type === 'TK_START_EXPR' || last_type === 'TK_END_BLOCK' || flags.last_text === '.') {
    +            // TODO: Consider whether forcing this is required.  Review failing tests when removed.
    +            allow_wrap_or_preserved_newline(current_token.wanted_newline);
    +            // do nothing on (( and )( and ][ and ]( and .(
    +        } else if (!(last_type === 'TK_RESERVED' && current_token.text === '(') && last_type !== 'TK_WORD' && last_type !== 'TK_OPERATOR') {
    +            output.space_before_token = true;
    +        } else if ((last_type === 'TK_RESERVED' && (flags.last_word === 'function' || flags.last_word === 'typeof')) ||
    +            (flags.last_text === '*' &&
    +                (in_array(last_last_text, ['function', 'yield']) ||
    +                    (flags.mode === MODE.ObjectLiteral && in_array(last_last_text, ['{', ',']))))) {
    +            // function() vs function ()
    +            // yield*() vs yield* ()
    +            // function*() vs function* ()
    +            if (opt.space_after_anon_function) {
    +                output.space_before_token = true;
    +            }
    +        } else if (last_type === 'TK_RESERVED' && (in_array(flags.last_text, tokenizer.line_starters) || flags.last_text === 'catch')) {
    +            if (opt.space_before_conditional) {
    +                output.space_before_token = true;
    +            }
    +        }
    +
    +        // Should be a space between await and an IIFE, or async and an arrow function
    +        if (current_token.text === '(' && last_type === 'TK_RESERVED' && in_array(flags.last_word, ['await', 'async'])) {
    +            output.space_before_token = true;
    +        }
    +
    +        // Support of this kind of newline preservation.
    +        // a = (b &&
    +        //     (c || d));
    +        if (current_token.text === '(') {
    +            if (last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
    +                if (!start_of_object_property()) {
    +                    allow_wrap_or_preserved_newline();
    +                }
    +            }
    +        }
    +
    +        // Support preserving wrapped arrow function expressions
    +        // a.b('c',
    +        //     () => d.e
    +        // )
    +        if (current_token.text === '(' && last_type !== 'TK_WORD' && last_type !== 'TK_RESERVED') {
    +            allow_wrap_or_preserved_newline();
    +        }
    +
    +        set_mode(next_mode);
    +        print_token();
    +        if (opt.space_in_paren) {
    +            output.space_before_token = true;
    +        }
    +
    +        // In all cases, if we newline while inside an expression it should be indented.
    +        indent();
    +    }
    +
    +    function handle_end_expr() {
    +        // statements inside expressions are not valid syntax, but...
    +        // statements must all be closed when their container closes
    +        while (flags.mode === MODE.Statement) {
    +            restore_mode();
    +        }
    +
    +        handle_whitespace_and_comments(current_token);
    +
    +        if (flags.multiline_frame) {
    +            allow_wrap_or_preserved_newline(current_token.text === ']' && is_array(flags.mode) && !opt.keep_array_indentation);
    +        }
    +
    +        if (opt.space_in_paren) {
    +            if (last_type === 'TK_START_EXPR' && !opt.space_in_empty_paren) {
    +                // () [] no inner space in empty parens like these, ever, ref #320
    +                output.trim();
    +                output.space_before_token = false;
    +            } else {
    +                output.space_before_token = true;
    +            }
    +        }
    +        if (current_token.text === ']' && opt.keep_array_indentation) {
    +            print_token();
    +            restore_mode();
    +        } else {
    +            restore_mode();
    +            print_token();
    +        }
    +        remove_redundant_indentation(output, previous_flags);
    +
    +        // do {} while () // no statement required after
    +        if (flags.do_while && previous_flags.mode === MODE.Conditional) {
    +            previous_flags.mode = MODE.Expression;
    +            flags.do_block = false;
    +            flags.do_while = false;
    +
    +        }
    +    }
    +
    +    function handle_start_block() {
    +        handle_whitespace_and_comments(current_token);
    +
    +        // Check if this is should be treated as a ObjectLiteral
    +        var next_token = get_token(1);
    +        var second_token = get_token(2);
    +        if (second_token && (
    +                (in_array(second_token.text, [':', ',']) && in_array(next_token.type, ['TK_STRING', 'TK_WORD', 'TK_RESERVED'])) ||
    +                (in_array(next_token.text, ['get', 'set', '...']) && in_array(second_token.type, ['TK_WORD', 'TK_RESERVED']))
    +            )) {
    +            // We don't support TypeScript,but we didn't break it for a very long time.
    +            // We'll try to keep not breaking it.
    +            if (!in_array(last_last_text, ['class', 'interface'])) {
    +                set_mode(MODE.ObjectLiteral);
    +            } else {
    +                set_mode(MODE.BlockStatement);
    +            }
    +        } else if (last_type === 'TK_OPERATOR' && flags.last_text === '=>') {
    +            // arrow function: (param1, paramN) => { statements }
    +            set_mode(MODE.BlockStatement);
    +        } else if (in_array(last_type, ['TK_EQUALS', 'TK_START_EXPR', 'TK_COMMA', 'TK_OPERATOR']) ||
    +            (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['return', 'throw', 'import', 'default']))
    +        ) {
    +            // Detecting shorthand function syntax is difficult by scanning forward,
    +            //     so check the surrounding context.
    +            // If the block is being returned, imported, export default, passed as arg,
    +            //     assigned with = or assigned in a nested object, treat as an ObjectLiteral.
    +            set_mode(MODE.ObjectLiteral);
    +        } else {
    +            set_mode(MODE.BlockStatement);
    +        }
    +
    +        var empty_braces = !next_token.comments_before.length && next_token.text === '}';
    +        var empty_anonymous_function = empty_braces && flags.last_word === 'function' &&
    +            last_type === 'TK_END_EXPR';
    +
    +        if (opt.brace_preserve_inline) // check for inline, set inline_frame if so
    +        {
    +            // search forward for a newline wanted inside this block
    +            var index = 0;
    +            var check_token = null;
    +            flags.inline_frame = true;
    +            do {
    +                index += 1;
    +                check_token = get_token(index);
    +                if (check_token.wanted_newline) {
    +                    flags.inline_frame = false;
    +                    break;
    +                }
    +            } while (check_token.type !== 'TK_EOF' &&
    +                !(check_token.type === 'TK_END_BLOCK' && check_token.opened === current_token));
    +        }
    +
    +        if ((opt.brace_style === "expand" ||
    +                (opt.brace_style === "none" && current_token.wanted_newline)) &&
    +            !flags.inline_frame) {
    +            if (last_type !== 'TK_OPERATOR' &&
    +                (empty_anonymous_function ||
    +                    last_type === 'TK_EQUALS' ||
    +                    (last_type === 'TK_RESERVED' && is_special_word(flags.last_text) && flags.last_text !== 'else'))) {
    +                output.space_before_token = true;
    +            } else {
    +                print_newline(false, true);
    +            }
    +        } else { // collapse || inline_frame
    +            if (is_array(previous_flags.mode) && (last_type === 'TK_START_EXPR' || last_type === 'TK_COMMA')) {
    +                if (last_type === 'TK_COMMA' || opt.space_in_paren) {
    +                    output.space_before_token = true;
    +                }
    +
    +                if (last_type === 'TK_COMMA' || (last_type === 'TK_START_EXPR' && flags.inline_frame)) {
    +                    allow_wrap_or_preserved_newline();
    +                    previous_flags.multiline_frame = previous_flags.multiline_frame || flags.multiline_frame;
    +                    flags.multiline_frame = false;
    +                }
    +            }
    +            if (last_type !== 'TK_OPERATOR' && last_type !== 'TK_START_EXPR') {
    +                if (last_type === 'TK_START_BLOCK' && !flags.inline_frame) {
    +                    print_newline();
    +                } else {
    +                    output.space_before_token = true;
    +                }
    +            }
    +        }
    +        print_token();
    +        indent();
    +    }
    +
    +    function handle_end_block() {
    +        // statements must all be closed when their container closes
    +        handle_whitespace_and_comments(current_token);
    +
    +        while (flags.mode === MODE.Statement) {
    +            restore_mode();
    +        }
    +
    +        var empty_braces = last_type === 'TK_START_BLOCK';
    +
    +        if (flags.inline_frame && !empty_braces) { // try inline_frame (only set if opt.braces-preserve-inline) first
    +            output.space_before_token = true;
    +        } else if (opt.brace_style === "expand") {
    +            if (!empty_braces) {
    +                print_newline();
    +            }
    +        } else {
    +            // skip {}
    +            if (!empty_braces) {
    +                if (is_array(flags.mode) && opt.keep_array_indentation) {
    +                    // we REALLY need a newline here, but newliner would skip that
    +                    opt.keep_array_indentation = false;
    +                    print_newline();
    +                    opt.keep_array_indentation = true;
    +
    +                } else {
    +                    print_newline();
    +                }
    +            }
    +        }
    +        restore_mode();
    +        print_token();
    +    }
    +
    +    function handle_word() {
    +        if (current_token.type === 'TK_RESERVED') {
    +            if (in_array(current_token.text, ['set', 'get']) && flags.mode !== MODE.ObjectLiteral) {
    +                current_token.type = 'TK_WORD';
    +            } else if (in_array(current_token.text, ['as', 'from']) && !flags.import_block) {
    +                current_token.type = 'TK_WORD';
    +            } else if (flags.mode === MODE.ObjectLiteral) {
    +                var next_token = get_token(1);
    +                if (next_token.text === ':') {
    +                    current_token.type = 'TK_WORD';
    +                }
    +            }
    +        }
    +
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +            if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const']) && current_token.type === 'TK_WORD') {
    +                flags.declaration_statement = true;
    +            }
    +        } else if (current_token.wanted_newline && !is_expression(flags.mode) &&
    +            (last_type !== 'TK_OPERATOR' || (flags.last_text === '--' || flags.last_text === '++')) &&
    +            last_type !== 'TK_EQUALS' &&
    +            (opt.preserve_newlines || !(last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const', 'set', 'get'])))) {
    +            handle_whitespace_and_comments(current_token);
    +            print_newline();
    +        } else {
    +            handle_whitespace_and_comments(current_token);
    +        }
    +
    +        if (flags.do_block && !flags.do_while) {
    +            if (current_token.type === 'TK_RESERVED' && current_token.text === 'while') {
    +                // do {} ## while ()
    +                output.space_before_token = true;
    +                print_token();
    +                output.space_before_token = true;
    +                flags.do_while = true;
    +                return;
    +            } else {
    +                // do {} should always have while as the next word.
    +                // if we don't see the expected while, recover
    +                print_newline();
    +                flags.do_block = false;
    +            }
    +        }
    +
    +        // if may be followed by else, or not
    +        // Bare/inline ifs are tricky
    +        // Need to unwind the modes correctly: if (a) if (b) c(); else d(); else e();
    +        if (flags.if_block) {
    +            if (!flags.else_block && (current_token.type === 'TK_RESERVED' && current_token.text === 'else')) {
    +                flags.else_block = true;
    +            } else {
    +                while (flags.mode === MODE.Statement) {
    +                    restore_mode();
    +                }
    +                flags.if_block = false;
    +                flags.else_block = false;
    +            }
    +        }
    +
    +        if (current_token.type === 'TK_RESERVED' && (current_token.text === 'case' || (current_token.text === 'default' && flags.in_case_statement))) {
    +            print_newline();
    +            if (flags.case_body || opt.jslint_happy) {
    +                // switch cases following one another
    +                deindent();
    +                flags.case_body = false;
    +            }
    +            print_token();
    +            flags.in_case = true;
    +            flags.in_case_statement = true;
    +            return;
    +        }
    +
    +        if (last_type === 'TK_COMMA' || last_type === 'TK_START_EXPR' || last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
    +            if (!start_of_object_property()) {
    +                allow_wrap_or_preserved_newline();
    +            }
    +        }
    +
    +        if (current_token.type === 'TK_RESERVED' && current_token.text === 'function') {
    +            if (in_array(flags.last_text, ['}', ';']) ||
    +                (output.just_added_newline() && !(in_array(flags.last_text, ['(', '[', '{', ':', '=', ',']) || last_type === 'TK_OPERATOR'))) {
    +                // make sure there is a nice clean space of at least one blank line
    +                // before a new function definition
    +                if (!output.just_added_blankline() && !current_token.comments_before.length) {
    +                    print_newline();
    +                    print_newline(true);
    +                }
    +            }
    +            if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD') {
    +                if (last_type === 'TK_RESERVED' && (
    +                        in_array(flags.last_text, ['get', 'set', 'new', 'export', 'async']) ||
    +                        in_array(flags.last_text, newline_restricted_tokens))) {
    +                    output.space_before_token = true;
    +                } else if (last_type === 'TK_RESERVED' && flags.last_text === 'default' && last_last_text === 'export') {
    +                    output.space_before_token = true;
    +                } else {
    +                    print_newline();
    +                }
    +            } else if (last_type === 'TK_OPERATOR' || flags.last_text === '=') {
    +                // foo = function
    +                output.space_before_token = true;
    +            } else if (!flags.multiline_frame && (is_expression(flags.mode) || is_array(flags.mode))) {
    +                // (function
    +            } else {
    +                print_newline();
    +            }
    +
    +            print_token();
    +            flags.last_word = current_token.text;
    +            return;
    +        }
    +
    +        prefix = 'NONE';
    +
    +        if (last_type === 'TK_END_BLOCK') {
    +
    +            if (previous_flags.inline_frame) {
    +                prefix = 'SPACE';
    +            } else if (!(current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['else', 'catch', 'finally', 'from']))) {
    +                prefix = 'NEWLINE';
    +            } else {
    +                if (opt.brace_style === "expand" ||
    +                    opt.brace_style === "end-expand" ||
    +                    (opt.brace_style === "none" && current_token.wanted_newline)) {
    +                    prefix = 'NEWLINE';
    +                } else {
    +                    prefix = 'SPACE';
    +                    output.space_before_token = true;
    +                }
    +            }
    +        } else if (last_type === 'TK_SEMICOLON' && flags.mode === MODE.BlockStatement) {
    +            // TODO: Should this be for STATEMENT as well?
    +            prefix = 'NEWLINE';
    +        } else if (last_type === 'TK_SEMICOLON' && is_expression(flags.mode)) {
    +            prefix = 'SPACE';
    +        } else if (last_type === 'TK_STRING') {
    +            prefix = 'NEWLINE';
    +        } else if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD' ||
    +            (flags.last_text === '*' &&
    +                (in_array(last_last_text, ['function', 'yield']) ||
    +                    (flags.mode === MODE.ObjectLiteral && in_array(last_last_text, ['{', ',']))))) {
    +            prefix = 'SPACE';
    +        } else if (last_type === 'TK_START_BLOCK') {
    +            if (flags.inline_frame) {
    +                prefix = 'SPACE';
    +            } else {
    +                prefix = 'NEWLINE';
    +            }
    +        } else if (last_type === 'TK_END_EXPR') {
    +            output.space_before_token = true;
    +            prefix = 'NEWLINE';
    +        }
    +
    +        if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, tokenizer.line_starters) && flags.last_text !== ')') {
    +            if (flags.inline_frame || flags.last_text === 'else' || flags.last_text === 'export') {
    +                prefix = 'SPACE';
    +            } else {
    +                prefix = 'NEWLINE';
    +            }
    +
    +        }
    +
    +        if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['else', 'catch', 'finally'])) {
    +            if ((!(last_type === 'TK_END_BLOCK' && previous_flags.mode === MODE.BlockStatement) ||
    +                    opt.brace_style === "expand" ||
    +                    opt.brace_style === "end-expand" ||
    +                    (opt.brace_style === "none" && current_token.wanted_newline)) &&
    +                !flags.inline_frame) {
    +                print_newline();
    +            } else {
    +                output.trim(true);
    +                var line = output.current_line;
    +                // If we trimmed and there's something other than a close block before us
    +                // put a newline back in.  Handles '} // comment' scenario.
    +                if (line.last() !== '}') {
    +                    print_newline();
    +                }
    +                output.space_before_token = true;
    +            }
    +        } else if (prefix === 'NEWLINE') {
    +            if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
    +                // no newline between 'return nnn'
    +                output.space_before_token = true;
    +            } else if (last_type !== 'TK_END_EXPR') {
    +                if ((last_type !== 'TK_START_EXPR' || !(current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['var', 'let', 'const']))) && flags.last_text !== ':') {
    +                    // no need to force newline on 'var': for (var x = 0...)
    +                    if (current_token.type === 'TK_RESERVED' && current_token.text === 'if' && flags.last_text === 'else') {
    +                        // no newline for } else if {
    +                        output.space_before_token = true;
    +                    } else {
    +                        print_newline();
    +                    }
    +                }
    +            } else if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, tokenizer.line_starters) && flags.last_text !== ')') {
    +                print_newline();
    +            }
    +        } else if (flags.multiline_frame && is_array(flags.mode) && flags.last_text === ',' && last_last_text === '}') {
    +            print_newline(); // }, in lists get a newline treatment
    +        } else if (prefix === 'SPACE') {
    +            output.space_before_token = true;
    +        }
    +        print_token();
    +        flags.last_word = current_token.text;
    +
    +        if (current_token.type === 'TK_RESERVED') {
    +            if (current_token.text === 'do') {
    +                flags.do_block = true;
    +            } else if (current_token.text === 'if') {
    +                flags.if_block = true;
    +            } else if (current_token.text === 'import') {
    +                flags.import_block = true;
    +            } else if (flags.import_block && current_token.type === 'TK_RESERVED' && current_token.text === 'from') {
    +                flags.import_block = false;
    +            }
    +        }
    +    }
    +
    +    function handle_semicolon() {
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +            // Semicolon can be the start (and end) of a statement
    +            output.space_before_token = false;
    +        } else {
    +            handle_whitespace_and_comments(current_token);
    +        }
    +
    +        var next_token = get_token(1);
    +        while (flags.mode === MODE.Statement &&
    +            !(flags.if_block && next_token && next_token.type === 'TK_RESERVED' && next_token.text === 'else') &&
    +            !flags.do_block) {
    +            restore_mode();
    +        }
    +
    +        // hacky but effective for the moment
    +        if (flags.import_block) {
    +            flags.import_block = false;
    +        }
    +        print_token();
    +    }
    +
    +    function handle_string() {
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +            // One difference - strings want at least a space before
    +            output.space_before_token = true;
    +        } else {
    +            handle_whitespace_and_comments(current_token);
    +            if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD' || flags.inline_frame) {
    +                output.space_before_token = true;
    +            } else if (last_type === 'TK_COMMA' || last_type === 'TK_START_EXPR' || last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
    +                if (!start_of_object_property()) {
    +                    allow_wrap_or_preserved_newline();
    +                }
    +            } else {
    +                print_newline();
    +            }
    +        }
    +        print_token();
    +    }
    +
    +    function handle_equals() {
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +        } else {
    +            handle_whitespace_and_comments(current_token);
    +        }
    +
    +        if (flags.declaration_statement) {
    +            // just got an '=' in a var-line, different formatting/line-breaking, etc will now be done
    +            flags.declaration_assignment = true;
    +        }
    +        output.space_before_token = true;
    +        print_token();
    +        output.space_before_token = true;
    +    }
    +
    +    function handle_comma() {
    +        handle_whitespace_and_comments(current_token, true);
    +
    +        print_token();
    +        output.space_before_token = true;
    +        if (flags.declaration_statement) {
    +            if (is_expression(flags.parent.mode)) {
    +                // do not break on comma, for(var a = 1, b = 2)
    +                flags.declaration_assignment = false;
    +            }
    +
    +            if (flags.declaration_assignment) {
    +                flags.declaration_assignment = false;
    +                print_newline(false, true);
    +            } else if (opt.comma_first) {
    +                // for comma-first, we want to allow a newline before the comma
    +                // to turn into a newline after the comma, which we will fixup later
    +                allow_wrap_or_preserved_newline();
    +            }
    +        } else if (flags.mode === MODE.ObjectLiteral ||
    +            (flags.mode === MODE.Statement && flags.parent.mode === MODE.ObjectLiteral)) {
    +            if (flags.mode === MODE.Statement) {
    +                restore_mode();
    +            }
    +
    +            if (!flags.inline_frame) {
    +                print_newline();
    +            }
    +        } else if (opt.comma_first) {
    +            // EXPR or DO_BLOCK
    +            // for comma-first, we want to allow a newline before the comma
    +            // to turn into a newline after the comma, which we will fixup later
    +            allow_wrap_or_preserved_newline();
    +        }
    +    }
    +
    +    function handle_operator() {
    +        var isGeneratorAsterisk = current_token.text === '*' &&
    +            ((last_type === 'TK_RESERVED' && in_array(flags.last_text, ['function', 'yield'])) ||
    +                (in_array(last_type, ['TK_START_BLOCK', 'TK_COMMA', 'TK_END_BLOCK', 'TK_SEMICOLON']))
    +            );
    +        var isUnary = in_array(current_token.text, ['-', '+']) && (
    +            in_array(last_type, ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS', 'TK_OPERATOR']) ||
    +            in_array(flags.last_text, tokenizer.line_starters) ||
    +            flags.last_text === ','
    +        );
    +
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +        } else {
    +            var preserve_statement_flags = !isGeneratorAsterisk;
    +            handle_whitespace_and_comments(current_token, preserve_statement_flags);
    +        }
    +
    +        if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
    +            // "return" had a special handling in TK_WORD. Now we need to return the favor
    +            output.space_before_token = true;
    +            print_token();
    +            return;
    +        }
    +
    +        // hack for actionscript's import .*;
    +        if (current_token.text === '*' && last_type === 'TK_DOT') {
    +            print_token();
    +            return;
    +        }
    +
    +        if (current_token.text === '::') {
    +            // no spaces around exotic namespacing syntax operator
    +            print_token();
    +            return;
    +        }
    +
    +        // Allow line wrapping between operators when operator_position is
    +        //   set to before or preserve
    +        if (last_type === 'TK_OPERATOR' && in_array(opt.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)) {
    +            allow_wrap_or_preserved_newline();
    +        }
    +
    +        if (current_token.text === ':' && flags.in_case) {
    +            flags.case_body = true;
    +            indent();
    +            print_token();
    +            print_newline();
    +            flags.in_case = false;
    +            return;
    +        }
    +
    +        var space_before = true;
    +        var space_after = true;
    +        var in_ternary = false;
    +        if (current_token.text === ':') {
    +            if (flags.ternary_depth === 0) {
    +                // Colon is invalid javascript outside of ternary and object, but do our best to guess what was meant.
    +                space_before = false;
    +            } else {
    +                flags.ternary_depth -= 1;
    +                in_ternary = true;
    +            }
    +        } else if (current_token.text === '?') {
    +            flags.ternary_depth += 1;
    +        }
    +
    +        // let's handle the operator_position option prior to any conflicting logic
    +        if (!isUnary && !isGeneratorAsterisk && opt.preserve_newlines && in_array(current_token.text, tokenizer.positionable_operators)) {
    +            var isColon = current_token.text === ':';
    +            var isTernaryColon = (isColon && in_ternary);
    +            var isOtherColon = (isColon && !in_ternary);
    +
    +            switch (opt.operator_position) {
    +                case OPERATOR_POSITION.before_newline:
    +                    // if the current token is : and it's not a ternary statement then we set space_before to false
    +                    output.space_before_token = !isOtherColon;
    +
    +                    print_token();
    +
    +                    if (!isColon || isTernaryColon) {
    +                        allow_wrap_or_preserved_newline();
    +                    }
    +
    +                    output.space_before_token = true;
    +                    return;
    +
    +                case OPERATOR_POSITION.after_newline:
    +                    // if the current token is anything but colon, or (via deduction) it's a colon and in a ternary statement,
    +                    //   then print a newline.
    +
    +                    output.space_before_token = true;
    +
    +                    if (!isColon || isTernaryColon) {
    +                        if (get_token(1).wanted_newline) {
    +                            print_newline(false, true);
    +                        } else {
    +                            allow_wrap_or_preserved_newline();
    +                        }
    +                    } else {
    +                        output.space_before_token = false;
    +                    }
    +
    +                    print_token();
    +
    +                    output.space_before_token = true;
    +                    return;
    +
    +                case OPERATOR_POSITION.preserve_newline:
    +                    if (!isOtherColon) {
    +                        allow_wrap_or_preserved_newline();
    +                    }
    +
    +                    // if we just added a newline, or the current token is : and it's not a ternary statement,
    +                    //   then we set space_before to false
    +                    space_before = !(output.just_added_newline() || isOtherColon);
    +
    +                    output.space_before_token = space_before;
    +                    print_token();
    +                    output.space_before_token = true;
    +                    return;
    +            }
    +        }
    +
    +        if (isGeneratorAsterisk) {
    +            allow_wrap_or_preserved_newline();
    +            space_before = false;
    +            var next_token = get_token(1);
    +            space_after = next_token && in_array(next_token.type, ['TK_WORD', 'TK_RESERVED']);
    +        } else if (current_token.text === '...') {
    +            allow_wrap_or_preserved_newline();
    +            space_before = last_type === 'TK_START_BLOCK';
    +            space_after = false;
    +        } else if (in_array(current_token.text, ['--', '++', '!', '~']) || isUnary) {
    +            // unary operators (and binary +/- pretending to be unary) special cases
    +
    +            space_before = false;
    +            space_after = false;
    +
    +            // http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1
    +            // if there is a newline between -- or ++ and anything else we should preserve it.
    +            if (current_token.wanted_newline && (current_token.text === '--' || current_token.text === '++')) {
    +                print_newline(false, true);
    +            }
    +
    +            if (flags.last_text === ';' && is_expression(flags.mode)) {
    +                // for (;; ++i)
    +                //        ^^^
    +                space_before = true;
    +            }
    +
    +            if (last_type === 'TK_RESERVED') {
    +                space_before = true;
    +            } else if (last_type === 'TK_END_EXPR') {
    +                space_before = !(flags.last_text === ']' && (current_token.text === '--' || current_token.text === '++'));
    +            } else if (last_type === 'TK_OPERATOR') {
    +                // a++ + ++b;
    +                // a - -b
    +                space_before = in_array(current_token.text, ['--', '-', '++', '+']) && in_array(flags.last_text, ['--', '-', '++', '+']);
    +                // + and - are not unary when preceeded by -- or ++ operator
    +                // a-- + b
    +                // a * +b
    +                // a - -b
    +                if (in_array(current_token.text, ['+', '-']) && in_array(flags.last_text, ['--', '++'])) {
    +                    space_after = true;
    +                }
    +            }
    +
    +
    +            if (((flags.mode === MODE.BlockStatement && !flags.inline_frame) || flags.mode === MODE.Statement) &&
    +                (flags.last_text === '{' || flags.last_text === ';')) {
    +                // { foo; --i }
    +                // foo(); --bar;
    +                print_newline();
    +            }
    +        }
    +
    +        output.space_before_token = output.space_before_token || space_before;
    +        print_token();
    +        output.space_before_token = space_after;
    +    }
    +
    +    function handle_block_comment(preserve_statement_flags) {
    +        if (output.raw) {
    +            output.add_raw_token(current_token);
    +            if (current_token.directives && current_token.directives.preserve === 'end') {
    +                // If we're testing the raw output behavior, do not allow a directive to turn it off.
    +                output.raw = opt.test_output_raw;
    +            }
    +            return;
    +        }
    +
    +        if (current_token.directives) {
    +            print_newline(false, preserve_statement_flags);
    +            print_token();
    +            if (current_token.directives.preserve === 'start') {
    +                output.raw = true;
    +            }
    +            print_newline(false, true);
    +            return;
    +        }
    +
    +        // inline block
    +        if (!acorn.newline.test(current_token.text) && !current_token.wanted_newline) {
    +            output.space_before_token = true;
    +            print_token();
    +            output.space_before_token = true;
    +            return;
    +        }
    +
    +        var lines = split_linebreaks(current_token.text);
    +        var j; // iterator for this case
    +        var javadoc = false;
    +        var starless = false;
    +        var lastIndent = current_token.whitespace_before;
    +        var lastIndentLength = lastIndent.length;
    +
    +        // block comment starts with a new line
    +        print_newline(false, preserve_statement_flags);
    +        if (lines.length > 1) {
    +            javadoc = all_lines_start_with(lines.slice(1), '*');
    +            starless = each_line_matches_indent(lines.slice(1), lastIndent);
    +        }
    +
    +        // first line always indented
    +        print_token(lines[0]);
    +        for (j = 1; j < lines.length; j++) {
    +            print_newline(false, true);
    +            if (javadoc) {
    +                // javadoc: reformat and re-indent
    +                print_token(' ' + ltrim(lines[j]));
    +            } else if (starless && lines[j].length > lastIndentLength) {
    +                // starless: re-indent non-empty content, avoiding trim
    +                print_token(lines[j].substring(lastIndentLength));
    +            } else {
    +                // normal comments output raw
    +                output.add_token(lines[j]);
    +            }
    +        }
    +
    +        // for comments of more than one line, make sure there's a new line after
    +        print_newline(false, preserve_statement_flags);
    +    }
    +
    +    function handle_comment(preserve_statement_flags) {
    +        if (current_token.wanted_newline) {
    +            print_newline(false, preserve_statement_flags);
    +        } else {
    +            output.trim(true);
    +        }
    +
    +        output.space_before_token = true;
    +        print_token();
    +        print_newline(false, preserve_statement_flags);
    +    }
    +
    +    function handle_dot() {
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +        } else {
    +            handle_whitespace_and_comments(current_token, true);
    +        }
    +
    +        if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
    +            output.space_before_token = true;
    +        } else {
    +            // allow preserved newlines before dots in general
    +            // force newlines on dots after close paren when break_chained - for bar().baz()
    +            allow_wrap_or_preserved_newline(flags.last_text === ')' && opt.break_chained_methods);
    +        }
    +
    +        print_token();
    +    }
    +
    +    function handle_unknown(preserve_statement_flags) {
    +        print_token();
    +
    +        if (current_token.text[current_token.text.length - 1] === '\n') {
    +            print_newline(false, preserve_statement_flags);
    +        }
    +    }
    +
    +    function handle_eof() {
    +        // Unwind any open statements
    +        while (flags.mode === MODE.Statement) {
    +            restore_mode();
    +        }
    +        handle_whitespace_and_comments(current_token);
    +    }
    +}
    +
    +module.exports.Beautifier = Beautifier;
    +
    +/***/ }),
    +/* 2 */
    +/***/ (function(module, exports) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function InputScanner(input) {
    +    var _input = input;
    +    var _input_length = _input.length;
    +    var _position = 0;
    +
    +    this.back = function() {
    +        _position -= 1;
    +    };
    +
    +    this.hasNext = function() {
    +        return _position < _input_length;
    +    };
    +
    +    this.next = function() {
    +        var val = null;
    +        if (this.hasNext()) {
    +            val = _input.charAt(_position);
    +            _position += 1;
    +        }
    +        return val;
    +    };
    +
    +    this.peek = function(index) {
    +        var val = null;
    +        index = index || 0;
    +        index += _position;
    +        if (index >= 0 && index < _input_length) {
    +            val = _input.charAt(index);
    +        }
    +        return val;
    +    };
    +
    +    this.peekCharCode = function(index) {
    +        var val = 0;
    +        index = index || 0;
    +        index += _position;
    +        if (index >= 0 && index < _input_length) {
    +            val = _input.charCodeAt(index);
    +        }
    +        return val;
    +    };
    +
    +    this.test = function(pattern, index) {
    +        index = index || 0;
    +        pattern.lastIndex = _position + index;
    +        return pattern.test(_input);
    +    };
    +
    +    this.testChar = function(pattern, index) {
    +        var val = this.peek(index);
    +        return val !== null && pattern.test(val);
    +    };
    +
    +    this.match = function(pattern) {
    +        pattern.lastIndex = _position;
    +        var pattern_match = pattern.exec(_input);
    +        if (pattern_match && pattern_match.index === _position) {
    +            _position += pattern_match[0].length;
    +        } else {
    +            pattern_match = null;
    +        }
    +        return pattern_match;
    +    };
    +}
    +
    +
    +module.exports.InputScanner = InputScanner;
    +
    +
    +/***/ }),
    +/* 3 */
    +/***/ (function(module, exports) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function mergeOpts(allOptions, targetType) {
    +    var finalOpts = {};
    +    var name;
    +
    +    for (name in allOptions) {
    +        if (name !== targetType) {
    +            finalOpts[name] = allOptions[name];
    +        }
    +    }
    +
    +    //merge in the per type settings for the targetType
    +    if (targetType in allOptions) {
    +        for (name in allOptions[targetType]) {
    +            finalOpts[name] = allOptions[targetType][name];
    +        }
    +    }
    +    return finalOpts;
    +}
    +
    +module.exports.mergeOpts = mergeOpts;
    +
    +
    +/***/ }),
    +/* 4 */
    +/***/ (function(module, exports) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function OutputLine(parent) {
    +    var _character_count = 0;
    +    // use indent_count as a marker for lines that have preserved indentation
    +    var _indent_count = -1;
    +
    +    var _items = [];
    +    var _empty = true;
    +
    +    this.set_indent = function(level) {
    +        _character_count = parent.baseIndentLength + level * parent.indent_length;
    +        _indent_count = level;
    +    };
    +
    +    this.get_character_count = function() {
    +        return _character_count;
    +    };
    +
    +    this.is_empty = function() {
    +        return _empty;
    +    };
    +
    +    this.last = function() {
    +        if (!this._empty) {
    +            return _items[_items.length - 1];
    +        } else {
    +            return null;
    +        }
    +    };
    +
    +    this.push = function(input) {
    +        _items.push(input);
    +        _character_count += input.length;
    +        _empty = false;
    +    };
    +
    +    this.pop = function() {
    +        var item = null;
    +        if (!_empty) {
    +            item = _items.pop();
    +            _character_count -= item.length;
    +            _empty = _items.length === 0;
    +        }
    +        return item;
    +    };
    +
    +    this.remove_indent = function() {
    +        if (_indent_count > 0) {
    +            _indent_count -= 1;
    +            _character_count -= parent.indent_length;
    +        }
    +    };
    +
    +    this.trim = function() {
    +        while (this.last() === ' ') {
    +            _items.pop();
    +            _character_count -= 1;
    +        }
    +        _empty = _items.length === 0;
    +    };
    +
    +    this.toString = function() {
    +        var result = '';
    +        if (!this._empty) {
    +            if (_indent_count >= 0) {
    +                result = parent.indent_cache[_indent_count];
    +            }
    +            result += _items.join('');
    +        }
    +        return result;
    +    };
    +}
    +
    +function Output(indent_string, baseIndentString) {
    +    baseIndentString = baseIndentString || '';
    +    this.indent_cache = [baseIndentString];
    +    this.baseIndentLength = baseIndentString.length;
    +    this.indent_length = indent_string.length;
    +    this.raw = false;
    +
    +    var lines = [];
    +    this.baseIndentString = baseIndentString;
    +    this.indent_string = indent_string;
    +    this.previous_line = null;
    +    this.current_line = null;
    +    this.space_before_token = false;
    +
    +    this.add_outputline = function() {
    +        this.previous_line = this.current_line;
    +        this.current_line = new OutputLine(this);
    +        lines.push(this.current_line);
    +    };
    +
    +    // initialize
    +    this.add_outputline();
    +
    +
    +    this.get_line_number = function() {
    +        return lines.length;
    +    };
    +
    +    // Using object instead of string to allow for later expansion of info about each line
    +    this.add_new_line = function(force_newline) {
    +        if (this.get_line_number() === 1 && this.just_added_newline()) {
    +            return false; // no newline on start of file
    +        }
    +
    +        if (force_newline || !this.just_added_newline()) {
    +            if (!this.raw) {
    +                this.add_outputline();
    +            }
    +            return true;
    +        }
    +
    +        return false;
    +    };
    +
    +    this.get_code = function(end_with_newline, eol) {
    +        var sweet_code = lines.join('\n').replace(/[\r\n\t ]+$/, '');
    +
    +        if (end_with_newline) {
    +            sweet_code += '\n';
    +        }
    +
    +        if (eol !== '\n') {
    +            sweet_code = sweet_code.replace(/[\n]/g, eol);
    +        }
    +
    +        return sweet_code;
    +    };
    +
    +    this.set_indent = function(level) {
    +        // Never indent your first output indent at the start of the file
    +        if (lines.length > 1) {
    +            while (level >= this.indent_cache.length) {
    +                this.indent_cache.push(this.indent_cache[this.indent_cache.length - 1] + this.indent_string);
    +            }
    +
    +            this.current_line.set_indent(level);
    +            return true;
    +        }
    +        this.current_line.set_indent(0);
    +        return false;
    +    };
    +
    +    this.add_raw_token = function(token) {
    +        for (var x = 0; x < token.newlines; x++) {
    +            this.add_outputline();
    +        }
    +        this.current_line.push(token.whitespace_before);
    +        this.current_line.push(token.text);
    +        this.space_before_token = false;
    +    };
    +
    +    this.add_token = function(printable_token) {
    +        this.add_space_before_token();
    +        this.current_line.push(printable_token);
    +    };
    +
    +    this.add_space_before_token = function() {
    +        if (this.space_before_token && !this.just_added_newline()) {
    +            this.current_line.push(' ');
    +        }
    +        this.space_before_token = false;
    +    };
    +
    +    this.remove_indent = function(index) {
    +        var output_length = lines.length;
    +        while (index < output_length) {
    +            lines[index].remove_indent();
    +            index++;
    +        }
    +    };
    +
    +    this.trim = function(eat_newlines) {
    +        eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
    +
    +        this.current_line.trim(indent_string, baseIndentString);
    +
    +        while (eat_newlines && lines.length > 1 &&
    +            this.current_line.is_empty()) {
    +            lines.pop();
    +            this.current_line = lines[lines.length - 1];
    +            this.current_line.trim();
    +        }
    +
    +        this.previous_line = lines.length > 1 ? lines[lines.length - 2] : null;
    +    };
    +
    +    this.just_added_newline = function() {
    +        return this.current_line.is_empty();
    +    };
    +
    +    this.just_added_blankline = function() {
    +        if (this.just_added_newline()) {
    +            if (lines.length === 1) {
    +                return true; // start of the file and newline = blank
    +            }
    +
    +            var line = lines[lines.length - 2];
    +            return line.is_empty();
    +        }
    +        return false;
    +    };
    +}
    +
    +module.exports.Output = Output;
    +
    +
    +/***/ }),
    +/* 5 */
    +/***/ (function(module, exports) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function Token(type, text, newlines, whitespace_before, parent) {
    +    this.type = type;
    +    this.text = text;
    +
    +    // comments_before are
    +    // comments that have a new line before them
    +    // and may or may not have a newline after
    +    // this is a set of comments before
    +    this.comments_before = /* inline comment*/ [];
    +
    +
    +    this.comments_after = []; // no new line before and newline after
    +    this.newlines = newlines || 0;
    +    this.wanted_newline = newlines > 0;
    +    this.whitespace_before = whitespace_before || '';
    +    this.parent = parent || null;
    +    this.opened = null;
    +    this.directives = null;
    +}
    +
    +module.exports.Token = Token;
    +
    +
    +/***/ }),
    +/* 6 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 Beautifier = __webpack_require__(1).Beautifier;
    +
    +function js_beautify(js_source_text, options) {
    +    var beautifier = new Beautifier(js_source_text, options);
    +    return beautifier.beautify();
    +}
    +
    +module.exports = js_beautify;
    +
    +/***/ }),
    +/* 7 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 InputScanner = __webpack_require__(2).InputScanner;
    +var Token = __webpack_require__(5).Token;
    +var acorn = __webpack_require__(0);
    +
    +function trim(s) {
    +    return s.replace(/^\s+|\s+$/g, '');
    +}
    +
    +function in_array(what, arr) {
    +    for (var i = 0; i < arr.length; i += 1) {
    +        if (arr[i] === what) {
    +            return true;
    +        }
    +    }
    +    return false;
    +}
    +
    +function Tokenizer(input_string, opts) {
    +
    +    var whitespace = "\n\r\t ".split('');
    +    var digit = /[0-9]/;
    +    var digit_bin = /[01]/;
    +    var digit_oct = /[01234567]/;
    +    var digit_hex = /[0123456789abcdefABCDEF]/;
    +
    +    this.positionable_operators = '!= !== % & && * ** + - / : < << <= == === > >= >> >>> ? ^ | ||'.split(' ');
    +    var punct = this.positionable_operators.concat(
    +        // non-positionable operators - these do not follow operator position settings
    +        '! %= &= *= **= ++ += , -- -= /= :: <<= = => >>= >>>= ^= |= ~ ...'.split(' '));
    +
    +    // words which should always start on new line.
    +    this.line_starters = 'continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(',');
    +    var reserved_words = this.line_starters.concat(['do', 'in', 'of', 'else', 'get', 'set', 'new', 'catch', 'finally', 'typeof', 'yield', 'async', 'await', 'from', 'as']);
    +
    +    //  /* ... */ comment ends with nearest */ or end of file
    +    var block_comment_pattern = /([\s\S]*?)((?:\*\/)|$)/g;
    +
    +    // comment ends just before nearest linefeed or end of file
    +    var comment_pattern = /([^\n\r\u2028\u2029]*)/g;
    +
    +    var directives_block_pattern = /\/\* beautify( \w+[:]\w+)+ \*\//g;
    +    var directive_pattern = / (\w+)[:](\w+)/g;
    +    var directives_end_ignore_pattern = /([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g;
    +
    +    var template_pattern = /((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;
    +
    +    var n_newlines, whitespace_before_token, in_html_comment, tokens;
    +    var input;
    +
    +    this.tokenize = function() {
    +        input = new InputScanner(input_string);
    +        in_html_comment = false;
    +        tokens = [];
    +
    +        var next, last;
    +        var token_values;
    +        var open = null;
    +        var open_stack = [];
    +        var comments = [];
    +
    +        while (!(last && last.type === 'TK_EOF')) {
    +            token_values = tokenize_next();
    +            next = new Token(token_values[1], token_values[0], n_newlines, whitespace_before_token);
    +            while (next.type === 'TK_COMMENT' || next.type === 'TK_BLOCK_COMMENT' || next.type === 'TK_UNKNOWN') {
    +                if (next.type === 'TK_BLOCK_COMMENT') {
    +                    next.directives = token_values[2];
    +                }
    +                comments.push(next);
    +                token_values = tokenize_next();
    +                next = new Token(token_values[1], token_values[0], n_newlines, whitespace_before_token);
    +            }
    +
    +            if (comments.length) {
    +                next.comments_before = comments;
    +                comments = [];
    +            }
    +
    +            if (next.type === 'TK_START_BLOCK' || next.type === 'TK_START_EXPR') {
    +                next.parent = last;
    +                open_stack.push(open);
    +                open = next;
    +            } else if ((next.type === 'TK_END_BLOCK' || next.type === 'TK_END_EXPR') &&
    +                (open && (
    +                    (next.text === ']' && open.text === '[') ||
    +                    (next.text === ')' && open.text === '(') ||
    +                    (next.text === '}' && open.text === '{')))) {
    +                next.parent = open.parent;
    +                next.opened = open;
    +
    +                open = open_stack.pop();
    +            }
    +
    +            tokens.push(next);
    +            last = next;
    +        }
    +
    +        return tokens;
    +    };
    +
    +    function get_directives(text) {
    +        if (!text.match(directives_block_pattern)) {
    +            return null;
    +        }
    +
    +        var directives = {};
    +        directive_pattern.lastIndex = 0;
    +        var directive_match = directive_pattern.exec(text);
    +
    +        while (directive_match) {
    +            directives[directive_match[1]] = directive_match[2];
    +            directive_match = directive_pattern.exec(text);
    +        }
    +
    +        return directives;
    +    }
    +
    +    function tokenize_next() {
    +        var resulting_string;
    +        var whitespace_on_this_line = [];
    +
    +        n_newlines = 0;
    +        whitespace_before_token = '';
    +
    +        var c = input.next();
    +
    +        if (c === null) {
    +            return ['', 'TK_EOF'];
    +        }
    +
    +        var last_token;
    +        if (tokens.length) {
    +            last_token = tokens[tokens.length - 1];
    +        } else {
    +            // For the sake of tokenizing we can pretend that there was on open brace to start
    +            last_token = new Token('TK_START_BLOCK', '{');
    +        }
    +
    +        while (in_array(c, whitespace)) {
    +
    +            if (acorn.newline.test(c)) {
    +                if (!(c === '\n' && input.peek(-2) === '\r')) {
    +                    n_newlines += 1;
    +                    whitespace_on_this_line = [];
    +                }
    +            } else {
    +                whitespace_on_this_line.push(c);
    +            }
    +
    +            c = input.next();
    +
    +            if (c === null) {
    +                return ['', 'TK_EOF'];
    +            }
    +        }
    +
    +        if (whitespace_on_this_line.length) {
    +            whitespace_before_token = whitespace_on_this_line.join('');
    +        }
    +
    +        if (digit.test(c) || (c === '.' && input.testChar(digit))) {
    +            var allow_decimal = true;
    +            var allow_e = true;
    +            var local_digit = digit;
    +
    +            if (c === '0' && input.testChar(/[XxOoBb]/)) {
    +                // switch to hex/oct/bin number, no decimal or e, just hex/oct/bin digits
    +                allow_decimal = false;
    +                allow_e = false;
    +                if (input.testChar(/[Bb]/)) {
    +                    local_digit = digit_bin;
    +                } else if (input.testChar(/[Oo]/)) {
    +                    local_digit = digit_oct;
    +                } else {
    +                    local_digit = digit_hex;
    +                }
    +                c += input.next();
    +            } else if (c === '.') {
    +                // Already have a decimal for this literal, don't allow another
    +                allow_decimal = false;
    +            } else {
    +                // we know this first loop will run.  It keeps the logic simpler.
    +                c = '';
    +                input.back();
    +            }
    +
    +            // Add the digits
    +            while (input.testChar(local_digit)) {
    +                c += input.next();
    +
    +                if (allow_decimal && input.peek() === '.') {
    +                    c += input.next();
    +                    allow_decimal = false;
    +                }
    +
    +                // a = 1.e-7 is valid, so we test for . then e in one loop
    +                if (allow_e && input.testChar(/[Ee]/)) {
    +                    c += input.next();
    +
    +                    if (input.testChar(/[+-]/)) {
    +                        c += input.next();
    +                    }
    +
    +                    allow_e = false;
    +                    allow_decimal = false;
    +                }
    +            }
    +
    +            return [c, 'TK_WORD'];
    +        }
    +
    +        if (acorn.isIdentifierStart(input.peekCharCode(-1))) {
    +            if (input.hasNext()) {
    +                while (acorn.isIdentifierChar(input.peekCharCode())) {
    +                    c += input.next();
    +                    if (!input.hasNext()) {
    +                        break;
    +                    }
    +                }
    +            }
    +
    +            if (!(last_token.type === 'TK_DOT' ||
    +                    (last_token.type === 'TK_RESERVED' && in_array(last_token.text, ['set', 'get']))) &&
    +                in_array(c, reserved_words)) {
    +                if (c === 'in' || c === 'of') { // hack for 'in' and 'of' operators
    +                    return [c, 'TK_OPERATOR'];
    +                }
    +                return [c, 'TK_RESERVED'];
    +            }
    +
    +            return [c, 'TK_WORD'];
    +        }
    +
    +        if (c === '(' || c === '[') {
    +            return [c, 'TK_START_EXPR'];
    +        }
    +
    +        if (c === ')' || c === ']') {
    +            return [c, 'TK_END_EXPR'];
    +        }
    +
    +        if (c === '{') {
    +            return [c, 'TK_START_BLOCK'];
    +        }
    +
    +        if (c === '}') {
    +            return [c, 'TK_END_BLOCK'];
    +        }
    +
    +        if (c === ';') {
    +            return [c, 'TK_SEMICOLON'];
    +        }
    +
    +        if (c === '/') {
    +            var comment = '';
    +            var comment_match;
    +            // peek for comment /* ... */
    +            if (input.peek() === '*') {
    +                input.next();
    +                comment_match = input.match(block_comment_pattern);
    +                comment = '/*' + comment_match[0];
    +                var directives = get_directives(comment);
    +                if (directives && directives.ignore === 'start') {
    +                    comment_match = input.match(directives_end_ignore_pattern);
    +                    comment += comment_match[0];
    +                }
    +                comment = comment.replace(acorn.allLineBreaks, '\n');
    +                return [comment, 'TK_BLOCK_COMMENT', directives];
    +            }
    +            // peek for comment // ...
    +            if (input.peek() === '/') {
    +                input.next();
    +                comment_match = input.match(comment_pattern);
    +                comment = '//' + comment_match[0];
    +                return [comment, 'TK_COMMENT'];
    +            }
    +
    +        }
    +
    +        var startXmlRegExp = /<()([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;
    +
    +        if (c === '`' || c === "'" || c === '"' || // string
    +            (
    +                (c === '/') || // regexp
    +                (opts.e4x && c === "<" && input.test(startXmlRegExp, -1)) // xml
    +            ) && ( // regex and xml can only appear in specific locations during parsing
    +                (last_token.type === 'TK_RESERVED' && in_array(last_token.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) ||
    +                (last_token.type === 'TK_END_EXPR' && last_token.text === ')' &&
    +                    last_token.parent && last_token.parent.type === 'TK_RESERVED' && in_array(last_token.parent.text, ['if', 'while', 'for'])) ||
    +                (in_array(last_token.type, ['TK_COMMENT', 'TK_START_EXPR', 'TK_START_BLOCK',
    +                    'TK_END_BLOCK', 'TK_OPERATOR', 'TK_EQUALS', 'TK_EOF', 'TK_SEMICOLON', 'TK_COMMA'
    +                ]))
    +            )) {
    +
    +            var sep = c,
    +                esc = false,
    +                has_char_escapes = false;
    +
    +            resulting_string = c;
    +
    +            if (sep === '/') {
    +                //
    +                // handle regexp
    +                //
    +                var in_char_class = false;
    +                while (input.hasNext() &&
    +                    ((esc || in_char_class || input.peek() !== sep) &&
    +                        !input.testChar(acorn.newline))) {
    +                    resulting_string += input.peek();
    +                    if (!esc) {
    +                        esc = input.peek() === '\\';
    +                        if (input.peek() === '[') {
    +                            in_char_class = true;
    +                        } else if (input.peek() === ']') {
    +                            in_char_class = false;
    +                        }
    +                    } else {
    +                        esc = false;
    +                    }
    +                    input.next();
    +                }
    +            } else if (opts.e4x && sep === '<') {
    +                //
    +                // handle e4x xml literals
    +                //
    +
    +                var xmlRegExp = /[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;
    +                input.back();
    +                var xmlStr = '';
    +                var match = input.match(startXmlRegExp);
    +                if (match) {
    +                    // Trim root tag to attempt to
    +                    var rootTag = match[2].replace(/^{\s+/, '{').replace(/\s+}$/, '}');
    +                    var isCurlyRoot = rootTag.indexOf('{') === 0;
    +                    var depth = 0;
    +                    while (match) {
    +                        var isEndTag = !!match[1];
    +                        var tagName = match[2];
    +                        var isSingletonTag = (!!match[match.length - 1]) || (tagName.slice(0, 8) === "![CDATA[");
    +                        if (!isSingletonTag &&
    +                            (tagName === rootTag || (isCurlyRoot && tagName.replace(/^{\s+/, '{').replace(/\s+}$/, '}')))) {
    +                            if (isEndTag) {
    +                                --depth;
    +                            } else {
    +                                ++depth;
    +                            }
    +                        }
    +                        xmlStr += match[0];
    +                        if (depth <= 0) {
    +                            break;
    +                        }
    +                        match = input.match(xmlRegExp);
    +                    }
    +                    // if we didn't close correctly, keep unformatted.
    +                    if (!match) {
    +                        xmlStr += input.match(/[\s\S]*/g)[0];
    +                    }
    +                    xmlStr = xmlStr.replace(acorn.allLineBreaks, '\n');
    +                    return [xmlStr, "TK_STRING"];
    +                }
    +            } else {
    +                //
    +                // handle string
    +                //
    +                var parse_string = function(delimiter, allow_unescaped_newlines, start_sub) {
    +                    // Template strings can travers lines without escape characters.
    +                    // Other strings cannot
    +                    var current_char;
    +                    while (input.hasNext()) {
    +                        current_char = input.peek();
    +                        if (!(esc || (current_char !== delimiter &&
    +                                (allow_unescaped_newlines || !acorn.newline.test(current_char))))) {
    +                            break;
    +                        }
    +
    +                        // Handle \r\n linebreaks after escapes or in template strings
    +                        if ((esc || allow_unescaped_newlines) && acorn.newline.test(current_char)) {
    +                            if (current_char === '\r' && input.peek(1) === '\n') {
    +                                input.next();
    +                                current_char = input.peek();
    +                            }
    +                            resulting_string += '\n';
    +                        } else {
    +                            resulting_string += current_char;
    +                        }
    +
    +                        if (esc) {
    +                            if (current_char === 'x' || current_char === 'u') {
    +                                has_char_escapes = true;
    +                            }
    +                            esc = false;
    +                        } else {
    +                            esc = current_char === '\\';
    +                        }
    +
    +                        input.next();
    +
    +                        if (start_sub && resulting_string.indexOf(start_sub, resulting_string.length - start_sub.length) !== -1) {
    +                            if (delimiter === '`') {
    +                                parse_string('}', allow_unescaped_newlines, '`');
    +                            } else {
    +                                parse_string('`', allow_unescaped_newlines, '${');
    +                            }
    +
    +                            if (input.hasNext()) {
    +                                resulting_string += input.next();
    +                            }
    +                        }
    +                    }
    +                };
    +
    +                if (sep === '`') {
    +                    parse_string('`', true, '${');
    +                } else {
    +                    parse_string(sep);
    +                }
    +            }
    +
    +            if (has_char_escapes && opts.unescape_strings) {
    +                resulting_string = unescape_string(resulting_string);
    +            }
    +
    +            if (input.peek() === sep) {
    +                resulting_string += sep;
    +                input.next();
    +
    +                if (sep === '/') {
    +                    // regexps may have modifiers /regexp/MOD , so fetch those, too
    +                    // Only [gim] are valid, but if the user puts in garbage, do what we can to take it.
    +                    while (input.hasNext() && acorn.isIdentifierStart(input.peekCharCode())) {
    +                        resulting_string += input.next();
    +                    }
    +                }
    +            }
    +            return [resulting_string, 'TK_STRING'];
    +        }
    +
    +        if (c === '#') {
    +
    +            if (tokens.length === 0 && input.peek() === '!') {
    +                // shebang
    +                resulting_string = c;
    +                while (input.hasNext() && c !== '\n') {
    +                    c = input.next();
    +                    resulting_string += c;
    +                }
    +                return [trim(resulting_string) + '\n', 'TK_UNKNOWN'];
    +            }
    +
    +
    +
    +            // Spidermonkey-specific sharp variables for circular references
    +            // https://developer.mozilla.org/En/Sharp_variables_in_JavaScript
    +            // http://mxr.mozilla.org/mozilla-central/source/js/src/jsscan.cpp around line 1935
    +            var sharp = '#';
    +            if (input.hasNext() && input.testChar(digit)) {
    +                do {
    +                    c = input.next();
    +                    sharp += c;
    +                } while (input.hasNext() && c !== '#' && c !== '=');
    +                if (c === '#') {
    +                    //
    +                } else if (input.peek() === '[' && input.peek(1) === ']') {
    +                    sharp += '[]';
    +                    input.next();
    +                    input.next();
    +                } else if (input.peek() === '{' && input.peek(1) === '}') {
    +                    sharp += '{}';
    +                    input.next();
    +                    input.next();
    +                }
    +                return [sharp, 'TK_WORD'];
    +            }
    +        }
    +
    +        if (c === '<' && (input.peek() === '?' || input.peek() === '%')) {
    +            input.back();
    +            var template_match = input.match(template_pattern);
    +            if (template_match) {
    +                c = template_match[0];
    +                c = c.replace(acorn.allLineBreaks, '\n');
    +                return [c, 'TK_STRING'];
    +            }
    +        }
    +
    +        if (c === '<' && input.match(/\!--/g)) {
    +            c = '', 'TK_COMMENT'];
    +        }
    +
    +        if (c === '.') {
    +            if (input.peek() === '.' && input.peek(1) === '.') {
    +                c += input.next() + input.next();
    +                return [c, 'TK_OPERATOR'];
    +            }
    +            return [c, 'TK_DOT'];
    +        }
    +
    +        if (in_array(c, punct)) {
    +            while (input.hasNext() && in_array(c + input.peek(), punct)) {
    +                c += input.next();
    +                if (!input.hasNext()) {
    +                    break;
    +                }
    +            }
    +
    +            if (c === ',') {
    +                return [c, 'TK_COMMA'];
    +            } else if (c === '=') {
    +                return [c, 'TK_EQUALS'];
    +            } else {
    +                return [c, 'TK_OPERATOR'];
    +            }
    +        }
    +
    +        return [c, 'TK_UNKNOWN'];
    +    }
    +
    +
    +    function unescape_string(s) {
    +        // You think that a regex would work for this
    +        // return s.replace(/\\x([0-9a-f]{2})/gi, function(match, val) {
    +        //         return String.fromCharCode(parseInt(val, 16));
    +        //     })
    +        // However, dealing with '\xff', '\\xff', '\\\xff' makes this more fun.
    +        var out = '',
    +            escaped = 0;
    +
    +        var input_scan = new InputScanner(s);
    +        var matched = null;
    +
    +        while (input_scan.hasNext()) {
    +            // Keep any whitespace, non-slash characters
    +            // also keep slash pairs.
    +            matched = input_scan.match(/([\s]|[^\\]|\\\\)+/g);
    +
    +            if (matched) {
    +                out += matched[0];
    +            }
    +
    +            if (input_scan.peek() === '\\') {
    +                input_scan.next();
    +                if (input_scan.peek() === 'x') {
    +                    matched = input_scan.match(/x([0-9A-Fa-f]{2})/g);
    +                } else if (input_scan.peek() === 'u') {
    +                    matched = input_scan.match(/u([0-9A-Fa-f]{4})/g);
    +                } else {
    +                    out += '\\';
    +                    if (input_scan.hasNext()) {
    +                        out += input_scan.next();
    +                    }
    +                    continue;
    +                }
    +
    +                // If there's some error decoding, return the original string
    +                if (!matched) {
    +                    return s;
    +                }
    +
    +                escaped = parseInt(matched[1], 16);
    +
    +                if (escaped > 0x7e && escaped <= 0xff && matched[0].indexOf('x') === 0) {
    +                    // we bail out on \x7f..\xff,
    +                    // leaving whole string escaped,
    +                    // as it's probably completely binary
    +                    return s;
    +                } else if (escaped >= 0x00 && escaped < 0x20) {
    +                    // leave 0x00...0x1f escaped
    +                    out += '\\' + matched[0];
    +                    continue;
    +                } else if (escaped === 0x22 || escaped === 0x27 || escaped === 0x5c) {
    +                    // single-quote, apostrophe, backslash - escape these
    +                    out += '\\' + String.fromCharCode(escaped);
    +                } else {
    +                    out += String.fromCharCode(escaped);
    +                }
    +            }
    +        }
    +
    +        return out;
    +    }
    +}
    +
    +module.exports.Tokenizer = Tokenizer;
    +
    +/***/ })
    +/******/ ]);
    +var js_beautify = legacy_beautify_js;
    +/* Footer */
    +if (typeof define === "function" && define.amd) {
    +    // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- )
    +    define([], function() {
    +        return { js_beautify: js_beautify };
    +    });
    +} else if (typeof exports !== "undefined") {
    +    // Add support for CommonJS. Just put this file somewhere on your require.paths
    +    // and you will be able to `var js_beautify = require("beautify").js_beautify`.
    +    exports.js_beautify = js_beautify;
    +} else if (typeof window !== "undefined") {
    +    // If we're running a web page and don't have either of the above, add our one global
    +    window.js_beautify = js_beautify;
    +} else if (typeof global !== "undefined") {
    +    // If we don't even have window, try global.
    +    global.js_beautify = js_beautify;
    +}
    +
    +}());
    diff --git a/node_modules/js-beautify/js/lib/cli.js b/node_modules/js-beautify/js/lib/cli.js
    new file mode 100755
    index 0000000..99b2436
    --- /dev/null
    +++ b/node_modules/js-beautify/js/lib/cli.js
    @@ -0,0 +1,635 @@
    +#!/usr/bin/env node
    +
    +/*
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +
    +  Js-Beautify Command-line for node.js
    +  -------------------------------------
    +
    +  Written by Daniel Stockman (daniel.stockman@gmail.com)
    +
    +*/
    +
    +var debug = process.env.DEBUG_JSBEAUTIFY || process.env.JSBEAUTIFY_DEBUG ? function() {
    +    console.error.apply(console, arguments);
    +} : function() {};
    +
    +var fs = require('fs'),
    +    cc = require('config-chain'),
    +    beautify = require('../index'),
    +    mkdirp = require('mkdirp'),
    +    nopt = require('nopt');
    +nopt.invalidHandler = function(key, val, types) {
    +    throw new Error(key + " was invalid with value \"" + val + "\"");
    +}
    +nopt.typeDefs.brace_style = {
    +    type: "brace_style",
    +    validate: function(data, key, val) {
    +        data[key] = val;
    +        // TODO: expand-strict is obsolete, now identical to expand.  Remove in future version
    +        // TODO: collapse-preserve-inline is obselete, now identical to collapse,preserve-inline = true. Remove in future version
    +        var validVals = ["collapse", "collapse-preserve-inline", "expand", "end-expand", "expand-strict", "none", "preserve-inline"];
    +        var valSplit = val.split(/[^a-zA-Z0-9_\-]+/); //Split will always return at least one parameter
    +        for (var i = 0; i < valSplit.length; i++) {
    +            if (validVals.indexOf(valSplit[i]) === -1) {
    +                return false;
    +            }
    +        }
    +        return true;
    +    }
    +};
    +var path = require('path'),
    +    editorconfig = require('editorconfig'),
    +    knownOpts = {
    +        // Beautifier
    +        "indent_size": Number,
    +        "indent_char": String,
    +        "eol": String,
    +        "indent_level": Number,
    +        "indent_with_tabs": Boolean,
    +        "preserve_newlines": Boolean,
    +        "max_preserve_newlines": Number,
    +        "space_in_paren": Boolean,
    +        "space_in_empty_paren": Boolean,
    +        "jslint_happy": Boolean,
    +        "space_after_anon_function": Boolean,
    +        "brace_style": "brace_style", //See above for validation
    +        "unindent_chained_methods": Boolean,
    +        "break_chained_methods": Boolean,
    +        "keep_array_indentation": Boolean,
    +        "unescape_strings": Boolean,
    +        "wrap_line_length": Number,
    +        "wrap_attributes": ["auto", "force", "force-aligned"],
    +        "wrap_attributes_indent_size": Number,
    +        "e4x": Boolean,
    +        "end_with_newline": Boolean,
    +        "comma_first": Boolean,
    +        "operator_position": ["before-newline", "after-newline", "preserve-newline"],
    +        // CSS-only
    +        "selector_separator_newline": Boolean,
    +        "newline_between_rules": Boolean,
    +        "space_around_combinator": Boolean,
    +        //deprecated - replaced with space_around_combinator, remove in future version
    +        "space_around_selector_separator": Boolean,
    +        // HTML-only
    +        "max_char": Number, // obsolete since 1.3.5
    +        "unformatted": [String, Array],
    +        "content_unformatted": [String, Array],
    +        "indent_inner_html": [Boolean],
    +        "indent_handlebars": [Boolean],
    +        "indent_scripts": ["keep", "separate", "normal"],
    +        "extra_liners": [String, Array],
    +        // CLI
    +        "version": Boolean,
    +        "help": Boolean,
    +        "files": [path, Array],
    +        "outfile": path,
    +        "replace": Boolean,
    +        "quiet": Boolean,
    +        "type": ["js", "css", "html"],
    +        "config": path,
    +        "editorconfig": Boolean
    +    },
    +    // dasherizeShorthands provides { "indent-size": ["--indent_size"] }
    +    // translation, allowing more convenient dashes in CLI arguments
    +    shortHands = dasherizeShorthands({
    +        // Beautifier
    +        "s": ["--indent_size"],
    +        "c": ["--indent_char"],
    +        "e": ["--eol"],
    +        "l": ["--indent_level"],
    +        "t": ["--indent_with_tabs"],
    +        "p": ["--preserve_newlines"],
    +        "m": ["--max_preserve_newlines"],
    +        "P": ["--space_in_paren"],
    +        "Q": ["--space_in_empty_paren"],
    +        "j": ["--jslint_happy"],
    +        "a": ["--space_after_anon_function"],
    +        "b": ["--brace_style"],
    +        "u": ["--unindent_chained_methods"],
    +        "B": ["--break_chained_methods"],
    +        "k": ["--keep_array_indentation"],
    +        "x": ["--unescape_strings"],
    +        "w": ["--wrap_line_length"],
    +        "X": ["--e4x"],
    +        "n": ["--end_with_newline"],
    +        "C": ["--comma_first"],
    +        "O": ["--operator_position"],
    +        // CSS-only
    +        "L": ["--selector_separator_newline"],
    +        "N": ["--newline_between_rules"],
    +        // HTML-only
    +        "A": ["--wrap_attributes"],
    +        "i": ["--wrap_attributes_indent_size"],
    +        "W": ["--max_char"], // obsolete since 1.3.5
    +        "U": ["--unformatted"],
    +        "T": ["--content_unformatted"],
    +        "I": ["--indent_inner_html"],
    +        "H": ["--indent_handlebars"],
    +        "S": ["--indent_scripts"],
    +        "E": ["--extra_liners"],
    +        // non-dasherized hybrid shortcuts
    +        "good-stuff": [
    +            "--keep_array_indentation",
    +            "--keep_function_indentation",
    +            "--jslint_happy"
    +        ],
    +        "js": ["--type", "js"],
    +        "css": ["--type", "css"],
    +        "html": ["--type", "html"],
    +        // CLI
    +        "v": ["--version"],
    +        "h": ["--help"],
    +        "f": ["--files"],
    +        "o": ["--outfile"],
    +        "r": ["--replace"],
    +        "q": ["--quiet"]
    +        // no shorthand for "config"
    +        // no shorthand for "editorconfig"
    +    });
    +
    +function verifyExists(fullPath) {
    +    return fs.existsSync(fullPath) ? fullPath : null;
    +}
    +
    +function findRecursive(dir, fileName) {
    +    var fullPath = path.join(dir, fileName);
    +    var nextDir = path.dirname(dir);
    +    var result = verifyExists(fullPath);
    +
    +    if (!result && (nextDir !== dir)) {
    +        result = findRecursive(nextDir, fileName);
    +    }
    +
    +    return result;
    +}
    +
    +function getUserHome() {
    +    var user_home = '';
    +    try {
    +        user_home = process.env.USERPROFILE || process.env.HOME || '';
    +    } catch (ex) {}
    +    return user_home;
    +}
    +
    +function set_file_editorconfig_opts(file, config) {
    +    try {
    +        var eConfigs = editorconfig.parseSync(file);
    +
    +        if (eConfigs.indent_style === "tab") {
    +            config.indent_with_tabs = true;
    +        } else if (eConfigs.indent_style === "space") {
    +            config.indent_with_tabs = false;
    +        }
    +
    +        if (eConfigs.indent_size) {
    +            config.indent_size = eConfigs.indent_size;
    +        }
    +
    +        if (eConfigs.max_line_length) {
    +            if (eConfigs.max_line_length === "off") {
    +                config.wrap_line_length = 0;
    +            } else {
    +                config.wrap_line_length = parseInt(eConfigs.max_line_length);
    +            }
    +        }
    +
    +        if (eConfigs.insert_final_newline === true) {
    +            config.end_with_newline = true;
    +        } else if (eConfigs.insert_final_newline === false) {
    +            config.end_with_newline = false;
    +        }
    +
    +        if (eConfigs.end_of_line) {
    +            if (eConfigs.end_of_line === 'cr') {
    +                config.eol = '\r';
    +            } else if (eConfigs.end_of_line === 'lf') {
    +                config.eol = '\n';
    +            } else if (eConfigs.end_of_line === 'crlf') {
    +                config.eol = '\r\n';
    +            }
    +        }
    +    } catch (e) {
    +        debug(e);
    +    }
    +}
    +
    +// var cli = require('js-beautify/cli'); cli.interpret();
    +var interpret = exports.interpret = function(argv, slice) {
    +    var parsed;
    +    try {
    +        parsed = nopt(knownOpts, shortHands, argv, slice);
    +    } catch (ex) {
    +        usage(ex);
    +        // console.error(ex);
    +        // console.error('Run `' + getScriptName() + ' -h` for help.');
    +        process.exit(1);
    +    }
    +
    +
    +    if (parsed.version) {
    +        console.log(require('../../package.json').version);
    +        process.exit(0);
    +    } else if (parsed.help) {
    +        usage();
    +        process.exit(0);
    +    }
    +
    +    var cfg;
    +    var configRecursive = findRecursive(process.cwd(), '.jsbeautifyrc');
    +    var configHome = verifyExists(path.join(getUserHome() || "", ".jsbeautifyrc"));
    +    var configDefault = __dirname + '/../config/defaults.json';
    +
    +    try {
    +        cfg = cc(
    +            parsed,
    +            cleanOptions(cc.env('jsbeautify_'), knownOpts),
    +            parsed.config,
    +            configRecursive,
    +            configHome,
    +            configDefault
    +        ).snapshot;
    +    } catch (ex) {
    +        debug(cfg);
    +        // usage(ex);
    +        console.error(ex);
    +        console.error('Error while loading beautifier configuration.');
    +        console.error('Configuration file chain included:');
    +        if (parsed.config) {
    +            console.error(parsed.config);
    +        }
    +        if (configRecursive) {
    +            console.error(configRecursive);
    +        }
    +        if (configHome) {
    +            console.error(configHome);
    +        }
    +        console.error(configDefault);
    +        console.error('Run `' + getScriptName() + ' -h` for help.');
    +        process.exit(1);
    +    }
    +
    +    try {
    +        // Verify arguments
    +        checkType(cfg);
    +        checkFiles(cfg);
    +        debug(cfg);
    +
    +        // Process files synchronously to avoid EMFILE error
    +        cfg.files.forEach(processInputSync, {
    +            cfg: cfg
    +        });
    +    } catch (ex) {
    +        debug(cfg);
    +        // usage(ex);
    +        console.error(ex);
    +        console.error('Run `' + getScriptName() + ' -h` for help.');
    +        process.exit(1);
    +    }
    +};
    +
    +// interpret args immediately when called as executable
    +if (require.main === module) {
    +    interpret();
    +}
    +
    +function usage(err) {
    +    var scriptName = getScriptName();
    +    var msg = [
    +        scriptName + '@' + require('../../package.json').version,
    +        '',
    +        'CLI Options:',
    +        '  -f, --file       Input file(s) (Pass \'-\' for stdin)',
    +        '  -r, --replace    Write output in-place, replacing input',
    +        '  -o, --outfile    Write output to file (default stdout)',
    +        '  --config         Path to config file',
    +        '  --type           [js|css|html] ["js"]',
    +        '  -q, --quiet      Suppress logging to stdout',
    +        '  -h, --help       Show this help',
    +        '  -v, --version    Show the version',
    +        '',
    +        'Beautifier Options:',
    +        '  -s, --indent-size                 Indentation size [4]',
    +        '  -c, --indent-char                 Indentation character [" "]',
    +        '  -t, --indent-with-tabs            Indent with tabs, overrides -s and -c',
    +        '  -e, --eol                         Character(s) to use as line terminators.',
    +        '                                    [first newline in file, otherwise "\\n]',
    +        '  -n, --end-with-newline            End output with newline',
    +        '  --editorconfig                    Use EditorConfig to set up the options'
    +    ];
    +
    +    switch (scriptName.split('-').shift()) {
    +        case "js":
    +            msg.push('  -l, --indent-level                Initial indentation level [0]');
    +            msg.push('  -p, --preserve-newlines           Preserve line-breaks (--no-preserve-newlines disables)');
    +            msg.push('  -m, --max-preserve-newlines       Number of line-breaks to be preserved in one chunk [10]');
    +            msg.push('  -P, --space-in-paren              Add padding spaces within paren, ie. f( a, b )');
    +            msg.push('  -E, --space-in-empty-paren        Add a single space inside empty paren, ie. f( )');
    +            msg.push('  -j, --jslint-happy                Enable jslint-stricter mode');
    +            msg.push('  -a, --space-after-anon-function   Add a space before an anonymous function\'s parens, ie. function ()');
    +            msg.push('  -b, --brace-style                 [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]');
    +            msg.push('  -u, --unindent-chained-methods    Don\'t indent chained method calls');
    +            msg.push('  -B, --break-chained-methods       Break chained method calls across subsequent lines');
    +            msg.push('  -k, --keep-array-indentation      Preserve array indentation');
    +            msg.push('  -x, --unescape-strings            Decode printable characters encoded in xNN notation');
    +            msg.push('  -w, --wrap-line-length            Wrap lines at next opportunity after N characters [0]');
    +            msg.push('  -X, --e4x                         Pass E4X xml literals through untouched');
    +            msg.push('  --good-stuff                      Warm the cockles of Crockford\'s heart');
    +            msg.push('  -C, --comma-first                 Put commas at the beginning of new line instead of end');
    +            msg.push('  -O, --operator-position           Set operator position (before-newline|after-newline|preserve-newline) [before-newline]');
    +            break;
    +        case "html":
    +            msg.push('  -b, --brace-style                 [collapse|expand|end-expand] ["collapse"]');
    +            msg.push('  -I, --indent-inner-html           Indent body and head sections. Default is false.');
    +            msg.push('  -H, --indent-handlebars           Indent handlebars. Default is false.');
    +            msg.push('  -S, --indent-scripts              [keep|separate|normal] ["normal"]');
    +            msg.push('  -w, --wrap-line-length            Wrap lines at next opportunity after N characters [0]');
    +            msg.push('  -A, --wrap-attributes             Wrap html tag attributes to new lines [auto|force] ["auto"]');
    +            msg.push('  -i, --wrap-attributes-indent-size Indent wrapped tags to after N characters [indent-level]');
    +            msg.push('  -p, --preserve-newlines           Preserve line-breaks (--no-preserve-newlines disables)');
    +            msg.push('  -m, --max-preserve-newlines       Number of line-breaks to be preserved in one chunk [10]');
    +            msg.push('  -U, --unformatted                 List of tags (defaults to inline) that should not be reformatted');
    +            msg.push('  -T, --content_unformatted         List of tags (defaults to pre) whose content should not be reformatted');
    +            msg.push('  -E, --extra_liners                List of tags (defaults to [head,body,/html] that should have an extra newline');
    +            break;
    +        case "css":
    +            msg.push('  -L, --selector-separator-newline        Add a newline between multiple selectors.');
    +            msg.push('  -N, --newline-between-rules             Add a newline between CSS rules.');
    +    }
    +
    +    if (err) {
    +        msg.push(err);
    +        msg.push('');
    +        console.error(msg.join('\n'));
    +    } else {
    +        console.log(msg.join('\n'));
    +    }
    +}
    +
    +// main iterator, {cfg} passed as thisArg of forEach call
    +
    +function processInputSync(filepath) {
    +    var data = '',
    +        config = this.cfg,
    +        outfile = config.outfile,
    +        input;
    +
    +    // -o passed with no value overwrites
    +    if (outfile === true || config.replace) {
    +        outfile = filepath;
    +    }
    +
    +    var fileType = getOutputType(outfile, filepath, config.type);
    +
    +    if (config.editorconfig) {
    +        var editorconfig_filepath = filepath;
    +
    +        if (editorconfig_filepath === '-') {
    +            if (outfile) {
    +                editorconfig_filepath = outfile;
    +            } else {
    +                editorconfig_filepath = 'stdin.' + fileType;
    +            }
    +        }
    +
    +        debug("EditorConfig is enabled for ", editorconfig_filepath);
    +        config = cc(config).snapshot;
    +        set_file_editorconfig_opts(editorconfig_filepath, config);
    +        debug(config);
    +    }
    +
    +    if (filepath === '-') {
    +        input = process.stdin;
    +        input.resume();
    +
    +        input.setEncoding('utf8');
    +
    +        input.on('data', function(chunk) {
    +            data += chunk;
    +        });
    +
    +        input.on('end', function() {
    +            makePretty(fileType, data, config, outfile, writePretty); // Where things get beautified
    +        });
    +    } else {
    +        data = fs.readFileSync(filepath, 'utf8');
    +        makePretty(fileType, data, config, outfile, writePretty);
    +    }
    +}
    +
    +function makePretty(fileType, code, config, outfile, callback) {
    +    try {
    +        var pretty = beautify[fileType](code, config);
    +
    +        callback(null, pretty, outfile, config);
    +    } catch (ex) {
    +        callback(ex);
    +    }
    +}
    +
    +function writePretty(err, pretty, outfile, config) {
    +    debug('writing ' + outfile);
    +    if (err) {
    +        console.error(err);
    +        process.exit(1);
    +    }
    +
    +    if (outfile) {
    +        mkdirp.sync(path.dirname(outfile));
    +
    +        if (isFileDifferent(outfile, pretty)) {
    +            try {
    +                fs.writeFileSync(outfile, pretty, 'utf8');
    +                logToStdout('beautified ' + path.relative(process.cwd(), outfile), config);
    +            } catch (ex) {
    +                onOutputError(ex);
    +            }
    +        } else {
    +            logToStdout('beautified ' + path.relative(process.cwd(), outfile) + ' - unchanged', config);
    +        }
    +    } else {
    +        process.stdout.write(pretty);
    +    }
    +}
    +
    +function isFileDifferent(filePath, expected) {
    +    try {
    +        return fs.readFileSync(filePath, 'utf8') !== expected;
    +    } catch (ex) {
    +        // failing to read is the same as different
    +        return true;
    +    }
    +}
    +
    +// workaround the fact that nopt.clean doesn't return the object passed in :P
    +
    +function cleanOptions(data, types) {
    +    nopt.clean(data, types);
    +    return data;
    +}
    +
    +// error handler for output stream that swallows errors silently,
    +// allowing the loop to continue over unwritable files.
    +
    +function onOutputError(err) {
    +    if (err.code === 'EACCES') {
    +        console.error(err.path + " is not writable. Skipping!");
    +    } else {
    +        console.error(err);
    +        process.exit(0);
    +    }
    +}
    +
    +// turn "--foo_bar" into "foo-bar"
    +
    +function dasherizeFlag(str) {
    +    return str.replace(/^\-+/, '').replace(/_/g, '-');
    +}
    +
    +// translate weird python underscored keys into dashed argv,
    +// avoiding single character aliases.
    +
    +function dasherizeShorthands(hash) {
    +    // operate in-place
    +    Object.keys(hash).forEach(function(key) {
    +        // each key value is an array
    +        var val = hash[key][0];
    +        // only dasherize one-character shorthands
    +        if (key.length === 1 && val.indexOf('_') > -1) {
    +            hash[dasherizeFlag(val)] = val;
    +        }
    +    });
    +
    +    return hash;
    +}
    +
    +function getOutputType(outfile, filepath, configType) {
    +    if (outfile && /\.(js|css|html)$/.test(outfile)) {
    +        return outfile.split('.').pop();
    +    } else if (filepath !== '-' && /\.(js|css|html)$/.test(filepath)) {
    +        return filepath.split('.').pop();
    +    } else if (configType) {
    +        return configType;
    +    } else {
    +        throw 'Could not determine appropriate beautifier from file paths: ' + filepath;
    +    }
    +}
    +
    +function getScriptName() {
    +    return path.basename(process.argv[1]);
    +}
    +
    +function checkType(parsed) {
    +    var scriptType = getScriptName().split('-').shift();
    +    if (!/^(js|css|html)$/.test(scriptType)) {
    +        scriptType = null;
    +    }
    +
    +    debug("executable type:", scriptType);
    +
    +    var parsedType = parsed.type;
    +    debug("parsed type:", parsedType);
    +
    +    if (!parsedType) {
    +        debug("type defaulted:", scriptType);
    +        parsed.type = scriptType;
    +    }
    +}
    +
    +function checkFiles(parsed) {
    +    var argv = parsed.argv;
    +    var isTTY = true;
    +
    +    try {
    +        isTTY = process.stdin.isTTY;
    +    } catch (ex) {
    +        debug("error querying for isTTY:", ex);
    +    }
    +
    +    debug('isTTY: ' + isTTY);
    +
    +    if (!parsed.files) {
    +        parsed.files = [];
    +    } else {
    +        if (argv.cooked.indexOf('-') > -1) {
    +            // strip stdin path eagerly added by nopt in '-f -' case
    +            parsed.files.some(removeDashedPath);
    +        }
    +    }
    +
    +    if (argv.remain.length) {
    +        // assume any remaining args are files
    +        argv.remain.forEach(function(f) {
    +            if (f !== '-') {
    +                parsed.files.push(path.resolve(f));
    +            }
    +        });
    +    }
    +
    +    if ('string' === typeof parsed.outfile && isTTY && !parsed.files.length) {
    +        // use outfile as input when no other files passed in args
    +        parsed.files.push(parsed.outfile);
    +        // operation is now an implicit overwrite
    +        parsed.replace = true;
    +    }
    +
    +    if (!parsed.files.length) {
    +        // read stdin by default
    +        parsed.files.push('-');
    +    }
    +    debug('files.length ' + parsed.files.length);
    +
    +    if (parsed.files.indexOf('-') > -1 && isTTY) {
    +        throw 'Must pipe input or define at least one file.';
    +    }
    +
    +    parsed.files.forEach(testFilePath);
    +
    +    return parsed;
    +}
    +
    +function removeDashedPath(filepath, i, arr) {
    +    var found = filepath.lastIndexOf('-') === (filepath.length - 1);
    +    if (found) {
    +        arr.splice(i, 1);
    +    }
    +    return found;
    +}
    +
    +function testFilePath(filepath) {
    +    try {
    +        if (filepath !== "-") {
    +            fs.statSync(filepath);
    +        }
    +    } catch (err) {
    +        throw 'Unable to open path "' + filepath + '"';
    +    }
    +}
    +
    +function logToStdout(str, config) {
    +    if (typeof config.quiet === "undefined" || !config.quiet) {
    +        console.log(str);
    +    }
    +}
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/lib/unpackers/javascriptobfuscator_unpacker.js b/node_modules/js-beautify/js/lib/unpackers/javascriptobfuscator_unpacker.js
    new file mode 100644
    index 0000000..2e68ca6
    --- /dev/null
    +++ b/node_modules/js-beautify/js/lib/unpackers/javascriptobfuscator_unpacker.js
    @@ -0,0 +1,103 @@
    +//
    +// simple unpacker/deobfuscator for scripts messed up with javascriptobfuscator.com
    +// written by Einar Lielmanis 
    +//
    +// usage:
    +//
    +// if (JavascriptObfuscator.detect(some_string)) {
    +//     var unpacked = JavascriptObfuscator.unpack(some_string);
    +// }
    +//
    +//
    +
    +var JavascriptObfuscator = {
    +    detect: function(str) {
    +        return /^var _0x[a-f0-9]+ ?\= ?\[/.test(str);
    +    },
    +
    +    unpack: function(str) {
    +        if (JavascriptObfuscator.detect(str)) {
    +            var matches = /var (_0x[a-f\d]+) ?\= ?\[(.*?)\];/.exec(str);
    +            if (matches) {
    +                var var_name = matches[1];
    +                var strings = JavascriptObfuscator._smart_split(matches[2]);
    +                str = str.substring(matches[0].length);
    +                for (var k in strings) {
    +                    str = str.replace(new RegExp(var_name + '\\[' + k + '\\]', 'g'),
    +                        JavascriptObfuscator._fix_quotes(JavascriptObfuscator._unescape(strings[k])));
    +                }
    +            }
    +        }
    +        return str;
    +    },
    +
    +    _fix_quotes: function(str) {
    +        var matches = /^"(.*)"$/.exec(str);
    +        if (matches) {
    +            str = matches[1];
    +            str = "'" + str.replace(/'/g, "\\'") + "'";
    +        }
    +        return str;
    +    },
    +
    +    _smart_split: function(str) {
    +        var strings = [];
    +        var pos = 0;
    +        while (pos < str.length) {
    +            if (str.charAt(pos) === '"') {
    +                // new word
    +                var word = '';
    +                pos += 1;
    +                while (pos < str.length) {
    +                    if (str.charAt(pos) === '"') {
    +                        break;
    +                    }
    +                    if (str.charAt(pos) === '\\') {
    +                        word += '\\';
    +                        pos++;
    +                    }
    +                    word += str.charAt(pos);
    +                    pos++;
    +                }
    +                strings.push('"' + word + '"');
    +            }
    +            pos += 1;
    +        }
    +        return strings;
    +    },
    +
    +
    +    _unescape: function(str) {
    +        // inefficient if used repeatedly or on small strings, but wonderful on single large chunk of text
    +        for (var i = 32; i < 128; i++) {
    +            str = str.replace(new RegExp('\\\\x' + i.toString(16), 'ig'), String.fromCharCode(i));
    +        }
    +        str = str.replace(/\\x09/g, "\t");
    +        return str;
    +    },
    +
    +    run_tests: function(sanity_test) {
    +        var t = sanity_test || new SanityTest();
    +
    +        t.test_function(JavascriptObfuscator._smart_split, "JavascriptObfuscator._smart_split");
    +        t.expect('', []);
    +        t.expect('"a", "b"', ['"a"', '"b"']);
    +        t.expect('"aaa","bbbb"', ['"aaa"', '"bbbb"']);
    +        t.expect('"a", "b\\\""', ['"a"', '"b\\\""']);
    +        t.test_function(JavascriptObfuscator._unescape, 'JavascriptObfuscator._unescape');
    +        t.expect('\\x40', '@');
    +        t.expect('\\x10', '\\x10');
    +        t.expect('\\x1', '\\x1');
    +        t.expect("\\x61\\x62\\x22\\x63\\x64", 'ab"cd');
    +        t.test_function(JavascriptObfuscator.detect, 'JavascriptObfuscator.detect');
    +        t.expect('', false);
    +        t.expect('abcd', false);
    +        t.expect('var _0xaaaa', false);
    +        t.expect('var _0xaaaa = ["a", "b"]', true);
    +        t.expect('var _0xaaaa=["a", "b"]', true);
    +        t.expect('var _0x1234=["a","b"]', true);
    +        return t;
    +    }
    +
    +
    +};
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/lib/unpackers/myobfuscate_unpacker.js b/node_modules/js-beautify/js/lib/unpackers/myobfuscate_unpacker.js
    new file mode 100644
    index 0000000..a7f245d
    --- /dev/null
    +++ b/node_modules/js-beautify/js/lib/unpackers/myobfuscate_unpacker.js
    @@ -0,0 +1,90 @@
    +//
    +// simple unpacker/deobfuscator for scripts messed up with myobfuscate.com
    +// You really don't want to obfuscate your scripts there: they're tracking
    +// your unpackings, your script gets turned into something like this,
    +// as of 2011-04-25:
    +/*
    +
    +    var _escape = 'your_script_escaped';
    +    var _111 = document.createElement('script');
    +    _111.src = 'http://api.www.myobfuscate.com/?getsrc=ok' +
    +        '&ref=' + encodeURIComponent(document.referrer) +
    +        '&url=' + encodeURIComponent(document.URL);
    +    var 000 = document.getElementsByTagName('head')[0];
    +    000.appendChild(_111);
    +    document.write(unescape(_escape));
    +
    +*/
    +//
    +// written by Einar Lielmanis 
    +//
    +// usage:
    +//
    +// if (MyObfuscate.detect(some_string)) {
    +//     var unpacked = MyObfuscate.unpack(some_string);
    +// }
    +//
    +//
    +
    +var MyObfuscate = {
    +    detect: function(str) {
    +        if (/^var _?[0O1lI]{3}\=('|\[).*\)\)\);/.test(str)) {
    +            return true;
    +        }
    +        if (/^function _?[0O1lI]{3}\(_/.test(str) && /eval\(/.test(str)) {
    +            return true;
    +        }
    +        return false;
    +    },
    +
    +    unpack: function(str) {
    +        if (MyObfuscate.detect(str)) {
    +            var __eval = eval;
    +            try {
    +                eval = function(unpacked) { // jshint ignore:line
    +                    if (MyObfuscate.starts_with(unpacked, 'var _escape')) {
    +                        // fetch the urlencoded stuff from the script,
    +                        var matches = /'([^']*)'/.exec(unpacked);
    +                        var unescaped = unescape(matches[1]);
    +                        if (MyObfuscate.starts_with(unescaped, '')) {
    +                            unescaped = unescaped.substr(0, unescaped.length - 9);
    +                        }
    +                        unpacked = unescaped;
    +                    }
    +                    // throw to terminate the script
    +                    unpacked = "// Unpacker warning: be careful when using myobfuscate.com for your projects:\n" +
    +                        "// scripts obfuscated by the free online version may call back home.\n" +
    +                        "\n//\n" + unpacked;
    +                    throw unpacked;
    +                }; // jshint ignore:line
    +                __eval(str); // should throw
    +            } catch (e) {
    +                // well, it failed. we'll just return the original, instead of crashing on user.
    +                if (typeof e === "string") {
    +                    str = e;
    +                }
    +            }
    +            eval = __eval; // jshint ignore:line
    +        }
    +        return str;
    +    },
    +
    +    starts_with: function(str, what) {
    +        return str.substr(0, what.length) === what;
    +    },
    +
    +    ends_with: function(str, what) {
    +        return str.substr(str.length - what.length, what.length) === what;
    +    },
    +
    +    run_tests: function(sanity_test) {
    +        var t = sanity_test || new SanityTest();
    +
    +        return t;
    +    }
    +
    +
    +};
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js b/node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js
    new file mode 100644
    index 0000000..0fbb405
    --- /dev/null
    +++ b/node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js
    @@ -0,0 +1,83 @@
    +//
    +// Unpacker for Dean Edward's p.a.c.k.e.r, a part of javascript beautifier
    +// written by Einar Lielmanis 
    +//
    +// Coincidentally, it can defeat a couple of other eval-based compressors.
    +//
    +// usage:
    +//
    +// if (P_A_C_K_E_R.detect(some_string)) {
    +//     var unpacked = P_A_C_K_E_R.unpack(some_string);
    +// }
    +//
    +//
    +
    +var P_A_C_K_E_R = {
    +    detect: function(str) {
    +        return (P_A_C_K_E_R.get_chunks(str).length > 0);
    +    },
    +
    +    get_chunks: function(str) {
    +        var chunks = str.match(/eval\(\(?function\(.*?(,0,\{\}\)\)|split\('\|'\)\)\))($|\n)/g);
    +        return chunks ? chunks : [];
    +    },
    +
    +    unpack: function(str) {
    +        var chunks = P_A_C_K_E_R.get_chunks(str),
    +            chunk;
    +        for (var i = 0; i < chunks.length; i++) {
    +            chunk = chunks[i].replace(/\n$/, '');
    +            str = str.split(chunk).join(P_A_C_K_E_R.unpack_chunk(chunk));
    +        }
    +        return str;
    +    },
    +
    +    unpack_chunk: function(str) {
    +        var unpacked_source = '';
    +        var __eval = eval;
    +        if (P_A_C_K_E_R.detect(str)) {
    +            try {
    +                eval = function(s) { // jshint ignore:line
    +                    unpacked_source += s;
    +                    return unpacked_source;
    +                }; // jshint ignore:line
    +                __eval(str);
    +                if (typeof unpacked_source === 'string' && unpacked_source) {
    +                    str = unpacked_source;
    +                }
    +            } catch (e) {
    +                // well, it failed. we'll just return the original, instead of crashing on user.
    +            }
    +        }
    +        eval = __eval; // jshint ignore:line
    +        return str;
    +    },
    +
    +    run_tests: function(sanity_test) {
    +        var t = sanity_test || new SanityTest();
    +
    +        var pk1 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'var||a'.split('|'),0,{}))";
    +        var unpk1 = 'var a=1';
    +        var pk2 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'foo||b'.split('|'),0,{}))";
    +        var unpk2 = 'foo b=1';
    +        var pk_broken = "eval(function(p,a,c,k,e,r){BORKBORK;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'var||a'.split('|'),0,{}))";
    +        var pk3 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1{}))',3,3,'var||a'.split('|'),0,{}))";
    +        var unpk3 = 'var a=1{}))';
    +
    +        t.test_function(P_A_C_K_E_R.detect, "P_A_C_K_E_R.detect");
    +        t.expect('', false);
    +        t.expect('var a = b', false);
    +        t.test_function(P_A_C_K_E_R.unpack, "P_A_C_K_E_R.unpack");
    +        t.expect(pk_broken, pk_broken);
    +        t.expect(pk1, unpk1);
    +        t.expect(pk2, unpk2);
    +        t.expect(pk3, unpk3);
    +
    +        var filler = '\nfiller\n';
    +        t.expect(filler + pk1 + "\n" + pk_broken + filler + pk2 + filler, filler + unpk1 + "\n" + pk_broken + filler + unpk2 + filler);
    +
    +        return t;
    +    }
    +
    +
    +};
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js b/node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js
    new file mode 100644
    index 0000000..71c72ea
    --- /dev/null
    +++ b/node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js
    @@ -0,0 +1,73 @@
    +/*global unescape */
    +/*jshint curly: false, scripturl: true */
    +//
    +// trivial bookmarklet/escaped script detector for the javascript beautifier
    +// written by Einar Lielmanis 
    +//
    +// usage:
    +//
    +// if (Urlencoded.detect(some_string)) {
    +//     var unpacked = Urlencoded.unpack(some_string);
    +// }
    +//
    +//
    +
    +var isNode = (typeof module !== 'undefined' && module.exports);
    +if (isNode) {
    +    var SanityTest = require(__dirname + '/../../test/sanitytest');
    +}
    +
    +var Urlencoded = {
    +    detect: function(str) {
    +        // the fact that script doesn't contain any space, but has %20 instead
    +        // should be sufficient check for now.
    +        if (str.indexOf(' ') === -1) {
    +            if (str.indexOf('%2') !== -1) return true;
    +            if (str.replace(/[^%]+/g, '').length > 3) return true;
    +        }
    +        return false;
    +    },
    +
    +    unpack: function(str) {
    +        if (Urlencoded.detect(str)) {
    +            if (str.indexOf('%2B') !== -1 || str.indexOf('%2b') !== -1) {
    +                // "+" escaped as "%2B"
    +                return unescape(str.replace(/\+/g, '%20'));
    +            } else {
    +                return unescape(str);
    +            }
    +        }
    +        return str;
    +    },
    +
    +
    +
    +    run_tests: function(sanity_test) {
    +        var t = sanity_test || new SanityTest();
    +        t.test_function(Urlencoded.detect, "Urlencoded.detect");
    +        t.expect('', false);
    +        t.expect('var a = b', false);
    +        t.expect('var%20a+=+b', true);
    +        t.expect('var%20a=b', true);
    +        t.expect('var%20%21%22', true);
    +        t.expect('javascript:(function(){var%20whatever={init:function(){alert(%22a%22+%22b%22)}};whatever.init()})();', true);
    +        t.test_function(Urlencoded.unpack, 'Urlencoded.unpack');
    +
    +        t.expect('javascript:(function(){var%20whatever={init:function(){alert(%22a%22+%22b%22)}};whatever.init()})();',
    +            'javascript:(function(){var whatever={init:function(){alert("a"+"b")}};whatever.init()})();'
    +        );
    +        t.expect('', '');
    +        t.expect('abcd', 'abcd');
    +        t.expect('var a = b', 'var a = b');
    +        t.expect('var%20a=b', 'var a=b');
    +        t.expect('var%20a=b+1', 'var a=b+1');
    +        t.expect('var%20a=b%2b1', 'var a=b+1');
    +        return t;
    +    }
    +
    +
    +};
    +
    +if (isNode) {
    +    module.exports = Urlencoded;
    +}
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/src/core/acorn.js b/node_modules/js-beautify/js/src/core/acorn.js
    new file mode 100644
    index 0000000..bbfc48c
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/core/acorn.js
    @@ -0,0 +1,63 @@
    +/* jshint curly: false */
    +// This section of code is taken from acorn.
    +//
    +// Acorn was written by Marijn Haverbeke and released under an MIT
    +// license. The Unicode regexps (for identifiers and whitespace) were
    +// taken from [Esprima](http://esprima.org) by Ariya Hidayat.
    +//
    +// Git repositories for Acorn are available at
    +//
    +//     http://marijnhaverbeke.nl/git/acorn
    +//     https://github.com/marijnh/acorn.git
    +
    +// ## Character categories
    +
    +// Big ugly regular expressions that match characters in the
    +// whitespace, identifier, and identifier-start categories. These
    +// are only applied when a character is found to actually have a
    +// code point above 128.
    +
    +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line
    +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\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\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
    +var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
    +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
    +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
    +
    +// Whether a single character denotes a newline.
    +
    +exports.newline = /[\n\r\u2028\u2029]/;
    +
    +// Matches a whole line break (where CRLF is considered a single
    +// line break). Used to count lines.
    +
    +// in javascript, these two differ
    +// in python they are the same, different methods are called on them
    +exports.lineBreak = new RegExp('\r\n|' + exports.newline.source);
    +exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');
    +
    +
    +// Test whether a given character code starts an identifier.
    +
    +exports.isIdentifierStart = function(code) {
    +    // permit $ (36) and @ (64). @ is used in ES7 decorators.
    +    if (code < 65) return code === 36 || code === 64;
    +    // 65 through 91 are uppercase letters.
    +    if (code < 91) return true;
    +    // permit _ (95).
    +    if (code < 97) return code === 95;
    +    // 97 through 123 are lowercase letters.
    +    if (code < 123) return true;
    +    return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
    +};
    +
    +// Test whether a given character is part of an identifier.
    +
    +exports.isIdentifierChar = function(code) {
    +    if (code < 48) return code === 36;
    +    if (code < 58) return true;
    +    if (code < 65) return false;
    +    if (code < 91) return true;
    +    if (code < 97) return code === 95;
    +    if (code < 123) return true;
    +    return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
    +};
    diff --git a/node_modules/js-beautify/js/src/core/inputscanner.js b/node_modules/js-beautify/js/src/core/inputscanner.js
    new file mode 100644
    index 0000000..a1a733f
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/core/inputscanner.js
    @@ -0,0 +1,95 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function InputScanner(input) {
    +    var _input = input;
    +    var _input_length = _input.length;
    +    var _position = 0;
    +
    +    this.back = function() {
    +        _position -= 1;
    +    };
    +
    +    this.hasNext = function() {
    +        return _position < _input_length;
    +    };
    +
    +    this.next = function() {
    +        var val = null;
    +        if (this.hasNext()) {
    +            val = _input.charAt(_position);
    +            _position += 1;
    +        }
    +        return val;
    +    };
    +
    +    this.peek = function(index) {
    +        var val = null;
    +        index = index || 0;
    +        index += _position;
    +        if (index >= 0 && index < _input_length) {
    +            val = _input.charAt(index);
    +        }
    +        return val;
    +    };
    +
    +    this.peekCharCode = function(index) {
    +        var val = 0;
    +        index = index || 0;
    +        index += _position;
    +        if (index >= 0 && index < _input_length) {
    +            val = _input.charCodeAt(index);
    +        }
    +        return val;
    +    };
    +
    +    this.test = function(pattern, index) {
    +        index = index || 0;
    +        pattern.lastIndex = _position + index;
    +        return pattern.test(_input);
    +    };
    +
    +    this.testChar = function(pattern, index) {
    +        var val = this.peek(index);
    +        return val !== null && pattern.test(val);
    +    };
    +
    +    this.match = function(pattern) {
    +        pattern.lastIndex = _position;
    +        var pattern_match = pattern.exec(_input);
    +        if (pattern_match && pattern_match.index === _position) {
    +            _position += pattern_match[0].length;
    +        } else {
    +            pattern_match = null;
    +        }
    +        return pattern_match;
    +    };
    +}
    +
    +
    +module.exports.InputScanner = InputScanner;
    diff --git a/node_modules/js-beautify/js/src/core/options.js b/node_modules/js-beautify/js/src/core/options.js
    new file mode 100644
    index 0000000..d3473cd
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/core/options.js
    @@ -0,0 +1,48 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function mergeOpts(allOptions, targetType) {
    +    var finalOpts = {};
    +    var name;
    +
    +    for (name in allOptions) {
    +        if (name !== targetType) {
    +            finalOpts[name] = allOptions[name];
    +        }
    +    }
    +
    +    //merge in the per type settings for the targetType
    +    if (targetType in allOptions) {
    +        for (name in allOptions[targetType]) {
    +            finalOpts[name] = allOptions[targetType][name];
    +        }
    +    }
    +    return finalOpts;
    +}
    +
    +module.exports.mergeOpts = mergeOpts;
    diff --git a/node_modules/js-beautify/js/src/core/output.js b/node_modules/js-beautify/js/src/core/output.js
    new file mode 100644
    index 0000000..fc191af
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/core/output.js
    @@ -0,0 +1,234 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function OutputLine(parent) {
    +    var _character_count = 0;
    +    // use indent_count as a marker for lines that have preserved indentation
    +    var _indent_count = -1;
    +
    +    var _items = [];
    +    var _empty = true;
    +
    +    this.set_indent = function(level) {
    +        _character_count = parent.baseIndentLength + level * parent.indent_length;
    +        _indent_count = level;
    +    };
    +
    +    this.get_character_count = function() {
    +        return _character_count;
    +    };
    +
    +    this.is_empty = function() {
    +        return _empty;
    +    };
    +
    +    this.last = function() {
    +        if (!this._empty) {
    +            return _items[_items.length - 1];
    +        } else {
    +            return null;
    +        }
    +    };
    +
    +    this.push = function(input) {
    +        _items.push(input);
    +        _character_count += input.length;
    +        _empty = false;
    +    };
    +
    +    this.pop = function() {
    +        var item = null;
    +        if (!_empty) {
    +            item = _items.pop();
    +            _character_count -= item.length;
    +            _empty = _items.length === 0;
    +        }
    +        return item;
    +    };
    +
    +    this.remove_indent = function() {
    +        if (_indent_count > 0) {
    +            _indent_count -= 1;
    +            _character_count -= parent.indent_length;
    +        }
    +    };
    +
    +    this.trim = function() {
    +        while (this.last() === ' ') {
    +            _items.pop();
    +            _character_count -= 1;
    +        }
    +        _empty = _items.length === 0;
    +    };
    +
    +    this.toString = function() {
    +        var result = '';
    +        if (!this._empty) {
    +            if (_indent_count >= 0) {
    +                result = parent.indent_cache[_indent_count];
    +            }
    +            result += _items.join('');
    +        }
    +        return result;
    +    };
    +}
    +
    +function Output(indent_string, baseIndentString) {
    +    baseIndentString = baseIndentString || '';
    +    this.indent_cache = [baseIndentString];
    +    this.baseIndentLength = baseIndentString.length;
    +    this.indent_length = indent_string.length;
    +    this.raw = false;
    +
    +    var lines = [];
    +    this.baseIndentString = baseIndentString;
    +    this.indent_string = indent_string;
    +    this.previous_line = null;
    +    this.current_line = null;
    +    this.space_before_token = false;
    +
    +    this.add_outputline = function() {
    +        this.previous_line = this.current_line;
    +        this.current_line = new OutputLine(this);
    +        lines.push(this.current_line);
    +    };
    +
    +    // initialize
    +    this.add_outputline();
    +
    +
    +    this.get_line_number = function() {
    +        return lines.length;
    +    };
    +
    +    // Using object instead of string to allow for later expansion of info about each line
    +    this.add_new_line = function(force_newline) {
    +        if (this.get_line_number() === 1 && this.just_added_newline()) {
    +            return false; // no newline on start of file
    +        }
    +
    +        if (force_newline || !this.just_added_newline()) {
    +            if (!this.raw) {
    +                this.add_outputline();
    +            }
    +            return true;
    +        }
    +
    +        return false;
    +    };
    +
    +    this.get_code = function(end_with_newline, eol) {
    +        var sweet_code = lines.join('\n').replace(/[\r\n\t ]+$/, '');
    +
    +        if (end_with_newline) {
    +            sweet_code += '\n';
    +        }
    +
    +        if (eol !== '\n') {
    +            sweet_code = sweet_code.replace(/[\n]/g, eol);
    +        }
    +
    +        return sweet_code;
    +    };
    +
    +    this.set_indent = function(level) {
    +        // Never indent your first output indent at the start of the file
    +        if (lines.length > 1) {
    +            while (level >= this.indent_cache.length) {
    +                this.indent_cache.push(this.indent_cache[this.indent_cache.length - 1] + this.indent_string);
    +            }
    +
    +            this.current_line.set_indent(level);
    +            return true;
    +        }
    +        this.current_line.set_indent(0);
    +        return false;
    +    };
    +
    +    this.add_raw_token = function(token) {
    +        for (var x = 0; x < token.newlines; x++) {
    +            this.add_outputline();
    +        }
    +        this.current_line.push(token.whitespace_before);
    +        this.current_line.push(token.text);
    +        this.space_before_token = false;
    +    };
    +
    +    this.add_token = function(printable_token) {
    +        this.add_space_before_token();
    +        this.current_line.push(printable_token);
    +    };
    +
    +    this.add_space_before_token = function() {
    +        if (this.space_before_token && !this.just_added_newline()) {
    +            this.current_line.push(' ');
    +        }
    +        this.space_before_token = false;
    +    };
    +
    +    this.remove_indent = function(index) {
    +        var output_length = lines.length;
    +        while (index < output_length) {
    +            lines[index].remove_indent();
    +            index++;
    +        }
    +    };
    +
    +    this.trim = function(eat_newlines) {
    +        eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
    +
    +        this.current_line.trim(indent_string, baseIndentString);
    +
    +        while (eat_newlines && lines.length > 1 &&
    +            this.current_line.is_empty()) {
    +            lines.pop();
    +            this.current_line = lines[lines.length - 1];
    +            this.current_line.trim();
    +        }
    +
    +        this.previous_line = lines.length > 1 ? lines[lines.length - 2] : null;
    +    };
    +
    +    this.just_added_newline = function() {
    +        return this.current_line.is_empty();
    +    };
    +
    +    this.just_added_blankline = function() {
    +        if (this.just_added_newline()) {
    +            if (lines.length === 1) {
    +                return true; // start of the file and newline = blank
    +            }
    +
    +            var line = lines[lines.length - 2];
    +            return line.is_empty();
    +        }
    +        return false;
    +    };
    +}
    +
    +module.exports.Output = Output;
    diff --git a/node_modules/js-beautify/js/src/core/token.js b/node_modules/js-beautify/js/src/core/token.js
    new file mode 100644
    index 0000000..188c48d
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/core/token.js
    @@ -0,0 +1,49 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +
    +function Token(type, text, newlines, whitespace_before, parent) {
    +    this.type = type;
    +    this.text = text;
    +
    +    // comments_before are
    +    // comments that have a new line before them
    +    // and may or may not have a newline after
    +    // this is a set of comments before
    +    this.comments_before = /* inline comment*/ [];
    +
    +
    +    this.comments_after = []; // no new line before and newline after
    +    this.newlines = newlines || 0;
    +    this.wanted_newline = newlines > 0;
    +    this.whitespace_before = whitespace_before || '';
    +    this.parent = parent || null;
    +    this.opened = null;
    +    this.directives = null;
    +}
    +
    +module.exports.Token = Token;
    diff --git a/node_modules/js-beautify/js/src/css/beautifier.js b/node_modules/js-beautify/js/src/css/beautifier.js
    new file mode 100644
    index 0000000..040cc9b
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/css/beautifier.js
    @@ -0,0 +1,479 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 mergeOpts = require('core/options').mergeOpts;
    +var acorn = require('core/acorn');
    +var Output = require('core/output').Output;
    +
    +
    +var lineBreak = acorn.lineBreak;
    +var allLineBreaks = acorn.allLineBreaks;
    +
    +function Beautifier(source_text, options) {
    +    options = options || {};
    +
    +    // Allow the setting of language/file-type specific options
    +    // with inheritance of overall settings
    +    options = mergeOpts(options, 'css');
    +
    +    source_text = source_text || '';
    +
    +    var newlinesFromLastWSEat = 0;
    +    var indentSize = options.indent_size ? parseInt(options.indent_size, 10) : 4;
    +    var indentCharacter = options.indent_char || ' ';
    +    var preserve_newlines = (options.preserve_newlines === undefined) ? false : options.preserve_newlines;
    +    var selectorSeparatorNewline = (options.selector_separator_newline === undefined) ? true : options.selector_separator_newline;
    +    var end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline;
    +    var newline_between_rules = (options.newline_between_rules === undefined) ? true : options.newline_between_rules;
    +    var space_around_combinator = (options.space_around_combinator === undefined) ? false : options.space_around_combinator;
    +    space_around_combinator = space_around_combinator || ((options.space_around_selector_separator === undefined) ? false : options.space_around_selector_separator);
    +    var eol = options.eol ? options.eol : 'auto';
    +
    +    if (options.indent_with_tabs) {
    +        indentCharacter = '\t';
    +        indentSize = 1;
    +    }
    +
    +    if (eol === 'auto') {
    +        eol = '\n';
    +        if (source_text && lineBreak.test(source_text || '')) {
    +            eol = source_text.match(lineBreak)[0];
    +        }
    +    }
    +
    +    eol = eol.replace(/\\r/, '\r').replace(/\\n/, '\n');
    +
    +    // HACK: newline parsing inconsistent. This brute force normalizes the input.
    +    source_text = source_text.replace(allLineBreaks, '\n');
    +
    +    // tokenizer
    +    var whiteRe = /^\s+$/;
    +
    +    var pos = -1,
    +        ch;
    +    var parenLevel = 0;
    +
    +    function next() {
    +        ch = source_text.charAt(++pos);
    +        return ch || '';
    +    }
    +
    +    function peek(skipWhitespace) {
    +        var result = '';
    +        var prev_pos = pos;
    +        if (skipWhitespace) {
    +            eatWhitespace();
    +        }
    +        result = source_text.charAt(pos + 1) || '';
    +        pos = prev_pos - 1;
    +        next();
    +        return result;
    +    }
    +
    +    function eatString(endChars) {
    +        var start = pos;
    +        while (next()) {
    +            if (ch === "\\") {
    +                next();
    +            } else if (endChars.indexOf(ch) !== -1) {
    +                break;
    +            } else if (ch === "\n") {
    +                break;
    +            }
    +        }
    +        return source_text.substring(start, pos + 1);
    +    }
    +
    +    function peekString(endChar) {
    +        var prev_pos = pos;
    +        var str = eatString(endChar);
    +        pos = prev_pos - 1;
    +        next();
    +        return str;
    +    }
    +
    +    function eatWhitespace(preserve_newlines_local) {
    +        var result = 0;
    +        while (whiteRe.test(peek())) {
    +            next();
    +            if (ch === '\n' && preserve_newlines_local && preserve_newlines) {
    +                output.add_new_line(true);
    +                result++;
    +            }
    +        }
    +        newlinesFromLastWSEat = result;
    +        return result;
    +    }
    +
    +    function skipWhitespace() {
    +        var result = '';
    +        if (ch && whiteRe.test(ch)) {
    +            result = ch;
    +        }
    +        while (whiteRe.test(next())) {
    +            result += ch;
    +        }
    +        return result;
    +    }
    +
    +    function eatComment() {
    +        var start = pos;
    +        var singleLine = peek() === "/";
    +        next();
    +        while (next()) {
    +            if (!singleLine && ch === "*" && peek() === "/") {
    +                next();
    +                break;
    +            } else if (singleLine && ch === "\n") {
    +                return source_text.substring(start, pos);
    +            }
    +        }
    +
    +        return source_text.substring(start, pos) + ch;
    +    }
    +
    +
    +    function lookBack(str) {
    +        return source_text.substring(pos - str.length, pos).toLowerCase() ===
    +            str;
    +    }
    +
    +    // Nested pseudo-class if we are insideRule
    +    // and the next special character found opens
    +    // a new block
    +    function foundNestedPseudoClass() {
    +        var openParen = 0;
    +        for (var i = pos + 1; i < source_text.length; i++) {
    +            var ch = source_text.charAt(i);
    +            if (ch === "{") {
    +                return true;
    +            } else if (ch === '(') {
    +                // pseudoclasses can contain ()
    +                openParen += 1;
    +            } else if (ch === ')') {
    +                if (openParen === 0) {
    +                    return false;
    +                }
    +                openParen -= 1;
    +            } else if (ch === ";" || ch === "}") {
    +                return false;
    +            }
    +        }
    +        return false;
    +    }
    +
    +    // printer
    +    var baseIndentString = '';
    +    var preindent_index = 0;
    +    if (source_text && source_text.length) {
    +        while ((source_text.charAt(preindent_index) === ' ' ||
    +                source_text.charAt(preindent_index) === '\t')) {
    +            preindent_index += 1;
    +        }
    +        baseIndentString = source_text.substring(0, preindent_index);
    +        source_text = source_text.substring(preindent_index);
    +    }
    +
    +
    +    var singleIndent = new Array(indentSize + 1).join(indentCharacter);
    +    var indentLevel;
    +    var nestedLevel;
    +    var output;
    +
    +    function print_string(output_string) {
    +        if (output.just_added_newline()) {
    +            output.set_indent(indentLevel);
    +        }
    +        output.add_token(output_string);
    +    }
    +
    +    function preserveSingleSpace(isAfterSpace) {
    +        if (isAfterSpace) {
    +            output.space_before_token = true;
    +        }
    +    }
    +
    +    function indent() {
    +        indentLevel++;
    +    }
    +
    +    function outdent() {
    +        if (indentLevel > 0) {
    +            indentLevel--;
    +        }
    +    }
    +
    +    /*_____________________--------------------_____________________*/
    +
    +    this.beautify = function() {
    +        // reset
    +        output = new Output(singleIndent, baseIndentString);
    +        indentLevel = 0;
    +        nestedLevel = 0;
    +
    +        pos = -1;
    +        ch = null;
    +        parenLevel = 0;
    +
    +        var insideRule = false;
    +        var insidePropertyValue = false;
    +        var enteringConditionalGroup = false;
    +        var top_ch = '';
    +        var last_top_ch = '';
    +
    +        while (true) {
    +            var whitespace = skipWhitespace();
    +            var isAfterSpace = whitespace !== '';
    +            var isAfterNewline = whitespace.indexOf('\n') !== -1;
    +            last_top_ch = top_ch;
    +            top_ch = ch;
    +
    +            if (!ch) {
    +                break;
    +            } else if (ch === '/' && peek() === '*') { /* css comment */
    +                var header = indentLevel === 0;
    +
    +                if (isAfterNewline || header) {
    +                    output.add_new_line();
    +                }
    +
    +                print_string(eatComment());
    +                output.add_new_line();
    +                if (header) {
    +                    output.add_new_line(true);
    +                }
    +            } else if (ch === '/' && peek() === '/') { // single line comment
    +                if (!isAfterNewline && last_top_ch !== '{') {
    +                    output.trim(true);
    +                }
    +                output.space_before_token = true;
    +                print_string(eatComment());
    +                output.add_new_line();
    +            } else if (ch === '@') {
    +                preserveSingleSpace(isAfterSpace);
    +
    +                // deal with less propery mixins @{...}
    +                if (peek() === '{') {
    +                    print_string(eatString('}'));
    +                } else {
    +                    print_string(ch);
    +
    +                    // strip trailing space, if present, for hash property checks
    +                    var variableOrRule = peekString(": ,;{}()[]/='\"");
    +
    +                    if (variableOrRule.match(/[ :]$/)) {
    +                        // we have a variable or pseudo-class, add it and insert one space before continuing
    +                        next();
    +                        variableOrRule = eatString(": ").replace(/\s$/, '');
    +                        print_string(variableOrRule);
    +                        output.space_before_token = true;
    +                    }
    +
    +                    variableOrRule = variableOrRule.replace(/\s$/, '');
    +
    +                    // might be a nesting at-rule
    +                    if (variableOrRule in this.NESTED_AT_RULE) {
    +                        nestedLevel += 1;
    +                        if (variableOrRule in this.CONDITIONAL_GROUP_RULE) {
    +                            enteringConditionalGroup = true;
    +                        }
    +                    }
    +                }
    +            } else if (ch === '#' && peek() === '{') {
    +                preserveSingleSpace(isAfterSpace);
    +                print_string(eatString('}'));
    +            } else if (ch === '{') {
    +                if (peek(true) === '}') {
    +                    eatWhitespace();
    +                    next();
    +                    output.space_before_token = true;
    +                    print_string("{}");
    +                    if (!eatWhitespace(true)) {
    +                        output.add_new_line();
    +                    }
    +
    +                    if (newlinesFromLastWSEat < 2 && newline_between_rules && indentLevel === 0) {
    +                        output.add_new_line(true);
    +                    }
    +                } else {
    +                    indent();
    +                    output.space_before_token = true;
    +                    print_string(ch);
    +                    if (!eatWhitespace(true)) {
    +                        output.add_new_line();
    +                    }
    +
    +                    // when entering conditional groups, only rulesets are allowed
    +                    if (enteringConditionalGroup) {
    +                        enteringConditionalGroup = false;
    +                        insideRule = (indentLevel > nestedLevel);
    +                    } else {
    +                        // otherwise, declarations are also allowed
    +                        insideRule = (indentLevel >= nestedLevel);
    +                    }
    +                }
    +            } else if (ch === '}') {
    +                outdent();
    +                output.add_new_line();
    +                print_string(ch);
    +                insideRule = false;
    +                insidePropertyValue = false;
    +                if (nestedLevel) {
    +                    nestedLevel--;
    +                }
    +
    +                if (!eatWhitespace(true)) {
    +                    output.add_new_line();
    +                }
    +
    +                if (newlinesFromLastWSEat < 2 && newline_between_rules && indentLevel === 0) {
    +                    output.add_new_line(true);
    +                }
    +            } else if (ch === ":") {
    +                eatWhitespace();
    +                if ((insideRule || enteringConditionalGroup) &&
    +                    !(lookBack("&") || foundNestedPseudoClass()) &&
    +                    !lookBack("(")) {
    +                    // 'property: value' delimiter
    +                    // which could be in a conditional group query
    +                    print_string(':');
    +                    if (!insidePropertyValue) {
    +                        insidePropertyValue = true;
    +                        output.space_before_token = true;
    +                    }
    +                } else {
    +                    // sass/less parent reference don't use a space
    +                    // sass nested pseudo-class don't use a space
    +
    +                    // preserve space before pseudoclasses/pseudoelements, as it means "in any child"
    +                    if (lookBack(" ")) {
    +                        output.space_before_token = true;
    +                    }
    +                    if (peek() === ":") {
    +                        // pseudo-element
    +                        next();
    +                        print_string("::");
    +                    } else {
    +                        // pseudo-class
    +                        print_string(':');
    +                    }
    +                }
    +            } else if (ch === '"' || ch === '\'') {
    +                preserveSingleSpace(isAfterSpace);
    +                print_string(eatString(ch));
    +            } else if (ch === ';') {
    +                insidePropertyValue = false;
    +                print_string(ch);
    +                if (!eatWhitespace(true)) {
    +                    output.add_new_line();
    +                }
    +            } else if (ch === '(') { // may be a url
    +                if (lookBack("url")) {
    +                    print_string(ch);
    +                    eatWhitespace();
    +                    if (next()) {
    +                        if (ch !== ')' && ch !== '"' && ch !== '\'') {
    +                            print_string(eatString(')'));
    +                        } else {
    +                            pos--;
    +                        }
    +                    }
    +                } else {
    +                    parenLevel++;
    +                    preserveSingleSpace(isAfterSpace);
    +                    print_string(ch);
    +                    eatWhitespace();
    +                }
    +            } else if (ch === ')') {
    +                print_string(ch);
    +                parenLevel--;
    +            } else if (ch === ',') {
    +                print_string(ch);
    +                if (!eatWhitespace(true) && selectorSeparatorNewline && !insidePropertyValue && parenLevel < 1) {
    +                    output.add_new_line();
    +                } else {
    +                    output.space_before_token = true;
    +                }
    +            } else if ((ch === '>' || ch === '+' || ch === '~') &&
    +                !insidePropertyValue && parenLevel < 1) {
    +                //handle combinator spacing
    +                if (space_around_combinator) {
    +                    output.space_before_token = true;
    +                    print_string(ch);
    +                    output.space_before_token = true;
    +                } else {
    +                    print_string(ch);
    +                    eatWhitespace();
    +                    // squash extra whitespace
    +                    if (ch && whiteRe.test(ch)) {
    +                        ch = '';
    +                    }
    +                }
    +            } else if (ch === ']') {
    +                print_string(ch);
    +            } else if (ch === '[') {
    +                preserveSingleSpace(isAfterSpace);
    +                print_string(ch);
    +            } else if (ch === '=') { // no whitespace before or after
    +                eatWhitespace();
    +                print_string('=');
    +                if (whiteRe.test(ch)) {
    +                    ch = '';
    +                }
    +            } else if (ch === '!') { // !important
    +                print_string(' ');
    +                print_string(ch);
    +            } else {
    +                preserveSingleSpace(isAfterSpace);
    +                print_string(ch);
    +            }
    +        }
    +
    +        var sweetCode = output.get_code(end_with_newline, eol);
    +
    +        return sweetCode;
    +    };
    +
    +    // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule
    +    this.NESTED_AT_RULE = {
    +        "@page": true,
    +        "@font-face": true,
    +        "@keyframes": true,
    +        // also in CONDITIONAL_GROUP_RULE below
    +        "@media": true,
    +        "@supports": true,
    +        "@document": true
    +    };
    +    this.CONDITIONAL_GROUP_RULE = {
    +        "@media": true,
    +        "@supports": true,
    +        "@document": true
    +    };
    +}
    +
    +module.exports.Beautifier = Beautifier;
    diff --git a/node_modules/js-beautify/js/src/css/index.js b/node_modules/js-beautify/js/src/css/index.js
    new file mode 100644
    index 0000000..fbf2dfa
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/css/index.js
    @@ -0,0 +1,36 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 Beautifier = require('./beautifier').Beautifier;
    +
    +function css_beautify(source_text, options) {
    +    var beautifier = new Beautifier(source_text, options);
    +    return beautifier.beautify();
    +}
    +
    +module.exports = css_beautify;
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/src/html/beautifier.js b/node_modules/js-beautify/js/src/html/beautifier.js
    new file mode 100644
    index 0000000..61f5f5a
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/html/beautifier.js
    @@ -0,0 +1,1035 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 mergeOpts = require('core/options').mergeOpts;
    +var acorn = require('core/acorn');
    +
    +
    +var lineBreak = acorn.lineBreak;
    +var allLineBreaks = acorn.allLineBreaks;
    +
    +// function trim(s) {
    +//     return s.replace(/^\s+|\s+$/g, '');
    +// }
    +
    +function ltrim(s) {
    +    return s.replace(/^\s+/g, '');
    +}
    +
    +function rtrim(s) {
    +    return s.replace(/\s+$/g, '');
    +}
    +
    +function Beautifier(html_source, options, js_beautify, css_beautify) {
    +    //Wrapper function to invoke all the necessary constructors and deal with the output.
    +    html_source = html_source || '';
    +
    +    var multi_parser,
    +        indent_inner_html,
    +        indent_body_inner_html,
    +        indent_head_inner_html,
    +        indent_size,
    +        indent_character,
    +        wrap_line_length,
    +        brace_style,
    +        unformatted,
    +        content_unformatted,
    +        preserve_newlines,
    +        max_preserve_newlines,
    +        indent_handlebars,
    +        wrap_attributes,
    +        wrap_attributes_indent_size,
    +        is_wrap_attributes_force,
    +        is_wrap_attributes_force_expand_multiline,
    +        is_wrap_attributes_force_aligned,
    +        end_with_newline,
    +        extra_liners,
    +        eol;
    +
    +    options = options || {};
    +
    +    // Allow the setting of language/file-type specific options
    +    // with inheritance of overall settings
    +    options = mergeOpts(options, 'html');
    +
    +    // backwards compatibility to 1.3.4
    +    if ((options.wrap_line_length === undefined || parseInt(options.wrap_line_length, 10) === 0) &&
    +        (options.max_char !== undefined && parseInt(options.max_char, 10) !== 0)) {
    +        options.wrap_line_length = options.max_char;
    +    }
    +
    +    indent_inner_html = (options.indent_inner_html === undefined) ? false : options.indent_inner_html;
    +    indent_body_inner_html = (options.indent_body_inner_html === undefined) ? true : options.indent_body_inner_html;
    +    indent_head_inner_html = (options.indent_head_inner_html === undefined) ? true : options.indent_head_inner_html;
    +    indent_size = (options.indent_size === undefined) ? 4 : parseInt(options.indent_size, 10);
    +    indent_character = (options.indent_char === undefined) ? ' ' : options.indent_char;
    +    brace_style = (options.brace_style === undefined) ? 'collapse' : options.brace_style;
    +    wrap_line_length = parseInt(options.wrap_line_length, 10) === 0 ? 32786 : parseInt(options.wrap_line_length || 250, 10);
    +    unformatted = options.unformatted || [
    +        // https://www.w3.org/TR/html5/dom.html#phrasing-content
    +        'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite',
    +        'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img',
    +        'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript',
    +        'object', 'output', 'progress', 'q', 'ruby', 's', 'samp', /* 'script', */ 'select', 'small',
    +        'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var',
    +        'video', 'wbr', 'text',
    +        // prexisting - not sure of full effect of removing, leaving in
    +        'acronym', 'address', 'big', 'dt', 'ins', 'strike', 'tt',
    +    ];
    +    content_unformatted = options.content_unformatted || [
    +        'pre',
    +    ];
    +    preserve_newlines = (options.preserve_newlines === undefined) ? true : options.preserve_newlines;
    +    max_preserve_newlines = preserve_newlines ?
    +        (isNaN(parseInt(options.max_preserve_newlines, 10)) ? 32786 : parseInt(options.max_preserve_newlines, 10)) :
    +        0;
    +    indent_handlebars = (options.indent_handlebars === undefined) ? false : options.indent_handlebars;
    +    wrap_attributes = (options.wrap_attributes === undefined) ? 'auto' : options.wrap_attributes;
    +    wrap_attributes_indent_size = (isNaN(parseInt(options.wrap_attributes_indent_size, 10))) ? indent_size : parseInt(options.wrap_attributes_indent_size, 10);
    +    is_wrap_attributes_force = wrap_attributes.substr(0, 'force'.length) === 'force';
    +    is_wrap_attributes_force_expand_multiline = (wrap_attributes === 'force-expand-multiline');
    +    is_wrap_attributes_force_aligned = (wrap_attributes === 'force-aligned');
    +    end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline;
    +    extra_liners = (typeof options.extra_liners === 'object') && options.extra_liners ?
    +        options.extra_liners.concat() : (typeof options.extra_liners === 'string') ?
    +        options.extra_liners.split(',') : 'head,body,/html'.split(',');
    +    eol = options.eol ? options.eol : 'auto';
    +
    +    if (options.indent_with_tabs) {
    +        indent_character = '\t';
    +        indent_size = 1;
    +    }
    +
    +    if (eol === 'auto') {
    +        eol = '\n';
    +        if (html_source && lineBreak.test(html_source || '')) {
    +            eol = html_source.match(lineBreak)[0];
    +        }
    +    }
    +
    +    eol = eol.replace(/\\r/, '\r').replace(/\\n/, '\n');
    +
    +    // HACK: newline parsing inconsistent. This brute force normalizes the input.
    +    html_source = html_source.replace(allLineBreaks, '\n');
    +
    +    function Parser() {
    +
    +        this.pos = 0; //Parser position
    +        this.token = '';
    +        this.current_mode = 'CONTENT'; //reflects the current Parser mode: TAG/CONTENT
    +        this.tags = { //An object to hold tags, their position, and their parent-tags, initiated with default values
    +            parent: 'parent1',
    +            parentcount: 1,
    +            parent1: ''
    +        };
    +        this.tag_type = '';
    +        this.token_text = this.last_token = this.last_text = this.token_type = '';
    +        this.newlines = 0;
    +        this.indent_content = indent_inner_html;
    +        this.indent_body_inner_html = indent_body_inner_html;
    +        this.indent_head_inner_html = indent_head_inner_html;
    +
    +        this.Utils = { //Uilities made available to the various functions
    +            whitespace: "\n\r\t ".split(''),
    +
    +            single_token: options.void_elements || [
    +                // HTLM void elements - aka self-closing tags - aka singletons
    +                // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
    +                'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen',
    +                'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',
    +                // NOTE: Optional tags - are not understood.
    +                // https://www.w3.org/TR/html5/syntax.html#optional-tags
    +                // The rules for optional tags are too complex for a simple list
    +                // Also, the content of these tags should still be indented in many cases.
    +                // 'li' is a good exmple.
    +
    +                // Doctype and xml elements
    +                '!doctype', '?xml',
    +                // ?php tag
    +                '?php',
    +                // other tags that were in this list, keeping just in case
    +                'basefont', 'isindex'
    +            ],
    +            extra_liners: extra_liners, //for tags that need a line of whitespace before them
    +            in_array: function(what, arr) {
    +                for (var i = 0; i < arr.length; i++) {
    +                    if (what === arr[i]) {
    +                        return true;
    +                    }
    +                }
    +                return false;
    +            }
    +        };
    +
    +        // Return true if the given text is composed entirely of whitespace.
    +        this.is_whitespace = function(text) {
    +            for (var n = 0; n < text.length; n++) {
    +                if (!this.Utils.in_array(text.charAt(n), this.Utils.whitespace)) {
    +                    return false;
    +                }
    +            }
    +            return true;
    +        };
    +
    +        this.traverse_whitespace = function() {
    +            var input_char = '';
    +
    +            input_char = this.input.charAt(this.pos);
    +            if (this.Utils.in_array(input_char, this.Utils.whitespace)) {
    +                this.newlines = 0;
    +                while (this.Utils.in_array(input_char, this.Utils.whitespace)) {
    +                    if (preserve_newlines && input_char === '\n' && this.newlines <= max_preserve_newlines) {
    +                        this.newlines += 1;
    +                    }
    +
    +                    this.pos++;
    +                    input_char = this.input.charAt(this.pos);
    +                }
    +                return true;
    +            }
    +            return false;
    +        };
    +
    +        // Append a space to the given content (string array) or, if we are
    +        // at the wrap_line_length, append a newline/indentation.
    +        // return true if a newline was added, false if a space was added
    +        this.space_or_wrap = function(content) {
    +            if (this.line_char_count >= this.wrap_line_length) { //insert a line when the wrap_line_length is reached
    +                this.print_newline(false, content);
    +                this.print_indentation(content);
    +                return true;
    +            } else {
    +                this.line_char_count++;
    +                content.push(' ');
    +                return false;
    +            }
    +        };
    +
    +        this.get_content = function() { //function to capture regular content between tags
    +            var input_char = '',
    +                content = [],
    +                handlebarsStarted = 0;
    +
    +            while (this.input.charAt(this.pos) !== '<' || handlebarsStarted === 2) {
    +                if (this.pos >= this.input.length) {
    +                    return content.length ? content.join('') : ['', 'TK_EOF'];
    +                }
    +
    +                if (handlebarsStarted < 2 && this.traverse_whitespace()) {
    +                    this.space_or_wrap(content);
    +                    continue;
    +                }
    +
    +                input_char = this.input.charAt(this.pos);
    +
    +                if (indent_handlebars) {
    +                    if (input_char === '{') {
    +                        handlebarsStarted += 1;
    +                    } else if (handlebarsStarted < 2) {
    +                        handlebarsStarted = 0;
    +                    }
    +
    +                    if (input_char === '}' && handlebarsStarted > 0) {
    +                        if (handlebarsStarted-- === 0) {
    +                            break;
    +                        }
    +                    }
    +                    // Handlebars parsing is complicated.
    +                    // {{#foo}} and {{/foo}} are formatted tags.
    +                    // {{something}} should get treated as content, except:
    +                    // {{else}} specifically behaves like {{#if}} and {{/if}}
    +                    var peek3 = this.input.substr(this.pos, 3);
    +                    if (peek3 === '{{#' || peek3 === '{{/') {
    +                        // These are tags and not content.
    +                        break;
    +                    } else if (peek3 === '{{!') {
    +                        return [this.get_tag(), 'TK_TAG_HANDLEBARS_COMMENT'];
    +                    } else if (this.input.substr(this.pos, 2) === '{{') {
    +                        if (this.get_tag(true) === '{{else}}') {
    +                            break;
    +                        }
    +                    }
    +                }
    +
    +                this.pos++;
    +                this.line_char_count++;
    +                content.push(input_char); //letter at-a-time (or string) inserted to an array
    +            }
    +            return content.length ? content.join('') : '';
    +        };
    +
    +        this.get_contents_to = function(name) { //get the full content of a script or style to pass to js_beautify
    +            if (this.pos === this.input.length) {
    +                return ['', 'TK_EOF'];
    +            }
    +            var content = '';
    +            var reg_match = new RegExp('', 'igm');
    +            reg_match.lastIndex = this.pos;
    +            var reg_array = reg_match.exec(this.input);
    +            var end_script = reg_array ? reg_array.index : this.input.length; //absolute end of script
    +            if (this.pos < end_script) { //get everything in between the script tags
    +                content = this.input.substring(this.pos, end_script);
    +                this.pos = end_script;
    +            }
    +            return content;
    +        };
    +
    +        this.record_tag = function(tag) { //function to record a tag and its parent in this.tags Object
    +            if (this.tags[tag + 'count']) { //check for the existence of this tag type
    +                this.tags[tag + 'count']++;
    +                this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level
    +            } else { //otherwise initialize this tag type
    +                this.tags[tag + 'count'] = 1;
    +                this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level
    +            }
    +            this.tags[tag + this.tags[tag + 'count'] + 'parent'] = this.tags.parent; //set the parent (i.e. in the case of a div this.tags.div1parent)
    +            this.tags.parent = tag + this.tags[tag + 'count']; //and make this the current parent (i.e. in the case of a div 'div1')
    +        };
    +
    +        this.retrieve_tag = function(tag) { //function to retrieve the opening tag to the corresponding closer
    +            if (this.tags[tag + 'count']) { //if the openener is not in the Object we ignore it
    +                var temp_parent = this.tags.parent; //check to see if it's a closable tag.
    +                while (temp_parent) { //till we reach '' (the initial value);
    +                    if (tag + this.tags[tag + 'count'] === temp_parent) { //if this is it use it
    +                        break;
    +                    }
    +                    temp_parent = this.tags[temp_parent + 'parent']; //otherwise keep on climbing up the DOM Tree
    +                }
    +                if (temp_parent) { //if we caught something
    +                    this.indent_level = this.tags[tag + this.tags[tag + 'count']]; //set the indent_level accordingly
    +                    this.tags.parent = this.tags[temp_parent + 'parent']; //and set the current parent
    +                }
    +                delete this.tags[tag + this.tags[tag + 'count'] + 'parent']; //delete the closed tags parent reference...
    +                delete this.tags[tag + this.tags[tag + 'count']]; //...and the tag itself
    +                if (this.tags[tag + 'count'] === 1) {
    +                    delete this.tags[tag + 'count'];
    +                } else {
    +                    this.tags[tag + 'count']--;
    +                }
    +            }
    +        };
    +
    +        this.indent_to_tag = function(tag) {
    +            // Match the indentation level to the last use of this tag, but don't remove it.
    +            if (!this.tags[tag + 'count']) {
    +                return;
    +            }
    +            var temp_parent = this.tags.parent;
    +            while (temp_parent) {
    +                if (tag + this.tags[tag + 'count'] === temp_parent) {
    +                    break;
    +                }
    +                temp_parent = this.tags[temp_parent + 'parent'];
    +            }
    +            if (temp_parent) {
    +                this.indent_level = this.tags[tag + this.tags[tag + 'count']];
    +            }
    +        };
    +
    +        this.get_tag = function(peek) { //function to get a full tag and parse its type
    +            var input_char = '',
    +                content = [],
    +                comment = '',
    +                space = false,
    +                first_attr = true,
    +                has_wrapped_attrs = false,
    +                tag_start, tag_end,
    +                tag_start_char,
    +                orig_pos = this.pos,
    +                orig_line_char_count = this.line_char_count,
    +                is_tag_closed = false,
    +                tail;
    +
    +            peek = peek !== undefined ? peek : false;
    +
    +            do {
    +                if (this.pos >= this.input.length) {
    +                    if (peek) {
    +                        this.pos = orig_pos;
    +                        this.line_char_count = orig_line_char_count;
    +                    }
    +                    return content.length ? content.join('') : ['', 'TK_EOF'];
    +                }
    +
    +                input_char = this.input.charAt(this.pos);
    +                this.pos++;
    +
    +                if (this.Utils.in_array(input_char, this.Utils.whitespace)) { //don't want to insert unnecessary space
    +                    space = true;
    +                    continue;
    +                }
    +
    +                if (input_char === "'" || input_char === '"') {
    +                    input_char += this.get_unformatted(input_char);
    +                    space = true;
    +                }
    +
    +                if (input_char === '=') { //no space before =
    +                    space = false;
    +                }
    +                tail = this.input.substr(this.pos - 1);
    +                if (is_wrap_attributes_force_expand_multiline && has_wrapped_attrs && !is_tag_closed && (input_char === '>' || input_char === '/')) {
    +                    if (tail.match(/^\/?\s*>/)) {
    +                        space = false;
    +                        is_tag_closed = true;
    +                        this.print_newline(false, content);
    +                        this.print_indentation(content);
    +                    }
    +                }
    +                if (content.length && content[content.length - 1] !== '=' && input_char !== '>' && space) {
    +                    //no space after = or before >
    +                    var wrapped = this.space_or_wrap(content);
    +                    var indentAttrs = wrapped && input_char !== '/' && !is_wrap_attributes_force;
    +                    space = false;
    +
    +                    if (is_wrap_attributes_force && input_char !== '/') {
    +                        var force_first_attr_wrap = false;
    +                        if (is_wrap_attributes_force_expand_multiline && first_attr) {
    +                            var is_only_attribute = tail.match(/^\S*(="([^"]|\\")*")?\s*\/?\s*>/) !== null;
    +                            force_first_attr_wrap = !is_only_attribute;
    +                        }
    +                        if (!first_attr || force_first_attr_wrap) {
    +                            this.print_newline(false, content);
    +                            this.print_indentation(content);
    +                            indentAttrs = true;
    +                        }
    +                    }
    +                    if (indentAttrs) {
    +                        has_wrapped_attrs = true;
    +
    +                        //indent attributes an auto, forced, or forced-align line-wrap
    +                        var alignment_size = wrap_attributes_indent_size;
    +                        if (is_wrap_attributes_force_aligned) {
    +                            alignment_size = content.indexOf(' ') + 1;
    +                        }
    +
    +                        for (var count = 0; count < alignment_size; count++) {
    +                            // only ever further indent with spaces since we're trying to align characters
    +                            content.push(' ');
    +                        }
    +                    }
    +                    if (first_attr) {
    +                        for (var i = 0; i < content.length; i++) {
    +                            if (content[i] === ' ') {
    +                                first_attr = false;
    +                                break;
    +                            }
    +                        }
    +                    }
    +                }
    +
    +                if (indent_handlebars && tag_start_char === '<') {
    +                    // When inside an angle-bracket tag, put spaces around
    +                    // handlebars not inside of strings.
    +                    if ((input_char + this.input.charAt(this.pos)) === '{{') {
    +                        input_char += this.get_unformatted('}}');
    +                        if (content.length && content[content.length - 1] !== ' ' && content[content.length - 1] !== '<') {
    +                            input_char = ' ' + input_char;
    +                        }
    +                        space = true;
    +                    }
    +                }
    +
    +                if (input_char === '<' && !tag_start_char) {
    +                    tag_start = this.pos - 1;
    +                    tag_start_char = '<';
    +                }
    +
    +                if (indent_handlebars && !tag_start_char) {
    +                    if (content.length >= 2 && content[content.length - 1] === '{' && content[content.length - 2] === '{') {
    +                        if (input_char === '#' || input_char === '/' || input_char === '!') {
    +                            tag_start = this.pos - 3;
    +                        } else {
    +                            tag_start = this.pos - 2;
    +                        }
    +                        tag_start_char = '{';
    +                    }
    +                }
    +
    +                this.line_char_count++;
    +                content.push(input_char); //inserts character at-a-time (or string)
    +
    +                if (content[1] && (content[1] === '!' || content[1] === '?' || content[1] === '%')) { //if we're in a comment, do something special
    +                    // We treat all comments as literals, even more than preformatted tags
    +                    // we just look for the appropriate close tag
    +                    content = [this.get_comment(tag_start)];
    +                    break;
    +                }
    +
    +                if (indent_handlebars && content[1] && content[1] === '{' && content[2] && content[2] === '!') { //if we're in a comment, do something special
    +                    // We treat all comments as literals, even more than preformatted tags
    +                    // we just look for the appropriate close tag
    +                    content = [this.get_comment(tag_start)];
    +                    break;
    +                }
    +
    +                if (indent_handlebars && tag_start_char === '{' && content.length > 2 && content[content.length - 2] === '}' && content[content.length - 1] === '}') {
    +                    break;
    +                }
    +            } while (input_char !== '>');
    +
    +            var tag_complete = content.join('');
    +            var tag_index;
    +            var tag_offset;
    +
    +            // must check for space first otherwise the tag could have the first attribute included, and
    +            // then not un-indent correctly
    +            if (tag_complete.indexOf(' ') !== -1) { //if there's whitespace, thats where the tag name ends
    +                tag_index = tag_complete.indexOf(' ');
    +            } else if (tag_complete.indexOf('\n') !== -1) { //if there's a line break, thats where the tag name ends
    +                tag_index = tag_complete.indexOf('\n');
    +            } else if (tag_complete.charAt(0) === '{') {
    +                tag_index = tag_complete.indexOf('}');
    +            } else { //otherwise go with the tag ending
    +                tag_index = tag_complete.indexOf('>');
    +            }
    +            if (tag_complete.charAt(0) === '<' || !indent_handlebars) {
    +                tag_offset = 1;
    +            } else {
    +                tag_offset = tag_complete.charAt(2) === '#' ? 3 : 2;
    +            }
    +            var tag_check = tag_complete.substring(tag_offset, tag_index).toLowerCase();
    +            if (tag_complete.charAt(tag_complete.length - 2) === '/' ||
    +                this.Utils.in_array(tag_check, this.Utils.single_token)) { //if this tag name is a single tag type (either in the list or has a closing /)
    +                if (!peek) {
    +                    this.tag_type = 'SINGLE';
    +                }
    +            } else if (indent_handlebars && tag_complete.charAt(0) === '{' && tag_check === 'else') {
    +                if (!peek) {
    +                    this.indent_to_tag('if');
    +                    this.tag_type = 'HANDLEBARS_ELSE';
    +                    this.indent_content = true;
    +                    this.traverse_whitespace();
    +                }
    +            } else if (this.is_unformatted(tag_check, unformatted) ||
    +                this.is_unformatted(tag_check, content_unformatted)) {
    +                // do not reformat the "unformatted" or "content_unformatted" tags
    +                comment = this.get_unformatted('', tag_complete); //...delegate to get_unformatted function
    +                content.push(comment);
    +                tag_end = this.pos - 1;
    +                this.tag_type = 'SINGLE';
    +            } else if (tag_check === 'script' &&
    +                (tag_complete.search('type') === -1 ||
    +                    (tag_complete.search('type') > -1 &&
    +                        tag_complete.search(/\b(text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect)/) > -1))) {
    +                if (!peek) {
    +                    this.record_tag(tag_check);
    +                    this.tag_type = 'SCRIPT';
    +                }
    +            } else if (tag_check === 'style' &&
    +                (tag_complete.search('type') === -1 ||
    +                    (tag_complete.search('type') > -1 && tag_complete.search('text/css') > -1))) {
    +                if (!peek) {
    +                    this.record_tag(tag_check);
    +                    this.tag_type = 'STYLE';
    +                }
    +            } else if (tag_check.charAt(0) === '!') { //peek for ',
    +                matched = false;
    +
    +            this.pos = start_pos;
    +            var input_char = this.input.charAt(this.pos);
    +            this.pos++;
    +
    +            while (this.pos <= this.input.length) {
    +                comment += input_char;
    +
    +                // only need to check for the delimiter if the last chars match
    +                if (comment.charAt(comment.length - 1) === delimiter.charAt(delimiter.length - 1) &&
    +                    comment.indexOf(delimiter) !== -1) {
    +                    break;
    +                }
    +
    +                // only need to search for custom delimiter for the first few characters
    +                if (!matched && comment.length < 10) {
    +                    if (comment.indexOf('';
    +                        matched = true;
    +                    } else if (comment.indexOf('';
    +                        matched = true;
    +                    } else if (comment.indexOf('';
    +                        matched = true;
    +                    } else if (comment.indexOf('';
    +                        matched = true;
    +                    } else if (comment.indexOf('{{!--') === 0) { // {{!-- handlebars comment
    +                        delimiter = '--}}';
    +                        matched = true;
    +                    } else if (comment.indexOf('{{!') === 0) { // {{! handlebars comment
    +                        if (comment.length === 5 && comment.indexOf('{{!--') === -1) {
    +                            delimiter = '}}';
    +                            matched = true;
    +                        }
    +                    } else if (comment.indexOf('';
    +                        matched = true;
    +                    } else if (comment.indexOf('<%') === 0) { // {{! handlebars comment
    +                        delimiter = '%>';
    +                        matched = true;
    +                    }
    +                }
    +
    +                input_char = this.input.charAt(this.pos);
    +                this.pos++;
    +            }
    +
    +            return comment;
    +        };
    +
    +        function tokenMatcher(delimiter) {
    +            var token = '';
    +
    +            var add = function(str) {
    +                var newToken = token + str.toLowerCase();
    +                token = newToken.length <= delimiter.length ? newToken : newToken.substr(newToken.length - delimiter.length, delimiter.length);
    +            };
    +
    +            var doesNotMatch = function() {
    +                return token.indexOf(delimiter) === -1;
    +            };
    +
    +            return {
    +                add: add,
    +                doesNotMatch: doesNotMatch
    +            };
    +        }
    +
    +        this.get_unformatted = function(delimiter, orig_tag) { //function to return unformatted content in its entirety
    +            if (orig_tag && orig_tag.toLowerCase().indexOf(delimiter) !== -1) {
    +                return '';
    +            }
    +            var input_char = '';
    +            var content = '';
    +            var space = true;
    +
    +            var delimiterMatcher = tokenMatcher(delimiter);
    +
    +            do {
    +
    +                if (this.pos >= this.input.length) {
    +                    return content;
    +                }
    +
    +                input_char = this.input.charAt(this.pos);
    +                this.pos++;
    +
    +                if (this.Utils.in_array(input_char, this.Utils.whitespace)) {
    +                    if (!space) {
    +                        this.line_char_count--;
    +                        continue;
    +                    }
    +                    if (input_char === '\n' || input_char === '\r') {
    +                        content += '\n';
    +                        /*  Don't change tab indention for unformatted blocks.  If using code for html editing, this will greatly affect 
     tags if they are specified in the 'unformatted array'
    +            for (var i=0; i]*>\s*$/);
    +
    +            // if next_tag comes back but is not an isolated tag, then
    +            // let's treat the 'a' tag as having content
    +            // and respect the unformatted option
    +            if (!tag || this.Utils.in_array(tag[1], unformatted)) {
    +                return true;
    +            } else {
    +                return false;
    +            }
    +        };
    +
    +        this.printer = function(js_source, indent_character, indent_size, wrap_line_length, brace_style) { //handles input/output and some other printing functions
    +
    +            this.input = js_source || ''; //gets the input for the Parser
    +
    +            // HACK: newline parsing inconsistent. This brute force normalizes the input.
    +            this.input = this.input.replace(/\r\n|[\r\u2028\u2029]/g, '\n');
    +
    +            this.output = [];
    +            this.indent_character = indent_character;
    +            this.indent_string = '';
    +            this.indent_size = indent_size;
    +            this.brace_style = brace_style;
    +            this.indent_level = 0;
    +            this.wrap_line_length = wrap_line_length;
    +            this.line_char_count = 0; //count to see if wrap_line_length was exceeded
    +
    +            for (var i = 0; i < this.indent_size; i++) {
    +                this.indent_string += this.indent_character;
    +            }
    +
    +            this.print_newline = function(force, arr) {
    +                this.line_char_count = 0;
    +                if (!arr || !arr.length) {
    +                    return;
    +                }
    +                if (force || (arr[arr.length - 1] !== '\n')) { //we might want the extra line
    +                    if ((arr[arr.length - 1] !== '\n')) {
    +                        arr[arr.length - 1] = rtrim(arr[arr.length - 1]);
    +                    }
    +                    arr.push('\n');
    +                }
    +            };
    +
    +            this.print_indentation = function(arr) {
    +                for (var i = 0; i < this.indent_level; i++) {
    +                    arr.push(this.indent_string);
    +                    this.line_char_count += this.indent_string.length;
    +                }
    +            };
    +
    +            this.print_token = function(text) {
    +                // Avoid printing initial whitespace.
    +                if (this.is_whitespace(text) && !this.output.length) {
    +                    return;
    +                }
    +                if (text || text !== '') {
    +                    if (this.output.length && this.output[this.output.length - 1] === '\n') {
    +                        this.print_indentation(this.output);
    +                        text = ltrim(text);
    +                    }
    +                }
    +                this.print_token_raw(text);
    +            };
    +
    +            this.print_token_raw = function(text) {
    +                // If we are going to print newlines, truncate trailing
    +                // whitespace, as the newlines will represent the space.
    +                if (this.newlines > 0) {
    +                    text = rtrim(text);
    +                }
    +
    +                if (text && text !== '') {
    +                    if (text.length > 1 && text.charAt(text.length - 1) === '\n') {
    +                        // unformatted tags can grab newlines as their last character
    +                        this.output.push(text.slice(0, -1));
    +                        this.print_newline(false, this.output);
    +                    } else {
    +                        this.output.push(text);
    +                    }
    +                }
    +
    +                for (var n = 0; n < this.newlines; n++) {
    +                    this.print_newline(n > 0, this.output);
    +                }
    +                this.newlines = 0;
    +            };
    +
    +            this.indent = function() {
    +                this.indent_level++;
    +            };
    +
    +            this.unindent = function() {
    +                if (this.indent_level > 0) {
    +                    this.indent_level--;
    +                }
    +            };
    +        };
    +        return this;
    +    }
    +
    +    /*_____________________--------------------_____________________*/
    +
    +    this.beautify = function() {
    +        multi_parser = new Parser(); //wrapping functions Parser
    +        multi_parser.printer(html_source, indent_character, indent_size, wrap_line_length, brace_style); //initialize starting values
    +        while (true) {
    +            var t = multi_parser.get_token();
    +            multi_parser.token_text = t[0];
    +            multi_parser.token_type = t[1];
    +
    +            if (multi_parser.token_type === 'TK_EOF') {
    +                break;
    +            }
    +
    +            switch (multi_parser.token_type) {
    +                case 'TK_TAG_START':
    +                    multi_parser.print_newline(false, multi_parser.output);
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    if (multi_parser.indent_content) {
    +                        if ((multi_parser.indent_body_inner_html || !multi_parser.token_text.match(//)) &&
    +                            (multi_parser.indent_head_inner_html || !multi_parser.token_text.match(//))) {
    +
    +                            multi_parser.indent();
    +                        }
    +
    +                        multi_parser.indent_content = false;
    +                    }
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_STYLE':
    +                case 'TK_TAG_SCRIPT':
    +                    multi_parser.print_newline(false, multi_parser.output);
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_END':
    +                    //Print new line only if the tag has no content and has child
    +                    if (multi_parser.last_token === 'TK_CONTENT' && multi_parser.last_text === '') {
    +                        var tag_name = (multi_parser.token_text.match(/\w+/) || [])[0];
    +                        var tag_extracted_from_last_output = null;
    +                        if (multi_parser.output.length) {
    +                            tag_extracted_from_last_output = multi_parser.output[multi_parser.output.length - 1].match(/(?:<|{{#)\s*(\w+)/);
    +                        }
    +                        if (tag_extracted_from_last_output === null ||
    +                            (tag_extracted_from_last_output[1] !== tag_name && !multi_parser.Utils.in_array(tag_extracted_from_last_output[1], unformatted))) {
    +                            multi_parser.print_newline(false, multi_parser.output);
    +                        }
    +                    }
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_SINGLE':
    +                    // Don't add a newline before elements that should remain unformatted.
    +                    var tag_check = multi_parser.token_text.match(/^\s*<([a-z-]+)/i);
    +                    if (!tag_check || !multi_parser.Utils.in_array(tag_check[1], unformatted)) {
    +                        multi_parser.print_newline(false, multi_parser.output);
    +                    }
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_HANDLEBARS_ELSE':
    +                    // Don't add a newline if opening {{#if}} tag is on the current line
    +                    var foundIfOnCurrentLine = false;
    +                    for (var lastCheckedOutput = multi_parser.output.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
    +                        if (multi_parser.output[lastCheckedOutput] === '\n') {
    +                            break;
    +                        } else {
    +                            if (multi_parser.output[lastCheckedOutput].match(/{{#if/)) {
    +                                foundIfOnCurrentLine = true;
    +                                break;
    +                            }
    +                        }
    +                    }
    +                    if (!foundIfOnCurrentLine) {
    +                        multi_parser.print_newline(false, multi_parser.output);
    +                    }
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    if (multi_parser.indent_content) {
    +                        multi_parser.indent();
    +                        multi_parser.indent_content = false;
    +                    }
    +                    multi_parser.current_mode = 'CONTENT';
    +                    break;
    +                case 'TK_TAG_HANDLEBARS_COMMENT':
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'TAG';
    +                    break;
    +                case 'TK_CONTENT':
    +                    multi_parser.print_token(multi_parser.token_text);
    +                    multi_parser.current_mode = 'TAG';
    +                    break;
    +                case 'TK_STYLE':
    +                case 'TK_SCRIPT':
    +                    if (multi_parser.token_text !== '') {
    +                        multi_parser.print_newline(false, multi_parser.output);
    +                        var text = multi_parser.token_text,
    +                            _beautifier,
    +                            script_indent_level = 1;
    +                        if (multi_parser.token_type === 'TK_SCRIPT') {
    +                            _beautifier = typeof js_beautify === 'function' && js_beautify;
    +                        } else if (multi_parser.token_type === 'TK_STYLE') {
    +                            _beautifier = typeof css_beautify === 'function' && css_beautify;
    +                        }
    +
    +                        if (options.indent_scripts === "keep") {
    +                            script_indent_level = 0;
    +                        } else if (options.indent_scripts === "separate") {
    +                            script_indent_level = -multi_parser.indent_level;
    +                        }
    +
    +                        var indentation = multi_parser.get_full_indent(script_indent_level);
    +                        if (_beautifier) {
    +
    +                            // call the Beautifier if avaliable
    +                            var Child_options = function() {
    +                                this.eol = '\n';
    +                            };
    +                            Child_options.prototype = options;
    +                            var child_options = new Child_options();
    +                            text = _beautifier(text.replace(/^\s*/, indentation), child_options);
    +                        } else {
    +                            // simply indent the string otherwise
    +                            var white = text.match(/^\s*/)[0];
    +                            var _level = white.match(/[^\n\r]*$/)[0].split(multi_parser.indent_string).length - 1;
    +                            var reindent = multi_parser.get_full_indent(script_indent_level - _level);
    +                            text = text.replace(/^\s*/, indentation)
    +                                .replace(/\r\n|\r|\n/g, '\n' + reindent)
    +                                .replace(/\s+$/, '');
    +                        }
    +                        if (text) {
    +                            multi_parser.print_token_raw(text);
    +                            multi_parser.print_newline(true, multi_parser.output);
    +                        }
    +                    }
    +                    multi_parser.current_mode = 'TAG';
    +                    break;
    +                default:
    +                    // We should not be getting here but we don't want to drop input on the floor
    +                    // Just output the text and move on
    +                    if (multi_parser.token_text !== '') {
    +                        multi_parser.print_token(multi_parser.token_text);
    +                    }
    +                    break;
    +            }
    +            multi_parser.last_token = multi_parser.token_type;
    +            multi_parser.last_text = multi_parser.token_text;
    +        }
    +        var sweet_code = multi_parser.output.join('').replace(/[\r\n\t ]+$/, '');
    +
    +        // establish end_with_newline
    +        if (end_with_newline) {
    +            sweet_code += '\n';
    +        }
    +
    +        if (eol !== '\n') {
    +            sweet_code = sweet_code.replace(/[\n]/g, eol);
    +        }
    +
    +        return sweet_code;
    +    };
    +}
    +
    +module.exports.Beautifier = Beautifier;
    diff --git a/node_modules/js-beautify/js/src/html/index.js b/node_modules/js-beautify/js/src/html/index.js
    new file mode 100644
    index 0000000..bd7f5f5
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/html/index.js
    @@ -0,0 +1,36 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 Beautifier = require('./beautifier').Beautifier;
    +
    +function style_html(html_source, options, js_beautify, css_beautify) {
    +    var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify);
    +    return beautifier.beautify();
    +}
    +
    +module.exports = style_html;
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/src/index.js b/node_modules/js-beautify/js/src/index.js
    new file mode 100644
    index 0000000..bfa42f5
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/index.js
    @@ -0,0 +1,27 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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/node_modules/js-beautify/js/src/javascript/beautifier.js b/node_modules/js-beautify/js/src/javascript/beautifier.js
    new file mode 100644
    index 0000000..2f39a90
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/javascript/beautifier.js
    @@ -0,0 +1,1456 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 mergeOpts = require('core/options').mergeOpts;
    +var acorn = require('core/acorn');
    +var Output = require('core/output').Output;
    +var Tokenizer = require('./tokenizer').Tokenizer;
    +
    +function remove_redundant_indentation(output, frame) {
    +    // This implementation is effective but has some issues:
    +    //     - can cause line wrap to happen too soon due to indent removal
    +    //           after wrap points are calculated
    +    // These issues are minor compared to ugly indentation.
    +
    +    if (frame.multiline_frame ||
    +        frame.mode === MODE.ForInitializer ||
    +        frame.mode === MODE.Conditional) {
    +        return;
    +    }
    +
    +    // remove one indent from each line inside this section
    +    var start_index = frame.start_line_index;
    +
    +    output.remove_indent(start_index);
    +}
    +
    +function in_array(what, arr) {
    +    for (var i = 0; i < arr.length; i += 1) {
    +        if (arr[i] === what) {
    +            return true;
    +        }
    +    }
    +    return false;
    +}
    +
    +function trim(s) {
    +    return s.replace(/^\s+|\s+$/g, '');
    +}
    +
    +function ltrim(s) {
    +    return s.replace(/^\s+/g, '');
    +}
    +
    +// function rtrim(s) {
    +//     return s.replace(/\s+$/g, '');
    +// }
    +
    +
    +function generateMapFromStrings(list) {
    +    var result = {};
    +    for (var x = 0; x < list.length; x++) {
    +        // make the mapped names underscored instead of dash
    +        result[list[x].replace(/-/g, '_')] = list[x];
    +    }
    +    return result;
    +}
    +
    +function sanitizeOperatorPosition(opPosition) {
    +    opPosition = opPosition || OPERATOR_POSITION.before_newline;
    +
    +    if (!in_array(opPosition, validPositionValues)) {
    +        throw new Error("Invalid Option Value: The option 'operator_position' must be one of the following values\n" +
    +            validPositionValues +
    +            "\nYou passed in: '" + opPosition + "'");
    +    }
    +
    +    return opPosition;
    +}
    +
    +var validPositionValues = ['before-newline', 'after-newline', 'preserve-newline'];
    +
    +// Generate map from array
    +var OPERATOR_POSITION = generateMapFromStrings(validPositionValues);
    +
    +var OPERATOR_POSITION_BEFORE_OR_PRESERVE = [OPERATOR_POSITION.before_newline, OPERATOR_POSITION.preserve_newline];
    +
    +var MODE = {
    +    BlockStatement: 'BlockStatement', // 'BLOCK'
    +    Statement: 'Statement', // 'STATEMENT'
    +    ObjectLiteral: 'ObjectLiteral', // 'OBJECT',
    +    ArrayLiteral: 'ArrayLiteral', //'[EXPRESSION]',
    +    ForInitializer: 'ForInitializer', //'(FOR-EXPRESSION)',
    +    Conditional: 'Conditional', //'(COND-EXPRESSION)',
    +    Expression: 'Expression' //'(EXPRESSION)'
    +};
    +
    +function Beautifier(js_source_text, options) {
    +    "use strict";
    +    var output;
    +    var tokens = [],
    +        token_pos;
    +    var tokenizer;
    +    var current_token;
    +    var last_type, last_last_text, indent_string;
    +    var flags, previous_flags, flag_store;
    +    var prefix;
    +
    +    var handlers, opt;
    +    var baseIndentString = '';
    +
    +    handlers = {
    +        'TK_START_EXPR': handle_start_expr,
    +        'TK_END_EXPR': handle_end_expr,
    +        'TK_START_BLOCK': handle_start_block,
    +        'TK_END_BLOCK': handle_end_block,
    +        'TK_WORD': handle_word,
    +        'TK_RESERVED': handle_word,
    +        'TK_SEMICOLON': handle_semicolon,
    +        'TK_STRING': handle_string,
    +        'TK_EQUALS': handle_equals,
    +        'TK_OPERATOR': handle_operator,
    +        'TK_COMMA': handle_comma,
    +        'TK_BLOCK_COMMENT': handle_block_comment,
    +        'TK_COMMENT': handle_comment,
    +        'TK_DOT': handle_dot,
    +        'TK_UNKNOWN': handle_unknown,
    +        'TK_EOF': handle_eof
    +    };
    +
    +    function create_flags(flags_base, mode) {
    +        var next_indent_level = 0;
    +        if (flags_base) {
    +            next_indent_level = flags_base.indentation_level;
    +            if (!output.just_added_newline() &&
    +                flags_base.line_indent_level > next_indent_level) {
    +                next_indent_level = flags_base.line_indent_level;
    +            }
    +        }
    +
    +        var next_flags = {
    +            mode: mode,
    +            parent: flags_base,
    +            last_text: flags_base ? flags_base.last_text : '', // last token text
    +            last_word: flags_base ? flags_base.last_word : '', // last 'TK_WORD' passed
    +            declaration_statement: false,
    +            declaration_assignment: false,
    +            multiline_frame: false,
    +            inline_frame: false,
    +            if_block: false,
    +            else_block: false,
    +            do_block: false,
    +            do_while: false,
    +            import_block: false,
    +            in_case_statement: false, // switch(..){ INSIDE HERE }
    +            in_case: false, // we're on the exact line with "case 0:"
    +            case_body: false, // the indented case-action block
    +            indentation_level: next_indent_level,
    +            line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level,
    +            start_line_index: output.get_line_number(),
    +            ternary_depth: 0
    +        };
    +        return next_flags;
    +    }
    +
    +    // Some interpreters have unexpected results with foo = baz || bar;
    +    options = options ? options : {};
    +
    +    // Allow the setting of language/file-type specific options
    +    // with inheritance of overall settings
    +    options = mergeOpts(options, 'js');
    +
    +    opt = {};
    +
    +    // compatibility, re
    +    if (options.brace_style === "expand-strict") { //graceful handling of deprecated option
    +        options.brace_style = "expand";
    +    } else if (options.brace_style === "collapse-preserve-inline") { //graceful handling of deprecated option
    +        options.brace_style = "collapse,preserve-inline";
    +    } else if (options.braces_on_own_line !== undefined) { //graceful handling of deprecated option
    +        options.brace_style = options.braces_on_own_line ? "expand" : "collapse";
    +    } else if (!options.brace_style) { //Nothing exists to set it
    +        options.brace_style = "collapse";
    +    }
    +
    +    //preserve-inline in delimited string will trigger brace_preserve_inline, everything
    +    //else is considered a brace_style and the last one only will have an effect
    +    var brace_style_split = options.brace_style.split(/[^a-zA-Z0-9_\-]+/);
    +    opt.brace_preserve_inline = false; //Defaults in case one or other was not specified in meta-option
    +    opt.brace_style = "collapse";
    +    for (var bs = 0; bs < brace_style_split.length; bs++) {
    +        if (brace_style_split[bs] === "preserve-inline") {
    +            opt.brace_preserve_inline = true;
    +        } else {
    +            opt.brace_style = brace_style_split[bs];
    +        }
    +    }
    +
    +    opt.indent_size = options.indent_size ? parseInt(options.indent_size, 10) : 4;
    +    opt.indent_char = options.indent_char ? options.indent_char : ' ';
    +    opt.eol = options.eol ? options.eol : 'auto';
    +    opt.preserve_newlines = (options.preserve_newlines === undefined) ? true : options.preserve_newlines;
    +    opt.unindent_chained_methods = (options.unindent_chained_methods === undefined) ? false : options.unindent_chained_methods;
    +    opt.break_chained_methods = (options.break_chained_methods === undefined) ? false : options.break_chained_methods;
    +    opt.max_preserve_newlines = (options.max_preserve_newlines === undefined) ? 0 : parseInt(options.max_preserve_newlines, 10);
    +    opt.space_in_paren = (options.space_in_paren === undefined) ? false : options.space_in_paren;
    +    opt.space_in_empty_paren = (options.space_in_empty_paren === undefined) ? false : options.space_in_empty_paren;
    +    opt.jslint_happy = (options.jslint_happy === undefined) ? false : options.jslint_happy;
    +    opt.space_after_anon_function = (options.space_after_anon_function === undefined) ? false : options.space_after_anon_function;
    +    opt.keep_array_indentation = (options.keep_array_indentation === undefined) ? false : options.keep_array_indentation;
    +    opt.space_before_conditional = (options.space_before_conditional === undefined) ? true : options.space_before_conditional;
    +    opt.unescape_strings = (options.unescape_strings === undefined) ? false : options.unescape_strings;
    +    opt.wrap_line_length = (options.wrap_line_length === undefined) ? 0 : parseInt(options.wrap_line_length, 10);
    +    opt.e4x = (options.e4x === undefined) ? false : options.e4x;
    +    opt.end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline;
    +    opt.comma_first = (options.comma_first === undefined) ? false : options.comma_first;
    +    opt.operator_position = sanitizeOperatorPosition(options.operator_position);
    +
    +    // For testing of beautify ignore:start directive
    +    opt.test_output_raw = (options.test_output_raw === undefined) ? false : options.test_output_raw;
    +
    +    // force opt.space_after_anon_function to true if opt.jslint_happy
    +    if (opt.jslint_happy) {
    +        opt.space_after_anon_function = true;
    +    }
    +
    +    if (options.indent_with_tabs) {
    +        opt.indent_char = '\t';
    +        opt.indent_size = 1;
    +    }
    +
    +    if (opt.eol === 'auto') {
    +        opt.eol = '\n';
    +        if (js_source_text && acorn.lineBreak.test(js_source_text || '')) {
    +            opt.eol = js_source_text.match(acorn.lineBreak)[0];
    +        }
    +    }
    +
    +    opt.eol = opt.eol.replace(/\\r/, '\r').replace(/\\n/, '\n');
    +
    +    //----------------------------------
    +    indent_string = '';
    +    while (opt.indent_size > 0) {
    +        indent_string += opt.indent_char;
    +        opt.indent_size -= 1;
    +    }
    +
    +    var preindent_index = 0;
    +    if (js_source_text && js_source_text.length) {
    +        while ((js_source_text.charAt(preindent_index) === ' ' ||
    +                js_source_text.charAt(preindent_index) === '\t')) {
    +            preindent_index += 1;
    +        }
    +        baseIndentString = js_source_text.substring(0, preindent_index);
    +        js_source_text = js_source_text.substring(preindent_index);
    +    }
    +
    +    last_type = 'TK_START_BLOCK'; // last token type
    +    last_last_text = ''; // pre-last token text
    +    output = new Output(indent_string, baseIndentString);
    +
    +    // If testing the ignore directive, start with output disable set to true
    +    output.raw = opt.test_output_raw;
    +
    +
    +    // Stack of parsing/formatting states, including MODE.
    +    // We tokenize, parse, and output in an almost purely a forward-only stream of token input
    +    // and formatted output.  This makes the beautifier less accurate than full parsers
    +    // but also far more tolerant of syntax errors.
    +    //
    +    // For example, the default mode is MODE.BlockStatement. If we see a '{' we push a new frame of type
    +    // MODE.BlockStatement on the the stack, even though it could be object literal.  If we later
    +    // encounter a ":", we'll switch to to MODE.ObjectLiteral.  If we then see a ";",
    +    // most full parsers would die, but the beautifier gracefully falls back to
    +    // MODE.BlockStatement and continues on.
    +    flag_store = [];
    +    set_mode(MODE.BlockStatement);
    +
    +    this.beautify = function() {
    +
    +        /*jshint onevar:true */
    +        var sweet_code;
    +        tokenizer = new Tokenizer(js_source_text, opt, indent_string);
    +        tokens = tokenizer.tokenize();
    +        token_pos = 0;
    +
    +        current_token = get_token();
    +        while (current_token) {
    +            handlers[current_token.type]();
    +
    +            last_last_text = flags.last_text;
    +            last_type = current_token.type;
    +            flags.last_text = current_token.text;
    +
    +            token_pos += 1;
    +            current_token = get_token();
    +        }
    +
    +        sweet_code = output.get_code(opt.end_with_newline, opt.eol);
    +
    +        return sweet_code;
    +    };
    +
    +    function handle_whitespace_and_comments(local_token, preserve_statement_flags) {
    +        var newlines = local_token.newlines;
    +        var keep_whitespace = opt.keep_array_indentation && is_array(flags.mode);
    +        var temp_token = current_token;
    +
    +        for (var h = 0; h < local_token.comments_before.length; h++) {
    +            // The cleanest handling of inline comments is to treat them as though they aren't there.
    +            // Just continue formatting and the behavior should be logical.
    +            // Also ignore unknown tokens.  Again, this should result in better behavior.
    +            current_token = local_token.comments_before[h];
    +            handle_whitespace_and_comments(current_token, preserve_statement_flags);
    +            handlers[current_token.type](preserve_statement_flags);
    +        }
    +        current_token = temp_token;
    +
    +        if (keep_whitespace) {
    +            for (var i = 0; i < newlines; i += 1) {
    +                print_newline(i > 0, preserve_statement_flags);
    +            }
    +        } else {
    +            if (opt.max_preserve_newlines && newlines > opt.max_preserve_newlines) {
    +                newlines = opt.max_preserve_newlines;
    +            }
    +
    +            if (opt.preserve_newlines) {
    +                if (local_token.newlines > 1) {
    +                    print_newline(false, preserve_statement_flags);
    +                    for (var j = 1; j < newlines; j += 1) {
    +                        print_newline(true, preserve_statement_flags);
    +                    }
    +                }
    +            }
    +        }
    +
    +    }
    +
    +    // we could use just string.split, but
    +    // IE doesn't like returning empty strings
    +    function split_linebreaks(s) {
    +        //return s.split(/\x0d\x0a|\x0a/);
    +
    +        s = s.replace(acorn.allLineBreaks, '\n');
    +        var out = [],
    +            idx = s.indexOf("\n");
    +        while (idx !== -1) {
    +            out.push(s.substring(0, idx));
    +            s = s.substring(idx + 1);
    +            idx = s.indexOf("\n");
    +        }
    +        if (s.length) {
    +            out.push(s);
    +        }
    +        return out;
    +    }
    +
    +    var newline_restricted_tokens = ['break', 'continue', 'return', 'throw', 'yield'];
    +
    +    function allow_wrap_or_preserved_newline(force_linewrap) {
    +        force_linewrap = (force_linewrap === undefined) ? false : force_linewrap;
    +
    +        // Never wrap the first token on a line
    +        if (output.just_added_newline()) {
    +            return;
    +        }
    +
    +        var shouldPreserveOrForce = (opt.preserve_newlines && current_token.wanted_newline) || force_linewrap;
    +        var operatorLogicApplies = in_array(flags.last_text, tokenizer.positionable_operators) || in_array(current_token.text, tokenizer.positionable_operators);
    +
    +        if (operatorLogicApplies) {
    +            var shouldPrintOperatorNewline = (
    +                    in_array(flags.last_text, tokenizer.positionable_operators) &&
    +                    in_array(opt.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)
    +                ) ||
    +                in_array(current_token.text, tokenizer.positionable_operators);
    +            shouldPreserveOrForce = shouldPreserveOrForce && shouldPrintOperatorNewline;
    +        }
    +
    +        if (shouldPreserveOrForce) {
    +            print_newline(false, true);
    +        } else if (opt.wrap_line_length) {
    +            if (last_type === 'TK_RESERVED' && in_array(flags.last_text, newline_restricted_tokens)) {
    +                // These tokens should never have a newline inserted
    +                // between them and the following expression.
    +                return;
    +            }
    +            var proposed_line_length = output.current_line.get_character_count() + current_token.text.length +
    +                (output.space_before_token ? 1 : 0);
    +            if (proposed_line_length >= opt.wrap_line_length) {
    +                print_newline(false, true);
    +            }
    +        }
    +    }
    +
    +    function print_newline(force_newline, preserve_statement_flags) {
    +        if (!preserve_statement_flags) {
    +            if (flags.last_text !== ';' && flags.last_text !== ',' && flags.last_text !== '=' && last_type !== 'TK_OPERATOR') {
    +                var next_token = get_token(1);
    +                while (flags.mode === MODE.Statement &&
    +                    !(flags.if_block && next_token && next_token.type === 'TK_RESERVED' && next_token.text === 'else') &&
    +                    !flags.do_block) {
    +                    restore_mode();
    +                }
    +            }
    +        }
    +
    +        if (output.add_new_line(force_newline)) {
    +            flags.multiline_frame = true;
    +        }
    +    }
    +
    +    function print_token_line_indentation() {
    +        if (output.just_added_newline()) {
    +            if (opt.keep_array_indentation && is_array(flags.mode) && current_token.wanted_newline) {
    +                output.current_line.push(current_token.whitespace_before);
    +                output.space_before_token = false;
    +            } else if (output.set_indent(flags.indentation_level)) {
    +                flags.line_indent_level = flags.indentation_level;
    +            }
    +        }
    +    }
    +
    +    function print_token(printable_token) {
    +        if (output.raw) {
    +            output.add_raw_token(current_token);
    +            return;
    +        }
    +
    +        if (opt.comma_first && last_type === 'TK_COMMA' &&
    +            output.just_added_newline()) {
    +            if (output.previous_line.last() === ',') {
    +                var popped = output.previous_line.pop();
    +                // if the comma was already at the start of the line,
    +                // pull back onto that line and reprint the indentation
    +                if (output.previous_line.is_empty()) {
    +                    output.previous_line.push(popped);
    +                    output.trim(true);
    +                    output.current_line.pop();
    +                    output.trim();
    +                }
    +
    +                // add the comma in front of the next token
    +                print_token_line_indentation();
    +                output.add_token(',');
    +                output.space_before_token = true;
    +            }
    +        }
    +
    +        printable_token = printable_token || current_token.text;
    +        print_token_line_indentation();
    +        output.add_token(printable_token);
    +    }
    +
    +    function indent() {
    +        flags.indentation_level += 1;
    +    }
    +
    +    function deindent() {
    +        if (flags.indentation_level > 0 &&
    +            ((!flags.parent) || flags.indentation_level > flags.parent.indentation_level)) {
    +            flags.indentation_level -= 1;
    +
    +        }
    +    }
    +
    +    function set_mode(mode) {
    +        if (flags) {
    +            flag_store.push(flags);
    +            previous_flags = flags;
    +        } else {
    +            previous_flags = create_flags(null, mode);
    +        }
    +
    +        flags = create_flags(previous_flags, mode);
    +    }
    +
    +    function is_array(mode) {
    +        return mode === MODE.ArrayLiteral;
    +    }
    +
    +    function is_expression(mode) {
    +        return in_array(mode, [MODE.Expression, MODE.ForInitializer, MODE.Conditional]);
    +    }
    +
    +    function restore_mode() {
    +        if (flag_store.length > 0) {
    +            previous_flags = flags;
    +            flags = flag_store.pop();
    +            if (previous_flags.mode === MODE.Statement && !opt.unindent_chained_methods) {
    +                remove_redundant_indentation(output, previous_flags);
    +            }
    +        }
    +    }
    +
    +    function start_of_object_property() {
    +        return flags.parent.mode === MODE.ObjectLiteral && flags.mode === MODE.Statement && (
    +            (flags.last_text === ':' && flags.ternary_depth === 0) || (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set'])));
    +    }
    +
    +    function start_of_statement() {
    +        if (
    +            (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const']) && current_token.type === 'TK_WORD') ||
    +            (last_type === 'TK_RESERVED' && flags.last_text === 'do') ||
    +            (last_type === 'TK_RESERVED' && in_array(flags.last_text, newline_restricted_tokens) && !current_token.wanted_newline) ||
    +            (last_type === 'TK_RESERVED' && flags.last_text === 'else' &&
    +                !(current_token.type === 'TK_RESERVED' && current_token.text === 'if' && !current_token.comments_before.length)) ||
    +            (last_type === 'TK_END_EXPR' && (previous_flags.mode === MODE.ForInitializer || previous_flags.mode === MODE.Conditional)) ||
    +            (last_type === 'TK_WORD' && flags.mode === MODE.BlockStatement &&
    +                !flags.in_case &&
    +                !(current_token.text === '--' || current_token.text === '++') &&
    +                last_last_text !== 'function' &&
    +                current_token.type !== 'TK_WORD' && current_token.type !== 'TK_RESERVED') ||
    +            (flags.mode === MODE.ObjectLiteral && (
    +                (flags.last_text === ':' && flags.ternary_depth === 0) || (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set']))))
    +        ) {
    +
    +            set_mode(MODE.Statement);
    +            if (!opt.unindent_chained_methods) {
    +                indent();
    +            }
    +
    +            handle_whitespace_and_comments(current_token, true);
    +
    +            // Issue #276:
    +            // If starting a new statement with [if, for, while, do], push to a new line.
    +            // if (a) if (b) if(c) d(); else e(); else f();
    +            if (!start_of_object_property()) {
    +                allow_wrap_or_preserved_newline(
    +                    current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['do', 'for', 'if', 'while']));
    +            }
    +
    +            return true;
    +        }
    +        return false;
    +    }
    +
    +    function all_lines_start_with(lines, c) {
    +        for (var i = 0; i < lines.length; i++) {
    +            var line = trim(lines[i]);
    +            if (line.charAt(0) !== c) {
    +                return false;
    +            }
    +        }
    +        return true;
    +    }
    +
    +    function each_line_matches_indent(lines, indent) {
    +        var i = 0,
    +            len = lines.length,
    +            line;
    +        for (; i < len; i++) {
    +            line = lines[i];
    +            // allow empty lines to pass through
    +            if (line && line.indexOf(indent) !== 0) {
    +                return false;
    +            }
    +        }
    +        return true;
    +    }
    +
    +    function is_special_word(word) {
    +        return in_array(word, ['case', 'return', 'do', 'if', 'throw', 'else']);
    +    }
    +
    +    function get_token(offset) {
    +        var index = token_pos + (offset || 0);
    +        return (index < 0 || index >= tokens.length) ? null : tokens[index];
    +    }
    +
    +    function handle_start_expr() {
    +        // The conditional starts the statement if appropriate.
    +        if (!start_of_statement()) {
    +            handle_whitespace_and_comments(current_token);
    +        }
    +
    +        var next_mode = MODE.Expression;
    +        if (current_token.text === '[') {
    +
    +            if (last_type === 'TK_WORD' || flags.last_text === ')') {
    +                // this is array index specifier, break immediately
    +                // a[x], fn()[x]
    +                if (last_type === 'TK_RESERVED' && in_array(flags.last_text, tokenizer.line_starters)) {
    +                    output.space_before_token = true;
    +                }
    +                set_mode(next_mode);
    +                print_token();
    +                indent();
    +                if (opt.space_in_paren) {
    +                    output.space_before_token = true;
    +                }
    +                return;
    +            }
    +
    +            next_mode = MODE.ArrayLiteral;
    +            if (is_array(flags.mode)) {
    +                if (flags.last_text === '[' ||
    +                    (flags.last_text === ',' && (last_last_text === ']' || last_last_text === '}'))) {
    +                    // ], [ goes to new line
    +                    // }, [ goes to new line
    +                    if (!opt.keep_array_indentation) {
    +                        print_newline();
    +                    }
    +                }
    +            }
    +
    +        } else {
    +            if (last_type === 'TK_RESERVED' && flags.last_text === 'for') {
    +                next_mode = MODE.ForInitializer;
    +            } else if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['if', 'while'])) {
    +                next_mode = MODE.Conditional;
    +            } else {
    +                // next_mode = MODE.Expression;
    +            }
    +        }
    +
    +        if (flags.last_text === ';' || last_type === 'TK_START_BLOCK') {
    +            print_newline();
    +        } else if (last_type === 'TK_END_EXPR' || last_type === 'TK_START_EXPR' || last_type === 'TK_END_BLOCK' || flags.last_text === '.') {
    +            // TODO: Consider whether forcing this is required.  Review failing tests when removed.
    +            allow_wrap_or_preserved_newline(current_token.wanted_newline);
    +            // do nothing on (( and )( and ][ and ]( and .(
    +        } else if (!(last_type === 'TK_RESERVED' && current_token.text === '(') && last_type !== 'TK_WORD' && last_type !== 'TK_OPERATOR') {
    +            output.space_before_token = true;
    +        } else if ((last_type === 'TK_RESERVED' && (flags.last_word === 'function' || flags.last_word === 'typeof')) ||
    +            (flags.last_text === '*' &&
    +                (in_array(last_last_text, ['function', 'yield']) ||
    +                    (flags.mode === MODE.ObjectLiteral && in_array(last_last_text, ['{', ',']))))) {
    +            // function() vs function ()
    +            // yield*() vs yield* ()
    +            // function*() vs function* ()
    +            if (opt.space_after_anon_function) {
    +                output.space_before_token = true;
    +            }
    +        } else if (last_type === 'TK_RESERVED' && (in_array(flags.last_text, tokenizer.line_starters) || flags.last_text === 'catch')) {
    +            if (opt.space_before_conditional) {
    +                output.space_before_token = true;
    +            }
    +        }
    +
    +        // Should be a space between await and an IIFE, or async and an arrow function
    +        if (current_token.text === '(' && last_type === 'TK_RESERVED' && in_array(flags.last_word, ['await', 'async'])) {
    +            output.space_before_token = true;
    +        }
    +
    +        // Support of this kind of newline preservation.
    +        // a = (b &&
    +        //     (c || d));
    +        if (current_token.text === '(') {
    +            if (last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
    +                if (!start_of_object_property()) {
    +                    allow_wrap_or_preserved_newline();
    +                }
    +            }
    +        }
    +
    +        // Support preserving wrapped arrow function expressions
    +        // a.b('c',
    +        //     () => d.e
    +        // )
    +        if (current_token.text === '(' && last_type !== 'TK_WORD' && last_type !== 'TK_RESERVED') {
    +            allow_wrap_or_preserved_newline();
    +        }
    +
    +        set_mode(next_mode);
    +        print_token();
    +        if (opt.space_in_paren) {
    +            output.space_before_token = true;
    +        }
    +
    +        // In all cases, if we newline while inside an expression it should be indented.
    +        indent();
    +    }
    +
    +    function handle_end_expr() {
    +        // statements inside expressions are not valid syntax, but...
    +        // statements must all be closed when their container closes
    +        while (flags.mode === MODE.Statement) {
    +            restore_mode();
    +        }
    +
    +        handle_whitespace_and_comments(current_token);
    +
    +        if (flags.multiline_frame) {
    +            allow_wrap_or_preserved_newline(current_token.text === ']' && is_array(flags.mode) && !opt.keep_array_indentation);
    +        }
    +
    +        if (opt.space_in_paren) {
    +            if (last_type === 'TK_START_EXPR' && !opt.space_in_empty_paren) {
    +                // () [] no inner space in empty parens like these, ever, ref #320
    +                output.trim();
    +                output.space_before_token = false;
    +            } else {
    +                output.space_before_token = true;
    +            }
    +        }
    +        if (current_token.text === ']' && opt.keep_array_indentation) {
    +            print_token();
    +            restore_mode();
    +        } else {
    +            restore_mode();
    +            print_token();
    +        }
    +        remove_redundant_indentation(output, previous_flags);
    +
    +        // do {} while () // no statement required after
    +        if (flags.do_while && previous_flags.mode === MODE.Conditional) {
    +            previous_flags.mode = MODE.Expression;
    +            flags.do_block = false;
    +            flags.do_while = false;
    +
    +        }
    +    }
    +
    +    function handle_start_block() {
    +        handle_whitespace_and_comments(current_token);
    +
    +        // Check if this is should be treated as a ObjectLiteral
    +        var next_token = get_token(1);
    +        var second_token = get_token(2);
    +        if (second_token && (
    +                (in_array(second_token.text, [':', ',']) && in_array(next_token.type, ['TK_STRING', 'TK_WORD', 'TK_RESERVED'])) ||
    +                (in_array(next_token.text, ['get', 'set', '...']) && in_array(second_token.type, ['TK_WORD', 'TK_RESERVED']))
    +            )) {
    +            // We don't support TypeScript,but we didn't break it for a very long time.
    +            // We'll try to keep not breaking it.
    +            if (!in_array(last_last_text, ['class', 'interface'])) {
    +                set_mode(MODE.ObjectLiteral);
    +            } else {
    +                set_mode(MODE.BlockStatement);
    +            }
    +        } else if (last_type === 'TK_OPERATOR' && flags.last_text === '=>') {
    +            // arrow function: (param1, paramN) => { statements }
    +            set_mode(MODE.BlockStatement);
    +        } else if (in_array(last_type, ['TK_EQUALS', 'TK_START_EXPR', 'TK_COMMA', 'TK_OPERATOR']) ||
    +            (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['return', 'throw', 'import', 'default']))
    +        ) {
    +            // Detecting shorthand function syntax is difficult by scanning forward,
    +            //     so check the surrounding context.
    +            // If the block is being returned, imported, export default, passed as arg,
    +            //     assigned with = or assigned in a nested object, treat as an ObjectLiteral.
    +            set_mode(MODE.ObjectLiteral);
    +        } else {
    +            set_mode(MODE.BlockStatement);
    +        }
    +
    +        var empty_braces = !next_token.comments_before.length && next_token.text === '}';
    +        var empty_anonymous_function = empty_braces && flags.last_word === 'function' &&
    +            last_type === 'TK_END_EXPR';
    +
    +        if (opt.brace_preserve_inline) // check for inline, set inline_frame if so
    +        {
    +            // search forward for a newline wanted inside this block
    +            var index = 0;
    +            var check_token = null;
    +            flags.inline_frame = true;
    +            do {
    +                index += 1;
    +                check_token = get_token(index);
    +                if (check_token.wanted_newline) {
    +                    flags.inline_frame = false;
    +                    break;
    +                }
    +            } while (check_token.type !== 'TK_EOF' &&
    +                !(check_token.type === 'TK_END_BLOCK' && check_token.opened === current_token));
    +        }
    +
    +        if ((opt.brace_style === "expand" ||
    +                (opt.brace_style === "none" && current_token.wanted_newline)) &&
    +            !flags.inline_frame) {
    +            if (last_type !== 'TK_OPERATOR' &&
    +                (empty_anonymous_function ||
    +                    last_type === 'TK_EQUALS' ||
    +                    (last_type === 'TK_RESERVED' && is_special_word(flags.last_text) && flags.last_text !== 'else'))) {
    +                output.space_before_token = true;
    +            } else {
    +                print_newline(false, true);
    +            }
    +        } else { // collapse || inline_frame
    +            if (is_array(previous_flags.mode) && (last_type === 'TK_START_EXPR' || last_type === 'TK_COMMA')) {
    +                if (last_type === 'TK_COMMA' || opt.space_in_paren) {
    +                    output.space_before_token = true;
    +                }
    +
    +                if (last_type === 'TK_COMMA' || (last_type === 'TK_START_EXPR' && flags.inline_frame)) {
    +                    allow_wrap_or_preserved_newline();
    +                    previous_flags.multiline_frame = previous_flags.multiline_frame || flags.multiline_frame;
    +                    flags.multiline_frame = false;
    +                }
    +            }
    +            if (last_type !== 'TK_OPERATOR' && last_type !== 'TK_START_EXPR') {
    +                if (last_type === 'TK_START_BLOCK' && !flags.inline_frame) {
    +                    print_newline();
    +                } else {
    +                    output.space_before_token = true;
    +                }
    +            }
    +        }
    +        print_token();
    +        indent();
    +    }
    +
    +    function handle_end_block() {
    +        // statements must all be closed when their container closes
    +        handle_whitespace_and_comments(current_token);
    +
    +        while (flags.mode === MODE.Statement) {
    +            restore_mode();
    +        }
    +
    +        var empty_braces = last_type === 'TK_START_BLOCK';
    +
    +        if (flags.inline_frame && !empty_braces) { // try inline_frame (only set if opt.braces-preserve-inline) first
    +            output.space_before_token = true;
    +        } else if (opt.brace_style === "expand") {
    +            if (!empty_braces) {
    +                print_newline();
    +            }
    +        } else {
    +            // skip {}
    +            if (!empty_braces) {
    +                if (is_array(flags.mode) && opt.keep_array_indentation) {
    +                    // we REALLY need a newline here, but newliner would skip that
    +                    opt.keep_array_indentation = false;
    +                    print_newline();
    +                    opt.keep_array_indentation = true;
    +
    +                } else {
    +                    print_newline();
    +                }
    +            }
    +        }
    +        restore_mode();
    +        print_token();
    +    }
    +
    +    function handle_word() {
    +        if (current_token.type === 'TK_RESERVED') {
    +            if (in_array(current_token.text, ['set', 'get']) && flags.mode !== MODE.ObjectLiteral) {
    +                current_token.type = 'TK_WORD';
    +            } else if (in_array(current_token.text, ['as', 'from']) && !flags.import_block) {
    +                current_token.type = 'TK_WORD';
    +            } else if (flags.mode === MODE.ObjectLiteral) {
    +                var next_token = get_token(1);
    +                if (next_token.text === ':') {
    +                    current_token.type = 'TK_WORD';
    +                }
    +            }
    +        }
    +
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +            if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const']) && current_token.type === 'TK_WORD') {
    +                flags.declaration_statement = true;
    +            }
    +        } else if (current_token.wanted_newline && !is_expression(flags.mode) &&
    +            (last_type !== 'TK_OPERATOR' || (flags.last_text === '--' || flags.last_text === '++')) &&
    +            last_type !== 'TK_EQUALS' &&
    +            (opt.preserve_newlines || !(last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const', 'set', 'get'])))) {
    +            handle_whitespace_and_comments(current_token);
    +            print_newline();
    +        } else {
    +            handle_whitespace_and_comments(current_token);
    +        }
    +
    +        if (flags.do_block && !flags.do_while) {
    +            if (current_token.type === 'TK_RESERVED' && current_token.text === 'while') {
    +                // do {} ## while ()
    +                output.space_before_token = true;
    +                print_token();
    +                output.space_before_token = true;
    +                flags.do_while = true;
    +                return;
    +            } else {
    +                // do {} should always have while as the next word.
    +                // if we don't see the expected while, recover
    +                print_newline();
    +                flags.do_block = false;
    +            }
    +        }
    +
    +        // if may be followed by else, or not
    +        // Bare/inline ifs are tricky
    +        // Need to unwind the modes correctly: if (a) if (b) c(); else d(); else e();
    +        if (flags.if_block) {
    +            if (!flags.else_block && (current_token.type === 'TK_RESERVED' && current_token.text === 'else')) {
    +                flags.else_block = true;
    +            } else {
    +                while (flags.mode === MODE.Statement) {
    +                    restore_mode();
    +                }
    +                flags.if_block = false;
    +                flags.else_block = false;
    +            }
    +        }
    +
    +        if (current_token.type === 'TK_RESERVED' && (current_token.text === 'case' || (current_token.text === 'default' && flags.in_case_statement))) {
    +            print_newline();
    +            if (flags.case_body || opt.jslint_happy) {
    +                // switch cases following one another
    +                deindent();
    +                flags.case_body = false;
    +            }
    +            print_token();
    +            flags.in_case = true;
    +            flags.in_case_statement = true;
    +            return;
    +        }
    +
    +        if (last_type === 'TK_COMMA' || last_type === 'TK_START_EXPR' || last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
    +            if (!start_of_object_property()) {
    +                allow_wrap_or_preserved_newline();
    +            }
    +        }
    +
    +        if (current_token.type === 'TK_RESERVED' && current_token.text === 'function') {
    +            if (in_array(flags.last_text, ['}', ';']) ||
    +                (output.just_added_newline() && !(in_array(flags.last_text, ['(', '[', '{', ':', '=', ',']) || last_type === 'TK_OPERATOR'))) {
    +                // make sure there is a nice clean space of at least one blank line
    +                // before a new function definition
    +                if (!output.just_added_blankline() && !current_token.comments_before.length) {
    +                    print_newline();
    +                    print_newline(true);
    +                }
    +            }
    +            if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD') {
    +                if (last_type === 'TK_RESERVED' && (
    +                        in_array(flags.last_text, ['get', 'set', 'new', 'export', 'async']) ||
    +                        in_array(flags.last_text, newline_restricted_tokens))) {
    +                    output.space_before_token = true;
    +                } else if (last_type === 'TK_RESERVED' && flags.last_text === 'default' && last_last_text === 'export') {
    +                    output.space_before_token = true;
    +                } else {
    +                    print_newline();
    +                }
    +            } else if (last_type === 'TK_OPERATOR' || flags.last_text === '=') {
    +                // foo = function
    +                output.space_before_token = true;
    +            } else if (!flags.multiline_frame && (is_expression(flags.mode) || is_array(flags.mode))) {
    +                // (function
    +            } else {
    +                print_newline();
    +            }
    +
    +            print_token();
    +            flags.last_word = current_token.text;
    +            return;
    +        }
    +
    +        prefix = 'NONE';
    +
    +        if (last_type === 'TK_END_BLOCK') {
    +
    +            if (previous_flags.inline_frame) {
    +                prefix = 'SPACE';
    +            } else if (!(current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['else', 'catch', 'finally', 'from']))) {
    +                prefix = 'NEWLINE';
    +            } else {
    +                if (opt.brace_style === "expand" ||
    +                    opt.brace_style === "end-expand" ||
    +                    (opt.brace_style === "none" && current_token.wanted_newline)) {
    +                    prefix = 'NEWLINE';
    +                } else {
    +                    prefix = 'SPACE';
    +                    output.space_before_token = true;
    +                }
    +            }
    +        } else if (last_type === 'TK_SEMICOLON' && flags.mode === MODE.BlockStatement) {
    +            // TODO: Should this be for STATEMENT as well?
    +            prefix = 'NEWLINE';
    +        } else if (last_type === 'TK_SEMICOLON' && is_expression(flags.mode)) {
    +            prefix = 'SPACE';
    +        } else if (last_type === 'TK_STRING') {
    +            prefix = 'NEWLINE';
    +        } else if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD' ||
    +            (flags.last_text === '*' &&
    +                (in_array(last_last_text, ['function', 'yield']) ||
    +                    (flags.mode === MODE.ObjectLiteral && in_array(last_last_text, ['{', ',']))))) {
    +            prefix = 'SPACE';
    +        } else if (last_type === 'TK_START_BLOCK') {
    +            if (flags.inline_frame) {
    +                prefix = 'SPACE';
    +            } else {
    +                prefix = 'NEWLINE';
    +            }
    +        } else if (last_type === 'TK_END_EXPR') {
    +            output.space_before_token = true;
    +            prefix = 'NEWLINE';
    +        }
    +
    +        if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, tokenizer.line_starters) && flags.last_text !== ')') {
    +            if (flags.inline_frame || flags.last_text === 'else' || flags.last_text === 'export') {
    +                prefix = 'SPACE';
    +            } else {
    +                prefix = 'NEWLINE';
    +            }
    +
    +        }
    +
    +        if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['else', 'catch', 'finally'])) {
    +            if ((!(last_type === 'TK_END_BLOCK' && previous_flags.mode === MODE.BlockStatement) ||
    +                    opt.brace_style === "expand" ||
    +                    opt.brace_style === "end-expand" ||
    +                    (opt.brace_style === "none" && current_token.wanted_newline)) &&
    +                !flags.inline_frame) {
    +                print_newline();
    +            } else {
    +                output.trim(true);
    +                var line = output.current_line;
    +                // If we trimmed and there's something other than a close block before us
    +                // put a newline back in.  Handles '} // comment' scenario.
    +                if (line.last() !== '}') {
    +                    print_newline();
    +                }
    +                output.space_before_token = true;
    +            }
    +        } else if (prefix === 'NEWLINE') {
    +            if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
    +                // no newline between 'return nnn'
    +                output.space_before_token = true;
    +            } else if (last_type !== 'TK_END_EXPR') {
    +                if ((last_type !== 'TK_START_EXPR' || !(current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['var', 'let', 'const']))) && flags.last_text !== ':') {
    +                    // no need to force newline on 'var': for (var x = 0...)
    +                    if (current_token.type === 'TK_RESERVED' && current_token.text === 'if' && flags.last_text === 'else') {
    +                        // no newline for } else if {
    +                        output.space_before_token = true;
    +                    } else {
    +                        print_newline();
    +                    }
    +                }
    +            } else if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, tokenizer.line_starters) && flags.last_text !== ')') {
    +                print_newline();
    +            }
    +        } else if (flags.multiline_frame && is_array(flags.mode) && flags.last_text === ',' && last_last_text === '}') {
    +            print_newline(); // }, in lists get a newline treatment
    +        } else if (prefix === 'SPACE') {
    +            output.space_before_token = true;
    +        }
    +        print_token();
    +        flags.last_word = current_token.text;
    +
    +        if (current_token.type === 'TK_RESERVED') {
    +            if (current_token.text === 'do') {
    +                flags.do_block = true;
    +            } else if (current_token.text === 'if') {
    +                flags.if_block = true;
    +            } else if (current_token.text === 'import') {
    +                flags.import_block = true;
    +            } else if (flags.import_block && current_token.type === 'TK_RESERVED' && current_token.text === 'from') {
    +                flags.import_block = false;
    +            }
    +        }
    +    }
    +
    +    function handle_semicolon() {
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +            // Semicolon can be the start (and end) of a statement
    +            output.space_before_token = false;
    +        } else {
    +            handle_whitespace_and_comments(current_token);
    +        }
    +
    +        var next_token = get_token(1);
    +        while (flags.mode === MODE.Statement &&
    +            !(flags.if_block && next_token && next_token.type === 'TK_RESERVED' && next_token.text === 'else') &&
    +            !flags.do_block) {
    +            restore_mode();
    +        }
    +
    +        // hacky but effective for the moment
    +        if (flags.import_block) {
    +            flags.import_block = false;
    +        }
    +        print_token();
    +    }
    +
    +    function handle_string() {
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +            // One difference - strings want at least a space before
    +            output.space_before_token = true;
    +        } else {
    +            handle_whitespace_and_comments(current_token);
    +            if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD' || flags.inline_frame) {
    +                output.space_before_token = true;
    +            } else if (last_type === 'TK_COMMA' || last_type === 'TK_START_EXPR' || last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') {
    +                if (!start_of_object_property()) {
    +                    allow_wrap_or_preserved_newline();
    +                }
    +            } else {
    +                print_newline();
    +            }
    +        }
    +        print_token();
    +    }
    +
    +    function handle_equals() {
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +        } else {
    +            handle_whitespace_and_comments(current_token);
    +        }
    +
    +        if (flags.declaration_statement) {
    +            // just got an '=' in a var-line, different formatting/line-breaking, etc will now be done
    +            flags.declaration_assignment = true;
    +        }
    +        output.space_before_token = true;
    +        print_token();
    +        output.space_before_token = true;
    +    }
    +
    +    function handle_comma() {
    +        handle_whitespace_and_comments(current_token, true);
    +
    +        print_token();
    +        output.space_before_token = true;
    +        if (flags.declaration_statement) {
    +            if (is_expression(flags.parent.mode)) {
    +                // do not break on comma, for(var a = 1, b = 2)
    +                flags.declaration_assignment = false;
    +            }
    +
    +            if (flags.declaration_assignment) {
    +                flags.declaration_assignment = false;
    +                print_newline(false, true);
    +            } else if (opt.comma_first) {
    +                // for comma-first, we want to allow a newline before the comma
    +                // to turn into a newline after the comma, which we will fixup later
    +                allow_wrap_or_preserved_newline();
    +            }
    +        } else if (flags.mode === MODE.ObjectLiteral ||
    +            (flags.mode === MODE.Statement && flags.parent.mode === MODE.ObjectLiteral)) {
    +            if (flags.mode === MODE.Statement) {
    +                restore_mode();
    +            }
    +
    +            if (!flags.inline_frame) {
    +                print_newline();
    +            }
    +        } else if (opt.comma_first) {
    +            // EXPR or DO_BLOCK
    +            // for comma-first, we want to allow a newline before the comma
    +            // to turn into a newline after the comma, which we will fixup later
    +            allow_wrap_or_preserved_newline();
    +        }
    +    }
    +
    +    function handle_operator() {
    +        var isGeneratorAsterisk = current_token.text === '*' &&
    +            ((last_type === 'TK_RESERVED' && in_array(flags.last_text, ['function', 'yield'])) ||
    +                (in_array(last_type, ['TK_START_BLOCK', 'TK_COMMA', 'TK_END_BLOCK', 'TK_SEMICOLON']))
    +            );
    +        var isUnary = in_array(current_token.text, ['-', '+']) && (
    +            in_array(last_type, ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS', 'TK_OPERATOR']) ||
    +            in_array(flags.last_text, tokenizer.line_starters) ||
    +            flags.last_text === ','
    +        );
    +
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +        } else {
    +            var preserve_statement_flags = !isGeneratorAsterisk;
    +            handle_whitespace_and_comments(current_token, preserve_statement_flags);
    +        }
    +
    +        if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
    +            // "return" had a special handling in TK_WORD. Now we need to return the favor
    +            output.space_before_token = true;
    +            print_token();
    +            return;
    +        }
    +
    +        // hack for actionscript's import .*;
    +        if (current_token.text === '*' && last_type === 'TK_DOT') {
    +            print_token();
    +            return;
    +        }
    +
    +        if (current_token.text === '::') {
    +            // no spaces around exotic namespacing syntax operator
    +            print_token();
    +            return;
    +        }
    +
    +        // Allow line wrapping between operators when operator_position is
    +        //   set to before or preserve
    +        if (last_type === 'TK_OPERATOR' && in_array(opt.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)) {
    +            allow_wrap_or_preserved_newline();
    +        }
    +
    +        if (current_token.text === ':' && flags.in_case) {
    +            flags.case_body = true;
    +            indent();
    +            print_token();
    +            print_newline();
    +            flags.in_case = false;
    +            return;
    +        }
    +
    +        var space_before = true;
    +        var space_after = true;
    +        var in_ternary = false;
    +        if (current_token.text === ':') {
    +            if (flags.ternary_depth === 0) {
    +                // Colon is invalid javascript outside of ternary and object, but do our best to guess what was meant.
    +                space_before = false;
    +            } else {
    +                flags.ternary_depth -= 1;
    +                in_ternary = true;
    +            }
    +        } else if (current_token.text === '?') {
    +            flags.ternary_depth += 1;
    +        }
    +
    +        // let's handle the operator_position option prior to any conflicting logic
    +        if (!isUnary && !isGeneratorAsterisk && opt.preserve_newlines && in_array(current_token.text, tokenizer.positionable_operators)) {
    +            var isColon = current_token.text === ':';
    +            var isTernaryColon = (isColon && in_ternary);
    +            var isOtherColon = (isColon && !in_ternary);
    +
    +            switch (opt.operator_position) {
    +                case OPERATOR_POSITION.before_newline:
    +                    // if the current token is : and it's not a ternary statement then we set space_before to false
    +                    output.space_before_token = !isOtherColon;
    +
    +                    print_token();
    +
    +                    if (!isColon || isTernaryColon) {
    +                        allow_wrap_or_preserved_newline();
    +                    }
    +
    +                    output.space_before_token = true;
    +                    return;
    +
    +                case OPERATOR_POSITION.after_newline:
    +                    // if the current token is anything but colon, or (via deduction) it's a colon and in a ternary statement,
    +                    //   then print a newline.
    +
    +                    output.space_before_token = true;
    +
    +                    if (!isColon || isTernaryColon) {
    +                        if (get_token(1).wanted_newline) {
    +                            print_newline(false, true);
    +                        } else {
    +                            allow_wrap_or_preserved_newline();
    +                        }
    +                    } else {
    +                        output.space_before_token = false;
    +                    }
    +
    +                    print_token();
    +
    +                    output.space_before_token = true;
    +                    return;
    +
    +                case OPERATOR_POSITION.preserve_newline:
    +                    if (!isOtherColon) {
    +                        allow_wrap_or_preserved_newline();
    +                    }
    +
    +                    // if we just added a newline, or the current token is : and it's not a ternary statement,
    +                    //   then we set space_before to false
    +                    space_before = !(output.just_added_newline() || isOtherColon);
    +
    +                    output.space_before_token = space_before;
    +                    print_token();
    +                    output.space_before_token = true;
    +                    return;
    +            }
    +        }
    +
    +        if (isGeneratorAsterisk) {
    +            allow_wrap_or_preserved_newline();
    +            space_before = false;
    +            var next_token = get_token(1);
    +            space_after = next_token && in_array(next_token.type, ['TK_WORD', 'TK_RESERVED']);
    +        } else if (current_token.text === '...') {
    +            allow_wrap_or_preserved_newline();
    +            space_before = last_type === 'TK_START_BLOCK';
    +            space_after = false;
    +        } else if (in_array(current_token.text, ['--', '++', '!', '~']) || isUnary) {
    +            // unary operators (and binary +/- pretending to be unary) special cases
    +
    +            space_before = false;
    +            space_after = false;
    +
    +            // http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1
    +            // if there is a newline between -- or ++ and anything else we should preserve it.
    +            if (current_token.wanted_newline && (current_token.text === '--' || current_token.text === '++')) {
    +                print_newline(false, true);
    +            }
    +
    +            if (flags.last_text === ';' && is_expression(flags.mode)) {
    +                // for (;; ++i)
    +                //        ^^^
    +                space_before = true;
    +            }
    +
    +            if (last_type === 'TK_RESERVED') {
    +                space_before = true;
    +            } else if (last_type === 'TK_END_EXPR') {
    +                space_before = !(flags.last_text === ']' && (current_token.text === '--' || current_token.text === '++'));
    +            } else if (last_type === 'TK_OPERATOR') {
    +                // a++ + ++b;
    +                // a - -b
    +                space_before = in_array(current_token.text, ['--', '-', '++', '+']) && in_array(flags.last_text, ['--', '-', '++', '+']);
    +                // + and - are not unary when preceeded by -- or ++ operator
    +                // a-- + b
    +                // a * +b
    +                // a - -b
    +                if (in_array(current_token.text, ['+', '-']) && in_array(flags.last_text, ['--', '++'])) {
    +                    space_after = true;
    +                }
    +            }
    +
    +
    +            if (((flags.mode === MODE.BlockStatement && !flags.inline_frame) || flags.mode === MODE.Statement) &&
    +                (flags.last_text === '{' || flags.last_text === ';')) {
    +                // { foo; --i }
    +                // foo(); --bar;
    +                print_newline();
    +            }
    +        }
    +
    +        output.space_before_token = output.space_before_token || space_before;
    +        print_token();
    +        output.space_before_token = space_after;
    +    }
    +
    +    function handle_block_comment(preserve_statement_flags) {
    +        if (output.raw) {
    +            output.add_raw_token(current_token);
    +            if (current_token.directives && current_token.directives.preserve === 'end') {
    +                // If we're testing the raw output behavior, do not allow a directive to turn it off.
    +                output.raw = opt.test_output_raw;
    +            }
    +            return;
    +        }
    +
    +        if (current_token.directives) {
    +            print_newline(false, preserve_statement_flags);
    +            print_token();
    +            if (current_token.directives.preserve === 'start') {
    +                output.raw = true;
    +            }
    +            print_newline(false, true);
    +            return;
    +        }
    +
    +        // inline block
    +        if (!acorn.newline.test(current_token.text) && !current_token.wanted_newline) {
    +            output.space_before_token = true;
    +            print_token();
    +            output.space_before_token = true;
    +            return;
    +        }
    +
    +        var lines = split_linebreaks(current_token.text);
    +        var j; // iterator for this case
    +        var javadoc = false;
    +        var starless = false;
    +        var lastIndent = current_token.whitespace_before;
    +        var lastIndentLength = lastIndent.length;
    +
    +        // block comment starts with a new line
    +        print_newline(false, preserve_statement_flags);
    +        if (lines.length > 1) {
    +            javadoc = all_lines_start_with(lines.slice(1), '*');
    +            starless = each_line_matches_indent(lines.slice(1), lastIndent);
    +        }
    +
    +        // first line always indented
    +        print_token(lines[0]);
    +        for (j = 1; j < lines.length; j++) {
    +            print_newline(false, true);
    +            if (javadoc) {
    +                // javadoc: reformat and re-indent
    +                print_token(' ' + ltrim(lines[j]));
    +            } else if (starless && lines[j].length > lastIndentLength) {
    +                // starless: re-indent non-empty content, avoiding trim
    +                print_token(lines[j].substring(lastIndentLength));
    +            } else {
    +                // normal comments output raw
    +                output.add_token(lines[j]);
    +            }
    +        }
    +
    +        // for comments of more than one line, make sure there's a new line after
    +        print_newline(false, preserve_statement_flags);
    +    }
    +
    +    function handle_comment(preserve_statement_flags) {
    +        if (current_token.wanted_newline) {
    +            print_newline(false, preserve_statement_flags);
    +        } else {
    +            output.trim(true);
    +        }
    +
    +        output.space_before_token = true;
    +        print_token();
    +        print_newline(false, preserve_statement_flags);
    +    }
    +
    +    function handle_dot() {
    +        if (start_of_statement()) {
    +            // The conditional starts the statement if appropriate.
    +        } else {
    +            handle_whitespace_and_comments(current_token, true);
    +        }
    +
    +        if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) {
    +            output.space_before_token = true;
    +        } else {
    +            // allow preserved newlines before dots in general
    +            // force newlines on dots after close paren when break_chained - for bar().baz()
    +            allow_wrap_or_preserved_newline(flags.last_text === ')' && opt.break_chained_methods);
    +        }
    +
    +        print_token();
    +    }
    +
    +    function handle_unknown(preserve_statement_flags) {
    +        print_token();
    +
    +        if (current_token.text[current_token.text.length - 1] === '\n') {
    +            print_newline(false, preserve_statement_flags);
    +        }
    +    }
    +
    +    function handle_eof() {
    +        // Unwind any open statements
    +        while (flags.mode === MODE.Statement) {
    +            restore_mode();
    +        }
    +        handle_whitespace_and_comments(current_token);
    +    }
    +}
    +
    +module.exports.Beautifier = Beautifier;
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/src/javascript/index.js b/node_modules/js-beautify/js/src/javascript/index.js
    new file mode 100644
    index 0000000..18e3fda
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/javascript/index.js
    @@ -0,0 +1,36 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 Beautifier = require('./beautifier').Beautifier;
    +
    +function js_beautify(js_source_text, options) {
    +    var beautifier = new Beautifier(js_source_text, options);
    +    return beautifier.beautify();
    +}
    +
    +module.exports = js_beautify;
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/src/javascript/tokenizer.js b/node_modules/js-beautify/js/src/javascript/tokenizer.js
    new file mode 100644
    index 0000000..a39eb78
    --- /dev/null
    +++ b/node_modules/js-beautify/js/src/javascript/tokenizer.js
    @@ -0,0 +1,620 @@
    +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
    +/*
    +
    +    The MIT License (MIT)
    +
    +    Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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 InputScanner = require('core/inputscanner').InputScanner;
    +var Token = require('core/token').Token;
    +var acorn = require('core/acorn');
    +
    +function trim(s) {
    +    return s.replace(/^\s+|\s+$/g, '');
    +}
    +
    +function in_array(what, arr) {
    +    for (var i = 0; i < arr.length; i += 1) {
    +        if (arr[i] === what) {
    +            return true;
    +        }
    +    }
    +    return false;
    +}
    +
    +function Tokenizer(input_string, opts) {
    +
    +    var whitespace = "\n\r\t ".split('');
    +    var digit = /[0-9]/;
    +    var digit_bin = /[01]/;
    +    var digit_oct = /[01234567]/;
    +    var digit_hex = /[0123456789abcdefABCDEF]/;
    +
    +    this.positionable_operators = '!= !== % & && * ** + - / : < << <= == === > >= >> >>> ? ^ | ||'.split(' ');
    +    var punct = this.positionable_operators.concat(
    +        // non-positionable operators - these do not follow operator position settings
    +        '! %= &= *= **= ++ += , -- -= /= :: <<= = => >>= >>>= ^= |= ~ ...'.split(' '));
    +
    +    // words which should always start on new line.
    +    this.line_starters = 'continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(',');
    +    var reserved_words = this.line_starters.concat(['do', 'in', 'of', 'else', 'get', 'set', 'new', 'catch', 'finally', 'typeof', 'yield', 'async', 'await', 'from', 'as']);
    +
    +    //  /* ... */ comment ends with nearest */ or end of file
    +    var block_comment_pattern = /([\s\S]*?)((?:\*\/)|$)/g;
    +
    +    // comment ends just before nearest linefeed or end of file
    +    var comment_pattern = /([^\n\r\u2028\u2029]*)/g;
    +
    +    var directives_block_pattern = /\/\* beautify( \w+[:]\w+)+ \*\//g;
    +    var directive_pattern = / (\w+)[:](\w+)/g;
    +    var directives_end_ignore_pattern = /([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g;
    +
    +    var template_pattern = /((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;
    +
    +    var n_newlines, whitespace_before_token, in_html_comment, tokens;
    +    var input;
    +
    +    this.tokenize = function() {
    +        input = new InputScanner(input_string);
    +        in_html_comment = false;
    +        tokens = [];
    +
    +        var next, last;
    +        var token_values;
    +        var open = null;
    +        var open_stack = [];
    +        var comments = [];
    +
    +        while (!(last && last.type === 'TK_EOF')) {
    +            token_values = tokenize_next();
    +            next = new Token(token_values[1], token_values[0], n_newlines, whitespace_before_token);
    +            while (next.type === 'TK_COMMENT' || next.type === 'TK_BLOCK_COMMENT' || next.type === 'TK_UNKNOWN') {
    +                if (next.type === 'TK_BLOCK_COMMENT') {
    +                    next.directives = token_values[2];
    +                }
    +                comments.push(next);
    +                token_values = tokenize_next();
    +                next = new Token(token_values[1], token_values[0], n_newlines, whitespace_before_token);
    +            }
    +
    +            if (comments.length) {
    +                next.comments_before = comments;
    +                comments = [];
    +            }
    +
    +            if (next.type === 'TK_START_BLOCK' || next.type === 'TK_START_EXPR') {
    +                next.parent = last;
    +                open_stack.push(open);
    +                open = next;
    +            } else if ((next.type === 'TK_END_BLOCK' || next.type === 'TK_END_EXPR') &&
    +                (open && (
    +                    (next.text === ']' && open.text === '[') ||
    +                    (next.text === ')' && open.text === '(') ||
    +                    (next.text === '}' && open.text === '{')))) {
    +                next.parent = open.parent;
    +                next.opened = open;
    +
    +                open = open_stack.pop();
    +            }
    +
    +            tokens.push(next);
    +            last = next;
    +        }
    +
    +        return tokens;
    +    };
    +
    +    function get_directives(text) {
    +        if (!text.match(directives_block_pattern)) {
    +            return null;
    +        }
    +
    +        var directives = {};
    +        directive_pattern.lastIndex = 0;
    +        var directive_match = directive_pattern.exec(text);
    +
    +        while (directive_match) {
    +            directives[directive_match[1]] = directive_match[2];
    +            directive_match = directive_pattern.exec(text);
    +        }
    +
    +        return directives;
    +    }
    +
    +    function tokenize_next() {
    +        var resulting_string;
    +        var whitespace_on_this_line = [];
    +
    +        n_newlines = 0;
    +        whitespace_before_token = '';
    +
    +        var c = input.next();
    +
    +        if (c === null) {
    +            return ['', 'TK_EOF'];
    +        }
    +
    +        var last_token;
    +        if (tokens.length) {
    +            last_token = tokens[tokens.length - 1];
    +        } else {
    +            // For the sake of tokenizing we can pretend that there was on open brace to start
    +            last_token = new Token('TK_START_BLOCK', '{');
    +        }
    +
    +        while (in_array(c, whitespace)) {
    +
    +            if (acorn.newline.test(c)) {
    +                if (!(c === '\n' && input.peek(-2) === '\r')) {
    +                    n_newlines += 1;
    +                    whitespace_on_this_line = [];
    +                }
    +            } else {
    +                whitespace_on_this_line.push(c);
    +            }
    +
    +            c = input.next();
    +
    +            if (c === null) {
    +                return ['', 'TK_EOF'];
    +            }
    +        }
    +
    +        if (whitespace_on_this_line.length) {
    +            whitespace_before_token = whitespace_on_this_line.join('');
    +        }
    +
    +        if (digit.test(c) || (c === '.' && input.testChar(digit))) {
    +            var allow_decimal = true;
    +            var allow_e = true;
    +            var local_digit = digit;
    +
    +            if (c === '0' && input.testChar(/[XxOoBb]/)) {
    +                // switch to hex/oct/bin number, no decimal or e, just hex/oct/bin digits
    +                allow_decimal = false;
    +                allow_e = false;
    +                if (input.testChar(/[Bb]/)) {
    +                    local_digit = digit_bin;
    +                } else if (input.testChar(/[Oo]/)) {
    +                    local_digit = digit_oct;
    +                } else {
    +                    local_digit = digit_hex;
    +                }
    +                c += input.next();
    +            } else if (c === '.') {
    +                // Already have a decimal for this literal, don't allow another
    +                allow_decimal = false;
    +            } else {
    +                // we know this first loop will run.  It keeps the logic simpler.
    +                c = '';
    +                input.back();
    +            }
    +
    +            // Add the digits
    +            while (input.testChar(local_digit)) {
    +                c += input.next();
    +
    +                if (allow_decimal && input.peek() === '.') {
    +                    c += input.next();
    +                    allow_decimal = false;
    +                }
    +
    +                // a = 1.e-7 is valid, so we test for . then e in one loop
    +                if (allow_e && input.testChar(/[Ee]/)) {
    +                    c += input.next();
    +
    +                    if (input.testChar(/[+-]/)) {
    +                        c += input.next();
    +                    }
    +
    +                    allow_e = false;
    +                    allow_decimal = false;
    +                }
    +            }
    +
    +            return [c, 'TK_WORD'];
    +        }
    +
    +        if (acorn.isIdentifierStart(input.peekCharCode(-1))) {
    +            if (input.hasNext()) {
    +                while (acorn.isIdentifierChar(input.peekCharCode())) {
    +                    c += input.next();
    +                    if (!input.hasNext()) {
    +                        break;
    +                    }
    +                }
    +            }
    +
    +            if (!(last_token.type === 'TK_DOT' ||
    +                    (last_token.type === 'TK_RESERVED' && in_array(last_token.text, ['set', 'get']))) &&
    +                in_array(c, reserved_words)) {
    +                if (c === 'in' || c === 'of') { // hack for 'in' and 'of' operators
    +                    return [c, 'TK_OPERATOR'];
    +                }
    +                return [c, 'TK_RESERVED'];
    +            }
    +
    +            return [c, 'TK_WORD'];
    +        }
    +
    +        if (c === '(' || c === '[') {
    +            return [c, 'TK_START_EXPR'];
    +        }
    +
    +        if (c === ')' || c === ']') {
    +            return [c, 'TK_END_EXPR'];
    +        }
    +
    +        if (c === '{') {
    +            return [c, 'TK_START_BLOCK'];
    +        }
    +
    +        if (c === '}') {
    +            return [c, 'TK_END_BLOCK'];
    +        }
    +
    +        if (c === ';') {
    +            return [c, 'TK_SEMICOLON'];
    +        }
    +
    +        if (c === '/') {
    +            var comment = '';
    +            var comment_match;
    +            // peek for comment /* ... */
    +            if (input.peek() === '*') {
    +                input.next();
    +                comment_match = input.match(block_comment_pattern);
    +                comment = '/*' + comment_match[0];
    +                var directives = get_directives(comment);
    +                if (directives && directives.ignore === 'start') {
    +                    comment_match = input.match(directives_end_ignore_pattern);
    +                    comment += comment_match[0];
    +                }
    +                comment = comment.replace(acorn.allLineBreaks, '\n');
    +                return [comment, 'TK_BLOCK_COMMENT', directives];
    +            }
    +            // peek for comment // ...
    +            if (input.peek() === '/') {
    +                input.next();
    +                comment_match = input.match(comment_pattern);
    +                comment = '//' + comment_match[0];
    +                return [comment, 'TK_COMMENT'];
    +            }
    +
    +        }
    +
    +        var startXmlRegExp = /<()([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;
    +
    +        if (c === '`' || c === "'" || c === '"' || // string
    +            (
    +                (c === '/') || // regexp
    +                (opts.e4x && c === "<" && input.test(startXmlRegExp, -1)) // xml
    +            ) && ( // regex and xml can only appear in specific locations during parsing
    +                (last_token.type === 'TK_RESERVED' && in_array(last_token.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) ||
    +                (last_token.type === 'TK_END_EXPR' && last_token.text === ')' &&
    +                    last_token.parent && last_token.parent.type === 'TK_RESERVED' && in_array(last_token.parent.text, ['if', 'while', 'for'])) ||
    +                (in_array(last_token.type, ['TK_COMMENT', 'TK_START_EXPR', 'TK_START_BLOCK',
    +                    'TK_END_BLOCK', 'TK_OPERATOR', 'TK_EQUALS', 'TK_EOF', 'TK_SEMICOLON', 'TK_COMMA'
    +                ]))
    +            )) {
    +
    +            var sep = c,
    +                esc = false,
    +                has_char_escapes = false;
    +
    +            resulting_string = c;
    +
    +            if (sep === '/') {
    +                //
    +                // handle regexp
    +                //
    +                var in_char_class = false;
    +                while (input.hasNext() &&
    +                    ((esc || in_char_class || input.peek() !== sep) &&
    +                        !input.testChar(acorn.newline))) {
    +                    resulting_string += input.peek();
    +                    if (!esc) {
    +                        esc = input.peek() === '\\';
    +                        if (input.peek() === '[') {
    +                            in_char_class = true;
    +                        } else if (input.peek() === ']') {
    +                            in_char_class = false;
    +                        }
    +                    } else {
    +                        esc = false;
    +                    }
    +                    input.next();
    +                }
    +            } else if (opts.e4x && sep === '<') {
    +                //
    +                // handle e4x xml literals
    +                //
    +
    +                var xmlRegExp = /[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;
    +                input.back();
    +                var xmlStr = '';
    +                var match = input.match(startXmlRegExp);
    +                if (match) {
    +                    // Trim root tag to attempt to
    +                    var rootTag = match[2].replace(/^{\s+/, '{').replace(/\s+}$/, '}');
    +                    var isCurlyRoot = rootTag.indexOf('{') === 0;
    +                    var depth = 0;
    +                    while (match) {
    +                        var isEndTag = !!match[1];
    +                        var tagName = match[2];
    +                        var isSingletonTag = (!!match[match.length - 1]) || (tagName.slice(0, 8) === "![CDATA[");
    +                        if (!isSingletonTag &&
    +                            (tagName === rootTag || (isCurlyRoot && tagName.replace(/^{\s+/, '{').replace(/\s+}$/, '}')))) {
    +                            if (isEndTag) {
    +                                --depth;
    +                            } else {
    +                                ++depth;
    +                            }
    +                        }
    +                        xmlStr += match[0];
    +                        if (depth <= 0) {
    +                            break;
    +                        }
    +                        match = input.match(xmlRegExp);
    +                    }
    +                    // if we didn't close correctly, keep unformatted.
    +                    if (!match) {
    +                        xmlStr += input.match(/[\s\S]*/g)[0];
    +                    }
    +                    xmlStr = xmlStr.replace(acorn.allLineBreaks, '\n');
    +                    return [xmlStr, "TK_STRING"];
    +                }
    +            } else {
    +                //
    +                // handle string
    +                //
    +                var parse_string = function(delimiter, allow_unescaped_newlines, start_sub) {
    +                    // Template strings can travers lines without escape characters.
    +                    // Other strings cannot
    +                    var current_char;
    +                    while (input.hasNext()) {
    +                        current_char = input.peek();
    +                        if (!(esc || (current_char !== delimiter &&
    +                                (allow_unescaped_newlines || !acorn.newline.test(current_char))))) {
    +                            break;
    +                        }
    +
    +                        // Handle \r\n linebreaks after escapes or in template strings
    +                        if ((esc || allow_unescaped_newlines) && acorn.newline.test(current_char)) {
    +                            if (current_char === '\r' && input.peek(1) === '\n') {
    +                                input.next();
    +                                current_char = input.peek();
    +                            }
    +                            resulting_string += '\n';
    +                        } else {
    +                            resulting_string += current_char;
    +                        }
    +
    +                        if (esc) {
    +                            if (current_char === 'x' || current_char === 'u') {
    +                                has_char_escapes = true;
    +                            }
    +                            esc = false;
    +                        } else {
    +                            esc = current_char === '\\';
    +                        }
    +
    +                        input.next();
    +
    +                        if (start_sub && resulting_string.indexOf(start_sub, resulting_string.length - start_sub.length) !== -1) {
    +                            if (delimiter === '`') {
    +                                parse_string('}', allow_unescaped_newlines, '`');
    +                            } else {
    +                                parse_string('`', allow_unescaped_newlines, '${');
    +                            }
    +
    +                            if (input.hasNext()) {
    +                                resulting_string += input.next();
    +                            }
    +                        }
    +                    }
    +                };
    +
    +                if (sep === '`') {
    +                    parse_string('`', true, '${');
    +                } else {
    +                    parse_string(sep);
    +                }
    +            }
    +
    +            if (has_char_escapes && opts.unescape_strings) {
    +                resulting_string = unescape_string(resulting_string);
    +            }
    +
    +            if (input.peek() === sep) {
    +                resulting_string += sep;
    +                input.next();
    +
    +                if (sep === '/') {
    +                    // regexps may have modifiers /regexp/MOD , so fetch those, too
    +                    // Only [gim] are valid, but if the user puts in garbage, do what we can to take it.
    +                    while (input.hasNext() && acorn.isIdentifierStart(input.peekCharCode())) {
    +                        resulting_string += input.next();
    +                    }
    +                }
    +            }
    +            return [resulting_string, 'TK_STRING'];
    +        }
    +
    +        if (c === '#') {
    +
    +            if (tokens.length === 0 && input.peek() === '!') {
    +                // shebang
    +                resulting_string = c;
    +                while (input.hasNext() && c !== '\n') {
    +                    c = input.next();
    +                    resulting_string += c;
    +                }
    +                return [trim(resulting_string) + '\n', 'TK_UNKNOWN'];
    +            }
    +
    +
    +
    +            // Spidermonkey-specific sharp variables for circular references
    +            // https://developer.mozilla.org/En/Sharp_variables_in_JavaScript
    +            // http://mxr.mozilla.org/mozilla-central/source/js/src/jsscan.cpp around line 1935
    +            var sharp = '#';
    +            if (input.hasNext() && input.testChar(digit)) {
    +                do {
    +                    c = input.next();
    +                    sharp += c;
    +                } while (input.hasNext() && c !== '#' && c !== '=');
    +                if (c === '#') {
    +                    //
    +                } else if (input.peek() === '[' && input.peek(1) === ']') {
    +                    sharp += '[]';
    +                    input.next();
    +                    input.next();
    +                } else if (input.peek() === '{' && input.peek(1) === '}') {
    +                    sharp += '{}';
    +                    input.next();
    +                    input.next();
    +                }
    +                return [sharp, 'TK_WORD'];
    +            }
    +        }
    +
    +        if (c === '<' && (input.peek() === '?' || input.peek() === '%')) {
    +            input.back();
    +            var template_match = input.match(template_pattern);
    +            if (template_match) {
    +                c = template_match[0];
    +                c = c.replace(acorn.allLineBreaks, '\n');
    +                return [c, 'TK_STRING'];
    +            }
    +        }
    +
    +        if (c === '<' && input.match(/\!--/g)) {
    +            c = '', 'TK_COMMENT'];
    +        }
    +
    +        if (c === '.') {
    +            if (input.peek() === '.' && input.peek(1) === '.') {
    +                c += input.next() + input.next();
    +                return [c, 'TK_OPERATOR'];
    +            }
    +            return [c, 'TK_DOT'];
    +        }
    +
    +        if (in_array(c, punct)) {
    +            while (input.hasNext() && in_array(c + input.peek(), punct)) {
    +                c += input.next();
    +                if (!input.hasNext()) {
    +                    break;
    +                }
    +            }
    +
    +            if (c === ',') {
    +                return [c, 'TK_COMMA'];
    +            } else if (c === '=') {
    +                return [c, 'TK_EQUALS'];
    +            } else {
    +                return [c, 'TK_OPERATOR'];
    +            }
    +        }
    +
    +        return [c, 'TK_UNKNOWN'];
    +    }
    +
    +
    +    function unescape_string(s) {
    +        // You think that a regex would work for this
    +        // return s.replace(/\\x([0-9a-f]{2})/gi, function(match, val) {
    +        //         return String.fromCharCode(parseInt(val, 16));
    +        //     })
    +        // However, dealing with '\xff', '\\xff', '\\\xff' makes this more fun.
    +        var out = '',
    +            escaped = 0;
    +
    +        var input_scan = new InputScanner(s);
    +        var matched = null;
    +
    +        while (input_scan.hasNext()) {
    +            // Keep any whitespace, non-slash characters
    +            // also keep slash pairs.
    +            matched = input_scan.match(/([\s]|[^\\]|\\\\)+/g);
    +
    +            if (matched) {
    +                out += matched[0];
    +            }
    +
    +            if (input_scan.peek() === '\\') {
    +                input_scan.next();
    +                if (input_scan.peek() === 'x') {
    +                    matched = input_scan.match(/x([0-9A-Fa-f]{2})/g);
    +                } else if (input_scan.peek() === 'u') {
    +                    matched = input_scan.match(/u([0-9A-Fa-f]{4})/g);
    +                } else {
    +                    out += '\\';
    +                    if (input_scan.hasNext()) {
    +                        out += input_scan.next();
    +                    }
    +                    continue;
    +                }
    +
    +                // If there's some error decoding, return the original string
    +                if (!matched) {
    +                    return s;
    +                }
    +
    +                escaped = parseInt(matched[1], 16);
    +
    +                if (escaped > 0x7e && escaped <= 0xff && matched[0].indexOf('x') === 0) {
    +                    // we bail out on \x7f..\xff,
    +                    // leaving whole string escaped,
    +                    // as it's probably completely binary
    +                    return s;
    +                } else if (escaped >= 0x00 && escaped < 0x20) {
    +                    // leave 0x00...0x1f escaped
    +                    out += '\\' + matched[0];
    +                    continue;
    +                } else if (escaped === 0x22 || escaped === 0x27 || escaped === 0x5c) {
    +                    // single-quote, apostrophe, backslash - escape these
    +                    out += '\\' + String.fromCharCode(escaped);
    +                } else {
    +                    out += String.fromCharCode(escaped);
    +                }
    +            }
    +        }
    +
    +        return out;
    +    }
    +}
    +
    +module.exports.Tokenizer = Tokenizer;
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/test/amd-beautify-tests.js b/node_modules/js-beautify/js/test/amd-beautify-tests.js
    new file mode 100755
    index 0000000..0fd7f8e
    --- /dev/null
    +++ b/node_modules/js-beautify/js/test/amd-beautify-tests.js
    @@ -0,0 +1,62 @@
    +/*jshint node:true */
    +
    +var requirejs = require('requirejs'),
    +    SanityTest = require('./sanitytest'),
    +    Urlencoded = require('../lib/unpackers/urlencode_unpacker'),
    +    run_javascript_tests = require('./generated/beautify-javascript-tests').run_javascript_tests,
    +    run_css_tests = require('./generated/beautify-css-tests').run_css_tests,
    +    run_html_tests = require('./generated/beautify-html-tests').run_html_tests;
    +
    +requirejs.config({
    +    paths: {
    +        'beautify': "..",
    +        'beautify-lib': "../lib"
    +    }
    +});
    +
    +function amd_beautifier_index_tests(name, test_runner) {
    +    console.log('Testing ' + name + ' with node.js Require.js (index file)...');
    +    var results = new SanityTest();
    +    var beautify = requirejs('beautify/index');
    +
    +    test_runner(
    +        results,
    +        Urlencoded,
    +        beautify.js,
    +        beautify.html,
    +        beautify.css);
    +
    +    console.log(results.results_raw());
    +    return results;
    +}
    +
    +function amd_beautifier_tests(name, test_runner) {
    +    console.log('Testing ' + name + ' with node.js Require.js (separate file)...');
    +    var results = new SanityTest();
    +    var js_beautify = requirejs('beautify-lib/beautify'),
    +        css_beautify = requirejs('beautify-lib/beautify-css'),
    +        html_beautify = requirejs('beautify-lib/beautify-html');
    +
    +    test_runner(
    +        results,
    +        Urlencoded,
    +        js_beautify.js_beautify,
    +        html_beautify.html_beautify,
    +        css_beautify.css_beautify);
    +
    +    console.log(results.results_raw());
    +    return results;
    +}
    +
    +
    +
    +if (require.main === module) {
    +    process.exit(
    +        amd_beautifier_tests('js-beautifier', run_javascript_tests).get_exitcode() +
    +        amd_beautifier_index_tests('js-beautifier', run_javascript_tests).get_exitcode() +
    +        amd_beautifier_tests('cs-beautifier', run_css_tests).get_exitcode() +
    +        amd_beautifier_index_tests('css-beautifier', run_css_tests).get_exitcode() +
    +        amd_beautifier_tests('html-beautifier', run_html_tests).get_exitcode() +
    +        amd_beautifier_index_tests('html-beautifier', run_html_tests).get_exitcode()
    +    );
    +}
    \ No newline at end of file
    diff --git a/node_modules/js-beautify/js/test/generated/beautify-css-tests.js b/node_modules/js-beautify/js/test/generated/beautify-css-tests.js
    new file mode 100644
    index 0000000..a6f3ee6
    --- /dev/null
    +++ b/node_modules/js-beautify/js/test/generated/beautify-css-tests.js
    @@ -0,0 +1,1422 @@
    +/*
    +    AUTO-GENERATED. DO NOT MODIFY.
    +    Script: test/generate-tests.js
    +    Template: test/data/css/node.mustache
    +    Data: test/data/css/tests.js
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +/*jshint unused:false */
    +
    +function run_css_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_beautify)
    +{
    +
    +    var default_opts = {
    +        indent_size: 4,
    +        indent_char: ' ',
    +        preserve_newlines: true,
    +        jslint_happy: false,
    +        keep_array_indentation: false,
    +        brace_style: 'collapse',
    +        space_before_conditional: true,
    +        break_chained_methods: false,
    +        selector_separator: '\n',
    +        end_with_newline: false
    +    };
    +    var opts;
    +
    +    default_opts.indent_size = 1;
    +    default_opts.indent_char = '\t';
    +    default_opts.selector_separator_newline = true;
    +    default_opts.end_with_newline = false;
    +    default_opts.newline_between_rules = false;
    +    default_opts.space_around_combinator = false;
    +    default_opts.preserve_newlines = false;
    +    default_opts.space_around_selector_separator = false;
    +
    +    function reset_options()
    +    {
    +        opts = JSON.parse(JSON.stringify(default_opts));
    +    }
    +
    +    function test_css_beautifier(input)
    +    {
    +        return css_beautify(input, opts);
    +    }
    +
    +    var sanitytest;
    +
    +    // test the input on beautifier with the current flag settings
    +    // does not check the indentation / surroundings as bt() does
    +    function test_fragment(input, expected)
    +    {
    +        expected = expected || expected === '' ? expected : input;
    +        sanitytest.expect(input, expected);
    +        // if the expected is different from input, run it again
    +        // expected output should be unchanged when run twice.
    +        if (expected !== input) {
    +            sanitytest.expect(expected, expected);
    +        }
    +
    +        // Everywhere we do newlines, they should be replaced with opts.eol
    +        opts.eol = '\r\\n';
    +        expected = expected.replace(/[\n]/g, '\r\n');
    +        sanitytest.expect(input, expected);
    +        if (input.indexOf('\n') !== -1) {
    +            input = input.replace(/[\n]/g, '\r\n');
    +            sanitytest.expect(input, expected);
    +            // Ensure support for auto eol detection
    +            opts.eol = 'auto';
    +            sanitytest.expect(input, expected);
    +        }
    +        opts.eol = '\n';
    +    }
    +
    +    // test css
    +    function t(input, expectation)
    +    {
    +        var wrapped_input, wrapped_expectation;
    +
    +        expectation = expectation || expectation === '' ? expectation : input;
    +        sanitytest.test_function(test_css_beautifier, 'css_beautify');
    +        test_fragment(input, expectation);
    +    }
    +
    +    function unicode_char(value) {
    +        return String.fromCharCode(value);
    +    }
    +
    +    function beautifier_tests()
    +    {
    +        sanitytest = test_obj;
    +
    +        reset_options();
    +        //============================================================
    +        t(".tabs {}");
    +
    +
    +        //============================================================
    +        // End With Newline - (eof = "\n")
    +        reset_options();
    +        opts.end_with_newline = true;
    +        test_fragment('', '\n');
    +        test_fragment('   .tabs{}', '   .tabs {}\n');
    +        test_fragment(
    +            '   \n' +
    +            '\n' +
    +            '.tabs{}\n' +
    +            '\n' +
    +            '\n' +
    +            '\n',
    +            //  -- output --
    +            '   .tabs {}\n');
    +        test_fragment('\n');
    +
    +        // End With Newline - (eof = "")
    +        reset_options();
    +        opts.end_with_newline = false;
    +        test_fragment('');
    +        test_fragment('   .tabs{}', '   .tabs {}');
    +        test_fragment(
    +            '   \n' +
    +            '\n' +
    +            '.tabs{}\n' +
    +            '\n' +
    +            '\n' +
    +            '\n',
    +            //  -- output --
    +            '   .tabs {}');
    +        test_fragment('\n', '');
    +
    +
    +        //============================================================
    +        // Empty braces
    +        reset_options();
    +        t('.tabs{}', '.tabs {}');
    +        t('.tabs { }', '.tabs {}');
    +        t('.tabs    {    }', '.tabs {}');
    +        t(
    +            '.tabs    \n' +
    +            '{\n' +
    +            '    \n' +
    +            '  }',
    +            //  -- output --
    +            '.tabs {}');
    +
    +
    +        //============================================================
    +        // 
    +        reset_options();
    +        t(
    +            '#cboxOverlay {\n' +
    +            '\tbackground: url(images/overlay.png) repeat 0 0;\n' +
    +            '\topacity: 0.9;\n' +
    +            '\tfilter: alpha(opacity = 90);\n' +
    +            '}',
    +            //  -- output --
    +            '#cboxOverlay {\n' +
    +            '\tbackground: url(images/overlay.png) repeat 0 0;\n' +
    +            '\topacity: 0.9;\n' +
    +            '\tfilter: alpha(opacity=90);\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Support simple language specific option inheritance/overriding - (c = "     ")
    +        reset_options();
    +        opts.indent_char = ' ';
    +        opts.indent_size = 4;
    +        opts.js = { 'indent_size': 3 };
    +        opts.css = { 'indent_size': 5 };
    +        t(
    +            '.selector {\n' +
    +            '     font-size: 12px;\n' +
    +            '}');
    +
    +        // Support simple language specific option inheritance/overriding - (c = "    ")
    +        reset_options();
    +        opts.indent_char = ' ';
    +        opts.indent_size = 4;
    +        opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 } };
    +        t(
    +            '.selector {\n' +
    +            '    font-size: 12px;\n' +
    +            '}');
    +
    +        // Support simple language specific option inheritance/overriding - (c = "   ")
    +        reset_options();
    +        opts.indent_char = ' ';
    +        opts.indent_size = 9;
    +        opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 8 }, 'indent_size': 2};
    +        opts.js = { 'indent_size': 5 };
    +        opts.css = { 'indent_size': 3 };
    +        t(
    +            '.selector {\n' +
    +            '   font-size: 12px;\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Space Around Combinator - (space = " ")
    +        reset_options();
    +        opts.space_around_combinator = true;
    +        t('a>b{}', 'a > b {}');
    +        t('a~b{}', 'a ~ b {}');
    +        t('a+b{}', 'a + b {}');
    +        t('a+b>c{}', 'a + b > c {}');
    +        t('a > b{}', 'a > b {}');
    +        t('a ~ b{}', 'a ~ b {}');
    +        t('a + b{}', 'a + b {}');
    +        t('a + b > c{}', 'a + b > c {}');
    +        t(
    +            'a > b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a > b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a ~ b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a ~ b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a + b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a + b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a + b > c{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a + b > c {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +
    +        // Space Around Combinator - (space = "")
    +        reset_options();
    +        opts.space_around_combinator = false;
    +        t('a>b{}', 'a>b {}');
    +        t('a~b{}', 'a~b {}');
    +        t('a+b{}', 'a+b {}');
    +        t('a+b>c{}', 'a+b>c {}');
    +        t('a > b{}', 'a>b {}');
    +        t('a ~ b{}', 'a~b {}');
    +        t('a + b{}', 'a+b {}');
    +        t('a + b > c{}', 'a+b>c {}');
    +        t(
    +            'a > b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a>b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a ~ b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a~b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a + b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a+b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a + b > c{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a+b>c {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +
    +        // Space Around Combinator - (space = " ")
    +        reset_options();
    +        opts.space_around_selector_separator = true;
    +        t('a>b{}', 'a > b {}');
    +        t('a~b{}', 'a ~ b {}');
    +        t('a+b{}', 'a + b {}');
    +        t('a+b>c{}', 'a + b > c {}');
    +        t('a > b{}', 'a > b {}');
    +        t('a ~ b{}', 'a ~ b {}');
    +        t('a + b{}', 'a + b {}');
    +        t('a + b > c{}', 'a + b > c {}');
    +        t(
    +            'a > b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a > b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a ~ b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a ~ b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a + b{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a + b {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +        t(
    +            'a + b > c{width: calc(100% + 45px);}',
    +            //  -- output --
    +            'a + b > c {\n' +
    +            '\twidth: calc(100% + 45px);\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Selector Separator - (separator = " ", separator1 = " ")
    +        reset_options();
    +        opts.selector_separator_newline = false;
    +        opts.selector_separator = " ";
    +        t(
    +            '#bla, #foo{color:green}',
    +            //  -- output --
    +            '#bla, #foo {\n' +
    +            '\tcolor: green\n' +
    +            '}');
    +        t(
    +            '@media print {.tab{}}',
    +            //  -- output --
    +            '@media print {\n' +
    +            '\t.tab {}\n' +
    +            '}');
    +        t(
    +            '@media print {.tab,.bat{}}',
    +            //  -- output --
    +            '@media print {\n' +
    +            '\t.tab, .bat {}\n' +
    +            '}');
    +        t(
    +            '#bla, #foo{color:black}',
    +            //  -- output --
    +            '#bla, #foo {\n' +
    +            '\tcolor: black\n' +
    +            '}');
    +        t(
    +            'a:first-child,a:first-child{color:red;div:first-child,div:hover{color:black;}}',
    +            //  -- output --
    +            'a:first-child, a:first-child {\n' +
    +            '\tcolor: red;\n' +
    +            '\tdiv:first-child, div:hover {\n' +
    +            '\t\tcolor: black;\n' +
    +            '\t}\n' +
    +            '}');
    +
    +        // Selector Separator - (separator = " ", separator1 = " ")
    +        reset_options();
    +        opts.selector_separator_newline = false;
    +        opts.selector_separator = "  ";
    +        t(
    +            '#bla, #foo{color:green}',
    +            //  -- output --
    +            '#bla, #foo {\n' +
    +            '\tcolor: green\n' +
    +            '}');
    +        t(
    +            '@media print {.tab{}}',
    +            //  -- output --
    +            '@media print {\n' +
    +            '\t.tab {}\n' +
    +            '}');
    +        t(
    +            '@media print {.tab,.bat{}}',
    +            //  -- output --
    +            '@media print {\n' +
    +            '\t.tab, .bat {}\n' +
    +            '}');
    +        t(
    +            '#bla, #foo{color:black}',
    +            //  -- output --
    +            '#bla, #foo {\n' +
    +            '\tcolor: black\n' +
    +            '}');
    +        t(
    +            'a:first-child,a:first-child{color:red;div:first-child,div:hover{color:black;}}',
    +            //  -- output --
    +            'a:first-child, a:first-child {\n' +
    +            '\tcolor: red;\n' +
    +            '\tdiv:first-child, div:hover {\n' +
    +            '\t\tcolor: black;\n' +
    +            '\t}\n' +
    +            '}');
    +
    +        // Selector Separator - (separator = "\n", separator1 = "\n\t")
    +        reset_options();
    +        opts.selector_separator_newline = true;
    +        opts.selector_separator = " ";
    +        t(
    +            '#bla, #foo{color:green}',
    +            //  -- output --
    +            '#bla,\n#foo {\n' +
    +            '\tcolor: green\n' +
    +            '}');
    +        t(
    +            '@media print {.tab{}}',
    +            //  -- output --
    +            '@media print {\n' +
    +            '\t.tab {}\n' +
    +            '}');
    +        t(
    +            '@media print {.tab,.bat{}}',
    +            //  -- output --
    +            '@media print {\n' +
    +            '\t.tab,\n\t.bat {}\n' +
    +            '}');
    +        t(
    +            '#bla, #foo{color:black}',
    +            //  -- output --
    +            '#bla,\n#foo {\n' +
    +            '\tcolor: black\n' +
    +            '}');
    +        t(
    +            'a:first-child,a:first-child{color:red;div:first-child,div:hover{color:black;}}',
    +            //  -- output --
    +            'a:first-child,\na:first-child {\n' +
    +            '\tcolor: red;\n' +
    +            '\tdiv:first-child,\n\tdiv:hover {\n' +
    +            '\t\tcolor: black;\n' +
    +            '\t}\n' +
    +            '}');
    +
    +        // Selector Separator - (separator = "\n", separator1 = "\n\t")
    +        reset_options();
    +        opts.selector_separator_newline = true;
    +        opts.selector_separator = "  ";
    +        t(
    +            '#bla, #foo{color:green}',
    +            //  -- output --
    +            '#bla,\n#foo {\n' +
    +            '\tcolor: green\n' +
    +            '}');
    +        t(
    +            '@media print {.tab{}}',
    +            //  -- output --
    +            '@media print {\n' +
    +            '\t.tab {}\n' +
    +            '}');
    +        t(
    +            '@media print {.tab,.bat{}}',
    +            //  -- output --
    +            '@media print {\n' +
    +            '\t.tab,\n\t.bat {}\n' +
    +            '}');
    +        t(
    +            '#bla, #foo{color:black}',
    +            //  -- output --
    +            '#bla,\n#foo {\n' +
    +            '\tcolor: black\n' +
    +            '}');
    +        t(
    +            'a:first-child,a:first-child{color:red;div:first-child,div:hover{color:black;}}',
    +            //  -- output --
    +            'a:first-child,\na:first-child {\n' +
    +            '\tcolor: red;\n' +
    +            '\tdiv:first-child,\n\tdiv:hover {\n' +
    +            '\t\tcolor: black;\n' +
    +            '\t}\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Preserve Newlines - (separator_input = "\n\n", separator_output = "\n\n")
    +        reset_options();
    +        opts.preserve_newlines = true;
    +        t('.div {}\n\n.span {}');
    +        t(
    +            '#bla, #foo{\n' +
    +            '\tcolor:black;\n\n\tfont-size: 12px;\n' +
    +            '}',
    +            //  -- output --
    +            '#bla,\n' +
    +            '#foo {\n' +
    +            '\tcolor: black;\n\n\tfont-size: 12px;\n' +
    +            '}');
    +
    +        // Preserve Newlines - (separator_input = "\n\n", separator_output = "\n")
    +        reset_options();
    +        opts.preserve_newlines = false;
    +        t('.div {}\n\n.span {}', '.div {}\n.span {}');
    +        t(
    +            '#bla, #foo{\n' +
    +            '\tcolor:black;\n\n\tfont-size: 12px;\n' +
    +            '}',
    +            //  -- output --
    +            '#bla,\n' +
    +            '#foo {\n' +
    +            '\tcolor: black;\n\tfont-size: 12px;\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Preserve Newlines and newline_between_rules
    +        reset_options();
    +        opts.preserve_newlines = true;
    +        opts.newline_between_rules = true;
    +        t(
    +            '.div {}.span {}',
    +            //  -- output --
    +            '.div {}\n' +
    +            '\n' +
    +            '.span {}');
    +        t(
    +            '#bla, #foo{\n' +
    +            '\tcolor:black;\n' +
    +            '\tfont-size: 12px;\n' +
    +            '}',
    +            //  -- output --
    +            '#bla,\n' +
    +            '#foo {\n' +
    +            '\tcolor: black;\n' +
    +            '\tfont-size: 12px;\n' +
    +            '}');
    +        t(
    +            '#bla, #foo{\n' +
    +            '\tcolor:black;\n' +
    +            '\n' +
    +            '\n' +
    +            '\tfont-size: 12px;\n' +
    +            '}',
    +            //  -- output --
    +            '#bla,\n' +
    +            '#foo {\n' +
    +            '\tcolor: black;\n' +
    +            '\n' +
    +            '\n' +
    +            '\tfont-size: 12px;\n' +
    +            '}');
    +        t(
    +            '#bla,\n' +
    +            '\n' +
    +            '#foo {\n' +
    +            '\tcolor: black;\n' +
    +            '\tfont-size: 12px;\n' +
    +            '}');
    +        t(
    +            'a {\n' +
    +            '\tb: c;\n' +
    +            '\n' +
    +            '\n' +
    +            '\td: {\n' +
    +            '\t\te: f;\n' +
    +            '\t}\n' +
    +            '}');
    +        t(
    +            '.div {}\n' +
    +            '\n' +
    +            '.span {}');
    +        t(
    +            'html {}\n' +
    +            '\n' +
    +            '/*this is a comment*/');
    +        t(
    +            '.div {\n' +
    +            '\ta: 1;\n' +
    +            '\n' +
    +            '\n' +
    +            '\tb: 2;\n' +
    +            '}\n' +
    +            '\n' +
    +            '\n' +
    +            '\n' +
    +            '.span {\n' +
    +            '\ta: 1;\n' +
    +            '}');
    +        t(
    +            '.div {\n' +
    +            '\n' +
    +            '\n' +
    +            '\ta: 1;\n' +
    +            '\n' +
    +            '\n' +
    +            '\tb: 2;\n' +
    +            '}\n' +
    +            '\n' +
    +            '\n' +
    +            '\n' +
    +            '.span {\n' +
    +            '\ta: 1;\n' +
    +            '}');
    +        t(
    +            '@media screen {\n' +
    +            '\t.div {\n' +
    +            '\t\ta: 1;\n' +
    +            '\n' +
    +            '\n' +
    +            '\t\tb: 2;\n' +
    +            '\t}\n' +
    +            '\n' +
    +            '\n' +
    +            '\n' +
    +            '\t.span {\n' +
    +            '\t\ta: 1;\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '\n' +
    +            '.div {}\n' +
    +            '\n' +
    +            '.span {}');
    +
    +
    +        //============================================================
    +        // Preserve Newlines and add tabs
    +        reset_options();
    +        opts.preserve_newlines = true;
    +        t(
    +            '.tool-tip {\n' +
    +            '\tposition: relative;\n' +
    +            '\n' +
    +            '\t\t\n' +
    +            '\t.tool-tip-content {\n' +
    +            '\t\t&>* {\n' +
    +            '\t\t\tmargin-top: 0;\n' +
    +            '\t\t}\n' +
    +            '\t\t\n' +
    +            '\n' +
    +            '\t\t.mixin-box-shadow(.2rem .2rem .5rem rgba(0, 0, 0, .15));\n' +
    +            '\t\tpadding: 1rem;\n' +
    +            '\t\tposition: absolute;\n' +
    +            '\t\tz-index: 10;\n' +
    +            '\t}\n' +
    +            '}',
    +            //  -- output --
    +            '.tool-tip {\n' +
    +            '\tposition: relative;\n' +
    +            '\n' +
    +            '\n' +
    +            '\t.tool-tip-content {\n' +
    +            '\t\t&>* {\n' +
    +            '\t\t\tmargin-top: 0;\n' +
    +            '\t\t}\n' +
    +            '\n\n\t\t.mixin-box-shadow(.2rem .2rem .5rem rgba(0, 0, 0, .15));\n' +
    +            '\t\tpadding: 1rem;\n' +
    +            '\t\tposition: absolute;\n' +
    +            '\t\tz-index: 10;\n' +
    +            '\t}\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Newline Between Rules - (separator = "\n")
    +        reset_options();
    +        opts.newline_between_rules = true;
    +        t(
    +            '.div {}\n' +
    +            '.span {}',
    +            //  -- output --
    +            '.div {}\n' +
    +            '\n.span {}');
    +        t(
    +            '.div{}\n' +
    +            '   \n' +
    +            '.span{}',
    +            //  -- output --
    +            '.div {}\n' +
    +            '\n.span {}');
    +        t(
    +            '.div {}    \n' +
    +            '  \n' +
    +            '.span { } \n',
    +            //  -- output --
    +            '.div {}\n' +
    +            '\n.span {}');
    +        t(
    +            '.div {\n' +
    +            '    \n' +
    +            '} \n' +
    +            '  .span {\n' +
    +            ' }  ',
    +            //  -- output --
    +            '.div {}\n' +
    +            '\n.span {}');
    +        t(
    +            '.selector1 {\n' +
    +            '\tmargin: 0; /* This is a comment including an url http://domain.com/path/to/file.ext */\n' +
    +            '}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            '.selector1 {\n' +
    +            '\tmargin: 0;\n' +
    +            '\t/* This is a comment including an url http://domain.com/path/to/file.ext */\n' +
    +            '}\n' +
    +            '\n.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            '.tabs{width:10px;//end of line comment\n' +
    +            'height:10px;//another\n' +
    +            '}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\twidth: 10px; //end of line comment\n' +
    +            '\theight: 10px; //another\n' +
    +            '}\n' +
    +            '\n.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            '#foo {\n' +
    +            '\tbackground-image: url(foo@2x.png);\n' +
    +            '\t@font-face {\n' +
    +            '\t\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            '#foo {\n' +
    +            '\tbackground-image: url(foo@2x.png);\n' +
    +            '\t@font-face {\n' +
    +            '\t\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '\n.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            '@media screen {\n' +
    +            '\t#foo:hover {\n' +
    +            '\t\tbackground-image: url(foo@2x.png);\n' +
    +            '\t}\n' +
    +            '\t@font-face {\n' +
    +            '\t\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            '@media screen {\n' +
    +            '\t#foo:hover {\n' +
    +            '\t\tbackground-image: url(foo@2x.png);\n' +
    +            '\t}\n' +
    +            '\t@font-face {\n' +
    +            '\t\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '\n.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            '@font-face {\n' +
    +            '\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '}\n' +
    +            '@media screen {\n' +
    +            '\t#foo:hover {\n' +
    +            '\t\tbackground-image: url(foo.png);\n' +
    +            '\t}\n' +
    +            '\t@media screen and (min-device-pixel-ratio: 2) {\n' +
    +            '\t\t@font-face {\n' +
    +            '\t\t\tfont-family: "Helvetica Neue"\n' +
    +            '\t\t}\n' +
    +            '\t\t#foo:hover {\n' +
    +            '\t\t\tbackground-image: url(foo@2x.png);\n' +
    +            '\t\t}\n' +
    +            '\t}\n' +
    +            '}',
    +            //  -- output --
    +            '@font-face {\n' +
    +            '\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '}\n' +
    +            '\n@media screen {\n' +
    +            '\t#foo:hover {\n' +
    +            '\t\tbackground-image: url(foo.png);\n' +
    +            '\t}\n' +
    +            '\t@media screen and (min-device-pixel-ratio: 2) {\n' +
    +            '\t\t@font-face {\n' +
    +            '\t\t\tfont-family: "Helvetica Neue"\n' +
    +            '\t\t}\n' +
    +            '\t\t#foo:hover {\n' +
    +            '\t\t\tbackground-image: url(foo@2x.png);\n' +
    +            '\t\t}\n' +
    +            '\t}\n' +
    +            '}');
    +        t(
    +            'a:first-child{color:red;div:first-child{color:black;}}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            'a:first-child {\n' +
    +            '\tcolor: red;\n' +
    +            '\tdiv:first-child {\n' +
    +            '\t\tcolor: black;\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '\n.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            'a:first-child{color:red;div:not(.peq){color:black;}}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            'a:first-child {\n' +
    +            '\tcolor: red;\n' +
    +            '\tdiv:not(.peq) {\n' +
    +            '\t\tcolor: black;\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '\n.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +
    +        // Newline Between Rules - (separator = "")
    +        reset_options();
    +        opts.newline_between_rules = false;
    +        t(
    +            '.div {}\n' +
    +            '.span {}');
    +        t(
    +            '.div{}\n' +
    +            '   \n' +
    +            '.span{}',
    +            //  -- output --
    +            '.div {}\n' +
    +            '.span {}');
    +        t(
    +            '.div {}    \n' +
    +            '  \n' +
    +            '.span { } \n',
    +            //  -- output --
    +            '.div {}\n' +
    +            '.span {}');
    +        t(
    +            '.div {\n' +
    +            '    \n' +
    +            '} \n' +
    +            '  .span {\n' +
    +            ' }  ',
    +            //  -- output --
    +            '.div {}\n' +
    +            '.span {}');
    +        t(
    +            '.selector1 {\n' +
    +            '\tmargin: 0; /* This is a comment including an url http://domain.com/path/to/file.ext */\n' +
    +            '}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            '.selector1 {\n' +
    +            '\tmargin: 0;\n' +
    +            '\t/* This is a comment including an url http://domain.com/path/to/file.ext */\n' +
    +            '}\n' +
    +            '.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            '.tabs{width:10px;//end of line comment\n' +
    +            'height:10px;//another\n' +
    +            '}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\twidth: 10px; //end of line comment\n' +
    +            '\theight: 10px; //another\n' +
    +            '}\n' +
    +            '.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            '#foo {\n' +
    +            '\tbackground-image: url(foo@2x.png);\n' +
    +            '\t@font-face {\n' +
    +            '\t\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            '#foo {\n' +
    +            '\tbackground-image: url(foo@2x.png);\n' +
    +            '\t@font-face {\n' +
    +            '\t\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            '@media screen {\n' +
    +            '\t#foo:hover {\n' +
    +            '\t\tbackground-image: url(foo@2x.png);\n' +
    +            '\t}\n' +
    +            '\t@font-face {\n' +
    +            '\t\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            '@media screen {\n' +
    +            '\t#foo:hover {\n' +
    +            '\t\tbackground-image: url(foo@2x.png);\n' +
    +            '\t}\n' +
    +            '\t@font-face {\n' +
    +            '\t\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\t\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            '@font-face {\n' +
    +            '\tfont-family: "Bitstream Vera Serif Bold";\n' +
    +            '\tsrc: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");\n' +
    +            '}\n' +
    +            '@media screen {\n' +
    +            '\t#foo:hover {\n' +
    +            '\t\tbackground-image: url(foo.png);\n' +
    +            '\t}\n' +
    +            '\t@media screen and (min-device-pixel-ratio: 2) {\n' +
    +            '\t\t@font-face {\n' +
    +            '\t\t\tfont-family: "Helvetica Neue"\n' +
    +            '\t\t}\n' +
    +            '\t\t#foo:hover {\n' +
    +            '\t\t\tbackground-image: url(foo@2x.png);\n' +
    +            '\t\t}\n' +
    +            '\t}\n' +
    +            '}');
    +        t(
    +            'a:first-child{color:red;div:first-child{color:black;}}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            'a:first-child {\n' +
    +            '\tcolor: red;\n' +
    +            '\tdiv:first-child {\n' +
    +            '\t\tcolor: black;\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +        t(
    +            'a:first-child{color:red;div:not(.peq){color:black;}}\n' +
    +            '.div{height:15px;}',
    +            //  -- output --
    +            'a:first-child {\n' +
    +            '\tcolor: red;\n' +
    +            '\tdiv:not(.peq) {\n' +
    +            '\t\tcolor: black;\n' +
    +            '\t}\n' +
    +            '}\n' +
    +            '.div {\n' +
    +            '\theight: 15px;\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Functions braces
    +        reset_options();
    +        t('.tabs(){}', '.tabs() {}');
    +        t('.tabs (){}', '.tabs () {}');
    +        t(
    +            '.tabs (pa, pa(1,2)), .cols { }',
    +            //  -- output --
    +            '.tabs (pa, pa(1, 2)),\n' +
    +            '.cols {}');
    +        t(
    +            '.tabs(pa, pa(1,2)), .cols { }',
    +            //  -- output --
    +            '.tabs(pa, pa(1, 2)),\n' +
    +            '.cols {}');
    +        t('.tabs (   )   {    }', '.tabs () {}');
    +        t('.tabs(   )   {    }', '.tabs() {}');
    +        t(
    +            '.tabs  (t, t2)  \n' +
    +            '{\n' +
    +            '  key: val(p1  ,p2);  \n' +
    +            '  }',
    +            //  -- output --
    +            '.tabs (t, t2) {\n' +
    +            '\tkey: val(p1, p2);\n' +
    +            '}');
    +        t(
    +            '.box-shadow(@shadow: 0 1px 3px rgba(0, 0, 0, .25)) {\n' +
    +            '\t-webkit-box-shadow: @shadow;\n' +
    +            '\t-moz-box-shadow: @shadow;\n' +
    +            '\tbox-shadow: @shadow;\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Comments
    +        reset_options();
    +        t('/* test */');
    +        t(
    +            '.tabs{/* test */}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\t/* test */\n' +
    +            '}');
    +        t(
    +            '.tabs{/* test */}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\t/* test */\n' +
    +            '}');
    +        t(
    +            '/* header */.tabs {}',
    +            //  -- output --
    +            '/* header */\n' +
    +            '\n' +
    +            '.tabs {}');
    +        t(
    +            '.tabs {\n' +
    +            '/* non-header */\n' +
    +            'width:10px;}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\t/* non-header */\n' +
    +            '\twidth: 10px;\n' +
    +            '}');
    +        t('/* header');
    +        t('// comment');
    +        t(
    +            '.selector1 {\n' +
    +            '\tmargin: 0; /* This is a comment including an url http://domain.com/path/to/file.ext */\n' +
    +            '}',
    +            //  -- output --
    +            '.selector1 {\n' +
    +            '\tmargin: 0;\n' +
    +            '\t/* This is a comment including an url http://domain.com/path/to/file.ext */\n' +
    +            '}');
    +        
    +        // single line comment support (less/sass)
    +        t(
    +            '.tabs{\n' +
    +            '// comment\n' +
    +            'width:10px;\n' +
    +            '}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\t// comment\n' +
    +            '\twidth: 10px;\n' +
    +            '}');
    +        t(
    +            '.tabs{// comment\n' +
    +            'width:10px;\n' +
    +            '}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\t// comment\n' +
    +            '\twidth: 10px;\n' +
    +            '}');
    +        t(
    +            '//comment\n' +
    +            '.tabs{width:10px;}',
    +            //  -- output --
    +            '//comment\n' +
    +            '.tabs {\n' +
    +            '\twidth: 10px;\n' +
    +            '}');
    +        t(
    +            '.tabs{//comment\n' +
    +            '//2nd single line comment\n' +
    +            'width:10px;}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\t//comment\n' +
    +            '\t//2nd single line comment\n' +
    +            '\twidth: 10px;\n' +
    +            '}');
    +        t(
    +            '.tabs{width:10px;//end of line comment\n' +
    +            '}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\twidth: 10px; //end of line comment\n' +
    +            '}');
    +        t(
    +            '.tabs{width:10px;//end of line comment\n' +
    +            'height:10px;}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\twidth: 10px; //end of line comment\n' +
    +            '\theight: 10px;\n' +
    +            '}');
    +        t(
    +            '.tabs{width:10px;//end of line comment\n' +
    +            'height:10px;//another\n' +
    +            '}',
    +            //  -- output --
    +            '.tabs {\n' +
    +            '\twidth: 10px; //end of line comment\n' +
    +            '\theight: 10px; //another\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Handle LESS property name interpolation
    +        reset_options();
    +        t(
    +            'tag {\n' +
    +            '\t@{prop}: none;\n' +
    +            '}');
    +        t(
    +            'tag{@{prop}:none;}',
    +            //  -- output --
    +            'tag {\n' +
    +            '\t@{prop}: none;\n' +
    +            '}');
    +        t(
    +            'tag{ @{prop}: none;}',
    +            //  -- output --
    +            'tag {\n' +
    +            '\t@{prop}: none;\n' +
    +            '}');
    +        
    +        // can also be part of property name
    +        t(
    +            'tag {\n' +
    +            '\tdynamic-@{prop}: none;\n' +
    +            '}');
    +        t(
    +            'tag{dynamic-@{prop}:none;}',
    +            //  -- output --
    +            'tag {\n' +
    +            '\tdynamic-@{prop}: none;\n' +
    +            '}');
    +        t(
    +            'tag{ dynamic-@{prop}: none;}',
    +            //  -- output --
    +            'tag {\n' +
    +            '\tdynamic-@{prop}: none;\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Handle LESS property name interpolation, test #631
    +        reset_options();
    +        t(
    +            '.generate-columns(@n, @i: 1) when (@i =< @n) {\n' +
    +            '\t.column-@{i} {\n' +
    +            '\t\twidth: (@i * 100% / @n);\n' +
    +            '\t}\n' +
    +            '\t.generate-columns(@n, (@i + 1));\n' +
    +            '}');
    +        t(
    +            '.generate-columns(@n,@i:1) when (@i =< @n){.column-@{i}{width:(@i * 100% / @n);}.generate-columns(@n,(@i + 1));}',
    +            //  -- output --
    +            '.generate-columns(@n, @i: 1) when (@i =< @n) {\n' +
    +            '\t.column-@{i} {\n' +
    +            '\t\twidth: (@i * 100% / @n);\n' +
    +            '\t}\n' +
    +            '\t.generate-columns(@n, (@i + 1));\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Psuedo-classes vs Variables
    +        reset_options();
    +        t('@page :first {}');
    +        
    +        // Assume the colon goes with the @name. If we're in LESS, this is required regardless of the at-string.
    +        t('@page:first {}', '@page: first {}');
    +        t('@page: first {}');
    +
    +
    +        //============================================================
    +        // SASS/SCSS
    +        reset_options();
    +        
    +        // Basic Interpolation
    +        t(
    +            'p {\n' +
    +            '\t$font-size: 12px;\n' +
    +            '\t$line-height: 30px;\n' +
    +            '\tfont: #{$font-size}/#{$line-height};\n' +
    +            '}');
    +        t('p.#{$name} {}');
    +        t(
    +            '@mixin itemPropertiesCoverItem($items, $margin) {\n' +
    +            '\twidth: calc((100% - ((#{$items} - 1) * #{$margin}rem)) / #{$items});\n' +
    +            '\tmargin: 1.6rem #{$margin}rem 1.6rem 0;\n' +
    +            '}');
    +        
    +        // Multiple filed issues in LESS due to not(:blah)
    +        t('&:first-of-type:not(:last-child) {}');
    +        t(
    +            'div {\n' +
    +            '\t&:not(:first-of-type) {\n' +
    +            '\t\tbackground: red;\n' +
    +            '\t}\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Proper handling of colon in selectors
    +        reset_options();
    +        opts.selector_separator_newline = false;
    +        t('a :b {}');
    +        t('a ::b {}');
    +        t('a:b {}');
    +        t('a::b {}');
    +        t(
    +            'a {}, a::b {}, a   ::b {}, a:b {}, a   :b {}',
    +            //  -- output --
    +            'a {}\n' +
    +            ', a::b {}\n' +
    +            ', a ::b {}\n' +
    +            ', a:b {}\n' +
    +            ', a :b {}');
    +        t(
    +            '.card-blue ::-webkit-input-placeholder {\n' +
    +            '\tcolor: #87D1FF;\n' +
    +            '}');
    +        t(
    +            'div [attr] :not(.class) {\n' +
    +            '\tcolor: red;\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Regresssion Tests
    +        reset_options();
    +        opts.selector_separator_newline = false;
    +        t(
    +            '@media(min-width:768px) {\n' +
    +            '\t.selector::after {\n' +
    +            '\t\t/* property: value */\n' +
    +            '\t}\n' +
    +            '\t.other-selector {\n' +
    +            '\t\t/* property: value */\n' +
    +            '\t}\n' +
    +            '}');
    +        t(
    +            '.fa-rotate-270 {\n' +
    +            '\tfilter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // Important 
    +        reset_options();
    +        t(
    +            'a {\n' +
    +            '\tcolor: blue  !important;\n' +
    +            '}',
    +            //  -- output --
    +            'a {\n' +
    +            '\tcolor: blue !important;\n' +
    +            '}');
    +        t(
    +            'a {\n' +
    +            '\tcolor: blue!important;\n' +
    +            '}',
    +            //  -- output --
    +            'a {\n' +
    +            '\tcolor: blue !important;\n' +
    +            '}');
    +        t(
    +            'a {\n' +
    +            '\tcolor: blue !important;\n' +
    +            '}');
    +
    +
    +        //============================================================
    +        // 
    +        reset_options();
    +
    +
    +    }
    +
    +    function beautifier_unconverted_tests()
    +    {
    +        sanitytest = test_obj;
    +
    +        reset_options();
    +        //============================================================
    +        // test basic css beautifier
    +        t(".tabs {}");
    +        t(".tabs{color:red;}", ".tabs {\n\tcolor: red;\n}");
    +        t(".tabs{color:rgb(255, 255, 0)}", ".tabs {\n\tcolor: rgb(255, 255, 0)\n}");
    +        t(".tabs{background:url('back.jpg')}", ".tabs {\n\tbackground: url('back.jpg')\n}");
    +        t("#bla, #foo{color:red}", "#bla,\n#foo {\n\tcolor: red\n}");
    +        t("@media print {.tab{}}", "@media print {\n\t.tab {}\n}");
    +        t("@media print {.tab{background-image:url(foo@2x.png)}}", "@media print {\n\t.tab {\n\t\tbackground-image: url(foo@2x.png)\n\t}\n}");
    +
    +        t("a:before {\n" +
    +            "\tcontent: 'a{color:black;}\"\"\\'\\'\"\\n\\n\\na{color:black}\';\n" +
    +            "}");
    +
    +        //lead-in whitespace determines base-indent.
    +        // lead-in newlines are stripped.
    +        t("\n\na, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}");
    +        t("   a, img {padding: 0.2px}", "   a,\n   img {\n   \tpadding: 0.2px\n   }");
    +        t(" \t \na, img {padding: 0.2px}", " \t a,\n \t img {\n \t \tpadding: 0.2px\n \t }");
    +        t("\n\n     a, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}");
    +
    +        // separate selectors
    +        t("#bla, #foo{color:red}", "#bla,\n#foo {\n\tcolor: red\n}");
    +        t("a, img {padding: 0.2px}", "a,\nimg {\n\tpadding: 0.2px\n}");
    +
    +        // block nesting
    +        t("#foo {\n\tbackground-image: url(foo@2x.png);\n\t@font-face {\n\t\tfont-family: 'Bitstream Vera Serif Bold';\n\t\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n\t}\n}");
    +        t("@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo@2x.png);\n\t}\n\t@font-face {\n\t\tfont-family: 'Bitstream Vera Serif Bold';\n\t\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n\t}\n}");
    +/*
    +@font-face {
    +    font-family: 'Bitstream Vera Serif Bold';
    +    src: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');
    +}
    +@media screen {
    +    #foo:hover {
    +        background-image: url(foo.png);
    +    }
    +    @media screen and (min-device-pixel-ratio: 2) {
    +        @font-face {
    +            font-family: 'Helvetica Neue'
    +        }
    +        #foo:hover {
    +            background-image: url(foo@2x.png);
    +        }
    +    }
    +}
    +*/
    +        t("@font-face {\n\tfont-family: 'Bitstream Vera Serif Bold';\n\tsrc: url('http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf');\n}\n@media screen {\n\t#foo:hover {\n\t\tbackground-image: url(foo.png);\n\t}\n\t@media screen and (min-device-pixel-ratio: 2) {\n\t\t@font-face {\n\t\t\tfont-family: 'Helvetica Neue'\n\t\t}\n\t\t#foo:hover {\n\t\t\tbackground-image: url(foo@2x.png);\n\t\t}\n\t}\n}");
    +
    +        // less-css cases
    +        t('.well{@well-bg:@bg-color;@well-fg:@fg-color;}','.well {\n\t@well-bg: @bg-color;\n\t@well-fg: @fg-color;\n}');
    +        t('.well {&.active {\nbox-shadow: 0 1px 1px @border-color, 1px 0 1px @border-color;}}',
    +            '.well {\n' +
    +            '\t&.active {\n' +
    +            '\t\tbox-shadow: 0 1px 1px @border-color, 1px 0 1px @border-color;\n' +
    +            '\t}\n' +
    +            '}');
    +        t('a {\n' +
    +            '\tcolor: blue;\n' +
    +            '\t&:hover {\n' +
    +            '\t\tcolor: green;\n' +
    +            '\t}\n' +
    +            '\t& & &&&.active {\n' +
    +            '\t\tcolor: green;\n' +
    +            '\t}\n' +
    +            '}');
    +
    +        // Not sure if this is sensible
    +        // but I believe it is correct to not remove the space in "&: hover".
    +        t('a {\n' +
    +            '\t&: hover {\n' +
    +            '\t\tcolor: green;\n' +
    +            '\t}\n' +
    +            '}');
    +
    +        // import
    +        t('@import "test";');
    +
    +        // don't break nested pseudo-classes
    +        t("a:first-child{color:red;div:first-child{color:black;}}",
    +            "a:first-child {\n\tcolor: red;\n\tdiv:first-child {\n\t\tcolor: black;\n\t}\n}");
    +
    +        // handle SASS/LESS parent reference
    +        t("div{&:first-letter {text-transform: uppercase;}}",
    +            "div {\n\t&:first-letter {\n\t\ttext-transform: uppercase;\n\t}\n}");
    +
    +        //nested modifiers (&:hover etc)
    +        t(".tabs{&:hover{width:10px;}}", ".tabs {\n\t&:hover {\n\t\twidth: 10px;\n\t}\n}");
    +        t(".tabs{&.big{width:10px;}}", ".tabs {\n\t&.big {\n\t\twidth: 10px;\n\t}\n}");
    +        t(".tabs{&>big{width:10px;}}", ".tabs {\n\t&>big {\n\t\twidth: 10px;\n\t}\n}");
    +        t(".tabs{&+.big{width:10px;}}", ".tabs {\n\t&+.big {\n\t\twidth: 10px;\n\t}\n}");
    +
    +        //nested rules
    +        t(".tabs{.child{width:10px;}}", ".tabs {\n\t.child {\n\t\twidth: 10px;\n\t}\n}");
    +
    +        //variables
    +        t("@myvar:10px;.tabs{width:10px;}", "@myvar: 10px;\n.tabs {\n\twidth: 10px;\n}");
    +        t("@myvar:10px; .tabs{width:10px;}", "@myvar: 10px;\n.tabs {\n\twidth: 10px;\n}");
    +
    +        // test options
    +        opts.indent_size = 2;
    +        opts.indent_char = ' ';
    +        opts.selector_separator_newline = false;
    +
    +        // pseudo-classes and pseudo-elements
    +        t("#foo:hover {\n  background-image: url(foo@2x.png)\n}");
    +        t("#foo *:hover {\n  color: purple\n}");
    +        t("::selection {\n  color: #ff0000;\n}");
    +
    +        // TODO: don't break nested pseduo-classes
    +        t("@media screen {.tab,.bat:hover {color:red}}", "@media screen {\n  .tab, .bat:hover {\n    color: red\n  }\n}");
    +
    +        // particular edge case with braces and semicolons inside tags that allows custom text
    +        t("a:not(\"foobar\\\";{}omg\"){\ncontent: 'example\\';{} text';\ncontent: \"example\\\";{} text\";}",
    +            "a:not(\"foobar\\\";{}omg\") {\n  content: 'example\\';{} text';\n  content: \"example\\\";{} text\";\n}");
    +
    +        // may not eat the space before "["
    +        t('html.js [data-custom="123"] {\n  opacity: 1.00;\n}');
    +        t('html.js *[data-custom="123"] {\n  opacity: 1.00;\n}');
    +    }
    +
    +    beautifier_tests();
    +    beautifier_unconverted_tests();
    +}
    +
    +if (typeof exports !== "undefined") {
    +    exports.run_css_tests = run_css_tests;
    +}
    diff --git a/node_modules/js-beautify/js/test/generated/beautify-html-tests.js b/node_modules/js-beautify/js/test/generated/beautify-html-tests.js
    new file mode 100644
    index 0000000..4d3ea07
    --- /dev/null
    +++ b/node_modules/js-beautify/js/test/generated/beautify-html-tests.js
    @@ -0,0 +1,3212 @@
    +/*
    +    AUTO-GENERATED. DO NOT MODIFY.
    +    Script: test/generate-tests.js
    +    Template: test/data/html/node.mustache
    +    Data: test/data/html/tests.js
    +
    +  The MIT License (MIT)
    +
    +  Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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.
    +*/
    +/*jshint unused:false */
    +
    +function run_html_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_beautify)
    +{
    +
    +    var default_opts = {
    +        indent_size: 4,
    +        indent_char: ' ',
    +        preserve_newlines: true,
    +        jslint_happy: false,
    +        keep_array_indentation: false,
    +        brace_style: 'collapse',
    +        space_before_conditional: true,
    +        break_chained_methods: false,
    +        selector_separator: '\n',
    +        end_with_newline: false
    +    };
    +    var opts;
    +
    +    default_opts.indent_size = 4;
    +    default_opts.indent_char = ' ';
    +    default_opts.indent_with_tabs = false;
    +    default_opts.preserve_newlines = true;
    +    default_opts.jslint_happy = false;
    +    default_opts.keep_array_indentation = false;
    +    default_opts.brace_style = 'collapse';
    +    default_opts.extra_liners = ['html', 'head', '/html'];
    +
    +    function reset_options()
    +    {
    +        opts = JSON.parse(JSON.stringify(default_opts));
    +    }
    +
    +    function test_html_beautifier(input)
    +    {
    +        return html_beautify(input, opts);
    +    }
    +
    +    var sanitytest;
    +
    +    // test the input on beautifier with the current flag settings
    +    // does not check the indentation / surroundings as bt() does
    +    function test_fragment(input, expected)
    +    {
    +        expected = expected || expected === '' ? expected : input;
    +        sanitytest.expect(input, expected);
    +        // if the expected is different from input, run it again
    +        // expected output should be unchanged when run twice.
    +        if (expected !== input) {
    +            sanitytest.expect(expected, expected);
    +        }
    +
    +        // Everywhere we do newlines, they should be replaced with opts.eol
    +        opts.eol = '\r\n';
    +        expected = expected.replace(/[\n]/g, '\r\n');
    +        sanitytest.expect(input, expected);
    +        if (input.indexOf('\n') !== -1) {
    +            input = input.replace(/[\n]/g, '\r\n');
    +            sanitytest.expect(input, expected);
    +            // Ensure support for auto eol detection
    +            opts.eol = 'auto';
    +            sanitytest.expect(input, expected);
    +        }
    +        opts.eol = '\n';
    +    }
    +
    +    // test html
    +    function bth(input, expectation)
    +    {
    +        var wrapped_input, wrapped_expectation, field_input, field_expectation;
    +
    +        expectation = expectation || expectation === '' ? expectation : input;
    +        sanitytest.test_function(test_html_beautifier, 'html_beautify');
    +        test_fragment(input, expectation);
    +
    +        if (opts.indent_size === 4 && input) {
    +            wrapped_input = '
    \n' + input.replace(/^(.+)$/mg, ' $1') + '\n inline\n
    '; + wrapped_expectation = '
    \n' + expectation.replace(/^(.+)$/mg, ' $1') + '\n inline\n
    '; + test_fragment(wrapped_input, wrapped_expectation); + } + } + + function unicode_char(value) { + return String.fromCharCode(value); + } + + function beautifier_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + bth(''); + + + //============================================================ + // Handle inline and block elements differently - () + reset_options(); + test_fragment( + '

    Block

    ', + // -- output -- + '\n' + + '

    Block

    \n' + + ''); + test_fragment('Inline'); + + + //============================================================ + // End With Newline - (eof = "\n") + reset_options(); + opts.end_with_newline = true; + test_fragment('', '\n'); + test_fragment('
    ', '
    \n'); + test_fragment('\n'); + + // End With Newline - (eof = "") + reset_options(); + opts.end_with_newline = false; + test_fragment(''); + test_fragment('
    '); + test_fragment('\n', ''); + + + //============================================================ + // Custom Extra Liners (empty) - () + reset_options(); + opts.extra_liners = []; + test_fragment( + '

    x

    ', + // -- output -- + '\n' + + '\n' + + ' \n' + + '\n' + + '\n' + + '
    \n' + + '

    x

    \n' + + '
    \n' + + '\n' + + ''); + + + //============================================================ + // Custom Extra Liners (default) - () + reset_options(); + opts.extra_liners = null; + test_fragment( + '', + // -- output -- + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // Custom Extra Liners (p, string) - () + reset_options(); + opts.extra_liners = 'p,/p'; + test_fragment( + '

    x

    ', + // -- output -- + '\n' + + '\n' + + ' \n' + + '\n' + + '\n' + + '
    \n' + + '\n' + + '

    x\n' + + '\n' + + '

    \n' + + '
    \n' + + '\n' + + ''); + + + //============================================================ + // Custom Extra Liners (p) - () + reset_options(); + opts.extra_liners = ['p', '/p']; + test_fragment( + '

    x

    ', + // -- output -- + '\n' + + '\n' + + ' \n' + + '\n' + + '\n' + + '
    \n' + + '\n' + + '

    x\n' + + '\n' + + '

    \n' + + '
    \n' + + '\n' + + ''); + + + //============================================================ + // Tests for script and style types (issue 453, 821) + reset_options(); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + bth( + '', + // -- output -- + ''); + + + //============================================================ + // Attribute Wrap alignment with spaces - () + reset_options(); + opts.wrap_attributes = 'force-aligned'; + opts.indent_with_tabs = true; + test_fragment( + '
    test
    ', + // -- output -- + '
    \n' + + '\t
    \n' + + '\t\t
    test
    \n' + + '\t
    \n' + + '
    '); + + + //============================================================ + // Attribute Wrap de-indent - () + reset_options(); + opts.wrap_attributes = 'force-aligned'; + opts.indent_with_tabs = false; + test_fragment( + '
    test
    ', + // -- output -- + '
    \n' + + '
    test
    \n' + + '
    '); + test_fragment( + '

    \n' + + ' \n' + + '

    ', + // -- output -- + '

    \n' + + ' \n' + + '

    '); + test_fragment( + '

    \n' + + ' \n' + + '

    ', + // -- output -- + '

    \n' + + ' \n' + + '

    '); + + + //============================================================ + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force'; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force'; + opts.wrap_line_length = 80; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force'; + opts.wrap_attributes_indent_size = 8; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n") + reset_options(); + opts.wrap_attributes = 'auto'; + opts.wrap_line_length = 80; + opts.wrap_attributes_indent_size = 0; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment('', ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'auto'; + opts.wrap_line_length = 80; + opts.wrap_attributes_indent_size = 4; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment('', ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = " ") + reset_options(); + opts.wrap_attributes = 'auto'; + opts.wrap_line_length = 0; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    '); + test_fragment('
    This is some text
    '); + test_fragment('', ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment(''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_faligned = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-aligned'; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_faligned = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-aligned'; + opts.wrap_line_length = 80; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_faligned = " ", indent_attr_first = " ", indent_end = "", indent_end_selfclosing = " ", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-aligned'; + opts.wrap_attributes_indent_size = 8; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + '
    This is some text
    '); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = "\n ", indent_end = "\n", indent_end_selfclosing = "\n", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-expand-multiline'; + opts.wrap_attributes_indent_size = 4; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + 'This is some text'); + test_fragment( + '
    This is some text
    ', + // -- output -- + 'This is some text'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = "\n ", indent_end = "\n", indent_end_selfclosing = "\n", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-expand-multiline'; + opts.wrap_attributes_indent_size = 4; + opts.wrap_line_length = 80; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + 'This is some text'); + test_fragment( + '
    This is some text
    ', + // -- output -- + 'This is some text'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + // Attribute Wrap - (indent_attr = "\n ", indent_attr_first = "\n ", indent_end = "\n", indent_end_selfclosing = "\n", indent_over80 = "\n ") + reset_options(); + opts.wrap_attributes = 'force-expand-multiline'; + opts.wrap_attributes_indent_size = 8; + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment('
    This is some text
    ', '
    This is some text
    '); + test_fragment( + '
    This is some text
    ', + // -- output -- + 'This is some text'); + test_fragment( + '
    This is some text
    ', + // -- output -- + 'This is some text'); + test_fragment( + '', + // -- output -- + ''); + test_fragment( + '', + // -- output -- + '\n' + + ''); + test_fragment( + '', + // -- output -- + ''); + + + //============================================================ + // Handlebars Indenting Off + reset_options(); + opts.indent_handlebars = false; + test_fragment( + '{{#if 0}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 0}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + '{{#each thing}}\n' + + ' {{name}}\n' + + '{{/each}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#each thing}} {{name}} {{/each}}\n' + + '
    '); + + + //============================================================ + // Handlebars Indenting On - (content = "{{field}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}{{field}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{field}}{{/if}}', + // -- output -- + '{{#if words}}{{field}}{{/if}}'); + test_fragment( + '{{#if words}}{{field}}{{/if}}', + // -- output -- + '{{#if words}}{{field}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{field}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{field}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{field}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{field}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{field}}\n' + + ' {{else}}\n' + + ' {{field}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{field}}\n' + + '{{else}}\n' + + ' {{field}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{field}}\n' + + ' {{else}}\n' + + '{{field}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{field}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{field}}\n' + + ' {{else}}\n' + + ' {{field}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{field}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
    '); + test_fragment( + '{{field}}', + // -- output -- + '
    {{field}}
    '); + test_fragment( + '{{field}}', + // -- output -- + '
    {{field}}
    '); + test_fragment( + '{{field}}', + // -- output -- + '{{field}}'); + test_fragment('
    {{field}}
    '); + test_fragment('
    {{field}}
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{! comment}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}{{! comment}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{! comment}}{{/if}}', + // -- output -- + '{{#if words}}{{! comment}}{{/if}}'); + test_fragment( + '{{#if words}}{{! comment}}{{/if}}', + // -- output -- + '{{#if words}}{{! comment}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{! comment}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{! comment}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{! comment}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{! comment}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{! comment}}\n' + + ' {{else}}\n' + + ' {{! comment}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{! comment}}\n' + + '{{else}}\n' + + ' {{! comment}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{! comment}}\n' + + ' {{else}}\n' + + '{{! comment}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{! comment}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{! comment}}\n' + + ' {{else}}\n' + + ' {{! comment}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{! comment}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
    '); + test_fragment( + '{{! comment}}', + // -- output -- + '
    {{! comment}}
    '); + test_fragment( + '{{! comment}}', + // -- output -- + '
    {{! comment}}
    '); + test_fragment( + '{{! comment}}', + // -- output -- + '{{! comment}}'); + test_fragment('
    {{! comment}}
    '); + test_fragment('
    {{! comment}}
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{!-- comment--}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}{{!-- comment--}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- comment--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- comment--}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- comment--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- comment--}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{!-- comment--}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{!-- comment--}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{!-- comment--}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{!-- comment--}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{!-- comment--}}\n' + + ' {{else}}\n' + + ' {{!-- comment--}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{!-- comment--}}\n' + + '{{else}}\n' + + ' {{!-- comment--}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{!-- comment--}}\n' + + ' {{else}}\n' + + '{{!-- comment--}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{!-- comment--}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{!-- comment--}}\n' + + ' {{else}}\n' + + ' {{!-- comment--}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{!-- comment--}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
    '); + test_fragment( + '{{!-- comment--}}', + // -- output -- + '
    {{!-- comment--}}
    '); + test_fragment( + '{{!-- comment--}}', + // -- output -- + '
    {{!-- comment--}}
    '); + test_fragment( + '{{!-- comment--}}', + // -- output -- + '{{!-- comment--}}'); + test_fragment('
    {{!-- comment--}}
    '); + test_fragment('
    {{!-- comment--}}
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{pre{{field1}} {{field2}} {{field3}}post") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}', + // -- output -- + '{{#if words}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}'); + test_fragment( + '{{#if words}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}', + // -- output -- + '{{#if words}}{pre{{field1}} {{field2}} {{field3}}post{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{else}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + '{{else}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{else}}\n' + + '{pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{else}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {pre{{field1}} {{field2}} {{field3}}post\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
    '); + test_fragment( + '{pre{{field1}} {{field2}} {{field3}}post', + // -- output -- + '
    {pre{{field1}} {{field2}} {{field3}}post
    '); + test_fragment( + '{pre{{field1}} {{field2}} {{field3}}post', + // -- output -- + '
    {pre{{field1}} {{field2}} {{field3}}post
    '); + test_fragment( + '{pre{{field1}} {{field2}} {{field3}}post', + // -- output -- + '{pre{{field1}} {{field2}} {{field3}}post'); + test_fragment('
    {pre{{field1}} {{field2}} {{field3}}post
    '); + test_fragment('
    {pre{{field1}} {{field2}} {{field3}}post
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{! \n mult-line\ncomment \n with spacing\n}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment( + '{{#if 0}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}', + // -- output -- + '{{#if words}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}'); + test_fragment( + '{{#if words}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}', + // -- output -- + '{{#if words}}{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{else}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{else}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{else}}\n' + + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{else}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
    '); + test_fragment( + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}', + // -- output -- + '
    {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}
    '); + test_fragment( + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}', + // -- output -- + '
    {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}
    '); + test_fragment( + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}', + // -- output -- + '{{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}'); + test_fragment( + '
    {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}
    '); + test_fragment( + '
    {{! \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '}}
    '); + test_fragment( + '
    '); + test_fragment( + '
    '); + test_fragment( + '
    '); + test_fragment( + '
    '); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{!-- \n mult-line\ncomment \n with spacing\n--}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment( + '{{#if 0}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{else}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
    '); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}', + // -- output -- + '
    {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}
    '); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}', + // -- output -- + '
    {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}
    '); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}', + // -- output -- + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}'); + test_fragment( + '
    {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}
    '); + test_fragment( + '
    {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + '--}}
    '); + test_fragment( + '
    '); + test_fragment( + '
    '); + test_fragment( + '
    '); + test_fragment( + '
    '); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "{{!-- \n mult-line\ncomment \n{{#> component}}\n mult-line\ncomment \n with spacing\n {{/ component}}--}}") + reset_options(); + opts.indent_handlebars = true; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment( + '{{#if 0}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}'); + test_fragment( + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}', + // -- output -- + '{{#if words}}{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}\n' + + '{{#if}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{else}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
    '); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}', + // -- output -- + '
    {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}
    '); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}', + // -- output -- + '
    {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}
    '); + test_fragment( + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}', + // -- output -- + '{{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}'); + test_fragment( + '
    {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}
    '); + test_fragment( + '
    {{!-- \n' + + ' mult-line\n' + + 'comment \n' + + '{{#> component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}
    '); + test_fragment( + '
    component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}">
    '); + test_fragment( + '
    '); + test_fragment( + '
    component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}\'>
    '); + test_fragment( + '
    component}}\n' + + ' mult-line\n' + + 'comment \n' + + ' with spacing\n' + + ' {{/ component}}--}}{{/if}}\'>
    '); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + // Handlebars Indenting On - (content = "content") + reset_options(); + opts.indent_handlebars = true; + opts.wrap_line_length = 80; + test_fragment('{{page-title}}'); + test_fragment('{{#if 0}}{{/if}}'); + test_fragment('{{#if 0}}content{{/if}}'); + test_fragment( + '{{#if 0}}\n' + + '{{/if}}'); + test_fragment( + '{{#if words}}{{/if}}', + // -- output -- + '{{#if words}}{{/if}}'); + test_fragment( + '{{#if words}}content{{/if}}', + // -- output -- + '{{#if words}}content{{/if}}'); + test_fragment( + '{{#if words}}content{{/if}}', + // -- output -- + '{{#if words}}content{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '
    \n' + + '{{#if 1}}\n' + + '{{/if}}\n' + + '
    ', + // -- output -- + '
    \n' + + ' {{#if 1}}\n' + + ' {{/if}}\n' + + '
    '); + test_fragment( + '{{#if}}\n' + + '{{#each}}\n' + + '{{#if}}\n' + + 'content\n' + + '{{/if}}\n' + + '{{#if}}\n' + + 'content\n' + + '{{/if}}\n' + + '{{/each}}\n' + + '{{/if}}', + // -- output -- + '{{#if}}\n' + + ' {{#each}}\n' + + ' {{#if}}\n' + + ' content\n' + + ' {{/if}}\n' + + ' {{#if}}\n' + + ' content\n' + + ' {{/if}}\n' + + ' {{/each}}\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + '
    \n' + + '
    \n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' content\n' + + ' {{else}}\n' + + ' content\n' + + '{{/if}}', + // -- output -- + '{{#if 1}}\n' + + ' content\n' + + '{{else}}\n' + + ' content\n' + + '{{/if}}'); + test_fragment( + '{{#if 1}}\n' + + ' {{else}}\n' + + ' {{/if}}', + // -- output -- + '{{#if 1}}\n' + + '{{else}}\n' + + '{{/if}}'); + test_fragment( + '{{#if thing}}\n' + + '{{#if otherthing}}\n' + + ' content\n' + + ' {{else}}\n' + + 'content\n' + + ' {{/if}}\n' + + ' {{else}}\n' + + 'content\n' + + '{{/if}}', + // -- output -- + '{{#if thing}}\n' + + ' {{#if otherthing}}\n' + + ' content\n' + + ' {{else}}\n' + + ' content\n' + + ' {{/if}}\n' + + '{{else}}\n' + + ' content\n' + + '{{/if}}'); + test_fragment( + '', + // -- output -- + '
    '); + test_fragment( + 'content', + // -- output -- + '
    content
    '); + test_fragment( + 'content', + // -- output -- + '
    content
    '); + test_fragment( + 'content', + // -- output -- + 'content'); + test_fragment('
    content
    '); + test_fragment('
    content
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment('{{condition < 0 ? "result1" : "result2"}}'); + test_fragment('{{condition1 && condition2 && condition3 && condition4 < 0 ? "resForTrue" : "resForFalse"}}'); + + + //============================================================ + // Handlebars Else tag indenting + reset_options(); + opts.indent_handlebars = true; + test_fragment( + '{{#if test}}
    {{else}}
    {{/if}}', + // -- output -- + '{{#if test}}\n' + + '
    \n' + + '{{else}}\n' + + '
    \n' + + '{{/if}}'); + test_fragment('{{#if test}}{{else}}{{/if}}'); + + + //============================================================ + // Unclosed html elements + reset_options(); + test_fragment( + '\n' + + ''); + test_fragment( + '
    \n' + + '
    '); + test_fragment( + '\n' + + ''); + test_fragment( + '\n' + + ''); + test_fragment( + '\n' + + ''); + test_fragment( + '\n' + + ' \n' + + ' \n' + + ''); + + + //============================================================ + // Unformatted tags + reset_options(); + test_fragment( + '
      \n' + + '
    1. b
      c
    2. \n' + + '
    ', + // -- output -- + '
      \n' + + '
    1. b\n' + + '
      c
      \n' + + '
    2. \n' + + '
    '); + test_fragment( + '
      \n' + + '
    1. bc
    2. \n' + + '
    '); + test_fragment( + '
      \n' + + '
    • \n' + + ' \n' + + ' Kontakt\n' + + '
    • \n' + + '
    '); + test_fragment('
    '); + test_fragment('
    '); + test_fragment( + '

    \n' + + ' \n' + + '

    '); + test_fragment( + '

    \n' + + ' \n' + + '

    '); + test_fragment( + '

    \n' + + ' \n' + + '

    '); + test_fragment( + '

    \n' + + ' image: image: \n' + + '

    '); + test_fragment( + '

    \n' + + ' image: image: \n' + + '

    '); + + + //============================================================ + // File starting with comment + reset_options(); + test_fragment( + '\n' + + '\n' + + '\n' + + '\n' + + ' a span\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // Php formatting + reset_options(); + test_fragment( + '

    ', + // -- output -- + '

    \n' + + ' \n' + + '

    '); + test_fragment( + '");\n' + + '}\n' + + '?>'); + test_fragment( + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // Support simple language specific option inheritance/overriding - (h = " ", c = " ", j = " ") + reset_options(); + opts.js = { 'indent_size': 3 }; + opts.css = { 'indent_size': 5 }; + test_fragment( + '\n' + + ' \n' + + ' \n' + + ''); + + // Support simple language specific option inheritance/overriding - (h = " ", c = " ", j = " ") + reset_options(); + opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 } }; + test_fragment( + '\n' + + ' \n' + + ' \n' + + ''); + + // Support simple language specific option inheritance/overriding - (h = " ", c = " ", j = " ") + reset_options(); + opts.indent_size = 9; + opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 }, 'indent_size': 2}; + opts.js = { 'indent_size': 5 }; + opts.css = { 'indent_size': 3 }; + test_fragment( + '\n' + + ' \n' + + ' \n' + + ''); + + + //============================================================ + // underscore.js formatting + reset_options(); + test_fragment( + '
    \n' + + ' \n' + + '
    '); + + + //============================================================ + // Indent with tabs + reset_options(); + opts.indent_with_tabs = true; + test_fragment( + '
    \n' + + '
    \n' + + '
    \n' + + '
    ', + // -- output -- + '
    \n' + + '\t
    \n' + + '\t
    \n' + + '
    '); + + + //============================================================ + // Indent without tabs + reset_options(); + opts.indent_with_tabs = false; + test_fragment( + '
    \n' + + '
    \n' + + '
    \n' + + '
    ', + // -- output -- + '
    \n' + + '
    \n' + + '
    \n' + + '
    '); + + + //============================================================ + // Indent body inner html by default + reset_options(); + test_fragment( + '\n' + + '\n' + + '
    \n' + + '\n' + + '\n' + + '', + // -- output -- + '\n' + + '\n' + + '
    \n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // indent_body_inner_html set to false prevents indent of body inner html + reset_options(); + opts.indent_body_inner_html = false; + test_fragment( + '\n' + + '\n' + + '
    \n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // Indent head inner html by default + reset_options(); + test_fragment( + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '', + // -- output -- + '\n' + + '\n' + + '\n' + + ' \n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // indent_head_inner_html set to false prevents indent of head inner html + reset_options(); + opts.indent_head_inner_html = false; + test_fragment( + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + '\n' + + ''); + + + //============================================================ + // content_unformatted to prevent formatting content + reset_options(); + opts.content_unformatted = ['script', 'style', 'p', 'span', 'br']; + test_fragment( + '

    A

    ', + // -- output -- + '\n' + + '\n' + + '

    A

    \n' + + ' \n' + + ' \n' + + '\n' + + '\n' + + ''); + test_fragment( + '

    Beautify me

    But not me

    ', + // -- output -- + '
    \n' + + '

    Beautify me

    \n' + + '
    \n' + + '

    But not me

    '); + test_fragment( + '
    Beautify me

    But not me

    ', + // -- output -- + '
    \n' + + '

    Beautify me

    \n' + + '
    \n' + + '

    But not me

    '); + test_fragment('
    blabla
    something here
    '); + test_fragment('

    '); + test_fragment( + '
    var a=1;\n' +
    +            'var b=a;
    ', + // -- output -- + '
    \n' + + '
    var a=1; var b=a;
    \n' + + '
    '); + test_fragment( + '
    \n' +
    +            'var a=1;\n' +
    +            'var b=a;\n' +
    +            '
    ', + // -- output -- + '
    \n' + + '
    \n' +
    +            '        var a=1; var b=a;\n' +
    +            '    
    \n' + + '
    '); + + + //============================================================ + // default content_unformatted + reset_options(); + test_fragment( + '

    A

    ', + // -- output -- + '\n' + + '\n' + + '

    A

    \n' + + ' \n' + + ' \n' + + '\n' + + '\n' + + ''); + test_fragment( + '

    Beautify me

    But not me

    ', + // -- output -- + '
    \n' + + '

    Beautify me

    \n' + + '
    \n' + + '

    \n' + + '

    But not me

    \n' + + '

    '); + test_fragment( + '
    Beautify me

    But not me

    ', + // -- output -- + '
    \n' + + '

    Beautify me

    \n' + + '
    \n' + + '

    \n' + + '

    But not me

    \n' + + '

    '); + test_fragment('
    blabla
    something here
    '); + test_fragment('

    '); + test_fragment( + '
    var a=1;\n' +
    +            'var b=a;
    ', + // -- output -- + '
    \n' + + '
    var a=1;\n' +
    +            'var b=a;
    \n' + + '
    '); + test_fragment( + '
    \n' +
    +            'var a=1;\n' +
    +            'var b=a;\n' +
    +            '
    ', + // -- output -- + '
    \n' + + '
    \n' +
    +            'var a=1;\n' +
    +            'var b=a;\n' +
    +            '
    \n' + + '
    '); + + + //============================================================ + // New Test Suite + reset_options(); + + + } + + function beautifier_unconverted_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + opts.end_with_newline = true; + test_fragment('', '\n'); + test_fragment('
    \n'); + test_fragment('
    \n\n\n', '
    \n'); + test_fragment('\n' + + ' \n' + + '\n'); + + + opts.end_with_newline = false; + // error cases need love too + bth('Evil'); + bth(" + + test_fragment( + '\n' + + ' \n' + + ''); + + test_fragment('
    \n', '
    '); + bth('
    '); + bth('
    content
    '); + bth('
    ', + '
    \n' + + '
    \n' + + '
    '); + bth('
    content
    ', + '
    \n' + + '
    content
    \n' + + '
    '); + bth('
    \n' + + ' content\n' + + '
    '); + bth('
    \n' + + '
    '); + bth('
    \n' + + ' content\n' + + '
    '); + bth('
    \n' + + '
    ', + '
    \n' + + '
    '); + bth('
    \n' + + '
    ', + '
    \n' + + '
    '); + bth('
    \n' + + '
    \n' + + '
    \n' + + '
    ', + '
    \n' + + '
    \n' + + '
    \n' + + '
    '); + bth('
    \n' + + '
    ', + '
    \n' + + '
    '); + bth('
    content
    ', + '
    content
    '); + bth('
    ', + '
    '); + bth('content\n' + + '
    \n' + + '
    \n' + + 'content', + 'content\n' + + '
    \n' + + '
    \n' + + 'content'); + bth('
  • \n' + + '
    \n' + + '
    \n' + + '
  • '); + bth('
  • \n' + + '
    \n' + + '
    \n' + + '
  • ', + '
  • \n' + + '
    \n' + + '
    \n' + + '
  • '); + bth('
  • \n' + + ' content\n' + + '
  • \n' + + '
  • \n' + + ' content\n' + + '
  • '); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('content'); + bth(' content'); + bth(' content', ' content'); + + bth('
    contentcontent
    '); + bth('
    content content
    '); + bth('
    content content
    ', + '
    content content
    '); + bth('Text Link Text'); + + var unformatted = opts.unformatted; + opts.unformatted = ['script', 'style']; + bth(''); + bth(''); + opts.unformatted = unformatted; + + unformatted = opts.unformatted; + opts.unformatted = ['custom-element']; + test_fragment('
    should not' + + ' insert newlines
    ', + '
    should not' + + ' insert newlines
    '); + opts.unformatted = unformatted; + + // Tests that don't pass, but probably should. + // bth('
    content
    '); + + // Handlebars tests + // Without the indent option on, handlebars are treated as content. + + opts.wrap_line_length = 0; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all.
    '); + + // A value of 0 means no max line length, and should not wrap. + //...---------1---------2---------3---------4---------5---------6---------7---------8---------9--------10--------11--------12--------13--------14--------15--------16--------17--------18--------19--------20--------21--------22--------23--------24--------25--------26--------27--------28--------29 + //...12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    '); + + opts.wrap_line_length = "0"; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all.
    '); + + // A value of "0" means no max line length, and should not wrap + //...---------1---------2---------3---------4---------5---------6---------7---------8---------9--------10--------11--------12--------13--------14--------15--------16--------17--------18--------19--------20--------21--------22--------23--------24--------25--------26--------27--------28--------29 + //...12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    ', + /* expected */ + '
    Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all. Some text that should not wrap at all.
    '); + + //BUGBUG: This should wrap before 40 not after. + opts.wrap_line_length = 40; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some test text that should wrap_inside_this section here.
    ', + /* expected */ + '
    Some test text that should wrap_inside_this\n' + + ' section here.
    '); + + opts.wrap_line_length = "40"; + //...---------1---------2---------3---------4---------5---------6---------7 + //...1234567890123456789012345678901234567890123456789012345678901234567890 + bth('
    Some test text that should wrap_inside_this section here.
    ', + /* expected */ + '
    Some test text that should wrap_inside_this\n' + + ' section here.
    '); + + opts.indent_size = 1; + opts.indent_char = '\t'; + opts.preserve_newlines = false; + bth('
    \n\tfoo\n
    ', '
    foo
    '); + + opts.preserve_newlines = true; + bth('
    \n\tfoo\n
    '); + + + + // test preserve_newlines and max_preserve_newlines + opts.preserve_newlines = false; + bth('
    Should not
    \n\n\n' + + '
    preserve newlines
    ', + '
    Should not
    \n' + + '
    preserve newlines
    '); + + opts.preserve_newlines = true; + opts.max_preserve_newlines = 0; + bth('
    Should
    \n\n\n' + + '
    preserve zero newlines
    ', + '
    Should
    \n' + + '
    preserve zero newlines
    '); + + opts.max_preserve_newlines = 1; + bth('
    Should
    \n\n\n' + + '
    preserve one newline
    ', + '
    Should
    \n\n' + + '
    preserve one newline
    '); + + opts.max_preserve_newlines = null; + bth('
    Should
    \n\n\n' + + '
    preserve one newline
    ', + '
    Should
    \n\n\n' + + '
    preserve one newline
    '); + } + + beautifier_tests(); + beautifier_unconverted_tests(); +} + +if (typeof exports !== "undefined") { + exports.run_html_tests = run_html_tests; +} diff --git a/node_modules/js-beautify/js/test/generated/beautify-javascript-tests.js b/node_modules/js-beautify/js/test/generated/beautify-javascript-tests.js new file mode 100644 index 0000000..da06d71 --- /dev/null +++ b/node_modules/js-beautify/js/test/generated/beautify-javascript-tests.js @@ -0,0 +1,5896 @@ +/* + AUTO-GENERATED. DO NOT MODIFY. + Script: test/generate-tests.js + Template: test/data/javascript/node.mustache + Data: test/data/javascript/tests.js + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and 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. +*/ +/*jshint unused:false */ + +function run_javascript_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_beautify) +{ + + var default_opts = { + indent_size: 4, + indent_char: ' ', + preserve_newlines: true, + jslint_happy: false, + keep_array_indentation: false, + brace_style: 'collapse', + space_before_conditional: true, + break_chained_methods: false, + selector_separator: '\n', + end_with_newline: false + }; + var opts; + + default_opts.indent_size = 4; + default_opts.indent_char = ' '; + default_opts.preserve_newlines = true; + default_opts.jslint_happy = false; + default_opts.keep_array_indentation = false; + default_opts.brace_style = 'collapse'; + default_opts.operator_position = 'before-newline'; + + function reset_options() + { + opts = JSON.parse(JSON.stringify(default_opts)); + } + + function test_js_beautifier(input) + { + return js_beautify(input, opts); + } + + var sanitytest; + + // test the input on beautifier with the current flag settings + // does not check the indentation / surroundings as bt() does + function test_fragment(input, expected) + { + expected = expected || expected === '' ? expected : input; + sanitytest.expect(input, expected); + // if the expected is different from input, run it again + // expected output should be unchanged when run twice. + if (expected !== input) { + sanitytest.expect(expected, expected); + } + + // Everywhere we do newlines, they should be replaced with opts.eol + opts.eol = '\r\\n'; + expected = expected.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + if (input.indexOf('\n') !== -1) { + input = input.replace(/[\n]/g, '\r\n'); + sanitytest.expect(input, expected); + // Ensure support for auto eol detection + opts.eol = 'auto'; + sanitytest.expect(input, expected); + } + opts.eol = '\n'; + } + + + + // test the input on beautifier with the current flag settings + // test both the input as well as { input } wrapping + function bt(input, expectation) + { + var wrapped_input, wrapped_expectation; + + expectation = expectation || expectation === '' ? expectation : input; + sanitytest.test_function(test_js_beautifier, 'js_beautify'); + test_fragment(input, expectation); + + // If we set raw, input should be unchanged + opts.test_output_raw = true; + if (!opts.end_with_newline) { + test_fragment(input, input); + } + opts.test_output_raw = false; + + // test also the returned indentation + // e.g if input = "asdf();" + // then test that this remains properly formatted as well: + // { + // asdf(); + // indent; + // } + + var current_indent_size = opts.js ? opts.js.indent_size : null; + current_indent_size = current_indent_size ? current_indent_size : opts.indent_size; + if (current_indent_size === 4 && input) { + wrapped_input = '{\n' + input.replace(/^(.+)$/mg, ' $1') + '\n foo = bar;\n}'; + wrapped_expectation = '{\n' + expectation.replace(/^(.+)$/mg, ' $1') + '\n foo = bar;\n}'; + test_fragment(wrapped_input, wrapped_expectation); + + // If we set raw, input should be unchanged + opts.test_output_raw = true; + if (!opts.end_with_newline) { + test_fragment(wrapped_input, wrapped_input); + } + opts.test_output_raw = false; + } + + } + + // run all tests for the given brace style ("collapse", "expand", "end-expand", or "none"). + // uses various whitespace combinations before and after opening and closing braces, + // respectively, for most of the tests' inputs. + function beautify_brace_tests(brace_style) { + + var indent_on_wrap_str = ' '; // could use Array(opts.indent_size + 1).join(' '); if we wanted to replace _all_ of the hardcoded 4-space in the test and expectation strings + + function permute_brace_tests(expect_open_white, expect_close_white) { + + // run the tests that need permutation against a specific combination of + // pre-opening-brace and pre-closing-brace whitespace + function run_brace_permutation(test_open_white, test_close_white) { + var to = test_open_white, + tc = test_close_white, + eo = expect_open_white ? expect_open_white : to === '' ? ' ' : to, + ec = expect_close_white ? expect_close_white : tc === '' ? ' ' : tc, + i = eo === '\n' ? indent_on_wrap_str: ''; + + bt( '//case 1\nif (a == 1)' + to + '{}\n//case 2\nelse if (a == 2)' + to + '{}', + '//case 1\nif (a == 1)' + eo + '{}\n//case 2\nelse if (a == 2)' + eo + '{}'); + bt( 'if(1)' + to + '{2}' + tc + 'else' + to + '{3}', + 'if (1)' + eo + '{\n 2\n}' + ec + 'else' + eo + '{\n 3\n}'); + bt( 'try' + to + '{a();}' + tc + + 'catch(b)' + to + '{c();}' + tc + + 'catch(d)' + to + '{}' + tc + + 'finally' + to + '{e();}', + // expected + 'try' + eo + '{\n a();\n}' + ec + + 'catch (b)' + eo + '{\n c();\n}' + ec + + 'catch (d)' + eo + '{}' + ec + + 'finally' + eo + '{\n e();\n}'); + bt( 'if(a)' + to + '{b();}' + tc + 'else if(c) foo();', + 'if (a)' + eo + '{\n b();\n}' + ec + 'else if (c) foo();'); + // if/else statement with empty body + bt( 'if (a)' + to + '{\n// comment\n}' + tc + 'else' + to + '{\n// comment\n}', + 'if (a)' + eo + '{\n // comment\n}' + ec + 'else' + eo + '{\n // comment\n}'); + bt( 'if (x)' + to + '{y}' + tc + 'else' + to + '{ if (x)' + to + '{y}}', + 'if (x)' + eo + '{\n y\n}' + ec + 'else' + eo + '{\n if (x)' + eo + i + '{\n y\n }\n}'); + bt( 'if (a)' + to + '{\nb;\n}' + tc + 'else' + to + '{\nc;\n}', + 'if (a)' + eo + '{\n b;\n}' + ec + 'else' + eo + '{\n c;\n}'); + test_fragment(' /*\n* xx\n*/\n// xx\nif (foo)' + to + '{\n bar();\n}', + ' /*\n * xx\n */\n // xx\n if (foo)' + eo + i + '{\n bar();\n }'); + bt( 'if (foo)' + to + '{}' + tc + 'else /regex/.test();', + 'if (foo)' + eo + '{}' + ec + 'else /regex/.test();'); + test_fragment('if (foo)' + to + '{', 'if (foo)' + eo + '{'); + test_fragment('foo' + to + '{', 'foo' + eo + '{'); + test_fragment('return;' + to + '{', 'return;' + eo + '{'); + bt( 'function x()' + to + '{\n foo();\n}zzz', 'function x()' + eo +'{\n foo();\n}\nzzz'); + bt( 'var a = new function a()' + to + '{};', 'var a = new function a()' + eo + '{};'); + bt( 'var a = new function a()' + to + ' {},\n b = new function b()' + to + ' {};', + 'var a = new function a()' + eo + i + '{},\n b = new function b()' + eo + i + '{};'); + bt("foo(" + to + "{\n 'a': 1\n},\n10);", + "foo(" + (eo === ' ' ? '' : eo) + i + "{\n 'a': 1\n },\n 10);"); // "foo( {..." is a weird case + bt('(["foo","bar"]).each(function(i)' + to + '{return i;});', + '(["foo", "bar"]).each(function(i)' + eo + '{\n return i;\n});'); + bt('(function(i)' + to + '{return i;})();', '(function(i)' + eo + '{\n return i;\n})();'); + + bt( "test( /*Argument 1*/" + to + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test( /*Argument 1*/" + eo + i + "{\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + + bt( "test( /*Argument 1*/" + to + "{\n" + + " 'Value1': '1'\n" + + "}, /*Argument 2\n" + + " */\n" + + "{\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test( /*Argument 1*/" + eo + i + "{\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + } + + run_brace_permutation('\n', '\n'); + run_brace_permutation('\n', ' '); + run_brace_permutation(' ', ' '); + run_brace_permutation(' ', '\n'); + run_brace_permutation('',''); + + // brace tests that don't make sense to permutate + test_fragment('return {'); // return needs the brace. + test_fragment('return /* inline */ {'); + bt('throw {}'); + bt('throw {\n foo;\n}'); + bt( 'var foo = {}'); + test_fragment('a: do {} while (); xxx', 'a: do {} while ();\nxxx'); + bt( '{a: do {} while (); xxx}', '{\n a: do {} while ();xxx\n}'); + bt( 'var a = new function() {};'); + bt( 'var a = new function()\n{};', 'var a = new function() {};'); + bt( "test(\n" + + "/*Argument 1*/ {\n" + + " 'Value1': '1'\n" + + "},\n" + + "/*Argument 2\n" + + " */ {\n" + + " 'Value2': '2'\n" + + "});", + // expected + "test(\n" + + " /*Argument 1*/\n" + + " {\n" + + " 'Value1': '1'\n" + + " },\n" + + " /*Argument 2\n" + + " */\n" + + " {\n" + + " 'Value2': '2'\n" + + " });"); + } + + reset_options(); + opts.brace_style = brace_style; + + switch(opts.brace_style) { + case 'collapse': + permute_brace_tests(' ', ' '); + break; + case 'expand': + permute_brace_tests('\n', '\n'); + break; + case 'end-expand': + permute_brace_tests(' ', '\n'); + break; + case 'none': + permute_brace_tests(); + break; + } + } + + function unicode_char(value) { + return String.fromCharCode(value); + } + + function beautifier_tests() + { + sanitytest = test_obj; + + + //============================================================ + // Unicode Support + reset_options(); + bt('var ' + unicode_char(3232) + '_' + unicode_char(3232) + ' = "hi";'); + bt( + 'var ' + unicode_char(228) + 'x = {\n' + + ' ' + unicode_char(228) + 'rgerlich: true\n' + + '};'); + + + //============================================================ + // Test template and continuation strings + reset_options(); + bt('`This is a ${template} string.`'); + bt( + '`This\n' + + ' is\n' + + ' a\n' + + ' ${template}\n' + + ' string.`'); + bt( + 'a = `This is a continuation\\\n' + + 'string.`'); + bt( + 'a = "This is a continuation\\\n' + + 'string."'); + bt( + '`SELECT\n' + + ' nextval(\'${this.options.schema ? `${this.options.schema}.` : \'\'}"${this.tableName}_${this.autoIncrementField}_seq"\'::regclass\n' + + ' ) nextval;`'); + + // Tests for #1030 + bt( + 'const composeUrl = (host) => {\n' + + ' return `${host `test`}`;\n' + + '};'); + bt( + 'const composeUrl = (host, api, key, data) => {\n' + + ' switch (api) {\n' + + ' case "Init":\n' + + ' return `${host}/vwapi/Init?VWID=${key}&DATA=${encodeURIComponent(\n' + + ' Object.keys(data).map((k) => `${k}=${ data[k]}` ).join(";")\n' + + ' )}`;\n' + + ' case "Pay":\n' + + ' return `${host}/vwapi/Pay?SessionId=${par}`;\n' + + ' };\n' + + '};'); + + + //============================================================ + // ES7 Decorators + reset_options(); + bt('@foo'); + bt('@foo(bar)'); + bt( + '@foo(function(k, v) {\n' + + ' implementation();\n' + + '})'); + + + //============================================================ + // ES7 exponential + reset_options(); + bt('x ** 2'); + bt('x ** -2'); + + + //============================================================ + // Spread operator + reset_options(); + opts.brace_style = "collapse,preserve-inline"; + bt('const m = { ...item, c: 3 };'); + bt( + 'const m = {\n' + + ' ...item,\n' + + ' c: 3\n' + + '};'); + bt('const m = { c: 3, ...item };'); + bt('const m = [...item, 3];'); + bt('const m = [3, ...item];'); + + + //============================================================ + // Object literal shorthand functions + reset_options(); + bt( + 'return {\n' + + ' foo() {\n' + + ' return 42;\n' + + ' }\n' + + '}'); + bt( + 'var foo = {\n' + + ' * bar() {\n' + + ' yield 42;\n' + + ' }\n' + + '};'); + bt( + 'var foo = {bar(){return 42;},*barGen(){yield 42;}};', + // -- output -- + 'var foo = {\n' + + ' bar() {\n' + + ' return 42;\n' + + ' },\n' + + ' * barGen() {\n' + + ' yield 42;\n' + + ' }\n' + + '};'); + + // also handle generator shorthand in class - #1013 + bt( + 'class A {\n' + + ' fn() {\n' + + ' return true;\n' + + ' }\n' + + '\n' + + ' * gen() {\n' + + ' return true;\n' + + ' }\n' + + '}'); + bt( + 'class A {\n' + + ' * gen() {\n' + + ' return true;\n' + + ' }\n' + + '\n' + + ' fn() {\n' + + ' return true;\n' + + ' }\n' + + '}'); + + + //============================================================ + // End With Newline - (eof = "\n") + reset_options(); + opts.end_with_newline = true; + test_fragment('', '\n'); + test_fragment(' return .5', ' return .5\n'); + test_fragment( + ' \n' + + '\n' + + 'return .5\n' + + '\n' + + '\n' + + '\n', + // -- output -- + ' return .5\n'); + test_fragment('\n'); + + // End With Newline - (eof = "") + reset_options(); + opts.end_with_newline = false; + test_fragment(''); + test_fragment(' return .5'); + test_fragment( + ' \n' + + '\n' + + 'return .5\n' + + '\n' + + '\n' + + '\n', + // -- output -- + ' return .5'); + test_fragment('\n', ''); + + + //============================================================ + // Support simple language specific option inheritance/overriding - (j = " ") + reset_options(); + opts.js = { 'indent_size': 3 }; + opts.css = { 'indent_size': 5 }; + bt( + 'if (a == b) {\n' + + ' test();\n' + + '}'); + + // Support simple language specific option inheritance/overriding - (j = " ") + reset_options(); + opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 } }; + bt( + 'if (a == b) {\n' + + ' test();\n' + + '}'); + + // Support simple language specific option inheritance/overriding - (j = " ") + reset_options(); + opts.indent_size = 9; + opts.html = { 'js': { 'indent_size': 3 }, 'css': { 'indent_size': 5 }, 'indent_size': 2}; + opts.js = { 'indent_size': 4 }; + opts.css = { 'indent_size': 3 }; + bt( + 'if (a == b) {\n' + + ' test();\n' + + '}'); + + + //============================================================ + // Brace style permutations - (ibo = "", iao = "", ibc = "", iac = "", obo = " ", oao = " ", obc = " ", oac = " ") + reset_options(); + opts.brace_style = 'collapse,preserve-inline'; + bt( + 'var a ={a: 2};\n' + + 'var a ={a: 2};', + // -- output -- + 'var a = { a: 2 };\n' + + 'var a = { a: 2 };'); + bt( + '//case 1\n' + + 'if (a == 1){}\n' + + '//case 2\n' + + 'else if (a == 2){}', + // -- output -- + '//case 1\n' + + 'if (a == 1) {}\n' + + '//case 2\n' + + 'else if (a == 2) {}'); + bt('if(1){2}else{3}', 'if (1) { 2 } else { 3 }'); + bt('try{a();}catch(b){c();}catch(d){}finally{e();}', 'try { a(); } catch (b) { c(); } catch (d) {} finally { e(); }'); + + // Brace style permutations - (ibo = "\n", iao = "\n", ibc = "\n", iac = "\n", obo = " ", oao = "\n ", obc = "\n", oac = " ") + reset_options(); + opts.brace_style = 'collapse,preserve-inline'; + bt( + 'var a =\n' + + '{\n' + + 'a: 2\n' + + '}\n' + + ';\n' + + 'var a =\n' + + '{\n' + + 'a: 2\n' + + '}\n' + + ';', + // -- output -- + 'var a = {\n' + + ' a: 2\n' + + '};\n' + + 'var a = {\n' + + ' a: 2\n' + + '};'); + bt( + '//case 1\n' + + 'if (a == 1)\n' + + '{}\n' + + '//case 2\n' + + 'else if (a == 2)\n' + + '{}', + // -- output -- + '//case 1\n' + + 'if (a == 1) {}\n' + + '//case 2\n' + + 'else if (a == 2) {}'); + bt( + 'if(1)\n' + + '{\n' + + '2\n' + + '}\n' + + 'else\n' + + '{\n' + + '3\n' + + '}', + // -- output -- + 'if (1) {\n' + + ' 2\n' + + '} else {\n' + + ' 3\n' + + '}'); + bt( + 'try\n' + + '{\n' + + 'a();\n' + + '}\n' + + 'catch(b)\n' + + '{\n' + + 'c();\n' + + '}\n' + + 'catch(d)\n' + + '{}\n' + + 'finally\n' + + '{\n' + + 'e();\n' + + '}', + // -- output -- + 'try {\n' + + ' a();\n' + + '} catch (b) {\n' + + ' c();\n' + + '} catch (d) {} finally {\n' + + ' e();\n' + + '}'); + + // Brace style permutations - (ibo = "", iao = "", ibc = "", iac = "", obo = " ", oao = "\n ", obc = "\n", oac = " ") + reset_options(); + opts.brace_style = 'collapse'; + bt( + 'var a ={a: 2};\n' + + 'var a ={a: 2};', + // -- output -- + 'var a = {\n' + + ' a: 2\n' + + '};\n' + + 'var a = {\n' + + ' a: 2\n' + + '};'); + bt( + '//case 1\n' + + 'if (a == 1){}\n' + + '//case 2\n' + + 'else if (a == 2){}', + // -- output -- + '//case 1\n' + + 'if (a == 1) {}\n' + + '//case 2\n' + + 'else if (a == 2) {}'); + bt( + 'if(1){2}else{3}', + // -- output -- + 'if (1) {\n' + + ' 2\n' + + '} else {\n' + + ' 3\n' + + '}'); + bt( + 'try{a();}catch(b){c();}catch(d){}finally{e();}', + // -- output -- + 'try {\n' + + ' a();\n' + + '} catch (b) {\n' + + ' c();\n' + + '} catch (d) {} finally {\n' + + ' e();\n' + + '}'); + + // Brace style permutations - (ibo = "\n", iao = "\n", ibc = "\n", iac = "\n", obo = " ", oao = "\n ", obc = "\n", oac = " ") + reset_options(); + opts.brace_style = 'collapse'; + bt( + 'var a =\n' + + '{\n' + + 'a: 2\n' + + '}\n' + + ';\n' + + 'var a =\n' + + '{\n' + + 'a: 2\n' + + '}\n' + + ';', + // -- output -- + 'var a = {\n' + + ' a: 2\n' + + '};\n' + + 'var a = {\n' + + ' a: 2\n' + + '};'); + bt( + '//case 1\n' + + 'if (a == 1)\n' + + '{}\n' + + '//case 2\n' + + 'else if (a == 2)\n' + + '{}', + // -- output -- + '//case 1\n' + + 'if (a == 1) {}\n' + + '//case 2\n' + + 'else if (a == 2) {}'); + bt( + 'if(1)\n' + + '{\n' + + '2\n' + + '}\n' + + 'else\n' + + '{\n' + + '3\n' + + '}', + // -- output -- + 'if (1) {\n' + + ' 2\n' + + '} else {\n' + + ' 3\n' + + '}'); + bt( + 'try\n' + + '{\n' + + 'a();\n' + + '}\n' + + 'catch(b)\n' + + '{\n' + + 'c();\n' + + '}\n' + + 'catch(d)\n' + + '{}\n' + + 'finally\n' + + '{\n' + + 'e();\n' + + '}', + // -- output -- + 'try {\n' + + ' a();\n' + + '} catch (b) {\n' + + ' c();\n' + + '} catch (d) {} finally {\n' + + ' e();\n' + + '}'); + + + //============================================================ + // Comma-first option - (c0 = ",\n", c1 = ",\n ", c2 = ",\n ", c3 = ",\n ", f1 = " ,\n ") + reset_options(); + opts.comma_first = false; + bt( + '{a:1, b:2}', + // -- output -- + '{\n' + + ' a: 1,\n' + + ' b: 2\n' + + '}'); + bt( + 'var a=1, b=c[d], e=6;', + // -- output -- + 'var a = 1,\n' + + ' b = c[d],\n' + + ' e = 6;'); + bt( + 'for(var a=1,b=2,c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2, c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'for(var a=1,b=2,\n' + + 'c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2,\n' + + ' c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'function foo() {\n' + + ' return [\n' + + ' "one",\n' + + ' "two"\n' + + ' ];\n' + + '}'); + bt( + 'a=[[1,2],[4,5],[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],[7,8],]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' [7, 8],\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt('a=[b,c,function(){},function(){},d]', 'a = [b, c, function() {}, function() {}, d]'); + bt( + 'a=[b,c,\n' + + 'function(){},function(){},d]', + // -- output -- + 'a = [b, c,\n' + + ' function() {},\n' + + ' function() {},\n' + + ' d\n' + + ']'); + bt('a=[a[1],b[4],c[d[7]]]', 'a = [a[1], b[4], c[d[7]]]'); + bt('[1,2,[3,4,[5,6],7],8]', '[1, 2, [3, 4, [5, 6], 7], 8]'); + bt( + '[[["1","2"],["3","4"]],[["5","6","7"],["8","9","0"]],[["1","2","3"],["4","5","6","7"],["8","9","0"]]]', + // -- output -- + '[\n' + + ' [\n' + + ' ["1", "2"],\n' + + ' ["3", "4"]\n' + + ' ],\n' + + ' [\n' + + ' ["5", "6", "7"],\n' + + ' ["8", "9", "0"]\n' + + ' ],\n' + + ' [\n' + + ' ["1", "2", "3"],\n' + + ' ["4", "5", "6", "7"],\n' + + ' ["8", "9", "0"]\n' + + ' ]\n' + + ']'); + bt( + 'changeCollection.add({\n' + + ' name: "Jonathan" // New line inserted after this line on every save\n' + + ' , age: 25\n' + + '});', + // -- output -- + 'changeCollection.add({\n' + + ' name: "Jonathan" // New line inserted after this line on every save\n' + + ' ,\n' + + ' age: 25\n' + + '});'); + bt( + 'changeCollection.add(\n' + + ' function() {\n' + + ' return true;\n' + + ' },\n' + + ' function() {\n' + + ' return true;\n' + + ' }\n' + + ');'); + + // Comma-first option - (c0 = "\n, ", c1 = "\n , ", c2 = "\n , ", c3 = "\n , ", f1 = ", ") + reset_options(); + opts.comma_first = true; + bt( + '{a:1, b:2}', + // -- output -- + '{\n' + + ' a: 1\n' + + ' , b: 2\n' + + '}'); + bt( + 'var a=1, b=c[d], e=6;', + // -- output -- + 'var a = 1\n' + + ' , b = c[d]\n' + + ' , e = 6;'); + bt( + 'for(var a=1,b=2,c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2, c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'for(var a=1,b=2,\n' + + 'c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2\n' + + ' , c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'function foo() {\n' + + ' return [\n' + + ' "one"\n' + + ' , "two"\n' + + ' ];\n' + + '}'); + bt( + 'a=[[1,2],[4,5],[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],[7,8],]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , [7, 8]\n' + + ', ]'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , function() {}\n' + + ' , [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , function() {}\n' + + ' , function() {}\n' + + ' , [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2]\n' + + ' , [4, 5]\n' + + ' , function() {}\n' + + ' , [7, 8]\n' + + ']'); + bt('a=[b,c,function(){},function(){},d]', 'a = [b, c, function() {}, function() {}, d]'); + bt( + 'a=[b,c,\n' + + 'function(){},function(){},d]', + // -- output -- + 'a = [b, c\n' + + ' , function() {}\n' + + ' , function() {}\n' + + ' , d\n' + + ']'); + bt('a=[a[1],b[4],c[d[7]]]', 'a = [a[1], b[4], c[d[7]]]'); + bt('[1,2,[3,4,[5,6],7],8]', '[1, 2, [3, 4, [5, 6], 7], 8]'); + bt( + '[[["1","2"],["3","4"]],[["5","6","7"],["8","9","0"]],[["1","2","3"],["4","5","6","7"],["8","9","0"]]]', + // -- output -- + '[\n' + + ' [\n' + + ' ["1", "2"]\n' + + ' , ["3", "4"]\n' + + ' ]\n' + + ' , [\n' + + ' ["5", "6", "7"]\n' + + ' , ["8", "9", "0"]\n' + + ' ]\n' + + ' , [\n' + + ' ["1", "2", "3"]\n' + + ' , ["4", "5", "6", "7"]\n' + + ' , ["8", "9", "0"]\n' + + ' ]\n' + + ']'); + bt( + 'changeCollection.add({\n' + + ' name: "Jonathan" // New line inserted after this line on every save\n' + + ' , age: 25\n' + + '});'); + bt( + 'changeCollection.add(\n' + + ' function() {\n' + + ' return true;\n' + + ' },\n' + + ' function() {\n' + + ' return true;\n' + + ' }\n' + + ');', + // -- output -- + 'changeCollection.add(\n' + + ' function() {\n' + + ' return true;\n' + + ' }\n' + + ' , function() {\n' + + ' return true;\n' + + ' }\n' + + ');'); + + + //============================================================ + // Unindent chained functions - () + reset_options(); + opts.unindent_chained_methods = true; + bt( + 'f().f().f()\n' + + ' .f().f();', + // -- output -- + 'f().f().f()\n' + + '.f().f();'); + bt( + 'f()\n' + + ' .f()\n' + + ' .f();', + // -- output -- + 'f()\n' + + '.f()\n' + + '.f();'); + bt( + 'f(function() {\n' + + ' f()\n' + + ' .f()\n' + + ' .f();\n' + + '});', + // -- output -- + 'f(function() {\n' + + ' f()\n' + + ' .f()\n' + + ' .f();\n' + + '});'); + + + //============================================================ + // Space in parens tests - (s = "", e = "") + reset_options(); + opts.space_in_paren = false; + opts.space_in_empty_paren = false; + bt('if(p) foo(a,b);', 'if (p) foo(a, b);'); + bt( + 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + // -- output -- + 'try {\n' + + ' while (true) {\n' + + ' willThrow()\n' + + ' }\n' + + '} catch (result) switch (result) {\n' + + ' case 1:\n' + + ' ++result\n' + + '}'); + bt('((e/((a+(b)*c)-d))^2)*5;', '((e / ((a + (b) * c) - d)) ^ 2) * 5;'); + bt( + 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + // -- output -- + 'function f(a, b) {\n' + + ' if (a) b()\n' + + '}\n' + + '\n' + + 'function g(a, b) {\n' + + ' if (!a) b()\n' + + '}'); + bt('a=[];', 'a = [];'); + bt('a=[b,c,d];', 'a = [b, c, d];'); + bt('a= f[b];', 'a = f[b];'); + bt( + '{\n' + + ' files: [ {\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: [ "im/design_standards/*.*" ],\n' + + ' dest: "www/gui/build"\n' + + ' } ]\n' + + '}', + // -- output -- + '{\n' + + ' files: [{\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: ["im/design_standards/*.*"],\n' + + ' dest: "www/gui/build"\n' + + ' }]\n' + + '}'); + + // Space in parens tests - (s = "", e = "") + reset_options(); + opts.space_in_paren = false; + opts.space_in_empty_paren = true; + bt('if(p) foo(a,b);', 'if (p) foo(a, b);'); + bt( + 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + // -- output -- + 'try {\n' + + ' while (true) {\n' + + ' willThrow()\n' + + ' }\n' + + '} catch (result) switch (result) {\n' + + ' case 1:\n' + + ' ++result\n' + + '}'); + bt('((e/((a+(b)*c)-d))^2)*5;', '((e / ((a + (b) * c) - d)) ^ 2) * 5;'); + bt( + 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + // -- output -- + 'function f(a, b) {\n' + + ' if (a) b()\n' + + '}\n' + + '\n' + + 'function g(a, b) {\n' + + ' if (!a) b()\n' + + '}'); + bt('a=[];', 'a = [];'); + bt('a=[b,c,d];', 'a = [b, c, d];'); + bt('a= f[b];', 'a = f[b];'); + bt( + '{\n' + + ' files: [ {\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: [ "im/design_standards/*.*" ],\n' + + ' dest: "www/gui/build"\n' + + ' } ]\n' + + '}', + // -- output -- + '{\n' + + ' files: [{\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: ["im/design_standards/*.*"],\n' + + ' dest: "www/gui/build"\n' + + ' }]\n' + + '}'); + + // Space in parens tests - (s = " ", e = "") + reset_options(); + opts.space_in_paren = true; + opts.space_in_empty_paren = false; + bt('if(p) foo(a,b);', 'if ( p ) foo( a, b );'); + bt( + 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + // -- output -- + 'try {\n' + + ' while ( true ) {\n' + + ' willThrow()\n' + + ' }\n' + + '} catch ( result ) switch ( result ) {\n' + + ' case 1:\n' + + ' ++result\n' + + '}'); + bt('((e/((a+(b)*c)-d))^2)*5;', '( ( e / ( ( a + ( b ) * c ) - d ) ) ^ 2 ) * 5;'); + bt( + 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + // -- output -- + 'function f( a, b ) {\n' + + ' if ( a ) b()\n' + + '}\n' + + '\n' + + 'function g( a, b ) {\n' + + ' if ( !a ) b()\n' + + '}'); + bt('a=[];', 'a = [];'); + bt('a=[b,c,d];', 'a = [ b, c, d ];'); + bt('a= f[b];', 'a = f[ b ];'); + bt( + '{\n' + + ' files: [ {\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: [ "im/design_standards/*.*" ],\n' + + ' dest: "www/gui/build"\n' + + ' } ]\n' + + '}'); + + // Space in parens tests - (s = " ", e = " ") + reset_options(); + opts.space_in_paren = true; + opts.space_in_empty_paren = true; + bt('if(p) foo(a,b);', 'if ( p ) foo( a, b );'); + bt( + 'try{while(true){willThrow()}}catch(result)switch(result){case 1:++result }', + // -- output -- + 'try {\n' + + ' while ( true ) {\n' + + ' willThrow( )\n' + + ' }\n' + + '} catch ( result ) switch ( result ) {\n' + + ' case 1:\n' + + ' ++result\n' + + '}'); + bt('((e/((a+(b)*c)-d))^2)*5;', '( ( e / ( ( a + ( b ) * c ) - d ) ) ^ 2 ) * 5;'); + bt( + 'function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + // -- output -- + 'function f( a, b ) {\n' + + ' if ( a ) b( )\n' + + '}\n' + + '\n' + + 'function g( a, b ) {\n' + + ' if ( !a ) b( )\n' + + '}'); + bt('a=[];', 'a = [ ];'); + bt('a=[b,c,d];', 'a = [ b, c, d ];'); + bt('a= f[b];', 'a = f[ b ];'); + bt( + '{\n' + + ' files: [ {\n' + + ' expand: true,\n' + + ' cwd: "www/gui/",\n' + + ' src: [ "im/design_standards/*.*" ],\n' + + ' dest: "www/gui/build"\n' + + ' } ]\n' + + '}'); + + + //============================================================ + // operator_position option - ensure no neswlines if preserve_newlines is false - () + reset_options(); + opts.operator_position = 'before-newline'; + opts.preserve_newlines = false; + bt( + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + + // operator_position option - ensure no neswlines if preserve_newlines is false - () + reset_options(); + opts.operator_position = 'after-newline'; + opts.preserve_newlines = false; + bt( + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + + // operator_position option - ensure no neswlines if preserve_newlines is false - () + reset_options(); + opts.operator_position = 'preserve-newline'; + opts.preserve_newlines = false; + bt( + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b - c / d * e % f;\n' + + 'var res = g & h | i ^ j;\n' + + 'var res = (k && l || m) ? n : o;\n' + + 'var res = p >> q << r >>> s;\n' + + 'var res = t === u !== v != w == x >= y <= z > aa < ab;\n' + + 'ac + -ad'); + + + //============================================================ + // operator_position option - set to 'before-newline' (default value) + reset_options(); + + // comprehensive, various newlines + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b -\n' + + ' c /\n' + + ' d * e %\n' + + ' f;\n' + + 'var res = g & h |\n' + + ' i ^\n' + + ' j;\n' + + 'var res = (k &&\n' + + ' l ||\n' + + ' m) ?\n' + + ' n :\n' + + ' o;\n' + + 'var res = p >>\n' + + ' q <<\n' + + ' r >>>\n' + + ' s;\n' + + 'var res = t\n' + + '\n' + + ' ===\n' + + ' u !== v !=\n' + + ' w ==\n' + + ' x >=\n' + + ' y <= z > aa <\n' + + ' ab;\n' + + 'ac +\n' + + ' -ad'); + + // colon special case + bt( + 'var a = {\n' + + ' b\n' + + ': bval,\n' + + ' c:\n' + + 'cval\n' + + ' ,d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ': h;\n' + + 'var i = j ? k :\n' + + 'l;', + // -- output -- + 'var a = {\n' + + ' b: bval,\n' + + ' c: cval,\n' + + ' d: dval\n' + + '};\n' + + 'var e = f ? g :\n' + + ' h;\n' + + 'var i = j ? k :\n' + + ' l;'); + + // catch-all, includes brackets and other various code + bt( + 'var d = 1;\n' + + 'if (a === b\n' + + ' && c) {\n' + + ' d = (c * everything\n' + + ' / something_else) %\n' + + ' b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple) ||\n' + + ' (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many ||\n' + + ' anOcean\n' + + ' || aRiver);\n' + + '}', + // -- output -- + 'var d = 1;\n' + + 'if (a === b &&\n' + + ' c) {\n' + + ' d = (c * everything /\n' + + ' something_else) %\n' + + ' b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple) ||\n' + + ' (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many ||\n' + + ' anOcean ||\n' + + ' aRiver);\n' + + '}'); + + + //============================================================ + // operator_position option - set to 'after_newline' + reset_options(); + opts.operator_position = 'after-newline'; + + // comprehensive, various newlines + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b\n' + + ' - c\n' + + ' / d * e\n' + + ' % f;\n' + + 'var res = g & h\n' + + ' | i\n' + + ' ^ j;\n' + + 'var res = (k\n' + + ' && l\n' + + ' || m)\n' + + ' ? n\n' + + ' : o;\n' + + 'var res = p\n' + + ' >> q\n' + + ' << r\n' + + ' >>> s;\n' + + 'var res = t\n' + + '\n' + + ' === u !== v\n' + + ' != w\n' + + ' == x\n' + + ' >= y <= z > aa\n' + + ' < ab;\n' + + 'ac\n' + + ' + -ad'); + + // colon special case + bt( + 'var a = {\n' + + ' b\n' + + ': bval,\n' + + ' c:\n' + + 'cval\n' + + ' ,d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ': h;\n' + + 'var i = j ? k :\n' + + 'l;', + // -- output -- + 'var a = {\n' + + ' b: bval,\n' + + ' c: cval,\n' + + ' d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ' : h;\n' + + 'var i = j ? k\n' + + ' : l;'); + + // catch-all, includes brackets and other various code + bt( + 'var d = 1;\n' + + 'if (a === b\n' + + ' && c) {\n' + + ' d = (c * everything\n' + + ' / something_else) %\n' + + ' b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple) ||\n' + + ' (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many ||\n' + + ' anOcean\n' + + ' || aRiver);\n' + + '}', + // -- output -- + 'var d = 1;\n' + + 'if (a === b\n' + + ' && c) {\n' + + ' d = (c * everything\n' + + ' / something_else)\n' + + ' % b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple)\n' + + ' || (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many\n' + + ' || anOcean\n' + + ' || aRiver);\n' + + '}'); + + + //============================================================ + // operator_position option - set to 'preserve-newline' + reset_options(); + opts.operator_position = 'preserve-newline'; + + // comprehensive, various newlines + bt( + 'var res = a + b\n' + + '- c /\n' + + 'd * e\n' + + '%\n' + + 'f;\n' + + ' var res = g & h\n' + + '| i ^\n' + + 'j;\n' + + 'var res = (k &&\n' + + 'l\n' + + '|| m) ?\n' + + 'n\n' + + ': o\n' + + ';\n' + + 'var res = p\n' + + '>> q <<\n' + + 'r\n' + + '>>> s;\n' + + 'var res\n' + + ' = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + 'w\n' + + '== x >=\n' + + 'y <= z > aa <\n' + + 'ab;\n' + + 'ac +\n' + + '-ad', + // -- output -- + 'var res = a + b\n' + + ' - c /\n' + + ' d * e\n' + + ' %\n' + + ' f;\n' + + 'var res = g & h\n' + + ' | i ^\n' + + ' j;\n' + + 'var res = (k &&\n' + + ' l\n' + + ' || m) ?\n' + + ' n\n' + + ' : o;\n' + + 'var res = p\n' + + ' >> q <<\n' + + ' r\n' + + ' >>> s;\n' + + 'var res = t\n' + + '\n' + + ' === u !== v\n' + + ' !=\n' + + ' w\n' + + ' == x >=\n' + + ' y <= z > aa <\n' + + ' ab;\n' + + 'ac +\n' + + ' -ad'); + + // colon special case + bt( + 'var a = {\n' + + ' b\n' + + ': bval,\n' + + ' c:\n' + + 'cval\n' + + ' ,d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ': h;\n' + + 'var i = j ? k :\n' + + 'l;', + // -- output -- + 'var a = {\n' + + ' b: bval,\n' + + ' c: cval,\n' + + ' d: dval\n' + + '};\n' + + 'var e = f ? g\n' + + ' : h;\n' + + 'var i = j ? k :\n' + + ' l;'); + + // catch-all, includes brackets and other various code + bt( + 'var d = 1;\n' + + 'if (a === b\n' + + ' && c) {\n' + + ' d = (c * everything\n' + + ' / something_else) %\n' + + ' b;\n' + + ' e\n' + + ' += d;\n' + + '\n' + + '} else if (!(complex && simple) ||\n' + + ' (emotion && emotion.name === "happy")) {\n' + + ' cryTearsOfJoy(many ||\n' + + ' anOcean\n' + + ' || aRiver);\n' + + '}'); + + + //============================================================ + // Yield tests + reset_options(); + bt('yield /foo\\//;'); + bt('result = yield pgClient.query_(queryString);'); + bt('yield [1, 2]'); + bt('yield function() {};'); + bt('yield* bar();'); + + // yield should have no space between yield and star + bt('yield * bar();', 'yield* bar();'); + + // yield should have space between star and generator + bt('yield *bar();', 'yield* bar();'); + + + //============================================================ + // Async / await tests + reset_options(); + bt('async function foo() {}'); + bt('let w = async function foo() {}'); + bt( + 'async function foo() {}\n' + + 'var x = await foo();'); + + // async function as an input to another function + bt('wrapper(async function foo() {})'); + + // await on inline anonymous function. should have a space after await + bt( + 'async function() {\n' + + ' var w = await(async function() {\n' + + ' return await foo();\n' + + ' })();\n' + + '}', + // -- output -- + 'async function() {\n' + + ' var w = await (async function() {\n' + + ' return await foo();\n' + + ' })();\n' + + '}'); + + // ensure that this doesn't break anyone with the async library + bt('async.map(function(t) {})'); + + // async on arrow function. should have a space after async + bt( + 'async() => {}', + // -- output -- + 'async () => {}'); + + // async on arrow function. should have a space after async + bt( + 'async() => {\n' + + ' return 5;\n' + + '}', + // -- output -- + 'async () => {\n' + + ' return 5;\n' + + '}'); + + // async on arrow function returning expression. should have a space after async + bt( + 'async() => 5;', + // -- output -- + 'async () => 5;'); + + // async on arrow function returning object literal. should have a space after async + bt( + 'async(x) => ({\n' + + ' foo: "5"\n' + + '})', + // -- output -- + 'async (x) => ({\n' + + ' foo: "5"\n' + + '})'); + bt( + 'async (x) => {\n' + + ' return x * 2;\n' + + '}'); + bt('async () => 5;'); + bt('async x => x * 2;'); + + + //============================================================ + // e4x - Test that e4x literals passed through when e4x-option is enabled + reset_options(); + opts.e4x = true; + bt( + 'xml=\n' + + ' foox;', + // -- output -- + 'xml = \n' + + ' foox;'); + bt(''); + bt(''); + bt(''); + bt(''); + bt(''); + + // Handles inline expressions + bt( + 'xml=<{a} b="c">\n' + + ' foox;', + // -- output -- + 'xml = <{a} b="c">\n' + + ' foox;'); + bt( + 'xml=<{a} b="c">\n' + + ' \n' + + ' foox;', + // -- output -- + 'xml = <{a} b="c">\n' + + ' \n' + + ' foox;'); + + // xml literals with special characters in elem names - see http://www.w3.org/TR/REC-xml/#NT-NameChar + bt('xml = <_:.valid.xml- _:.valid.xml-="123"/>;'); + + // xml literals with attributes without equal sign + bt('xml = ;'); + + // Handles CDATA + bt( + 'xml=\n' + + ' foox/]]>;', + // -- output -- + 'xml = \n' + + ' foox/]]>;'); + bt('xml=;', 'xml = ;'); + bt('xml=;', 'xml = ;'); + + // JSX - working jsx from http://prettydiff.com/unit_tests/beautification_javascript_jsx.txt + bt( + 'var ListItem = React.createClass({\n' + + ' render: function() {\n' + + ' return (\n' + + '
  • \n' + + ' \n' + + ' this.props.item.name\n' + + ' \n' + + '
  • \n' + + ' );\n' + + ' }\n' + + '});'); + bt( + 'var List = React.createClass({\n' + + ' renderList: function() {\n' + + ' return this.props.items.map(function(item) {\n' + + ' return ;\n' + + ' });\n' + + ' },\n' + + '\n' + + ' render: function() {\n' + + ' return
      \n' + + ' this.renderList()\n' + + '
    \n' + + ' }\n' + + '});'); + bt( + 'var Mist = React.createClass({\n' + + ' renderList: function() {\n' + + ' return this.props.items.map(function(item) {\n' + + ' return {item}} key={item.id} />;\n' + + ' });\n' + + ' }\n' + + '});'); + bt( + '// JSX\n' + + 'var box = \n' + + ' {shouldShowAnswer(user) ?\n' + + ' no : \n' + + ' Text Content\n' + + ' }\n' + + ' ;\n' + + 'var a = function() {\n' + + ' return asdf;\n' + + '};\n' + + '\n' + + 'var HelloMessage = React.createClass({\n' + + ' render: function() {\n' + + ' return
    Hello {this.props.name}
    ;\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);'); + bt( + 'var Timer = React.createClass({\n' + + ' getInitialState: function() {\n' + + ' return {\n' + + ' secondsElapsed: 0\n' + + ' };\n' + + ' },\n' + + ' tick: function() {\n' + + ' this.setState({\n' + + ' secondsElapsed: this.state.secondsElapsed + 1\n' + + ' });\n' + + ' },\n' + + ' componentDidMount: function() {\n' + + ' this.interval = setInterval(this.tick, 1000);\n' + + ' },\n' + + ' componentWillUnmount: function() {\n' + + ' clearInterval(this.interval);\n' + + ' },\n' + + ' render: function() {\n' + + ' return (\n' + + '
    Seconds Elapsed: {this.state.secondsElapsed}
    \n' + + ' );\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);'); + bt( + 'var TodoList = React.createClass({\n' + + ' render: function() {\n' + + ' var createItem = function(itemText) {\n' + + ' return
  • {itemText}
  • ;\n' + + ' };\n' + + ' return
      {this.props.items.map(createItem)}
    ;\n' + + ' }\n' + + '});'); + bt( + 'var TodoApp = React.createClass({\n' + + ' getInitialState: function() {\n' + + ' return {\n' + + ' items: [],\n' + + ' text: \'\'\n' + + ' };\n' + + ' },\n' + + ' onChange: function(e) {\n' + + ' this.setState({\n' + + ' text: e.target.value\n' + + ' });\n' + + ' },\n' + + ' handleSubmit: function(e) {\n' + + ' e.preventDefault();\n' + + ' var nextItems = this.state.items.concat([this.state.text]);\n' + + ' var nextText = \'\';\n' + + ' this.setState({\n' + + ' items: nextItems,\n' + + ' text: nextText\n' + + ' });\n' + + ' },\n' + + ' render: function() {\n' + + ' return (\n' + + '
    \n' + + '

    TODO

    \n' + + ' \n' + + '
    \n' + + ' \n' + + ' \n' + + '
    \n' + + '
    \n' + + ' );\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);'); + bt( + 'var converter = new Showdown.converter();\n' + + 'var MarkdownEditor = React.createClass({\n' + + ' getInitialState: function() {\n' + + ' return {value: \'Type some *markdown* here!\'};\n' + + ' },\n' + + ' handleChange: function() {\n' + + ' this.setState({value: this.refs.textarea.getDOMNode().value});\n' + + ' },\n' + + ' render: function() {\n' + + ' return (\n' + + '
    \n' + + '

    Input

    \n' + + ' \n' + + '

    Output

    \n' + + ' \n' + + '
    \n' + + ' );\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);', + // -- output -- + 'var converter = new Showdown.converter();\n' + + 'var MarkdownEditor = React.createClass({\n' + + ' getInitialState: function() {\n' + + ' return {\n' + + ' value: \'Type some *markdown* here!\'\n' + + ' };\n' + + ' },\n' + + ' handleChange: function() {\n' + + ' this.setState({\n' + + ' value: this.refs.textarea.getDOMNode().value\n' + + ' });\n' + + ' },\n' + + ' render: function() {\n' + + ' return (\n' + + '
    \n' + + '

    Input

    \n' + + ' \n' + + '

    Output

    \n' + + ' \n' + + '
    \n' + + ' );\n' + + ' }\n' + + '});\n' + + 'React.render(, mountNode);'); + + // JSX - Not quite correct jsx formatting that still works + bt( + 'var content = (\n' + + ' \n' + + ' );\n' + + 'var qwer = A dropdown list Do Something Do Something Fun! Do Something Else ;\n' + + 'render(dropdown);', + // -- output -- + 'var content = (\n' + + ' \n' + + ');\n' + + 'var qwer = A dropdown list Do Something Do Something Fun! Do Something Else ;\n' + + 'render(dropdown);'); + + // Handles messed up tags, as long as it isn't the same name + // as the root tag. Also handles tags of same name as root tag + // as long as nesting matches. + bt( + 'xml=;', + // -- output -- + 'xml = ;'); + + // If xml is not terminated, the remainder of the file is treated + // as part of the xml-literal (passed through unaltered) + test_fragment( + 'xml=\n' + + 'c\n' + + 'c\n' + + ' c\n' + + '

    \n' + + ' );\n' + + ' }\n' + + '});'); + bt( + 'let a = React.createClass({\n' + + ' render() {\n' + + ' return (\n' + + '

    \n' + + ' c\n' + + '

    \n' + + ' );\n' + + ' }\n' + + '});'); + bt( + 'let a = React.createClass({\n' + + ' render() {\n' + + ' return (\n' + + '

    \n' + + ' c\n' + + '

    \n' + + ' );\n' + + ' }\n' + + '});'); + bt( + 'let a = React.createClass({\n' + + ' render() {\n' + + ' return (\n' + + ' <{e} className = {d}>\n' + + ' c\n' + + ' \n' + + ' );\n' + + ' }\n' + + '});'); + + // Issue #914 - Multiline attribute in root tag + bt( + 'return (\n' + + '
    {\n' + + ' e.preventDefault()\n' + + ' onClick()\n' + + ' }}>\n' + + ' {children}\n' + + ' \n' + + ');'); + bt( + 'return (\n' + + ' <{\n' + + ' a + b\n' + + ' } href="#"\n' + + ' onClick={e => {\n' + + ' e.preventDefault()\n' + + ' onClick()\n' + + ' }}>\n' + + ' {children}\n' + + ' \n' + + ');'); + bt( + 'return (\n' + + ' <{\n' + + ' a + b\n' + + ' } href="#"\n' + + ' onClick={e => {\n' + + ' e.preventDefault()\n' + + ' onClick()\n' + + ' }}>\n' + + ' {children}\n' + + ' \n' + + ' );', + // -- output -- + 'return (\n' + + ' <{\n' + + ' a + b\n' + + ' } href="#"\n' + + ' onClick={e => {\n' + + ' e.preventDefault()\n' + + ' onClick()\n' + + ' }}>\n' + + ' {children}\n' + + ' \n' + + ');'); + + + //============================================================ + // e4x disabled + reset_options(); + opts.e4x = false; + bt( + 'xml=\n' + + ' foox;', + // -- output -- + 'xml = < a b = "c" > < d / > < e >\n' + + ' foo < /e>x ;'); + + + //============================================================ + // Multiple braces + reset_options(); + bt( + '{{}/z/}', + // -- output -- + '{\n' + + ' {}\n' + + ' /z/\n' + + '}'); + + + //============================================================ + // Beautify preserve formatting + reset_options(); + bt( + '/* beautify preserve:start */\n' + + '/* beautify preserve:end */'); + bt( + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */'); + bt( + 'var a = 1;\n' + + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */'); + bt('/* beautify preserve:start */ {asdklgh;y;;{}dd2d}/* beautify preserve:end */'); + bt( + 'var a = 1;\n' + + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */', + // -- output -- + 'var a = 1;\n' + + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */'); + bt( + 'var a = 1;\n' + + ' /* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */', + // -- output -- + 'var a = 1;\n' + + '/* beautify preserve:start */\n' + + ' var a = 1;\n' + + '/* beautify preserve:end */'); + bt( + 'var a = {\n' + + ' /* beautify preserve:start */\n' + + ' one : 1\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + ' /* beautify preserve:end */\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify preserve:start */\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '/* beautify preserve:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify preserve:start */\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '/* beautify preserve:end */\n' + + '};'); + + // one space before and after required, only single spaces inside. + bt( + 'var a = {\n' + + '/* beautify preserve:start */\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify preserve:start */\n' + + ' one: 1,\n' + + ' two: 2,\n' + + ' three: 3,\n' + + ' ten: 10\n' + + '};'); + bt( + 'var a = {\n' + + '/*beautify preserve:start*/\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /*beautify preserve:start*/\n' + + ' one: 1,\n' + + ' two: 2,\n' + + ' three: 3,\n' + + ' ten: 10\n' + + '};'); + bt( + 'var a = {\n' + + '/*beautify preserve:start*/\n' + + ' one : 1,\n' + + ' two : 2,\n' + + ' three : 3,\n' + + ' ten : 10\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /*beautify preserve:start*/\n' + + ' one: 1,\n' + + ' two: 2,\n' + + ' three: 3,\n' + + ' ten: 10\n' + + '};'); + + // Directive: ignore + bt( + '/* beautify ignore:start */\n' + + '/* beautify ignore:end */'); + bt( + '/* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */'); + bt( + 'var a = 1;\n' + + '/* beautify ignore:start */\n' + + ' var a = 1;\n' + + '/* beautify ignore:end */'); + bt('/* beautify ignore:start */ {asdklgh;y;+++;dd2d}/* beautify ignore:end */'); + bt( + 'var a = 1;\n' + + '/* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */', + // -- output -- + 'var a = 1;\n' + + '/* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */'); + bt( + 'var a = 1;\n' + + ' /* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */', + // -- output -- + 'var a = 1;\n' + + '/* beautify ignore:start */\n' + + ' var a,,,{ 1;\n' + + '/* beautify ignore:end */'); + bt( + 'var a = {\n' + + ' /* beautify ignore:start */\n' + + ' one : 1\n' + + ' two : 2,\n' + + ' three : {\n' + + ' ten : 10\n' + + ' /* beautify ignore:end */\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify ignore:start */\n' + + ' one : 1\n' + + ' two : 2,\n' + + ' three : {\n' + + ' ten : 10\n' + + '/* beautify ignore:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start */\n' + + ' one : 1\n' + + ' two : 2,\n' + + ' three : {\n' + + ' ten : 10\n' + + '/* beautify ignore:end */\n' + + '};'); + + // Directives - multiple and interacting + bt( + 'var a = {\n' + + '/* beautify preserve:start */\n' + + '/* beautify preserve:start */\n' + + ' one : 1,\n' + + ' /* beautify preserve:end */\n' + + ' two : 2,\n' + + ' three : 3,\n' + + '/* beautify preserve:start */\n' + + ' ten : 10\n' + + '/* beautify preserve:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify preserve:start */\n' + + '/* beautify preserve:start */\n' + + ' one : 1,\n' + + ' /* beautify preserve:end */\n' + + ' two: 2,\n' + + ' three: 3,\n' + + ' /* beautify preserve:start */\n' + + ' ten : 10\n' + + '/* beautify preserve:end */\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify ignore:start */\n' + + ' one : 1\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + '/* beautify ignore:start */\n' + + ' three : {\n' + + ' ten : 10\n' + + '/* beautify ignore:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start */\n' + + ' one : 1\n' + + ' /* beautify ignore:end */\n' + + ' two: 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + ' ten : 10\n' + + '/* beautify ignore:end */\n' + + '};'); + + // Starts can occur together, ignore:end must occur alone. + bt( + 'var a = {\n' + + '/* beautify ignore:start */\n' + + ' one : 1\n' + + ' NOTE: ignore end block does not support starting other directives\n' + + ' This does not match the ending the ignore...\n' + + ' /* beautify ignore:end preserve:start */\n' + + ' two : 2,\n' + + '/* beautify ignore:start */\n' + + ' three : {\n' + + ' ten : 10\n' + + ' ==The next comment ends the starting ignore==\n' + + '/* beautify ignore:end */\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start */\n' + + ' one : 1\n' + + ' NOTE: ignore end block does not support starting other directives\n' + + ' This does not match the ending the ignore...\n' + + ' /* beautify ignore:end preserve:start */\n' + + ' two : 2,\n' + + '/* beautify ignore:start */\n' + + ' three : {\n' + + ' ten : 10\n' + + ' ==The next comment ends the starting ignore==\n' + + '/* beautify ignore:end */\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify ignore:start preserve:start */\n' + + ' one : {\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + '/* beautify ignore:end */\n' + + ' ten : 10\n' + + ' // This is all preserved\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start preserve:start */\n' + + ' one : {\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + '/* beautify ignore:end */\n' + + ' ten : 10\n' + + ' // This is all preserved\n' + + '};'); + bt( + 'var a = {\n' + + '/* beautify ignore:start preserve:start */\n' + + ' one : {\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + '/* beautify ignore:end */\n' + + ' ten : 10,\n' + + '/* beautify preserve:end */\n' + + ' eleven: 11\n' + + '};', + // -- output -- + 'var a = {\n' + + ' /* beautify ignore:start preserve:start */\n' + + ' one : {\n' + + ' /* beautify ignore:end */\n' + + ' two : 2,\n' + + ' /* beautify ignore:start */\n' + + ' three : {\n' + + '/* beautify ignore:end */\n' + + ' ten : 10,\n' + + '/* beautify preserve:end */\n' + + ' eleven: 11\n' + + '};'); + + + //============================================================ + // Comments and tests + reset_options(); + + // #913 + bt( + 'class test {\n' + + ' method1() {\n' + + ' let resp = null;\n' + + ' }\n' + + ' /**\n' + + ' * @param {String} id\n' + + ' */\n' + + ' method2(id) {\n' + + ' let resp2 = null;\n' + + ' }\n' + + '}'); + + // #1090 + bt( + 'for (var i = 0; i < 20; ++i) // loop\n' + + ' if (i % 3) {\n' + + ' console.log(i);\n' + + ' }\n' + + 'console.log("done");'); + + // #1043 + bt( + 'var o = {\n' + + ' k: 0\n' + + '}\n' + + '// ...\n' + + 'foo(o)'); + + // #713 and #964 + bt( + 'Meteor.call("foo", bar, function(err, result) {\n' + + ' Session.set("baz", result.lorem)\n' + + '})\n' + + '//blah blah'); + + // #815 + bt( + 'foo()\n' + + '// this is a comment\n' + + 'bar()\n' + + '\n' + + 'const foo = 5\n' + + '// comment\n' + + 'bar()'); + + // This shows current behavior. Note #1069 is not addressed yet. + bt( + 'if (modulus === 2) {\n' + + ' // i might be odd here\n' + + ' i += (i & 1);\n' + + ' // now i is guaranteed to be even\n' + + ' // this block is obviously about the statement above\n' + + '\n' + + ' // #1069 This should attach to the block below\n' + + ' // this comment is about the block after it.\n' + + '} else {\n' + + ' // rounding up using integer arithmetic only\n' + + ' if (i % modulus)\n' + + ' i += modulus - (i % modulus);\n' + + ' // now i is divisible by modulus\n' + + ' // behavior of comments should be different for single statements vs block statements/expressions\n' + + '}\n' + + '\n' + + 'if (modulus === 2)\n' + + ' // i might be odd here\n' + + ' i += (i & 1);\n' + + '// now i is guaranteed to be even\n' + + '// non-braced comments unindent immediately\n' + + '\n' + + '// this comment is about the block after it.\n' + + 'else\n' + + ' // rounding up using integer arithmetic only\n' + + ' if (i % modulus)\n' + + ' i += modulus - (i % modulus);\n' + + '// behavior of comments should be different for single statements vs block statements/expressions'); + + + //============================================================ + // Template Formatting + reset_options(); + bt(''); + bt('a = ;'); + bt( + '");\n' + + '}\n' + + '?>'); + bt('a = <%= external() %>;'); + + + //============================================================ + // jslint and space after anon function - (f = " ", c = "") + reset_options(); + opts.jslint_happy = true; + opts.space_after_anon_function = true; + bt( + 'a=typeof(x)', + // -- output -- + 'a = typeof (x)'); + bt( + 'x();\n' + + '\n' + + 'function(){}', + // -- output -- + 'x();\n' + + '\n' + + 'function () {}'); + bt( + 'x();\n' + + '\n' + + 'var x = {\n' + + 'x: function(){}\n' + + '}', + // -- output -- + 'x();\n' + + '\n' + + 'var x = {\n' + + ' x: function () {}\n' + + '}'); + bt( + 'function () {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + 'case 0:\n' + + 'case 1:\n' + + ' a();\n' + + ' break;\n' + + 'default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + 'case -1:\n' + + ' break;\n' + + 'case !y:\n' + + ' break;\n' + + '}'); + + // typical greasemonkey start + test_fragment( + '// comment 2\n' + + '(function ()'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {}, d = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {},\n' + + 'd = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var o2=$.extend(a);function(){alert(x);}', + // -- output -- + 'var o2 = $.extend(a);\n' + + '\n' + + 'function () {\n' + + ' alert(x);\n' + + '}'); + bt( + 'function*() {\n' + + ' yield 1;\n' + + '}', + // -- output -- + 'function* () {\n' + + ' yield 1;\n' + + '}'); + bt( + 'function* x() {\n' + + ' yield 1;\n' + + '}'); + + // jslint and space after anon function - (f = " ", c = "") + reset_options(); + opts.jslint_happy = true; + opts.space_after_anon_function = false; + bt( + 'a=typeof(x)', + // -- output -- + 'a = typeof (x)'); + bt( + 'x();\n' + + '\n' + + 'function(){}', + // -- output -- + 'x();\n' + + '\n' + + 'function () {}'); + bt( + 'x();\n' + + '\n' + + 'var x = {\n' + + 'x: function(){}\n' + + '}', + // -- output -- + 'x();\n' + + '\n' + + 'var x = {\n' + + ' x: function () {}\n' + + '}'); + bt( + 'function () {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + 'case 0:\n' + + 'case 1:\n' + + ' a();\n' + + ' break;\n' + + 'default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + 'case -1:\n' + + ' break;\n' + + 'case !y:\n' + + ' break;\n' + + '}'); + + // typical greasemonkey start + test_fragment( + '// comment 2\n' + + '(function ()'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {}, d = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {},\n' + + 'd = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var o2=$.extend(a);function(){alert(x);}', + // -- output -- + 'var o2 = $.extend(a);\n' + + '\n' + + 'function () {\n' + + ' alert(x);\n' + + '}'); + bt( + 'function*() {\n' + + ' yield 1;\n' + + '}', + // -- output -- + 'function* () {\n' + + ' yield 1;\n' + + '}'); + bt( + 'function* x() {\n' + + ' yield 1;\n' + + '}'); + + // jslint and space after anon function - (f = " ", c = " ") + reset_options(); + opts.jslint_happy = false; + opts.space_after_anon_function = true; + bt( + 'a=typeof(x)', + // -- output -- + 'a = typeof (x)'); + bt( + 'x();\n' + + '\n' + + 'function(){}', + // -- output -- + 'x();\n' + + '\n' + + 'function () {}'); + bt( + 'x();\n' + + '\n' + + 'var x = {\n' + + 'x: function(){}\n' + + '}', + // -- output -- + 'x();\n' + + '\n' + + 'var x = {\n' + + ' x: function () {}\n' + + '}'); + bt( + 'function () {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + ' case 0:\n' + + ' case 1:\n' + + ' a();\n' + + ' break;\n' + + ' default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + ' case -1:\n' + + ' break;\n' + + ' case !y:\n' + + ' break;\n' + + '}'); + + // typical greasemonkey start + test_fragment( + '// comment 2\n' + + '(function ()'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {}, d = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {},\n' + + 'd = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function () {},\n' + + ' d = \'\';'); + bt( + 'var o2=$.extend(a);function(){alert(x);}', + // -- output -- + 'var o2 = $.extend(a);\n' + + '\n' + + 'function () {\n' + + ' alert(x);\n' + + '}'); + bt( + 'function*() {\n' + + ' yield 1;\n' + + '}', + // -- output -- + 'function* () {\n' + + ' yield 1;\n' + + '}'); + bt( + 'function* x() {\n' + + ' yield 1;\n' + + '}'); + + // jslint and space after anon function - (f = "", c = " ") + reset_options(); + opts.jslint_happy = false; + opts.space_after_anon_function = false; + bt( + 'a=typeof(x)', + // -- output -- + 'a = typeof(x)'); + bt( + 'x();\n' + + '\n' + + 'function(){}', + // -- output -- + 'x();\n' + + '\n' + + 'function() {}'); + bt( + 'x();\n' + + '\n' + + 'var x = {\n' + + 'x: function(){}\n' + + '}', + // -- output -- + 'x();\n' + + '\n' + + 'var x = {\n' + + ' x: function() {}\n' + + '}'); + bt( + 'function () {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}', + // -- output -- + 'function() {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + ' case 0:\n' + + ' case 1:\n' + + ' a();\n' + + ' break;\n' + + ' default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + ' case -1:\n' + + ' break;\n' + + ' case !y:\n' + + ' break;\n' + + '}'); + + // typical greasemonkey start + test_fragment( + '// comment 2\n' + + '(function()'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {}, d = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function() {},\n' + + ' d = \'\';'); + bt( + 'var a2, b2, c2, d2 = 0, c = function() {},\n' + + 'd = \'\';', + // -- output -- + 'var a2, b2, c2, d2 = 0,\n' + + ' c = function() {},\n' + + ' d = \'\';'); + bt( + 'var o2=$.extend(a);function(){alert(x);}', + // -- output -- + 'var o2 = $.extend(a);\n' + + '\n' + + 'function() {\n' + + ' alert(x);\n' + + '}'); + bt( + 'function*() {\n' + + ' yield 1;\n' + + '}'); + bt( + 'function* x() {\n' + + ' yield 1;\n' + + '}'); + + + //============================================================ + // Regression tests + reset_options(); + + // Issue 241 + bt( + 'obj\n' + + ' .last({\n' + + ' foo: 1,\n' + + ' bar: 2\n' + + ' });\n' + + 'var test = 1;'); + bt( + 'obj\n' + + ' .last(a, function() {\n' + + ' var test;\n' + + ' });\n' + + 'var test = 1;'); + bt( + 'obj.first()\n' + + ' .second()\n' + + ' .last(function(err, response) {\n' + + ' console.log(err);\n' + + ' });'); + + // Issue 268 and 275 + bt( + 'obj.last(a, function() {\n' + + ' var test;\n' + + '});\n' + + 'var test = 1;'); + bt( + 'obj.last(a,\n' + + ' function() {\n' + + ' var test;\n' + + ' });\n' + + 'var test = 1;'); + bt( + '(function() {if (!window.FOO) window.FOO || (window.FOO = function() {var b = {bar: "zort"};});})();', + // -- output -- + '(function() {\n' + + ' if (!window.FOO) window.FOO || (window.FOO = function() {\n' + + ' var b = {\n' + + ' bar: "zort"\n' + + ' };\n' + + ' });\n' + + '})();'); + + // Issue 281 + bt( + 'define(["dojo/_base/declare", "my/Employee", "dijit/form/Button",\n' + + ' "dojo/_base/lang", "dojo/Deferred"\n' + + '], function(declare, Employee, Button, lang, Deferred) {\n' + + ' return declare(Employee, {\n' + + ' constructor: function() {\n' + + ' new Button({\n' + + ' onClick: lang.hitch(this, function() {\n' + + ' new Deferred().then(lang.hitch(this, function() {\n' + + ' this.salary * 0.25;\n' + + ' }));\n' + + ' })\n' + + ' });\n' + + ' }\n' + + ' });\n' + + '});'); + bt( + 'define(["dojo/_base/declare", "my/Employee", "dijit/form/Button",\n' + + ' "dojo/_base/lang", "dojo/Deferred"\n' + + ' ],\n' + + ' function(declare, Employee, Button, lang, Deferred) {\n' + + ' return declare(Employee, {\n' + + ' constructor: function() {\n' + + ' new Button({\n' + + ' onClick: lang.hitch(this, function() {\n' + + ' new Deferred().then(lang.hitch(this, function() {\n' + + ' this.salary * 0.25;\n' + + ' }));\n' + + ' })\n' + + ' });\n' + + ' }\n' + + ' });\n' + + ' });'); + + // Issue 459 + bt( + '(function() {\n' + + ' return {\n' + + ' foo: function() {\n' + + ' return "bar";\n' + + ' },\n' + + ' bar: ["bar"]\n' + + ' };\n' + + '}());'); + + // Issue 505 - strings should end at newline unless continued by backslash + bt( + 'var name = "a;\n' + + 'name = "b";'); + bt( + 'var name = "a;\\\n' + + ' name = b";'); + + // Issue 514 - some operators require spaces to distinguish them + bt('var c = "_ACTION_TO_NATIVEAPI_" + ++g++ + +new Date;'); + bt('var c = "_ACTION_TO_NATIVEAPI_" - --g-- - -new Date;'); + + // Issue 440 - reserved words can be used as object property names + bt( + 'a = {\n' + + ' function: {},\n' + + ' "function": {},\n' + + ' throw: {},\n' + + ' "throw": {},\n' + + ' var: {},\n' + + ' "var": {},\n' + + ' set: {},\n' + + ' "set": {},\n' + + ' get: {},\n' + + ' "get": {},\n' + + ' if: {},\n' + + ' "if": {},\n' + + ' then: {},\n' + + ' "then": {},\n' + + ' else: {},\n' + + ' "else": {},\n' + + ' yay: {}\n' + + '};'); + + // Issue 331 - if-else with braces edge case + bt( + 'if(x){a();}else{b();}if(y){c();}', + // -- output -- + 'if (x) {\n' + + ' a();\n' + + '} else {\n' + + ' b();\n' + + '}\n' + + 'if (y) {\n' + + ' c();\n' + + '}'); + + // Issue 485 - ensure function declarations behave the same in arrays as elsewhere + bt( + 'var v = ["a",\n' + + ' function() {\n' + + ' return;\n' + + ' }, {\n' + + ' id: 1\n' + + ' }\n' + + '];'); + bt( + 'var v = ["a", function() {\n' + + ' return;\n' + + '}, {\n' + + ' id: 1\n' + + '}];'); + + // Issue 382 - initial totally cursory support for es6 module export + bt( + 'module "Even" {\n' + + ' import odd from "Odd";\n' + + ' export function sum(x, y) {\n' + + ' return x + y;\n' + + ' }\n' + + ' export var pi = 3.141593;\n' + + ' export default moduleName;\n' + + '}'); + bt( + 'module "Even" {\n' + + ' export default function div(x, y) {}\n' + + '}'); + + // Issue 889 - export default { ... } + bt( + 'export default {\n' + + ' func1() {},\n' + + ' func2() {}\n' + + ' func3() {}\n' + + '}'); + bt( + 'export default {\n' + + ' a() {\n' + + ' return 1;\n' + + ' },\n' + + ' b() {\n' + + ' return 2;\n' + + ' },\n' + + ' c() {\n' + + ' return 3;\n' + + ' }\n' + + '}'); + + // Issue 508 + bt('set["name"]'); + bt('get["name"]'); + bt( + 'a = {\n' + + ' set b(x) {},\n' + + ' c: 1,\n' + + ' d: function() {}\n' + + '};'); + bt( + 'a = {\n' + + ' get b() {\n' + + ' retun 0;\n' + + ' },\n' + + ' c: 1,\n' + + ' d: function() {}\n' + + '};'); + + // Issue 298 - do not under indent if/while/for condtionals experesions + bt( + '\'use strict\';\n' + + 'if ([].some(function() {\n' + + ' return false;\n' + + ' })) {\n' + + ' console.log("hello");\n' + + '}'); + + // Issue 298 - do not under indent if/while/for condtionals experesions + bt( + '\'use strict\';\n' + + 'if ([].some(function() {\n' + + ' return false;\n' + + ' })) {\n' + + ' console.log("hello");\n' + + '}'); + + // Issue 552 - Typescript? Okay... we didn't break it before, so try not to break it now. + bt( + 'class Test {\n' + + ' blah: string[];\n' + + ' foo(): number {\n' + + ' return 0;\n' + + ' }\n' + + ' bar(): number {\n' + + ' return 0;\n' + + ' }\n' + + '}'); + bt( + 'interface Test {\n' + + ' blah: string[];\n' + + ' foo(): number {\n' + + ' return 0;\n' + + ' }\n' + + ' bar(): number {\n' + + ' return 0;\n' + + ' }\n' + + '}'); + + // Issue 583 - Functions with comments after them should still indent correctly. + bt( + 'function exit(code) {\n' + + ' setTimeout(function() {\n' + + ' phantom.exit(code);\n' + + ' }, 0);\n' + + ' phantom.onError = function() {};\n' + + '}\n' + + '// Comment'); + + // Issue 806 - newline arrow functions + bt( + 'a.b("c",\n' + + ' () => d.e\n' + + ')'); + + // Issue 810 - es6 object literal detection + bt( + 'function badFormatting() {\n' + + ' return {\n' + + ' a,\n' + + ' b: c,\n' + + ' d: e,\n' + + ' f: g,\n' + + ' h,\n' + + ' i,\n' + + ' j: k\n' + + ' }\n' + + '}\n' + + '\n' + + 'function goodFormatting() {\n' + + ' return {\n' + + ' a: b,\n' + + ' c,\n' + + ' d: e,\n' + + ' f: g,\n' + + ' h,\n' + + ' i,\n' + + ' j: k\n' + + ' }\n' + + '}'); + + // Issue 602 - ES6 object literal shorthand functions + bt( + 'return {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + '}'); + bt( + 'throw {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + '}'); + bt( + 'foo({\n' + + ' fn1(a) {}\n' + + ' fn2(a) {}\n' + + '})'); + bt( + 'foo("text", {\n' + + ' fn1(a) {}\n' + + ' fn2(a) {}\n' + + '})'); + bt( + 'oneArg = {\n' + + ' fn1(a) {\n' + + ' do();\n' + + ' },\n' + + ' fn2() {}\n' + + '}'); + bt( + 'multiArg = {\n' + + ' fn1(a, b, c) {\n' + + ' do();\n' + + ' },\n' + + ' fn2() {}\n' + + '}'); + bt( + 'noArgs = {\n' + + ' fn1() {\n' + + ' do();\n' + + ' },\n' + + ' fn2() {}\n' + + '}'); + bt( + 'emptyFn = {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + '}'); + bt( + 'nested = {\n' + + ' fns: {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + ' }\n' + + '}'); + bt( + 'array = [{\n' + + ' fn1() {},\n' + + ' prop: val,\n' + + ' fn2() {}\n' + + '}]'); + bt( + 'expr = expr ? expr : {\n' + + ' fn1() {},\n' + + ' fn2() {}\n' + + '}'); + bt( + 'strange = valid + {\n' + + ' fn1() {},\n' + + ' fn2() {\n' + + ' return 1;\n' + + ' }\n' + + '}.fn2()'); + + // Issue 854 - Arrow function with statement block + bt( + 'test(() => {\n' + + ' var a = {}\n' + + '\n' + + ' a.what = () => true ? 1 : 2\n' + + '\n' + + ' a.thing = () => {\n' + + ' b();\n' + + ' }\n' + + '})'); + + // Issue 406 - Multiline array + bt( + 'var tempName = [\n' + + ' "temp",\n' + + ' process.pid,\n' + + ' (Math.random() * 0x1000000000).toString(36),\n' + + ' new Date().getTime()\n' + + '].join("-");'); + + // Issue #996 - Input ends with backslash throws exception + test_fragment( + 'sd = 1;\n' + + '/'); + + // Issue #1079 - unbraced if with comments should still look right + bt( + 'if (console.log)\n' + + ' for (var i = 0; i < 20; ++i)\n' + + ' if (i % 3)\n' + + ' console.log(i);\n' + + '// all done\n' + + 'console.log("done");'); + + // Issue #1085 - function should not have blank line in a number of cases + bt( + 'var transformer =\n' + + ' options.transformer ||\n' + + ' globalSettings.transformer ||\n' + + ' function(x) {\n' + + ' return x;\n' + + ' };'); + + // Issue #569 - function should not have blank line in a number of cases + bt( + '(function(global) {\n' + + ' "use strict";\n' + + '\n' + + ' /* jshint ignore:start */\n' + + ' include "somefile.js"\n' + + ' /* jshint ignore:end */\n' + + '}(this));'); + bt( + 'function bindAuthEvent(eventName) {\n' + + ' self.auth.on(eventName, function(event, meta) {\n' + + ' self.emit(eventName, event, meta);\n' + + ' });\n' + + '}\n' + + '["logged_in", "logged_out", "signed_up", "updated_user"].forEach(bindAuthEvent);\n' + + '\n' + + 'function bindBrowserEvent(eventName) {\n' + + ' browser.on(eventName, function(event, meta) {\n' + + ' self.emit(eventName, event, meta);\n' + + ' });\n' + + '}\n' + + '["navigating"].forEach(bindBrowserEvent);'); + + // Issue #892 - new line between chained methods + bt( + 'foo\n' + + ' .who()\n' + + '\n' + + ' .knows()\n' + + ' // comment\n' + + ' .nothing() // comment\n' + + '\n' + + ' .more()'); + + + //============================================================ + // Test non-positionable-ops + reset_options(); + bt('a += 2;'); + bt('a -= 2;'); + bt('a *= 2;'); + bt('a /= 2;'); + bt('a %= 2;'); + bt('a &= 2;'); + bt('a ^= 2;'); + bt('a |= 2;'); + bt('a **= 2;'); + bt('a <<= 2;'); + bt('a >>= 2;'); + + + //============================================================ + // brace_style ,preserve-inline tests - (obo = " ", obot = "", oao = "\n", oaot = " ", obc = "\n", oac = " ", oact = "") + reset_options(); + opts.brace_style = 'collapse,preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt('if (ding) { console.log("dong"); } else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + // brace_style ,preserve-inline tests - (obo = "\n", obot = " ", oao = "\n", oaot = " ", obc = "\n", oac = "\n", oact = " ") + reset_options(); + opts.brace_style = 'expand,preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt( + 'if (ding) { console.log("dong"); } else { console.log("dang"); }', + // -- output -- + 'if (ding) { console.log("dong"); }\n' + + 'else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}', + // -- output -- + 'function kindaComplex()\n' + + '{\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex()\n' + + '{\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b()\n' + + ' {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + // brace_style ,preserve-inline tests - (obo = " ", obot = "", oao = "\n", oaot = " ", obc = "\n", oac = "\n", oact = " ") + reset_options(); + opts.brace_style = 'end-expand,preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt( + 'if (ding) { console.log("dong"); } else { console.log("dang"); }', + // -- output -- + 'if (ding) { console.log("dong"); }\n' + + 'else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + // brace_style ,preserve-inline tests - (obo = " ", obot = "", oao = "\n", oaot = " ", obc = "\n", oac = " ", oact = "") + reset_options(); + opts.brace_style = 'none,preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt('if (ding) { console.log("dong"); } else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + // brace_style ,preserve-inline tests - (obo = " ", obot = "", oao = "\n", oaot = " ", obc = "\n", oac = " ", oact = "") + reset_options(); + opts.brace_style = 'collapse-preserve-inline'; + bt('import { asdf } from "asdf";'); + bt('import { get } from "asdf";'); + bt('function inLine() { console.log("oh em gee"); }'); + bt('if (cancer) { console.log("Im sorry but you only have so long to live..."); }'); + bt('if (ding) { console.log("dong"); } else { console.log("dang"); }'); + bt( + 'function kindaComplex() {\n' + + ' var a = 2;\n' + + ' var obj = {};\n' + + ' var obj2 = { a: "a", b: "b" };\n' + + ' var obj3 = {\n' + + ' c: "c",\n' + + ' d: "d",\n' + + ' e: "e"\n' + + ' };\n' + + '}'); + bt( + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}', + // -- output -- + 'function complex() {\n' + + ' console.log("wowe");\n' + + ' (function() { var a = 2; var b = 3; })();\n' + + ' $.each(arr, function(el, idx) { return el; });\n' + + ' var obj = {\n' + + ' a: function() { console.log("test"); },\n' + + ' b() {\n' + + ' console.log("test2");\n' + + ' }\n' + + ' };\n' + + '}'); + + + //============================================================ + // Destructured and related + reset_options(); + opts.brace_style = 'collapse,preserve-inline'; + + // Issue 382 - import destructured + bt( + 'module "Even" {\n' + + ' import { odd, oddly } from "Odd";\n' + + '}'); + bt( + 'import defaultMember from "module-name";\n' + + 'import * as name from "module-name";\n' + + 'import { member } from "module-name";\n' + + 'import { member as alias } from "module-name";\n' + + 'import { member1, member2 } from "module-name";\n' + + 'import { member1, member2 as alias2 } from "module-name";\n' + + 'import defaultMember, { member, member2 } from "module-name";\n' + + 'import defaultMember, * as name from "module-name";\n' + + 'import "module-name";'); + + // Issue 858 - from is a keyword only after import + bt( + 'if (from < to) {\n' + + ' from++;\n' + + '} else {\n' + + ' from--;\n' + + '}'); + + // Issue 511 - destrutured + bt( + 'var { b, c } = require("../stores");\n' + + 'var { ProjectStore } = require("../stores");\n' + + '\n' + + 'function takeThing({ prop }) {\n' + + ' console.log("inner prop", prop)\n' + + '}'); + + // Issue 315 - Short objects + bt('var a = { b: { c: { d: e } } };'); + bt( + 'var a = {\n' + + ' b: {\n' + + ' c: { d: e }\n' + + ' c3: { d: e }\n' + + ' },\n' + + ' b2: { c: { d: e } }\n' + + '};'); + + // Issue 370 - Short objects in array + bt( + 'var methods = [\n' + + ' { name: "to" },\n' + + ' { name: "step" },\n' + + ' { name: "move" },\n' + + ' { name: "min" },\n' + + ' { name: "max" }\n' + + '];'); + + // Issue 838 - Short objects in array + bt( + 'function(url, callback) {\n' + + ' var script = document.createElement("script")\n' + + ' if (true) script.onreadystatechange = function() {\n' + + ' foo();\n' + + ' }\n' + + ' else script.onload = callback;\n' + + '}'); + + // Issue 578 - Odd indenting after function + bt( + 'function bindAuthEvent(eventName) {\n' + + ' self.auth.on(eventName, function(event, meta) {\n' + + ' self.emit(eventName, event, meta);\n' + + ' });\n' + + '}\n' + + '["logged_in", "logged_out", "signed_up", "updated_user"].forEach(bindAuthEvent);'); + + // Issue #487 - some short expressions examples + bt( + 'if (a == 1) { a++; }\n' + + 'a = { a: a };\n' + + 'UserDB.findOne({ username: "xyz" }, function(err, user) {});\n' + + 'import { fs } from "fs";'); + + // Issue #982 - Fixed return expression collapse-preserve-inline + bt( + 'function foo(arg) {\n' + + ' if (!arg) { a(); }\n' + + ' if (!arg) { return false; }\n' + + ' if (!arg) { throw "inline"; }\n' + + ' return true;\n' + + '}'); + + // Issue #338 - Short expressions + bt( + 'if (someCondition) { return something; }\n' + + 'if (someCondition) {\n' + + ' return something;\n' + + '}\n' + + 'if (someCondition) { break; }\n' + + 'if (someCondition) {\n' + + ' return something;\n' + + '}'); + + + //============================================================ + // Old tests + reset_options(); + bt(''); + test_fragment(' return .5'); + test_fragment( + ' return .5;\n' + + ' a();'); + test_fragment( + ' return .5;\n' + + ' a();'); + test_fragment( + ' return .5;\n' + + ' a();'); + test_fragment(' < div'); + bt('a = 1', 'a = 1'); + bt('a=1', 'a = 1'); + bt('(3) / 2'); + bt('["a", "b"].join("")'); + bt( + 'a();\n' + + '\n' + + 'b();'); + bt( + 'var a = 1 var b = 2', + // -- output -- + 'var a = 1\n' + + 'var b = 2'); + bt( + 'var a=1, b=c[d], e=6;', + // -- output -- + 'var a = 1,\n' + + ' b = c[d],\n' + + ' e = 6;'); + bt( + 'var a,\n' + + ' b,\n' + + ' c;'); + bt( + 'let a = 1 let b = 2', + // -- output -- + 'let a = 1\n' + + 'let b = 2'); + bt( + 'let a=1, b=c[d], e=6;', + // -- output -- + 'let a = 1,\n' + + ' b = c[d],\n' + + ' e = 6;'); + bt( + 'let a,\n' + + ' b,\n' + + ' c;'); + bt( + 'const a = 1 const b = 2', + // -- output -- + 'const a = 1\n' + + 'const b = 2'); + bt( + 'const a=1, b=c[d], e=6;', + // -- output -- + 'const a = 1,\n' + + ' b = c[d],\n' + + ' e = 6;'); + bt( + 'const a,\n' + + ' b,\n' + + ' c;'); + bt('a = " 12345 "'); + bt('a = \' 12345 \''); + bt('if (a == 1) b = 2;'); + bt( + 'if(1){2}else{3}', + // -- output -- + 'if (1) {\n' + + ' 2\n' + + '} else {\n' + + ' 3\n' + + '}'); + bt('if(1||2);', 'if (1 || 2);'); + bt('(a==1)||(b==2)', '(a == 1) || (b == 2)'); + bt( + 'var a = 1 if (2) 3;', + // -- output -- + 'var a = 1\n' + + 'if (2) 3;'); + bt('a = a + 1'); + bt('a = a == 1'); + bt('/12345[^678]*9+/.match(a)'); + bt('a /= 5'); + bt('a = 0.5 * 3'); + bt('a *= 10.55'); + bt('a < .5'); + bt('a <= .5'); + bt('a<.5', 'a < .5'); + bt('a<=.5', 'a <= .5'); + + // exponent literals + bt('a = 1e10'); + bt('a = 1.3e10'); + bt('a = 1.3e-10'); + bt('a = -12345.3e-10'); + bt('a = .12345e-10'); + bt('a = 06789e-10'); + bt('a = e - 10'); + bt('a = 1.3e+10'); + bt('a = 1.e-7'); + bt('a = -12345.3e+10'); + bt('a = .12345e+10'); + bt('a = 06789e+10'); + bt('a = e + 10'); + bt('a=0e-12345.3e-10', 'a = 0e-12345 .3e-10'); + bt('a=0.e-12345.3e-10', 'a = 0.e-12345 .3e-10'); + bt('a=0x.e-12345.3e-10', 'a = 0x.e - 12345.3e-10'); + bt('a=0x0.e-12345.3e-10', 'a = 0x0.e - 12345.3e-10'); + bt('a=0x0.0e-12345.3e-10', 'a = 0x0 .0e-12345 .3e-10'); + bt('a=0g-12345.3e-10', 'a = 0 g - 12345.3e-10'); + bt('a=0.g-12345.3e-10', 'a = 0. g - 12345.3e-10'); + bt('a=0x.g-12345.3e-10', 'a = 0x.g - 12345.3e-10'); + bt('a=0x0.g-12345.3e-10', 'a = 0x0.g - 12345.3e-10'); + bt('a=0x0.0g-12345.3e-10', 'a = 0x0 .0 g - 12345.3e-10'); + + // Decimal literals + bt('a = 0123456789;'); + bt('a = 9876543210;'); + bt('a = 5647308291;'); + bt('a=030e-5', 'a = 030e-5'); + bt('a=00+4', 'a = 00 + 4'); + bt('a=32+4', 'a = 32 + 4'); + bt('a=0.6g+4', 'a = 0.6 g + 4'); + bt('a=01.10', 'a = 01.10'); + bt('a=a.10', 'a = a .10'); + bt('a=00B0x0', 'a = 00 B0x0'); + bt('a=00B0xb0', 'a = 00 B0xb0'); + bt('a=00B0x0b0', 'a = 00 B0x0b0'); + bt('a=0090x0', 'a = 0090 x0'); + bt('a=0g0b0o0', 'a = 0 g0b0o0'); + + // Hexadecimal literals + bt('a = 0x0123456789abcdef;'); + bt('a = 0X0123456789ABCDEF;'); + bt('a = 0xFeDcBa9876543210;'); + bt('a=0x30e-5', 'a = 0x30e - 5'); + bt('a=0xF0+4', 'a = 0xF0 + 4'); + bt('a=0Xff+4', 'a = 0Xff + 4'); + bt('a=0Xffg+4', 'a = 0Xff g + 4'); + bt('a=0x01.10', 'a = 0x01 .10'); + bt('a = 0xb0ce;'); + bt('a = 0x0b0;'); + bt('a=0x0B0x0', 'a = 0x0B0 x0'); + bt('a=0x0B0xb0', 'a = 0x0B0 xb0'); + bt('a=0x0B0x0b0', 'a = 0x0B0 x0b0'); + bt('a=0X090x0', 'a = 0X090 x0'); + bt('a=0Xg0b0o0', 'a = 0X g0b0o0'); + + // Octal literals + bt('a = 0o01234567;'); + bt('a = 0O01234567;'); + bt('a = 0o34120675;'); + bt('a=0o30e-5', 'a = 0o30 e - 5'); + bt('a=0o70+4', 'a = 0o70 + 4'); + bt('a=0O77+4', 'a = 0O77 + 4'); + bt('a=0O778+4', 'a = 0O77 8 + 4'); + bt('a=0O77a+4', 'a = 0O77 a + 4'); + bt('a=0o01.10', 'a = 0o01 .10'); + bt('a=0o0B0x0', 'a = 0o0 B0x0'); + bt('a=0o0B0xb0', 'a = 0o0 B0xb0'); + bt('a=0o0B0x0b0', 'a = 0o0 B0x0b0'); + bt('a=0O090x0', 'a = 0O0 90 x0'); + bt('a=0Og0b0o0', 'a = 0O g0b0o0'); + + // Binary literals + bt('a = 0b010011;'); + bt('a = 0B010011;'); + bt('a = 0b01001100001111;'); + bt('a=0b10e-5', 'a = 0b10 e - 5'); + bt('a=0b10+4', 'a = 0b10 + 4'); + bt('a=0B11+4', 'a = 0B11 + 4'); + bt('a=0B112+4', 'a = 0B11 2 + 4'); + bt('a=0B11a+4', 'a = 0B11 a + 4'); + bt('a=0b01.10', 'a = 0b01 .10'); + bt('a=0b0B0x0', 'a = 0b0 B0x0'); + bt('a=0b0B0xb0', 'a = 0b0 B0xb0'); + bt('a=0b0B0x0b0', 'a = 0b0 B0x0b0'); + bt('a=0B090x0', 'a = 0B0 90 x0'); + bt('a=0Bg0b0o0', 'a = 0B g0b0o0'); + bt('a = [1, 2, 3, 4]'); + bt('F*(g/=f)*g+b', 'F * (g /= f) * g + b'); + bt( + 'a.b({c:d})', + // -- output -- + 'a.b({\n' + + ' c: d\n' + + '})'); + bt( + 'a.b\n' + + '(\n' + + '{\n' + + 'c:\n' + + 'd\n' + + '}\n' + + ')', + // -- output -- + 'a.b({\n' + + ' c: d\n' + + '})'); + bt( + 'a.b({c:"d"})', + // -- output -- + 'a.b({\n' + + ' c: "d"\n' + + '})'); + bt( + 'a.b\n' + + '(\n' + + '{\n' + + 'c:\n' + + '"d"\n' + + '}\n' + + ')', + // -- output -- + 'a.b({\n' + + ' c: "d"\n' + + '})'); + bt('a=!b', 'a = !b'); + bt('a=!!b', 'a = !!b'); + bt('a?b:c', 'a ? b : c'); + bt('a?1:2', 'a ? 1 : 2'); + bt('a?(b):c', 'a ? (b) : c'); + bt( + 'x={a:1,b:w=="foo"?x:y,c:z}', + // -- output -- + 'x = {\n' + + ' a: 1,\n' + + ' b: w == "foo" ? x : y,\n' + + ' c: z\n' + + '}'); + bt('x=a?b?c?d:e:f:g;', 'x = a ? b ? c ? d : e : f : g;'); + bt( + 'x=a?b?c?d:{e1:1,e2:2}:f:g;', + // -- output -- + 'x = a ? b ? c ? d : {\n' + + ' e1: 1,\n' + + ' e2: 2\n' + + '} : f : g;'); + bt('function void(void) {}'); + bt('if(!a)foo();', 'if (!a) foo();'); + bt('a=~a', 'a = ~a'); + bt( + 'a;/*comment*/b;', + // -- output -- + 'a; /*comment*/\n' + + 'b;'); + bt( + 'a;/* comment */b;', + // -- output -- + 'a; /* comment */\n' + + 'b;'); + + // simple comments don't get touched at all + test_fragment( + 'a;/*\n' + + 'comment\n' + + '*/b;', + // -- output -- + 'a;\n' + + '/*\n' + + 'comment\n' + + '*/\n' + + 'b;'); + bt( + 'a;/**\n' + + '* javadoc\n' + + '*/b;', + // -- output -- + 'a;\n' + + '/**\n' + + ' * javadoc\n' + + ' */\n' + + 'b;'); + test_fragment( + 'a;/**\n' + + '\n' + + 'no javadoc\n' + + '*/b;', + // -- output -- + 'a;\n' + + '/**\n' + + '\n' + + 'no javadoc\n' + + '*/\n' + + 'b;'); + + // comment blocks detected and reindented even w/o javadoc starter + bt( + 'a;/*\n' + + '* javadoc\n' + + '*/b;', + // -- output -- + 'a;\n' + + '/*\n' + + ' * javadoc\n' + + ' */\n' + + 'b;'); + bt('if(a)break;', 'if (a) break;'); + bt( + 'if(a){break}', + // -- output -- + 'if (a) {\n' + + ' break\n' + + '}'); + bt('if((a))foo();', 'if ((a)) foo();'); + bt('for(var i=0;;) a', 'for (var i = 0;;) a'); + bt( + 'for(var i=0;;)\n' + + 'a', + // -- output -- + 'for (var i = 0;;)\n' + + ' a'); + bt('a++;'); + bt('for(;;i++)a()', 'for (;; i++) a()'); + bt( + 'for(;;i++)\n' + + 'a()', + // -- output -- + 'for (;; i++)\n' + + ' a()'); + bt('for(;;++i)a', 'for (;; ++i) a'); + bt('return(1)', 'return (1)'); + bt( + 'try{a();}catch(b){c();}finally{d();}', + // -- output -- + 'try {\n' + + ' a();\n' + + '} catch (b) {\n' + + ' c();\n' + + '} finally {\n' + + ' d();\n' + + '}'); + + // magic function call + bt('(xx)()'); + + // another magic function call + bt('a[1]()'); + bt( + 'if(a){b();}else if(c) foo();', + // -- output -- + 'if (a) {\n' + + ' b();\n' + + '} else if (c) foo();'); + bt( + 'switch(x) {case 0: case 1: a(); break; default: break}', + // -- output -- + 'switch (x) {\n' + + ' case 0:\n' + + ' case 1:\n' + + ' a();\n' + + ' break;\n' + + ' default:\n' + + ' break\n' + + '}'); + bt( + 'switch(x){case -1:break;case !y:break;}', + // -- output -- + 'switch (x) {\n' + + ' case -1:\n' + + ' break;\n' + + ' case !y:\n' + + ' break;\n' + + '}'); + bt('a !== b'); + bt( + 'if (a) b(); else c();', + // -- output -- + 'if (a) b();\n' + + 'else c();'); + + // typical greasemonkey start + bt( + '// comment\n' + + '(function something() {})'); + + // duplicating newlines + bt( + '{\n' + + '\n' + + ' x();\n' + + '\n' + + '}'); + bt('if (a in b) foo();'); + bt('if (a of b) foo();'); + bt('if (a of [1, 2, 3]) foo();'); + bt( + 'if(X)if(Y)a();else b();else c();', + // -- output -- + 'if (X)\n' + + ' if (Y) a();\n' + + ' else b();\n' + + 'else c();'); + bt( + 'if (foo) bar();\n' + + 'else break'); + bt('var a, b;'); + bt('var a = new function();'); + test_fragment('new function'); + bt('var a, b'); + bt( + '{a:1, b:2}', + // -- output -- + '{\n' + + ' a: 1,\n' + + ' b: 2\n' + + '}'); + bt( + 'a={1:[-1],2:[+1]}', + // -- output -- + 'a = {\n' + + ' 1: [-1],\n' + + ' 2: [+1]\n' + + '}'); + bt( + 'var l = {\'a\':\'1\', \'b\':\'2\'}', + // -- output -- + 'var l = {\n' + + ' \'a\': \'1\',\n' + + ' \'b\': \'2\'\n' + + '}'); + bt('if (template.user[n] in bk) foo();'); + bt('return 45'); + bt( + 'return this.prevObject ||\n' + + '\n' + + ' this.constructor(null);'); + bt('If[1]'); + bt('Then[1]'); + bt('a = 1;// comment', 'a = 1; // comment'); + bt('a = 1; // comment'); + bt( + 'a = 1;\n' + + ' // comment', + // -- output -- + 'a = 1;\n' + + '// comment'); + bt('a = [-1, -1, -1]'); + bt( + '// a\n' + + '// b\n' + + '\n' + + '\n' + + '\n' + + '// c\n' + + '// d'); + bt( + '// func-comment\n' + + '\n' + + 'function foo() {}\n' + + '\n' + + '// end-func-comment'); + + // The exact formatting these should have is open for discussion, but they are at least reasonable + bt( + 'a = [ // comment\n' + + ' -1, -1, -1\n' + + ']'); + bt( + 'var a = [ // comment\n' + + ' -1, -1, -1\n' + + ']'); + bt( + 'a = [ // comment\n' + + ' -1, // comment\n' + + ' -1, -1\n' + + ']'); + bt( + 'var a = [ // comment\n' + + ' -1, // comment\n' + + ' -1, -1\n' + + ']'); + bt( + 'o = [{a:b},{c:d}]', + // -- output -- + 'o = [{\n' + + ' a: b\n' + + '}, {\n' + + ' c: d\n' + + '}]'); + + // was: extra space appended + bt( + 'if (a) {\n' + + ' do();\n' + + '}'); + + // if/else statement with empty body + bt( + 'if (a) {\n' + + '// comment\n' + + '}else{\n' + + '// comment\n' + + '}', + // -- output -- + 'if (a) {\n' + + ' // comment\n' + + '} else {\n' + + ' // comment\n' + + '}'); + + // multiple comments indentation + bt( + 'if (a) {\n' + + '// comment\n' + + '// comment\n' + + '}', + // -- output -- + 'if (a) {\n' + + ' // comment\n' + + ' // comment\n' + + '}'); + bt( + 'if (a) b() else c();', + // -- output -- + 'if (a) b()\n' + + 'else c();'); + bt( + 'if (a) b() else if c() d();', + // -- output -- + 'if (a) b()\n' + + 'else if c() d();'); + bt('{}'); + bt( + '{\n' + + '\n' + + '}'); + bt( + 'do { a(); } while ( 1 );', + // -- output -- + 'do {\n' + + ' a();\n' + + '} while (1);'); + bt('do {} while (1);'); + bt( + 'do {\n' + + '} while (1);', + // -- output -- + 'do {} while (1);'); + bt( + 'do {\n' + + '\n' + + '} while (1);'); + bt('var a = x(a, b, c)'); + bt( + 'delete x if (a) b();', + // -- output -- + 'delete x\n' + + 'if (a) b();'); + bt( + 'delete x[x] if (a) b();', + // -- output -- + 'delete x[x]\n' + + 'if (a) b();'); + bt('for(var a=1,b=2)d', 'for (var a = 1, b = 2) d'); + bt('for(var a=1,b=2,c=3) d', 'for (var a = 1, b = 2, c = 3) d'); + bt( + 'for(var a=1,b=2,c=3;d<3;d++)\n' + + 'e', + // -- output -- + 'for (var a = 1, b = 2, c = 3; d < 3; d++)\n' + + ' e'); + bt( + 'function x(){(a||b).c()}', + // -- output -- + 'function x() {\n' + + ' (a || b).c()\n' + + '}'); + bt( + 'function x(){return - 1}', + // -- output -- + 'function x() {\n' + + ' return -1\n' + + '}'); + bt( + 'function x(){return ! a}', + // -- output -- + 'function x() {\n' + + ' return !a\n' + + '}'); + bt('x => x'); + bt('(x) => x'); + bt( + 'x => { x }', + // -- output -- + 'x => {\n' + + ' x\n' + + '}'); + bt( + '(x) => { x }', + // -- output -- + '(x) => {\n' + + ' x\n' + + '}'); + + // a common snippet in jQuery plugins + bt( + 'settings = $.extend({},defaults,settings);', + // -- output -- + 'settings = $.extend({}, defaults, settings);'); + bt('$http().then().finally().default()'); + bt( + '$http()\n' + + '.then()\n' + + '.finally()\n' + + '.default()', + // -- output -- + '$http()\n' + + ' .then()\n' + + ' .finally()\n' + + ' .default()'); + bt('$http().when.in.new.catch().throw()'); + bt( + '$http()\n' + + '.when\n' + + '.in\n' + + '.new\n' + + '.catch()\n' + + '.throw()', + // -- output -- + '$http()\n' + + ' .when\n' + + ' .in\n' + + ' .new\n' + + ' .catch()\n' + + ' .throw()'); + bt( + '{xxx;}()', + // -- output -- + '{\n' + + ' xxx;\n' + + '}()'); + bt( + 'a = \'a\'\n' + + 'b = \'b\''); + bt('a = /reg/exp'); + bt('a = /reg/'); + bt('/abc/.test()'); + bt('/abc/i.test()'); + bt( + '{/abc/i.test()}', + // -- output -- + '{\n' + + ' /abc/i.test()\n' + + '}'); + bt('var x=(a)/a;', 'var x = (a) / a;'); + bt('x != -1'); + bt('for (; s-->0;)t', 'for (; s-- > 0;) t'); + bt('for (; s++>0;)u', 'for (; s++ > 0;) u'); + bt('a = s++>s--;', 'a = s++ > s--;'); + bt('a = s++>--s;', 'a = s++ > --s;'); + bt( + '{x=#1=[]}', + // -- output -- + '{\n' + + ' x = #1=[]\n' + + '}'); + bt( + '{a:#1={}}', + // -- output -- + '{\n' + + ' a: #1={}\n' + + '}'); + bt( + '{a:#1#}', + // -- output -- + '{\n' + + ' a: #1#\n' + + '}'); + test_fragment('"incomplete-string'); + test_fragment('\'incomplete-string'); + test_fragment('/incomplete-regex'); + test_fragment('`incomplete-template-string'); + test_fragment( + '{a:1},{a:2}', + // -- output -- + '{\n' + + ' a: 1\n' + + '}, {\n' + + ' a: 2\n' + + '}'); + test_fragment( + 'var ary=[{a:1}, {a:2}];', + // -- output -- + 'var ary = [{\n' + + ' a: 1\n' + + '}, {\n' + + ' a: 2\n' + + '}];'); + + // incomplete + test_fragment( + '{a:#1', + // -- output -- + '{\n' + + ' a: #1'); + + // incomplete + test_fragment( + '{a:#', + // -- output -- + '{\n' + + ' a: #'); + + // incomplete + test_fragment( + '}}}', + // -- output -- + '}\n' + + '}\n' + + '}'); + test_fragment( + ''); + + // incomplete regexp + test_fragment('a=/regexp', 'a = /regexp'); + bt( + '{a:#1=[],b:#1#,c:#999999#}', + // -- output -- + '{\n' + + ' a: #1=[],\n' + + ' b: #1#,\n' + + ' c: #999999#\n' + + '}'); + bt( + 'do{x()}while(a>1)', + // -- output -- + 'do {\n' + + ' x()\n' + + '} while (a > 1)'); + bt( + 'x(); /reg/exp.match(something)', + // -- output -- + 'x();\n' + + '/reg/exp.match(something)'); + test_fragment( + 'something();(', + // -- output -- + 'something();\n' + + '('); + test_fragment( + '#!she/bangs, she bangs\n' + + 'f=1', + // -- output -- + '#!she/bangs, she bangs\n' + + '\n' + + 'f = 1'); + test_fragment( + '#!she/bangs, she bangs\n' + + '\n' + + 'f=1', + // -- output -- + '#!she/bangs, she bangs\n' + + '\n' + + 'f = 1'); + test_fragment( + '#!she/bangs, she bangs\n' + + '\n' + + '/* comment */'); + test_fragment( + '#!she/bangs, she bangs\n' + + '\n' + + '\n' + + '/* comment */'); + test_fragment('#'); + test_fragment('#!'); + bt('function namespace::something()'); + test_fragment( + ''); + test_fragment( + '', + // -- output -- + ''); + bt( + '{foo();--bar;}', + // -- output -- + '{\n' + + ' foo();\n' + + ' --bar;\n' + + '}'); + bt( + '{foo();++bar;}', + // -- output -- + '{\n' + + ' foo();\n' + + ' ++bar;\n' + + '}'); + bt( + '{--bar;}', + // -- output -- + '{\n' + + ' --bar;\n' + + '}'); + bt( + '{++bar;}', + // -- output -- + '{\n' + + ' ++bar;\n' + + '}'); + bt('if(true)++a;', 'if (true) ++a;'); + bt( + 'if(true)\n' + + '++a;', + // -- output -- + 'if (true)\n' + + ' ++a;'); + bt('if(true)--a;', 'if (true) --a;'); + bt( + 'if(true)\n' + + '--a;', + // -- output -- + 'if (true)\n' + + ' --a;'); + bt('elem[array]++;'); + bt('elem++ * elem[array]++;'); + bt('elem-- * -elem[array]++;'); + bt('elem-- + elem[array]++;'); + bt('elem-- - elem[array]++;'); + bt('elem-- - -elem[array]++;'); + bt('elem-- - +elem[array]++;'); + + // Handling of newlines around unary ++ and -- operators + bt( + '{foo\n' + + '++bar;}', + // -- output -- + '{\n' + + ' foo\n' + + ' ++bar;\n' + + '}'); + bt( + '{foo++\n' + + 'bar;}', + // -- output -- + '{\n' + + ' foo++\n' + + ' bar;\n' + + '}'); + + // This is invalid, but harder to guard against. Issue #203. + bt( + '{foo\n' + + '++\n' + + 'bar;}', + // -- output -- + '{\n' + + ' foo\n' + + ' ++\n' + + ' bar;\n' + + '}'); + + // regexps + bt( + 'a(/abc\\/\\/def/);b()', + // -- output -- + 'a(/abc\\/\\/def/);\n' + + 'b()'); + bt( + 'a(/a[b\\[\\]c]d/);b()', + // -- output -- + 'a(/a[b\\[\\]c]d/);\n' + + 'b()'); + + // incomplete char class + test_fragment('a(/a[b\\['); + + // allow unescaped / in char classes + bt( + 'a(/[a/b]/);b()', + // -- output -- + 'a(/[a/b]/);\n' + + 'b()'); + bt('typeof /foo\\//;'); + bt('throw /foo\\//;'); + bt('do /foo\\//;'); + bt('return /foo\\//;'); + bt( + 'switch (a) {\n' + + ' case /foo\\//:\n' + + ' b\n' + + '}'); + bt( + 'if (a) /foo\\//\n' + + 'else /foo\\//;'); + bt('if (foo) /regex/.test();'); + bt('for (index in [1, 2, 3]) /^test$/i.test(s)'); + bt( + 'function foo() {\n' + + ' return [\n' + + ' "one",\n' + + ' "two"\n' + + ' ];\n' + + '}'); + bt( + 'a=[[1,2],[4,5],[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt( + 'a=[[1,2],[4,5],function(){},[7,8]]', + // -- output -- + 'a = [\n' + + ' [1, 2],\n' + + ' [4, 5],\n' + + ' function() {},\n' + + ' [7, 8]\n' + + ']'); + bt('a=[b,c,function(){},function(){},d]', 'a = [b, c, function() {}, function() {}, d]'); + bt( + 'a=[b,c,\n' + + 'function(){},function(){},d]', + // -- output -- + 'a = [b, c,\n' + + ' function() {},\n' + + ' function() {},\n' + + ' d\n' + + ']'); + bt('a=[a[1],b[4],c[d[7]]]', 'a = [a[1], b[4], c[d[7]]]'); + bt('[1,2,[3,4,[5,6],7],8]', '[1, 2, [3, 4, [5, 6], 7], 8]'); + bt( + '[[["1","2"],["3","4"]],[["5","6","7"],["8","9","0"]],[["1","2","3"],["4","5","6","7"],["8","9","0"]]]', + // -- output -- + '[\n' + + ' [\n' + + ' ["1", "2"],\n' + + ' ["3", "4"]\n' + + ' ],\n' + + ' [\n' + + ' ["5", "6", "7"],\n' + + ' ["8", "9", "0"]\n' + + ' ],\n' + + ' [\n' + + ' ["1", "2", "3"],\n' + + ' ["4", "5", "6", "7"],\n' + + ' ["8", "9", "0"]\n' + + ' ]\n' + + ']'); + bt( + '{[x()[0]];indent;}', + // -- output -- + '{\n' + + ' [x()[0]];\n' + + ' indent;\n' + + '}'); + bt( + '/*\n' + + ' foo trailing space \n' + + ' * bar trailing space \n' + + '**/'); + bt( + '{\n' + + ' /*\n' + + ' foo \n' + + ' * bar \n' + + ' */\n' + + '}'); + bt('return ++i'); + bt('return !!x'); + bt('return !x'); + bt('return [1,2]', 'return [1, 2]'); + bt('return;'); + bt( + 'return\n' + + 'func'); + bt('catch(e)', 'catch (e)'); + bt( + 'var a=1,b={foo:2,bar:3},{baz:4,wham:5},c=4;', + // -- output -- + 'var a = 1,\n' + + ' b = {\n' + + ' foo: 2,\n' + + ' bar: 3\n' + + ' },\n' + + ' {\n' + + ' baz: 4,\n' + + ' wham: 5\n' + + ' }, c = 4;'); + bt( + 'var a=1,b={foo:2,bar:3},{baz:4,wham:5},\n' + + 'c=4;', + // -- output -- + 'var a = 1,\n' + + ' b = {\n' + + ' foo: 2,\n' + + ' bar: 3\n' + + ' },\n' + + ' {\n' + + ' baz: 4,\n' + + ' wham: 5\n' + + ' },\n' + + ' c = 4;'); + + // inline comment + bt( + 'function x(/*int*/ start, /*string*/ foo)', + // -- output -- + 'function x( /*int*/ start, /*string*/ foo)'); + + // javadoc comment + bt( + '/**\n' + + '* foo\n' + + '*/', + // -- output -- + '/**\n' + + ' * foo\n' + + ' */'); + bt( + '{\n' + + '/**\n' + + '* foo\n' + + '*/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' * foo\n' + + ' */\n' + + '}'); + + // starless block comment + bt( + '/**\n' + + 'foo\n' + + '*/'); + bt( + '/**\n' + + 'foo\n' + + '**/'); + bt( + '/**\n' + + 'foo\n' + + 'bar\n' + + '**/'); + bt( + '/**\n' + + 'foo\n' + + '\n' + + 'bar\n' + + '**/'); + bt( + '/**\n' + + 'foo\n' + + ' bar\n' + + '**/'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + '*/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + ' */\n' + + '}'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + '**/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + ' **/\n' + + '}'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + 'bar\n' + + '**/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + ' bar\n' + + ' **/\n' + + '}'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + '\n' + + 'bar\n' + + '**/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + '\n' + + ' bar\n' + + ' **/\n' + + '}'); + bt( + '{\n' + + '/**\n' + + 'foo\n' + + ' bar\n' + + '**/\n' + + '}', + // -- output -- + '{\n' + + ' /**\n' + + ' foo\n' + + ' bar\n' + + ' **/\n' + + '}'); + bt( + '{\n' + + ' /**\n' + + ' foo\n' + + 'bar\n' + + ' **/\n' + + '}'); + bt( + 'var a,b,c=1,d,e,f=2;', + // -- output -- + 'var a, b, c = 1,\n' + + ' d, e, f = 2;'); + bt( + 'var a,b,c=[],d,e,f=2;', + // -- output -- + 'var a, b, c = [],\n' + + ' d, e, f = 2;'); + bt( + 'function() {\n' + + ' var a, b, c, d, e = [],\n' + + ' f;\n' + + '}'); + bt( + 'do/regexp/;\n' + + 'while(1);', + // -- output -- + 'do /regexp/;\n' + + 'while (1);'); + bt( + 'var a = a,\n' + + 'a;\n' + + 'b = {\n' + + 'b\n' + + '}', + // -- output -- + 'var a = a,\n' + + ' a;\n' + + 'b = {\n' + + ' b\n' + + '}'); + bt( + 'var a = a,\n' + + ' /* c */\n' + + ' b;'); + bt( + 'var a = a,\n' + + ' // c\n' + + ' b;'); + + // weird element referencing + bt('foo.("bar");'); + bt( + 'if (a) a()\n' + + 'else b()\n' + + 'newline()'); + bt( + 'if (a) a()\n' + + 'newline()'); + bt('a=typeof(x)', 'a = typeof(x)'); + bt( + 'var a = function() {\n' + + ' return null;\n' + + ' },\n' + + ' b = false;'); + bt( + 'var a = function() {\n' + + ' func1()\n' + + '}'); + bt( + 'var a = function() {\n' + + ' func1()\n' + + '}\n' + + 'var b = function() {\n' + + ' func2()\n' + + '}'); + + // code with and without semicolons + bt( + 'var whatever = require("whatever");\n' + + 'function() {\n' + + ' a = 6;\n' + + '}', + // -- output -- + 'var whatever = require("whatever");\n' + + '\n' + + 'function() {\n' + + ' a = 6;\n' + + '}'); + bt( + 'var whatever = require("whatever")\n' + + 'function() {\n' + + ' a = 6\n' + + '}', + // -- output -- + 'var whatever = require("whatever")\n' + + '\n' + + 'function() {\n' + + ' a = 6\n' + + '}'); + bt( + '{"x":[{"a":1,"b":3},\n' + + '7,8,8,8,8,{"b":99},{"a":11}]}', + // -- output -- + '{\n' + + ' "x": [{\n' + + ' "a": 1,\n' + + ' "b": 3\n' + + ' },\n' + + ' 7, 8, 8, 8, 8, {\n' + + ' "b": 99\n' + + ' }, {\n' + + ' "a": 11\n' + + ' }\n' + + ' ]\n' + + '}'); + bt( + '{"x":[{"a":1,"b":3},7,8,8,8,8,{"b":99},{"a":11}]}', + // -- output -- + '{\n' + + ' "x": [{\n' + + ' "a": 1,\n' + + ' "b": 3\n' + + ' }, 7, 8, 8, 8, 8, {\n' + + ' "b": 99\n' + + ' }, {\n' + + ' "a": 11\n' + + ' }]\n' + + '}'); + bt( + '{"1":{"1a":"1b"},"2"}', + // -- output -- + '{\n' + + ' "1": {\n' + + ' "1a": "1b"\n' + + ' },\n' + + ' "2"\n' + + '}'); + bt( + '{a:{a:b},c}', + // -- output -- + '{\n' + + ' a: {\n' + + ' a: b\n' + + ' },\n' + + ' c\n' + + '}'); + bt( + '{[y[a]];keep_indent;}', + // -- output -- + '{\n' + + ' [y[a]];\n' + + ' keep_indent;\n' + + '}'); + bt( + 'if (x) {y} else { if (x) {y}}', + // -- output -- + 'if (x) {\n' + + ' y\n' + + '} else {\n' + + ' if (x) {\n' + + ' y\n' + + ' }\n' + + '}'); + bt( + 'if (foo) one()\n' + + 'two()\n' + + 'three()'); + bt( + 'if (1 + foo() && bar(baz()) / 2) one()\n' + + 'two()\n' + + 'three()'); + bt( + 'if (1 + foo() && bar(baz()) / 2) one();\n' + + 'two();\n' + + 'three();'); + bt( + 'var a=1,b={bang:2},c=3;', + // -- output -- + 'var a = 1,\n' + + ' b = {\n' + + ' bang: 2\n' + + ' },\n' + + ' c = 3;'); + bt( + 'var a={bing:1},b=2,c=3;', + // -- output -- + 'var a = {\n' + + ' bing: 1\n' + + ' },\n' + + ' b = 2,\n' + + ' c = 3;'); + + + } + + function beautifier_unconverted_tests() + { + sanitytest = test_obj; + + reset_options(); + //============================================================ + opts.indent_size = 1; + opts.indent_char = ' '; + bt('{ one_char() }', "{\n one_char()\n}"); + + bt('var a,b=1,c=2', 'var a, b = 1,\n c = 2'); + + opts.indent_size = 4; + opts.indent_char = ' '; + bt('{ one_char() }', "{\n one_char()\n}"); + + opts.indent_size = 1; + opts.indent_char = "\t"; + bt('{ one_char() }', "{\n\tone_char()\n}"); + bt('x = a ? b : c; x;', 'x = a ? b : c;\nx;'); + + //set to something else than it should change to, but with tabs on, should override + opts.indent_size = 5; + opts.indent_char = ' '; + opts.indent_with_tabs = true; + + bt('{ one_char() }', "{\n\tone_char()\n}"); + bt('x = a ? b : c; x;', 'x = a ? b : c;\nx;'); + + opts.indent_size = 4; + opts.indent_char = ' '; + opts.indent_with_tabs = false; + + reset_options(); + //============================================================ + opts.preserve_newlines = false; + + bt('var\na=dont_preserve_newlines;', 'var a = dont_preserve_newlines;'); + + // make sure the blank line between function definitions stays + // even when preserve_newlines = false + bt('function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}'); + bt('function foo() {\n return 1;\n}\nfunction foo() {\n return 1;\n}', + 'function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}' + ); + bt('function foo() {\n return 1;\n}\n\n\nfunction foo() {\n return 1;\n}', + 'function foo() {\n return 1;\n}\n\nfunction foo() {\n return 1;\n}' + ); + + opts.preserve_newlines = true; + bt('var\na=do_preserve_newlines;', 'var\n a = do_preserve_newlines;'); + bt('if (foo) // comment\n{\n bar();\n}'); + + + reset_options(); + //============================================================ + opts.keep_array_indentation = false; + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f'\n]"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i'\n]"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']", + "a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i'\n]"); + bt('var x = [{}\n]', 'var x = [{}]'); + bt('var x = [{foo:bar}\n]', 'var x = [{\n foo: bar\n}]'); + bt("a = ['something',\n 'completely',\n 'different'];\nif (x);", + "a = ['something',\n 'completely',\n 'different'\n];\nif (x);"); + bt("a = ['a','b','c']", "a = ['a', 'b', 'c']"); + + bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']"); + bt("x = [{'a':0}]", + "x = [{\n 'a': 0\n}]"); + bt('{a([[a1]], {b;});}', + '{\n a([\n [a1]\n ], {\n b;\n });\n}'); + bt("a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\n[\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n].toString();"); + bt("a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n].toString();"); + bt("function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}", + "function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}"); + bt('function foo() {\n return [\n "one",\n "two"\n ];\n}'); + // 4 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}", + "function foo() {\n" + + " return [{\n" + + " one: 'x',\n" + + " two: [{\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }]\n" + + " }];\n" + + "}"); + // 3 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}", + "function foo() {\n" + + " return [{\n" + + " one: 'x',\n" + + " two: [{\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }]\n" + + " }];\n" + + "}"); + + opts.keep_array_indentation = true; + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f']"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']"); + bt("a = ['a', 'b', 'c',\n 'd', 'e', 'f',\n 'g', 'h', 'i']"); + bt('var x = [{}\n]', 'var x = [{}\n]'); + bt('var x = [{foo:bar}\n]', 'var x = [{\n foo: bar\n }\n]'); + bt("a = ['something',\n 'completely',\n 'different'];\nif (x);"); + bt("a = ['a','b','c']", "a = ['a', 'b', 'c']"); + bt("a = ['a', 'b','c']", "a = ['a', 'b', 'c']"); + bt("x = [{'a':0}]", + "x = [{\n 'a': 0\n}]"); + bt('{a([[a1]], {b;});}', + '{\n a([[a1]], {\n b;\n });\n}'); + bt("a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\n [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();"); + bt("a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();", + "a();\na = [\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ].toString();"); + bt("function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}", + "function() {\n Foo([\n ['sdfsdfsd'],\n ['sdfsdfsdf']\n ]);\n}"); + bt('function foo() {\n return [\n "one",\n "two"\n ];\n}'); + // 4 spaces per indent input, processed with 4-spaces per indent + bt( "function foo() {\n" + + " return [\n" + + " {\n" + + " one: 'x',\n" + + " two: [\n" + + " {\n" + + " id: 'a',\n" + + " name: 'apple'\n" + + " }, {\n" + + " id: 'b',\n" + + " name: 'banana'\n" + + " }\n" + + " ]\n" + + " }\n" + + " ];\n" + + "}"); + // 3 spaces per indent input, processed with 4-spaces per indent + // Should be unchanged, but is not - #445 +// bt( "function foo() {\n" + +// " return [\n" + +// " {\n" + +// " one: 'x',\n" + +// " two: [\n" + +// " {\n" + +// " id: 'a',\n" + +// " name: 'apple'\n" + +// " }, {\n" + +// " id: 'b',\n" + +// " name: 'banana'\n" + +// " }\n" + +// " ]\n" + +// " }\n" + +// " ];\n" + +// "}"); + + + reset_options(); + //============================================================ + bt('a = //comment\n /regex/;'); + + bt('if (a)\n{\nb;\n}\nelse\n{\nc;\n}', 'if (a) {\n b;\n} else {\n c;\n}'); + + // tests for brace positioning + beautify_brace_tests('expand'); + beautify_brace_tests('collapse'); + beautify_brace_tests('end-expand'); + beautify_brace_tests('none'); + + test_fragment('roo = {\n /*\n ****\n FOO\n ****\n */\n BAR: 0\n};'); + + bt('"foo""bar""baz"', '"foo"\n"bar"\n"baz"'); + bt("'foo''bar''baz'", "'foo'\n'bar'\n'baz'"); + + + test_fragment("if (zz) {\n // ....\n}\n(function"); + + bt("{\n get foo() {}\n}"); + bt("{\n var a = get\n foo();\n}"); + bt("{\n set foo() {}\n}"); + bt("{\n var a = set\n foo();\n}"); + bt("var x = {\n get function()\n}"); + bt("var x = {\n set function()\n}"); + + // According to my current research get/set have no special meaning outside of an object literal + bt("var x = set\n\na() {}", "var x = set\n\na() {}"); + bt("var x = set\n\nfunction() {}", "var x = set\n\nfunction() {}"); + + bt(''); + bt(' + bt('for () /abc/.test()'); + bt('if (k) /aaa/m.test(v) && l();'); + bt('switch (true) {\n case /swf/i.test(foo):\n bar();\n}'); + bt('createdAt = {\n type: Date,\n default: Date.now\n}'); + bt('switch (createdAt) {\n case a:\n Date,\n default:\n Date.now\n}'); + + reset_options(); + //============================================================ + opts.space_before_conditional = false; + bt('if(a) b()'); + + + reset_options(); + //============================================================ + opts.preserve_newlines = true; + bt('var a = 42; // foo\n\nvar b;'); + bt('var a = 42; // foo\n\n\nvar b;'); + bt("var a = 'foo' +\n 'bar';"); + bt("var a = \"foo\" +\n \"bar\";"); + bt('this.oa = new OAuth(\n' + + ' _requestToken,\n' + + ' _accessToken,\n' + + ' consumer_key\n' + + ');'); + + + reset_options(); + //============================================================ + opts.unescape_strings = false; + bt('"\\\\s"'); // == "\\s" in the js source + bt("'\\\\s'"); // == '\\s' in the js source + bt("'\\\\\\s'"); // == '\\\s' in the js source + bt("'\\s'"); // == '\s' in the js source + bt('"•"'); + bt('"—"'); + bt('"\\x41\\x42\\x43\\x01"', '"\\x41\\x42\\x43\\x01"'); + bt('"\\u2022"', '"\\u2022"'); + bt('a = /\s+/'); + // bt('a = /\\x41/','a = /A/'); + bt('"\\u2022";a = /\s+/;"\\x41\\x42\\x43\\x01".match(/\\x41/);','"\\u2022";\na = /\s+/;\n"\\x41\\x42\\x43\\x01".match(/\\x41/);'); + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"', '"\\x22\\x27", \'\\x22\\x27\', "\\x5c", \'\\x5c\', "\\xff and \\xzz", "unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"'); + + opts.unescape_strings = true; + test_fragment('"\\x20\\x40\\x4a"', '" @J"'); + test_fragment('"\\xff\\x40\\x4a"'); + test_fragment('"\\u0072\\u016B\\u0137\\u012B\\u0074\\u0069\\u0073"', '"\u0072\u016B\u0137\u012B\u0074\u0069\u0073"'); + test_fragment('"Google Chrome est\\u00E1 actualizado."', '"Google Chrome está actualizado."'); + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff"', + '"\\"\\\'", \'\\"\\\'\', "\\\\", \'\\\\\', "\\xff and \\xzz", "unicode \\u0000 \\" \\\' \\\\ ' + unicode_char(0xffff) + '"'); + + // For error case, return the string unchanged + test_fragment('"\\x22\\x27",\'\\x22\\x27\',"\\x5c",\'\\x5c\',"\\xff and \\xzz","unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"', + '"\\"\\\'", \'\\"\\\'\', "\\\\", \'\\\\\', "\\xff and \\xzz", "unicode \\u0000 \\u0022 \\u0027 \\u005c \\uffff \\uzzzz"'); + + reset_options(); + //============================================================ + bt('return function();'); + bt('var a = function();'); + bt('var a = 5 + function();'); + + bt('import foo.*;', 'import foo.*;'); // actionscript's import + test_fragment('function f(a: a, b: b)'); // actionscript + + bt('{\n foo // something\n ,\n bar // something\n baz\n}'); + bt('function a(a) {} function b(b) {} function c(c) {}', 'function a(a) {}\n\nfunction b(b) {}\n\nfunction c(c) {}'); + bt('foo(a, function() {})'); + + bt('foo(a, /regex/)'); + + bt('/* foo */\n"x"'); + + reset_options(); + //============================================================ + opts.break_chained_methods = false; + opts.preserve_newlines = false; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat);\nfoo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo.bar().baz().cucumber(fat)\nfoo.bar().baz().cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this.something = foo.bar().baz().cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this.something.xxx = foo.moo.bar()'); + + opts.break_chained_methods = false; + opts.preserve_newlines = true; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat);\nfoo.bar().baz().cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz().cucumber(fat)\nfoo.bar().baz().cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this\n .something = foo.bar()\n .baz().cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this\n .something\n .xxx = foo.moo\n .bar()'); + + opts.break_chained_methods = true; + opts.preserve_newlines = false; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat);\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo.bar()\n .baz()\n .cucumber(fat)\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this.something = foo.bar()\n .baz()\n .cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this.something.xxx = foo.moo.bar()'); + + opts.break_chained_methods = true; + opts.preserve_newlines = true; + bt('foo\n.bar()\n.baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat); foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat);\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('foo\n.bar()\n.baz().cucumber(fat)\n foo.bar().baz().cucumber(fat)', 'foo\n .bar()\n .baz()\n .cucumber(fat)\nfoo.bar()\n .baz()\n .cucumber(fat)'); + bt('this\n.something = foo.bar()\n.baz().cucumber(fat)', 'this\n .something = foo.bar()\n .baz()\n .cucumber(fat)'); + bt('this.something.xxx = foo.moo.bar()'); + bt('this\n.something\n.xxx = foo.moo\n.bar()', 'this\n .something\n .xxx = foo.moo\n .bar()'); + + reset_options(); + //============================================================ + // Line wrap test intputs + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + wrap_input_1=('foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + wrap_input_2=('{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n.but_this_can\n' + + ' return between_return_and_expression_should_never_wrap.but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + ' if (wraps_can_occur && inside_an_if_block) that_is_\n.okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + ' }' + + '}'); + + opts.preserve_newlines = false; + opts.wrap_line_length = 0; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 70; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap.but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 40; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat &&\n' + + ' "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 41; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 45; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_2, + /* expected */ + '{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + ' return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_.okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + ' }\n'+ + '}'); + + opts.preserve_newlines = true; + opts.wrap_line_length = 0; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 70; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap.but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap.but_this_can\n' + + 'if (wraps_can_occur && inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token + 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap + but_this_can,\n' + + ' propertz: first_token_should_never_wrap + !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" + "but_this_can"\n' + + '}'); + + + opts.wrap_line_length = 40; + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat &&\n' + + ' "sassy") || (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 41; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_1, + /* expected */ + 'foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + 'Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + 'return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + 'if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + 'object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + '}'); + + opts.wrap_line_length = 45; + // NOTE: wrap is only best effort - line continues until next wrap point is found. + //.............---------1---------2---------3---------4---------5---------6---------7 + //.............1234567890123456789012345678901234567890123456789012345678901234567890 + test_fragment(wrap_input_2, + /* expected */ + '{\n' + + ' foo.bar().baz().cucumber((fat && "sassy") ||\n' + + ' (leans && mean));\n' + + ' Test_very_long_variable_name_this_should_never_wrap\n' + + ' .but_this_can\n' + + ' return between_return_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' throw between_throw_and_expression_should_never_wrap\n' + + ' .but_this_can\n' + + ' if (wraps_can_occur &&\n' + + ' inside_an_if_block) that_is_\n' + + ' .okay();\n' + + ' object_literal = {\n' + + ' propertx: first_token +\n' + + ' 12345678.99999E-6,\n' + + ' property: first_token_should_never_wrap +\n' + + ' but_this_can,\n' + + ' propertz: first_token_should_never_wrap +\n' + + ' !but_this_can,\n' + + ' proper: "first_token_should_never_wrap" +\n' + + ' "but_this_can"\n' + + ' }\n'+ + '}'); + + reset_options(); + //============================================================ + opts.preserve_newlines = false; + bt('if (foo) // comment\n bar();'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n /asdf/;'); + bt('this.oa = new OAuth(\n' + + ' _requestToken,\n' + + ' _accessToken,\n' + + ' consumer_key\n' + + ');', + 'this.oa = new OAuth(_requestToken, _accessToken, consumer_key);'); + bt('foo = {\n x: y, // #44\n w: z // #44\n}'); + bt('switch (x) {\n case "a":\n // comment on newline\n break;\n case "b": // comment on same line\n break;\n}'); + bt('this.type =\n this.options =\n // comment\n this.enabled null;', + 'this.type = this.options =\n // comment\n this.enabled null;'); + bt('someObj\n .someFunc1()\n // This comment should not break the indent\n .someFunc2();', + 'someObj.someFunc1()\n // This comment should not break the indent\n .someFunc2();'); + + bt('if (true ||\n!true) return;', 'if (true || !true) return;'); + + // these aren't ready yet. + //bt('if (foo) // comment\n bar() /*i*/ + baz() /*j\n*/ + asdf();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\nelse\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\n else a();'); + bt('if (foo)\nbar();\nelse\ncar();', + 'if (foo) bar();\nelse car();'); + + bt('if (foo) if (bar) if (baz);\na();', + 'if (foo)\n if (bar)\n if (baz);\na();'); + bt('if (foo) if (bar) if (baz) whee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if (foo) a()\nif (bar) if (baz) whee();\na();', + 'if (foo) a()\nif (bar)\n if (baz) whee();\na();'); + bt('if (foo);\nif (bar) if (baz) whee();\na();', + 'if (foo);\nif (bar)\n if (baz) whee();\na();'); + bt('if (options)\n' + + ' for (var p in options)\n' + + ' this[p] = options[p];', + 'if (options)\n'+ + ' for (var p in options) this[p] = options[p];'); + bt('if (options) for (var p in options) this[p] = options[p];', + 'if (options)\n for (var p in options) this[p] = options[p];'); + + bt('if (options) do q(); while (b());', + 'if (options)\n do q(); while (b());'); + bt('if (options) while (b()) q();', + 'if (options)\n while (b()) q();'); + bt('if (options) do while (b()) q(); while (a());', + 'if (options)\n do\n while (b()) q(); while (a());'); + + bt('function f(a, b, c,\nd, e) {}', + 'function f(a, b, c, d, e) {}'); + + bt('function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + bt('function f(a,b) {if(a) b()}\n\n\n\nfunction g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + + // This is not valid syntax, but still want to behave reasonably and not side-effect + bt('(if(a) b())(if(a) b())', + '(\n if (a) b())(\n if (a) b())'); + bt('(if(a) b())\n\n\n(if(a) b())', + '(\n if (a) b())\n(\n if (a) b())'); + + + + bt("if\n(a)\nb();", "if (a) b();"); + bt('var a =\nfoo', 'var a = foo'); + bt('var a = {\n"a":1,\n"b":2}', "var a = {\n \"a\": 1,\n \"b\": 2\n}"); + bt("var a = {\n'a':1,\n'b':2}", "var a = {\n 'a': 1,\n 'b': 2\n}"); + bt('var a = /*i*/ "b";'); + bt('var a = /*i*/\n"b";', 'var a = /*i*/ "b";'); + bt('var a = /*i*/\nb;', 'var a = /*i*/ b;'); + bt('{\n\n\n"x"\n}', '{\n "x"\n}'); + bt('if(a &&\nb\n||\nc\n||d\n&&\ne) e = f', 'if (a && b || c || d && e) e = f'); + bt('if(a &&\n(b\n||\nc\n||d)\n&&\ne) e = f', 'if (a && (b || c || d) && e) e = f'); + test_fragment('\n\n"x"', '"x"'); + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\nb = 2;'); + + opts.preserve_newlines = true; + bt('if (foo) // comment\n bar();'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n (bar());'); + bt('if (foo) // comment\n /asdf/;'); + bt('foo = {\n x: y, // #44\n w: z // #44\n}'); + bt('switch (x) {\n case "a":\n // comment on newline\n break;\n case "b": // comment on same line\n break;\n}'); + bt('this.type =\n this.options =\n // comment\n this.enabled null;'); + bt('someObj\n .someFunc1()\n // This comment should not break the indent\n .someFunc2();'); + + bt('if (true ||\n!true) return;', 'if (true ||\n !true) return;'); + + // these aren't ready yet. + // bt('if (foo) // comment\n bar() /*i*/ + baz() /*j\n*/ + asdf();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\na();', + 'if (foo)\n if (bar)\n if (baz)\n whee();\na();'); + bt('if\n(foo)\nif\n(bar)\nif\n(baz)\nwhee();\nelse\na();', + 'if (foo)\n if (bar)\n if (baz)\n whee();\n else\n a();'); + bt('if (foo)\nbar();\nelse\ncar();', + 'if (foo)\n bar();\nelse\n car();'); + bt('if (foo) bar();\nelse\ncar();', + 'if (foo) bar();\nelse\n car();'); + + bt('if (foo) if (bar) if (baz);\na();', + 'if (foo)\n if (bar)\n if (baz);\na();'); + bt('if (foo) if (bar) if (baz) whee();\na();', + 'if (foo)\n if (bar)\n if (baz) whee();\na();'); + bt('if (foo) a()\nif (bar) if (baz) whee();\na();', + 'if (foo) a()\nif (bar)\n if (baz) whee();\na();'); + bt('if (foo);\nif (bar) if (baz) whee();\na();', + 'if (foo);\nif (bar)\n if (baz) whee();\na();'); + bt('if (options)\n' + + ' for (var p in options)\n' + + ' this[p] = options[p];'); + bt('if (options) for (var p in options) this[p] = options[p];', + 'if (options)\n for (var p in options) this[p] = options[p];'); + + bt('if (options) do q(); while (b());', + 'if (options)\n do q(); while (b());'); + bt('if (options) do; while (b());', + 'if (options)\n do; while (b());'); + bt('if (options) while (b()) q();', + 'if (options)\n while (b()) q();'); + bt('if (options) do while (b()) q(); while (a());', + 'if (options)\n do\n while (b()) q(); while (a());'); + + bt('function f(a, b, c,\nd, e) {}', + 'function f(a, b, c,\n d, e) {}'); + + bt('function f(a,b) {if(a) b()}function g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\nfunction g(a, b) {\n if (!a) b()\n}'); + bt('function f(a,b) {if(a) b()}\n\n\n\nfunction g(a,b) {if(!a) b()}', + 'function f(a, b) {\n if (a) b()\n}\n\n\n\nfunction g(a, b) {\n if (!a) b()\n}'); + // This is not valid syntax, but still want to behave reasonably and not side-effect + bt('(if(a) b())(if(a) b())', + '(\n if (a) b())(\n if (a) b())'); + bt('(if(a) b())\n\n\n(if(a) b())', + '(\n if (a) b())\n\n\n(\n if (a) b())'); + + // space between functions + bt('/*\n * foo\n */\nfunction foo() {}'); + bt('// a nice function\nfunction foo() {}'); + bt('function foo() {}\nfunction foo() {}', + 'function foo() {}\n\nfunction foo() {}' + ); + + bt('[\n function() {}\n]'); + + + + bt("if\n(a)\nb();", "if (a)\n b();"); + bt('var a =\nfoo', 'var a =\n foo'); + bt('var a = {\n"a":1,\n"b":2}', "var a = {\n \"a\": 1,\n \"b\": 2\n}"); + bt("var a = {\n'a':1,\n'b':2}", "var a = {\n 'a': 1,\n 'b': 2\n}"); + bt('var a = /*i*/ "b";'); + bt('var a = /*i*/\n"b";', 'var a = /*i*/\n "b";'); + bt('var a = /*i*/\nb;', 'var a = /*i*/\n b;'); + bt('{\n\n\n"x"\n}', '{\n\n\n "x"\n}'); + bt('if(a &&\nb\n||\nc\n||d\n&&\ne) e = f', 'if (a &&\n b ||\n c ||\n d &&\n e) e = f'); + bt('if(a &&\n(b\n||\nc\n||d)\n&&\ne) e = f', 'if (a &&\n (b ||\n c ||\n d) &&\n e) e = f'); + test_fragment('\n\n"x"', '"x"'); + + // this beavior differs between js and python, defaults to unlimited in js, 10 in python + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;'); + opts.max_preserve_newlines = 8; + bt('a = 1;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nb = 2;', + 'a = 1;\n\n\n\n\n\n\n\nb = 2;'); + + reset_options(); + //============================================================ + + + Urlencoded.run_tests(sanitytest); + } + + beautifier_tests(); + beautifier_unconverted_tests(); +} + +if (typeof exports !== "undefined") { + exports.run_javascript_tests = run_javascript_tests; +} diff --git a/node_modules/js-beautify/js/test/node-beautify-html-perf-tests.js b/node_modules/js-beautify/js/test/node-beautify-html-perf-tests.js new file mode 100644 index 0000000..bd0e849 --- /dev/null +++ b/node_modules/js-beautify/js/test/node-beautify-html-perf-tests.js @@ -0,0 +1,51 @@ +/*global js_beautify: true */ +/*jshint node:true */ +/*jshint unused:false */ + + +var fs = require('fs'), + SanityTest = require('./sanitytest'), + Benchmark = require('benchmark'), + Urlencoded = require('../lib/unpackers/urlencode_unpacker'), + js_beautify = require('../index').js_beautify, + css_beautify = require('../index').css_beautify, + html_beautify = require('../index').html_beautify; + +function node_beautifier_html_tests() { + console.log('Testing performance...'); + var index_html = fs.readFileSync(__dirname + '/../../index.html', 'utf8'); + var data_attr = fs.readFileSync(__dirname + '/../../test/resources/html-with-base64image.html', 'utf8'); + var options = { + wrap_line_length: 80 + }; + + //warm-up + html_beautify(index_html, options); + html_beautify(data_attr, options); + + var suite = new Benchmark.Suite(); + + suite.add("html-beautify (index.html)", function() { + html_beautify(index_html, options); + }) + .add("html-beautify (base64 image)", function() { + html_beautify(data_attr, options); + }) + // add listeners + .on('cycle', function(event) { + console.log(String(event.target)); + }) + .on('error', function(event) { + return 1; + }) + .on('complete', function(event) {}) + .run(); + return 0; +} + + + + +if (require.main === module) { + process.exit(node_beautifier_html_tests()); +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/node-beautify-perf-tests.js b/node_modules/js-beautify/js/test/node-beautify-perf-tests.js new file mode 100644 index 0000000..d62a7a5 --- /dev/null +++ b/node_modules/js-beautify/js/test/node-beautify-perf-tests.js @@ -0,0 +1,50 @@ +/*global js_beautify: true */ +/*jshint node:true */ +/*jshint unused:false */ + +var fs = require('fs'), + SanityTest = require('./sanitytest'), + Benchmark = require('benchmark'), + Urlencoded = require('../lib/unpackers/urlencode_unpacker'), + js_beautify = require('../index').js_beautify, + css_beautify = require('../index').css_beautify, + html_beautify = require('../index').html_beautify; + +function node_beautifier_tests() { + console.log('Testing performance...'); + var data = fs.readFileSync(__dirname + '/../../test/resources/underscore.js', 'utf8'); + var data_min = fs.readFileSync(__dirname + '/../../test/resources/underscore-min.js', 'utf8'); + var options = { + wrap_line_length: 80 + }; + + //warm-up + js_beautify(data, options); + js_beautify(data_min, options); + + var suite = new Benchmark.Suite(); + + suite.add("js-beautify (underscore)", function() { + js_beautify(data, options); + }) + .add("js-beautify (underscore-min)", function() { + js_beautify(data_min, options); + }) + // add listeners + .on('cycle', function(event) { + console.log(String(event.target)); + }) + .on('error', function(event) { + return 1; + }) + .on('complete', function(event) {}) + .run(); + return 0; +} + + + + +if (require.main === module) { + process.exit(node_beautifier_tests()); +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/node-beautify-tests.js b/node_modules/js-beautify/js/test/node-beautify-tests.js new file mode 100755 index 0000000..55c4828 --- /dev/null +++ b/node_modules/js-beautify/js/test/node-beautify-tests.js @@ -0,0 +1,45 @@ +/*jshint node:true */ + +var SanityTest = require('./sanitytest'), + Urlencoded = require('../lib/unpackers/urlencode_unpacker'), + run_javascript_tests = require('./generated/beautify-javascript-tests').run_javascript_tests, + run_css_tests = require('./generated/beautify-css-tests').run_css_tests, + run_html_tests = require('./generated/beautify-html-tests').run_html_tests; + +function test_legacy_names() { + var beautify = require('../index'); + var results = new SanityTest(); + + console.log('First ensure that legacy import names equal the new ones'); + results.expect(beautify.js, beautify.js_beautify); + results.expect(beautify.css, beautify.css_beautify); + results.expect(beautify.html, beautify.html_beautify); + + console.log(results.results_raw()); + return results; +} + +function node_beautifier_tests(name, test_runner) { + console.log('Testing ' + name + ' with node.js CommonJS...'); + var beautify = require('../index'); + + var results = new SanityTest(); + test_runner( + results, + Urlencoded, + beautify.js, + beautify.html, + beautify.css); + + console.log(results.results_raw()); + return results; +} + +if (require.main === module) { + process.exit( + test_legacy_names() + + node_beautifier_tests('js-beautifier', run_javascript_tests).get_exitcode() + + node_beautifier_tests('css-beautifier', run_css_tests).get_exitcode() + + node_beautifier_tests('html-beautifier', run_html_tests).get_exitcode() + ); +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/requirejs-html-beautify.html b/node_modules/js-beautify/js/test/requirejs-html-beautify.html new file mode 100644 index 0000000..a1088c0 --- /dev/null +++ b/node_modules/js-beautify/js/test/requirejs-html-beautify.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + +

    RequireJS test

    + +

    + This example loads the html-beautifier by using a relative path in the require call to the beautify-html.js file. + (also works works with absolute paths) +

    + +
    +require(["../lib/beautify-html"],function(html_beautify){
    +	var input = document.getElementById("input").value;
    +	var output = html_beautify.html_beautify(input);
    +	document.getElementById("output").innerHTML = output;
    +});
    +
    + +

    Input

    + + +

    Output

    + + + + \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/resources/configerror/.jsbeautifyrc b/node_modules/js-beautify/js/test/resources/configerror/.jsbeautifyrc new file mode 100644 index 0000000..be15894 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/configerror/.jsbeautifyrc @@ -0,0 +1,6 @@ +{ + "indent_size": 11, + "indent_char": " " + "indent_level": 0, + "indent_with_tabs": false +} diff --git a/node_modules/js-beautify/js/test/resources/configerror/subDir1/subDir2/empty.txt b/node_modules/js-beautify/js/test/resources/configerror/subDir1/subDir2/empty.txt new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/.editorconfig b/node_modules/js-beautify/js/test/resources/editorconfig/.editorconfig new file mode 100644 index 0000000..3fc2389 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[*.js] +indent_style = space +indent_size = 2 +insert_final_newline = false diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/cr/.editorconfig b/node_modules/js-beautify/js/test/resources/editorconfig/cr/.editorconfig new file mode 100644 index 0000000..1f43b7d --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/cr/.editorconfig @@ -0,0 +1,3 @@ + +[*.js] +end_of_line = cr diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/crlf/.editorconfig b/node_modules/js-beautify/js/test/resources/editorconfig/crlf/.editorconfig new file mode 100644 index 0000000..28160b9 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/crlf/.editorconfig @@ -0,0 +1,3 @@ + +[*.js] +end_of_line = crlf diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/error/.editorconfig b/node_modules/js-beautify/js/test/resources/editorconfig/error/.editorconfig new file mode 100644 index 0000000..031c811 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/error/.editorconfig @@ -0,0 +1 @@ +Random stuff in here to cause parse error diff --git a/node_modules/js-beautify/js/test/resources/editorconfig/example-base.js b/node_modules/js-beautify/js/test/resources/editorconfig/example-base.js new file mode 100644 index 0000000..fbcdbd7 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/editorconfig/example-base.js @@ -0,0 +1,3 @@ +function indentMe() { + "no, me!"; // indent_size 4, will be beautified to 2 with editorconfig +} diff --git a/node_modules/js-beautify/js/test/resources/example1.js b/node_modules/js-beautify/js/test/resources/example1.js new file mode 100644 index 0000000..279108f --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/example1.js @@ -0,0 +1,3 @@ +function indentMe() { +"no, me!"; +} diff --git a/node_modules/js-beautify/js/test/resources/indent11chars/.jsbeautifyrc b/node_modules/js-beautify/js/test/resources/indent11chars/.jsbeautifyrc new file mode 100644 index 0000000..73c8003 --- /dev/null +++ b/node_modules/js-beautify/js/test/resources/indent11chars/.jsbeautifyrc @@ -0,0 +1,6 @@ +{ + "indent_size": 11, + "indent_char": " ", + "indent_level": 0, + "indent_with_tabs": false +} diff --git a/node_modules/js-beautify/js/test/resources/indent11chars/subDir1/subDir2/empty.txt b/node_modules/js-beautify/js/test/resources/indent11chars/subDir1/subDir2/empty.txt new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/js-beautify/js/test/run-tests b/node_modules/js-beautify/js/test/run-tests new file mode 100755 index 0000000..86b14dc --- /dev/null +++ b/node_modules/js-beautify/js/test/run-tests @@ -0,0 +1,17 @@ +#!/usr/bin/spidermonkey-1.7 -s + +//#!/usr/bin/js + +// a little helper for testing from command line +// just run it, it will output the test results + +load('js/lib/beautify.js'); +load('js/test/sanitytest.js') +load('js/test/beautify-tests.js') +load('js/lib/unpackers/urlencode_unpacker.js') + +print(run_beautifier_tests(new SanityTest(), Urlencoded, js_beautify).results_raw()) + + +// for nodejs use this from the command line from the main directory: +// node test/beautify-tests.js diff --git a/node_modules/js-beautify/js/test/sanitytest.js b/node_modules/js-beautify/js/test/sanitytest.js new file mode 100644 index 0000000..445b68e --- /dev/null +++ b/node_modules/js-beautify/js/test/sanitytest.js @@ -0,0 +1,144 @@ +// +// simple testing interface +// written by Einar Lielmanis, einar@jsbeautifier.org +// +// usage: +// +// var t = new SanityTest(function (x) { return x; }, 'my function'); +// t.expect('input', 'output'); +// t.expect('a', 'a'); +// output_somewhere(t.results()); // good for
    , html safe-ish
    +// alert(t.results_raw());        // html unescaped
    +
    +
    +function SanityTest(func, name_of_test) {
    +
    +    var test_func = func || function(x) {
    +        return x;
    +    };
    +
    +    var test_name = name_of_test || '';
    +
    +    var n_failed = 0;
    +    var n_succeeded = 0;
    +
    +    var failures = [];
    +
    +    this.test_function = function(func, name) {
    +        test_func = func;
    +        test_name = name || '';
    +    };
    +
    +    this.get_exitcode = function() {
    +        return n_succeeded === 0 || n_failed !== 0 ? 1 : 0;
    +    };
    +
    +    this.expect = function(parameters, expected_value) {
    +        // multi-parameter calls not supported (I don't need them now).
    +        var result = test_func(parameters);
    +        // proper array checking is a pain. i'll maybe do it later, compare strings representations instead
    +        if ((result === expected_value) || (expected_value instanceof Array && result.join(', ') === expected_value.join(', '))) {
    +            n_succeeded += 1;
    +        } else {
    +            n_failed += 1;
    +            failures.push([test_name, parameters, expected_value, result]);
    +        }
    +    };
    +
    +
    +    this.results_raw = function() {
    +        var results = '';
    +        if (n_failed === 0) {
    +            if (n_succeeded === 0) {
    +                results = 'No tests run.';
    +            } else {
    +                results = 'All ' + n_succeeded + ' tests passed.';
    +            }
    +        } else {
    +            for (var i = 0; i < failures.length; i++) {
    +                var f = failures[i];
    +                if (f[0]) {
    +                    f[0] = f[0] + ' ';
    +                }
    +                results += '==== ' + f[0] + '============================================================\n';
    +                results += '---- input -------\n' + this.prettyprint(f[1]) + '\n';
    +                results += '---- expected ----\n' + this.prettyprint(f[2]) + '\n';
    +                results += '---- output ------\n' + this.prettyprint(f[3]) + '\n';
    +                results += '---- expected-ws ------\n' + this.prettyprint_whitespace(f[2]) + '\n';
    +                results += '---- output-ws ------\n' + this.prettyprint_whitespace(f[3]) + '\n';
    +                results += '================================================================\n\n';
    +            }
    +            results += n_failed + ' tests failed.\n';
    +        }
    +        return results;
    +    };
    +
    +
    +    this.results = function() {
    +        return this.lazy_escape(this.results_raw());
    +    };
    +
    +    this.prettyprint_whitespace = function(something, quote_strings) {
    +        return (this.prettyprint(something, quote_strings)
    +            .replace(/\r\n/g, '\\r\n')
    +            .replace(/\n/g, '\\n\n')
    +            .replace(/\r/g, '\\r\n')
    +            .replace(/ /g, '_')
    +            .replace(/\t/g, '===|'));
    +    };
    +
    +    this.prettyprint = function(something, quote_strings) {
    +        var type = typeof something;
    +        switch (type.toLowerCase()) {
    +            case 'string':
    +                if (quote_strings) {
    +                    return "'" + something.replace("'", "\\'") + "'";
    +                }
    +                return something;
    +            case 'number':
    +                return '' + something;
    +            case 'boolean':
    +                return something ? 'true' : 'false';
    +            case 'undefined':
    +                return 'undefined';
    +            case 'object':
    +                if (something instanceof Array) {
    +                    var x = [];
    +                    var expected_index = 0;
    +                    for (var k in something) {
    +                        if (k === expected_index) {
    +                            x.push(this.prettyprint(something[k], true));
    +                            expected_index += 1;
    +                        } else {
    +                            x.push('\n' + k + ': ' + this.prettyprint(something[k], true));
    +                        }
    +                    }
    +                    return '[' + x.join(', ') + ']';
    +                }
    +                return 'object: ' + something;
    +            default:
    +                return type + ': ' + something;
    +        }
    +    };
    +
    +
    +    this.lazy_escape = function(str) {
    +        return str.replace(//g, '>').replace(/\n/g, '
    '); + }; + + + this.log = function() { + if (window.console) { + if (console.firebug) { + console.log.apply(console, Array.prototype.slice.call(arguments)); + } else { + console.log.call(console, Array.prototype.slice.call(arguments)); + } + } + }; + +} + +if (typeof module !== 'undefined' && module.exports) { + module.exports = SanityTest; +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/test/shell-smoke-test.sh b/node_modules/js-beautify/js/test/shell-smoke-test.sh new file mode 100755 index 0000000..266e9fb --- /dev/null +++ b/node_modules/js-beautify/js/test/shell-smoke-test.sh @@ -0,0 +1,396 @@ +#!/usr/bin/env bash + +REL_SCRIPT_DIR="`dirname \"$0\"`" +SCRIPT_DIR="`( cd \"$REL_SCRIPT_DIR\" && pwd )`" + + +test_cli_common() +{ + echo ---------------------------------------- + echo Testing common cli behavior... + CLI_SCRIPT_NAME=${1:?missing_param}.js + CLI_SCRIPT=$SCRIPT_DIR/../bin/$CLI_SCRIPT_NAME + echo Script: $CLI_SCRIPT + + # should find the minimal help output + $CLI_SCRIPT 2>&1 | grep -q "Must pipe input or define at least one file\." || { + $CLI_SCRIPT 2>&1 + echo "[$CLI_SCRIPT_NAME] Output should be help message." + exit 1 + } + + $CLI_SCRIPT 2> /dev/null && { + echo "[$CLI_SCRIPT_NAME (with no parameters)] Return code should be error." + exit 1 + } + + $CLI_SCRIPT -Z 2> /dev/null && { + echo "[$CLI_SCRIPT_NAME -Z] Return code for invalid parameter should be error." + exit 1 + } + + $CLI_SCRIPT -h > /dev/null || { + echo "[$CLI_SCRIPT_NAME -h] Return code should be success." + exit 1 + } + + $CLI_SCRIPT -v > /dev/null || { + echo "[$CLI_SCRIPT_NAME -v] Return code should be success." + exit 1 + } + + MISSING_FILE="$SCRIPT_DIR/../../../js/bin/missing_file" + MISSING_FILE_MESSAGE="Unable to open path" + $CLI_SCRIPT $MISSING_FILE 2> /dev/null && { + echo "[$CLI_SCRIPT_NAME $MISSING_FILE] Return code should be error." + exit 1 + } + + $CLI_SCRIPT $MISSING_FILE 2>&1 | grep -q "$MISSING_FILE_MESSAGE" || { + echo "[$CLI_SCRIPT_NAME $MISSING_FILE] Stderr should have useful message." + exit 1 + } + + if [ "`$CLI_SCRIPT $MISSING_FILE 2> /dev/null`" != "" ]; then + echo "[$CLI_SCRIPT_NAME $MISSING_FILE] Stdout should have no text." + exit 1 + fi +} + +setup_temp() +{ + mkdir -p target + TEST_TEMP=$PWD/`mktemp -d target/test_temp_XXXX` + echo Created $TEST_TEMP... +} + +cleanup() +{ + rm -rf $TEST_TEMP && echo Removed $TEST_TEMP... + test -z $1 || exit $1 +} + + +test_cli_js_beautify() +{ + echo ---------------------------------------- + echo Testing js-beautify cli behavior... + CLI_SCRIPT=$SCRIPT_DIR/../bin/js-beautify.js + + $CLI_SCRIPT $SCRIPT_DIR/../bin/js-beautify.js > /dev/null || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected succeed." + exit 1 + } + + $CLI_SCRIPT $SCRIPT_DIR/../bin/css-beautify.js > /dev/null || { + echo "js-beautify output for $SCRIPT_DIR/../bin/css-beautify.js was expected succeed." + exit 1 + } + + $CLI_SCRIPT $SCRIPT_DIR/../bin/js-beautify.js | diff $SCRIPT_DIR/../bin/js-beautify.js - || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected to be unchanged." + exit 1 + } + + node $SCRIPT_DIR/../lib/cli.js $SCRIPT_DIR/../bin/js-beautify.js | diff $SCRIPT_DIR/../bin/js-beautify.js - || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected to be unchanged." + exit 1 + } + + cat $SCRIPT_DIR/../bin/js-beautify.js | $CLI_SCRIPT | diff $SCRIPT_DIR/../bin/js-beautify.js - || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected to be unchanged." + exit 1 + } + + cat $SCRIPT_DIR/../bin/js-beautify.js | $CLI_SCRIPT - | diff $SCRIPT_DIR/../bin/js-beautify.js - || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js was expected to be unchanged." + exit 1 + } + + setup_temp + cat $SCRIPT_DIR/../bin/js-beautify.js | $CLI_SCRIPT -o $TEST_TEMP/js-beautify-pipe.js - && diff $TEST_TEMP/js-beautify-pipe.js $SCRIPT_DIR/../bin/js-beautify.js || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js should have been created in $TEST_TEMP/js-beautify-pipe.js." + cleanup 1 + } + + $CLI_SCRIPT -o $TEST_TEMP/js-beautify.js $SCRIPT_DIR/../bin/js-beautify.js && diff $SCRIPT_DIR/../bin/js-beautify.js $TEST_TEMP/js-beautify.js || { + echo "js-beautify output for $SCRIPT_DIR/../bin/js-beautify.js should have been created in $TEST_TEMP/js-beautify.js." + cleanup 1 + } + + # ensure new line settings work + $CLI_SCRIPT -o $TEST_TEMP/js-beautify-n.js -e '\n' $SCRIPT_DIR/../bin/js-beautify.js + $CLI_SCRIPT -o $TEST_TEMP/js-beautify-rn.js -e '\r\n' $TEST_TEMP/js-beautify-n.js + + # ensure eol processed correctly + $CLI_SCRIPT -o $TEST_TEMP/js-beautify-n-dash.js --indent-size 2 --eol '\n' $TEST_TEMP/js-beautify-n.js + $CLI_SCRIPT -o $TEST_TEMP/js-beautify-rn-dash.js --indent-size 2 --eol '\r\n' $TEST_TEMP/js-beautify-n.js + diff -q $TEST_TEMP/js-beautify-n-dash.js $TEST_TEMP/js-beautify-rn-dash.js && { + diff $TEST_TEMP/js-beautify-n-dash.js $TEST_TEMP/js-beautify-rn-dash.js | cat -t -e + echo "js-beautify output for $TEST_TEMP/js-beautify-n-dash.js and $TEST_TEMP/js-beautify-rn-dash.js was expected to be different." + cleanup 1 + } + + diff -q $TEST_TEMP/js-beautify-n.js $TEST_TEMP/js-beautify-rn.js && { + diff $TEST_TEMP/js-beautify-n.js $TEST_TEMP/js-beautify-rn.js | cat -t -e + echo "js-beautify output for $TEST_TEMP/js-beautify-n.js and $TEST_TEMP/js-beautify-rn.js was expected to be different." + cleanup 1 + } + + $CLI_SCRIPT $TEST_TEMP/js-beautify-n.js | diff -q $TEST_TEMP/js-beautify-n.js - || { + echo "js-beautify output for $TEST_TEMP/js-beautify-n.js was expected to be unchanged." + cleanup 1 + } + + $CLI_SCRIPT -e 'auto' $TEST_TEMP/js-beautify-rn.js | diff -q $TEST_TEMP/js-beautify-rn.js - || { + echo "js-beautify output for $TEST_TEMP/js-beautify-rn.js was expected to be unchanged." + cleanup 1 + } + + # EditorConfig related tests + cp -r js/test/resources/editorconfig $TEST_TEMP/ + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/example.js --end-with-newline --indent-size 4 -e '\n' $TEST_TEMP/editorconfig/example-base.js + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/example-ec.js --indent-size 2 -e '\n' $TEST_TEMP/editorconfig/example-base.js + + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/cr/example.js --end-with-newline --indent-size 4 -e '\n' $TEST_TEMP/editorconfig/example-base.js + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/cr/example-ec.js --indent-size 2 -e '\r' $TEST_TEMP/editorconfig/example-base.js + + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/crlf/example.js --end-with-newline --indent-size 4 -e '\n' $TEST_TEMP/editorconfig/example-base.js + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/crlf/example-ec.js --indent-size 2 -e '\r\n' $TEST_TEMP/editorconfig/example-base.js + + $CLI_SCRIPT -o $TEST_TEMP/editorconfig/error/example.js --end-with-newline --indent-size 4 -e '\n' $TEST_TEMP/editorconfig/example-base.js + + pushd $TEST_TEMP/editorconfig + + cd $TEST_TEMP/editorconfig/error + $CLI_SCRIPT --editorconfig $TEST_TEMP/js-beautify-n.js \ + > /dev/null || { + echo "Invalid editorconfig file should not report error (consistent with the EditorConfig)." + cleanup 1 + } + + $CLI_SCRIPT --editorconfig example.js \ + > /dev/null || { + echo "Invalid editorconfig file should not report error (consistent with the EditorConfig)." + cleanup 1 + } + + # TODO: EditorConfig setting should NOT overide cli setting, but that is + # the current by-design behavior, due to code limitations. + + # file input scenario + SCENARIO=a + cd $TEST_TEMP/editorconfig || exit 1 + $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js example.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/crlf || exit 1 + $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js example.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/cr || exit 1 + $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js example.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + # stdin input to stdout scenario + SCENARIO=b + cd $TEST_TEMP/editorconfig || exit 1 + echo "cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js" + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/crlf || exit 1 + echo "cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js" + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/cr || exit 1 + echo "cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js" + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig > example-${SCENARIO}.js \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + + # stdin input to file scenario + SCENARIO=c + cd $TEST_TEMP/editorconfig || exit 1 + echo "cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js" + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js - \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/crlf || exit 1 + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js - \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + cd $TEST_TEMP/editorconfig/cr || exit 1 + cat example.js | $CLI_SCRIPT --end-with-newline --indent-size 6 --editorconfig -o example-${SCENARIO}.js - \ + && diff -q example-${SCENARIO}.js example-ec.js || { + echo "EditorConfig setting should overide cli setting." + diff example-${SCENARIO}.js example-ec.js | cat -t -e + cleanup 1 + } + + popd + # End EditorConfig + + # ensure unchanged files are not overwritten + $CLI_SCRIPT -o $TEST_TEMP/js-beautify.js $SCRIPT_DIR/../bin/js-beautify.js + cp -p $TEST_TEMP/js-beautify.js $TEST_TEMP/js-beautify-old.js + touch $TEST_TEMP/js-beautify.js + sleep 2 + touch $TEST_TEMP/js-beautify-old.js + $CLI_SCRIPT -r $TEST_TEMP/js-beautify.js && test $TEST_TEMP/js-beautify.js -nt $TEST_TEMP/js-beautify-old.js && { + echo "js-beautify should not replace unchanged file $TEST_TEMP/js-beautify.js when using -r" + cleanup 1 + } + + $CLI_SCRIPT -o $TEST_TEMP/js-beautify.js $TEST_TEMP/js-beautify.js && test $TEST_TEMP/js-beautify.js -nt $TEST_TEMP/js-beautify-old.js && { + echo "js-beautify should not replace unchanged file $TEST_TEMP/js-beautify.js when using -o and same file name" + cleanup 1 + } + + $CLI_SCRIPT -o $TEST_TEMP/js-beautify.js $TEST_TEMP/js-beautify-old.js && test $TEST_TEMP/js-beautify.js -nt $TEST_TEMP/js-beautify-old.js && { + echo "js-beautify should not replace unchanged file $TEST_TEMP/js-beautify.js when using -o and different file name" + cleanup 1 + } + + $CLI_SCRIPT $SCRIPT_DIR/../bin/css-beautify.js | diff -q $SCRIPT_DIR/../bin/css-beautify.js - && { + echo "js-beautify output for $SCRIPT_DIR/../bin/css-beautify.js was expected to be different." + cleanup 1 + } + + unset HOME + unset USERPROFILE + $CLI_SCRIPT -o $TEST_TEMP/example1-default.js $SCRIPT_DIR/resources/example1.js || exit 1 + + $CLI_SCRIPT -o $TEST_TEMP/example1-sanity.js $TEST_TEMP/example1-default.js || exit 1 + diff -q $TEST_TEMP/example1-default.js $TEST_TEMP/example1-sanity.js || { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be identical after no change in settings." + cleanup 1 + } + + cd $SCRIPT_DIR/resources/configerror + $CLI_SCRIPT $TEST_TEMP/example1-default.js 2>&1 | grep -q "Error while loading beautifier configuration\." || { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be configration load error message." + cleanup 1 + } + + cd $SCRIPT_DIR/resources/indent11chars + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-default.js - && { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be different based on CWD settings." + cleanup 1 + } + + cd $SCRIPT_DIR/resources/indent11chars/subDir1/subDir2 + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-default.js - && { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be different based on CWD parent folder settings." + cleanup 1 + } + cd $SCRIPT_DIR + + export HOME=$SCRIPT_DIR/resources/indent11chars + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-default.js - && { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be different based on HOME settings." + cleanup 1 + } + + $CLI_SCRIPT -o $TEST_TEMP/example1-indent11chars.js $TEST_TEMP/example1-default.js + + unset HOME + export USERPROFILE=$SCRIPT_DIR/resources/indent11chars + # node -p 'process.env["USERPROFILE"] || process.env["HOME"] || "unset"' + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-indent11chars.js - || { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be identical for same HOME and USERPROFILE settings." + cleanup 1 + } + + $CLI_SCRIPT $TEST_TEMP/example1-default.js | diff -q $TEST_TEMP/example1-default.js - && { + echo "js-beautify output for $TEST_TEMP/example1-default.js was expected to be different based on USERPROFILE settings." + cleanup 1 + } + + #meta-parameter brace_style + $CLI_SCRIPT -b 'invalid' $TEST_TEMP/example1-default.js > /dev/null && { + echo "[$CLI_SCRIPT_NAME -b 'invalid' $TEST_TEMP/example1-default.js] Return code for invalid brace_style meta-parameter should be error." + cleanup 1 + } + $CLI_SCRIPT -b 'expand,preserve-inline,invalid' $TEST_TEMP/example1-default.js > /dev/null && { + echo "[$CLI_SCRIPT_NAME -b 'expand,preserve-inline,invalid' $TEST_TEMP/example1-default.js] Return code for invalid brace_style meta-parameter should be error." + cleanup 1 + } + $CLI_SCRIPT -b 'preserve-inline' $TEST_TEMP/example1-default.js > /dev/null || { + echo "[$CLI_SCRIPT_NAME -b 'preserve-inline' $TEST_TEMP/example1-default.js] Return code for only one part of valid brace_style meta-parameter should be success (uses default where it can)." + cleanup 1 + } + + cleanup +} + +test_smoke_js_beautify() +{ + echo ---------------------------------------- + echo Testing js-beautify functionality... + node $SCRIPT_DIR/node-beautify-tests.js || exit 1 + node $SCRIPT_DIR/amd-beautify-tests.js || exit 1 +} + + +test_performance_js_beautify() +{ + echo ---------------------------------------- + echo Testing js-beautify performance... + node $SCRIPT_DIR/node-beautify-perf-tests.js || exit 1 + echo ---------------------------------------- +} + +test_performance_html_beautify() +{ + echo ---------------------------------------- + echo Testing html-beautify performance... + node $SCRIPT_DIR/node-beautify-html-perf-tests.js || exit 1 + echo ---------------------------------------- +} + +test_cli_common css-beautify +test_cli_common html-beautify +test_cli_common js-beautify + +test_cli_js_beautify +test_smoke_js_beautify +test_performance_js_beautify +test_performance_html_beautify + +echo ---------------------------------------- +echo $0 - PASSED. +echo ---------------------------------------- diff --git a/node_modules/js-beautify/node_modules/.bin/nopt b/node_modules/js-beautify/node_modules/.bin/nopt new file mode 120000 index 0000000..6b6566e --- /dev/null +++ b/node_modules/js-beautify/node_modules/.bin/nopt @@ -0,0 +1 @@ +../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/js-beautify/node_modules/nopt/.npmignore b/node_modules/js-beautify/node_modules/nopt/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/js-beautify/node_modules/nopt/.travis.yml b/node_modules/js-beautify/node_modules/nopt/.travis.yml new file mode 100644 index 0000000..99f2bbf --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/node_modules/js-beautify/node_modules/nopt/LICENSE b/node_modules/js-beautify/node_modules/nopt/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/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/node_modules/js-beautify/node_modules/nopt/README.md b/node_modules/js-beautify/node_modules/nopt/README.md new file mode 100644 index 0000000..f21a4b3 --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/README.md @@ -0,0 +1,211 @@ +If you want to write an option parser, and have it be good, there are +two ways to do it. The Right Way, and the Wrong Way. + +The Wrong Way is to sit down and write an option parser. We've all done +that. + +The Right Way is to write some complex configurable program with so many +options that you hit the limit of your frustration just trying to +manage them all, and defer it with duct-tape solutions until you see +exactly to the core of the problem, and finally snap and write an +awesome option parser. + +If you want to write an option parser, don't write an option parser. +Write a package manager, or a source control system, or a service +restarter, or an operating system. You probably won't end up with a +good one of those, but if you don't give up, and you are relentless and +diligent enough in your procrastination, you may just end up with a very +nice option parser. + +## USAGE + + // my-program.js + var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many1" : [String, Array] + , "many2" : [path] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + console.log(parsed) + +This would give you support for any of the following: + +```bash +$ node my-program.js --foo "blerp" --no-flag +{ "foo" : "blerp", "flag" : false } + +$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag +{ bar: 7, foo: "Mr. Hand", flag: true } + +$ node my-program.js --foo "blerp" -f -----p +{ foo: "blerp", flag: true, pick: true } + +$ node my-program.js -fp --foofoo +{ foo: "Mr. Foo", flag: true, pick: true } + +$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. +{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } + +$ node my-program.js --blatzk -fp # unknown opts are ok. +{ blatzk: true, flag: true, pick: true } + +$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value +{ blatzk: 1000, flag: true, pick: true } + +$ node my-program.js --no-blatzk -fp # unless they start with "no-" +{ blatzk: false, flag: true, pick: true } + +$ node my-program.js --baz b/a/z # known paths are resolved. +{ baz: "/Users/isaacs/b/a/z" } + +# if Array is one of the types, then it can take many +# values, and will always be an array. The other types provided +# specify what types are allowed in the list. + +$ node my-program.js --many1 5 --many1 null --many1 foo +{ many1: ["5", "null", "foo"] } + +$ node my-program.js --many2 foo --many2 bar +{ many2: ["/path/to/foo", "path/to/bar"] } +``` + +Read the tests at the bottom of `lib/nopt.js` for more examples of +what this puppy can do. + +## Types + +The following types are supported, and defined on `nopt.typeDefs` + +* String: A normal string. No parsing is done. +* path: A file system path. Gets resolved against cwd if not absolute. +* url: A url. If it doesn't parse, it isn't accepted. +* Number: Must be numeric. +* Date: Must parse as a date. If it does, and `Date` is one of the options, + then it will return a Date object, not a string. +* Boolean: Must be either `true` or `false`. If an option is a boolean, + then it does not need a value, and its presence will imply `true` as + the value. To negate boolean flags, do `--no-whatever` or `--whatever + false` +* NaN: Means that the option is strictly not allowed. Any value will + fail. +* Stream: An object matching the "Stream" class in node. Valuable + for use when validating programmatically. (npm uses this to let you + supply any WriteStream on the `outfd` and `logfd` config options.) +* Array: If `Array` is specified as one of the types, then the value + will be parsed as a list of options. This means that multiple values + can be specified, and that the value will always be an array. + +If a type is an array of values not on this list, then those are +considered valid values. For instance, in the example above, the +`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, +and any other value will be rejected. + +When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be +interpreted as their JavaScript equivalents. + +You can also mix types and values, or multiple types, in a list. For +instance `{ blah: [Number, null] }` would allow a value to be set to +either a Number or null. When types are ordered, this implies a +preference, and the first type that can be used to properly interpret +the value will be used. + +To define a new type, add it to `nopt.typeDefs`. Each item in that +hash is an object with a `type` member and a `validate` method. The +`type` member is an object that matches what goes in the type list. The +`validate` method is a function that gets called with `validate(data, +key, val)`. Validate methods should assign `data[key]` to the valid +value of `val` if it can be handled properly, or return boolean +`false` if it cannot. + +You can also call `nopt.clean(data, types, typeDefs)` to clean up a +config object and remove its invalid properties. + +## Error Handling + +By default, nopt outputs a warning to standard error when invalid values for +known options are found. You can change this behavior by assigning a method +to `nopt.invalidHandler`. This method will be called with +the offending `nopt.invalidHandler(key, val, types)`. + +If no `nopt.invalidHandler` is assigned, then it will console.error +its whining. If it is assigned to boolean `false` then the warning is +suppressed. + +## Abbreviations + +Yes, they are supported. If you define options like this: + +```javascript +{ "foolhardyelephants" : Boolean +, "pileofmonkeys" : Boolean } +``` + +Then this will work: + +```bash +node program.js --foolhar --pil +node program.js --no-f --pileofmon +# etc. +``` + +## Shorthands + +Shorthands are a hash of shorter option names to a snippet of args that +they expand to. + +If multiple one-character shorthands are all combined, and the +combination does not unambiguously match any other option or shorthand, +then they will be broken up into their constituent parts. For example: + +```json +{ "s" : ["--loglevel", "silent"] +, "g" : "--global" +, "f" : "--force" +, "p" : "--parseable" +, "l" : "--long" +} +``` + +```bash +npm ls -sgflp +# just like doing this: +npm ls --loglevel silent --global --force --long --parseable +``` + +## The Rest of the args + +The config object returned by nopt is given a special member called +`argv`, which is an object with the following fields: + +* `remain`: The remaining args after all the parsing has occurred. +* `original`: The args as they originally appeared. +* `cooked`: The args after flags and shorthands are expanded. + +## Slicing + +Node programs are called with more or less the exact argv as it appears +in C land, after the v8 and node-specific options have been plucked off. +As such, `argv[0]` is always `node` and `argv[1]` is always the +JavaScript program being run. + +That's usually not very useful to you. So they're sliced off by +default. If you want them, then you can pass in `0` as the last +argument, or any other number that you'd like to slice off the start of +the list. diff --git a/node_modules/js-beautify/node_modules/nopt/bin/nopt.js b/node_modules/js-beautify/node_modules/nopt/bin/nopt.js new file mode 100755 index 0000000..3232d4c --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/bin/nopt.js @@ -0,0 +1,54 @@ +#!/usr/bin/env node +var nopt = require("../lib/nopt") + , path = require("path") + , types = { num: Number + , bool: Boolean + , help: Boolean + , list: Array + , "num-list": [Number, Array] + , "str-list": [String, Array] + , "bool-list": [Boolean, Array] + , str: String + , clear: Boolean + , config: Boolean + , length: Number + , file: path + } + , shorthands = { s: [ "--str", "astring" ] + , b: [ "--bool" ] + , nb: [ "--no-bool" ] + , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] + , "?": ["--help"] + , h: ["--help"] + , H: ["--help"] + , n: [ "--num", "125" ] + , c: ["--config"] + , l: ["--length"] + , f: ["--file"] + } + , parsed = nopt( types + , shorthands + , process.argv + , 2 ) + +console.log("parsed", parsed) + +if (parsed.help) { + console.log("") + console.log("nopt cli tester") + console.log("") + console.log("types") + console.log(Object.keys(types).map(function M (t) { + var type = types[t] + if (Array.isArray(type)) { + return [t, type.map(function (type) { return type.name })] + } + return [t, type && type.name] + }).reduce(function (s, i) { + s[i[0]] = i[1] + return s + }, {})) + console.log("") + console.log("shorthands") + console.log(shorthands) +} diff --git a/node_modules/js-beautify/node_modules/nopt/examples/my-program.js b/node_modules/js-beautify/node_modules/nopt/examples/my-program.js new file mode 100755 index 0000000..142447e --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/examples/my-program.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +//process.env.DEBUG_NOPT = 1 + +// my-program.js +var nopt = require("../lib/nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag", "true"] + , "g" : ["--flag"] + , "s" : "--flag" + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + +console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/node_modules/js-beautify/node_modules/nopt/lib/nopt.js b/node_modules/js-beautify/node_modules/nopt/lib/nopt.js new file mode 100644 index 0000000..97707e7 --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/lib/nopt.js @@ -0,0 +1,415 @@ +// info about each config option. + +var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG + ? function () { console.error.apply(console, arguments) } + : function () {} + +var url = require("url") + , path = require("path") + , Stream = require("stream").Stream + , abbrev = require("abbrev") + +module.exports = exports = nopt +exports.clean = clean + +exports.typeDefs = + { String : { type: String, validate: validateString } + , Boolean : { type: Boolean, validate: validateBoolean } + , url : { type: url, validate: validateUrl } + , Number : { type: Number, validate: validateNumber } + , path : { type: path, validate: validatePath } + , Stream : { type: Stream, validate: validateStream } + , Date : { type: Date, validate: validateDate } + } + +function nopt (types, shorthands, args, slice) { + args = args || process.argv + types = types || {} + shorthands = shorthands || {} + if (typeof slice !== "number") slice = 2 + + debug(types, shorthands, args, slice) + + args = args.slice(slice) + var data = {} + , key + , remain = [] + , cooked = args + , original = args.slice(0) + + parse(args, data, remain, types, shorthands) + // now data is full + clean(data, types, exports.typeDefs) + data.argv = {remain:remain,cooked:cooked,original:original} + Object.defineProperty(data.argv, 'toString', { value: function () { + return this.original.map(JSON.stringify).join(" ") + }, enumerable: false }) + return data +} + +function clean (data, types, typeDefs) { + typeDefs = typeDefs || exports.typeDefs + var remove = {} + , typeDefault = [false, true, null, String, Array] + + Object.keys(data).forEach(function (k) { + if (k === "argv") return + var val = data[k] + , isArray = Array.isArray(val) + , type = types[k] + if (!isArray) val = [val] + if (!type) type = typeDefault + if (type === Array) type = typeDefault.concat(Array) + if (!Array.isArray(type)) type = [type] + + debug("val=%j", val) + debug("types=", type) + val = val.map(function (val) { + // if it's an unknown value, then parse false/true/null/numbers/dates + if (typeof val === "string") { + debug("string %j", val) + val = val.trim() + if ((val === "null" && ~type.indexOf(null)) + || (val === "true" && + (~type.indexOf(true) || ~type.indexOf(Boolean))) + || (val === "false" && + (~type.indexOf(false) || ~type.indexOf(Boolean)))) { + val = JSON.parse(val) + debug("jsonable %j", val) + } else if (~type.indexOf(Number) && !isNaN(val)) { + debug("convert to number", val) + val = +val + } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { + debug("convert to date", val) + val = new Date(val) + } + } + + if (!types.hasOwnProperty(k)) { + return val + } + + // allow `--no-blah` to set 'blah' to null if null is allowed + if (val === false && ~type.indexOf(null) && + !(~type.indexOf(false) || ~type.indexOf(Boolean))) { + val = null + } + + var d = {} + d[k] = val + debug("prevalidated val", d, val, types[k]) + if (!validate(d, k, val, types[k], typeDefs)) { + if (exports.invalidHandler) { + exports.invalidHandler(k, val, types[k], data) + } else if (exports.invalidHandler !== false) { + debug("invalid: "+k+"="+val, types[k]) + } + return remove + } + debug("validated val", d, val, types[k]) + return d[k] + }).filter(function (val) { return val !== remove }) + + if (!val.length) delete data[k] + else if (isArray) { + debug(isArray, data[k], val) + data[k] = val + } else data[k] = val[0] + + debug("k=%s val=%j", k, val, data[k]) + }) +} + +function validateString (data, k, val) { + data[k] = String(val) +} + +function validatePath (data, k, val) { + if (val === true) return false + if (val === null) return true + + val = String(val) + var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// + if (val.match(homePattern) && process.env.HOME) { + val = path.resolve(process.env.HOME, val.substr(2)) + } + data[k] = path.resolve(String(val)) + return true +} + +function validateNumber (data, k, val) { + debug("validate Number %j %j %j", k, val, isNaN(val)) + if (isNaN(val)) return false + data[k] = +val +} + +function validateDate (data, k, val) { + debug("validate Date %j %j %j", k, val, Date.parse(val)) + var s = Date.parse(val) + if (isNaN(s)) return false + data[k] = new Date(val) +} + +function validateBoolean (data, k, val) { + if (val instanceof Boolean) val = val.valueOf() + else if (typeof val === "string") { + if (!isNaN(val)) val = !!(+val) + else if (val === "null" || val === "false") val = false + else val = true + } else val = !!val + data[k] = val +} + +function validateUrl (data, k, val) { + val = url.parse(String(val)) + if (!val.host) return false + data[k] = val.href +} + +function validateStream (data, k, val) { + if (!(val instanceof Stream)) return false + data[k] = val +} + +function validate (data, k, val, type, typeDefs) { + // arrays are lists of types. + if (Array.isArray(type)) { + for (var i = 0, l = type.length; i < l; i ++) { + if (type[i] === Array) continue + if (validate(data, k, val, type[i], typeDefs)) return true + } + delete data[k] + return false + } + + // an array of anything? + if (type === Array) return true + + // NaN is poisonous. Means that something is not allowed. + if (type !== type) { + debug("Poison NaN", k, val, type) + delete data[k] + return false + } + + // explicit list of values + if (val === type) { + debug("Explicitly allowed %j", val) + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + return true + } + + // now go through the list of typeDefs, validate against each one. + var ok = false + , types = Object.keys(typeDefs) + for (var i = 0, l = types.length; i < l; i ++) { + debug("test type %j %j %j", k, val, types[i]) + var t = typeDefs[types[i]] + if (t && + ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { + var d = {} + ok = false !== t.validate(d, k, val) + val = d[k] + if (ok) { + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + break + } + } + } + debug("OK? %j (%j %j %j)", ok, k, val, types[i]) + + if (!ok) delete data[k] + return ok +} + +function parse (args, data, remain, types, shorthands) { + debug("parse", args, data, remain) + + var key = null + , abbrevs = abbrev(Object.keys(types)) + , shortAbbr = abbrev(Object.keys(shorthands)) + + for (var i = 0; i < args.length; i ++) { + var arg = args[i] + debug("arg", arg) + + if (arg.match(/^-{2,}$/)) { + // done with keys. + // the rest are args. + remain.push.apply(remain, args.slice(i + 1)) + args[i] = "--" + break + } + var hadEq = false + if (arg.charAt(0) === "-" && arg.length > 1) { + if (arg.indexOf("=") !== -1) { + hadEq = true + var v = arg.split("=") + arg = v.shift() + v = v.join("=") + args.splice.apply(args, [i, 1].concat([arg, v])) + } + + // see if it's a shorthand + // if so, splice and back up to re-parse it. + var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) + debug("arg=%j shRes=%j", arg, shRes) + if (shRes) { + debug(arg, shRes) + args.splice.apply(args, [i, 1].concat(shRes)) + if (arg !== shRes[0]) { + i -- + continue + } + } + arg = arg.replace(/^-+/, "") + var no = null + while (arg.toLowerCase().indexOf("no-") === 0) { + no = !no + arg = arg.substr(3) + } + + if (abbrevs[arg]) arg = abbrevs[arg] + + var isArray = types[arg] === Array || + Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 + + // allow unknown things to be arrays if specified multiple times. + if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { + if (!Array.isArray(data[arg])) + data[arg] = [data[arg]] + isArray = true + } + + var val + , la = args[i + 1] + + var isBool = typeof no === 'boolean' || + types[arg] === Boolean || + Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || + (typeof types[arg] === 'undefined' && !hadEq) || + (la === "false" && + (types[arg] === null || + Array.isArray(types[arg]) && ~types[arg].indexOf(null))) + + if (isBool) { + // just set and move along + val = !no + // however, also support --bool true or --bool false + if (la === "true" || la === "false") { + val = JSON.parse(la) + la = null + if (no) val = !val + i ++ + } + + // also support "foo":[Boolean, "bar"] and "--foo bar" + if (Array.isArray(types[arg]) && la) { + if (~types[arg].indexOf(la)) { + // an explicit type + val = la + i ++ + } else if ( la === "null" && ~types[arg].indexOf(null) ) { + // null allowed + val = null + i ++ + } else if ( !la.match(/^-{2,}[^-]/) && + !isNaN(la) && + ~types[arg].indexOf(Number) ) { + // number + val = +la + i ++ + } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { + // string + val = la + i ++ + } + } + + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + continue + } + + if (types[arg] === String && la === undefined) + la = "" + + if (la && la.match(/^-{2,}$/)) { + la = undefined + i -- + } + + val = la === undefined ? true : la + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + i ++ + continue + } + remain.push(arg) + } +} + +function resolveShort (arg, shorthands, shortAbbr, abbrevs) { + // handle single-char shorthands glommed together, like + // npm ls -glp, but only if there is one dash, and only if + // all of the chars are single-char shorthands, and it's + // not a match to some other abbrev. + arg = arg.replace(/^-+/, '') + + // if it's an exact known option, then don't go any further + if (abbrevs[arg] === arg) + return null + + // if it's an exact known shortopt, same deal + if (shorthands[arg]) { + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] + } + + // first check to see if this arg is a set of single-char shorthands + var singles = shorthands.___singles + if (!singles) { + singles = Object.keys(shorthands).filter(function (s) { + return s.length === 1 + }).reduce(function (l,r) { + l[r] = true + return l + }, {}) + shorthands.___singles = singles + debug('shorthand singles', singles) + } + + var chrs = arg.split("").filter(function (c) { + return singles[c] + }) + + if (chrs.join("") === arg) return chrs.map(function (c) { + return shorthands[c] + }).reduce(function (l, r) { + return l.concat(r) + }, []) + + + // if it's an arg abbrev, and not a literal shorthand, then prefer the arg + if (abbrevs[arg] && !shorthands[arg]) + return null + + // if it's an abbr for a shorthand, then use that + if (shortAbbr[arg]) + arg = shortAbbr[arg] + + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] +} diff --git a/node_modules/js-beautify/node_modules/nopt/package.json b/node_modules/js-beautify/node_modules/nopt/package.json new file mode 100644 index 0000000..3eff3af --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/package.json @@ -0,0 +1,57 @@ +{ + "_from": "nopt@~3.0.1", + "_id": "nopt@3.0.6", + "_inBundle": false, + "_integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "_location": "/js-beautify/nopt", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "nopt@~3.0.1", + "name": "nopt", + "escapedName": "nopt", + "rawSpec": "~3.0.1", + "saveSpec": null, + "fetchSpec": "~3.0.1" + }, + "_requiredBy": [ + "/js-beautify" + ], + "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "_spec": "nopt@~3.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/js-beautify", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bin": { + "nopt": "./bin/nopt.js" + }, + "bugs": { + "url": "https://github.com/npm/nopt/issues" + }, + "bundleDependencies": false, + "dependencies": { + "abbrev": "1" + }, + "deprecated": false, + "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", + "devDependencies": { + "tap": "^1.2.0" + }, + "homepage": "https://github.com/npm/nopt#readme", + "license": "ISC", + "main": "lib/nopt.js", + "name": "nopt", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/nopt.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "3.0.6" +} diff --git a/node_modules/js-beautify/node_modules/nopt/test/basic.js b/node_modules/js-beautify/node_modules/nopt/test/basic.js new file mode 100644 index 0000000..d399de9 --- /dev/null +++ b/node_modules/js-beautify/node_modules/nopt/test/basic.js @@ -0,0 +1,273 @@ +var nopt = require("../") + , test = require('tap').test + + +test("passing a string results in a string", function (t) { + var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0) + t.same(parsed.key, "myvalue") + t.end() +}) + +// https://github.com/npm/nopt/issues/31 +test("Empty String results in empty string, not true", function (t) { + var parsed = nopt({ empty: String }, {}, ["--empty"], 0) + t.same(parsed.empty, "") + t.end() +}) + +test("~ path is resolved to $HOME", function (t) { + var path = require("path") + if (!process.env.HOME) process.env.HOME = "/tmp" + var parsed = nopt({key: path}, {}, ["--key=~/val"], 0) + t.same(parsed.key, path.resolve(process.env.HOME, "val")) + t.end() +}) + +// https://github.com/npm/nopt/issues/24 +test("Unknown options are not parsed as numbers", function (t) { + var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0) + t.equal(parsed['leave-as-is'], '1.20') + t.equal(parsed['parse-me'], 1.2) + t.end() +}); + +// https://github.com/npm/nopt/issues/48 +test("Check types based on name of type", function (t) { + var parsed = nopt({"parse-me": {name: "Number"}}, null, ['--parse-me=1.20'], 0) + t.equal(parsed['parse-me'], 1.2) + t.end() +}) + + +test("Missing types are not parsed", function (t) { + var parsed = nopt({"parse-me": {}}, null, ['--parse-me=1.20'], 0) + //should only contain argv + t.equal(Object.keys(parsed).length, 1) + t.end() +}) + +test("Types passed without a name are not parsed", function (t) { + var parsed = nopt({"parse-me": {}}, {}, ['--parse-me=1.20'], 0) + //should only contain argv + t.equal(Object.keys(parsed).length, 1) + t.end() +}) + +test("other tests", function (t) { + + var util = require("util") + , Stream = require("stream") + , path = require("path") + , url = require("url") + + , shorthands = + { s : ["--loglevel", "silent"] + , d : ["--loglevel", "info"] + , dd : ["--loglevel", "verbose"] + , ddd : ["--loglevel", "silly"] + , noreg : ["--no-registry"] + , reg : ["--registry"] + , "no-reg" : ["--no-registry"] + , silent : ["--loglevel", "silent"] + , verbose : ["--loglevel", "verbose"] + , h : ["--usage"] + , H : ["--usage"] + , "?" : ["--usage"] + , help : ["--usage"] + , v : ["--version"] + , f : ["--force"] + , desc : ["--description"] + , "no-desc" : ["--no-description"] + , "local" : ["--no-global"] + , l : ["--long"] + , p : ["--parseable"] + , porcelain : ["--parseable"] + , g : ["--global"] + } + + , types = + { aoa: Array + , nullstream: [null, Stream] + , date: Date + , str: String + , browser : String + , cache : path + , color : ["always", Boolean] + , depth : Number + , description : Boolean + , dev : Boolean + , editor : path + , force : Boolean + , global : Boolean + , globalconfig : path + , group : [String, Number] + , gzipbin : String + , logfd : [Number, Stream] + , loglevel : ["silent","win","error","warn","info","verbose","silly"] + , long : Boolean + , "node-version" : [false, String] + , npaturl : url + , npat : Boolean + , "onload-script" : [false, String] + , outfd : [Number, Stream] + , parseable : Boolean + , pre: Boolean + , prefix: path + , proxy : url + , "rebuild-bundle" : Boolean + , registry : url + , searchopts : String + , searchexclude: [null, String] + , shell : path + , t: [Array, String] + , tag : String + , tar : String + , tmp : path + , "unsafe-perm" : Boolean + , usage : Boolean + , user : String + , username : String + , userconfig : path + , version : Boolean + , viewer: path + , _exit : Boolean + , path: path + } + + ; [["-v", {version:true}, []] + ,["---v", {version:true}, []] + ,["ls -s --no-reg connect -d", + {loglevel:"info",registry:null},["ls","connect"]] + ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] + ,["ls --registry blargle", {}, ["ls"]] + ,["--no-registry", {registry:null}, []] + ,["--no-color true", {color:false}, []] + ,["--no-color false", {color:true}, []] + ,["--no-color", {color:false}, []] + ,["--color false", {color:false}, []] + ,["--color --logfd 7", {logfd:7,color:true}, []] + ,["--color=true", {color:true}, []] + ,["--logfd=10", {logfd:10}, []] + ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] + ,["--tmp=tmp -tar=gtar", + {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] + ,["--logfd x", {}, []] + ,["a -true -- -no-false", {true:true},["a","-no-false"]] + ,["a -no-false", {false:false},["a"]] + ,["a -no-no-true", {true:true}, ["a"]] + ,["a -no-no-no-false", {false:false}, ["a"]] + ,["---NO-no-No-no-no-no-nO-no-no"+ + "-No-no-no-no-no-no-no-no-no"+ + "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ + "-no-body-can-do-the-boogaloo-like-I-do" + ,{"body-can-do-the-boogaloo-like-I-do":false}, []] + ,["we are -no-strangers-to-love "+ + "--you-know=the-rules --and=so-do-i "+ + "---im-thinking-of=a-full-commitment "+ + "--no-you-would-get-this-from-any-other-guy "+ + "--no-gonna-give-you-up "+ + "-no-gonna-let-you-down=true "+ + "--no-no-gonna-run-around false "+ + "--desert-you=false "+ + "--make-you-cry false "+ + "--no-tell-a-lie "+ + "--no-no-and-hurt-you false" + ,{"strangers-to-love":false + ,"you-know":"the-rules" + ,"and":"so-do-i" + ,"you-would-get-this-from-any-other-guy":false + ,"gonna-give-you-up":false + ,"gonna-let-you-down":false + ,"gonna-run-around":false + ,"desert-you":false + ,"make-you-cry":false + ,"tell-a-lie":false + ,"and-hurt-you":false + },["we", "are"]] + ,["-t one -t two -t three" + ,{t: ["one", "two", "three"]} + ,[]] + ,["-t one -t null -t three four five null" + ,{t: ["one", "null", "three"]} + ,["four", "five", "null"]] + ,["-t foo" + ,{t:["foo"]} + ,[]] + ,["--no-t" + ,{t:["false"]} + ,[]] + ,["-no-no-t" + ,{t:["true"]} + ,[]] + ,["-aoa one -aoa null -aoa 100" + ,{aoa:["one", null, '100']} + ,[]] + ,["-str 100" + ,{str:"100"} + ,[]] + ,["--color always" + ,{color:"always"} + ,[]] + ,["--no-nullstream" + ,{nullstream:null} + ,[]] + ,["--nullstream false" + ,{nullstream:null} + ,[]] + ,["--notadate=2011-01-25" + ,{notadate: "2011-01-25"} + ,[]] + ,["--date 2011-01-25" + ,{date: new Date("2011-01-25")} + ,[]] + ,["-cl 1" + ,{config: true, length: 1} + ,[] + ,{config: Boolean, length: Number, clear: Boolean} + ,{c: "--config", l: "--length"}] + ,["--acount bla" + ,{"acount":true} + ,["bla"] + ,{account: Boolean, credentials: Boolean, options: String} + ,{a:"--account", c:"--credentials",o:"--options"}] + ,["--clear" + ,{clear:true} + ,[] + ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean} + ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}] + ,["--file -" + ,{"file":"-"} + ,[] + ,{file:String} + ,{}] + ,["--file -" + ,{"file":true} + ,["-"] + ,{file:Boolean} + ,{}] + ,["--path" + ,{"path":null} + ,[]] + ,["--path ." + ,{"path":process.cwd()} + ,[]] + ].forEach(function (test) { + var argv = test[0].split(/\s+/) + , opts = test[1] + , rem = test[2] + , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0) + , parsed = actual.argv + delete actual.argv + for (var i in opts) { + var e = JSON.stringify(opts[i]) + , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) + if (e && typeof e === "object") { + t.deepEqual(e, a) + } else { + t.equal(e, a) + } + } + t.deepEqual(rem, parsed.remain) + }) + t.end() +}) diff --git a/node_modules/js-beautify/package.json b/node_modules/js-beautify/package.json new file mode 100644 index 0000000..23459e6 --- /dev/null +++ b/node_modules/js-beautify/package.json @@ -0,0 +1,113 @@ +{ + "_from": "js-beautify@^1.7.4", + "_id": "js-beautify@1.7.5", + "_inBundle": false, + "_integrity": "sha512-9OhfAqGOrD7hoQBLJMTA+BKuKmoEtTJXzZ7WDF/9gvjtey1koVLuZqIY6c51aPDjbNdNtIXAkiWKVhziawE9Og==", + "_location": "/js-beautify", + "_phantomChildren": { + "abbrev": "1.1.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "js-beautify@^1.7.4", + "name": "js-beautify", + "escapedName": "js-beautify", + "rawSpec": "^1.7.4", + "saveSpec": null, + "fetchSpec": "^1.7.4" + }, + "_requiredBy": [ + "/sequelize-cli" + ], + "_resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.7.5.tgz", + "_shasum": "69d9651ef60dbb649f65527b53674950138a7919", + "_spec": "js-beautify@^1.7.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/sequelize-cli", + "author": { + "name": "Einar Lielmanis", + "email": "einar@jsbeautifier.org" + }, + "bin": { + "css-beautify": "./js/bin/css-beautify.js", + "html-beautify": "./js/bin/html-beautify.js", + "js-beautify": "./js/bin/js-beautify.js" + }, + "bugs": { + "url": "https://github.com/beautify-web/js-beautify/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Vital Batmanov", + "email": "vital76@gmail.com" + }, + { + "name": "Chris J. Shull", + "email": "chrisjshull@gmail.com" + }, + { + "name": "Gian Marco Gherardi", + "email": "gianmarco.gherardi@gmail.com" + }, + { + "name": "Stan", + "email": "stasson@orc.ru" + }, + { + "name": "Vittorio Gambaletta", + "email": "VittGam@vittgam.net" + }, + { + "name": "Daniel Stockman", + "email": "daniel.stockman@gmail.com" + }, + { + "name": "Harutyun Amirjanyan", + "email": "amirjanyan@gmail.com" + }, + { + "name": "Nochum Sossonko", + "email": "nsossonko@hotmail.com" + }, + { + "name": "Liam Newman", + "email": "bitwiseman@gmail.com" + } + ], + "dependencies": { + "config-chain": "~1.1.5", + "editorconfig": "^0.13.2", + "mkdirp": "~0.5.0", + "nopt": "~3.0.1" + }, + "deprecated": false, + "description": "jsbeautifier.org for node", + "devDependencies": { + "benchmark": "2.1.0", + "jshint": "~2.9.1", + "mustache": "~2.2.1", + "node-static": "~0.7.1", + "requirejs": "^2.3.3", + "webpack": "^2.2.1" + }, + "directories": { + "lib": "js/lib", + "test": "js/test" + }, + "homepage": "http://jsbeautifier.org/", + "keywords": [ + "beautify", + "beautifier", + "code-quality" + ], + "license": "MIT", + "main": "js/index.js", + "name": "js-beautify", + "repository": { + "type": "git", + "url": "git://github.com/beautify-web/js-beautify.git" + }, + "scripts": {}, + "version": "1.7.5" +} diff --git a/node_modules/js-string-escape/CHANGELOG.md b/node_modules/js-string-escape/CHANGELOG.md new file mode 100644 index 0000000..4318bf9 --- /dev/null +++ b/node_modules/js-string-escape/CHANGELOG.md @@ -0,0 +1,13 @@ +# master + +# 1.0.1 + +* Exclude unused files from npm distribution + +# 1.0.0 + +* No change; version bumped to indicate that this package is considered stable + +# 0.0.1 + +* Initial release diff --git a/node_modules/js-string-escape/LICENSE b/node_modules/js-string-escape/LICENSE new file mode 100644 index 0000000..4ce0499 --- /dev/null +++ b/node_modules/js-string-escape/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Jo Liss + +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/node_modules/js-string-escape/README.md b/node_modules/js-string-escape/README.md new file mode 100644 index 0000000..3147c1b --- /dev/null +++ b/node_modules/js-string-escape/README.md @@ -0,0 +1,44 @@ +# js-string-escape + +[![Build Status](https://travis-ci.org/joliss/js-string-escape.png?branch=master)](https://travis-ci.org/joliss/js-string-escape) + +Escape any string to be a valid JavaScript string literal between double +quotes or single quotes. + +## Installation + +``` +npm install js-string-escape +``` + +## Example + +If you need to generate JavaScript output, this library will help you safely +put arbitrary data in JavaScript strings: + +```js +jsStringEscape = require('js-string-escape') + +console.log('"' + jsStringEscape('Quotes (\", \'), newlines (\n), etc.') + '"') +// => "Quotes (\", \'), newlines (\n), etc." +``` + +In other words, given any string `s`, the following invariants hold: + +```js +eval('"' + jsStringEscape(s) + '"') === s +eval("'" + jsStringEscape(s) + "'") === s +``` + +These `eval` expressions are safe with untrusted strings `s`. + +Non-strings will be cast to strings. + +## Compliance + +This library has been checked against [ECMAScript +5.1](http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4) and tested +against all Unicode code points. + +Note that the returned string is not necessarily valid JSON, since JSON +disallows control characters, and `\'` is illegal in JSON. diff --git a/node_modules/js-string-escape/index.js b/node_modules/js-string-escape/index.js new file mode 100644 index 0000000..256fdf4 --- /dev/null +++ b/node_modules/js-string-escape/index.js @@ -0,0 +1,22 @@ +module.exports = function (string) { + return ('' + string).replace(/["'\\\n\r\u2028\u2029]/g, function (character) { + // Escape all characters not included in SingleStringCharacters and + // DoubleStringCharacters on + // http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4 + switch (character) { + case '"': + case "'": + case '\\': + return '\\' + character + // Four possible LineTerminator characters need to be escaped: + case '\n': + return '\\n' + case '\r': + return '\\r' + case '\u2028': + return '\\u2028' + case '\u2029': + return '\\u2029' + } + }) +} diff --git a/node_modules/js-string-escape/package.json b/node_modules/js-string-escape/package.json new file mode 100644 index 0000000..b2deffb --- /dev/null +++ b/node_modules/js-string-escape/package.json @@ -0,0 +1,73 @@ +{ + "_args": [ + [ + "js-string-escape@1.0.1", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "js-string-escape@1.0.1", + "_id": "js-string-escape@1.0.1", + "_inBundle": false, + "_integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", + "_location": "/js-string-escape", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "js-string-escape@1.0.1", + "name": "js-string-escape", + "escapedName": "js-string-escape", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/pg" + ], + "_resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Jo Liss", + "email": "joliss42@gmail.com" + }, + "bugs": { + "url": "https://github.com/joliss/js-string-escape/issues" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "url": "http://mathiasbynens.be/" + } + ], + "description": "Escape strings for use as JavaScript string literals", + "devDependencies": { + "punycode": "~> 1.2.1", + "tap": "~> 0.4.2" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/joliss/js-string-escape#readme", + "keywords": [ + "string", + "escape", + "backslash", + "javascript", + "ecmascript" + ], + "license": "MIT", + "main": "index.js", + "name": "js-string-escape", + "repository": { + "type": "git", + "url": "git+https://github.com/joliss/js-string-escape.git" + }, + "scripts": { + "test": "tap test" + }, + "version": "1.0.1" +} diff --git a/node_modules/jsonfile/CHANGELOG.md b/node_modules/jsonfile/CHANGELOG.md new file mode 100644 index 0000000..7718857 --- /dev/null +++ b/node_modules/jsonfile/CHANGELOG.md @@ -0,0 +1,145 @@ +4.0.0 / 2017-07-12 +------------------ + +- **BREAKING:** Remove global `spaces` option. +- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js. +- Remove undocumented `passParsingErrors` option. +- Added `EOL` override option to `writeFile` when using `spaces`. [#89] + +3.0.1 / 2017-07-05 +------------------ + +- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written. + +3.0.0 / 2017-04-25 +------------------ + +- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false` + +2.4.0 / 2016-09-15 +------------------ +### Changed +- added optional support for `graceful-fs` [#62] + +2.3.1 / 2016-05-13 +------------------ +- fix to support BOM. [#45][#45] + +2.3.0 / 2016-04-16 +------------------ +- add `throws` to `readFile()`. See [#39][#39] +- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs) + +2.2.3 / 2015-10-14 +------------------ +- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34 + +2.2.2 / 2015-09-16 +------------------ +- split out tests into separate files +- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33 + +2.2.1 / 2015-06-25 +------------------ +- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28 + +2.2.0 / 2015-06-25 +------------------ +- added `options.spaces` to `writeFile()` and `writeFileSync()` + +2.1.2 / 2015-06-22 +------------------ +- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25 + +2.1.1 / 2015-06-19 +------------------ +- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24 + +2.1.0 / 2015-06-19 +------------------ +- cleanup: JavaScript Standard Style, rename files, dropped terst for assert +- methods now support JSON revivers/replacers + +2.0.1 / 2015-05-24 +------------------ +- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21 + +2.0.0 / 2014-07-28 +------------------ +* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14) +* added `options.throws` to `readFileSync()` +* dropped support for Node v0.8 + +1.2.0 / 2014-06-29 +------------------ +* removed semicolons +* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but +changes it according to docs. [#12][#12] + +1.1.1 / 2013-11-11 +------------------ +* fixed catching of callback bug (ffissore / #5) + +1.1.0 / 2013-10-11 +------------------ +* added `options` param to methods, (seanodell / #4) + +1.0.1 / 2013-09-05 +------------------ +* removed `homepage` field from package.json to remove NPM warning + +1.0.0 / 2013-06-28 +------------------ +* added `.npmignore`, #1 +* changed spacing default from `4` to `2` to follow Node conventions + +0.0.1 / 2012-09-10 +------------------ +* Initial release. + +[#89]: https://github.com/jprichardson/node-jsonfile/pull/89 +[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails" +[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file" +[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file" +[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch" +[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working" +[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value" +[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)" +[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature" +[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file" +[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file." +[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file." +[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename" +[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()" +[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?" +[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string" +[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?" +[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?" +[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken " +[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality" +[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra" +[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods" +[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error" +[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync" +[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated" +[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute" +[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity" +[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method" +[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods" +[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem" +[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null" +[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`" +[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF" +[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline" +[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options" +[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync" +[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile" +[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example." +[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me." +[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message" +[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible" +[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite." +[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync" +[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2" +[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted." +[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file" diff --git a/node_modules/jsonfile/LICENSE b/node_modules/jsonfile/LICENSE new file mode 100644 index 0000000..cb7e807 --- /dev/null +++ b/node_modules/jsonfile/LICENSE @@ -0,0 +1,15 @@ +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +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/node_modules/jsonfile/README.md b/node_modules/jsonfile/README.md new file mode 100644 index 0000000..721685c --- /dev/null +++ b/node_modules/jsonfile/README.md @@ -0,0 +1,168 @@ +Node.js - jsonfile +================ + +Easily read/write JSON files. + +[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile) +[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile) +[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master) + +Standard JavaScript + +Why? +---- + +Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying. + + + +Installation +------------ + + npm install --save jsonfile + + + +API +--- + +### readFile(filename, [options], callback) + +`options` (`object`, default `undefined`): Pass in any `fs.readFile` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). + - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback. + If `false`, returns `null` for the object. + + +```js +var jsonfile = require('jsonfile') +var file = '/tmp/data.json' +jsonfile.readFile(file, function(err, obj) { + console.dir(obj) +}) +``` + + +### readFileSync(filename, [options]) + +`options` (`object`, default `undefined`): Pass in any `fs.readFileSync` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). +- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object. + +```js +var jsonfile = require('jsonfile') +var file = '/tmp/data.json' + +console.dir(jsonfile.readFileSync(file)) +``` + + +### writeFile(filename, obj, [options], callback) + +`options`: Pass in any `fs.writeFile` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string. + + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, function (err) { + console.error(err) +}) +``` + +**formatting with spaces:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, {spaces: 2}, function(err) { + console.error(err) +}) +``` + +**overriding EOL:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, {spaces: 2, EOL: '\r\n'}, function(err) { + console.error(err) +}) +``` + +**appending to an existing JSON file:** + +You can use `fs.writeFile` option `{flag: 'a'}` to achieve this. + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/mayAlreadyExistedData.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, {flag: 'a'}, function (err) { + console.error(err) +}) +``` + +### writeFileSync(filename, obj, [options]) + +`options`: Pass in any `fs.writeFileSync` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string. + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj) +``` + +**formatting with spaces:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj, {spaces: 2}) +``` + +**overriding EOL:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj, {spaces: 2, EOL: '\r\n'}) +``` + +**appending to an existing JSON file:** + +You can use `fs.writeFileSync` option `{flag: 'a'}` to achieve this. + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/mayAlreadyExistedData.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj, {flag: 'a'}) +``` + +License +------- + +(MIT License) + +Copyright 2012-2016, JP Richardson diff --git a/node_modules/jsonfile/index.js b/node_modules/jsonfile/index.js new file mode 100644 index 0000000..d1e5827 --- /dev/null +++ b/node_modules/jsonfile/index.js @@ -0,0 +1,134 @@ +var _fs +try { + _fs = require('graceful-fs') +} catch (_) { + _fs = require('fs') +} + +function readFile (file, options, callback) { + if (callback == null) { + callback = options + options = {} + } + + if (typeof options === 'string') { + options = {encoding: options} + } + + options = options || {} + var fs = options.fs || _fs + + var shouldThrow = true + if ('throws' in options) { + shouldThrow = options.throws + } + + fs.readFile(file, options, function (err, data) { + if (err) return callback(err) + + data = stripBom(data) + + var obj + try { + obj = JSON.parse(data, options ? options.reviver : null) + } catch (err2) { + if (shouldThrow) { + err2.message = file + ': ' + err2.message + return callback(err2) + } else { + return callback(null, null) + } + } + + callback(null, obj) + }) +} + +function readFileSync (file, options) { + options = options || {} + if (typeof options === 'string') { + options = {encoding: options} + } + + var fs = options.fs || _fs + + var shouldThrow = true + if ('throws' in options) { + shouldThrow = options.throws + } + + try { + var content = fs.readFileSync(file, options) + content = stripBom(content) + return JSON.parse(content, options.reviver) + } catch (err) { + if (shouldThrow) { + err.message = file + ': ' + err.message + throw err + } else { + return null + } + } +} + +function stringify (obj, options) { + var spaces + var EOL = '\n' + if (typeof options === 'object' && options !== null) { + if (options.spaces) { + spaces = options.spaces + } + if (options.EOL) { + EOL = options.EOL + } + } + + var str = JSON.stringify(obj, options ? options.replacer : null, spaces) + + return str.replace(/\n/g, EOL) + EOL +} + +function writeFile (file, obj, options, callback) { + if (callback == null) { + callback = options + options = {} + } + options = options || {} + var fs = options.fs || _fs + + var str = '' + try { + str = stringify(obj, options) + } catch (err) { + // Need to return whether a callback was passed or not + if (callback) callback(err, null) + return + } + + fs.writeFile(file, str, options, callback) +} + +function writeFileSync (file, obj, options) { + options = options || {} + var fs = options.fs || _fs + + var str = stringify(obj, options) + // not sure if fs.writeFileSync returns anything, but just in case + return fs.writeFileSync(file, str, options) +} + +function stripBom (content) { + // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified + if (Buffer.isBuffer(content)) content = content.toString('utf8') + content = content.replace(/^\uFEFF/, '') + return content +} + +var jsonfile = { + readFile: readFile, + readFileSync: readFileSync, + writeFile: writeFile, + writeFileSync: writeFileSync +} + +module.exports = jsonfile diff --git a/node_modules/jsonfile/package.json b/node_modules/jsonfile/package.json new file mode 100644 index 0000000..99beaa3 --- /dev/null +++ b/node_modules/jsonfile/package.json @@ -0,0 +1,71 @@ +{ + "_from": "jsonfile@^4.0.0", + "_id": "jsonfile@4.0.0", + "_inBundle": false, + "_integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "_location": "/jsonfile", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "jsonfile@^4.0.0", + "name": "jsonfile", + "escapedName": "jsonfile", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/fs-extra" + ], + "_resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "_shasum": "8771aae0799b64076b76640fca058f9c10e33ecb", + "_spec": "jsonfile@^4.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/fs-extra", + "author": { + "name": "JP Richardson", + "email": "jprichardson@gmail.com" + }, + "bugs": { + "url": "https://github.com/jprichardson/node-jsonfile/issues" + }, + "bundleDependencies": false, + "dependencies": { + "graceful-fs": "^4.1.6" + }, + "deprecated": false, + "description": "Easily read/write JSON files.", + "devDependencies": { + "mocha": "2.x", + "rimraf": "^2.4.0", + "standard": "^10.0.3" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jprichardson/node-jsonfile#readme", + "keywords": [ + "read", + "write", + "file", + "json", + "fs", + "fs-extra" + ], + "license": "MIT", + "main": "index.js", + "name": "jsonfile", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/jprichardson/node-jsonfile.git" + }, + "scripts": { + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "mocha" + }, + "version": "4.0.0" +} diff --git a/node_modules/kind-of/CHANGELOG.md b/node_modules/kind-of/CHANGELOG.md new file mode 100644 index 0000000..fb30b06 --- /dev/null +++ b/node_modules/kind-of/CHANGELOG.md @@ -0,0 +1,157 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
    + Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
    + +
    + Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
    + +## [6.0.0] - 2017-10-13 + +- refactor code to be more performant +- refactor benchmarks + +## [5.1.0] - 2017-10-13 + +**Added** + +- Merge pull request #15 from aretecode/patch-1 +- adds support and tests for string & array iterators + +**Changed** + +- updates benchmarks + +## [5.0.2] - 2017-08-02 + +- Merge pull request #14 from struct78/master +- Added `undefined` check + +## [5.0.0] - 2017-06-21 + +- Merge pull request #12 from aretecode/iterator +- Set Iterator + Map Iterator +- streamline `isbuffer`, minor edits + +## [4.0.0] - 2017-05-19 + +- Merge pull request #8 from tunnckoCore/master +- update deps + +## [3.2.2] - 2017-05-16 + +- fix version + +## [3.2.1] - 2017-05-16 + +- add browserify + +## [3.2.0] - 2017-04-25 + +- Merge pull request #10 from ksheedlo/unrequire-buffer +- add `promise` support and tests +- Remove unnecessary `Buffer` check + +## [3.1.0] - 2016-12-07 + +- Merge pull request #7 from laggingreflex/err +- add support for `error` and tests +- run update + +## [3.0.4] - 2016-07-29 + +- move tests +- run update + +## [3.0.3] - 2016-05-03 + +- fix prepublish script +- remove unused dep + +## [3.0.0] - 2015-11-17 + +- add typed array support +- Merge pull request #5 from miguelmota/typed-arrays +- adds new tests + +## [2.0.1] - 2015-08-21 + +- use `is-buffer` module + +## [2.0.0] - 2015-05-31 + +- Create fallback for `Array.isArray` if used as a browser package +- Merge pull request #2 from dtothefp/patch-1 +- Merge pull request #3 from pdehaan/patch-1 +- Merge branch 'master' of https://github.com/chorks/kind-of into chorks-master +- optimizations, mostly date and regex + +## [1.1.0] - 2015-02-09 + +- adds `buffer` support +- adds tests for `buffer` + +## [1.0.0] - 2015-01-19 + +- update benchmarks +- optimizations based on benchmarks + +## [0.1.2] - 2014-10-26 + +- return `typeof` value if it's not an object. very slight speed improvement +- use `.slice` +- adds benchmarks + +## [0.1.0] - 2014-9-26 + +- first commit + +[6.0.0]: https://github.com/jonschlinkert/kind-of/compare/5.1.0...6.0.0 +[5.1.0]: https://github.com/jonschlinkert/kind-of/compare/5.0.2...5.1.0 +[5.0.2]: https://github.com/jonschlinkert/kind-of/compare/5.0.1...5.0.2 +[5.0.1]: https://github.com/jonschlinkert/kind-of/compare/5.0.0...5.0.1 +[5.0.0]: https://github.com/jonschlinkert/kind-of/compare/4.0.0...5.0.0 +[4.0.0]: https://github.com/jonschlinkert/kind-of/compare/3.2.2...4.0.0 +[3.2.2]: https://github.com/jonschlinkert/kind-of/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/jonschlinkert/kind-of/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/jonschlinkert/kind-of/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/jonschlinkert/kind-of/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/jonschlinkert/kind-of/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/jonschlinkert/kind-of/compare/3.0.0...3.0.3 +[3.0.0]: https://github.com/jonschlinkert/kind-of/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/jonschlinkert/kind-of/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/jonschlinkert/kind-of/compare/1.1.0...2.0.0 +[1.1.0]: https://github.com/jonschlinkert/kind-of/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...1.0.0 +[0.1.2]: https://github.com/jonschlinkert/kind-of/compare/0.1.0...0.1.2 +[0.1.0]: https://github.com/jonschlinkert/kind-of/commit/2fae09b0b19b1aadb558e9be39f0c3ef6034eb87 + +[Unreleased]: https://github.com/jonschlinkert/kind-of/compare/0.1.2...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog + diff --git a/node_modules/kind-of/LICENSE b/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/kind-of/README.md b/node_modules/kind-of/README.md new file mode 100644 index 0000000..4b0d4a8 --- /dev/null +++ b/node_modules/kind-of/README.md @@ -0,0 +1,365 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, es6, and browser ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(new Error('error')); +//=> 'error' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'generatorfunction' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). + +```bash +# arguments (32 bytes) + kind-of x 17,024,098 ops/sec ±1.90% (86 runs sampled) + lib-type-of x 11,926,235 ops/sec ±1.34% (83 runs sampled) + lib-typeof x 9,245,257 ops/sec ±1.22% (87 runs sampled) + + fastest is kind-of (by 161% avg) + +# array (22 bytes) + kind-of x 17,196,492 ops/sec ±1.07% (88 runs sampled) + lib-type-of x 8,838,283 ops/sec ±1.02% (87 runs sampled) + lib-typeof x 8,677,848 ops/sec ±0.87% (87 runs sampled) + + fastest is kind-of (by 196% avg) + +# boolean (24 bytes) + kind-of x 16,841,600 ops/sec ±1.10% (86 runs sampled) + lib-type-of x 8,096,787 ops/sec ±0.95% (87 runs sampled) + lib-typeof x 8,423,345 ops/sec ±1.15% (86 runs sampled) + + fastest is kind-of (by 204% avg) + +# buffer (38 bytes) + kind-of x 14,848,060 ops/sec ±1.05% (86 runs sampled) + lib-type-of x 3,671,577 ops/sec ±1.49% (87 runs sampled) + lib-typeof x 8,360,236 ops/sec ±1.24% (86 runs sampled) + + fastest is kind-of (by 247% avg) + +# date (30 bytes) + kind-of x 16,067,761 ops/sec ±1.58% (86 runs sampled) + lib-type-of x 8,954,436 ops/sec ±1.40% (87 runs sampled) + lib-typeof x 8,488,307 ops/sec ±1.51% (84 runs sampled) + + fastest is kind-of (by 184% avg) + +# error (36 bytes) + kind-of x 9,634,090 ops/sec ±1.12% (89 runs sampled) + lib-type-of x 7,735,624 ops/sec ±1.32% (86 runs sampled) + lib-typeof x 7,442,160 ops/sec ±1.11% (90 runs sampled) + + fastest is kind-of (by 127% avg) + +# function (34 bytes) + kind-of x 10,031,494 ops/sec ±1.27% (86 runs sampled) + lib-type-of x 9,502,757 ops/sec ±1.17% (89 runs sampled) + lib-typeof x 8,278,985 ops/sec ±1.08% (88 runs sampled) + + fastest is kind-of (by 113% avg) + +# null (24 bytes) + kind-of x 18,159,808 ops/sec ±1.92% (86 runs sampled) + lib-type-of x 12,927,635 ops/sec ±1.01% (88 runs sampled) + lib-typeof x 7,958,234 ops/sec ±1.21% (89 runs sampled) + + fastest is kind-of (by 174% avg) + +# number (22 bytes) + kind-of x 17,846,779 ops/sec ±0.91% (85 runs sampled) + lib-type-of x 3,316,636 ops/sec ±1.19% (86 runs sampled) + lib-typeof x 2,329,477 ops/sec ±2.21% (85 runs sampled) + + fastest is kind-of (by 632% avg) + +# object-plain (47 bytes) + kind-of x 7,085,155 ops/sec ±1.05% (88 runs sampled) + lib-type-of x 8,870,930 ops/sec ±1.06% (83 runs sampled) + lib-typeof x 8,716,024 ops/sec ±1.05% (87 runs sampled) + + fastest is lib-type-of (by 112% avg) + +# regex (25 bytes) + kind-of x 14,196,052 ops/sec ±1.65% (84 runs sampled) + lib-type-of x 9,554,164 ops/sec ±1.25% (88 runs sampled) + lib-typeof x 8,359,691 ops/sec ±1.07% (87 runs sampled) + + fastest is kind-of (by 158% avg) + +# string (33 bytes) + kind-of x 16,131,428 ops/sec ±1.41% (85 runs sampled) + lib-type-of x 7,273,172 ops/sec ±1.05% (87 runs sampled) + lib-typeof x 7,382,635 ops/sec ±1.17% (85 runs sampled) + + fastest is kind-of (by 220% avg) + +# symbol (34 bytes) + kind-of x 17,011,537 ops/sec ±1.24% (86 runs sampled) + lib-type-of x 3,492,454 ops/sec ±1.23% (89 runs sampled) + lib-typeof x 7,471,235 ops/sec ±2.48% (87 runs sampled) + + fastest is kind-of (by 310% avg) + +# template-strings (36 bytes) + kind-of x 15,434,250 ops/sec ±1.46% (83 runs sampled) + lib-type-of x 7,157,907 ops/sec ±0.97% (87 runs sampled) + lib-typeof x 7,517,986 ops/sec ±0.92% (86 runs sampled) + + fastest is kind-of (by 210% avg) + +# undefined (29 bytes) + kind-of x 19,167,115 ops/sec ±1.71% (87 runs sampled) + lib-type-of x 15,477,740 ops/sec ±1.63% (85 runs sampled) + lib-typeof x 19,075,495 ops/sec ±1.17% (83 runs sampled) + + fastest is lib-typeof,kind-of + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of seems to be more consistently "correct" than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly identifies instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 98 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ianstormtaylor](https://github.com/ianstormtaylor) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [charlike-old](https://github.com/charlike-old) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 01, 2017._ \ No newline at end of file diff --git a/node_modules/kind-of/index.js b/node_modules/kind-of/index.js new file mode 100644 index 0000000..aa2bb39 --- /dev/null +++ b/node_modules/kind-of/index.js @@ -0,0 +1,129 @@ +var toString = Object.prototype.toString; + +module.exports = function kindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + + var type = typeof val; + if (type === 'boolean') return 'boolean'; + if (type === 'string') return 'string'; + if (type === 'number') return 'number'; + if (type === 'symbol') return 'symbol'; + if (type === 'function') { + return isGeneratorFn(val) ? 'generatorfunction' : 'function'; + } + + if (isArray(val)) return 'array'; + if (isBuffer(val)) return 'buffer'; + if (isArguments(val)) return 'arguments'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + if (isRegexp(val)) return 'regexp'; + + switch (ctorName(val)) { + case 'Symbol': return 'symbol'; + case 'Promise': return 'promise'; + + // Set, Map, WeakSet, WeakMap + case 'WeakMap': return 'weakmap'; + case 'WeakSet': return 'weakset'; + case 'Map': return 'map'; + case 'Set': return 'set'; + + // 8-bit typed arrays + case 'Int8Array': return 'int8array'; + case 'Uint8Array': return 'uint8array'; + case 'Uint8ClampedArray': return 'uint8clampedarray'; + + // 16-bit typed arrays + case 'Int16Array': return 'int16array'; + case 'Uint16Array': return 'uint16array'; + + // 32-bit typed arrays + case 'Int32Array': return 'int32array'; + case 'Uint32Array': return 'uint32array'; + case 'Float32Array': return 'float32array'; + case 'Float64Array': return 'float64array'; + } + + if (isGeneratorObj(val)) { + return 'generator'; + } + + // Non-plain objects + type = toString.call(val); + switch (type) { + case '[object Object]': return 'object'; + // iterators + case '[object Map Iterator]': return 'mapiterator'; + case '[object Set Iterator]': return 'setiterator'; + case '[object String Iterator]': return 'stringiterator'; + case '[object Array Iterator]': return 'arrayiterator'; + } + + // other + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +}; + +function ctorName(val) { + return val.constructor ? val.constructor.name : null; +} + +function isArray(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; +} + +function isError(val) { + return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'); +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' + && typeof val.getDate === 'function' + && typeof val.setDate === 'function'; +} + +function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === 'string' + && typeof val.ignoreCase === 'boolean' + && typeof val.multiline === 'boolean' + && typeof val.global === 'boolean'; +} + +function isGeneratorFn(name, val) { + return ctorName(name) === 'GeneratorFunction'; +} + +function isGeneratorObj(val) { + return typeof val.throw === 'function' + && typeof val.return === 'function' + && typeof val.next === 'function'; +} + +function isArguments(val) { + try { + if (typeof val.length === 'number' && typeof val.callee === 'function') { + return true; + } + } catch (err) { + if (err.message.indexOf('callee') !== -1) { + return true; + } + } + return false; +} + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === 'function') { + return val.constructor.isBuffer(val); + } + return false; +} diff --git a/node_modules/kind-of/package.json b/node_modules/kind-of/package.json new file mode 100644 index 0000000..25af092 --- /dev/null +++ b/node_modules/kind-of/package.json @@ -0,0 +1,148 @@ +{ + "_from": "kind-of@^6.0.2", + "_id": "kind-of@6.0.2", + "_inBundle": false, + "_integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "_location": "/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^6.0.2", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^6.0.2", + "saveSpec": null, + "fetchSpec": "^6.0.2" + }, + "_requiredBy": [ + "/braces", + "/is-accessor-descriptor", + "/is-data-descriptor", + "/is-descriptor", + "/micromatch", + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "_shasum": "01146b36a6218e64e58f3a8d66de5d7fc6f6d051", + "_spec": "kind-of@^6.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "James", + "url": "https://twitter.com/aretecode" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + }, + { + "name": "tunnckoCore", + "url": "https://i.am.charlike.online" + } + ], + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "benchmarked": "^2.0.0", + "browserify": "^14.4.0", + "gulp-format-md": "^1.0.0", + "mocha": "^4.0.1", + "write": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + }, + "version": "6.0.2" +} diff --git a/node_modules/latest-version/index.js b/node_modules/latest-version/index.js new file mode 100644 index 0000000..bfb79d1 --- /dev/null +++ b/node_modules/latest-version/index.js @@ -0,0 +1,4 @@ +'use strict'; +const packageJson = require('package-json'); + +module.exports = name => packageJson(name.toLowerCase()).then(data => data.version); diff --git a/node_modules/latest-version/license b/node_modules/latest-version/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/latest-version/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/node_modules/latest-version/package.json b/node_modules/latest-version/package.json new file mode 100644 index 0000000..797a2ee --- /dev/null +++ b/node_modules/latest-version/package.json @@ -0,0 +1,71 @@ +{ + "_from": "latest-version@^3.0.0", + "_id": "latest-version@3.1.0", + "_inBundle": false, + "_integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "_location": "/latest-version", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "latest-version@^3.0.0", + "name": "latest-version", + "escapedName": "latest-version", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/update-notifier" + ], + "_resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "_shasum": "a205383fea322b33b5ae3b18abee0dc2f356ee15", + "_spec": "latest-version@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/update-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/latest-version/issues" + }, + "bundleDependencies": false, + "dependencies": { + "package-json": "^4.0.0" + }, + "deprecated": false, + "description": "Get the latest version of an npm package", + "devDependencies": { + "ava": "*", + "semver-regex": "^1.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/latest-version#readme", + "keywords": [ + "latest", + "version", + "npm", + "pkg", + "package", + "package.json", + "current", + "module" + ], + "license": "MIT", + "name": "latest-version", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/latest-version.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.1.0" +} diff --git a/node_modules/latest-version/readme.md b/node_modules/latest-version/readme.md new file mode 100644 index 0000000..3fcffdd --- /dev/null +++ b/node_modules/latest-version/readme.md @@ -0,0 +1,40 @@ +# latest-version [![Build Status](https://travis-ci.org/sindresorhus/latest-version.svg?branch=master)](https://travis-ci.org/sindresorhus/latest-version) + +> Get the latest version of an npm package + +Fetches the version directly from the registry instead of depending on the massive [npm](https://github.com/npm/npm/blob/8b5e7b6ae5b4cd2d7d62eaf93b1428638b387072/package.json#L37-L85) module like the [latest](https://github.com/bahamas10/node-latest) module does. + + +## Install + +``` +$ npm install --save latest-version +``` + + +## Usage + +```js +const latestVersion = require('latest-version'); + +latestVersion('ava').then(version => { + console.log(version); + //=> '0.18.0' +}); + +latestVersion('@sindresorhus/df').then(version => { + console.log(version); + //=> '1.0.1' +}); +``` + + +## Related + +- [latest-version-cli](https://github.com/sindresorhus/latest-version-cli) - CLI for this module +- [package-json](https://github.com/sindresorhus/package-json) - Get the package.json of a package from the npm registry + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/lazy-cache/LICENSE b/node_modules/lazy-cache/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/lazy-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +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/node_modules/lazy-cache/README.md b/node_modules/lazy-cache/README.md new file mode 100644 index 0000000..1446318 --- /dev/null +++ b/node_modules/lazy-cache/README.md @@ -0,0 +1,195 @@ +# lazy-cache [![NPM version](https://img.shields.io/npm/v/lazy-cache.svg?style=flat)](https://www.npmjs.com/package/lazy-cache) [![NPM monthly downloads](https://img.shields.io/npm/dm/lazy-cache.svg?style=flat)](https://npmjs.org/package/lazy-cache) [![NPM total downloads](https://img.shields.io/npm/dt/lazy-cache.svg?style=flat)](https://npmjs.org/package/lazy-cache) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/lazy-cache.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/lazy-cache) + +> Cache requires to be lazy-loaded when needed. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save lazy-cache +``` + +## Heads up! + +It's suprising how many libraries are in the average dependency tree that don't belong there for one reason or another. Either because they were accidentally listed as `dependencies` instead of `devDepedencies`, or they are required in a file as variables, but the variable is never actually used (poor linting), and so on. Or because the maintainer made the decision to add the deps, even though they will never ([or can't ever](https://github.com/felixge/node-dateformat/issues/36)) be used by 99.9% of users. + +Worse, many libraries like chalk and [shelljs](https://github.com/eslint/eslint/issues/7316) actually execute code when `require()` is called!? (shelljs was modifying the `String.prototype`, and chalk loops over some objects to dynamically create methods). In other words, they do something like this: + +```js +// in the main export of a library, if you do this it will +// automatically modify the String.prototype _globally_, +// the moment node.js loads the dependency tree +String.prototype.foo = function() {}; + +// same if you do something like this +// (dont' do this, ever. wrap this kind of code in a function +// and allow implementors to decide when to call it) +while (foo) { + // do stuff +} +``` + +In any case, just having these libraries in your dependency tree somewhere means that their code will excecute the moment you run your application _even if the libraries are never called by your application or any other code anywhere in the tree_. + +**solution** + +lazy-cache doesn't use any "magic", it uses native, plain-vanilla, tried and true javascript getters to call node's `require()` system. + +**Faster, safer code** + +There main advantage to this, the main is that `require`s are loaded on demand, so only code that is actually used will ever be loaded. As a result, applications will load faster (sometimes much faster - we've seen load times drop from ~1 second to less than 50 milliseconds). + +Moreover, in some cases this also avoids inadvertently loading libraries that execute code or modifies globals, etc. + +**webpack users** + +If you use webpack and are experiencing issues with lazy-cache, this is a known bug caused by webpack, not lazy-cache. There is a solution though, you can use [unlazy-loader](https://github.com/doowb/unlazy-loader), a webpack loader that _fixes the webpack bug_. + +## Usage + +```js +var utils = require('lazy-cache')(require); +``` + +**Use as a property on `lazy`** + +The module is also added as a property to the `lazy` function so it can be called without having to call a function first. + +```js +var utils = require('lazy-cache')(require); + +// `npm install glob` +utils('glob'); + +// glob sync +console.log(utils.glob.sync('*.js')); + +// glob async +utils.glob('*.js', function (err, files) { + console.log(files); +}); +``` + +**Use as a function** + +```js +var utils = require('lazy-cache')(require); +var glob = utils('glob'); + +// `glob` is a now a function that may be called when needed +glob().sync('foo/*.js'); +``` + +## Aliases + +An alias may be passed as the second argument if you don't want to use the automatically camel-cased variable name. + +**Example** + +```js +var utils = require('lazy-cache')(require); + +// alias `ansi-yellow` as `yellow` +utils('ansi-yellow', 'yellow'); +console.log(utils.yellow('foo')); +``` + +Dot notation may also be used in the alias to create an object hierarchy. + +**Example** + +```js +var utils = require('lazy-cache')(require); +utils('ansi-cyan', 'color.cyan'); +utils('ansi-yellow', 'color.yellow'); +utils('ansi-magenta', 'color.magenta'); +console.log(utils.color.cyan('foo')); +console.log(utils.color.yellow('bar')); +console.log(utils.color.magenta('baz')); +``` + +## Browserify usage + +**Example** + +```js +var utils = require('lazy-cache')(require); +// temporarily re-assign `require` to trick browserify +var fn = require; +require = utils; +// list module dependencies (here, `require` is actually `lazy-cache`) +require('glob'); +require = fn; // restore the native `require` function + +/** + * Now you can use glob with the `utils.glob` variable + */ + +// sync +console.log(utils.glob.sync('*.js')); + +// async +utils.glob('*.js', function (err, files) { + console.log(files.join('\n')); +}); +``` + +## Kill switch + +To force lazy-cache to immediately invoke all dependencies, do: + +```js +process.env.UNLAZY = true; +``` + +## About + +### Related projects + +[lint-deps](https://www.npmjs.com/package/lint-deps): CLI tool that tells you when dependencies are missing from package.json and offers you a… [more](https://github.com/jonschlinkert/lint-deps) | [homepage](https://github.com/jonschlinkert/lint-deps "CLI tool that tells you when dependencies are missing from package.json and offers you a choice to install them. Also tells you when dependencies are listed in package.json but are not being used anywhere in your project. Node.js command line tool and API") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor**
    | +| --- | --- | +| 31 | [jonschlinkert](https://github.com/jonschlinkert) | +| 27 | [doowb](https://github.com/doowb) | + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/lazy-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on November 07, 2016._ \ No newline at end of file diff --git a/node_modules/lazy-cache/index.js b/node_modules/lazy-cache/index.js new file mode 100644 index 0000000..751fcbb --- /dev/null +++ b/node_modules/lazy-cache/index.js @@ -0,0 +1,73 @@ +'use strict'; + +var set = require('set-getter'); + +/** + * Cache results of the first function call to ensure only calling once. + * + * ```js + * var utils = require('lazy-cache')(require); + * // cache the call to `require('ansi-yellow')` + * utils('ansi-yellow', 'yellow'); + * // use `ansi-yellow` + * console.log(utils.yellow('this is yellow')); + * ``` + * + * @param {Function} `fn` Function that will be called only once. + * @return {Function} Function that can be called to get the cached function + * @api public + */ + +function lazyCache(requireFn) { + var cache = {}; + + return function proxy(name, alias) { + var key = alias; + + // camel-case the module `name` if `alias` is not defined + if (typeof key !== 'string') { + key = camelcase(name); + } + + // create a getter to lazily invoke the module the first time it's called + function getter() { + return cache[key] || (cache[key] = requireFn(name)); + } + + // trip the getter if `process.env.UNLAZY` is defined + if (unlazy(process.env)) { + getter(); + } + + set(proxy, key, getter); + return getter; + }; +} + +/** + * Return true if `process.env.LAZY` is true, or travis is running. + */ + +function unlazy(env) { + return env.UNLAZY === 'true' || env.UNLAZY === true || env.TRAVIS; +} + +/** + * Camelcase the the given module `name`. + */ + +function camelcase(str) { + if (str.length === 1) { + return str.toLowerCase(); + } + str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase(); + return str.replace(/[\W_]+(\w|$)/g, function(_, ch) { + return ch.toUpperCase(); + }); +} + +/** + * Expose `lazyCache` + */ + +module.exports = lazyCache; diff --git a/node_modules/lazy-cache/package.json b/node_modules/lazy-cache/package.json new file mode 100644 index 0000000..5b7b0dd --- /dev/null +++ b/node_modules/lazy-cache/package.json @@ -0,0 +1,108 @@ +{ + "_from": "lazy-cache@^2.0.2", + "_id": "lazy-cache@2.0.2", + "_inBundle": false, + "_integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "_location": "/lazy-cache", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lazy-cache@^2.0.2", + "name": "lazy-cache", + "escapedName": "lazy-cache", + "rawSpec": "^2.0.2", + "saveSpec": null, + "fetchSpec": "^2.0.2" + }, + "_requiredBy": [ + "/use" + ], + "_resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "_shasum": "b9190a4f913354694840859f8a8f7084d8822264", + "_spec": "lazy-cache@^2.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/use", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/lazy-cache/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "email": "brian.woodward@gmail.com", + "url": "https://github.com/doowb" + }, + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + } + ], + "dependencies": { + "set-getter": "^0.1.0" + }, + "deprecated": false, + "description": "Cache requires to be lazy-loaded when needed.", + "devDependencies": { + "ansi-cyan": "^0.1.1", + "ansi-magenta": "^0.1.1", + "ansi-yellow": "^0.1.1", + "glob": "^7.0.3", + "gulp-format-md": "^0.1.8", + "mocha": "^2.4.5", + "object.omit": "^2.0.0", + "object.pick": "^1.1.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/lazy-cache", + "keywords": [ + "cache", + "caching", + "dependencies", + "dependency", + "lazy", + "require", + "requires" + ], + "license": "MIT", + "main": "index.js", + "name": "lazy-cache", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/lazy-cache.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "lint-deps" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "2.0.2" +} diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js new file mode 100644 index 0000000..69bd3d2 --- /dev/null +++ b/node_modules/lcid/index.js @@ -0,0 +1,22 @@ +'use strict'; +var invertKv = require('invert-kv'); +var all = require('./lcid.json'); +var inverted = invertKv(all); + +exports.from = function (lcidCode) { + if (typeof lcidCode !== 'number') { + throw new TypeError('Expected a number'); + } + + return inverted[lcidCode]; +}; + +exports.to = function (localeId) { + if (typeof localeId !== 'string') { + throw new TypeError('Expected a string'); + } + + return all[localeId]; +}; + +exports.all = all; diff --git a/node_modules/lcid/lcid.json b/node_modules/lcid/lcid.json new file mode 100644 index 0000000..9c89f6a --- /dev/null +++ b/node_modules/lcid/lcid.json @@ -0,0 +1,203 @@ +{ + "af_ZA": 1078, + "am_ET": 1118, + "ar_AE": 14337, + "ar_BH": 15361, + "ar_DZ": 5121, + "ar_EG": 3073, + "ar_IQ": 2049, + "ar_JO": 11265, + "ar_KW": 13313, + "ar_LB": 12289, + "ar_LY": 4097, + "ar_MA": 6145, + "ar_OM": 8193, + "ar_QA": 16385, + "ar_SA": 1025, + "ar_SY": 10241, + "ar_TN": 7169, + "ar_YE": 9217, + "arn_CL": 1146, + "as_IN": 1101, + "az_AZ": 2092, + "ba_RU": 1133, + "be_BY": 1059, + "bg_BG": 1026, + "bn_IN": 1093, + "bo_BT": 2129, + "bo_CN": 1105, + "br_FR": 1150, + "bs_BA": 8218, + "ca_ES": 1027, + "co_FR": 1155, + "cs_CZ": 1029, + "cy_GB": 1106, + "da_DK": 1030, + "de_AT": 3079, + "de_CH": 2055, + "de_DE": 1031, + "de_LI": 5127, + "de_LU": 4103, + "div_MV": 1125, + "dsb_DE": 2094, + "el_GR": 1032, + "en_AU": 3081, + "en_BZ": 10249, + "en_CA": 4105, + "en_CB": 9225, + "en_GB": 2057, + "en_IE": 6153, + "en_IN": 18441, + "en_JA": 8201, + "en_MY": 17417, + "en_NZ": 5129, + "en_PH": 13321, + "en_TT": 11273, + "en_US": 1033, + "en_ZA": 7177, + "en_ZW": 12297, + "es_AR": 11274, + "es_BO": 16394, + "es_CL": 13322, + "es_CO": 9226, + "es_CR": 5130, + "es_DO": 7178, + "es_EC": 12298, + "es_ES": 3082, + "es_GT": 4106, + "es_HN": 18442, + "es_MX": 2058, + "es_NI": 19466, + "es_PA": 6154, + "es_PE": 10250, + "es_PR": 20490, + "es_PY": 15370, + "es_SV": 17418, + "es_UR": 14346, + "es_US": 21514, + "es_VE": 8202, + "et_EE": 1061, + "eu_ES": 1069, + "fa_IR": 1065, + "fi_FI": 1035, + "fil_PH": 1124, + "fo_FO": 1080, + "fr_BE": 2060, + "fr_CA": 3084, + "fr_CH": 4108, + "fr_FR": 1036, + "fr_LU": 5132, + "fr_MC": 6156, + "fy_NL": 1122, + "ga_IE": 2108, + "gbz_AF": 1164, + "gl_ES": 1110, + "gsw_FR": 1156, + "gu_IN": 1095, + "ha_NG": 1128, + "he_IL": 1037, + "hi_IN": 1081, + "hr_BA": 4122, + "hr_HR": 1050, + "hu_HU": 1038, + "hy_AM": 1067, + "id_ID": 1057, + "ii_CN": 1144, + "is_IS": 1039, + "it_CH": 2064, + "it_IT": 1040, + "iu_CA": 2141, + "ja_JP": 1041, + "ka_GE": 1079, + "kh_KH": 1107, + "kk_KZ": 1087, + "kl_GL": 1135, + "kn_IN": 1099, + "ko_KR": 1042, + "kok_IN": 1111, + "ky_KG": 1088, + "lb_LU": 1134, + "lo_LA": 1108, + "lt_LT": 1063, + "lv_LV": 1062, + "mi_NZ": 1153, + "mk_MK": 1071, + "ml_IN": 1100, + "mn_CN": 2128, + "mn_MN": 1104, + "moh_CA": 1148, + "mr_IN": 1102, + "ms_BN": 2110, + "ms_MY": 1086, + "mt_MT": 1082, + "my_MM": 1109, + "nb_NO": 1044, + "ne_NP": 1121, + "nl_BE": 2067, + "nl_NL": 1043, + "nn_NO": 2068, + "ns_ZA": 1132, + "oc_FR": 1154, + "or_IN": 1096, + "pa_IN": 1094, + "pl_PL": 1045, + "ps_AF": 1123, + "pt_BR": 1046, + "pt_PT": 2070, + "qut_GT": 1158, + "quz_BO": 1131, + "quz_EC": 2155, + "quz_PE": 3179, + "rm_CH": 1047, + "ro_RO": 1048, + "ru_RU": 1049, + "rw_RW": 1159, + "sa_IN": 1103, + "sah_RU": 1157, + "se_FI": 3131, + "se_NO": 1083, + "se_SE": 2107, + "si_LK": 1115, + "sk_SK": 1051, + "sl_SI": 1060, + "sma_NO": 6203, + "sma_SE": 7227, + "smj_NO": 4155, + "smj_SE": 5179, + "smn_FI": 9275, + "sms_FI": 8251, + "sq_AL": 1052, + "sr_BA": 7194, + "sr_SP": 3098, + "sv_FI": 2077, + "sv_SE": 1053, + "sw_KE": 1089, + "syr_SY": 1114, + "ta_IN": 1097, + "te_IN": 1098, + "tg_TJ": 1064, + "th_TH": 1054, + "tk_TM": 1090, + "tmz_DZ": 2143, + "tn_ZA": 1074, + "tr_TR": 1055, + "tt_RU": 1092, + "ug_CN": 1152, + "uk_UA": 1058, + "ur_IN": 2080, + "ur_PK": 1056, + "uz_UZ": 2115, + "vi_VN": 1066, + "wen_DE": 1070, + "wo_SN": 1160, + "xh_ZA": 1076, + "yo_NG": 1130, + "zh_CHS": 4, + "zh_CHT": 31748, + "zh_CN": 2052, + "zh_HK": 3076, + "zh_MO": 5124, + "zh_SG": 4100, + "zh_TW": 1028, + "zu_ZA": 1077 +} diff --git a/node_modules/lcid/license b/node_modules/lcid/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/lcid/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/node_modules/lcid/package.json b/node_modules/lcid/package.json new file mode 100644 index 0000000..677ecd4 --- /dev/null +++ b/node_modules/lcid/package.json @@ -0,0 +1,78 @@ +{ + "_from": "lcid@^1.0.0", + "_id": "lcid@1.0.0", + "_inBundle": false, + "_integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "_location": "/lcid", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lcid@^1.0.0", + "name": "lcid", + "escapedName": "lcid", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/os-locale" + ], + "_resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "_shasum": "308accafa0bc483a3867b4b6f2b9506251d1b835", + "_spec": "lcid@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/os-locale", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/lcid/issues" + }, + "bundleDependencies": false, + "dependencies": { + "invert-kv": "^1.0.0" + }, + "deprecated": false, + "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lcid.json" + ], + "homepage": "https://github.com/sindresorhus/lcid#readme", + "keywords": [ + "lcid", + "locale", + "string", + "str", + "id", + "identifier", + "windows", + "language", + "lang", + "map", + "mapping", + "convert", + "json", + "bcp47", + "ietf", + "tag" + ], + "license": "MIT", + "name": "lcid", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/lcid.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/lcid/readme.md b/node_modules/lcid/readme.md new file mode 100644 index 0000000..bee4a70 --- /dev/null +++ b/node_modules/lcid/readme.md @@ -0,0 +1,35 @@ +# lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid) + +> Mapping between [standard locale identifiers](http://en.wikipedia.org/wiki/Locale) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) + +Based on the [mapping](https://github.com/python/cpython/blob/be2a1a76fa43bb1ea1b3577bb5bdd506a2e90e37/Lib/locale.py#L1395-L1604) used in the Python standard library. + +The mapping itself is just a [JSON file](lcid.json) and can be used wherever. + + +## Install + +``` +$ npm install --save lcid +``` + + +## Usage + +```js +var lcid = require('lcid'); + +lcid.from(1044); +//=> 'nb_NO' + +lcid.to('nb_NO'); +//=> 1044 + +lcid.all; +//=> {'af_ZA': 1078, ...} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/load-json-file/index.js b/node_modules/load-json-file/index.js new file mode 100644 index 0000000..b2767e3 --- /dev/null +++ b/node_modules/load-json-file/index.js @@ -0,0 +1,11 @@ +'use strict'; +const path = require('path'); +const fs = require('graceful-fs'); +const stripBom = require('strip-bom'); +const parseJson = require('parse-json'); +const pify = require('pify'); + +const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp)); + +module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp)); +module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp); diff --git a/node_modules/load-json-file/license b/node_modules/load-json-file/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/load-json-file/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/node_modules/load-json-file/node_modules/pify/index.js b/node_modules/load-json-file/node_modules/pify/index.js new file mode 100644 index 0000000..7c720eb --- /dev/null +++ b/node_modules/load-json-file/node_modules/pify/index.js @@ -0,0 +1,68 @@ +'use strict'; + +var processFn = function (fn, P, opts) { + return function () { + var that = this; + var args = new Array(arguments.length); + + for (var i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P(function (resolve, reject) { + args.push(function (err, result) { + if (err) { + reject(err); + } else if (opts.multiArgs) { + var results = new Array(arguments.length - 1); + + for (var i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + + fn.apply(that, args); + }); + }; +}; + +var pify = module.exports = function (obj, P, opts) { + if (typeof P !== 'function') { + opts = P; + P = Promise; + } + + opts = opts || {}; + opts.exclude = opts.exclude || [/.+Sync$/]; + + var filter = function (key) { + var match = function (pattern) { + return typeof pattern === 'string' ? key === pattern : pattern.test(key); + }; + + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + var ret = typeof obj === 'function' ? function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, P, opts).apply(this, arguments); + } : {}; + + return Object.keys(obj).reduce(function (ret, key) { + var x = obj[key]; + + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x; + + return ret; + }, ret); +}; + +pify.all = pify; diff --git a/node_modules/load-json-file/node_modules/pify/license b/node_modules/load-json-file/node_modules/pify/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/load-json-file/node_modules/pify/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/node_modules/load-json-file/node_modules/pify/package.json b/node_modules/load-json-file/node_modules/pify/package.json new file mode 100644 index 0000000..aea7d6c --- /dev/null +++ b/node_modules/load-json-file/node_modules/pify/package.json @@ -0,0 +1,80 @@ +{ + "_from": "pify@^2.0.0", + "_id": "pify@2.3.0", + "_inBundle": false, + "_integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "_location": "/load-json-file/pify", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pify@^2.0.0", + "name": "pify", + "escapedName": "pify", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "_shasum": "ed141a6ac043a849ea588498e7dca8b15330e90c", + "_spec": "pify@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/load-json-file", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/pify/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Promisify a callback-style function", + "devDependencies": { + "ava": "*", + "pinkie-promise": "^1.0.0", + "v8-natives": "0.0.2", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/pify#readme", + "keywords": [ + "promise", + "promises", + "promisify", + "denodify", + "denodeify", + "callback", + "cb", + "node", + "then", + "thenify", + "convert", + "transform", + "wrap", + "wrapper", + "bind", + "to", + "async", + "es2015" + ], + "license": "MIT", + "name": "pify", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pify.git" + }, + "scripts": { + "optimization-test": "node --allow-natives-syntax optimization-test.js", + "test": "xo && ava && npm run optimization-test" + }, + "version": "2.3.0" +} diff --git a/node_modules/load-json-file/node_modules/pify/readme.md b/node_modules/load-json-file/node_modules/pify/readme.md new file mode 100644 index 0000000..c79ca8b --- /dev/null +++ b/node_modules/load-json-file/node_modules/pify/readme.md @@ -0,0 +1,119 @@ +# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) + +> Promisify a callback-style function + + +## Install + +``` +$ npm install --save pify +``` + + +## Usage + +```js +const fs = require('fs'); +const pify = require('pify'); + +// promisify a single function + +pify(fs.readFile)('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); + +// or promisify all methods in a module + +pify(fs).readFile('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); +``` + + +## API + +### pify(input, [promiseModule], [options]) + +Returns a promise wrapped version of the supplied function or module. + +#### input + +Type: `function`, `object` + +Callback-style function or module whose methods you want to promisify. + +#### promiseModule + +Type: `function` + +Custom promise module to use instead of the native one. + +Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. + +#### options + +##### multiArgs + +Type: `boolean` +Default: `false` + +By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. + +```js +const request = require('request'); +const pify = require('pify'); + +pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { + const [httpResponse, body] = result; +}); +``` + +##### include + +Type: `array` of (`string`|`regex`) + +Methods in a module to promisify. Remaining methods will be left untouched. + +##### exclude + +Type: `array` of (`string`|`regex`) +Default: `[/.+Sync$/]` + +Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. + +##### excludeMain + +Type: `boolean` +Default: `false` + +By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module. + +```js +const pify = require('pify'); + +function fn() { + return true; +} + +fn.method = (data, callback) => { + setImmediate(() => { + callback(data, null); + }); +}; + +// promisify methods but not fn() +const promiseFn = pify(fn, {excludeMain: true}); + +if (promiseFn()) { + promiseFn.method('hi').then(data => { + console.log(data); + }); +} +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/load-json-file/package.json b/node_modules/load-json-file/package.json new file mode 100644 index 0000000..2338665 --- /dev/null +++ b/node_modules/load-json-file/package.json @@ -0,0 +1,75 @@ +{ + "_from": "load-json-file@^2.0.0", + "_id": "load-json-file@2.0.0", + "_inBundle": false, + "_integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "_location": "/load-json-file", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "load-json-file@^2.0.0", + "name": "load-json-file", + "escapedName": "load-json-file", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/read-pkg" + ], + "_resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "_shasum": "7947e42149af80d696cbf797bcaabcfe1fe29ca8", + "_spec": "load-json-file@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/read-pkg", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/load-json-file/issues" + }, + "bundleDependencies": false, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "deprecated": false, + "description": "Read and parse a JSON file", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/load-json-file#readme", + "keywords": [ + "read", + "json", + "parse", + "file", + "fs", + "graceful", + "load" + ], + "license": "MIT", + "name": "load-json-file", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/load-json-file.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/load-json-file/readme.md b/node_modules/load-json-file/readme.md new file mode 100644 index 0000000..3319c26 --- /dev/null +++ b/node_modules/load-json-file/readme.md @@ -0,0 +1,45 @@ +# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file) + +> Read and parse a JSON file + +[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json). + + +## Install + +``` +$ npm install --save load-json-file +``` + + +## Usage + +```js +const loadJsonFile = require('load-json-file'); + +loadJsonFile('foo.json').then(json => { + console.log(json); + //=> {foo: true} +}); +``` + + +## API + +### loadJsonFile(filepath) + +Returns a promise for the parsed JSON. + +### loadJsonFile.sync(filepath) + +Returns the parsed JSON. + + +## Related + +- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/locate-path/index.js b/node_modules/locate-path/index.js new file mode 100644 index 0000000..32b108d --- /dev/null +++ b/node_modules/locate-path/index.js @@ -0,0 +1,24 @@ +'use strict'; +const path = require('path'); +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +module.exports = (iterable, opts) => { + opts = Object.assign({ + cwd: process.cwd() + }, opts); + + return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts); +}; + +module.exports.sync = (iterable, opts) => { + opts = Object.assign({ + cwd: process.cwd() + }, opts); + + for (const el of iterable) { + if (pathExists.sync(path.resolve(opts.cwd, el))) { + return el; + } + } +}; diff --git a/node_modules/locate-path/license b/node_modules/locate-path/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/locate-path/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/node_modules/locate-path/package.json b/node_modules/locate-path/package.json new file mode 100644 index 0000000..ad9e2e8 --- /dev/null +++ b/node_modules/locate-path/package.json @@ -0,0 +1,79 @@ +{ + "_from": "locate-path@^2.0.0", + "_id": "locate-path@2.0.0", + "_inBundle": false, + "_integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "_location": "/locate-path", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "locate-path@^2.0.0", + "name": "locate-path", + "escapedName": "locate-path", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/find-up" + ], + "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "_shasum": "2b568b265eec944c6d9c0de9c3dbbbca0354cd8e", + "_spec": "locate-path@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/find-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/locate-path/issues" + }, + "bundleDependencies": false, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "deprecated": false, + "description": "Get the first path that exists on disk of multiple paths", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/locate-path#readme", + "keywords": [ + "locate", + "path", + "paths", + "file", + "files", + "exists", + "find", + "finder", + "search", + "searcher", + "array", + "iterable", + "iterator" + ], + "license": "MIT", + "name": "locate-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/locate-path.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/locate-path/readme.md b/node_modules/locate-path/readme.md new file mode 100644 index 0000000..f7b337b --- /dev/null +++ b/node_modules/locate-path/readme.md @@ -0,0 +1,99 @@ +# 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 --save 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' +]; + +locatePath(files).then(foundPath => { + console.log(foundPath); + //=> 'rainbow' +}); +``` + + +## API + +### locatePath(input, [options]) + +Returns a `Promise` for the first path that exists or `undefined` if none exists. + +#### input + +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 `input` 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. + +### locatePath.sync(input, [options]) + +Returns the first path that exists or `undefined` if none exists. + +#### input + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### cwd + +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/node_modules/lodash/LICENSE b/node_modules/lodash/LICENSE new file mode 100644 index 0000000..c6f2f61 --- /dev/null +++ b/node_modules/lodash/LICENSE @@ -0,0 +1,47 @@ +Copyright JS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash/README.md b/node_modules/lodash/README.md new file mode 100644 index 0000000..da3bcc1 --- /dev/null +++ b/node_modules/lodash/README.md @@ -0,0 +1,39 @@ +# lodash v4.17.5 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.17.5-npm) for more details. + +**Note:**
    +Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 63-64, Firefox 57-58, IE 11, Edge 14, Safari 10-11, Node.js 4-9, & PhantomJS 2.1.1.
    +Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/node_modules/lodash/_DataView.js b/node_modules/lodash/_DataView.js new file mode 100644 index 0000000..ac2d57c --- /dev/null +++ b/node_modules/lodash/_DataView.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; diff --git a/node_modules/lodash/_Hash.js b/node_modules/lodash/_Hash.js new file mode 100644 index 0000000..b504fe3 --- /dev/null +++ b/node_modules/lodash/_Hash.js @@ -0,0 +1,32 @@ +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; diff --git a/node_modules/lodash/_LazyWrapper.js b/node_modules/lodash/_LazyWrapper.js new file mode 100644 index 0000000..81786c7 --- /dev/null +++ b/node_modules/lodash/_LazyWrapper.js @@ -0,0 +1,28 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; +} + +// Ensure `LazyWrapper` is an instance of `baseLodash`. +LazyWrapper.prototype = baseCreate(baseLodash.prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +module.exports = LazyWrapper; diff --git a/node_modules/lodash/_ListCache.js b/node_modules/lodash/_ListCache.js new file mode 100644 index 0000000..26895c3 --- /dev/null +++ b/node_modules/lodash/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/node_modules/lodash/_LodashWrapper.js b/node_modules/lodash/_LodashWrapper.js new file mode 100644 index 0000000..c1e4d9d --- /dev/null +++ b/node_modules/lodash/_LodashWrapper.js @@ -0,0 +1,22 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ +function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; +} + +LodashWrapper.prototype = baseCreate(baseLodash.prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +module.exports = LodashWrapper; diff --git a/node_modules/lodash/_Map.js b/node_modules/lodash/_Map.js new file mode 100644 index 0000000..b73f29a --- /dev/null +++ b/node_modules/lodash/_Map.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; diff --git a/node_modules/lodash/_MapCache.js b/node_modules/lodash/_MapCache.js new file mode 100644 index 0000000..4a4eea7 --- /dev/null +++ b/node_modules/lodash/_MapCache.js @@ -0,0 +1,32 @@ +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; diff --git a/node_modules/lodash/_Promise.js b/node_modules/lodash/_Promise.js new file mode 100644 index 0000000..247b9e1 --- /dev/null +++ b/node_modules/lodash/_Promise.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); + +module.exports = Promise; diff --git a/node_modules/lodash/_Set.js b/node_modules/lodash/_Set.js new file mode 100644 index 0000000..b3c8dcb --- /dev/null +++ b/node_modules/lodash/_Set.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); + +module.exports = Set; diff --git a/node_modules/lodash/_SetCache.js b/node_modules/lodash/_SetCache.js new file mode 100644 index 0000000..6468b06 --- /dev/null +++ b/node_modules/lodash/_SetCache.js @@ -0,0 +1,27 @@ +var MapCache = require('./_MapCache'), + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; diff --git a/node_modules/lodash/_Stack.js b/node_modules/lodash/_Stack.js new file mode 100644 index 0000000..80b2cf1 --- /dev/null +++ b/node_modules/lodash/_Stack.js @@ -0,0 +1,27 @@ +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), + stackDelete = require('./_stackDelete'), + stackGet = require('./_stackGet'), + stackHas = require('./_stackHas'), + stackSet = require('./_stackSet'); + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +module.exports = Stack; diff --git a/node_modules/lodash/_Symbol.js b/node_modules/lodash/_Symbol.js new file mode 100644 index 0000000..a013f7c --- /dev/null +++ b/node_modules/lodash/_Symbol.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; diff --git a/node_modules/lodash/_Uint8Array.js b/node_modules/lodash/_Uint8Array.js new file mode 100644 index 0000000..2fb30e1 --- /dev/null +++ b/node_modules/lodash/_Uint8Array.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; diff --git a/node_modules/lodash/_WeakMap.js b/node_modules/lodash/_WeakMap.js new file mode 100644 index 0000000..567f86c --- /dev/null +++ b/node_modules/lodash/_WeakMap.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); + +module.exports = WeakMap; diff --git a/node_modules/lodash/_apply.js b/node_modules/lodash/_apply.js new file mode 100644 index 0000000..36436dd --- /dev/null +++ b/node_modules/lodash/_apply.js @@ -0,0 +1,21 @@ +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; diff --git a/node_modules/lodash/_arrayAggregator.js b/node_modules/lodash/_arrayAggregator.js new file mode 100644 index 0000000..d96c3ca --- /dev/null +++ b/node_modules/lodash/_arrayAggregator.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; +} + +module.exports = arrayAggregator; diff --git a/node_modules/lodash/_arrayEach.js b/node_modules/lodash/_arrayEach.js new file mode 100644 index 0000000..2c5f579 --- /dev/null +++ b/node_modules/lodash/_arrayEach.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; diff --git a/node_modules/lodash/_arrayEachRight.js b/node_modules/lodash/_arrayEachRight.js new file mode 100644 index 0000000..976ca5c --- /dev/null +++ b/node_modules/lodash/_arrayEachRight.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEachRight; diff --git a/node_modules/lodash/_arrayEvery.js b/node_modules/lodash/_arrayEvery.js new file mode 100644 index 0000000..e26a918 --- /dev/null +++ b/node_modules/lodash/_arrayEvery.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; diff --git a/node_modules/lodash/_arrayFilter.js b/node_modules/lodash/_arrayFilter.js new file mode 100644 index 0000000..75ea254 --- /dev/null +++ b/node_modules/lodash/_arrayFilter.js @@ -0,0 +1,25 @@ +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = arrayFilter; diff --git a/node_modules/lodash/_arrayIncludes.js b/node_modules/lodash/_arrayIncludes.js new file mode 100644 index 0000000..3737a6d --- /dev/null +++ b/node_modules/lodash/_arrayIncludes.js @@ -0,0 +1,17 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; diff --git a/node_modules/lodash/_arrayIncludesWith.js b/node_modules/lodash/_arrayIncludesWith.js new file mode 100644 index 0000000..235fd97 --- /dev/null +++ b/node_modules/lodash/_arrayIncludesWith.js @@ -0,0 +1,22 @@ +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +module.exports = arrayIncludesWith; diff --git a/node_modules/lodash/_arrayLikeKeys.js b/node_modules/lodash/_arrayLikeKeys.js new file mode 100644 index 0000000..b2ec9ce --- /dev/null +++ b/node_modules/lodash/_arrayLikeKeys.js @@ -0,0 +1,49 @@ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; diff --git a/node_modules/lodash/_arrayMap.js b/node_modules/lodash/_arrayMap.js new file mode 100644 index 0000000..22b2246 --- /dev/null +++ b/node_modules/lodash/_arrayMap.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; diff --git a/node_modules/lodash/_arrayPush.js b/node_modules/lodash/_arrayPush.js new file mode 100644 index 0000000..7d742b3 --- /dev/null +++ b/node_modules/lodash/_arrayPush.js @@ -0,0 +1,20 @@ +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; diff --git a/node_modules/lodash/_arrayReduce.js b/node_modules/lodash/_arrayReduce.js new file mode 100644 index 0000000..de8b79b --- /dev/null +++ b/node_modules/lodash/_arrayReduce.js @@ -0,0 +1,26 @@ +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +module.exports = arrayReduce; diff --git a/node_modules/lodash/_arrayReduceRight.js b/node_modules/lodash/_arrayReduceRight.js new file mode 100644 index 0000000..22d8976 --- /dev/null +++ b/node_modules/lodash/_arrayReduceRight.js @@ -0,0 +1,24 @@ +/** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; +} + +module.exports = arrayReduceRight; diff --git a/node_modules/lodash/_arraySample.js b/node_modules/lodash/_arraySample.js new file mode 100644 index 0000000..fcab010 --- /dev/null +++ b/node_modules/lodash/_arraySample.js @@ -0,0 +1,15 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ +function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; +} + +module.exports = arraySample; diff --git a/node_modules/lodash/_arraySampleSize.js b/node_modules/lodash/_arraySampleSize.js new file mode 100644 index 0000000..8c7e364 --- /dev/null +++ b/node_modules/lodash/_arraySampleSize.js @@ -0,0 +1,17 @@ +var baseClamp = require('./_baseClamp'), + copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); +} + +module.exports = arraySampleSize; diff --git a/node_modules/lodash/_arrayShuffle.js b/node_modules/lodash/_arrayShuffle.js new file mode 100644 index 0000000..46313a3 --- /dev/null +++ b/node_modules/lodash/_arrayShuffle.js @@ -0,0 +1,15 @@ +var copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); +} + +module.exports = arrayShuffle; diff --git a/node_modules/lodash/_arraySome.js b/node_modules/lodash/_arraySome.js new file mode 100644 index 0000000..6fd02fd --- /dev/null +++ b/node_modules/lodash/_arraySome.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; diff --git a/node_modules/lodash/_asciiSize.js b/node_modules/lodash/_asciiSize.js new file mode 100644 index 0000000..11d29c3 --- /dev/null +++ b/node_modules/lodash/_asciiSize.js @@ -0,0 +1,12 @@ +var baseProperty = require('./_baseProperty'); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; diff --git a/node_modules/lodash/_asciiToArray.js b/node_modules/lodash/_asciiToArray.js new file mode 100644 index 0000000..8e3dd5b --- /dev/null +++ b/node_modules/lodash/_asciiToArray.js @@ -0,0 +1,12 @@ +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; diff --git a/node_modules/lodash/_asciiWords.js b/node_modules/lodash/_asciiWords.js new file mode 100644 index 0000000..d765f0f --- /dev/null +++ b/node_modules/lodash/_asciiWords.js @@ -0,0 +1,15 @@ +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +module.exports = asciiWords; diff --git a/node_modules/lodash/_assignMergeValue.js b/node_modules/lodash/_assignMergeValue.js new file mode 100644 index 0000000..cb1185e --- /dev/null +++ b/node_modules/lodash/_assignMergeValue.js @@ -0,0 +1,20 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignMergeValue; diff --git a/node_modules/lodash/_assignValue.js b/node_modules/lodash/_assignValue.js new file mode 100644 index 0000000..4083957 --- /dev/null +++ b/node_modules/lodash/_assignValue.js @@ -0,0 +1,28 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; diff --git a/node_modules/lodash/_assocIndexOf.js b/node_modules/lodash/_assocIndexOf.js new file mode 100644 index 0000000..5b77a2b --- /dev/null +++ b/node_modules/lodash/_assocIndexOf.js @@ -0,0 +1,21 @@ +var eq = require('./eq'); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; diff --git a/node_modules/lodash/_baseAggregator.js b/node_modules/lodash/_baseAggregator.js new file mode 100644 index 0000000..4bc9e91 --- /dev/null +++ b/node_modules/lodash/_baseAggregator.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; +} + +module.exports = baseAggregator; diff --git a/node_modules/lodash/_baseAssign.js b/node_modules/lodash/_baseAssign.js new file mode 100644 index 0000000..e5c4a1a --- /dev/null +++ b/node_modules/lodash/_baseAssign.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keys = require('./keys'); + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +module.exports = baseAssign; diff --git a/node_modules/lodash/_baseAssignIn.js b/node_modules/lodash/_baseAssignIn.js new file mode 100644 index 0000000..6624f90 --- /dev/null +++ b/node_modules/lodash/_baseAssignIn.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; diff --git a/node_modules/lodash/_baseAssignValue.js b/node_modules/lodash/_baseAssignValue.js new file mode 100644 index 0000000..d6f66ef --- /dev/null +++ b/node_modules/lodash/_baseAssignValue.js @@ -0,0 +1,25 @@ +var defineProperty = require('./_defineProperty'); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; diff --git a/node_modules/lodash/_baseAt.js b/node_modules/lodash/_baseAt.js new file mode 100644 index 0000000..90e4237 --- /dev/null +++ b/node_modules/lodash/_baseAt.js @@ -0,0 +1,23 @@ +var get = require('./get'); + +/** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ +function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; +} + +module.exports = baseAt; diff --git a/node_modules/lodash/_baseClamp.js b/node_modules/lodash/_baseClamp.js new file mode 100644 index 0000000..a1c5692 --- /dev/null +++ b/node_modules/lodash/_baseClamp.js @@ -0,0 +1,22 @@ +/** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ +function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; +} + +module.exports = baseClamp; diff --git a/node_modules/lodash/_baseClone.js b/node_modules/lodash/_baseClone.js new file mode 100644 index 0000000..6f73684 --- /dev/null +++ b/node_modules/lodash/_baseClone.js @@ -0,0 +1,171 @@ +var Stack = require('./_Stack'), + arrayEach = require('./_arrayEach'), + assignValue = require('./_assignValue'), + baseAssign = require('./_baseAssign'), + baseAssignIn = require('./_baseAssignIn'), + cloneBuffer = require('./_cloneBuffer'), + copyArray = require('./_copyArray'), + copySymbols = require('./_copySymbols'), + copySymbolsIn = require('./_copySymbolsIn'), + getAllKeys = require('./_getAllKeys'), + getAllKeysIn = require('./_getAllKeysIn'), + getTag = require('./_getTag'), + initCloneArray = require('./_initCloneArray'), + initCloneByTag = require('./_initCloneByTag'), + initCloneObject = require('./_initCloneObject'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isMap = require('./isMap'), + isObject = require('./isObject'), + isSet = require('./isSet'), + keys = require('./keys'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + + return result; + } + + if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + + return result; + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +module.exports = baseClone; diff --git a/node_modules/lodash/_baseConforms.js b/node_modules/lodash/_baseConforms.js new file mode 100644 index 0000000..947e20d --- /dev/null +++ b/node_modules/lodash/_baseConforms.js @@ -0,0 +1,18 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ +function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; +} + +module.exports = baseConforms; diff --git a/node_modules/lodash/_baseConformsTo.js b/node_modules/lodash/_baseConformsTo.js new file mode 100644 index 0000000..e449cb8 --- /dev/null +++ b/node_modules/lodash/_baseConformsTo.js @@ -0,0 +1,27 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/node_modules/lodash/_baseCreate.js b/node_modules/lodash/_baseCreate.js new file mode 100644 index 0000000..ffa6a52 --- /dev/null +++ b/node_modules/lodash/_baseCreate.js @@ -0,0 +1,30 @@ +var isObject = require('./isObject'); + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +module.exports = baseCreate; diff --git a/node_modules/lodash/_baseDelay.js b/node_modules/lodash/_baseDelay.js new file mode 100644 index 0000000..1486d69 --- /dev/null +++ b/node_modules/lodash/_baseDelay.js @@ -0,0 +1,21 @@ +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ +function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); +} + +module.exports = baseDelay; diff --git a/node_modules/lodash/_baseDifference.js b/node_modules/lodash/_baseDifference.js new file mode 100644 index 0000000..343ac19 --- /dev/null +++ b/node_modules/lodash/_baseDifference.js @@ -0,0 +1,67 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +module.exports = baseDifference; diff --git a/node_modules/lodash/_baseEach.js b/node_modules/lodash/_baseEach.js new file mode 100644 index 0000000..512c067 --- /dev/null +++ b/node_modules/lodash/_baseEach.js @@ -0,0 +1,14 @@ +var baseForOwn = require('./_baseForOwn'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; diff --git a/node_modules/lodash/_baseEachRight.js b/node_modules/lodash/_baseEachRight.js new file mode 100644 index 0000000..0a8feec --- /dev/null +++ b/node_modules/lodash/_baseEachRight.js @@ -0,0 +1,14 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEachRight = createBaseEach(baseForOwnRight, true); + +module.exports = baseEachRight; diff --git a/node_modules/lodash/_baseEvery.js b/node_modules/lodash/_baseEvery.js new file mode 100644 index 0000000..fa52f7b --- /dev/null +++ b/node_modules/lodash/_baseEvery.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; diff --git a/node_modules/lodash/_baseExtremum.js b/node_modules/lodash/_baseExtremum.js new file mode 100644 index 0000000..9d6aa77 --- /dev/null +++ b/node_modules/lodash/_baseExtremum.js @@ -0,0 +1,32 @@ +var isSymbol = require('./isSymbol'); + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +module.exports = baseExtremum; diff --git a/node_modules/lodash/_baseFill.js b/node_modules/lodash/_baseFill.js new file mode 100644 index 0000000..46ef9c7 --- /dev/null +++ b/node_modules/lodash/_baseFill.js @@ -0,0 +1,32 @@ +var toInteger = require('./toInteger'), + toLength = require('./toLength'); + +/** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ +function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; +} + +module.exports = baseFill; diff --git a/node_modules/lodash/_baseFilter.js b/node_modules/lodash/_baseFilter.js new file mode 100644 index 0000000..4678477 --- /dev/null +++ b/node_modules/lodash/_baseFilter.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +module.exports = baseFilter; diff --git a/node_modules/lodash/_baseFindIndex.js b/node_modules/lodash/_baseFindIndex.js new file mode 100644 index 0000000..e3f5d8a --- /dev/null +++ b/node_modules/lodash/_baseFindIndex.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = baseFindIndex; diff --git a/node_modules/lodash/_baseFindKey.js b/node_modules/lodash/_baseFindKey.js new file mode 100644 index 0000000..2e430f3 --- /dev/null +++ b/node_modules/lodash/_baseFindKey.js @@ -0,0 +1,23 @@ +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; diff --git a/node_modules/lodash/_baseFlatten.js b/node_modules/lodash/_baseFlatten.js new file mode 100644 index 0000000..4b1e009 --- /dev/null +++ b/node_modules/lodash/_baseFlatten.js @@ -0,0 +1,38 @@ +var arrayPush = require('./_arrayPush'), + isFlattenable = require('./_isFlattenable'); + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; diff --git a/node_modules/lodash/_baseFor.js b/node_modules/lodash/_baseFor.js new file mode 100644 index 0000000..d946590 --- /dev/null +++ b/node_modules/lodash/_baseFor.js @@ -0,0 +1,16 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; diff --git a/node_modules/lodash/_baseForOwn.js b/node_modules/lodash/_baseForOwn.js new file mode 100644 index 0000000..503d523 --- /dev/null +++ b/node_modules/lodash/_baseForOwn.js @@ -0,0 +1,16 @@ +var baseFor = require('./_baseFor'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; diff --git a/node_modules/lodash/_baseForOwnRight.js b/node_modules/lodash/_baseForOwnRight.js new file mode 100644 index 0000000..a4b10e6 --- /dev/null +++ b/node_modules/lodash/_baseForOwnRight.js @@ -0,0 +1,16 @@ +var baseForRight = require('./_baseForRight'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); +} + +module.exports = baseForOwnRight; diff --git a/node_modules/lodash/_baseForRight.js b/node_modules/lodash/_baseForRight.js new file mode 100644 index 0000000..32842cd --- /dev/null +++ b/node_modules/lodash/_baseForRight.js @@ -0,0 +1,15 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseForRight = createBaseFor(true); + +module.exports = baseForRight; diff --git a/node_modules/lodash/_baseFunctions.js b/node_modules/lodash/_baseFunctions.js new file mode 100644 index 0000000..d23bc9b --- /dev/null +++ b/node_modules/lodash/_baseFunctions.js @@ -0,0 +1,19 @@ +var arrayFilter = require('./_arrayFilter'), + isFunction = require('./isFunction'); + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ +function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); +} + +module.exports = baseFunctions; diff --git a/node_modules/lodash/_baseGet.js b/node_modules/lodash/_baseGet.js new file mode 100644 index 0000000..a194913 --- /dev/null +++ b/node_modules/lodash/_baseGet.js @@ -0,0 +1,24 @@ +var castPath = require('./_castPath'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; diff --git a/node_modules/lodash/_baseGetAllKeys.js b/node_modules/lodash/_baseGetAllKeys.js new file mode 100644 index 0000000..8ad204e --- /dev/null +++ b/node_modules/lodash/_baseGetAllKeys.js @@ -0,0 +1,20 @@ +var arrayPush = require('./_arrayPush'), + isArray = require('./isArray'); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; diff --git a/node_modules/lodash/_baseGetTag.js b/node_modules/lodash/_baseGetTag.js new file mode 100644 index 0000000..b927ccc --- /dev/null +++ b/node_modules/lodash/_baseGetTag.js @@ -0,0 +1,28 @@ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; diff --git a/node_modules/lodash/_baseGt.js b/node_modules/lodash/_baseGt.js new file mode 100644 index 0000000..502d273 --- /dev/null +++ b/node_modules/lodash/_baseGt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +module.exports = baseGt; diff --git a/node_modules/lodash/_baseHas.js b/node_modules/lodash/_baseHas.js new file mode 100644 index 0000000..1b73032 --- /dev/null +++ b/node_modules/lodash/_baseHas.js @@ -0,0 +1,19 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); +} + +module.exports = baseHas; diff --git a/node_modules/lodash/_baseHasIn.js b/node_modules/lodash/_baseHasIn.js new file mode 100644 index 0000000..2e0d042 --- /dev/null +++ b/node_modules/lodash/_baseHasIn.js @@ -0,0 +1,13 @@ +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; diff --git a/node_modules/lodash/_baseInRange.js b/node_modules/lodash/_baseInRange.js new file mode 100644 index 0000000..ec95666 --- /dev/null +++ b/node_modules/lodash/_baseInRange.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ +function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); +} + +module.exports = baseInRange; diff --git a/node_modules/lodash/_baseIndexOf.js b/node_modules/lodash/_baseIndexOf.js new file mode 100644 index 0000000..167e706 --- /dev/null +++ b/node_modules/lodash/_baseIndexOf.js @@ -0,0 +1,20 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictIndexOf = require('./_strictIndexOf'); + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; diff --git a/node_modules/lodash/_baseIndexOfWith.js b/node_modules/lodash/_baseIndexOfWith.js new file mode 100644 index 0000000..f815fe0 --- /dev/null +++ b/node_modules/lodash/_baseIndexOfWith.js @@ -0,0 +1,23 @@ +/** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOfWith; diff --git a/node_modules/lodash/_baseIntersection.js b/node_modules/lodash/_baseIntersection.js new file mode 100644 index 0000000..c1d250c --- /dev/null +++ b/node_modules/lodash/_baseIntersection.js @@ -0,0 +1,74 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseIntersection; diff --git a/node_modules/lodash/_baseInverter.js b/node_modules/lodash/_baseInverter.js new file mode 100644 index 0000000..fbc337f --- /dev/null +++ b/node_modules/lodash/_baseInverter.js @@ -0,0 +1,21 @@ +var baseForOwn = require('./_baseForOwn'); + +/** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ +function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; +} + +module.exports = baseInverter; diff --git a/node_modules/lodash/_baseInvoke.js b/node_modules/lodash/_baseInvoke.js new file mode 100644 index 0000000..49bcf3c --- /dev/null +++ b/node_modules/lodash/_baseInvoke.js @@ -0,0 +1,24 @@ +var apply = require('./_apply'), + castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ +function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); +} + +module.exports = baseInvoke; diff --git a/node_modules/lodash/_baseIsArguments.js b/node_modules/lodash/_baseIsArguments.js new file mode 100644 index 0000000..b3562cc --- /dev/null +++ b/node_modules/lodash/_baseIsArguments.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; diff --git a/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/lodash/_baseIsArrayBuffer.js new file mode 100644 index 0000000..a2c4f30 --- /dev/null +++ b/node_modules/lodash/_baseIsArrayBuffer.js @@ -0,0 +1,17 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/node_modules/lodash/_baseIsDate.js b/node_modules/lodash/_baseIsDate.js new file mode 100644 index 0000000..ba67c78 --- /dev/null +++ b/node_modules/lodash/_baseIsDate.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/node_modules/lodash/_baseIsEqual.js b/node_modules/lodash/_baseIsEqual.js new file mode 100644 index 0000000..00a68a4 --- /dev/null +++ b/node_modules/lodash/_baseIsEqual.js @@ -0,0 +1,28 @@ +var baseIsEqualDeep = require('./_baseIsEqualDeep'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; diff --git a/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/lodash/_baseIsEqualDeep.js new file mode 100644 index 0000000..e3cfd6a --- /dev/null +++ b/node_modules/lodash/_baseIsEqualDeep.js @@ -0,0 +1,83 @@ +var Stack = require('./_Stack'), + equalArrays = require('./_equalArrays'), + equalByTag = require('./_equalByTag'), + equalObjects = require('./_equalObjects'), + getTag = require('./_getTag'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isTypedArray = require('./isTypedArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +module.exports = baseIsEqualDeep; diff --git a/node_modules/lodash/_baseIsMap.js b/node_modules/lodash/_baseIsMap.js new file mode 100644 index 0000000..02a4021 --- /dev/null +++ b/node_modules/lodash/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/node_modules/lodash/_baseIsMatch.js b/node_modules/lodash/_baseIsMatch.js new file mode 100644 index 0000000..72494be --- /dev/null +++ b/node_modules/lodash/_baseIsMatch.js @@ -0,0 +1,62 @@ +var Stack = require('./_Stack'), + baseIsEqual = require('./_baseIsEqual'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; diff --git a/node_modules/lodash/_baseIsNaN.js b/node_modules/lodash/_baseIsNaN.js new file mode 100644 index 0000000..316f1eb --- /dev/null +++ b/node_modules/lodash/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/node_modules/lodash/_baseIsNative.js b/node_modules/lodash/_baseIsNative.js new file mode 100644 index 0000000..8702330 --- /dev/null +++ b/node_modules/lodash/_baseIsNative.js @@ -0,0 +1,47 @@ +var isFunction = require('./isFunction'), + isMasked = require('./_isMasked'), + isObject = require('./isObject'), + toSource = require('./_toSource'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; diff --git a/node_modules/lodash/_baseIsRegExp.js b/node_modules/lodash/_baseIsRegExp.js new file mode 100644 index 0000000..6cd7c1a --- /dev/null +++ b/node_modules/lodash/_baseIsRegExp.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/node_modules/lodash/_baseIsSet.js b/node_modules/lodash/_baseIsSet.js new file mode 100644 index 0000000..6dee367 --- /dev/null +++ b/node_modules/lodash/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/node_modules/lodash/_baseIsTypedArray.js b/node_modules/lodash/_baseIsTypedArray.js new file mode 100644 index 0000000..1edb32f --- /dev/null +++ b/node_modules/lodash/_baseIsTypedArray.js @@ -0,0 +1,60 @@ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; diff --git a/node_modules/lodash/_baseIteratee.js b/node_modules/lodash/_baseIteratee.js new file mode 100644 index 0000000..995c257 --- /dev/null +++ b/node_modules/lodash/_baseIteratee.js @@ -0,0 +1,31 @@ +var baseMatches = require('./_baseMatches'), + baseMatchesProperty = require('./_baseMatchesProperty'), + identity = require('./identity'), + isArray = require('./isArray'), + property = require('./property'); + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} + +module.exports = baseIteratee; diff --git a/node_modules/lodash/_baseKeys.js b/node_modules/lodash/_baseKeys.js new file mode 100644 index 0000000..45e9e6f --- /dev/null +++ b/node_modules/lodash/_baseKeys.js @@ -0,0 +1,30 @@ +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; diff --git a/node_modules/lodash/_baseKeysIn.js b/node_modules/lodash/_baseKeysIn.js new file mode 100644 index 0000000..ea8a0a1 --- /dev/null +++ b/node_modules/lodash/_baseKeysIn.js @@ -0,0 +1,33 @@ +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; diff --git a/node_modules/lodash/_baseLodash.js b/node_modules/lodash/_baseLodash.js new file mode 100644 index 0000000..f76c790 --- /dev/null +++ b/node_modules/lodash/_baseLodash.js @@ -0,0 +1,10 @@ +/** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +module.exports = baseLodash; diff --git a/node_modules/lodash/_baseLt.js b/node_modules/lodash/_baseLt.js new file mode 100644 index 0000000..8674d29 --- /dev/null +++ b/node_modules/lodash/_baseLt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +module.exports = baseLt; diff --git a/node_modules/lodash/_baseMap.js b/node_modules/lodash/_baseMap.js new file mode 100644 index 0000000..0bf5cea --- /dev/null +++ b/node_modules/lodash/_baseMap.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'), + isArrayLike = require('./isArrayLike'); + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +module.exports = baseMap; diff --git a/node_modules/lodash/_baseMatches.js b/node_modules/lodash/_baseMatches.js new file mode 100644 index 0000000..e56582a --- /dev/null +++ b/node_modules/lodash/_baseMatches.js @@ -0,0 +1,22 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'), + matchesStrictComparable = require('./_matchesStrictComparable'); + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} + +module.exports = baseMatches; diff --git a/node_modules/lodash/_baseMatchesProperty.js b/node_modules/lodash/_baseMatchesProperty.js new file mode 100644 index 0000000..24afd89 --- /dev/null +++ b/node_modules/lodash/_baseMatchesProperty.js @@ -0,0 +1,33 @@ +var baseIsEqual = require('./_baseIsEqual'), + get = require('./get'), + hasIn = require('./hasIn'), + isKey = require('./_isKey'), + isStrictComparable = require('./_isStrictComparable'), + matchesStrictComparable = require('./_matchesStrictComparable'), + toKey = require('./_toKey'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +module.exports = baseMatchesProperty; diff --git a/node_modules/lodash/_baseMean.js b/node_modules/lodash/_baseMean.js new file mode 100644 index 0000000..fa9e00a --- /dev/null +++ b/node_modules/lodash/_baseMean.js @@ -0,0 +1,20 @@ +var baseSum = require('./_baseSum'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ +function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; +} + +module.exports = baseMean; diff --git a/node_modules/lodash/_baseMerge.js b/node_modules/lodash/_baseMerge.js new file mode 100644 index 0000000..c5868f0 --- /dev/null +++ b/node_modules/lodash/_baseMerge.js @@ -0,0 +1,42 @@ +var Stack = require('./_Stack'), + assignMergeValue = require('./_assignMergeValue'), + baseFor = require('./_baseFor'), + baseMergeDeep = require('./_baseMergeDeep'), + isObject = require('./isObject'), + keysIn = require('./keysIn'), + safeGet = require('./_safeGet'); + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +module.exports = baseMerge; diff --git a/node_modules/lodash/_baseMergeDeep.js b/node_modules/lodash/_baseMergeDeep.js new file mode 100644 index 0000000..2ed7283 --- /dev/null +++ b/node_modules/lodash/_baseMergeDeep.js @@ -0,0 +1,94 @@ +var assignMergeValue = require('./_assignMergeValue'), + cloneBuffer = require('./_cloneBuffer'), + cloneTypedArray = require('./_cloneTypedArray'), + copyArray = require('./_copyArray'), + initCloneObject = require('./_initCloneObject'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLikeObject = require('./isArrayLikeObject'), + isBuffer = require('./isBuffer'), + isFunction = require('./isFunction'), + isObject = require('./isObject'), + isPlainObject = require('./isPlainObject'), + isTypedArray = require('./isTypedArray'), + safeGet = require('./_safeGet'), + toPlainObject = require('./toPlainObject'); + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +module.exports = baseMergeDeep; diff --git a/node_modules/lodash/_baseNth.js b/node_modules/lodash/_baseNth.js new file mode 100644 index 0000000..0403c2a --- /dev/null +++ b/node_modules/lodash/_baseNth.js @@ -0,0 +1,20 @@ +var isIndex = require('./_isIndex'); + +/** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ +function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; +} + +module.exports = baseNth; diff --git a/node_modules/lodash/_baseOrderBy.js b/node_modules/lodash/_baseOrderBy.js new file mode 100644 index 0000000..d8a46ab --- /dev/null +++ b/node_modules/lodash/_baseOrderBy.js @@ -0,0 +1,34 @@ +var arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), + baseSortBy = require('./_baseSortBy'), + baseUnary = require('./_baseUnary'), + compareMultiple = require('./_compareMultiple'), + identity = require('./identity'); + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} + +module.exports = baseOrderBy; diff --git a/node_modules/lodash/_basePick.js b/node_modules/lodash/_basePick.js new file mode 100644 index 0000000..09b458a --- /dev/null +++ b/node_modules/lodash/_basePick.js @@ -0,0 +1,19 @@ +var basePickBy = require('./_basePickBy'), + hasIn = require('./hasIn'); + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} + +module.exports = basePick; diff --git a/node_modules/lodash/_basePickBy.js b/node_modules/lodash/_basePickBy.js new file mode 100644 index 0000000..85be68c --- /dev/null +++ b/node_modules/lodash/_basePickBy.js @@ -0,0 +1,30 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'), + castPath = require('./_castPath'); + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} + +module.exports = basePickBy; diff --git a/node_modules/lodash/_baseProperty.js b/node_modules/lodash/_baseProperty.js new file mode 100644 index 0000000..496281e --- /dev/null +++ b/node_modules/lodash/_baseProperty.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; diff --git a/node_modules/lodash/_basePropertyDeep.js b/node_modules/lodash/_basePropertyDeep.js new file mode 100644 index 0000000..1e5aae5 --- /dev/null +++ b/node_modules/lodash/_basePropertyDeep.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} + +module.exports = basePropertyDeep; diff --git a/node_modules/lodash/_basePropertyOf.js b/node_modules/lodash/_basePropertyOf.js new file mode 100644 index 0000000..4617399 --- /dev/null +++ b/node_modules/lodash/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/node_modules/lodash/_basePullAll.js b/node_modules/lodash/_basePullAll.js new file mode 100644 index 0000000..305720e --- /dev/null +++ b/node_modules/lodash/_basePullAll.js @@ -0,0 +1,51 @@ +var arrayMap = require('./_arrayMap'), + baseIndexOf = require('./_baseIndexOf'), + baseIndexOfWith = require('./_baseIndexOfWith'), + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ +function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = basePullAll; diff --git a/node_modules/lodash/_basePullAt.js b/node_modules/lodash/_basePullAt.js new file mode 100644 index 0000000..c3e9e71 --- /dev/null +++ b/node_modules/lodash/_basePullAt.js @@ -0,0 +1,37 @@ +var baseUnset = require('./_baseUnset'), + isIndex = require('./_isIndex'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ +function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; +} + +module.exports = basePullAt; diff --git a/node_modules/lodash/_baseRandom.js b/node_modules/lodash/_baseRandom.js new file mode 100644 index 0000000..94f76a7 --- /dev/null +++ b/node_modules/lodash/_baseRandom.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeRandom = Math.random; + +/** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ +function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); +} + +module.exports = baseRandom; diff --git a/node_modules/lodash/_baseRange.js b/node_modules/lodash/_baseRange.js new file mode 100644 index 0000000..0fb8e41 --- /dev/null +++ b/node_modules/lodash/_baseRange.js @@ -0,0 +1,28 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +module.exports = baseRange; diff --git a/node_modules/lodash/_baseReduce.js b/node_modules/lodash/_baseReduce.js new file mode 100644 index 0000000..5a1f8b5 --- /dev/null +++ b/node_modules/lodash/_baseReduce.js @@ -0,0 +1,23 @@ +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +module.exports = baseReduce; diff --git a/node_modules/lodash/_baseRepeat.js b/node_modules/lodash/_baseRepeat.js new file mode 100644 index 0000000..ee44c31 --- /dev/null +++ b/node_modules/lodash/_baseRepeat.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +module.exports = baseRepeat; diff --git a/node_modules/lodash/_baseRest.js b/node_modules/lodash/_baseRest.js new file mode 100644 index 0000000..d0dc4bd --- /dev/null +++ b/node_modules/lodash/_baseRest.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; diff --git a/node_modules/lodash/_baseSample.js b/node_modules/lodash/_baseSample.js new file mode 100644 index 0000000..58582b9 --- /dev/null +++ b/node_modules/lodash/_baseSample.js @@ -0,0 +1,15 @@ +var arraySample = require('./_arraySample'), + values = require('./values'); + +/** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ +function baseSample(collection) { + return arraySample(values(collection)); +} + +module.exports = baseSample; diff --git a/node_modules/lodash/_baseSampleSize.js b/node_modules/lodash/_baseSampleSize.js new file mode 100644 index 0000000..5c90ec5 --- /dev/null +++ b/node_modules/lodash/_baseSampleSize.js @@ -0,0 +1,18 @@ +var baseClamp = require('./_baseClamp'), + shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); +} + +module.exports = baseSampleSize; diff --git a/node_modules/lodash/_baseSet.js b/node_modules/lodash/_baseSet.js new file mode 100644 index 0000000..612a24c --- /dev/null +++ b/node_modules/lodash/_baseSet.js @@ -0,0 +1,47 @@ +var assignValue = require('./_assignValue'), + castPath = require('./_castPath'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +module.exports = baseSet; diff --git a/node_modules/lodash/_baseSetData.js b/node_modules/lodash/_baseSetData.js new file mode 100644 index 0000000..c409947 --- /dev/null +++ b/node_modules/lodash/_baseSetData.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + metaMap = require('./_metaMap'); + +/** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; +}; + +module.exports = baseSetData; diff --git a/node_modules/lodash/_baseSetToString.js b/node_modules/lodash/_baseSetToString.js new file mode 100644 index 0000000..89eaca3 --- /dev/null +++ b/node_modules/lodash/_baseSetToString.js @@ -0,0 +1,22 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + identity = require('./identity'); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; diff --git a/node_modules/lodash/_baseShuffle.js b/node_modules/lodash/_baseShuffle.js new file mode 100644 index 0000000..023077a --- /dev/null +++ b/node_modules/lodash/_baseShuffle.js @@ -0,0 +1,15 @@ +var shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function baseShuffle(collection) { + return shuffleSelf(values(collection)); +} + +module.exports = baseShuffle; diff --git a/node_modules/lodash/_baseSlice.js b/node_modules/lodash/_baseSlice.js new file mode 100644 index 0000000..786f6c9 --- /dev/null +++ b/node_modules/lodash/_baseSlice.js @@ -0,0 +1,31 @@ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/node_modules/lodash/_baseSome.js b/node_modules/lodash/_baseSome.js new file mode 100644 index 0000000..58f3f44 --- /dev/null +++ b/node_modules/lodash/_baseSome.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; +} + +module.exports = baseSome; diff --git a/node_modules/lodash/_baseSortBy.js b/node_modules/lodash/_baseSortBy.js new file mode 100644 index 0000000..a25c92e --- /dev/null +++ b/node_modules/lodash/_baseSortBy.js @@ -0,0 +1,21 @@ +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +module.exports = baseSortBy; diff --git a/node_modules/lodash/_baseSortedIndex.js b/node_modules/lodash/_baseSortedIndex.js new file mode 100644 index 0000000..638c366 --- /dev/null +++ b/node_modules/lodash/_baseSortedIndex.js @@ -0,0 +1,42 @@ +var baseSortedIndexBy = require('./_baseSortedIndexBy'), + identity = require('./identity'), + isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); +} + +module.exports = baseSortedIndex; diff --git a/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/lodash/_baseSortedIndexBy.js new file mode 100644 index 0000000..bb22e36 --- /dev/null +++ b/node_modules/lodash/_baseSortedIndexBy.js @@ -0,0 +1,64 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +module.exports = baseSortedIndexBy; diff --git a/node_modules/lodash/_baseSortedUniq.js b/node_modules/lodash/_baseSortedUniq.js new file mode 100644 index 0000000..802159a --- /dev/null +++ b/node_modules/lodash/_baseSortedUniq.js @@ -0,0 +1,30 @@ +var eq = require('./eq'); + +/** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; +} + +module.exports = baseSortedUniq; diff --git a/node_modules/lodash/_baseSum.js b/node_modules/lodash/_baseSum.js new file mode 100644 index 0000000..a9e84c1 --- /dev/null +++ b/node_modules/lodash/_baseSum.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ +function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; +} + +module.exports = baseSum; diff --git a/node_modules/lodash/_baseTimes.js b/node_modules/lodash/_baseTimes.js new file mode 100644 index 0000000..0603fc3 --- /dev/null +++ b/node_modules/lodash/_baseTimes.js @@ -0,0 +1,20 @@ +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; diff --git a/node_modules/lodash/_baseToNumber.js b/node_modules/lodash/_baseToNumber.js new file mode 100644 index 0000000..04859f3 --- /dev/null +++ b/node_modules/lodash/_baseToNumber.js @@ -0,0 +1,24 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ +function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; +} + +module.exports = baseToNumber; diff --git a/node_modules/lodash/_baseToPairs.js b/node_modules/lodash/_baseToPairs.js new file mode 100644 index 0000000..bff1991 --- /dev/null +++ b/node_modules/lodash/_baseToPairs.js @@ -0,0 +1,18 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ +function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); +} + +module.exports = baseToPairs; diff --git a/node_modules/lodash/_baseToString.js b/node_modules/lodash/_baseToString.js new file mode 100644 index 0000000..ada6ad2 --- /dev/null +++ b/node_modules/lodash/_baseToString.js @@ -0,0 +1,37 @@ +var Symbol = require('./_Symbol'), + arrayMap = require('./_arrayMap'), + isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; diff --git a/node_modules/lodash/_baseUnary.js b/node_modules/lodash/_baseUnary.js new file mode 100644 index 0000000..98639e9 --- /dev/null +++ b/node_modules/lodash/_baseUnary.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; diff --git a/node_modules/lodash/_baseUniq.js b/node_modules/lodash/_baseUniq.js new file mode 100644 index 0000000..aea459d --- /dev/null +++ b/node_modules/lodash/_baseUniq.js @@ -0,0 +1,72 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + cacheHas = require('./_cacheHas'), + createSet = require('./_createSet'), + setToArray = require('./_setToArray'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseUniq; diff --git a/node_modules/lodash/_baseUnset.js b/node_modules/lodash/_baseUnset.js new file mode 100644 index 0000000..eefc6e3 --- /dev/null +++ b/node_modules/lodash/_baseUnset.js @@ -0,0 +1,20 @@ +var castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ +function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; +} + +module.exports = baseUnset; diff --git a/node_modules/lodash/_baseUpdate.js b/node_modules/lodash/_baseUpdate.js new file mode 100644 index 0000000..92a6237 --- /dev/null +++ b/node_modules/lodash/_baseUpdate.js @@ -0,0 +1,18 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'); + +/** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); +} + +module.exports = baseUpdate; diff --git a/node_modules/lodash/_baseValues.js b/node_modules/lodash/_baseValues.js new file mode 100644 index 0000000..b95faad --- /dev/null +++ b/node_modules/lodash/_baseValues.js @@ -0,0 +1,19 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); +} + +module.exports = baseValues; diff --git a/node_modules/lodash/_baseWhile.js b/node_modules/lodash/_baseWhile.js new file mode 100644 index 0000000..07eac61 --- /dev/null +++ b/node_modules/lodash/_baseWhile.js @@ -0,0 +1,26 @@ +var baseSlice = require('./_baseSlice'); + +/** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ +function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); +} + +module.exports = baseWhile; diff --git a/node_modules/lodash/_baseWrapperValue.js b/node_modules/lodash/_baseWrapperValue.js new file mode 100644 index 0000000..443e0df --- /dev/null +++ b/node_modules/lodash/_baseWrapperValue.js @@ -0,0 +1,25 @@ +var LazyWrapper = require('./_LazyWrapper'), + arrayPush = require('./_arrayPush'), + arrayReduce = require('./_arrayReduce'); + +/** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ +function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); +} + +module.exports = baseWrapperValue; diff --git a/node_modules/lodash/_baseXor.js b/node_modules/lodash/_baseXor.js new file mode 100644 index 0000000..8e69338 --- /dev/null +++ b/node_modules/lodash/_baseXor.js @@ -0,0 +1,36 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseUniq = require('./_baseUniq'); + +/** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ +function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); +} + +module.exports = baseXor; diff --git a/node_modules/lodash/_baseZipObject.js b/node_modules/lodash/_baseZipObject.js new file mode 100644 index 0000000..401f85b --- /dev/null +++ b/node_modules/lodash/_baseZipObject.js @@ -0,0 +1,23 @@ +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +module.exports = baseZipObject; diff --git a/node_modules/lodash/_cacheHas.js b/node_modules/lodash/_cacheHas.js new file mode 100644 index 0000000..2dec892 --- /dev/null +++ b/node_modules/lodash/_cacheHas.js @@ -0,0 +1,13 @@ +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; diff --git a/node_modules/lodash/_castArrayLikeObject.js b/node_modules/lodash/_castArrayLikeObject.js new file mode 100644 index 0000000..92c75fa --- /dev/null +++ b/node_modules/lodash/_castArrayLikeObject.js @@ -0,0 +1,14 @@ +var isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ +function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; +} + +module.exports = castArrayLikeObject; diff --git a/node_modules/lodash/_castFunction.js b/node_modules/lodash/_castFunction.js new file mode 100644 index 0000000..98c91ae --- /dev/null +++ b/node_modules/lodash/_castFunction.js @@ -0,0 +1,14 @@ +var identity = require('./identity'); + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} + +module.exports = castFunction; diff --git a/node_modules/lodash/_castPath.js b/node_modules/lodash/_castPath.js new file mode 100644 index 0000000..017e4c1 --- /dev/null +++ b/node_modules/lodash/_castPath.js @@ -0,0 +1,21 @@ +var isArray = require('./isArray'), + isKey = require('./_isKey'), + stringToPath = require('./_stringToPath'), + toString = require('./toString'); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; diff --git a/node_modules/lodash/_castRest.js b/node_modules/lodash/_castRest.js new file mode 100644 index 0000000..213c66f --- /dev/null +++ b/node_modules/lodash/_castRest.js @@ -0,0 +1,14 @@ +var baseRest = require('./_baseRest'); + +/** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +var castRest = baseRest; + +module.exports = castRest; diff --git a/node_modules/lodash/_castSlice.js b/node_modules/lodash/_castSlice.js new file mode 100644 index 0000000..071faeb --- /dev/null +++ b/node_modules/lodash/_castSlice.js @@ -0,0 +1,18 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +module.exports = castSlice; diff --git a/node_modules/lodash/_charsEndIndex.js b/node_modules/lodash/_charsEndIndex.js new file mode 100644 index 0000000..07908ff --- /dev/null +++ b/node_modules/lodash/_charsEndIndex.js @@ -0,0 +1,19 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsEndIndex; diff --git a/node_modules/lodash/_charsStartIndex.js b/node_modules/lodash/_charsStartIndex.js new file mode 100644 index 0000000..b17afd2 --- /dev/null +++ b/node_modules/lodash/_charsStartIndex.js @@ -0,0 +1,20 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsStartIndex; diff --git a/node_modules/lodash/_cloneArrayBuffer.js b/node_modules/lodash/_cloneArrayBuffer.js new file mode 100644 index 0000000..c3d8f6e --- /dev/null +++ b/node_modules/lodash/_cloneArrayBuffer.js @@ -0,0 +1,16 @@ +var Uint8Array = require('./_Uint8Array'); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; diff --git a/node_modules/lodash/_cloneBuffer.js b/node_modules/lodash/_cloneBuffer.js new file mode 100644 index 0000000..27c4810 --- /dev/null +++ b/node_modules/lodash/_cloneBuffer.js @@ -0,0 +1,35 @@ +var root = require('./_root'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; diff --git a/node_modules/lodash/_cloneDataView.js b/node_modules/lodash/_cloneDataView.js new file mode 100644 index 0000000..9c9b7b0 --- /dev/null +++ b/node_modules/lodash/_cloneDataView.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +module.exports = cloneDataView; diff --git a/node_modules/lodash/_cloneRegExp.js b/node_modules/lodash/_cloneRegExp.js new file mode 100644 index 0000000..64a30df --- /dev/null +++ b/node_modules/lodash/_cloneRegExp.js @@ -0,0 +1,17 @@ +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +module.exports = cloneRegExp; diff --git a/node_modules/lodash/_cloneSymbol.js b/node_modules/lodash/_cloneSymbol.js new file mode 100644 index 0000000..bede39f --- /dev/null +++ b/node_modules/lodash/_cloneSymbol.js @@ -0,0 +1,18 @@ +var Symbol = require('./_Symbol'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +module.exports = cloneSymbol; diff --git a/node_modules/lodash/_cloneTypedArray.js b/node_modules/lodash/_cloneTypedArray.js new file mode 100644 index 0000000..7aad84d --- /dev/null +++ b/node_modules/lodash/_cloneTypedArray.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +module.exports = cloneTypedArray; diff --git a/node_modules/lodash/_compareAscending.js b/node_modules/lodash/_compareAscending.js new file mode 100644 index 0000000..8dc2791 --- /dev/null +++ b/node_modules/lodash/_compareAscending.js @@ -0,0 +1,41 @@ +var isSymbol = require('./isSymbol'); + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +module.exports = compareAscending; diff --git a/node_modules/lodash/_compareMultiple.js b/node_modules/lodash/_compareMultiple.js new file mode 100644 index 0000000..ad61f0f --- /dev/null +++ b/node_modules/lodash/_compareMultiple.js @@ -0,0 +1,44 @@ +var compareAscending = require('./_compareAscending'); + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +module.exports = compareMultiple; diff --git a/node_modules/lodash/_composeArgs.js b/node_modules/lodash/_composeArgs.js new file mode 100644 index 0000000..1ce40f4 --- /dev/null +++ b/node_modules/lodash/_composeArgs.js @@ -0,0 +1,39 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgs; diff --git a/node_modules/lodash/_composeArgsRight.js b/node_modules/lodash/_composeArgsRight.js new file mode 100644 index 0000000..8dc588d --- /dev/null +++ b/node_modules/lodash/_composeArgsRight.js @@ -0,0 +1,41 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; +} + +module.exports = composeArgsRight; diff --git a/node_modules/lodash/_copyArray.js b/node_modules/lodash/_copyArray.js new file mode 100644 index 0000000..cd94d5d --- /dev/null +++ b/node_modules/lodash/_copyArray.js @@ -0,0 +1,20 @@ +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = copyArray; diff --git a/node_modules/lodash/_copyObject.js b/node_modules/lodash/_copyObject.js new file mode 100644 index 0000000..2f2a5c2 --- /dev/null +++ b/node_modules/lodash/_copyObject.js @@ -0,0 +1,40 @@ +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; diff --git a/node_modules/lodash/_copySymbols.js b/node_modules/lodash/_copySymbols.js new file mode 100644 index 0000000..c35944a --- /dev/null +++ b/node_modules/lodash/_copySymbols.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbols = require('./_getSymbols'); + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +module.exports = copySymbols; diff --git a/node_modules/lodash/_copySymbolsIn.js b/node_modules/lodash/_copySymbolsIn.js new file mode 100644 index 0000000..fdf20a7 --- /dev/null +++ b/node_modules/lodash/_copySymbolsIn.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbolsIn = require('./_getSymbolsIn'); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; diff --git a/node_modules/lodash/_coreJsData.js b/node_modules/lodash/_coreJsData.js new file mode 100644 index 0000000..f8e5b4e --- /dev/null +++ b/node_modules/lodash/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/node_modules/lodash/_countHolders.js b/node_modules/lodash/_countHolders.js new file mode 100644 index 0000000..718fcda --- /dev/null +++ b/node_modules/lodash/_countHolders.js @@ -0,0 +1,21 @@ +/** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ +function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; +} + +module.exports = countHolders; diff --git a/node_modules/lodash/_createAggregator.js b/node_modules/lodash/_createAggregator.js new file mode 100644 index 0000000..0be42c4 --- /dev/null +++ b/node_modules/lodash/_createAggregator.js @@ -0,0 +1,23 @@ +var arrayAggregator = require('./_arrayAggregator'), + baseAggregator = require('./_baseAggregator'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; +} + +module.exports = createAggregator; diff --git a/node_modules/lodash/_createAssigner.js b/node_modules/lodash/_createAssigner.js new file mode 100644 index 0000000..1f904c5 --- /dev/null +++ b/node_modules/lodash/_createAssigner.js @@ -0,0 +1,37 @@ +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; diff --git a/node_modules/lodash/_createBaseEach.js b/node_modules/lodash/_createBaseEach.js new file mode 100644 index 0000000..d24fdd1 --- /dev/null +++ b/node_modules/lodash/_createBaseEach.js @@ -0,0 +1,32 @@ +var isArrayLike = require('./isArrayLike'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; diff --git a/node_modules/lodash/_createBaseFor.js b/node_modules/lodash/_createBaseFor.js new file mode 100644 index 0000000..94cbf29 --- /dev/null +++ b/node_modules/lodash/_createBaseFor.js @@ -0,0 +1,25 @@ +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; diff --git a/node_modules/lodash/_createBind.js b/node_modules/lodash/_createBind.js new file mode 100644 index 0000000..07cb99f --- /dev/null +++ b/node_modules/lodash/_createBind.js @@ -0,0 +1,28 @@ +var createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; +} + +module.exports = createBind; diff --git a/node_modules/lodash/_createCaseFirst.js b/node_modules/lodash/_createCaseFirst.js new file mode 100644 index 0000000..fe8ea48 --- /dev/null +++ b/node_modules/lodash/_createCaseFirst.js @@ -0,0 +1,33 @@ +var castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringToArray = require('./_stringToArray'), + toString = require('./toString'); + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +module.exports = createCaseFirst; diff --git a/node_modules/lodash/_createCompounder.js b/node_modules/lodash/_createCompounder.js new file mode 100644 index 0000000..8d4cee2 --- /dev/null +++ b/node_modules/lodash/_createCompounder.js @@ -0,0 +1,24 @@ +var arrayReduce = require('./_arrayReduce'), + deburr = require('./deburr'), + words = require('./words'); + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + +/** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; +} + +module.exports = createCompounder; diff --git a/node_modules/lodash/_createCtor.js b/node_modules/lodash/_createCtor.js new file mode 100644 index 0000000..9047aa5 --- /dev/null +++ b/node_modules/lodash/_createCtor.js @@ -0,0 +1,37 @@ +var baseCreate = require('./_baseCreate'), + isObject = require('./isObject'); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; +} + +module.exports = createCtor; diff --git a/node_modules/lodash/_createCurry.js b/node_modules/lodash/_createCurry.js new file mode 100644 index 0000000..f06c2cd --- /dev/null +++ b/node_modules/lodash/_createCurry.js @@ -0,0 +1,46 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; +} + +module.exports = createCurry; diff --git a/node_modules/lodash/_createFind.js b/node_modules/lodash/_createFind.js new file mode 100644 index 0000000..8859ff8 --- /dev/null +++ b/node_modules/lodash/_createFind.js @@ -0,0 +1,25 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/node_modules/lodash/_createFlow.js b/node_modules/lodash/_createFlow.js new file mode 100644 index 0000000..baaddbf --- /dev/null +++ b/node_modules/lodash/_createFlow.js @@ -0,0 +1,78 @@ +var LodashWrapper = require('./_LodashWrapper'), + flatRest = require('./_flatRest'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + isArray = require('./isArray'), + isLaziable = require('./_isLaziable'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ +function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); +} + +module.exports = createFlow; diff --git a/node_modules/lodash/_createHybrid.js b/node_modules/lodash/_createHybrid.js new file mode 100644 index 0000000..b671bd1 --- /dev/null +++ b/node_modules/lodash/_createHybrid.js @@ -0,0 +1,92 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + countHolders = require('./_countHolders'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + reorder = require('./_reorder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_ARY_FLAG = 128, + WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +module.exports = createHybrid; diff --git a/node_modules/lodash/_createInverter.js b/node_modules/lodash/_createInverter.js new file mode 100644 index 0000000..6c0c562 --- /dev/null +++ b/node_modules/lodash/_createInverter.js @@ -0,0 +1,17 @@ +var baseInverter = require('./_baseInverter'); + +/** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ +function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; +} + +module.exports = createInverter; diff --git a/node_modules/lodash/_createMathOperation.js b/node_modules/lodash/_createMathOperation.js new file mode 100644 index 0000000..f1e238a --- /dev/null +++ b/node_modules/lodash/_createMathOperation.js @@ -0,0 +1,38 @@ +var baseToNumber = require('./_baseToNumber'), + baseToString = require('./_baseToString'); + +/** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ +function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; +} + +module.exports = createMathOperation; diff --git a/node_modules/lodash/_createOver.js b/node_modules/lodash/_createOver.js new file mode 100644 index 0000000..3b94551 --- /dev/null +++ b/node_modules/lodash/_createOver.js @@ -0,0 +1,27 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + baseUnary = require('./_baseUnary'), + flatRest = require('./_flatRest'); + +/** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ +function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); +} + +module.exports = createOver; diff --git a/node_modules/lodash/_createPadding.js b/node_modules/lodash/_createPadding.js new file mode 100644 index 0000000..2124612 --- /dev/null +++ b/node_modules/lodash/_createPadding.js @@ -0,0 +1,33 @@ +var baseRepeat = require('./_baseRepeat'), + baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringSize = require('./_stringSize'), + stringToArray = require('./_stringToArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; + +/** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); +} + +module.exports = createPadding; diff --git a/node_modules/lodash/_createPartial.js b/node_modules/lodash/_createPartial.js new file mode 100644 index 0000000..e16c248 --- /dev/null +++ b/node_modules/lodash/_createPartial.js @@ -0,0 +1,43 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ +function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; +} + +module.exports = createPartial; diff --git a/node_modules/lodash/_createRange.js b/node_modules/lodash/_createRange.js new file mode 100644 index 0000000..9f52c77 --- /dev/null +++ b/node_modules/lodash/_createRange.js @@ -0,0 +1,30 @@ +var baseRange = require('./_baseRange'), + isIterateeCall = require('./_isIterateeCall'), + toFinite = require('./toFinite'); + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; +} + +module.exports = createRange; diff --git a/node_modules/lodash/_createRecurry.js b/node_modules/lodash/_createRecurry.js new file mode 100644 index 0000000..eb29fb2 --- /dev/null +++ b/node_modules/lodash/_createRecurry.js @@ -0,0 +1,56 @@ +var isLaziable = require('./_isLaziable'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); +} + +module.exports = createRecurry; diff --git a/node_modules/lodash/_createRelationalOperation.js b/node_modules/lodash/_createRelationalOperation.js new file mode 100644 index 0000000..a17c6b5 --- /dev/null +++ b/node_modules/lodash/_createRelationalOperation.js @@ -0,0 +1,20 @@ +var toNumber = require('./toNumber'); + +/** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ +function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; +} + +module.exports = createRelationalOperation; diff --git a/node_modules/lodash/_createRound.js b/node_modules/lodash/_createRound.js new file mode 100644 index 0000000..bf9b713 --- /dev/null +++ b/node_modules/lodash/_createRound.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'), + toNumber = require('./toNumber'), + toString = require('./toString'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ +function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; +} + +module.exports = createRound; diff --git a/node_modules/lodash/_createSet.js b/node_modules/lodash/_createSet.js new file mode 100644 index 0000000..0f644ee --- /dev/null +++ b/node_modules/lodash/_createSet.js @@ -0,0 +1,19 @@ +var Set = require('./_Set'), + noop = require('./noop'), + setToArray = require('./_setToArray'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +module.exports = createSet; diff --git a/node_modules/lodash/_createToPairs.js b/node_modules/lodash/_createToPairs.js new file mode 100644 index 0000000..568417a --- /dev/null +++ b/node_modules/lodash/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/node_modules/lodash/_createWrap.js b/node_modules/lodash/_createWrap.js new file mode 100644 index 0000000..33f0633 --- /dev/null +++ b/node_modules/lodash/_createWrap.js @@ -0,0 +1,106 @@ +var baseSetData = require('./_baseSetData'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), + getData = require('./_getData'), + mergeData = require('./_mergeData'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), + toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); +} + +module.exports = createWrap; diff --git a/node_modules/lodash/_customDefaultsAssignIn.js b/node_modules/lodash/_customDefaultsAssignIn.js new file mode 100644 index 0000000..1f49e6f --- /dev/null +++ b/node_modules/lodash/_customDefaultsAssignIn.js @@ -0,0 +1,29 @@ +var eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ +function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; +} + +module.exports = customDefaultsAssignIn; diff --git a/node_modules/lodash/_customDefaultsMerge.js b/node_modules/lodash/_customDefaultsMerge.js new file mode 100644 index 0000000..4cab317 --- /dev/null +++ b/node_modules/lodash/_customDefaultsMerge.js @@ -0,0 +1,28 @@ +var baseMerge = require('./_baseMerge'), + isObject = require('./isObject'); + +/** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ +function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; +} + +module.exports = customDefaultsMerge; diff --git a/node_modules/lodash/_customOmitClone.js b/node_modules/lodash/_customOmitClone.js new file mode 100644 index 0000000..968db2e --- /dev/null +++ b/node_modules/lodash/_customOmitClone.js @@ -0,0 +1,16 @@ +var isPlainObject = require('./isPlainObject'); + +/** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ +function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; +} + +module.exports = customOmitClone; diff --git a/node_modules/lodash/_deburrLetter.js b/node_modules/lodash/_deburrLetter.js new file mode 100644 index 0000000..3e531ed --- /dev/null +++ b/node_modules/lodash/_deburrLetter.js @@ -0,0 +1,71 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map Latin Unicode letters to basic Latin letters. */ +var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' +}; + +/** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +var deburrLetter = basePropertyOf(deburredLetters); + +module.exports = deburrLetter; diff --git a/node_modules/lodash/_defineProperty.js b/node_modules/lodash/_defineProperty.js new file mode 100644 index 0000000..b6116d9 --- /dev/null +++ b/node_modules/lodash/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; diff --git a/node_modules/lodash/_equalArrays.js b/node_modules/lodash/_equalArrays.js new file mode 100644 index 0000000..f6a3b7c --- /dev/null +++ b/node_modules/lodash/_equalArrays.js @@ -0,0 +1,83 @@ +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'), + cacheHas = require('./_cacheHas'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; diff --git a/node_modules/lodash/_equalByTag.js b/node_modules/lodash/_equalByTag.js new file mode 100644 index 0000000..71919e8 --- /dev/null +++ b/node_modules/lodash/_equalByTag.js @@ -0,0 +1,112 @@ +var Symbol = require('./_Symbol'), + Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), + equalArrays = require('./_equalArrays'), + mapToArray = require('./_mapToArray'), + setToArray = require('./_setToArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +module.exports = equalByTag; diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js new file mode 100644 index 0000000..17421f3 --- /dev/null +++ b/node_modules/lodash/_equalObjects.js @@ -0,0 +1,89 @@ +var getAllKeys = require('./_getAllKeys'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +module.exports = equalObjects; diff --git a/node_modules/lodash/_escapeHtmlChar.js b/node_modules/lodash/_escapeHtmlChar.js new file mode 100644 index 0000000..7ca68ee --- /dev/null +++ b/node_modules/lodash/_escapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; + +/** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +var escapeHtmlChar = basePropertyOf(htmlEscapes); + +module.exports = escapeHtmlChar; diff --git a/node_modules/lodash/_escapeStringChar.js b/node_modules/lodash/_escapeStringChar.js new file mode 100644 index 0000000..44eca96 --- /dev/null +++ b/node_modules/lodash/_escapeStringChar.js @@ -0,0 +1,22 @@ +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +module.exports = escapeStringChar; diff --git a/node_modules/lodash/_flatRest.js b/node_modules/lodash/_flatRest.js new file mode 100644 index 0000000..94ab6cc --- /dev/null +++ b/node_modules/lodash/_flatRest.js @@ -0,0 +1,16 @@ +var flatten = require('./flatten'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; diff --git a/node_modules/lodash/_freeGlobal.js b/node_modules/lodash/_freeGlobal.js new file mode 100644 index 0000000..bbec998 --- /dev/null +++ b/node_modules/lodash/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/node_modules/lodash/_getAllKeys.js b/node_modules/lodash/_getAllKeys.js new file mode 100644 index 0000000..a9ce699 --- /dev/null +++ b/node_modules/lodash/_getAllKeys.js @@ -0,0 +1,16 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbols = require('./_getSymbols'), + keys = require('./keys'); + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; diff --git a/node_modules/lodash/_getAllKeysIn.js b/node_modules/lodash/_getAllKeysIn.js new file mode 100644 index 0000000..1b46678 --- /dev/null +++ b/node_modules/lodash/_getAllKeysIn.js @@ -0,0 +1,17 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbolsIn = require('./_getSymbolsIn'), + keysIn = require('./keysIn'); + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} + +module.exports = getAllKeysIn; diff --git a/node_modules/lodash/_getData.js b/node_modules/lodash/_getData.js new file mode 100644 index 0000000..a1fe7b7 --- /dev/null +++ b/node_modules/lodash/_getData.js @@ -0,0 +1,15 @@ +var metaMap = require('./_metaMap'), + noop = require('./noop'); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; diff --git a/node_modules/lodash/_getFuncName.js b/node_modules/lodash/_getFuncName.js new file mode 100644 index 0000000..21e15b3 --- /dev/null +++ b/node_modules/lodash/_getFuncName.js @@ -0,0 +1,31 @@ +var realNames = require('./_realNames'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; diff --git a/node_modules/lodash/_getHolder.js b/node_modules/lodash/_getHolder.js new file mode 100644 index 0000000..65e94b5 --- /dev/null +++ b/node_modules/lodash/_getHolder.js @@ -0,0 +1,13 @@ +/** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ +function getHolder(func) { + var object = func; + return object.placeholder; +} + +module.exports = getHolder; diff --git a/node_modules/lodash/_getMapData.js b/node_modules/lodash/_getMapData.js new file mode 100644 index 0000000..17f6303 --- /dev/null +++ b/node_modules/lodash/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/node_modules/lodash/_getMatchData.js b/node_modules/lodash/_getMatchData.js new file mode 100644 index 0000000..2cc70f9 --- /dev/null +++ b/node_modules/lodash/_getMatchData.js @@ -0,0 +1,24 @@ +var isStrictComparable = require('./_isStrictComparable'), + keys = require('./keys'); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; diff --git a/node_modules/lodash/_getNative.js b/node_modules/lodash/_getNative.js new file mode 100644 index 0000000..97a622b --- /dev/null +++ b/node_modules/lodash/_getNative.js @@ -0,0 +1,17 @@ +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; diff --git a/node_modules/lodash/_getPrototype.js b/node_modules/lodash/_getPrototype.js new file mode 100644 index 0000000..e808612 --- /dev/null +++ b/node_modules/lodash/_getPrototype.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; diff --git a/node_modules/lodash/_getRawTag.js b/node_modules/lodash/_getRawTag.js new file mode 100644 index 0000000..49a95c9 --- /dev/null +++ b/node_modules/lodash/_getRawTag.js @@ -0,0 +1,46 @@ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; diff --git a/node_modules/lodash/_getSymbols.js b/node_modules/lodash/_getSymbols.js new file mode 100644 index 0000000..7d6eafe --- /dev/null +++ b/node_modules/lodash/_getSymbols.js @@ -0,0 +1,30 @@ +var arrayFilter = require('./_arrayFilter'), + stubArray = require('./stubArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +module.exports = getSymbols; diff --git a/node_modules/lodash/_getSymbolsIn.js b/node_modules/lodash/_getSymbolsIn.js new file mode 100644 index 0000000..cec0855 --- /dev/null +++ b/node_modules/lodash/_getSymbolsIn.js @@ -0,0 +1,25 @@ +var arrayPush = require('./_arrayPush'), + getPrototype = require('./_getPrototype'), + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; +}; + +module.exports = getSymbolsIn; diff --git a/node_modules/lodash/_getTag.js b/node_modules/lodash/_getTag.js new file mode 100644 index 0000000..deaf89d --- /dev/null +++ b/node_modules/lodash/_getTag.js @@ -0,0 +1,58 @@ +var DataView = require('./_DataView'), + Map = require('./_Map'), + Promise = require('./_Promise'), + Set = require('./_Set'), + WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), + toSource = require('./_toSource'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +module.exports = getTag; diff --git a/node_modules/lodash/_getValue.js b/node_modules/lodash/_getValue.js new file mode 100644 index 0000000..5f7d773 --- /dev/null +++ b/node_modules/lodash/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/node_modules/lodash/_getView.js b/node_modules/lodash/_getView.js new file mode 100644 index 0000000..df1e5d4 --- /dev/null +++ b/node_modules/lodash/_getView.js @@ -0,0 +1,33 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ +function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; +} + +module.exports = getView; diff --git a/node_modules/lodash/_getWrapDetails.js b/node_modules/lodash/_getWrapDetails.js new file mode 100644 index 0000000..3bcc6e4 --- /dev/null +++ b/node_modules/lodash/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/node_modules/lodash/_hasPath.js b/node_modules/lodash/_hasPath.js new file mode 100644 index 0000000..93dbde1 --- /dev/null +++ b/node_modules/lodash/_hasPath.js @@ -0,0 +1,39 @@ +var castPath = require('./_castPath'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isIndex = require('./_isIndex'), + isLength = require('./isLength'), + toKey = require('./_toKey'); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; diff --git a/node_modules/lodash/_hasUnicode.js b/node_modules/lodash/_hasUnicode.js new file mode 100644 index 0000000..cb6ca15 --- /dev/null +++ b/node_modules/lodash/_hasUnicode.js @@ -0,0 +1,26 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; diff --git a/node_modules/lodash/_hasUnicodeWord.js b/node_modules/lodash/_hasUnicodeWord.js new file mode 100644 index 0000000..a35d6e5 --- /dev/null +++ b/node_modules/lodash/_hasUnicodeWord.js @@ -0,0 +1,15 @@ +/** Used to detect strings that need a more robust regexp to match words. */ +var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +module.exports = hasUnicodeWord; diff --git a/node_modules/lodash/_hashClear.js b/node_modules/lodash/_hashClear.js new file mode 100644 index 0000000..5d4b70c --- /dev/null +++ b/node_modules/lodash/_hashClear.js @@ -0,0 +1,15 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; diff --git a/node_modules/lodash/_hashDelete.js b/node_modules/lodash/_hashDelete.js new file mode 100644 index 0000000..ea9dabf --- /dev/null +++ b/node_modules/lodash/_hashDelete.js @@ -0,0 +1,17 @@ +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; diff --git a/node_modules/lodash/_hashGet.js b/node_modules/lodash/_hashGet.js new file mode 100644 index 0000000..1fc2f34 --- /dev/null +++ b/node_modules/lodash/_hashGet.js @@ -0,0 +1,30 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; diff --git a/node_modules/lodash/_hashHas.js b/node_modules/lodash/_hashHas.js new file mode 100644 index 0000000..281a551 --- /dev/null +++ b/node_modules/lodash/_hashHas.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; diff --git a/node_modules/lodash/_hashSet.js b/node_modules/lodash/_hashSet.js new file mode 100644 index 0000000..e105528 --- /dev/null +++ b/node_modules/lodash/_hashSet.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; diff --git a/node_modules/lodash/_initCloneArray.js b/node_modules/lodash/_initCloneArray.js new file mode 100644 index 0000000..078c15a --- /dev/null +++ b/node_modules/lodash/_initCloneArray.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; diff --git a/node_modules/lodash/_initCloneByTag.js b/node_modules/lodash/_initCloneByTag.js new file mode 100644 index 0000000..f69a008 --- /dev/null +++ b/node_modules/lodash/_initCloneByTag.js @@ -0,0 +1,77 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'), + cloneDataView = require('./_cloneDataView'), + cloneRegExp = require('./_cloneRegExp'), + cloneSymbol = require('./_cloneSymbol'), + cloneTypedArray = require('./_cloneTypedArray'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } +} + +module.exports = initCloneByTag; diff --git a/node_modules/lodash/_initCloneObject.js b/node_modules/lodash/_initCloneObject.js new file mode 100644 index 0000000..5a13e64 --- /dev/null +++ b/node_modules/lodash/_initCloneObject.js @@ -0,0 +1,18 @@ +var baseCreate = require('./_baseCreate'), + getPrototype = require('./_getPrototype'), + isPrototype = require('./_isPrototype'); + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +module.exports = initCloneObject; diff --git a/node_modules/lodash/_insertWrapDetails.js b/node_modules/lodash/_insertWrapDetails.js new file mode 100644 index 0000000..e790808 --- /dev/null +++ b/node_modules/lodash/_insertWrapDetails.js @@ -0,0 +1,23 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/node_modules/lodash/_isFlattenable.js b/node_modules/lodash/_isFlattenable.js new file mode 100644 index 0000000..4cc2c24 --- /dev/null +++ b/node_modules/lodash/_isFlattenable.js @@ -0,0 +1,20 @@ +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), + isArray = require('./isArray'); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +module.exports = isFlattenable; diff --git a/node_modules/lodash/_isIndex.js b/node_modules/lodash/_isIndex.js new file mode 100644 index 0000000..061cd39 --- /dev/null +++ b/node_modules/lodash/_isIndex.js @@ -0,0 +1,25 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; diff --git a/node_modules/lodash/_isIterateeCall.js b/node_modules/lodash/_isIterateeCall.js new file mode 100644 index 0000000..a0bb5a9 --- /dev/null +++ b/node_modules/lodash/_isIterateeCall.js @@ -0,0 +1,30 @@ +var eq = require('./eq'), + isArrayLike = require('./isArrayLike'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +module.exports = isIterateeCall; diff --git a/node_modules/lodash/_isKey.js b/node_modules/lodash/_isKey.js new file mode 100644 index 0000000..ff08b06 --- /dev/null +++ b/node_modules/lodash/_isKey.js @@ -0,0 +1,29 @@ +var isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; diff --git a/node_modules/lodash/_isKeyable.js b/node_modules/lodash/_isKeyable.js new file mode 100644 index 0000000..39f1828 --- /dev/null +++ b/node_modules/lodash/_isKeyable.js @@ -0,0 +1,15 @@ +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; diff --git a/node_modules/lodash/_isLaziable.js b/node_modules/lodash/_isLaziable.js new file mode 100644 index 0000000..a57c4f2 --- /dev/null +++ b/node_modules/lodash/_isLaziable.js @@ -0,0 +1,28 @@ +var LazyWrapper = require('./_LazyWrapper'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + lodash = require('./wrapperLodash'); + +/** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; +} + +module.exports = isLaziable; diff --git a/node_modules/lodash/_isMaskable.js b/node_modules/lodash/_isMaskable.js new file mode 100644 index 0000000..eb98d09 --- /dev/null +++ b/node_modules/lodash/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/node_modules/lodash/_isMasked.js b/node_modules/lodash/_isMasked.js new file mode 100644 index 0000000..4b0f21b --- /dev/null +++ b/node_modules/lodash/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/node_modules/lodash/_isPrototype.js b/node_modules/lodash/_isPrototype.js new file mode 100644 index 0000000..0f29498 --- /dev/null +++ b/node_modules/lodash/_isPrototype.js @@ -0,0 +1,18 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; diff --git a/node_modules/lodash/_isStrictComparable.js b/node_modules/lodash/_isStrictComparable.js new file mode 100644 index 0000000..b59f40b --- /dev/null +++ b/node_modules/lodash/_isStrictComparable.js @@ -0,0 +1,15 @@ +var isObject = require('./isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; diff --git a/node_modules/lodash/_iteratorToArray.js b/node_modules/lodash/_iteratorToArray.js new file mode 100644 index 0000000..4768566 --- /dev/null +++ b/node_modules/lodash/_iteratorToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ +function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; +} + +module.exports = iteratorToArray; diff --git a/node_modules/lodash/_lazyClone.js b/node_modules/lodash/_lazyClone.js new file mode 100644 index 0000000..d8a51f8 --- /dev/null +++ b/node_modules/lodash/_lazyClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ +function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; +} + +module.exports = lazyClone; diff --git a/node_modules/lodash/_lazyReverse.js b/node_modules/lodash/_lazyReverse.js new file mode 100644 index 0000000..c5b5219 --- /dev/null +++ b/node_modules/lodash/_lazyReverse.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'); + +/** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ +function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; +} + +module.exports = lazyReverse; diff --git a/node_modules/lodash/_lazyValue.js b/node_modules/lodash/_lazyValue.js new file mode 100644 index 0000000..371ca8d --- /dev/null +++ b/node_modules/lodash/_lazyValue.js @@ -0,0 +1,69 @@ +var baseWrapperValue = require('./_baseWrapperValue'), + getView = require('./_getView'), + isArray = require('./isArray'); + +/** Used to indicate the type of lazy iteratees. */ +var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ +function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; +} + +module.exports = lazyValue; diff --git a/node_modules/lodash/_listCacheClear.js b/node_modules/lodash/_listCacheClear.js new file mode 100644 index 0000000..acbe39a --- /dev/null +++ b/node_modules/lodash/_listCacheClear.js @@ -0,0 +1,13 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; diff --git a/node_modules/lodash/_listCacheDelete.js b/node_modules/lodash/_listCacheDelete.js new file mode 100644 index 0000000..b1384ad --- /dev/null +++ b/node_modules/lodash/_listCacheDelete.js @@ -0,0 +1,35 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +module.exports = listCacheDelete; diff --git a/node_modules/lodash/_listCacheGet.js b/node_modules/lodash/_listCacheGet.js new file mode 100644 index 0000000..f8192fc --- /dev/null +++ b/node_modules/lodash/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/node_modules/lodash/_listCacheHas.js b/node_modules/lodash/_listCacheHas.js new file mode 100644 index 0000000..2adf671 --- /dev/null +++ b/node_modules/lodash/_listCacheHas.js @@ -0,0 +1,16 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; diff --git a/node_modules/lodash/_listCacheSet.js b/node_modules/lodash/_listCacheSet.js new file mode 100644 index 0000000..5855c95 --- /dev/null +++ b/node_modules/lodash/_listCacheSet.js @@ -0,0 +1,26 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/node_modules/lodash/_mapCacheClear.js b/node_modules/lodash/_mapCacheClear.js new file mode 100644 index 0000000..bc9ca20 --- /dev/null +++ b/node_modules/lodash/_mapCacheClear.js @@ -0,0 +1,21 @@ +var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), + Map = require('./_Map'); + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +module.exports = mapCacheClear; diff --git a/node_modules/lodash/_mapCacheDelete.js b/node_modules/lodash/_mapCacheDelete.js new file mode 100644 index 0000000..946ca3c --- /dev/null +++ b/node_modules/lodash/_mapCacheDelete.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; diff --git a/node_modules/lodash/_mapCacheGet.js b/node_modules/lodash/_mapCacheGet.js new file mode 100644 index 0000000..f29f55c --- /dev/null +++ b/node_modules/lodash/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/node_modules/lodash/_mapCacheHas.js b/node_modules/lodash/_mapCacheHas.js new file mode 100644 index 0000000..a1214c0 --- /dev/null +++ b/node_modules/lodash/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/node_modules/lodash/_mapCacheSet.js b/node_modules/lodash/_mapCacheSet.js new file mode 100644 index 0000000..7346849 --- /dev/null +++ b/node_modules/lodash/_mapCacheSet.js @@ -0,0 +1,22 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; diff --git a/node_modules/lodash/_mapToArray.js b/node_modules/lodash/_mapToArray.js new file mode 100644 index 0000000..fe3dd53 --- /dev/null +++ b/node_modules/lodash/_mapToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +module.exports = mapToArray; diff --git a/node_modules/lodash/_matchesStrictComparable.js b/node_modules/lodash/_matchesStrictComparable.js new file mode 100644 index 0000000..f608af9 --- /dev/null +++ b/node_modules/lodash/_matchesStrictComparable.js @@ -0,0 +1,20 @@ +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +module.exports = matchesStrictComparable; diff --git a/node_modules/lodash/_memoizeCapped.js b/node_modules/lodash/_memoizeCapped.js new file mode 100644 index 0000000..7f71c8f --- /dev/null +++ b/node_modules/lodash/_memoizeCapped.js @@ -0,0 +1,26 @@ +var memoize = require('./memoize'); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; diff --git a/node_modules/lodash/_mergeData.js b/node_modules/lodash/_mergeData.js new file mode 100644 index 0000000..cb570f9 --- /dev/null +++ b/node_modules/lodash/_mergeData.js @@ -0,0 +1,90 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + replaceHolders = require('./_replaceHolders'); + +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ +function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; +} + +module.exports = mergeData; diff --git a/node_modules/lodash/_metaMap.js b/node_modules/lodash/_metaMap.js new file mode 100644 index 0000000..0157a0b --- /dev/null +++ b/node_modules/lodash/_metaMap.js @@ -0,0 +1,6 @@ +var WeakMap = require('./_WeakMap'); + +/** Used to store function metadata. */ +var metaMap = WeakMap && new WeakMap; + +module.exports = metaMap; diff --git a/node_modules/lodash/_nativeCreate.js b/node_modules/lodash/_nativeCreate.js new file mode 100644 index 0000000..c7aede8 --- /dev/null +++ b/node_modules/lodash/_nativeCreate.js @@ -0,0 +1,6 @@ +var getNative = require('./_getNative'); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; diff --git a/node_modules/lodash/_nativeKeys.js b/node_modules/lodash/_nativeKeys.js new file mode 100644 index 0000000..479a104 --- /dev/null +++ b/node_modules/lodash/_nativeKeys.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; diff --git a/node_modules/lodash/_nativeKeysIn.js b/node_modules/lodash/_nativeKeysIn.js new file mode 100644 index 0000000..00ee505 --- /dev/null +++ b/node_modules/lodash/_nativeKeysIn.js @@ -0,0 +1,20 @@ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; diff --git a/node_modules/lodash/_nodeUtil.js b/node_modules/lodash/_nodeUtil.js new file mode 100644 index 0000000..14e179f --- /dev/null +++ b/node_modules/lodash/_nodeUtil.js @@ -0,0 +1,22 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/node_modules/lodash/_objectToString.js b/node_modules/lodash/_objectToString.js new file mode 100644 index 0000000..c614ec0 --- /dev/null +++ b/node_modules/lodash/_objectToString.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; diff --git a/node_modules/lodash/_overArg.js b/node_modules/lodash/_overArg.js new file mode 100644 index 0000000..651c5c5 --- /dev/null +++ b/node_modules/lodash/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/node_modules/lodash/_overRest.js b/node_modules/lodash/_overRest.js new file mode 100644 index 0000000..c7cdef3 --- /dev/null +++ b/node_modules/lodash/_overRest.js @@ -0,0 +1,36 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; diff --git a/node_modules/lodash/_parent.js b/node_modules/lodash/_parent.js new file mode 100644 index 0000000..f174328 --- /dev/null +++ b/node_modules/lodash/_parent.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'), + baseSlice = require('./_baseSlice'); + +/** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ +function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); +} + +module.exports = parent; diff --git a/node_modules/lodash/_reEscape.js b/node_modules/lodash/_reEscape.js new file mode 100644 index 0000000..7f47eda --- /dev/null +++ b/node_modules/lodash/_reEscape.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEscape = /<%-([\s\S]+?)%>/g; + +module.exports = reEscape; diff --git a/node_modules/lodash/_reEvaluate.js b/node_modules/lodash/_reEvaluate.js new file mode 100644 index 0000000..6adfc31 --- /dev/null +++ b/node_modules/lodash/_reEvaluate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEvaluate = /<%([\s\S]+?)%>/g; + +module.exports = reEvaluate; diff --git a/node_modules/lodash/_reInterpolate.js b/node_modules/lodash/_reInterpolate.js new file mode 100644 index 0000000..d02ff0b --- /dev/null +++ b/node_modules/lodash/_reInterpolate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; diff --git a/node_modules/lodash/_realNames.js b/node_modules/lodash/_realNames.js new file mode 100644 index 0000000..aa0d529 --- /dev/null +++ b/node_modules/lodash/_realNames.js @@ -0,0 +1,4 @@ +/** Used to lookup unminified function names. */ +var realNames = {}; + +module.exports = realNames; diff --git a/node_modules/lodash/_reorder.js b/node_modules/lodash/_reorder.js new file mode 100644 index 0000000..a3502b0 --- /dev/null +++ b/node_modules/lodash/_reorder.js @@ -0,0 +1,29 @@ +var copyArray = require('./_copyArray'), + isIndex = require('./_isIndex'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ +function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; +} + +module.exports = reorder; diff --git a/node_modules/lodash/_replaceHolders.js b/node_modules/lodash/_replaceHolders.js new file mode 100644 index 0000000..74360ec --- /dev/null +++ b/node_modules/lodash/_replaceHolders.js @@ -0,0 +1,29 @@ +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ +function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; +} + +module.exports = replaceHolders; diff --git a/node_modules/lodash/_root.js b/node_modules/lodash/_root.js new file mode 100644 index 0000000..d2852be --- /dev/null +++ b/node_modules/lodash/_root.js @@ -0,0 +1,9 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; diff --git a/node_modules/lodash/_safeGet.js b/node_modules/lodash/_safeGet.js new file mode 100644 index 0000000..2cc3137 --- /dev/null +++ b/node_modules/lodash/_safeGet.js @@ -0,0 +1,15 @@ +/** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + return key == '__proto__' + ? undefined + : object[key]; +} + +module.exports = safeGet; diff --git a/node_modules/lodash/_setCacheAdd.js b/node_modules/lodash/_setCacheAdd.js new file mode 100644 index 0000000..1081a74 --- /dev/null +++ b/node_modules/lodash/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/node_modules/lodash/_setCacheHas.js b/node_modules/lodash/_setCacheHas.js new file mode 100644 index 0000000..9a49255 --- /dev/null +++ b/node_modules/lodash/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/node_modules/lodash/_setData.js b/node_modules/lodash/_setData.js new file mode 100644 index 0000000..e5cf3eb --- /dev/null +++ b/node_modules/lodash/_setData.js @@ -0,0 +1,20 @@ +var baseSetData = require('./_baseSetData'), + shortOut = require('./_shortOut'); + +/** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var setData = shortOut(baseSetData); + +module.exports = setData; diff --git a/node_modules/lodash/_setToArray.js b/node_modules/lodash/_setToArray.js new file mode 100644 index 0000000..b87f074 --- /dev/null +++ b/node_modules/lodash/_setToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; diff --git a/node_modules/lodash/_setToPairs.js b/node_modules/lodash/_setToPairs.js new file mode 100644 index 0000000..36ad37a --- /dev/null +++ b/node_modules/lodash/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/node_modules/lodash/_setToString.js b/node_modules/lodash/_setToString.js new file mode 100644 index 0000000..6ca8419 --- /dev/null +++ b/node_modules/lodash/_setToString.js @@ -0,0 +1,14 @@ +var baseSetToString = require('./_baseSetToString'), + shortOut = require('./_shortOut'); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; diff --git a/node_modules/lodash/_setWrapToString.js b/node_modules/lodash/_setWrapToString.js new file mode 100644 index 0000000..decdc44 --- /dev/null +++ b/node_modules/lodash/_setWrapToString.js @@ -0,0 +1,21 @@ +var getWrapDetails = require('./_getWrapDetails'), + insertWrapDetails = require('./_insertWrapDetails'), + setToString = require('./_setToString'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); +} + +module.exports = setWrapToString; diff --git a/node_modules/lodash/_shortOut.js b/node_modules/lodash/_shortOut.js new file mode 100644 index 0000000..3300a07 --- /dev/null +++ b/node_modules/lodash/_shortOut.js @@ -0,0 +1,37 @@ +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; diff --git a/node_modules/lodash/_shuffleSelf.js b/node_modules/lodash/_shuffleSelf.js new file mode 100644 index 0000000..8bcc4f5 --- /dev/null +++ b/node_modules/lodash/_shuffleSelf.js @@ -0,0 +1,28 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +module.exports = shuffleSelf; diff --git a/node_modules/lodash/_stackClear.js b/node_modules/lodash/_stackClear.js new file mode 100644 index 0000000..ce8e5a9 --- /dev/null +++ b/node_modules/lodash/_stackClear.js @@ -0,0 +1,15 @@ +var ListCache = require('./_ListCache'); + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +module.exports = stackClear; diff --git a/node_modules/lodash/_stackDelete.js b/node_modules/lodash/_stackDelete.js new file mode 100644 index 0000000..ff9887a --- /dev/null +++ b/node_modules/lodash/_stackDelete.js @@ -0,0 +1,18 @@ +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +module.exports = stackDelete; diff --git a/node_modules/lodash/_stackGet.js b/node_modules/lodash/_stackGet.js new file mode 100644 index 0000000..1cdf004 --- /dev/null +++ b/node_modules/lodash/_stackGet.js @@ -0,0 +1,14 @@ +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +module.exports = stackGet; diff --git a/node_modules/lodash/_stackHas.js b/node_modules/lodash/_stackHas.js new file mode 100644 index 0000000..16a3ad1 --- /dev/null +++ b/node_modules/lodash/_stackHas.js @@ -0,0 +1,14 @@ +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +module.exports = stackHas; diff --git a/node_modules/lodash/_stackSet.js b/node_modules/lodash/_stackSet.js new file mode 100644 index 0000000..b790ac5 --- /dev/null +++ b/node_modules/lodash/_stackSet.js @@ -0,0 +1,34 @@ +var ListCache = require('./_ListCache'), + Map = require('./_Map'), + MapCache = require('./_MapCache'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; diff --git a/node_modules/lodash/_strictIndexOf.js b/node_modules/lodash/_strictIndexOf.js new file mode 100644 index 0000000..0486a49 --- /dev/null +++ b/node_modules/lodash/_strictIndexOf.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = strictIndexOf; diff --git a/node_modules/lodash/_strictLastIndexOf.js b/node_modules/lodash/_strictLastIndexOf.js new file mode 100644 index 0000000..d7310dc --- /dev/null +++ b/node_modules/lodash/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf; diff --git a/node_modules/lodash/_stringSize.js b/node_modules/lodash/_stringSize.js new file mode 100644 index 0000000..17ef462 --- /dev/null +++ b/node_modules/lodash/_stringSize.js @@ -0,0 +1,18 @@ +var asciiSize = require('./_asciiSize'), + hasUnicode = require('./_hasUnicode'), + unicodeSize = require('./_unicodeSize'); + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} + +module.exports = stringSize; diff --git a/node_modules/lodash/_stringToArray.js b/node_modules/lodash/_stringToArray.js new file mode 100644 index 0000000..d161158 --- /dev/null +++ b/node_modules/lodash/_stringToArray.js @@ -0,0 +1,18 @@ +var asciiToArray = require('./_asciiToArray'), + hasUnicode = require('./_hasUnicode'), + unicodeToArray = require('./_unicodeToArray'); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; diff --git a/node_modules/lodash/_stringToPath.js b/node_modules/lodash/_stringToPath.js new file mode 100644 index 0000000..8f39f8a --- /dev/null +++ b/node_modules/lodash/_stringToPath.js @@ -0,0 +1,27 @@ +var memoizeCapped = require('./_memoizeCapped'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +module.exports = stringToPath; diff --git a/node_modules/lodash/_toKey.js b/node_modules/lodash/_toKey.js new file mode 100644 index 0000000..c6d645c --- /dev/null +++ b/node_modules/lodash/_toKey.js @@ -0,0 +1,21 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; diff --git a/node_modules/lodash/_toSource.js b/node_modules/lodash/_toSource.js new file mode 100644 index 0000000..a020b38 --- /dev/null +++ b/node_modules/lodash/_toSource.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; diff --git a/node_modules/lodash/_unescapeHtmlChar.js b/node_modules/lodash/_unescapeHtmlChar.js new file mode 100644 index 0000000..a71fecb --- /dev/null +++ b/node_modules/lodash/_unescapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map HTML entities to characters. */ +var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}; + +/** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + +module.exports = unescapeHtmlChar; diff --git a/node_modules/lodash/_unicodeSize.js b/node_modules/lodash/_unicodeSize.js new file mode 100644 index 0000000..68137ec --- /dev/null +++ b/node_modules/lodash/_unicodeSize.js @@ -0,0 +1,44 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +module.exports = unicodeSize; diff --git a/node_modules/lodash/_unicodeToArray.js b/node_modules/lodash/_unicodeToArray.js new file mode 100644 index 0000000..2a725c0 --- /dev/null +++ b/node_modules/lodash/_unicodeToArray.js @@ -0,0 +1,40 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; diff --git a/node_modules/lodash/_unicodeWords.js b/node_modules/lodash/_unicodeWords.js new file mode 100644 index 0000000..e72e6e0 --- /dev/null +++ b/node_modules/lodash/_unicodeWords.js @@ -0,0 +1,69 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +module.exports = unicodeWords; diff --git a/node_modules/lodash/_updateWrapDetails.js b/node_modules/lodash/_updateWrapDetails.js new file mode 100644 index 0000000..8759fbd --- /dev/null +++ b/node_modules/lodash/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/node_modules/lodash/_wrapperClone.js b/node_modules/lodash/_wrapperClone.js new file mode 100644 index 0000000..7bb58a2 --- /dev/null +++ b/node_modules/lodash/_wrapperClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ +function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; +} + +module.exports = wrapperClone; diff --git a/node_modules/lodash/add.js b/node_modules/lodash/add.js new file mode 100644 index 0000000..f069515 --- /dev/null +++ b/node_modules/lodash/add.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ +var add = createMathOperation(function(augend, addend) { + return augend + addend; +}, 0); + +module.exports = add; diff --git a/node_modules/lodash/after.js b/node_modules/lodash/after.js new file mode 100644 index 0000000..3900c97 --- /dev/null +++ b/node_modules/lodash/after.js @@ -0,0 +1,42 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ +function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/node_modules/lodash/array.js b/node_modules/lodash/array.js new file mode 100644 index 0000000..af688d3 --- /dev/null +++ b/node_modules/lodash/array.js @@ -0,0 +1,67 @@ +module.exports = { + 'chunk': require('./chunk'), + 'compact': require('./compact'), + 'concat': require('./concat'), + 'difference': require('./difference'), + 'differenceBy': require('./differenceBy'), + 'differenceWith': require('./differenceWith'), + 'drop': require('./drop'), + 'dropRight': require('./dropRight'), + 'dropRightWhile': require('./dropRightWhile'), + 'dropWhile': require('./dropWhile'), + 'fill': require('./fill'), + 'findIndex': require('./findIndex'), + 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), + 'flatten': require('./flatten'), + 'flattenDeep': require('./flattenDeep'), + 'flattenDepth': require('./flattenDepth'), + 'fromPairs': require('./fromPairs'), + 'head': require('./head'), + 'indexOf': require('./indexOf'), + 'initial': require('./initial'), + 'intersection': require('./intersection'), + 'intersectionBy': require('./intersectionBy'), + 'intersectionWith': require('./intersectionWith'), + 'join': require('./join'), + 'last': require('./last'), + 'lastIndexOf': require('./lastIndexOf'), + 'nth': require('./nth'), + 'pull': require('./pull'), + 'pullAll': require('./pullAll'), + 'pullAllBy': require('./pullAllBy'), + 'pullAllWith': require('./pullAllWith'), + 'pullAt': require('./pullAt'), + 'remove': require('./remove'), + 'reverse': require('./reverse'), + 'slice': require('./slice'), + 'sortedIndex': require('./sortedIndex'), + 'sortedIndexBy': require('./sortedIndexBy'), + 'sortedIndexOf': require('./sortedIndexOf'), + 'sortedLastIndex': require('./sortedLastIndex'), + 'sortedLastIndexBy': require('./sortedLastIndexBy'), + 'sortedLastIndexOf': require('./sortedLastIndexOf'), + 'sortedUniq': require('./sortedUniq'), + 'sortedUniqBy': require('./sortedUniqBy'), + 'tail': require('./tail'), + 'take': require('./take'), + 'takeRight': require('./takeRight'), + 'takeRightWhile': require('./takeRightWhile'), + 'takeWhile': require('./takeWhile'), + 'union': require('./union'), + 'unionBy': require('./unionBy'), + 'unionWith': require('./unionWith'), + 'uniq': require('./uniq'), + 'uniqBy': require('./uniqBy'), + 'uniqWith': require('./uniqWith'), + 'unzip': require('./unzip'), + 'unzipWith': require('./unzipWith'), + 'without': require('./without'), + 'xor': require('./xor'), + 'xorBy': require('./xorBy'), + 'xorWith': require('./xorWith'), + 'zip': require('./zip'), + 'zipObject': require('./zipObject'), + 'zipObjectDeep': require('./zipObjectDeep'), + 'zipWith': require('./zipWith') +}; diff --git a/node_modules/lodash/ary.js b/node_modules/lodash/ary.js new file mode 100644 index 0000000..70c87d0 --- /dev/null +++ b/node_modules/lodash/ary.js @@ -0,0 +1,29 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_ARY_FLAG = 128; + +/** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/node_modules/lodash/assign.js b/node_modules/lodash/assign.js new file mode 100644 index 0000000..909db26 --- /dev/null +++ b/node_modules/lodash/assign.js @@ -0,0 +1,58 @@ +var assignValue = require('./_assignValue'), + copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + isArrayLike = require('./isArrayLike'), + isPrototype = require('./_isPrototype'), + keys = require('./keys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ +var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } +}); + +module.exports = assign; diff --git a/node_modules/lodash/assignIn.js b/node_modules/lodash/assignIn.js new file mode 100644 index 0000000..e663473 --- /dev/null +++ b/node_modules/lodash/assignIn.js @@ -0,0 +1,40 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ +var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); +}); + +module.exports = assignIn; diff --git a/node_modules/lodash/assignInWith.js b/node_modules/lodash/assignInWith.js new file mode 100644 index 0000000..68fcc0b --- /dev/null +++ b/node_modules/lodash/assignInWith.js @@ -0,0 +1,38 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); +}); + +module.exports = assignInWith; diff --git a/node_modules/lodash/assignWith.js b/node_modules/lodash/assignWith.js new file mode 100644 index 0000000..7dc6c76 --- /dev/null +++ b/node_modules/lodash/assignWith.js @@ -0,0 +1,37 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keys = require('./keys'); + +/** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); +}); + +module.exports = assignWith; diff --git a/node_modules/lodash/at.js b/node_modules/lodash/at.js new file mode 100644 index 0000000..781ee9e --- /dev/null +++ b/node_modules/lodash/at.js @@ -0,0 +1,23 @@ +var baseAt = require('./_baseAt'), + flatRest = require('./_flatRest'); + +/** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ +var at = flatRest(baseAt); + +module.exports = at; diff --git a/node_modules/lodash/attempt.js b/node_modules/lodash/attempt.js new file mode 100644 index 0000000..624d015 --- /dev/null +++ b/node_modules/lodash/attempt.js @@ -0,0 +1,35 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + isError = require('./isError'); + +/** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ +var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } +}); + +module.exports = attempt; diff --git a/node_modules/lodash/before.js b/node_modules/lodash/before.js new file mode 100644 index 0000000..a3e0a16 --- /dev/null +++ b/node_modules/lodash/before.js @@ -0,0 +1,40 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/node_modules/lodash/bind.js b/node_modules/lodash/bind.js new file mode 100644 index 0000000..b1076e9 --- /dev/null +++ b/node_modules/lodash/bind.js @@ -0,0 +1,57 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/node_modules/lodash/bindAll.js b/node_modules/lodash/bindAll.js new file mode 100644 index 0000000..a35706d --- /dev/null +++ b/node_modules/lodash/bindAll.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseAssignValue = require('./_baseAssignValue'), + bind = require('./bind'), + flatRest = require('./_flatRest'), + toKey = require('./_toKey'); + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ +var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; +}); + +module.exports = bindAll; diff --git a/node_modules/lodash/bindKey.js b/node_modules/lodash/bindKey.js new file mode 100644 index 0000000..f7fd64c --- /dev/null +++ b/node_modules/lodash/bindKey.js @@ -0,0 +1,68 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/node_modules/lodash/camelCase.js b/node_modules/lodash/camelCase.js new file mode 100644 index 0000000..d7390de --- /dev/null +++ b/node_modules/lodash/camelCase.js @@ -0,0 +1,29 @@ +var capitalize = require('./capitalize'), + createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ +var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); +}); + +module.exports = camelCase; diff --git a/node_modules/lodash/capitalize.js b/node_modules/lodash/capitalize.js new file mode 100644 index 0000000..3e1600e --- /dev/null +++ b/node_modules/lodash/capitalize.js @@ -0,0 +1,23 @@ +var toString = require('./toString'), + upperFirst = require('./upperFirst'); + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); +} + +module.exports = capitalize; diff --git a/node_modules/lodash/castArray.js b/node_modules/lodash/castArray.js new file mode 100644 index 0000000..e470bdb --- /dev/null +++ b/node_modules/lodash/castArray.js @@ -0,0 +1,44 @@ +var isArray = require('./isArray'); + +/** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ +function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; +} + +module.exports = castArray; diff --git a/node_modules/lodash/ceil.js b/node_modules/lodash/ceil.js new file mode 100644 index 0000000..56c8722 --- /dev/null +++ b/node_modules/lodash/ceil.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ +var ceil = createRound('ceil'); + +module.exports = ceil; diff --git a/node_modules/lodash/chain.js b/node_modules/lodash/chain.js new file mode 100644 index 0000000..f6cd647 --- /dev/null +++ b/node_modules/lodash/chain.js @@ -0,0 +1,38 @@ +var lodash = require('./wrapperLodash'); + +/** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/node_modules/lodash/chunk.js b/node_modules/lodash/chunk.js new file mode 100644 index 0000000..5b562fe --- /dev/null +++ b/node_modules/lodash/chunk.js @@ -0,0 +1,50 @@ +var baseSlice = require('./_baseSlice'), + isIterateeCall = require('./_isIterateeCall'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/node_modules/lodash/clamp.js b/node_modules/lodash/clamp.js new file mode 100644 index 0000000..91a72c9 --- /dev/null +++ b/node_modules/lodash/clamp.js @@ -0,0 +1,39 @@ +var baseClamp = require('./_baseClamp'), + toNumber = require('./toNumber'); + +/** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ +function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); +} + +module.exports = clamp; diff --git a/node_modules/lodash/clone.js b/node_modules/lodash/clone.js new file mode 100644 index 0000000..dd439d6 --- /dev/null +++ b/node_modules/lodash/clone.js @@ -0,0 +1,36 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} + +module.exports = clone; diff --git a/node_modules/lodash/cloneDeep.js b/node_modules/lodash/cloneDeep.js new file mode 100644 index 0000000..4425fbe --- /dev/null +++ b/node_modules/lodash/cloneDeep.js @@ -0,0 +1,29 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +module.exports = cloneDeep; diff --git a/node_modules/lodash/cloneDeepWith.js b/node_modules/lodash/cloneDeepWith.js new file mode 100644 index 0000000..fd9c6c0 --- /dev/null +++ b/node_modules/lodash/cloneDeepWith.js @@ -0,0 +1,40 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ +function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneDeepWith; diff --git a/node_modules/lodash/cloneWith.js b/node_modules/lodash/cloneWith.js new file mode 100644 index 0000000..d2f4e75 --- /dev/null +++ b/node_modules/lodash/cloneWith.js @@ -0,0 +1,42 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ +function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneWith; diff --git a/node_modules/lodash/collection.js b/node_modules/lodash/collection.js new file mode 100644 index 0000000..77fe837 --- /dev/null +++ b/node_modules/lodash/collection.js @@ -0,0 +1,30 @@ +module.exports = { + 'countBy': require('./countBy'), + 'each': require('./each'), + 'eachRight': require('./eachRight'), + 'every': require('./every'), + 'filter': require('./filter'), + 'find': require('./find'), + 'findLast': require('./findLast'), + 'flatMap': require('./flatMap'), + 'flatMapDeep': require('./flatMapDeep'), + 'flatMapDepth': require('./flatMapDepth'), + 'forEach': require('./forEach'), + 'forEachRight': require('./forEachRight'), + 'groupBy': require('./groupBy'), + 'includes': require('./includes'), + 'invokeMap': require('./invokeMap'), + 'keyBy': require('./keyBy'), + 'map': require('./map'), + 'orderBy': require('./orderBy'), + 'partition': require('./partition'), + 'reduce': require('./reduce'), + 'reduceRight': require('./reduceRight'), + 'reject': require('./reject'), + 'sample': require('./sample'), + 'sampleSize': require('./sampleSize'), + 'shuffle': require('./shuffle'), + 'size': require('./size'), + 'some': require('./some'), + 'sortBy': require('./sortBy') +}; diff --git a/node_modules/lodash/commit.js b/node_modules/lodash/commit.js new file mode 100644 index 0000000..fe4db71 --- /dev/null +++ b/node_modules/lodash/commit.js @@ -0,0 +1,33 @@ +var LodashWrapper = require('./_LodashWrapper'); + +/** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/node_modules/lodash/compact.js b/node_modules/lodash/compact.js new file mode 100644 index 0000000..031fab4 --- /dev/null +++ b/node_modules/lodash/compact.js @@ -0,0 +1,31 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/node_modules/lodash/concat.js b/node_modules/lodash/concat.js new file mode 100644 index 0000000..1da48a4 --- /dev/null +++ b/node_modules/lodash/concat.js @@ -0,0 +1,43 @@ +var arrayPush = require('./_arrayPush'), + baseFlatten = require('./_baseFlatten'), + copyArray = require('./_copyArray'), + isArray = require('./isArray'); + +/** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); +} + +module.exports = concat; diff --git a/node_modules/lodash/cond.js b/node_modules/lodash/cond.js new file mode 100644 index 0000000..6455598 --- /dev/null +++ b/node_modules/lodash/cond.js @@ -0,0 +1,60 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ +function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = baseIteratee; + + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); +} + +module.exports = cond; diff --git a/node_modules/lodash/conforms.js b/node_modules/lodash/conforms.js new file mode 100644 index 0000000..5501a94 --- /dev/null +++ b/node_modules/lodash/conforms.js @@ -0,0 +1,35 @@ +var baseClone = require('./_baseClone'), + baseConforms = require('./_baseConforms'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ +function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); +} + +module.exports = conforms; diff --git a/node_modules/lodash/conformsTo.js b/node_modules/lodash/conformsTo.js new file mode 100644 index 0000000..b8a93eb --- /dev/null +++ b/node_modules/lodash/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/node_modules/lodash/constant.js b/node_modules/lodash/constant.js new file mode 100644 index 0000000..655ece3 --- /dev/null +++ b/node_modules/lodash/constant.js @@ -0,0 +1,26 @@ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js new file mode 100644 index 0000000..0e676fa --- /dev/null +++ b/node_modules/lodash/core.js @@ -0,0 +1,3854 @@ +/** + * @license + * Lodash (Custom Build) + * Build: `lodash core -o ./dist/lodash.core.js` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.5'; + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + numberTag = '[object Number]', + objectTag = '[object Object]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + + /** Used to match HTML entities and HTML characters. */ + var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /*--------------------------------------------------------------------------*/ + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + array.push.apply(array, values); + return array; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return baseMap(props, function(key) { + return object[key]; + }); + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /*--------------------------------------------------------------------------*/ + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Built-in value references. */ + var objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsFinite = root.isFinite, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + return value instanceof LodashWrapper + ? value + : new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + } + + LodashWrapper.prototype = baseCreate(lodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + object[key] = value; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !false) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return baseFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + var baseIsArguments = noop; + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : baseGetTag(object), + othTag = othIsArr ? arrayTag : baseGetTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + stack || (stack = []); + var objStack = find(stack, function(entry) { + return entry[0] == object; + }); + var othStack = find(stack, function(entry) { + return entry[0] == other; + }); + if (objStack && othStack) { + return objStack[1] == other; + } + stack.push([object, other]); + stack.push([other, object]); + if (isSameTag && !objIsObj) { + var result = (objIsArr) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + stack.pop(); + return result; + } + } + if (!isSameTag) { + return false; + } + var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(func) { + if (typeof func == 'function') { + return func; + } + if (func == null) { + return identity; + } + return (typeof func == 'object' ? baseMatches : baseProperty)(func); + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var props = nativeKeys(source); + return function(object) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length]; + if (!(key in object && + baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) + )) { + return false; + } + } + return true; + }; + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, props) { + object = Object(object); + return reduce(props, function(result, key) { + if (key in object) { + result[key] = object[key]; + } + return result; + }, {}); + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source) { + return baseSlice(source, 0, source.length); + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + return reduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = false; + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = false; + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + var compared; + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var result = true; + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + var compared; + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; + } + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = identity; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + return baseFilter(array, Boolean); + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else { + fromIndex = 0; + } + var index = (fromIndex || 0) - 1, + isReflexive = value === value; + + while (++index < length) { + var other = array[index]; + if ((isReflexive ? other === value : other !== other)) { + return index; + } + } + return -1; + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + start = start == null ? 0 : +start; + end = end === undefined ? length : +end; + return length ? baseSlice(array, start, end) : []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseEvery(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + return baseFilter(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + return baseEach(collection, baseIteratee(iteratee)); + } + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + return baseMap(collection, baseIteratee(iteratee)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + collection = isArrayLike(collection) ? collection : nativeKeys(collection); + return collection.length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseSome(collection, baseIteratee(predicate)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + function sortBy(collection, iteratee) { + var index = 0; + iteratee = baseIteratee(iteratee); + + return baseMap(baseMap(collection, function(value, key, collection) { + return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; + }).sort(function(object, other) { + return compareAscending(object.criteria, other.criteria) || (object.index - other.index); + }), baseProperty('value')); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); + }); + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + if (!isObject(value)) { + return value; + } + return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = baseIsDate; + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (isArrayLike(value) && + (isArray(value) || isString(value) || + isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + return !nativeKeys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = baseIsRegExp; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!isArrayLike(value)) { + return values(value); + } + return value.length ? copyArray(value) : []; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + var toInteger = Number; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + var toNumber = Number; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + if (typeof value == 'string') { + return value; + } + return value == null ? '' : (value + ''); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + copyObject(source, nativeKeys(source), object); + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, nativeKeysIn(source), object); + }); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : assign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasOwnProperty.call(object, path); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = nativeKeys; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + var keysIn = nativeKeysIn; + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var value = object == null ? undefined : object[path]; + if (value === undefined) { + value = defaultValue; + } + return isFunction(value) ? value.call(object) : value; + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /*------------------------------------------------------------------------*/ + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + var iteratee = baseIteratee; + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(assign({}, source)); + } + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && + !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + baseEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = copyArray(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.assignIn = assignIn; + lodash.before = before; + lodash.bind = bind; + lodash.chain = chain; + lodash.compact = compact; + lodash.concat = concat; + lodash.create = create; + lodash.defaults = defaults; + lodash.defer = defer; + lodash.delay = delay; + lodash.filter = filter; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.iteratee = iteratee; + lodash.keys = keys; + lodash.map = map; + lodash.matches = matches; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.once = once; + lodash.pick = pick; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.tap = tap; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.values = values; + + // Add aliases. + lodash.extend = assignIn; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.clone = clone; + lodash.escape = escape; + lodash.every = every; + lodash.find = find; + lodash.forEach = forEach; + lodash.has = has; + lodash.head = head; + lodash.identity = identity; + lodash.indexOf = indexOf; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isBoolean = isBoolean; + lodash.isDate = isDate; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isNaN = isNaN; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isRegExp = isRegExp; + lodash.isString = isString; + lodash.isUndefined = isUndefined; + lodash.last = last; + lodash.max = max; + lodash.min = min; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.reduce = reduce; + lodash.result = result; + lodash.size = size; + lodash.some = some; + lodash.uniqueId = uniqueId; + + // Add aliases. + lodash.each = forEach; + lodash.first = head; + + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }()), { 'chain': false }); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Add `Array` methods to `lodash.prototype`. + baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); + + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + /*--------------------------------------------------------------------------*/ + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + define(function() { + return lodash; + }); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = lodash)._ = lodash; + // Export for CommonJS support. + freeExports._ = lodash; + } + else { + // Export to the global object. + root._ = lodash; + } +}.call(this)); diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js new file mode 100644 index 0000000..76640dd --- /dev/null +++ b/node_modules/lodash/core.min.js @@ -0,0 +1,29 @@ +/** + * @license + * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Build: `lodash core -o ./dist/lodash.core.js` + */ +;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); +return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++et}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){ +return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t, +r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=2&r?[]:Z;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n), +function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){ +return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__; +if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ +return function(t){return null==n?Z:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; +var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } +}); + +module.exports = countBy; diff --git a/node_modules/lodash/create.js b/node_modules/lodash/create.js new file mode 100644 index 0000000..919edb8 --- /dev/null +++ b/node_modules/lodash/create.js @@ -0,0 +1,43 @@ +var baseAssign = require('./_baseAssign'), + baseCreate = require('./_baseCreate'); + +/** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); +} + +module.exports = create; diff --git a/node_modules/lodash/curry.js b/node_modules/lodash/curry.js new file mode 100644 index 0000000..918db1a --- /dev/null +++ b/node_modules/lodash/curry.js @@ -0,0 +1,57 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8; + +/** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; +} + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/node_modules/lodash/curryRight.js b/node_modules/lodash/curryRight.js new file mode 100644 index 0000000..c85b6f3 --- /dev/null +++ b/node_modules/lodash/curryRight.js @@ -0,0 +1,54 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; +} + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/node_modules/lodash/date.js b/node_modules/lodash/date.js new file mode 100644 index 0000000..cbf5b41 --- /dev/null +++ b/node_modules/lodash/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./now') +}; diff --git a/node_modules/lodash/debounce.js b/node_modules/lodash/debounce.js new file mode 100644 index 0000000..205e49f --- /dev/null +++ b/node_modules/lodash/debounce.js @@ -0,0 +1,190 @@ +var isObject = require('./isObject'), + now = require('./now'), + toNumber = require('./toNumber'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; diff --git a/node_modules/lodash/deburr.js b/node_modules/lodash/deburr.js new file mode 100644 index 0000000..f85e314 --- /dev/null +++ b/node_modules/lodash/deburr.js @@ -0,0 +1,45 @@ +var deburrLetter = require('./_deburrLetter'), + toString = require('./toString'); + +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + +/** Used to compose unicode character classes. */ +var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + +/** Used to compose unicode capture groups. */ +var rsCombo = '[' + rsComboRange + ']'; + +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ +var reComboMark = RegExp(rsCombo, 'g'); + +/** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); +} + +module.exports = deburr; diff --git a/node_modules/lodash/defaultTo.js b/node_modules/lodash/defaultTo.js new file mode 100644 index 0000000..5b33359 --- /dev/null +++ b/node_modules/lodash/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/node_modules/lodash/defaults.js b/node_modules/lodash/defaults.js new file mode 100644 index 0000000..c74df04 --- /dev/null +++ b/node_modules/lodash/defaults.js @@ -0,0 +1,64 @@ +var baseRest = require('./_baseRest'), + eq = require('./eq'), + isIterateeCall = require('./_isIterateeCall'), + keysIn = require('./keysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +module.exports = defaults; diff --git a/node_modules/lodash/defaultsDeep.js b/node_modules/lodash/defaultsDeep.js new file mode 100644 index 0000000..9b5fa3e --- /dev/null +++ b/node_modules/lodash/defaultsDeep.js @@ -0,0 +1,30 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + customDefaultsMerge = require('./_customDefaultsMerge'), + mergeWith = require('./mergeWith'); + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ +var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); +}); + +module.exports = defaultsDeep; diff --git a/node_modules/lodash/defer.js b/node_modules/lodash/defer.js new file mode 100644 index 0000000..f6d6c6f --- /dev/null +++ b/node_modules/lodash/defer.js @@ -0,0 +1,26 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ +var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/node_modules/lodash/delay.js b/node_modules/lodash/delay.js new file mode 100644 index 0000000..bd55479 --- /dev/null +++ b/node_modules/lodash/delay.js @@ -0,0 +1,28 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'), + toNumber = require('./toNumber'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ +var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); +}); + +module.exports = delay; diff --git a/node_modules/lodash/difference.js b/node_modules/lodash/difference.js new file mode 100644 index 0000000..fa28bb3 --- /dev/null +++ b/node_modules/lodash/difference.js @@ -0,0 +1,33 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; +}); + +module.exports = difference; diff --git a/node_modules/lodash/differenceBy.js b/node_modules/lodash/differenceBy.js new file mode 100644 index 0000000..2cd63e7 --- /dev/null +++ b/node_modules/lodash/differenceBy.js @@ -0,0 +1,44 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ +var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = differenceBy; diff --git a/node_modules/lodash/differenceWith.js b/node_modules/lodash/differenceWith.js new file mode 100644 index 0000000..c0233f4 --- /dev/null +++ b/node_modules/lodash/differenceWith.js @@ -0,0 +1,40 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ +var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; +}); + +module.exports = differenceWith; diff --git a/node_modules/lodash/divide.js b/node_modules/lodash/divide.js new file mode 100644 index 0000000..8cae0cd --- /dev/null +++ b/node_modules/lodash/divide.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ +var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; +}, 1); + +module.exports = divide; diff --git a/node_modules/lodash/drop.js b/node_modules/lodash/drop.js new file mode 100644 index 0000000..d5c3cba --- /dev/null +++ b/node_modules/lodash/drop.js @@ -0,0 +1,38 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); +} + +module.exports = drop; diff --git a/node_modules/lodash/dropRight.js b/node_modules/lodash/dropRight.js new file mode 100644 index 0000000..441fe99 --- /dev/null +++ b/node_modules/lodash/dropRight.js @@ -0,0 +1,39 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/node_modules/lodash/dropRightWhile.js b/node_modules/lodash/dropRightWhile.js new file mode 100644 index 0000000..9ad36a0 --- /dev/null +++ b/node_modules/lodash/dropRightWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/node_modules/lodash/dropWhile.js b/node_modules/lodash/dropWhile.js new file mode 100644 index 0000000..903ef56 --- /dev/null +++ b/node_modules/lodash/dropWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/node_modules/lodash/each.js b/node_modules/lodash/each.js new file mode 100644 index 0000000..8800f42 --- /dev/null +++ b/node_modules/lodash/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/node_modules/lodash/eachRight.js b/node_modules/lodash/eachRight.js new file mode 100644 index 0000000..3252b2a --- /dev/null +++ b/node_modules/lodash/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/node_modules/lodash/endsWith.js b/node_modules/lodash/endsWith.js new file mode 100644 index 0000000..76fc866 --- /dev/null +++ b/node_modules/lodash/endsWith.js @@ -0,0 +1,43 @@ +var baseClamp = require('./_baseClamp'), + baseToString = require('./_baseToString'), + toInteger = require('./toInteger'), + toString = require('./toString'); + +/** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ +function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; +} + +module.exports = endsWith; diff --git a/node_modules/lodash/entries.js b/node_modules/lodash/entries.js new file mode 100644 index 0000000..7a88df2 --- /dev/null +++ b/node_modules/lodash/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/node_modules/lodash/entriesIn.js b/node_modules/lodash/entriesIn.js new file mode 100644 index 0000000..f6c6331 --- /dev/null +++ b/node_modules/lodash/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/node_modules/lodash/eq.js b/node_modules/lodash/eq.js new file mode 100644 index 0000000..a940688 --- /dev/null +++ b/node_modules/lodash/eq.js @@ -0,0 +1,37 @@ +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; diff --git a/node_modules/lodash/escape.js b/node_modules/lodash/escape.js new file mode 100644 index 0000000..9247e00 --- /dev/null +++ b/node_modules/lodash/escape.js @@ -0,0 +1,43 @@ +var escapeHtmlChar = require('./_escapeHtmlChar'), + toString = require('./toString'); + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; +} + +module.exports = escape; diff --git a/node_modules/lodash/escapeRegExp.js b/node_modules/lodash/escapeRegExp.js new file mode 100644 index 0000000..0a58c69 --- /dev/null +++ b/node_modules/lodash/escapeRegExp.js @@ -0,0 +1,32 @@ +var toString = require('./toString'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + +/** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ +function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; +} + +module.exports = escapeRegExp; diff --git a/node_modules/lodash/every.js b/node_modules/lodash/every.js new file mode 100644 index 0000000..25080da --- /dev/null +++ b/node_modules/lodash/every.js @@ -0,0 +1,56 @@ +var arrayEvery = require('./_arrayEvery'), + baseEvery = require('./_baseEvery'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = every; diff --git a/node_modules/lodash/extend.js b/node_modules/lodash/extend.js new file mode 100644 index 0000000..e00166c --- /dev/null +++ b/node_modules/lodash/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/node_modules/lodash/extendWith.js b/node_modules/lodash/extendWith.js new file mode 100644 index 0000000..dbdcb3b --- /dev/null +++ b/node_modules/lodash/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/node_modules/lodash/fill.js b/node_modules/lodash/fill.js new file mode 100644 index 0000000..ae13aa1 --- /dev/null +++ b/node_modules/lodash/fill.js @@ -0,0 +1,45 @@ +var baseFill = require('./_baseFill'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ +function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/node_modules/lodash/filter.js b/node_modules/lodash/filter.js new file mode 100644 index 0000000..52616be --- /dev/null +++ b/node_modules/lodash/filter.js @@ -0,0 +1,48 @@ +var arrayFilter = require('./_arrayFilter'), + baseFilter = require('./_baseFilter'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = filter; diff --git a/node_modules/lodash/find.js b/node_modules/lodash/find.js new file mode 100644 index 0000000..de732cc --- /dev/null +++ b/node_modules/lodash/find.js @@ -0,0 +1,42 @@ +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = createFind(findIndex); + +module.exports = find; diff --git a/node_modules/lodash/findIndex.js b/node_modules/lodash/findIndex.js new file mode 100644 index 0000000..4689069 --- /dev/null +++ b/node_modules/lodash/findIndex.js @@ -0,0 +1,55 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); +} + +module.exports = findIndex; diff --git a/node_modules/lodash/findKey.js b/node_modules/lodash/findKey.js new file mode 100644 index 0000000..cac0248 --- /dev/null +++ b/node_modules/lodash/findKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ +function findKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); +} + +module.exports = findKey; diff --git a/node_modules/lodash/findLast.js b/node_modules/lodash/findLast.js new file mode 100644 index 0000000..70b4271 --- /dev/null +++ b/node_modules/lodash/findLast.js @@ -0,0 +1,25 @@ +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(findLastIndex); + +module.exports = findLast; diff --git a/node_modules/lodash/findLastIndex.js b/node_modules/lodash/findLastIndex.js new file mode 100644 index 0000000..7da3431 --- /dev/null +++ b/node_modules/lodash/findLastIndex.js @@ -0,0 +1,59 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); +} + +module.exports = findLastIndex; diff --git a/node_modules/lodash/findLastKey.js b/node_modules/lodash/findLastKey.js new file mode 100644 index 0000000..66fb9fb --- /dev/null +++ b/node_modules/lodash/findLastKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwnRight = require('./_baseForOwnRight'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ +function findLastKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); +} + +module.exports = findLastKey; diff --git a/node_modules/lodash/first.js b/node_modules/lodash/first.js new file mode 100644 index 0000000..53f4ad1 --- /dev/null +++ b/node_modules/lodash/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/lodash/flatMap.js b/node_modules/lodash/flatMap.js new file mode 100644 index 0000000..e668506 --- /dev/null +++ b/node_modules/lodash/flatMap.js @@ -0,0 +1,29 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); +} + +module.exports = flatMap; diff --git a/node_modules/lodash/flatMapDeep.js b/node_modules/lodash/flatMapDeep.js new file mode 100644 index 0000000..4653d60 --- /dev/null +++ b/node_modules/lodash/flatMapDeep.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); +} + +module.exports = flatMapDeep; diff --git a/node_modules/lodash/flatMapDepth.js b/node_modules/lodash/flatMapDepth.js new file mode 100644 index 0000000..6d72005 --- /dev/null +++ b/node_modules/lodash/flatMapDepth.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'), + toInteger = require('./toInteger'); + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ +function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); +} + +module.exports = flatMapDepth; diff --git a/node_modules/lodash/flatten.js b/node_modules/lodash/flatten.js new file mode 100644 index 0000000..3f09f7f --- /dev/null +++ b/node_modules/lodash/flatten.js @@ -0,0 +1,22 @@ +var baseFlatten = require('./_baseFlatten'); + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} + +module.exports = flatten; diff --git a/node_modules/lodash/flattenDeep.js b/node_modules/lodash/flattenDeep.js new file mode 100644 index 0000000..8ad585c --- /dev/null +++ b/node_modules/lodash/flattenDeep.js @@ -0,0 +1,25 @@ +var baseFlatten = require('./_baseFlatten'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ +function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; +} + +module.exports = flattenDeep; diff --git a/node_modules/lodash/flattenDepth.js b/node_modules/lodash/flattenDepth.js new file mode 100644 index 0000000..441fdcc --- /dev/null +++ b/node_modules/lodash/flattenDepth.js @@ -0,0 +1,33 @@ +var baseFlatten = require('./_baseFlatten'), + toInteger = require('./toInteger'); + +/** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ +function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); +} + +module.exports = flattenDepth; diff --git a/node_modules/lodash/flip.js b/node_modules/lodash/flip.js new file mode 100644 index 0000000..c28dd78 --- /dev/null +++ b/node_modules/lodash/flip.js @@ -0,0 +1,28 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ +function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); +} + +module.exports = flip; diff --git a/node_modules/lodash/floor.js b/node_modules/lodash/floor.js new file mode 100644 index 0000000..ab6dfa2 --- /dev/null +++ b/node_modules/lodash/floor.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ +var floor = createRound('floor'); + +module.exports = floor; diff --git a/node_modules/lodash/flow.js b/node_modules/lodash/flow.js new file mode 100644 index 0000000..74b6b62 --- /dev/null +++ b/node_modules/lodash/flow.js @@ -0,0 +1,27 @@ +var createFlow = require('./_createFlow'); + +/** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/node_modules/lodash/flowRight.js b/node_modules/lodash/flowRight.js new file mode 100644 index 0000000..1146141 --- /dev/null +++ b/node_modules/lodash/flowRight.js @@ -0,0 +1,26 @@ +var createFlow = require('./_createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/node_modules/lodash/forEach.js b/node_modules/lodash/forEach.js new file mode 100644 index 0000000..c64eaa7 --- /dev/null +++ b/node_modules/lodash/forEach.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseEach = require('./_baseEach'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEach; diff --git a/node_modules/lodash/forEachRight.js b/node_modules/lodash/forEachRight.js new file mode 100644 index 0000000..7390eba --- /dev/null +++ b/node_modules/lodash/forEachRight.js @@ -0,0 +1,31 @@ +var arrayEachRight = require('./_arrayEachRight'), + baseEachRight = require('./_baseEachRight'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ +function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEachRight; diff --git a/node_modules/lodash/forIn.js b/node_modules/lodash/forIn.js new file mode 100644 index 0000000..583a596 --- /dev/null +++ b/node_modules/lodash/forIn.js @@ -0,0 +1,39 @@ +var baseFor = require('./_baseFor'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, castFunction(iteratee), keysIn); +} + +module.exports = forIn; diff --git a/node_modules/lodash/forInRight.js b/node_modules/lodash/forInRight.js new file mode 100644 index 0000000..4aedf58 --- /dev/null +++ b/node_modules/lodash/forInRight.js @@ -0,0 +1,37 @@ +var baseForRight = require('./_baseForRight'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ +function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, castFunction(iteratee), keysIn); +} + +module.exports = forInRight; diff --git a/node_modules/lodash/forOwn.js b/node_modules/lodash/forOwn.js new file mode 100644 index 0000000..94eed84 --- /dev/null +++ b/node_modules/lodash/forOwn.js @@ -0,0 +1,36 @@ +var baseForOwn = require('./_baseForOwn'), + castFunction = require('./_castFunction'); + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} + +module.exports = forOwn; diff --git a/node_modules/lodash/forOwnRight.js b/node_modules/lodash/forOwnRight.js new file mode 100644 index 0000000..86f338f --- /dev/null +++ b/node_modules/lodash/forOwnRight.js @@ -0,0 +1,34 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + castFunction = require('./_castFunction'); + +/** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ +function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, castFunction(iteratee)); +} + +module.exports = forOwnRight; diff --git a/node_modules/lodash/fp.js b/node_modules/lodash/fp.js new file mode 100644 index 0000000..e372dbb --- /dev/null +++ b/node_modules/lodash/fp.js @@ -0,0 +1,2 @@ +var _ = require('./lodash.min').runInContext(); +module.exports = require('./fp/_baseConvert')(_, _); diff --git a/node_modules/lodash/fp/F.js b/node_modules/lodash/fp/F.js new file mode 100644 index 0000000..a05a63a --- /dev/null +++ b/node_modules/lodash/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/node_modules/lodash/fp/T.js b/node_modules/lodash/fp/T.js new file mode 100644 index 0000000..e2ba8ea --- /dev/null +++ b/node_modules/lodash/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/node_modules/lodash/fp/__.js b/node_modules/lodash/fp/__.js new file mode 100644 index 0000000..4af98de --- /dev/null +++ b/node_modules/lodash/fp/__.js @@ -0,0 +1 @@ +module.exports = require('./placeholder'); diff --git a/node_modules/lodash/fp/_baseConvert.js b/node_modules/lodash/fp/_baseConvert.js new file mode 100644 index 0000000..fcc28f2 --- /dev/null +++ b/node_modules/lodash/fp/_baseConvert.js @@ -0,0 +1,573 @@ +var mapping = require('./_mapping'), + fallbackHolder = require('./placeholder'); + +/** Built-in value reference. */ +var push = Array.prototype.push; + +/** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ +function baseArity(func, n) { + return n == 2 + ? function(a, b) { return func.apply(undefined, arguments); } + : function(a) { return func.apply(undefined, arguments); }; +} + +/** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ +function baseAry(func, n) { + return n == 2 + ? function(a, b) { return func(a, b); } + : function(a) { return func(a); }; +} + +/** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ +function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; +} + +/** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ +function createCloner(func) { + return function(object) { + return func({}, object); + }; +} + +/** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ +function flatSpread(func, start) { + return function() { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; +} + +/** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ +function wrapImmutable(func, cloner) { + return function() { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = args[0] = cloner.apply(undefined, args); + func.apply(undefined, args); + return result; + }; +} + +/** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ +function baseConvert(util, name, func, options) { + var setPlaceholder, + isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError; + } + options || (options = {}); + + var config = { + 'cap': 'cap' in options ? options.cap : true, + 'curry': 'curry' in options ? options.curry : true, + 'fixed': 'fixed' in options ? options.fixed : true, + 'immutable': 'immutable' in options ? options.immutable : true, + 'rearg': 'rearg' in options ? options.rearg : true + }; + + var forceCurry = ('curry' in options) && options.curry, + forceFixed = ('fixed' in options) && options.fixed, + forceRearg = ('rearg' in options) && options.rearg, + placeholder = isLib ? func : fallbackHolder, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib ? func : { + 'ary': util.ary, + 'assign': util.assign, + 'clone': util.clone, + 'curry': util.curry, + 'forEach': util.forEach, + 'isArray': util.isArray, + 'isError': util.isError, + 'isFunction': util.isFunction, + 'isWeakMap': util.isWeakMap, + 'iteratee': util.iteratee, + 'keys': util.keys, + 'rearg': util.rearg, + 'toInteger': util.toInteger, + 'toPath': util.toPath + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isError = helpers.isError, + isFunction = helpers.isFunction, + isWeakMap = helpers.isWeakMap, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + 'castArray': function(castArray) { + return function() { + var value = arguments[0]; + return isArray(value) + ? castArray(cloneArray(value)) + : castArray.apply(undefined, arguments); + }; + }, + 'iteratee': function(iteratee) { + return function() { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? (arity - 2) : 1; + return (length && length <= arity) ? result : baseAry(result, arity); + } + return result; + }; + }, + 'mixin': function(mixin) { + return function(source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function(key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + 'nthArg': function(nthArg) { + return function(n) { + var arity = n < 0 ? 1 : (toInteger(n) + 1); + return curry(nthArg(n), arity); + }; + }, + 'rearg': function(rearg) { + return function(func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + 'runInContext': function(runInContext) { + return function(context) { + return baseConvert(util, runInContext(context), options); + }; + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null && + !(isFunction(value) || isError(value) || isWeakMap(value))) { + nested[key] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function(options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function(func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function(func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function() { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : (length - 1); + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } + else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } + else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } + else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry ? curry(result, 1) : function() { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + if (mapping.placeholder[realName]) { + setPlaceholder = true; + result.placeholder = func.placeholder = placeholder; + } + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function(key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function(pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + if (setPlaceholder) { + _.placeholder = placeholder; + } + // Assign aliases. + each(keys(_), function(key) { + each(mapping.realToAlias[key] || [], function(alias) { + _[alias] = _[key]; + }); + }); + + return _; +} + +module.exports = baseConvert; diff --git a/node_modules/lodash/fp/_convertBrowser.js b/node_modules/lodash/fp/_convertBrowser.js new file mode 100644 index 0000000..bde030d --- /dev/null +++ b/node_modules/lodash/fp/_convertBrowser.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'); + +/** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Function} lodash The lodash function to convert. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ +function browserConvert(lodash, options) { + return baseConvert(lodash, lodash, options); +} + +if (typeof _ == 'function' && typeof _.runInContext == 'function') { + _ = browserConvert(_.runInContext()); +} +module.exports = browserConvert; diff --git a/node_modules/lodash/fp/_falseOptions.js b/node_modules/lodash/fp/_falseOptions.js new file mode 100644 index 0000000..773235e --- /dev/null +++ b/node_modules/lodash/fp/_falseOptions.js @@ -0,0 +1,7 @@ +module.exports = { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}; diff --git a/node_modules/lodash/fp/_mapping.js b/node_modules/lodash/fp/_mapping.js new file mode 100644 index 0000000..8f5ddf2 --- /dev/null +++ b/node_modules/lodash/fp/_mapping.js @@ -0,0 +1,368 @@ +/** Used to map aliases to their real names. */ +exports.aliasToReal = { + + // Lodash aliases. + 'each': 'forEach', + 'eachRight': 'forEachRight', + 'entries': 'toPairs', + 'entriesIn': 'toPairsIn', + 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', + 'extendWith': 'assignInWith', + 'first': 'head', + + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + + // Ramda aliases. + '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', + 'all': 'every', + 'allPass': 'overEvery', + 'always': 'constant', + 'any': 'some', + 'anyPass': 'overSome', + 'apply': 'spread', + 'assoc': 'set', + 'assocPath': 'set', + 'complement': 'negate', + 'compose': 'flowRight', + 'contains': 'includes', + 'dissoc': 'unset', + 'dissocPath': 'unset', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', + 'equals': 'isEqual', + 'identical': 'eq', + 'indexBy': 'keyBy', + 'init': 'initial', + 'invertObj': 'invert', + 'juxt': 'over', + 'omitAll': 'omit', + 'nAry': 'ary', + 'path': 'get', + 'pathEq': 'matchesProperty', + 'pathOr': 'getOr', + 'paths': 'at', + 'pickAll': 'pick', + 'pipe': 'flow', + 'pluck': 'map', + 'prop': 'get', + 'propEq': 'matchesProperty', + 'propOr': 'getOr', + 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', + 'unapply': 'rest', + 'unnest': 'flatten', + 'useWith': 'overArgs', + 'where': 'conformsTo', + 'whereEq': 'isMatch', + 'zipObj': 'zipObject' +}; + +/** Used to map ary to method names. */ +exports.aryMethod = { + '1': [ + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', + 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words', 'zipAll' + ], + '2': [ + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', + 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', + 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', + 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', + 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', + 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', + 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', + 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', + 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', + 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', + 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', + 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', + 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', + 'zipObjectDeep' + ], + '3': [ + 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' + ], + '4': [ + 'fill', 'setWith', 'updateWith' + ] +}; + +/** Used to map ary to rearg configs. */ +exports.aryRearg = { + '2': [1, 0], + '3': [2, 0, 1], + '4': [3, 2, 0, 1] +}; + +/** Used to map method names to their iteratee ary. */ +exports.iterateeAry = { + 'dropRightWhile': 1, + 'dropWhile': 1, + 'every': 1, + 'filter': 1, + 'find': 1, + 'findFrom': 1, + 'findIndex': 1, + 'findIndexFrom': 1, + 'findKey': 1, + 'findLast': 1, + 'findLastFrom': 1, + 'findLastIndex': 1, + 'findLastIndexFrom': 1, + 'findLastKey': 1, + 'flatMap': 1, + 'flatMapDeep': 1, + 'flatMapDepth': 1, + 'forEach': 1, + 'forEachRight': 1, + 'forIn': 1, + 'forInRight': 1, + 'forOwn': 1, + 'forOwnRight': 1, + 'map': 1, + 'mapKeys': 1, + 'mapValues': 1, + 'partition': 1, + 'reduce': 2, + 'reduceRight': 2, + 'reject': 1, + 'remove': 1, + 'some': 1, + 'takeRightWhile': 1, + 'takeWhile': 1, + 'times': 1, + 'transform': 2 +}; + +/** Used to map method names to iteratee rearg configs. */ +exports.iterateeRearg = { + 'mapKeys': [1], + 'reduceRight': [1, 0] +}; + +/** Used to map method names to rearg configs. */ +exports.methodRearg = { + 'assignInAllWith': [1, 0], + 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 0], + 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], + 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], + 'isEqualWith': [1, 2, 0], + 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [1, 0], + 'mergeWith': [1, 2, 0], + 'padChars': [2, 1, 0], + 'padCharsEnd': [2, 1, 0], + 'padCharsStart': [2, 1, 0], + 'pullAllBy': [2, 1, 0], + 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], + 'setWith': [3, 1, 2, 0], + 'sortedIndexBy': [2, 1, 0], + 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], + 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], + 'zipWith': [1, 2, 0] +}; + +/** Used to map method names to spread configs. */ +exports.methodSpread = { + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'start': 0 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'start': 0 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'start': 0 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } +}; + +/** Used to identify methods which mutate arrays or objects. */ +exports.mutate = { + 'array': { + 'fill': true, + 'pull': true, + 'pullAll': true, + 'pullAllBy': true, + 'pullAllWith': true, + 'pullAt': true, + 'remove': true, + 'reverse': true + }, + 'object': { + 'assign': true, + 'assignAll': true, + 'assignAllWith': true, + 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, + 'assignInWith': true, + 'assignWith': true, + 'defaults': true, + 'defaultsAll': true, + 'defaultsDeep': true, + 'defaultsDeepAll': true, + 'merge': true, + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, + }, + 'set': { + 'set': true, + 'setWith': true, + 'unset': true, + 'update': true, + 'updateWith': true + } +}; + +/** Used to track methods with placeholder support */ +exports.placeholder = { + 'bind': true, + 'bindKey': true, + 'curry': true, + 'curryRight': true, + 'partial': true, + 'partialRight': true +}; + +/** Used to map real names to their aliases. */ +exports.realToAlias = (function() { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; +}()); + +/** Used to map method names to other names. */ +exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', + 'curryN': 'curry', + 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', + 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', + 'invokeArgs': 'invoke', + 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', + 'padChars': 'pad', + 'padCharsEnd': 'padEnd', + 'padCharsStart': 'padStart', + 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', + 'restFrom': 'rest', + 'spreadFrom': 'spread', + 'trimChars': 'trim', + 'trimCharsEnd': 'trimEnd', + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' +}; + +/** Used to track methods that skip fixing their arity. */ +exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'rearg': true, + 'runInContext': true +}; + +/** Used to track methods that skip rearranging arguments. */ +exports.skipRearg = { + 'add': true, + 'assign': true, + 'assignIn': true, + 'bind': true, + 'bindKey': true, + 'concat': true, + 'difference': true, + 'divide': true, + 'eq': true, + 'gt': true, + 'gte': true, + 'isEqual': true, + 'lt': true, + 'lte': true, + 'matchesProperty': true, + 'merge': true, + 'multiply': true, + 'overArgs': true, + 'partial': true, + 'partialRight': true, + 'propertyOf': true, + 'random': true, + 'range': true, + 'rangeRight': true, + 'subtract': true, + 'zip': true, + 'zipObject': true, + 'zipObjectDeep': true +}; diff --git a/node_modules/lodash/fp/_util.js b/node_modules/lodash/fp/_util.js new file mode 100644 index 0000000..1dbf36f --- /dev/null +++ b/node_modules/lodash/fp/_util.js @@ -0,0 +1,16 @@ +module.exports = { + 'ary': require('../ary'), + 'assign': require('../_baseAssign'), + 'clone': require('../clone'), + 'curry': require('../curry'), + 'forEach': require('../_arrayEach'), + 'isArray': require('../isArray'), + 'isError': require('../isError'), + 'isFunction': require('../isFunction'), + 'isWeakMap': require('../isWeakMap'), + 'iteratee': require('../iteratee'), + 'keys': require('../_baseKeys'), + 'rearg': require('../rearg'), + 'toInteger': require('../toInteger'), + 'toPath': require('../toPath') +}; diff --git a/node_modules/lodash/fp/add.js b/node_modules/lodash/fp/add.js new file mode 100644 index 0000000..816eeec --- /dev/null +++ b/node_modules/lodash/fp/add.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('add', require('../add')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/after.js b/node_modules/lodash/fp/after.js new file mode 100644 index 0000000..21a0167 --- /dev/null +++ b/node_modules/lodash/fp/after.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('after', require('../after')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/all.js b/node_modules/lodash/fp/all.js new file mode 100644 index 0000000..d0839f7 --- /dev/null +++ b/node_modules/lodash/fp/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/node_modules/lodash/fp/allPass.js b/node_modules/lodash/fp/allPass.js new file mode 100644 index 0000000..79b73ef --- /dev/null +++ b/node_modules/lodash/fp/allPass.js @@ -0,0 +1 @@ +module.exports = require('./overEvery'); diff --git a/node_modules/lodash/fp/always.js b/node_modules/lodash/fp/always.js new file mode 100644 index 0000000..9887703 --- /dev/null +++ b/node_modules/lodash/fp/always.js @@ -0,0 +1 @@ +module.exports = require('./constant'); diff --git a/node_modules/lodash/fp/any.js b/node_modules/lodash/fp/any.js new file mode 100644 index 0000000..900ac25 --- /dev/null +++ b/node_modules/lodash/fp/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/node_modules/lodash/fp/anyPass.js b/node_modules/lodash/fp/anyPass.js new file mode 100644 index 0000000..2774ab3 --- /dev/null +++ b/node_modules/lodash/fp/anyPass.js @@ -0,0 +1 @@ +module.exports = require('./overSome'); diff --git a/node_modules/lodash/fp/apply.js b/node_modules/lodash/fp/apply.js new file mode 100644 index 0000000..2b75712 --- /dev/null +++ b/node_modules/lodash/fp/apply.js @@ -0,0 +1 @@ +module.exports = require('./spread'); diff --git a/node_modules/lodash/fp/array.js b/node_modules/lodash/fp/array.js new file mode 100644 index 0000000..fe939c2 --- /dev/null +++ b/node_modules/lodash/fp/array.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../array')); diff --git a/node_modules/lodash/fp/ary.js b/node_modules/lodash/fp/ary.js new file mode 100644 index 0000000..8edf187 --- /dev/null +++ b/node_modules/lodash/fp/ary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ary', require('../ary')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assign.js b/node_modules/lodash/fp/assign.js new file mode 100644 index 0000000..23f47af --- /dev/null +++ b/node_modules/lodash/fp/assign.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assign', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignAll.js b/node_modules/lodash/fp/assignAll.js new file mode 100644 index 0000000..b1d36c7 --- /dev/null +++ b/node_modules/lodash/fp/assignAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAll', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignAllWith.js b/node_modules/lodash/fp/assignAllWith.js new file mode 100644 index 0000000..21e836e --- /dev/null +++ b/node_modules/lodash/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignIn.js b/node_modules/lodash/fp/assignIn.js new file mode 100644 index 0000000..6e7c65f --- /dev/null +++ b/node_modules/lodash/fp/assignIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignIn', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignInAll.js b/node_modules/lodash/fp/assignInAll.js new file mode 100644 index 0000000..7ba75db --- /dev/null +++ b/node_modules/lodash/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignInAllWith.js b/node_modules/lodash/fp/assignInAllWith.js new file mode 100644 index 0000000..e766903 --- /dev/null +++ b/node_modules/lodash/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignInWith.js b/node_modules/lodash/fp/assignInWith.js new file mode 100644 index 0000000..acb5923 --- /dev/null +++ b/node_modules/lodash/fp/assignInWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignWith.js b/node_modules/lodash/fp/assignWith.js new file mode 100644 index 0000000..eb92521 --- /dev/null +++ b/node_modules/lodash/fp/assignWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assoc.js b/node_modules/lodash/fp/assoc.js new file mode 100644 index 0000000..7648820 --- /dev/null +++ b/node_modules/lodash/fp/assoc.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/node_modules/lodash/fp/assocPath.js b/node_modules/lodash/fp/assocPath.js new file mode 100644 index 0000000..7648820 --- /dev/null +++ b/node_modules/lodash/fp/assocPath.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/node_modules/lodash/fp/at.js b/node_modules/lodash/fp/at.js new file mode 100644 index 0000000..cc39d25 --- /dev/null +++ b/node_modules/lodash/fp/at.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('at', require('../at')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/attempt.js b/node_modules/lodash/fp/attempt.js new file mode 100644 index 0000000..26ca42e --- /dev/null +++ b/node_modules/lodash/fp/attempt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('attempt', require('../attempt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/before.js b/node_modules/lodash/fp/before.js new file mode 100644 index 0000000..7a2de65 --- /dev/null +++ b/node_modules/lodash/fp/before.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('before', require('../before')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/bind.js b/node_modules/lodash/fp/bind.js new file mode 100644 index 0000000..5cbe4f3 --- /dev/null +++ b/node_modules/lodash/fp/bind.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bind', require('../bind')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/bindAll.js b/node_modules/lodash/fp/bindAll.js new file mode 100644 index 0000000..6b4a4a0 --- /dev/null +++ b/node_modules/lodash/fp/bindAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindAll', require('../bindAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/bindKey.js b/node_modules/lodash/fp/bindKey.js new file mode 100644 index 0000000..6a46c6b --- /dev/null +++ b/node_modules/lodash/fp/bindKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindKey', require('../bindKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/camelCase.js b/node_modules/lodash/fp/camelCase.js new file mode 100644 index 0000000..87b77b4 --- /dev/null +++ b/node_modules/lodash/fp/camelCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/capitalize.js b/node_modules/lodash/fp/capitalize.js new file mode 100644 index 0000000..cac74e1 --- /dev/null +++ b/node_modules/lodash/fp/capitalize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/castArray.js b/node_modules/lodash/fp/castArray.js new file mode 100644 index 0000000..8681c09 --- /dev/null +++ b/node_modules/lodash/fp/castArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('castArray', require('../castArray')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/ceil.js b/node_modules/lodash/fp/ceil.js new file mode 100644 index 0000000..f416b72 --- /dev/null +++ b/node_modules/lodash/fp/ceil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ceil', require('../ceil')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/chain.js b/node_modules/lodash/fp/chain.js new file mode 100644 index 0000000..604fe39 --- /dev/null +++ b/node_modules/lodash/fp/chain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chain', require('../chain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/chunk.js b/node_modules/lodash/fp/chunk.js new file mode 100644 index 0000000..871ab08 --- /dev/null +++ b/node_modules/lodash/fp/chunk.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chunk', require('../chunk')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/clamp.js b/node_modules/lodash/fp/clamp.js new file mode 100644 index 0000000..3b06c01 --- /dev/null +++ b/node_modules/lodash/fp/clamp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clamp', require('../clamp')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/clone.js b/node_modules/lodash/fp/clone.js new file mode 100644 index 0000000..cadb59c --- /dev/null +++ b/node_modules/lodash/fp/clone.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clone', require('../clone'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/cloneDeep.js b/node_modules/lodash/fp/cloneDeep.js new file mode 100644 index 0000000..a6107aa --- /dev/null +++ b/node_modules/lodash/fp/cloneDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/cloneDeepWith.js b/node_modules/lodash/fp/cloneDeepWith.js new file mode 100644 index 0000000..6f01e44 --- /dev/null +++ b/node_modules/lodash/fp/cloneDeepWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeepWith', require('../cloneDeepWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/cloneWith.js b/node_modules/lodash/fp/cloneWith.js new file mode 100644 index 0000000..aa88578 --- /dev/null +++ b/node_modules/lodash/fp/cloneWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneWith', require('../cloneWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/collection.js b/node_modules/lodash/fp/collection.js new file mode 100644 index 0000000..fc8b328 --- /dev/null +++ b/node_modules/lodash/fp/collection.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../collection')); diff --git a/node_modules/lodash/fp/commit.js b/node_modules/lodash/fp/commit.js new file mode 100644 index 0000000..130a894 --- /dev/null +++ b/node_modules/lodash/fp/commit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('commit', require('../commit'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/compact.js b/node_modules/lodash/fp/compact.js new file mode 100644 index 0000000..ce8f7a1 --- /dev/null +++ b/node_modules/lodash/fp/compact.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('compact', require('../compact'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/complement.js b/node_modules/lodash/fp/complement.js new file mode 100644 index 0000000..93eb462 --- /dev/null +++ b/node_modules/lodash/fp/complement.js @@ -0,0 +1 @@ +module.exports = require('./negate'); diff --git a/node_modules/lodash/fp/compose.js b/node_modules/lodash/fp/compose.js new file mode 100644 index 0000000..1954e94 --- /dev/null +++ b/node_modules/lodash/fp/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/node_modules/lodash/fp/concat.js b/node_modules/lodash/fp/concat.js new file mode 100644 index 0000000..e59346a --- /dev/null +++ b/node_modules/lodash/fp/concat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('concat', require('../concat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/cond.js b/node_modules/lodash/fp/cond.js new file mode 100644 index 0000000..6a0120e --- /dev/null +++ b/node_modules/lodash/fp/cond.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cond', require('../cond'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/conforms.js b/node_modules/lodash/fp/conforms.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/lodash/fp/conforms.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/lodash/fp/conformsTo.js b/node_modules/lodash/fp/conformsTo.js new file mode 100644 index 0000000..aa7f41e --- /dev/null +++ b/node_modules/lodash/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/constant.js b/node_modules/lodash/fp/constant.js new file mode 100644 index 0000000..9e406fc --- /dev/null +++ b/node_modules/lodash/fp/constant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('constant', require('../constant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/contains.js b/node_modules/lodash/fp/contains.js new file mode 100644 index 0000000..594722a --- /dev/null +++ b/node_modules/lodash/fp/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/node_modules/lodash/fp/convert.js b/node_modules/lodash/fp/convert.js new file mode 100644 index 0000000..4795dc4 --- /dev/null +++ b/node_modules/lodash/fp/convert.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'), + util = require('./_util'); + +/** + * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. If `name` is an object its methods + * will be converted. + * + * @param {string} name The name of the function to wrap. + * @param {Function} [func] The function to wrap. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function|Object} Returns the converted function or object. + */ +function convert(name, func, options) { + return baseConvert(util, name, func, options); +} + +module.exports = convert; diff --git a/node_modules/lodash/fp/countBy.js b/node_modules/lodash/fp/countBy.js new file mode 100644 index 0000000..dfa4643 --- /dev/null +++ b/node_modules/lodash/fp/countBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('countBy', require('../countBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/create.js b/node_modules/lodash/fp/create.js new file mode 100644 index 0000000..752025f --- /dev/null +++ b/node_modules/lodash/fp/create.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('create', require('../create')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/curry.js b/node_modules/lodash/fp/curry.js new file mode 100644 index 0000000..b0b4168 --- /dev/null +++ b/node_modules/lodash/fp/curry.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curry', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/curryN.js b/node_modules/lodash/fp/curryN.js new file mode 100644 index 0000000..2ae7d00 --- /dev/null +++ b/node_modules/lodash/fp/curryN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryN', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/curryRight.js b/node_modules/lodash/fp/curryRight.js new file mode 100644 index 0000000..cb619eb --- /dev/null +++ b/node_modules/lodash/fp/curryRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRight', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/curryRightN.js b/node_modules/lodash/fp/curryRightN.js new file mode 100644 index 0000000..2495afc --- /dev/null +++ b/node_modules/lodash/fp/curryRightN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRightN', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/date.js b/node_modules/lodash/fp/date.js new file mode 100644 index 0000000..82cb952 --- /dev/null +++ b/node_modules/lodash/fp/date.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../date')); diff --git a/node_modules/lodash/fp/debounce.js b/node_modules/lodash/fp/debounce.js new file mode 100644 index 0000000..2612229 --- /dev/null +++ b/node_modules/lodash/fp/debounce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('debounce', require('../debounce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/deburr.js b/node_modules/lodash/fp/deburr.js new file mode 100644 index 0000000..96463ab --- /dev/null +++ b/node_modules/lodash/fp/deburr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('deburr', require('../deburr'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultTo.js b/node_modules/lodash/fp/defaultTo.js new file mode 100644 index 0000000..d6b52a4 --- /dev/null +++ b/node_modules/lodash/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaults.js b/node_modules/lodash/fp/defaults.js new file mode 100644 index 0000000..e1a8e6e --- /dev/null +++ b/node_modules/lodash/fp/defaults.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaults', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultsAll.js b/node_modules/lodash/fp/defaultsAll.js new file mode 100644 index 0000000..238fcc3 --- /dev/null +++ b/node_modules/lodash/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultsDeep.js b/node_modules/lodash/fp/defaultsDeep.js new file mode 100644 index 0000000..1f172ff --- /dev/null +++ b/node_modules/lodash/fp/defaultsDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeep', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/lodash/fp/defaultsDeepAll.js new file mode 100644 index 0000000..6835f2f --- /dev/null +++ b/node_modules/lodash/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defer.js b/node_modules/lodash/fp/defer.js new file mode 100644 index 0000000..ec7990f --- /dev/null +++ b/node_modules/lodash/fp/defer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defer', require('../defer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/delay.js b/node_modules/lodash/fp/delay.js new file mode 100644 index 0000000..556dbd5 --- /dev/null +++ b/node_modules/lodash/fp/delay.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('delay', require('../delay')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/difference.js b/node_modules/lodash/fp/difference.js new file mode 100644 index 0000000..2d03765 --- /dev/null +++ b/node_modules/lodash/fp/difference.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('difference', require('../difference')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/differenceBy.js b/node_modules/lodash/fp/differenceBy.js new file mode 100644 index 0000000..2f91491 --- /dev/null +++ b/node_modules/lodash/fp/differenceBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceBy', require('../differenceBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/differenceWith.js b/node_modules/lodash/fp/differenceWith.js new file mode 100644 index 0000000..bcf5ad2 --- /dev/null +++ b/node_modules/lodash/fp/differenceWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceWith', require('../differenceWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dissoc.js b/node_modules/lodash/fp/dissoc.js new file mode 100644 index 0000000..7ec7be1 --- /dev/null +++ b/node_modules/lodash/fp/dissoc.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/node_modules/lodash/fp/dissocPath.js b/node_modules/lodash/fp/dissocPath.js new file mode 100644 index 0000000..7ec7be1 --- /dev/null +++ b/node_modules/lodash/fp/dissocPath.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/node_modules/lodash/fp/divide.js b/node_modules/lodash/fp/divide.js new file mode 100644 index 0000000..82048c5 --- /dev/null +++ b/node_modules/lodash/fp/divide.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('divide', require('../divide')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/drop.js b/node_modules/lodash/fp/drop.js new file mode 100644 index 0000000..2fa9b4f --- /dev/null +++ b/node_modules/lodash/fp/drop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('drop', require('../drop')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dropLast.js b/node_modules/lodash/fp/dropLast.js new file mode 100644 index 0000000..174e525 --- /dev/null +++ b/node_modules/lodash/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/node_modules/lodash/fp/dropLastWhile.js b/node_modules/lodash/fp/dropLastWhile.js new file mode 100644 index 0000000..be2a9d2 --- /dev/null +++ b/node_modules/lodash/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/node_modules/lodash/fp/dropRight.js b/node_modules/lodash/fp/dropRight.js new file mode 100644 index 0000000..e98881f --- /dev/null +++ b/node_modules/lodash/fp/dropRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRight', require('../dropRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dropRightWhile.js b/node_modules/lodash/fp/dropRightWhile.js new file mode 100644 index 0000000..cacaa70 --- /dev/null +++ b/node_modules/lodash/fp/dropRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRightWhile', require('../dropRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dropWhile.js b/node_modules/lodash/fp/dropWhile.js new file mode 100644 index 0000000..285f864 --- /dev/null +++ b/node_modules/lodash/fp/dropWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropWhile', require('../dropWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/each.js b/node_modules/lodash/fp/each.js new file mode 100644 index 0000000..8800f42 --- /dev/null +++ b/node_modules/lodash/fp/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/node_modules/lodash/fp/eachRight.js b/node_modules/lodash/fp/eachRight.js new file mode 100644 index 0000000..3252b2a --- /dev/null +++ b/node_modules/lodash/fp/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/node_modules/lodash/fp/endsWith.js b/node_modules/lodash/fp/endsWith.js new file mode 100644 index 0000000..17dc2a4 --- /dev/null +++ b/node_modules/lodash/fp/endsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('endsWith', require('../endsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/entries.js b/node_modules/lodash/fp/entries.js new file mode 100644 index 0000000..7a88df2 --- /dev/null +++ b/node_modules/lodash/fp/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/node_modules/lodash/fp/entriesIn.js b/node_modules/lodash/fp/entriesIn.js new file mode 100644 index 0000000..f6c6331 --- /dev/null +++ b/node_modules/lodash/fp/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/node_modules/lodash/fp/eq.js b/node_modules/lodash/fp/eq.js new file mode 100644 index 0000000..9a3d21b --- /dev/null +++ b/node_modules/lodash/fp/eq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('eq', require('../eq')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/equals.js b/node_modules/lodash/fp/equals.js new file mode 100644 index 0000000..e6a5ce0 --- /dev/null +++ b/node_modules/lodash/fp/equals.js @@ -0,0 +1 @@ +module.exports = require('./isEqual'); diff --git a/node_modules/lodash/fp/escape.js b/node_modules/lodash/fp/escape.js new file mode 100644 index 0000000..52c1fbb --- /dev/null +++ b/node_modules/lodash/fp/escape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escape', require('../escape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/escapeRegExp.js b/node_modules/lodash/fp/escapeRegExp.js new file mode 100644 index 0000000..369b2ef --- /dev/null +++ b/node_modules/lodash/fp/escapeRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/every.js b/node_modules/lodash/fp/every.js new file mode 100644 index 0000000..95c2776 --- /dev/null +++ b/node_modules/lodash/fp/every.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('every', require('../every')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/extend.js b/node_modules/lodash/fp/extend.js new file mode 100644 index 0000000..e00166c --- /dev/null +++ b/node_modules/lodash/fp/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/node_modules/lodash/fp/extendAll.js b/node_modules/lodash/fp/extendAll.js new file mode 100644 index 0000000..cc55b64 --- /dev/null +++ b/node_modules/lodash/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/node_modules/lodash/fp/extendAllWith.js b/node_modules/lodash/fp/extendAllWith.js new file mode 100644 index 0000000..6679d20 --- /dev/null +++ b/node_modules/lodash/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/node_modules/lodash/fp/extendWith.js b/node_modules/lodash/fp/extendWith.js new file mode 100644 index 0000000..dbdcb3b --- /dev/null +++ b/node_modules/lodash/fp/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/node_modules/lodash/fp/fill.js b/node_modules/lodash/fp/fill.js new file mode 100644 index 0000000..b2d47e8 --- /dev/null +++ b/node_modules/lodash/fp/fill.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fill', require('../fill')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/filter.js b/node_modules/lodash/fp/filter.js new file mode 100644 index 0000000..796d501 --- /dev/null +++ b/node_modules/lodash/fp/filter.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('filter', require('../filter')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/find.js b/node_modules/lodash/fp/find.js new file mode 100644 index 0000000..f805d33 --- /dev/null +++ b/node_modules/lodash/fp/find.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('find', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findFrom.js b/node_modules/lodash/fp/findFrom.js new file mode 100644 index 0000000..da8275e --- /dev/null +++ b/node_modules/lodash/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findIndex.js b/node_modules/lodash/fp/findIndex.js new file mode 100644 index 0000000..8c15fd1 --- /dev/null +++ b/node_modules/lodash/fp/findIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndex', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findIndexFrom.js b/node_modules/lodash/fp/findIndexFrom.js new file mode 100644 index 0000000..32e98cb --- /dev/null +++ b/node_modules/lodash/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findKey.js b/node_modules/lodash/fp/findKey.js new file mode 100644 index 0000000..475bcfa --- /dev/null +++ b/node_modules/lodash/fp/findKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findKey', require('../findKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLast.js b/node_modules/lodash/fp/findLast.js new file mode 100644 index 0000000..093fe94 --- /dev/null +++ b/node_modules/lodash/fp/findLast.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLast', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastFrom.js b/node_modules/lodash/fp/findLastFrom.js new file mode 100644 index 0000000..76c38fb --- /dev/null +++ b/node_modules/lodash/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastIndex.js b/node_modules/lodash/fp/findLastIndex.js new file mode 100644 index 0000000..36986df --- /dev/null +++ b/node_modules/lodash/fp/findLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndex', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/lodash/fp/findLastIndexFrom.js new file mode 100644 index 0000000..34c8176 --- /dev/null +++ b/node_modules/lodash/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastKey.js b/node_modules/lodash/fp/findLastKey.js new file mode 100644 index 0000000..5f81b60 --- /dev/null +++ b/node_modules/lodash/fp/findLastKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastKey', require('../findLastKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/first.js b/node_modules/lodash/fp/first.js new file mode 100644 index 0000000..53f4ad1 --- /dev/null +++ b/node_modules/lodash/fp/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/lodash/fp/flatMap.js b/node_modules/lodash/fp/flatMap.js new file mode 100644 index 0000000..d01dc4d --- /dev/null +++ b/node_modules/lodash/fp/flatMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMap', require('../flatMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flatMapDeep.js b/node_modules/lodash/fp/flatMapDeep.js new file mode 100644 index 0000000..569c42e --- /dev/null +++ b/node_modules/lodash/fp/flatMapDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDeep', require('../flatMapDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flatMapDepth.js b/node_modules/lodash/fp/flatMapDepth.js new file mode 100644 index 0000000..6eb68fd --- /dev/null +++ b/node_modules/lodash/fp/flatMapDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDepth', require('../flatMapDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flatten.js b/node_modules/lodash/fp/flatten.js new file mode 100644 index 0000000..30425d8 --- /dev/null +++ b/node_modules/lodash/fp/flatten.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatten', require('../flatten'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flattenDeep.js b/node_modules/lodash/fp/flattenDeep.js new file mode 100644 index 0000000..aed5db2 --- /dev/null +++ b/node_modules/lodash/fp/flattenDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flattenDepth.js b/node_modules/lodash/fp/flattenDepth.js new file mode 100644 index 0000000..ad65e37 --- /dev/null +++ b/node_modules/lodash/fp/flattenDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDepth', require('../flattenDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flip.js b/node_modules/lodash/fp/flip.js new file mode 100644 index 0000000..0547e7b --- /dev/null +++ b/node_modules/lodash/fp/flip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flip', require('../flip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/floor.js b/node_modules/lodash/fp/floor.js new file mode 100644 index 0000000..a6cf335 --- /dev/null +++ b/node_modules/lodash/fp/floor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('floor', require('../floor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flow.js b/node_modules/lodash/fp/flow.js new file mode 100644 index 0000000..cd83677 --- /dev/null +++ b/node_modules/lodash/fp/flow.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flow', require('../flow')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flowRight.js b/node_modules/lodash/fp/flowRight.js new file mode 100644 index 0000000..972a5b9 --- /dev/null +++ b/node_modules/lodash/fp/flowRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flowRight', require('../flowRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forEach.js b/node_modules/lodash/fp/forEach.js new file mode 100644 index 0000000..2f49452 --- /dev/null +++ b/node_modules/lodash/fp/forEach.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEach', require('../forEach')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forEachRight.js b/node_modules/lodash/fp/forEachRight.js new file mode 100644 index 0000000..3ff9733 --- /dev/null +++ b/node_modules/lodash/fp/forEachRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEachRight', require('../forEachRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forIn.js b/node_modules/lodash/fp/forIn.js new file mode 100644 index 0000000..9341749 --- /dev/null +++ b/node_modules/lodash/fp/forIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forIn', require('../forIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forInRight.js b/node_modules/lodash/fp/forInRight.js new file mode 100644 index 0000000..cecf8bb --- /dev/null +++ b/node_modules/lodash/fp/forInRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forInRight', require('../forInRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forOwn.js b/node_modules/lodash/fp/forOwn.js new file mode 100644 index 0000000..246449e --- /dev/null +++ b/node_modules/lodash/fp/forOwn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwn', require('../forOwn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forOwnRight.js b/node_modules/lodash/fp/forOwnRight.js new file mode 100644 index 0000000..c5e826e --- /dev/null +++ b/node_modules/lodash/fp/forOwnRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwnRight', require('../forOwnRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/fromPairs.js b/node_modules/lodash/fp/fromPairs.js new file mode 100644 index 0000000..f8cc596 --- /dev/null +++ b/node_modules/lodash/fp/fromPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fromPairs', require('../fromPairs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/function.js b/node_modules/lodash/fp/function.js new file mode 100644 index 0000000..dfe69b1 --- /dev/null +++ b/node_modules/lodash/fp/function.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../function')); diff --git a/node_modules/lodash/fp/functions.js b/node_modules/lodash/fp/functions.js new file mode 100644 index 0000000..09d1bb1 --- /dev/null +++ b/node_modules/lodash/fp/functions.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functions', require('../functions'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/functionsIn.js b/node_modules/lodash/fp/functionsIn.js new file mode 100644 index 0000000..2cfeb83 --- /dev/null +++ b/node_modules/lodash/fp/functionsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/get.js b/node_modules/lodash/fp/get.js new file mode 100644 index 0000000..6d3a328 --- /dev/null +++ b/node_modules/lodash/fp/get.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('get', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/getOr.js b/node_modules/lodash/fp/getOr.js new file mode 100644 index 0000000..7dbf771 --- /dev/null +++ b/node_modules/lodash/fp/getOr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('getOr', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/groupBy.js b/node_modules/lodash/fp/groupBy.js new file mode 100644 index 0000000..fc0bc78 --- /dev/null +++ b/node_modules/lodash/fp/groupBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('groupBy', require('../groupBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/gt.js b/node_modules/lodash/fp/gt.js new file mode 100644 index 0000000..9e57c80 --- /dev/null +++ b/node_modules/lodash/fp/gt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gt', require('../gt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/gte.js b/node_modules/lodash/fp/gte.js new file mode 100644 index 0000000..4584786 --- /dev/null +++ b/node_modules/lodash/fp/gte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gte', require('../gte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/has.js b/node_modules/lodash/fp/has.js new file mode 100644 index 0000000..b901298 --- /dev/null +++ b/node_modules/lodash/fp/has.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('has', require('../has')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/hasIn.js b/node_modules/lodash/fp/hasIn.js new file mode 100644 index 0000000..b3c3d1a --- /dev/null +++ b/node_modules/lodash/fp/hasIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('hasIn', require('../hasIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/head.js b/node_modules/lodash/fp/head.js new file mode 100644 index 0000000..2694f0a --- /dev/null +++ b/node_modules/lodash/fp/head.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('head', require('../head'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/identical.js b/node_modules/lodash/fp/identical.js new file mode 100644 index 0000000..85563f4 --- /dev/null +++ b/node_modules/lodash/fp/identical.js @@ -0,0 +1 @@ +module.exports = require('./eq'); diff --git a/node_modules/lodash/fp/identity.js b/node_modules/lodash/fp/identity.js new file mode 100644 index 0000000..096415a --- /dev/null +++ b/node_modules/lodash/fp/identity.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('identity', require('../identity'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/inRange.js b/node_modules/lodash/fp/inRange.js new file mode 100644 index 0000000..202d940 --- /dev/null +++ b/node_modules/lodash/fp/inRange.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('inRange', require('../inRange')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/includes.js b/node_modules/lodash/fp/includes.js new file mode 100644 index 0000000..1146780 --- /dev/null +++ b/node_modules/lodash/fp/includes.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includes', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/includesFrom.js b/node_modules/lodash/fp/includesFrom.js new file mode 100644 index 0000000..683afdb --- /dev/null +++ b/node_modules/lodash/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/indexBy.js b/node_modules/lodash/fp/indexBy.js new file mode 100644 index 0000000..7e64bc0 --- /dev/null +++ b/node_modules/lodash/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/node_modules/lodash/fp/indexOf.js b/node_modules/lodash/fp/indexOf.js new file mode 100644 index 0000000..524658e --- /dev/null +++ b/node_modules/lodash/fp/indexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOf', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/indexOfFrom.js b/node_modules/lodash/fp/indexOfFrom.js new file mode 100644 index 0000000..d99c822 --- /dev/null +++ b/node_modules/lodash/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/init.js b/node_modules/lodash/fp/init.js new file mode 100644 index 0000000..2f88d8b --- /dev/null +++ b/node_modules/lodash/fp/init.js @@ -0,0 +1 @@ +module.exports = require('./initial'); diff --git a/node_modules/lodash/fp/initial.js b/node_modules/lodash/fp/initial.js new file mode 100644 index 0000000..b732ba0 --- /dev/null +++ b/node_modules/lodash/fp/initial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('initial', require('../initial'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/intersection.js b/node_modules/lodash/fp/intersection.js new file mode 100644 index 0000000..52936d5 --- /dev/null +++ b/node_modules/lodash/fp/intersection.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersection', require('../intersection')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/intersectionBy.js b/node_modules/lodash/fp/intersectionBy.js new file mode 100644 index 0000000..72629f2 --- /dev/null +++ b/node_modules/lodash/fp/intersectionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionBy', require('../intersectionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/intersectionWith.js b/node_modules/lodash/fp/intersectionWith.js new file mode 100644 index 0000000..e064f40 --- /dev/null +++ b/node_modules/lodash/fp/intersectionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionWith', require('../intersectionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invert.js b/node_modules/lodash/fp/invert.js new file mode 100644 index 0000000..2d5d1f0 --- /dev/null +++ b/node_modules/lodash/fp/invert.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invert', require('../invert')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invertBy.js b/node_modules/lodash/fp/invertBy.js new file mode 100644 index 0000000..63ca97e --- /dev/null +++ b/node_modules/lodash/fp/invertBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invertBy', require('../invertBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invertObj.js b/node_modules/lodash/fp/invertObj.js new file mode 100644 index 0000000..f1d842e --- /dev/null +++ b/node_modules/lodash/fp/invertObj.js @@ -0,0 +1 @@ +module.exports = require('./invert'); diff --git a/node_modules/lodash/fp/invoke.js b/node_modules/lodash/fp/invoke.js new file mode 100644 index 0000000..fcf17f0 --- /dev/null +++ b/node_modules/lodash/fp/invoke.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invoke', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invokeArgs.js b/node_modules/lodash/fp/invokeArgs.js new file mode 100644 index 0000000..d3f2953 --- /dev/null +++ b/node_modules/lodash/fp/invokeArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgs', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invokeArgsMap.js b/node_modules/lodash/fp/invokeArgsMap.js new file mode 100644 index 0000000..eaa9f84 --- /dev/null +++ b/node_modules/lodash/fp/invokeArgsMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgsMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invokeMap.js b/node_modules/lodash/fp/invokeMap.js new file mode 100644 index 0000000..6515fd7 --- /dev/null +++ b/node_modules/lodash/fp/invokeMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArguments.js b/node_modules/lodash/fp/isArguments.js new file mode 100644 index 0000000..1d93c9e --- /dev/null +++ b/node_modules/lodash/fp/isArguments.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArguments', require('../isArguments'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArray.js b/node_modules/lodash/fp/isArray.js new file mode 100644 index 0000000..ba7ade8 --- /dev/null +++ b/node_modules/lodash/fp/isArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArray', require('../isArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArrayBuffer.js b/node_modules/lodash/fp/isArrayBuffer.js new file mode 100644 index 0000000..5088513 --- /dev/null +++ b/node_modules/lodash/fp/isArrayBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArrayLike.js b/node_modules/lodash/fp/isArrayLike.js new file mode 100644 index 0000000..8f1856b --- /dev/null +++ b/node_modules/lodash/fp/isArrayLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArrayLikeObject.js b/node_modules/lodash/fp/isArrayLikeObject.js new file mode 100644 index 0000000..2108498 --- /dev/null +++ b/node_modules/lodash/fp/isArrayLikeObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isBoolean.js b/node_modules/lodash/fp/isBoolean.js new file mode 100644 index 0000000..9339f75 --- /dev/null +++ b/node_modules/lodash/fp/isBoolean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isBuffer.js b/node_modules/lodash/fp/isBuffer.js new file mode 100644 index 0000000..e60b123 --- /dev/null +++ b/node_modules/lodash/fp/isBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isDate.js b/node_modules/lodash/fp/isDate.js new file mode 100644 index 0000000..dc41d08 --- /dev/null +++ b/node_modules/lodash/fp/isDate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isDate', require('../isDate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isElement.js b/node_modules/lodash/fp/isElement.js new file mode 100644 index 0000000..18ee039 --- /dev/null +++ b/node_modules/lodash/fp/isElement.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isElement', require('../isElement'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isEmpty.js b/node_modules/lodash/fp/isEmpty.js new file mode 100644 index 0000000..0f4ae84 --- /dev/null +++ b/node_modules/lodash/fp/isEmpty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isEqual.js b/node_modules/lodash/fp/isEqual.js new file mode 100644 index 0000000..4138386 --- /dev/null +++ b/node_modules/lodash/fp/isEqual.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqual', require('../isEqual')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isEqualWith.js b/node_modules/lodash/fp/isEqualWith.js new file mode 100644 index 0000000..029ff5c --- /dev/null +++ b/node_modules/lodash/fp/isEqualWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqualWith', require('../isEqualWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isError.js b/node_modules/lodash/fp/isError.js new file mode 100644 index 0000000..3dfd81c --- /dev/null +++ b/node_modules/lodash/fp/isError.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isError', require('../isError'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isFinite.js b/node_modules/lodash/fp/isFinite.js new file mode 100644 index 0000000..0b647b8 --- /dev/null +++ b/node_modules/lodash/fp/isFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFinite', require('../isFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isFunction.js b/node_modules/lodash/fp/isFunction.js new file mode 100644 index 0000000..ff8e5c4 --- /dev/null +++ b/node_modules/lodash/fp/isFunction.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFunction', require('../isFunction'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isInteger.js b/node_modules/lodash/fp/isInteger.js new file mode 100644 index 0000000..67af4ff --- /dev/null +++ b/node_modules/lodash/fp/isInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isInteger', require('../isInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isLength.js b/node_modules/lodash/fp/isLength.js new file mode 100644 index 0000000..fc101c5 --- /dev/null +++ b/node_modules/lodash/fp/isLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isLength', require('../isLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isMap.js b/node_modules/lodash/fp/isMap.js new file mode 100644 index 0000000..a209aa6 --- /dev/null +++ b/node_modules/lodash/fp/isMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMap', require('../isMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isMatch.js b/node_modules/lodash/fp/isMatch.js new file mode 100644 index 0000000..6264ca1 --- /dev/null +++ b/node_modules/lodash/fp/isMatch.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatch', require('../isMatch')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isMatchWith.js b/node_modules/lodash/fp/isMatchWith.js new file mode 100644 index 0000000..d95f319 --- /dev/null +++ b/node_modules/lodash/fp/isMatchWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatchWith', require('../isMatchWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNaN.js b/node_modules/lodash/fp/isNaN.js new file mode 100644 index 0000000..66a978f --- /dev/null +++ b/node_modules/lodash/fp/isNaN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNaN', require('../isNaN'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNative.js b/node_modules/lodash/fp/isNative.js new file mode 100644 index 0000000..3d775ba --- /dev/null +++ b/node_modules/lodash/fp/isNative.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNative', require('../isNative'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNil.js b/node_modules/lodash/fp/isNil.js new file mode 100644 index 0000000..5952c02 --- /dev/null +++ b/node_modules/lodash/fp/isNil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNil', require('../isNil'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNull.js b/node_modules/lodash/fp/isNull.js new file mode 100644 index 0000000..f201a35 --- /dev/null +++ b/node_modules/lodash/fp/isNull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNull', require('../isNull'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNumber.js b/node_modules/lodash/fp/isNumber.js new file mode 100644 index 0000000..a2b5fa0 --- /dev/null +++ b/node_modules/lodash/fp/isNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNumber', require('../isNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isObject.js b/node_modules/lodash/fp/isObject.js new file mode 100644 index 0000000..231ace0 --- /dev/null +++ b/node_modules/lodash/fp/isObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObject', require('../isObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isObjectLike.js b/node_modules/lodash/fp/isObjectLike.js new file mode 100644 index 0000000..f16082e --- /dev/null +++ b/node_modules/lodash/fp/isObjectLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isPlainObject.js b/node_modules/lodash/fp/isPlainObject.js new file mode 100644 index 0000000..b5bea90 --- /dev/null +++ b/node_modules/lodash/fp/isPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isRegExp.js b/node_modules/lodash/fp/isRegExp.js new file mode 100644 index 0000000..12a1a3d --- /dev/null +++ b/node_modules/lodash/fp/isRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isSafeInteger.js b/node_modules/lodash/fp/isSafeInteger.js new file mode 100644 index 0000000..7230f55 --- /dev/null +++ b/node_modules/lodash/fp/isSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isSet.js b/node_modules/lodash/fp/isSet.js new file mode 100644 index 0000000..35c01f6 --- /dev/null +++ b/node_modules/lodash/fp/isSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSet', require('../isSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isString.js b/node_modules/lodash/fp/isString.js new file mode 100644 index 0000000..1fd0679 --- /dev/null +++ b/node_modules/lodash/fp/isString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isString', require('../isString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isSymbol.js b/node_modules/lodash/fp/isSymbol.js new file mode 100644 index 0000000..3867695 --- /dev/null +++ b/node_modules/lodash/fp/isSymbol.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isTypedArray.js b/node_modules/lodash/fp/isTypedArray.js new file mode 100644 index 0000000..8567953 --- /dev/null +++ b/node_modules/lodash/fp/isTypedArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isUndefined.js b/node_modules/lodash/fp/isUndefined.js new file mode 100644 index 0000000..ddbca31 --- /dev/null +++ b/node_modules/lodash/fp/isUndefined.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isWeakMap.js b/node_modules/lodash/fp/isWeakMap.js new file mode 100644 index 0000000..ef60c61 --- /dev/null +++ b/node_modules/lodash/fp/isWeakMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isWeakSet.js b/node_modules/lodash/fp/isWeakSet.js new file mode 100644 index 0000000..c99bfaa --- /dev/null +++ b/node_modules/lodash/fp/isWeakSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/iteratee.js b/node_modules/lodash/fp/iteratee.js new file mode 100644 index 0000000..9f0f717 --- /dev/null +++ b/node_modules/lodash/fp/iteratee.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('iteratee', require('../iteratee')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/join.js b/node_modules/lodash/fp/join.js new file mode 100644 index 0000000..a220e00 --- /dev/null +++ b/node_modules/lodash/fp/join.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('join', require('../join')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/juxt.js b/node_modules/lodash/fp/juxt.js new file mode 100644 index 0000000..f71e04e --- /dev/null +++ b/node_modules/lodash/fp/juxt.js @@ -0,0 +1 @@ +module.exports = require('./over'); diff --git a/node_modules/lodash/fp/kebabCase.js b/node_modules/lodash/fp/kebabCase.js new file mode 100644 index 0000000..60737f1 --- /dev/null +++ b/node_modules/lodash/fp/kebabCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/keyBy.js b/node_modules/lodash/fp/keyBy.js new file mode 100644 index 0000000..9a6a85d --- /dev/null +++ b/node_modules/lodash/fp/keyBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keyBy', require('../keyBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/keys.js b/node_modules/lodash/fp/keys.js new file mode 100644 index 0000000..e12bb07 --- /dev/null +++ b/node_modules/lodash/fp/keys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keys', require('../keys'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/keysIn.js b/node_modules/lodash/fp/keysIn.js new file mode 100644 index 0000000..f3eb36a --- /dev/null +++ b/node_modules/lodash/fp/keysIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keysIn', require('../keysIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lang.js b/node_modules/lodash/fp/lang.js new file mode 100644 index 0000000..08cc9c1 --- /dev/null +++ b/node_modules/lodash/fp/lang.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../lang')); diff --git a/node_modules/lodash/fp/last.js b/node_modules/lodash/fp/last.js new file mode 100644 index 0000000..0f71699 --- /dev/null +++ b/node_modules/lodash/fp/last.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('last', require('../last'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lastIndexOf.js b/node_modules/lodash/fp/lastIndexOf.js new file mode 100644 index 0000000..ddf39c3 --- /dev/null +++ b/node_modules/lodash/fp/lastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOf', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/lodash/fp/lastIndexOfFrom.js new file mode 100644 index 0000000..1ff6a0b --- /dev/null +++ b/node_modules/lodash/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lowerCase.js b/node_modules/lodash/fp/lowerCase.js new file mode 100644 index 0000000..ea64bc1 --- /dev/null +++ b/node_modules/lodash/fp/lowerCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lowerFirst.js b/node_modules/lodash/fp/lowerFirst.js new file mode 100644 index 0000000..539720a --- /dev/null +++ b/node_modules/lodash/fp/lowerFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lt.js b/node_modules/lodash/fp/lt.js new file mode 100644 index 0000000..a31d21e --- /dev/null +++ b/node_modules/lodash/fp/lt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lt', require('../lt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lte.js b/node_modules/lodash/fp/lte.js new file mode 100644 index 0000000..d795d10 --- /dev/null +++ b/node_modules/lodash/fp/lte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lte', require('../lte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/map.js b/node_modules/lodash/fp/map.js new file mode 100644 index 0000000..cf98794 --- /dev/null +++ b/node_modules/lodash/fp/map.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('map', require('../map')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mapKeys.js b/node_modules/lodash/fp/mapKeys.js new file mode 100644 index 0000000..1684587 --- /dev/null +++ b/node_modules/lodash/fp/mapKeys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapKeys', require('../mapKeys')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mapValues.js b/node_modules/lodash/fp/mapValues.js new file mode 100644 index 0000000..4004972 --- /dev/null +++ b/node_modules/lodash/fp/mapValues.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapValues', require('../mapValues')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/matches.js b/node_modules/lodash/fp/matches.js new file mode 100644 index 0000000..29d1e1e --- /dev/null +++ b/node_modules/lodash/fp/matches.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/lodash/fp/matchesProperty.js b/node_modules/lodash/fp/matchesProperty.js new file mode 100644 index 0000000..4575bd2 --- /dev/null +++ b/node_modules/lodash/fp/matchesProperty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('matchesProperty', require('../matchesProperty')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/math.js b/node_modules/lodash/fp/math.js new file mode 100644 index 0000000..e8f50f7 --- /dev/null +++ b/node_modules/lodash/fp/math.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../math')); diff --git a/node_modules/lodash/fp/max.js b/node_modules/lodash/fp/max.js new file mode 100644 index 0000000..a66acac --- /dev/null +++ b/node_modules/lodash/fp/max.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('max', require('../max'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/maxBy.js b/node_modules/lodash/fp/maxBy.js new file mode 100644 index 0000000..d083fd6 --- /dev/null +++ b/node_modules/lodash/fp/maxBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('maxBy', require('../maxBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mean.js b/node_modules/lodash/fp/mean.js new file mode 100644 index 0000000..3117246 --- /dev/null +++ b/node_modules/lodash/fp/mean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mean', require('../mean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/meanBy.js b/node_modules/lodash/fp/meanBy.js new file mode 100644 index 0000000..556f25e --- /dev/null +++ b/node_modules/lodash/fp/meanBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('meanBy', require('../meanBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/memoize.js b/node_modules/lodash/fp/memoize.js new file mode 100644 index 0000000..638eec6 --- /dev/null +++ b/node_modules/lodash/fp/memoize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('memoize', require('../memoize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/merge.js b/node_modules/lodash/fp/merge.js new file mode 100644 index 0000000..ac66add --- /dev/null +++ b/node_modules/lodash/fp/merge.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('merge', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mergeAll.js b/node_modules/lodash/fp/mergeAll.js new file mode 100644 index 0000000..a3674d6 --- /dev/null +++ b/node_modules/lodash/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mergeAllWith.js b/node_modules/lodash/fp/mergeAllWith.js new file mode 100644 index 0000000..4bd4206 --- /dev/null +++ b/node_modules/lodash/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mergeWith.js b/node_modules/lodash/fp/mergeWith.js new file mode 100644 index 0000000..00d44d5 --- /dev/null +++ b/node_modules/lodash/fp/mergeWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/method.js b/node_modules/lodash/fp/method.js new file mode 100644 index 0000000..f4060c6 --- /dev/null +++ b/node_modules/lodash/fp/method.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('method', require('../method')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/methodOf.js b/node_modules/lodash/fp/methodOf.js new file mode 100644 index 0000000..6139905 --- /dev/null +++ b/node_modules/lodash/fp/methodOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('methodOf', require('../methodOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/min.js b/node_modules/lodash/fp/min.js new file mode 100644 index 0000000..d12c6b4 --- /dev/null +++ b/node_modules/lodash/fp/min.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('min', require('../min'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/minBy.js b/node_modules/lodash/fp/minBy.js new file mode 100644 index 0000000..fdb9e24 --- /dev/null +++ b/node_modules/lodash/fp/minBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('minBy', require('../minBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mixin.js b/node_modules/lodash/fp/mixin.js new file mode 100644 index 0000000..332e6fb --- /dev/null +++ b/node_modules/lodash/fp/mixin.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mixin', require('../mixin')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/multiply.js b/node_modules/lodash/fp/multiply.js new file mode 100644 index 0000000..4dcf0b0 --- /dev/null +++ b/node_modules/lodash/fp/multiply.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('multiply', require('../multiply')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/nAry.js b/node_modules/lodash/fp/nAry.js new file mode 100644 index 0000000..f262a76 --- /dev/null +++ b/node_modules/lodash/fp/nAry.js @@ -0,0 +1 @@ +module.exports = require('./ary'); diff --git a/node_modules/lodash/fp/negate.js b/node_modules/lodash/fp/negate.js new file mode 100644 index 0000000..8b6dc7c --- /dev/null +++ b/node_modules/lodash/fp/negate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('negate', require('../negate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/next.js b/node_modules/lodash/fp/next.js new file mode 100644 index 0000000..140155e --- /dev/null +++ b/node_modules/lodash/fp/next.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('next', require('../next'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/noop.js b/node_modules/lodash/fp/noop.js new file mode 100644 index 0000000..b9e32cc --- /dev/null +++ b/node_modules/lodash/fp/noop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('noop', require('../noop'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/now.js b/node_modules/lodash/fp/now.js new file mode 100644 index 0000000..6de2068 --- /dev/null +++ b/node_modules/lodash/fp/now.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('now', require('../now'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/nth.js b/node_modules/lodash/fp/nth.js new file mode 100644 index 0000000..da4fda7 --- /dev/null +++ b/node_modules/lodash/fp/nth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nth', require('../nth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/nthArg.js b/node_modules/lodash/fp/nthArg.js new file mode 100644 index 0000000..fce3165 --- /dev/null +++ b/node_modules/lodash/fp/nthArg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nthArg', require('../nthArg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/number.js b/node_modules/lodash/fp/number.js new file mode 100644 index 0000000..5c10b88 --- /dev/null +++ b/node_modules/lodash/fp/number.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../number')); diff --git a/node_modules/lodash/fp/object.js b/node_modules/lodash/fp/object.js new file mode 100644 index 0000000..ae39a13 --- /dev/null +++ b/node_modules/lodash/fp/object.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../object')); diff --git a/node_modules/lodash/fp/omit.js b/node_modules/lodash/fp/omit.js new file mode 100644 index 0000000..fd68529 --- /dev/null +++ b/node_modules/lodash/fp/omit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omit', require('../omit')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/omitAll.js b/node_modules/lodash/fp/omitAll.js new file mode 100644 index 0000000..144cf4b --- /dev/null +++ b/node_modules/lodash/fp/omitAll.js @@ -0,0 +1 @@ +module.exports = require('./omit'); diff --git a/node_modules/lodash/fp/omitBy.js b/node_modules/lodash/fp/omitBy.js new file mode 100644 index 0000000..90df738 --- /dev/null +++ b/node_modules/lodash/fp/omitBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omitBy', require('../omitBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/once.js b/node_modules/lodash/fp/once.js new file mode 100644 index 0000000..f8f0a5c --- /dev/null +++ b/node_modules/lodash/fp/once.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('once', require('../once'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/orderBy.js b/node_modules/lodash/fp/orderBy.js new file mode 100644 index 0000000..848e210 --- /dev/null +++ b/node_modules/lodash/fp/orderBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('orderBy', require('../orderBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/over.js b/node_modules/lodash/fp/over.js new file mode 100644 index 0000000..01eba7b --- /dev/null +++ b/node_modules/lodash/fp/over.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('over', require('../over')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/overArgs.js b/node_modules/lodash/fp/overArgs.js new file mode 100644 index 0000000..738556f --- /dev/null +++ b/node_modules/lodash/fp/overArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overArgs', require('../overArgs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/overEvery.js b/node_modules/lodash/fp/overEvery.js new file mode 100644 index 0000000..9f5a032 --- /dev/null +++ b/node_modules/lodash/fp/overEvery.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overEvery', require('../overEvery')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/overSome.js b/node_modules/lodash/fp/overSome.js new file mode 100644 index 0000000..15939d5 --- /dev/null +++ b/node_modules/lodash/fp/overSome.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overSome', require('../overSome')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pad.js b/node_modules/lodash/fp/pad.js new file mode 100644 index 0000000..f1dea4a --- /dev/null +++ b/node_modules/lodash/fp/pad.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pad', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padChars.js b/node_modules/lodash/fp/padChars.js new file mode 100644 index 0000000..d6e0804 --- /dev/null +++ b/node_modules/lodash/fp/padChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padChars', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padCharsEnd.js b/node_modules/lodash/fp/padCharsEnd.js new file mode 100644 index 0000000..d4ab79a --- /dev/null +++ b/node_modules/lodash/fp/padCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padCharsStart.js b/node_modules/lodash/fp/padCharsStart.js new file mode 100644 index 0000000..a08a300 --- /dev/null +++ b/node_modules/lodash/fp/padCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padEnd.js b/node_modules/lodash/fp/padEnd.js new file mode 100644 index 0000000..a8522ec --- /dev/null +++ b/node_modules/lodash/fp/padEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padStart.js b/node_modules/lodash/fp/padStart.js new file mode 100644 index 0000000..f4ca79d --- /dev/null +++ b/node_modules/lodash/fp/padStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/parseInt.js b/node_modules/lodash/fp/parseInt.js new file mode 100644 index 0000000..27314cc --- /dev/null +++ b/node_modules/lodash/fp/parseInt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('parseInt', require('../parseInt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/partial.js b/node_modules/lodash/fp/partial.js new file mode 100644 index 0000000..5d46015 --- /dev/null +++ b/node_modules/lodash/fp/partial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partial', require('../partial')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/partialRight.js b/node_modules/lodash/fp/partialRight.js new file mode 100644 index 0000000..7f05fed --- /dev/null +++ b/node_modules/lodash/fp/partialRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partialRight', require('../partialRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/partition.js b/node_modules/lodash/fp/partition.js new file mode 100644 index 0000000..2ebcacc --- /dev/null +++ b/node_modules/lodash/fp/partition.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partition', require('../partition')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/path.js b/node_modules/lodash/fp/path.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/lodash/fp/path.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/lodash/fp/pathEq.js b/node_modules/lodash/fp/pathEq.js new file mode 100644 index 0000000..36c027a --- /dev/null +++ b/node_modules/lodash/fp/pathEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/node_modules/lodash/fp/pathOr.js b/node_modules/lodash/fp/pathOr.js new file mode 100644 index 0000000..4ab5820 --- /dev/null +++ b/node_modules/lodash/fp/pathOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/node_modules/lodash/fp/paths.js b/node_modules/lodash/fp/paths.js new file mode 100644 index 0000000..1eb7950 --- /dev/null +++ b/node_modules/lodash/fp/paths.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/node_modules/lodash/fp/pick.js b/node_modules/lodash/fp/pick.js new file mode 100644 index 0000000..197393d --- /dev/null +++ b/node_modules/lodash/fp/pick.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pick', require('../pick')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pickAll.js b/node_modules/lodash/fp/pickAll.js new file mode 100644 index 0000000..a8ecd46 --- /dev/null +++ b/node_modules/lodash/fp/pickAll.js @@ -0,0 +1 @@ +module.exports = require('./pick'); diff --git a/node_modules/lodash/fp/pickBy.js b/node_modules/lodash/fp/pickBy.js new file mode 100644 index 0000000..d832d16 --- /dev/null +++ b/node_modules/lodash/fp/pickBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pickBy', require('../pickBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pipe.js b/node_modules/lodash/fp/pipe.js new file mode 100644 index 0000000..b2e1e2c --- /dev/null +++ b/node_modules/lodash/fp/pipe.js @@ -0,0 +1 @@ +module.exports = require('./flow'); diff --git a/node_modules/lodash/fp/placeholder.js b/node_modules/lodash/fp/placeholder.js new file mode 100644 index 0000000..1ce1739 --- /dev/null +++ b/node_modules/lodash/fp/placeholder.js @@ -0,0 +1,6 @@ +/** + * The default argument placeholder value for methods. + * + * @type {Object} + */ +module.exports = {}; diff --git a/node_modules/lodash/fp/plant.js b/node_modules/lodash/fp/plant.js new file mode 100644 index 0000000..eca8f32 --- /dev/null +++ b/node_modules/lodash/fp/plant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('plant', require('../plant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pluck.js b/node_modules/lodash/fp/pluck.js new file mode 100644 index 0000000..0d1e1ab --- /dev/null +++ b/node_modules/lodash/fp/pluck.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/node_modules/lodash/fp/prop.js b/node_modules/lodash/fp/prop.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/lodash/fp/prop.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/lodash/fp/propEq.js b/node_modules/lodash/fp/propEq.js new file mode 100644 index 0000000..36c027a --- /dev/null +++ b/node_modules/lodash/fp/propEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/node_modules/lodash/fp/propOr.js b/node_modules/lodash/fp/propOr.js new file mode 100644 index 0000000..4ab5820 --- /dev/null +++ b/node_modules/lodash/fp/propOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/node_modules/lodash/fp/property.js b/node_modules/lodash/fp/property.js new file mode 100644 index 0000000..b29cfb2 --- /dev/null +++ b/node_modules/lodash/fp/property.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/lodash/fp/propertyOf.js b/node_modules/lodash/fp/propertyOf.js new file mode 100644 index 0000000..f6273ee --- /dev/null +++ b/node_modules/lodash/fp/propertyOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('propertyOf', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/props.js b/node_modules/lodash/fp/props.js new file mode 100644 index 0000000..1eb7950 --- /dev/null +++ b/node_modules/lodash/fp/props.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/node_modules/lodash/fp/pull.js b/node_modules/lodash/fp/pull.js new file mode 100644 index 0000000..8d7084f --- /dev/null +++ b/node_modules/lodash/fp/pull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pull', require('../pull')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pullAll.js b/node_modules/lodash/fp/pullAll.js new file mode 100644 index 0000000..98d5c9a --- /dev/null +++ b/node_modules/lodash/fp/pullAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAll', require('../pullAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pullAllBy.js b/node_modules/lodash/fp/pullAllBy.js new file mode 100644 index 0000000..876bc3b --- /dev/null +++ b/node_modules/lodash/fp/pullAllBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllBy', require('../pullAllBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pullAllWith.js b/node_modules/lodash/fp/pullAllWith.js new file mode 100644 index 0000000..f71ba4d --- /dev/null +++ b/node_modules/lodash/fp/pullAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllWith', require('../pullAllWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pullAt.js b/node_modules/lodash/fp/pullAt.js new file mode 100644 index 0000000..e8b3bb6 --- /dev/null +++ b/node_modules/lodash/fp/pullAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAt', require('../pullAt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/random.js b/node_modules/lodash/fp/random.js new file mode 100644 index 0000000..99d852e --- /dev/null +++ b/node_modules/lodash/fp/random.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('random', require('../random')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/range.js b/node_modules/lodash/fp/range.js new file mode 100644 index 0000000..a6bb591 --- /dev/null +++ b/node_modules/lodash/fp/range.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('range', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rangeRight.js b/node_modules/lodash/fp/rangeRight.js new file mode 100644 index 0000000..fdb712f --- /dev/null +++ b/node_modules/lodash/fp/rangeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rangeStep.js b/node_modules/lodash/fp/rangeStep.js new file mode 100644 index 0000000..d72dfc2 --- /dev/null +++ b/node_modules/lodash/fp/rangeStep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStep', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rangeStepRight.js b/node_modules/lodash/fp/rangeStepRight.js new file mode 100644 index 0000000..8b2a67b --- /dev/null +++ b/node_modules/lodash/fp/rangeStepRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStepRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rearg.js b/node_modules/lodash/fp/rearg.js new file mode 100644 index 0000000..678e02a --- /dev/null +++ b/node_modules/lodash/fp/rearg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rearg', require('../rearg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/reduce.js b/node_modules/lodash/fp/reduce.js new file mode 100644 index 0000000..4cef0a0 --- /dev/null +++ b/node_modules/lodash/fp/reduce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduce', require('../reduce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/reduceRight.js b/node_modules/lodash/fp/reduceRight.js new file mode 100644 index 0000000..caf5bb5 --- /dev/null +++ b/node_modules/lodash/fp/reduceRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduceRight', require('../reduceRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/reject.js b/node_modules/lodash/fp/reject.js new file mode 100644 index 0000000..c163273 --- /dev/null +++ b/node_modules/lodash/fp/reject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reject', require('../reject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/remove.js b/node_modules/lodash/fp/remove.js new file mode 100644 index 0000000..e9d1327 --- /dev/null +++ b/node_modules/lodash/fp/remove.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('remove', require('../remove')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/repeat.js b/node_modules/lodash/fp/repeat.js new file mode 100644 index 0000000..08470f2 --- /dev/null +++ b/node_modules/lodash/fp/repeat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('repeat', require('../repeat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/replace.js b/node_modules/lodash/fp/replace.js new file mode 100644 index 0000000..2227db6 --- /dev/null +++ b/node_modules/lodash/fp/replace.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('replace', require('../replace')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rest.js b/node_modules/lodash/fp/rest.js new file mode 100644 index 0000000..c1f3d64 --- /dev/null +++ b/node_modules/lodash/fp/rest.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rest', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/restFrom.js b/node_modules/lodash/fp/restFrom.js new file mode 100644 index 0000000..714e42b --- /dev/null +++ b/node_modules/lodash/fp/restFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('restFrom', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/result.js b/node_modules/lodash/fp/result.js new file mode 100644 index 0000000..f86ce07 --- /dev/null +++ b/node_modules/lodash/fp/result.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('result', require('../result')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/reverse.js b/node_modules/lodash/fp/reverse.js new file mode 100644 index 0000000..07c9f5e --- /dev/null +++ b/node_modules/lodash/fp/reverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reverse', require('../reverse')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/round.js b/node_modules/lodash/fp/round.js new file mode 100644 index 0000000..4c0e5c8 --- /dev/null +++ b/node_modules/lodash/fp/round.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('round', require('../round')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sample.js b/node_modules/lodash/fp/sample.js new file mode 100644 index 0000000..6bea125 --- /dev/null +++ b/node_modules/lodash/fp/sample.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sample', require('../sample'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sampleSize.js b/node_modules/lodash/fp/sampleSize.js new file mode 100644 index 0000000..359ed6f --- /dev/null +++ b/node_modules/lodash/fp/sampleSize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sampleSize', require('../sampleSize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/seq.js b/node_modules/lodash/fp/seq.js new file mode 100644 index 0000000..d8f42b0 --- /dev/null +++ b/node_modules/lodash/fp/seq.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../seq')); diff --git a/node_modules/lodash/fp/set.js b/node_modules/lodash/fp/set.js new file mode 100644 index 0000000..0b56a56 --- /dev/null +++ b/node_modules/lodash/fp/set.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('set', require('../set')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/setWith.js b/node_modules/lodash/fp/setWith.js new file mode 100644 index 0000000..0b58495 --- /dev/null +++ b/node_modules/lodash/fp/setWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('setWith', require('../setWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/shuffle.js b/node_modules/lodash/fp/shuffle.js new file mode 100644 index 0000000..aa3a1ca --- /dev/null +++ b/node_modules/lodash/fp/shuffle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/size.js b/node_modules/lodash/fp/size.js new file mode 100644 index 0000000..7490136 --- /dev/null +++ b/node_modules/lodash/fp/size.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('size', require('../size'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/slice.js b/node_modules/lodash/fp/slice.js new file mode 100644 index 0000000..15945d3 --- /dev/null +++ b/node_modules/lodash/fp/slice.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('slice', require('../slice')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/snakeCase.js b/node_modules/lodash/fp/snakeCase.js new file mode 100644 index 0000000..a0ff780 --- /dev/null +++ b/node_modules/lodash/fp/snakeCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/some.js b/node_modules/lodash/fp/some.js new file mode 100644 index 0000000..a4fa2d0 --- /dev/null +++ b/node_modules/lodash/fp/some.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('some', require('../some')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortBy.js b/node_modules/lodash/fp/sortBy.js new file mode 100644 index 0000000..e0790ad --- /dev/null +++ b/node_modules/lodash/fp/sortBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortBy', require('../sortBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndex.js b/node_modules/lodash/fp/sortedIndex.js new file mode 100644 index 0000000..364a054 --- /dev/null +++ b/node_modules/lodash/fp/sortedIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndex', require('../sortedIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndexBy.js b/node_modules/lodash/fp/sortedIndexBy.js new file mode 100644 index 0000000..9593dbd --- /dev/null +++ b/node_modules/lodash/fp/sortedIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexBy', require('../sortedIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndexOf.js b/node_modules/lodash/fp/sortedIndexOf.js new file mode 100644 index 0000000..c9084ca --- /dev/null +++ b/node_modules/lodash/fp/sortedIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexOf', require('../sortedIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndex.js b/node_modules/lodash/fp/sortedLastIndex.js new file mode 100644 index 0000000..47fe241 --- /dev/null +++ b/node_modules/lodash/fp/sortedLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndex', require('../sortedLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndexBy.js b/node_modules/lodash/fp/sortedLastIndexBy.js new file mode 100644 index 0000000..0f9a347 --- /dev/null +++ b/node_modules/lodash/fp/sortedLastIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndexOf.js b/node_modules/lodash/fp/sortedLastIndexOf.js new file mode 100644 index 0000000..0d4d932 --- /dev/null +++ b/node_modules/lodash/fp/sortedLastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedUniq.js b/node_modules/lodash/fp/sortedUniq.js new file mode 100644 index 0000000..882d283 --- /dev/null +++ b/node_modules/lodash/fp/sortedUniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedUniqBy.js b/node_modules/lodash/fp/sortedUniqBy.js new file mode 100644 index 0000000..033db91 --- /dev/null +++ b/node_modules/lodash/fp/sortedUniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniqBy', require('../sortedUniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/split.js b/node_modules/lodash/fp/split.js new file mode 100644 index 0000000..14de1a7 --- /dev/null +++ b/node_modules/lodash/fp/split.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('split', require('../split')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/spread.js b/node_modules/lodash/fp/spread.js new file mode 100644 index 0000000..2d11b70 --- /dev/null +++ b/node_modules/lodash/fp/spread.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spread', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/spreadFrom.js b/node_modules/lodash/fp/spreadFrom.js new file mode 100644 index 0000000..0b630df --- /dev/null +++ b/node_modules/lodash/fp/spreadFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spreadFrom', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/startCase.js b/node_modules/lodash/fp/startCase.js new file mode 100644 index 0000000..ada98c9 --- /dev/null +++ b/node_modules/lodash/fp/startCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startCase', require('../startCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/startsWith.js b/node_modules/lodash/fp/startsWith.js new file mode 100644 index 0000000..985e2f2 --- /dev/null +++ b/node_modules/lodash/fp/startsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startsWith', require('../startsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/string.js b/node_modules/lodash/fp/string.js new file mode 100644 index 0000000..773b037 --- /dev/null +++ b/node_modules/lodash/fp/string.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../string')); diff --git a/node_modules/lodash/fp/stubArray.js b/node_modules/lodash/fp/stubArray.js new file mode 100644 index 0000000..cd604cb --- /dev/null +++ b/node_modules/lodash/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubFalse.js b/node_modules/lodash/fp/stubFalse.js new file mode 100644 index 0000000..3296664 --- /dev/null +++ b/node_modules/lodash/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubObject.js b/node_modules/lodash/fp/stubObject.js new file mode 100644 index 0000000..c6c8ec4 --- /dev/null +++ b/node_modules/lodash/fp/stubObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubString.js b/node_modules/lodash/fp/stubString.js new file mode 100644 index 0000000..701051e --- /dev/null +++ b/node_modules/lodash/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubTrue.js b/node_modules/lodash/fp/stubTrue.js new file mode 100644 index 0000000..9249082 --- /dev/null +++ b/node_modules/lodash/fp/stubTrue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/subtract.js b/node_modules/lodash/fp/subtract.js new file mode 100644 index 0000000..d32b16d --- /dev/null +++ b/node_modules/lodash/fp/subtract.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('subtract', require('../subtract')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sum.js b/node_modules/lodash/fp/sum.js new file mode 100644 index 0000000..5cce12b --- /dev/null +++ b/node_modules/lodash/fp/sum.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sum', require('../sum'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sumBy.js b/node_modules/lodash/fp/sumBy.js new file mode 100644 index 0000000..c882656 --- /dev/null +++ b/node_modules/lodash/fp/sumBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sumBy', require('../sumBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/symmetricDifference.js b/node_modules/lodash/fp/symmetricDifference.js new file mode 100644 index 0000000..78c16ad --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/lodash/fp/symmetricDifferenceBy.js new file mode 100644 index 0000000..298fc7f --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/lodash/fp/symmetricDifferenceWith.js new file mode 100644 index 0000000..70bc6fa --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/node_modules/lodash/fp/tail.js b/node_modules/lodash/fp/tail.js new file mode 100644 index 0000000..f122f0a --- /dev/null +++ b/node_modules/lodash/fp/tail.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tail', require('../tail'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/take.js b/node_modules/lodash/fp/take.js new file mode 100644 index 0000000..9af98a7 --- /dev/null +++ b/node_modules/lodash/fp/take.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('take', require('../take')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/takeLast.js b/node_modules/lodash/fp/takeLast.js new file mode 100644 index 0000000..e98c84a --- /dev/null +++ b/node_modules/lodash/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/node_modules/lodash/fp/takeLastWhile.js b/node_modules/lodash/fp/takeLastWhile.js new file mode 100644 index 0000000..5367968 --- /dev/null +++ b/node_modules/lodash/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/node_modules/lodash/fp/takeRight.js b/node_modules/lodash/fp/takeRight.js new file mode 100644 index 0000000..b82950a --- /dev/null +++ b/node_modules/lodash/fp/takeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRight', require('../takeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/takeRightWhile.js b/node_modules/lodash/fp/takeRightWhile.js new file mode 100644 index 0000000..8ffb0a2 --- /dev/null +++ b/node_modules/lodash/fp/takeRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRightWhile', require('../takeRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/takeWhile.js b/node_modules/lodash/fp/takeWhile.js new file mode 100644 index 0000000..2813664 --- /dev/null +++ b/node_modules/lodash/fp/takeWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeWhile', require('../takeWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/tap.js b/node_modules/lodash/fp/tap.js new file mode 100644 index 0000000..d33ad6e --- /dev/null +++ b/node_modules/lodash/fp/tap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tap', require('../tap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/template.js b/node_modules/lodash/fp/template.js new file mode 100644 index 0000000..74857e1 --- /dev/null +++ b/node_modules/lodash/fp/template.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('template', require('../template')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/templateSettings.js b/node_modules/lodash/fp/templateSettings.js new file mode 100644 index 0000000..7bcc0a8 --- /dev/null +++ b/node_modules/lodash/fp/templateSettings.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/throttle.js b/node_modules/lodash/fp/throttle.js new file mode 100644 index 0000000..77fff14 --- /dev/null +++ b/node_modules/lodash/fp/throttle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('throttle', require('../throttle')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/thru.js b/node_modules/lodash/fp/thru.js new file mode 100644 index 0000000..d42b3b1 --- /dev/null +++ b/node_modules/lodash/fp/thru.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('thru', require('../thru')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/times.js b/node_modules/lodash/fp/times.js new file mode 100644 index 0000000..0dab06d --- /dev/null +++ b/node_modules/lodash/fp/times.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('times', require('../times')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toArray.js b/node_modules/lodash/fp/toArray.js new file mode 100644 index 0000000..f0c360a --- /dev/null +++ b/node_modules/lodash/fp/toArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toArray', require('../toArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toFinite.js b/node_modules/lodash/fp/toFinite.js new file mode 100644 index 0000000..3a47687 --- /dev/null +++ b/node_modules/lodash/fp/toFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toInteger.js b/node_modules/lodash/fp/toInteger.js new file mode 100644 index 0000000..e0af6a7 --- /dev/null +++ b/node_modules/lodash/fp/toInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toInteger', require('../toInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toIterator.js b/node_modules/lodash/fp/toIterator.js new file mode 100644 index 0000000..65e6baa --- /dev/null +++ b/node_modules/lodash/fp/toIterator.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toIterator', require('../toIterator'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toJSON.js b/node_modules/lodash/fp/toJSON.js new file mode 100644 index 0000000..2d718d0 --- /dev/null +++ b/node_modules/lodash/fp/toJSON.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toJSON', require('../toJSON'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toLength.js b/node_modules/lodash/fp/toLength.js new file mode 100644 index 0000000..b97cdd9 --- /dev/null +++ b/node_modules/lodash/fp/toLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLength', require('../toLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toLower.js b/node_modules/lodash/fp/toLower.js new file mode 100644 index 0000000..616ef36 --- /dev/null +++ b/node_modules/lodash/fp/toLower.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLower', require('../toLower'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toNumber.js b/node_modules/lodash/fp/toNumber.js new file mode 100644 index 0000000..d0c6f4d --- /dev/null +++ b/node_modules/lodash/fp/toNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toNumber', require('../toNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toPairs.js b/node_modules/lodash/fp/toPairs.js new file mode 100644 index 0000000..af78378 --- /dev/null +++ b/node_modules/lodash/fp/toPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairs', require('../toPairs'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toPairsIn.js b/node_modules/lodash/fp/toPairsIn.js new file mode 100644 index 0000000..66504ab --- /dev/null +++ b/node_modules/lodash/fp/toPairsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toPath.js b/node_modules/lodash/fp/toPath.js new file mode 100644 index 0000000..b4d5e50 --- /dev/null +++ b/node_modules/lodash/fp/toPath.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPath', require('../toPath'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toPlainObject.js b/node_modules/lodash/fp/toPlainObject.js new file mode 100644 index 0000000..278bb86 --- /dev/null +++ b/node_modules/lodash/fp/toPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toSafeInteger.js b/node_modules/lodash/fp/toSafeInteger.js new file mode 100644 index 0000000..367a26f --- /dev/null +++ b/node_modules/lodash/fp/toSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toString.js b/node_modules/lodash/fp/toString.js new file mode 100644 index 0000000..cec4f8e --- /dev/null +++ b/node_modules/lodash/fp/toString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toString', require('../toString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toUpper.js b/node_modules/lodash/fp/toUpper.js new file mode 100644 index 0000000..54f9a56 --- /dev/null +++ b/node_modules/lodash/fp/toUpper.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/transform.js b/node_modules/lodash/fp/transform.js new file mode 100644 index 0000000..759d088 --- /dev/null +++ b/node_modules/lodash/fp/transform.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('transform', require('../transform')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trim.js b/node_modules/lodash/fp/trim.js new file mode 100644 index 0000000..e6319a7 --- /dev/null +++ b/node_modules/lodash/fp/trim.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trim', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimChars.js b/node_modules/lodash/fp/trimChars.js new file mode 100644 index 0000000..c9294de --- /dev/null +++ b/node_modules/lodash/fp/trimChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimChars', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimCharsEnd.js b/node_modules/lodash/fp/trimCharsEnd.js new file mode 100644 index 0000000..284bc2f --- /dev/null +++ b/node_modules/lodash/fp/trimCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimCharsStart.js b/node_modules/lodash/fp/trimCharsStart.js new file mode 100644 index 0000000..ff0ee65 --- /dev/null +++ b/node_modules/lodash/fp/trimCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimEnd.js b/node_modules/lodash/fp/trimEnd.js new file mode 100644 index 0000000..7190880 --- /dev/null +++ b/node_modules/lodash/fp/trimEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimStart.js b/node_modules/lodash/fp/trimStart.js new file mode 100644 index 0000000..fda902c --- /dev/null +++ b/node_modules/lodash/fp/trimStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/truncate.js b/node_modules/lodash/fp/truncate.js new file mode 100644 index 0000000..d265c1d --- /dev/null +++ b/node_modules/lodash/fp/truncate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('truncate', require('../truncate')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unapply.js b/node_modules/lodash/fp/unapply.js new file mode 100644 index 0000000..c5dfe77 --- /dev/null +++ b/node_modules/lodash/fp/unapply.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/node_modules/lodash/fp/unary.js b/node_modules/lodash/fp/unary.js new file mode 100644 index 0000000..286c945 --- /dev/null +++ b/node_modules/lodash/fp/unary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unary', require('../unary'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unescape.js b/node_modules/lodash/fp/unescape.js new file mode 100644 index 0000000..fddcb46 --- /dev/null +++ b/node_modules/lodash/fp/unescape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unescape', require('../unescape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/union.js b/node_modules/lodash/fp/union.js new file mode 100644 index 0000000..ef8228d --- /dev/null +++ b/node_modules/lodash/fp/union.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('union', require('../union')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unionBy.js b/node_modules/lodash/fp/unionBy.js new file mode 100644 index 0000000..603687a --- /dev/null +++ b/node_modules/lodash/fp/unionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionBy', require('../unionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unionWith.js b/node_modules/lodash/fp/unionWith.js new file mode 100644 index 0000000..65bb3a7 --- /dev/null +++ b/node_modules/lodash/fp/unionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionWith', require('../unionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/uniq.js b/node_modules/lodash/fp/uniq.js new file mode 100644 index 0000000..bc18524 --- /dev/null +++ b/node_modules/lodash/fp/uniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniq', require('../uniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/uniqBy.js b/node_modules/lodash/fp/uniqBy.js new file mode 100644 index 0000000..634c6a8 --- /dev/null +++ b/node_modules/lodash/fp/uniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqBy', require('../uniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/uniqWith.js b/node_modules/lodash/fp/uniqWith.js new file mode 100644 index 0000000..0ec601a --- /dev/null +++ b/node_modules/lodash/fp/uniqWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqWith', require('../uniqWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/uniqueId.js b/node_modules/lodash/fp/uniqueId.js new file mode 100644 index 0000000..aa8fc2f --- /dev/null +++ b/node_modules/lodash/fp/uniqueId.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqueId', require('../uniqueId')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unnest.js b/node_modules/lodash/fp/unnest.js new file mode 100644 index 0000000..5d34060 --- /dev/null +++ b/node_modules/lodash/fp/unnest.js @@ -0,0 +1 @@ +module.exports = require('./flatten'); diff --git a/node_modules/lodash/fp/unset.js b/node_modules/lodash/fp/unset.js new file mode 100644 index 0000000..ea203a0 --- /dev/null +++ b/node_modules/lodash/fp/unset.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unset', require('../unset')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unzip.js b/node_modules/lodash/fp/unzip.js new file mode 100644 index 0000000..cc364b3 --- /dev/null +++ b/node_modules/lodash/fp/unzip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzip', require('../unzip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unzipWith.js b/node_modules/lodash/fp/unzipWith.js new file mode 100644 index 0000000..182eaa1 --- /dev/null +++ b/node_modules/lodash/fp/unzipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzipWith', require('../unzipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/update.js b/node_modules/lodash/fp/update.js new file mode 100644 index 0000000..b8ce2cc --- /dev/null +++ b/node_modules/lodash/fp/update.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('update', require('../update')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/updateWith.js b/node_modules/lodash/fp/updateWith.js new file mode 100644 index 0000000..d5e8282 --- /dev/null +++ b/node_modules/lodash/fp/updateWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('updateWith', require('../updateWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/upperCase.js b/node_modules/lodash/fp/upperCase.js new file mode 100644 index 0000000..c886f20 --- /dev/null +++ b/node_modules/lodash/fp/upperCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperCase', require('../upperCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/upperFirst.js b/node_modules/lodash/fp/upperFirst.js new file mode 100644 index 0000000..d8c04df --- /dev/null +++ b/node_modules/lodash/fp/upperFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/useWith.js b/node_modules/lodash/fp/useWith.js new file mode 100644 index 0000000..d8b3df5 --- /dev/null +++ b/node_modules/lodash/fp/useWith.js @@ -0,0 +1 @@ +module.exports = require('./overArgs'); diff --git a/node_modules/lodash/fp/util.js b/node_modules/lodash/fp/util.js new file mode 100644 index 0000000..18c00ba --- /dev/null +++ b/node_modules/lodash/fp/util.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../util')); diff --git a/node_modules/lodash/fp/value.js b/node_modules/lodash/fp/value.js new file mode 100644 index 0000000..555eec7 --- /dev/null +++ b/node_modules/lodash/fp/value.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('value', require('../value'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/valueOf.js b/node_modules/lodash/fp/valueOf.js new file mode 100644 index 0000000..f968807 --- /dev/null +++ b/node_modules/lodash/fp/valueOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valueOf', require('../valueOf'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/values.js b/node_modules/lodash/fp/values.js new file mode 100644 index 0000000..2dfc561 --- /dev/null +++ b/node_modules/lodash/fp/values.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('values', require('../values'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/valuesIn.js b/node_modules/lodash/fp/valuesIn.js new file mode 100644 index 0000000..a1b2bb8 --- /dev/null +++ b/node_modules/lodash/fp/valuesIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/where.js b/node_modules/lodash/fp/where.js new file mode 100644 index 0000000..3247f64 --- /dev/null +++ b/node_modules/lodash/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/lodash/fp/whereEq.js b/node_modules/lodash/fp/whereEq.js new file mode 100644 index 0000000..29d1e1e --- /dev/null +++ b/node_modules/lodash/fp/whereEq.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/lodash/fp/without.js b/node_modules/lodash/fp/without.js new file mode 100644 index 0000000..bad9e12 --- /dev/null +++ b/node_modules/lodash/fp/without.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('without', require('../without')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/words.js b/node_modules/lodash/fp/words.js new file mode 100644 index 0000000..4a90141 --- /dev/null +++ b/node_modules/lodash/fp/words.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('words', require('../words')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrap.js b/node_modules/lodash/fp/wrap.js new file mode 100644 index 0000000..e93bd8a --- /dev/null +++ b/node_modules/lodash/fp/wrap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrap', require('../wrap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperAt.js b/node_modules/lodash/fp/wrapperAt.js new file mode 100644 index 0000000..8f0a310 --- /dev/null +++ b/node_modules/lodash/fp/wrapperAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperChain.js b/node_modules/lodash/fp/wrapperChain.js new file mode 100644 index 0000000..2a48ea2 --- /dev/null +++ b/node_modules/lodash/fp/wrapperChain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperLodash.js b/node_modules/lodash/fp/wrapperLodash.js new file mode 100644 index 0000000..a7162d0 --- /dev/null +++ b/node_modules/lodash/fp/wrapperLodash.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperReverse.js b/node_modules/lodash/fp/wrapperReverse.js new file mode 100644 index 0000000..e1481aa --- /dev/null +++ b/node_modules/lodash/fp/wrapperReverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperValue.js b/node_modules/lodash/fp/wrapperValue.js new file mode 100644 index 0000000..8eb9112 --- /dev/null +++ b/node_modules/lodash/fp/wrapperValue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/xor.js b/node_modules/lodash/fp/xor.js new file mode 100644 index 0000000..29e2819 --- /dev/null +++ b/node_modules/lodash/fp/xor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xor', require('../xor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/xorBy.js b/node_modules/lodash/fp/xorBy.js new file mode 100644 index 0000000..b355686 --- /dev/null +++ b/node_modules/lodash/fp/xorBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorBy', require('../xorBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/xorWith.js b/node_modules/lodash/fp/xorWith.js new file mode 100644 index 0000000..8e05739 --- /dev/null +++ b/node_modules/lodash/fp/xorWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorWith', require('../xorWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zip.js b/node_modules/lodash/fp/zip.js new file mode 100644 index 0000000..69e147a --- /dev/null +++ b/node_modules/lodash/fp/zip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zip', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zipAll.js b/node_modules/lodash/fp/zipAll.js new file mode 100644 index 0000000..efa8ccb --- /dev/null +++ b/node_modules/lodash/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zipObj.js b/node_modules/lodash/fp/zipObj.js new file mode 100644 index 0000000..f4a3453 --- /dev/null +++ b/node_modules/lodash/fp/zipObj.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/node_modules/lodash/fp/zipObject.js b/node_modules/lodash/fp/zipObject.js new file mode 100644 index 0000000..462dbb6 --- /dev/null +++ b/node_modules/lodash/fp/zipObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObject', require('../zipObject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zipObjectDeep.js b/node_modules/lodash/fp/zipObjectDeep.js new file mode 100644 index 0000000..53a5d33 --- /dev/null +++ b/node_modules/lodash/fp/zipObjectDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObjectDeep', require('../zipObjectDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zipWith.js b/node_modules/lodash/fp/zipWith.js new file mode 100644 index 0000000..c5cf9e2 --- /dev/null +++ b/node_modules/lodash/fp/zipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipWith', require('../zipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fromPairs.js b/node_modules/lodash/fromPairs.js new file mode 100644 index 0000000..ee7940d --- /dev/null +++ b/node_modules/lodash/fromPairs.js @@ -0,0 +1,28 @@ +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; +} + +module.exports = fromPairs; diff --git a/node_modules/lodash/function.js b/node_modules/lodash/function.js new file mode 100644 index 0000000..b0fc6d9 --- /dev/null +++ b/node_modules/lodash/function.js @@ -0,0 +1,25 @@ +module.exports = { + 'after': require('./after'), + 'ary': require('./ary'), + 'before': require('./before'), + 'bind': require('./bind'), + 'bindKey': require('./bindKey'), + 'curry': require('./curry'), + 'curryRight': require('./curryRight'), + 'debounce': require('./debounce'), + 'defer': require('./defer'), + 'delay': require('./delay'), + 'flip': require('./flip'), + 'memoize': require('./memoize'), + 'negate': require('./negate'), + 'once': require('./once'), + 'overArgs': require('./overArgs'), + 'partial': require('./partial'), + 'partialRight': require('./partialRight'), + 'rearg': require('./rearg'), + 'rest': require('./rest'), + 'spread': require('./spread'), + 'throttle': require('./throttle'), + 'unary': require('./unary'), + 'wrap': require('./wrap') +}; diff --git a/node_modules/lodash/functions.js b/node_modules/lodash/functions.js new file mode 100644 index 0000000..9722928 --- /dev/null +++ b/node_modules/lodash/functions.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keys = require('./keys'); + +/** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ +function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); +} + +module.exports = functions; diff --git a/node_modules/lodash/functionsIn.js b/node_modules/lodash/functionsIn.js new file mode 100644 index 0000000..f00345d --- /dev/null +++ b/node_modules/lodash/functionsIn.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keysIn = require('./keysIn'); + +/** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); +} + +module.exports = functionsIn; diff --git a/node_modules/lodash/get.js b/node_modules/lodash/get.js new file mode 100644 index 0000000..8805ff9 --- /dev/null +++ b/node_modules/lodash/get.js @@ -0,0 +1,33 @@ +var baseGet = require('./_baseGet'); + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/node_modules/lodash/groupBy.js b/node_modules/lodash/groupBy.js new file mode 100644 index 0000000..babf4f6 --- /dev/null +++ b/node_modules/lodash/groupBy.js @@ -0,0 +1,41 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } +}); + +module.exports = groupBy; diff --git a/node_modules/lodash/gt.js b/node_modules/lodash/gt.js new file mode 100644 index 0000000..3a66282 --- /dev/null +++ b/node_modules/lodash/gt.js @@ -0,0 +1,29 @@ +var baseGt = require('./_baseGt'), + createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ +var gt = createRelationalOperation(baseGt); + +module.exports = gt; diff --git a/node_modules/lodash/gte.js b/node_modules/lodash/gte.js new file mode 100644 index 0000000..4180a68 --- /dev/null +++ b/node_modules/lodash/gte.js @@ -0,0 +1,30 @@ +var createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ +var gte = createRelationalOperation(function(value, other) { + return value >= other; +}); + +module.exports = gte; diff --git a/node_modules/lodash/has.js b/node_modules/lodash/has.js new file mode 100644 index 0000000..34df55e --- /dev/null +++ b/node_modules/lodash/has.js @@ -0,0 +1,35 @@ +var baseHas = require('./_baseHas'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && hasPath(object, path, baseHas); +} + +module.exports = has; diff --git a/node_modules/lodash/hasIn.js b/node_modules/lodash/hasIn.js new file mode 100644 index 0000000..06a3686 --- /dev/null +++ b/node_modules/lodash/hasIn.js @@ -0,0 +1,34 @@ +var baseHasIn = require('./_baseHasIn'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +module.exports = hasIn; diff --git a/node_modules/lodash/head.js b/node_modules/lodash/head.js new file mode 100644 index 0000000..dee9d1f --- /dev/null +++ b/node_modules/lodash/head.js @@ -0,0 +1,23 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ +function head(array) { + return (array && array.length) ? array[0] : undefined; +} + +module.exports = head; diff --git a/node_modules/lodash/identity.js b/node_modules/lodash/identity.js new file mode 100644 index 0000000..2d5d963 --- /dev/null +++ b/node_modules/lodash/identity.js @@ -0,0 +1,21 @@ +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; diff --git a/node_modules/lodash/inRange.js b/node_modules/lodash/inRange.js new file mode 100644 index 0000000..f20728d --- /dev/null +++ b/node_modules/lodash/inRange.js @@ -0,0 +1,55 @@ +var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), + toNumber = require('./toNumber'); + +/** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ +function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); +} + +module.exports = inRange; diff --git a/node_modules/lodash/includes.js b/node_modules/lodash/includes.js new file mode 100644 index 0000000..ae0deed --- /dev/null +++ b/node_modules/lodash/includes.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('./_baseIndexOf'), + isArrayLike = require('./isArrayLike'), + isString = require('./isString'), + toInteger = require('./toInteger'), + values = require('./values'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ +function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); +} + +module.exports = includes; diff --git a/node_modules/lodash/index.js b/node_modules/lodash/index.js new file mode 100644 index 0000000..5d063e2 --- /dev/null +++ b/node_modules/lodash/index.js @@ -0,0 +1 @@ +module.exports = require('./lodash'); \ No newline at end of file diff --git a/node_modules/lodash/indexOf.js b/node_modules/lodash/indexOf.js new file mode 100644 index 0000000..3c644af --- /dev/null +++ b/node_modules/lodash/indexOf.js @@ -0,0 +1,42 @@ +var baseIndexOf = require('./_baseIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ +function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); +} + +module.exports = indexOf; diff --git a/node_modules/lodash/initial.js b/node_modules/lodash/initial.js new file mode 100644 index 0000000..f47fc50 --- /dev/null +++ b/node_modules/lodash/initial.js @@ -0,0 +1,22 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; +} + +module.exports = initial; diff --git a/node_modules/lodash/intersection.js b/node_modules/lodash/intersection.js new file mode 100644 index 0000000..a94c135 --- /dev/null +++ b/node_modules/lodash/intersection.js @@ -0,0 +1,30 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); + +/** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ +var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; +}); + +module.exports = intersection; diff --git a/node_modules/lodash/intersectionBy.js b/node_modules/lodash/intersectionBy.js new file mode 100644 index 0000000..31461aa --- /dev/null +++ b/node_modules/lodash/intersectionBy.js @@ -0,0 +1,45 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ +var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = intersectionBy; diff --git a/node_modules/lodash/intersectionWith.js b/node_modules/lodash/intersectionWith.js new file mode 100644 index 0000000..63cabfa --- /dev/null +++ b/node_modules/lodash/intersectionWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ +var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; +}); + +module.exports = intersectionWith; diff --git a/node_modules/lodash/invert.js b/node_modules/lodash/invert.js new file mode 100644 index 0000000..8c47950 --- /dev/null +++ b/node_modules/lodash/invert.js @@ -0,0 +1,42 @@ +var constant = require('./constant'), + createInverter = require('./_createInverter'), + identity = require('./identity'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ +var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; +}, constant(identity)); + +module.exports = invert; diff --git a/node_modules/lodash/invertBy.js b/node_modules/lodash/invertBy.js new file mode 100644 index 0000000..3f4f7e5 --- /dev/null +++ b/node_modules/lodash/invertBy.js @@ -0,0 +1,56 @@ +var baseIteratee = require('./_baseIteratee'), + createInverter = require('./_createInverter'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ +var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } +}, baseIteratee); + +module.exports = invertBy; diff --git a/node_modules/lodash/invoke.js b/node_modules/lodash/invoke.js new file mode 100644 index 0000000..97d51eb --- /dev/null +++ b/node_modules/lodash/invoke.js @@ -0,0 +1,24 @@ +var baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'); + +/** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ +var invoke = baseRest(baseInvoke); + +module.exports = invoke; diff --git a/node_modules/lodash/invokeMap.js b/node_modules/lodash/invokeMap.js new file mode 100644 index 0000000..8da5126 --- /dev/null +++ b/node_modules/lodash/invokeMap.js @@ -0,0 +1,41 @@ +var apply = require('./_apply'), + baseEach = require('./_baseEach'), + baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'), + isArrayLike = require('./isArrayLike'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; +}); + +module.exports = invokeMap; diff --git a/node_modules/lodash/isArguments.js b/node_modules/lodash/isArguments.js new file mode 100644 index 0000000..8b9ed66 --- /dev/null +++ b/node_modules/lodash/isArguments.js @@ -0,0 +1,36 @@ +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; diff --git a/node_modules/lodash/isArray.js b/node_modules/lodash/isArray.js new file mode 100644 index 0000000..88ab55f --- /dev/null +++ b/node_modules/lodash/isArray.js @@ -0,0 +1,26 @@ +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; diff --git a/node_modules/lodash/isArrayBuffer.js b/node_modules/lodash/isArrayBuffer.js new file mode 100644 index 0000000..12904a6 --- /dev/null +++ b/node_modules/lodash/isArrayBuffer.js @@ -0,0 +1,27 @@ +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; + +/** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + +module.exports = isArrayBuffer; diff --git a/node_modules/lodash/isArrayLike.js b/node_modules/lodash/isArrayLike.js new file mode 100644 index 0000000..0f96680 --- /dev/null +++ b/node_modules/lodash/isArrayLike.js @@ -0,0 +1,33 @@ +var isFunction = require('./isFunction'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; diff --git a/node_modules/lodash/isArrayLikeObject.js b/node_modules/lodash/isArrayLikeObject.js new file mode 100644 index 0000000..6c4812a --- /dev/null +++ b/node_modules/lodash/isArrayLikeObject.js @@ -0,0 +1,33 @@ +var isArrayLike = require('./isArrayLike'), + isObjectLike = require('./isObjectLike'); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +module.exports = isArrayLikeObject; diff --git a/node_modules/lodash/isBoolean.js b/node_modules/lodash/isBoolean.js new file mode 100644 index 0000000..a43ed4b --- /dev/null +++ b/node_modules/lodash/isBoolean.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} + +module.exports = isBoolean; diff --git a/node_modules/lodash/isBuffer.js b/node_modules/lodash/isBuffer.js new file mode 100644 index 0000000..c103cc7 --- /dev/null +++ b/node_modules/lodash/isBuffer.js @@ -0,0 +1,38 @@ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; diff --git a/node_modules/lodash/isDate.js b/node_modules/lodash/isDate.js new file mode 100644 index 0000000..7f0209f --- /dev/null +++ b/node_modules/lodash/isDate.js @@ -0,0 +1,27 @@ +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; + +/** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + +module.exports = isDate; diff --git a/node_modules/lodash/isElement.js b/node_modules/lodash/isElement.js new file mode 100644 index 0000000..76ae29c --- /dev/null +++ b/node_modules/lodash/isElement.js @@ -0,0 +1,25 @@ +var isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ +function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); +} + +module.exports = isElement; diff --git a/node_modules/lodash/isEmpty.js b/node_modules/lodash/isEmpty.js new file mode 100644 index 0000000..3597294 --- /dev/null +++ b/node_modules/lodash/isEmpty.js @@ -0,0 +1,77 @@ +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('./isArrayLike'), + isBuffer = require('./isBuffer'), + isPrototype = require('./_isPrototype'), + isTypedArray = require('./isTypedArray'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +module.exports = isEmpty; diff --git a/node_modules/lodash/isEqual.js b/node_modules/lodash/isEqual.js new file mode 100644 index 0000000..5e23e76 --- /dev/null +++ b/node_modules/lodash/isEqual.js @@ -0,0 +1,35 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return baseIsEqual(value, other); +} + +module.exports = isEqual; diff --git a/node_modules/lodash/isEqualWith.js b/node_modules/lodash/isEqualWith.js new file mode 100644 index 0000000..21bdc7f --- /dev/null +++ b/node_modules/lodash/isEqualWith.js @@ -0,0 +1,41 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; +} + +module.exports = isEqualWith; diff --git a/node_modules/lodash/isError.js b/node_modules/lodash/isError.js new file mode 100644 index 0000000..b4f41e0 --- /dev/null +++ b/node_modules/lodash/isError.js @@ -0,0 +1,36 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** `Object#toString` result references. */ +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); +} + +module.exports = isError; diff --git a/node_modules/lodash/isFinite.js b/node_modules/lodash/isFinite.js new file mode 100644 index 0000000..601842b --- /dev/null +++ b/node_modules/lodash/isFinite.js @@ -0,0 +1,36 @@ +var root = require('./_root'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite; + +/** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ +function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); +} + +module.exports = isFinite; diff --git a/node_modules/lodash/isFunction.js b/node_modules/lodash/isFunction.js new file mode 100644 index 0000000..907a8cd --- /dev/null +++ b/node_modules/lodash/isFunction.js @@ -0,0 +1,37 @@ +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; diff --git a/node_modules/lodash/isInteger.js b/node_modules/lodash/isInteger.js new file mode 100644 index 0000000..66aa87d --- /dev/null +++ b/node_modules/lodash/isInteger.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'); + +/** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ +function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); +} + +module.exports = isInteger; diff --git a/node_modules/lodash/isLength.js b/node_modules/lodash/isLength.js new file mode 100644 index 0000000..3a95caa --- /dev/null +++ b/node_modules/lodash/isLength.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; diff --git a/node_modules/lodash/isMap.js b/node_modules/lodash/isMap.js new file mode 100644 index 0000000..44f8517 --- /dev/null +++ b/node_modules/lodash/isMap.js @@ -0,0 +1,27 @@ +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + +module.exports = isMap; diff --git a/node_modules/lodash/isMatch.js b/node_modules/lodash/isMatch.js new file mode 100644 index 0000000..9773a18 --- /dev/null +++ b/node_modules/lodash/isMatch.js @@ -0,0 +1,36 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ +function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); +} + +module.exports = isMatch; diff --git a/node_modules/lodash/isMatchWith.js b/node_modules/lodash/isMatchWith.js new file mode 100644 index 0000000..187b6a6 --- /dev/null +++ b/node_modules/lodash/isMatchWith.js @@ -0,0 +1,41 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ +function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); +} + +module.exports = isMatchWith; diff --git a/node_modules/lodash/isNaN.js b/node_modules/lodash/isNaN.js new file mode 100644 index 0000000..7d0d783 --- /dev/null +++ b/node_modules/lodash/isNaN.js @@ -0,0 +1,38 @@ +var isNumber = require('./isNumber'); + +/** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; +} + +module.exports = isNaN; diff --git a/node_modules/lodash/isNative.js b/node_modules/lodash/isNative.js new file mode 100644 index 0000000..f0cb8d5 --- /dev/null +++ b/node_modules/lodash/isNative.js @@ -0,0 +1,40 @@ +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); + +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; + +/** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); +} + +module.exports = isNative; diff --git a/node_modules/lodash/isNil.js b/node_modules/lodash/isNil.js new file mode 100644 index 0000000..79f0505 --- /dev/null +++ b/node_modules/lodash/isNil.js @@ -0,0 +1,25 @@ +/** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ +function isNil(value) { + return value == null; +} + +module.exports = isNil; diff --git a/node_modules/lodash/isNull.js b/node_modules/lodash/isNull.js new file mode 100644 index 0000000..c0a374d --- /dev/null +++ b/node_modules/lodash/isNull.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; diff --git a/node_modules/lodash/isNumber.js b/node_modules/lodash/isNumber.js new file mode 100644 index 0000000..cd34ee4 --- /dev/null +++ b/node_modules/lodash/isNumber.js @@ -0,0 +1,38 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var numberTag = '[object Number]'; + +/** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ +function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); +} + +module.exports = isNumber; diff --git a/node_modules/lodash/isObject.js b/node_modules/lodash/isObject.js new file mode 100644 index 0000000..1dc8939 --- /dev/null +++ b/node_modules/lodash/isObject.js @@ -0,0 +1,31 @@ +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; diff --git a/node_modules/lodash/isObjectLike.js b/node_modules/lodash/isObjectLike.js new file mode 100644 index 0000000..301716b --- /dev/null +++ b/node_modules/lodash/isObjectLike.js @@ -0,0 +1,29 @@ +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; diff --git a/node_modules/lodash/isPlainObject.js b/node_modules/lodash/isPlainObject.js new file mode 100644 index 0000000..2387373 --- /dev/null +++ b/node_modules/lodash/isPlainObject.js @@ -0,0 +1,62 @@ +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; diff --git a/node_modules/lodash/isRegExp.js b/node_modules/lodash/isRegExp.js new file mode 100644 index 0000000..76c9b6e --- /dev/null +++ b/node_modules/lodash/isRegExp.js @@ -0,0 +1,27 @@ +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + +/** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + +module.exports = isRegExp; diff --git a/node_modules/lodash/isSafeInteger.js b/node_modules/lodash/isSafeInteger.js new file mode 100644 index 0000000..2a48526 --- /dev/null +++ b/node_modules/lodash/isSafeInteger.js @@ -0,0 +1,37 @@ +var isInteger = require('./isInteger'); + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ +function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; +} + +module.exports = isSafeInteger; diff --git a/node_modules/lodash/isSet.js b/node_modules/lodash/isSet.js new file mode 100644 index 0000000..ab88bdf --- /dev/null +++ b/node_modules/lodash/isSet.js @@ -0,0 +1,27 @@ +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + +module.exports = isSet; diff --git a/node_modules/lodash/isString.js b/node_modules/lodash/isString.js new file mode 100644 index 0000000..627eb9c --- /dev/null +++ b/node_modules/lodash/isString.js @@ -0,0 +1,30 @@ +var baseGetTag = require('./_baseGetTag'), + isArray = require('./isArray'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); +} + +module.exports = isString; diff --git a/node_modules/lodash/isSymbol.js b/node_modules/lodash/isSymbol.js new file mode 100644 index 0000000..dfb60b9 --- /dev/null +++ b/node_modules/lodash/isSymbol.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; diff --git a/node_modules/lodash/isTypedArray.js b/node_modules/lodash/isTypedArray.js new file mode 100644 index 0000000..da3f8dd --- /dev/null +++ b/node_modules/lodash/isTypedArray.js @@ -0,0 +1,27 @@ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; diff --git a/node_modules/lodash/isUndefined.js b/node_modules/lodash/isUndefined.js new file mode 100644 index 0000000..377d121 --- /dev/null +++ b/node_modules/lodash/isUndefined.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +module.exports = isUndefined; diff --git a/node_modules/lodash/isWeakMap.js b/node_modules/lodash/isWeakMap.js new file mode 100644 index 0000000..8d36f66 --- /dev/null +++ b/node_modules/lodash/isWeakMap.js @@ -0,0 +1,28 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakMapTag = '[object WeakMap]'; + +/** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ +function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; +} + +module.exports = isWeakMap; diff --git a/node_modules/lodash/isWeakSet.js b/node_modules/lodash/isWeakSet.js new file mode 100644 index 0000000..e628b26 --- /dev/null +++ b/node_modules/lodash/isWeakSet.js @@ -0,0 +1,28 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakSetTag = '[object WeakSet]'; + +/** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ +function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; +} + +module.exports = isWeakSet; diff --git a/node_modules/lodash/iteratee.js b/node_modules/lodash/iteratee.js new file mode 100644 index 0000000..61b73a8 --- /dev/null +++ b/node_modules/lodash/iteratee.js @@ -0,0 +1,53 @@ +var baseClone = require('./_baseClone'), + baseIteratee = require('./_baseIteratee'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ +function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); +} + +module.exports = iteratee; diff --git a/node_modules/lodash/join.js b/node_modules/lodash/join.js new file mode 100644 index 0000000..45de079 --- /dev/null +++ b/node_modules/lodash/join.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeJoin = arrayProto.join; + +/** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ +function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); +} + +module.exports = join; diff --git a/node_modules/lodash/kebabCase.js b/node_modules/lodash/kebabCase.js new file mode 100644 index 0000000..8a52be6 --- /dev/null +++ b/node_modules/lodash/kebabCase.js @@ -0,0 +1,28 @@ +var createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ +var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); +}); + +module.exports = kebabCase; diff --git a/node_modules/lodash/keyBy.js b/node_modules/lodash/keyBy.js new file mode 100644 index 0000000..acc007a --- /dev/null +++ b/node_modules/lodash/keyBy.js @@ -0,0 +1,36 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ +var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); +}); + +module.exports = keyBy; diff --git a/node_modules/lodash/keys.js b/node_modules/lodash/keys.js new file mode 100644 index 0000000..d143c71 --- /dev/null +++ b/node_modules/lodash/keys.js @@ -0,0 +1,37 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeys = require('./_baseKeys'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; diff --git a/node_modules/lodash/keysIn.js b/node_modules/lodash/keysIn.js new file mode 100644 index 0000000..a62308f --- /dev/null +++ b/node_modules/lodash/keysIn.js @@ -0,0 +1,32 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; diff --git a/node_modules/lodash/lang.js b/node_modules/lodash/lang.js new file mode 100644 index 0000000..a396216 --- /dev/null +++ b/node_modules/lodash/lang.js @@ -0,0 +1,58 @@ +module.exports = { + 'castArray': require('./castArray'), + 'clone': require('./clone'), + 'cloneDeep': require('./cloneDeep'), + 'cloneDeepWith': require('./cloneDeepWith'), + 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), + 'eq': require('./eq'), + 'gt': require('./gt'), + 'gte': require('./gte'), + 'isArguments': require('./isArguments'), + 'isArray': require('./isArray'), + 'isArrayBuffer': require('./isArrayBuffer'), + 'isArrayLike': require('./isArrayLike'), + 'isArrayLikeObject': require('./isArrayLikeObject'), + 'isBoolean': require('./isBoolean'), + 'isBuffer': require('./isBuffer'), + 'isDate': require('./isDate'), + 'isElement': require('./isElement'), + 'isEmpty': require('./isEmpty'), + 'isEqual': require('./isEqual'), + 'isEqualWith': require('./isEqualWith'), + 'isError': require('./isError'), + 'isFinite': require('./isFinite'), + 'isFunction': require('./isFunction'), + 'isInteger': require('./isInteger'), + 'isLength': require('./isLength'), + 'isMap': require('./isMap'), + 'isMatch': require('./isMatch'), + 'isMatchWith': require('./isMatchWith'), + 'isNaN': require('./isNaN'), + 'isNative': require('./isNative'), + 'isNil': require('./isNil'), + 'isNull': require('./isNull'), + 'isNumber': require('./isNumber'), + 'isObject': require('./isObject'), + 'isObjectLike': require('./isObjectLike'), + 'isPlainObject': require('./isPlainObject'), + 'isRegExp': require('./isRegExp'), + 'isSafeInteger': require('./isSafeInteger'), + 'isSet': require('./isSet'), + 'isString': require('./isString'), + 'isSymbol': require('./isSymbol'), + 'isTypedArray': require('./isTypedArray'), + 'isUndefined': require('./isUndefined'), + 'isWeakMap': require('./isWeakMap'), + 'isWeakSet': require('./isWeakSet'), + 'lt': require('./lt'), + 'lte': require('./lte'), + 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), + 'toInteger': require('./toInteger'), + 'toLength': require('./toLength'), + 'toNumber': require('./toNumber'), + 'toPlainObject': require('./toPlainObject'), + 'toSafeInteger': require('./toSafeInteger'), + 'toString': require('./toString') +}; diff --git a/node_modules/lodash/last.js b/node_modules/lodash/last.js new file mode 100644 index 0000000..cad1eaf --- /dev/null +++ b/node_modules/lodash/last.js @@ -0,0 +1,20 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/node_modules/lodash/lastIndexOf.js b/node_modules/lodash/lastIndexOf.js new file mode 100644 index 0000000..dabfb61 --- /dev/null +++ b/node_modules/lodash/lastIndexOf.js @@ -0,0 +1,46 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictLastIndexOf = require('./_strictLastIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); +} + +module.exports = lastIndexOf; diff --git a/node_modules/lodash/lodash.js b/node_modules/lodash/lodash.js new file mode 100644 index 0000000..153fc43 --- /dev/null +++ b/node_modules/lodash/lodash.js @@ -0,0 +1,17097 @@ +/** + * @license + * Lodash + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.5'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + return key == '__proto__' + ? undefined + : object[key]; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + + return result; + } + + if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + + return result; + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

    '; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

    fred, barney, & pebbles

    ' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' + +-------------------------------------------------------------------------------- + + + + + +## 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. + +* `column`: The column number in the generated source. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. + +* `column`: The column number in the original source, or null if this + information is not available. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: The column number in the original source. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: Optional. The column number in the original source. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/node_modules/source-map/dist/source-map.debug.js b/node_modules/source-map/dist/source-map.debug.js new file mode 100644 index 0000000..b5ab638 --- /dev/null +++ b/node_modules/source-map/dist/source-map.debug.js @@ -0,0 +1,3091 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7O0FDdENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNQQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsTUFBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsMkNBQTBDLFNBQVM7QUFDbkQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDL1pBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDREQUEyRDtBQUMzRCxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHOztBQUVIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRzs7QUFFSDtBQUNBO0FBQ0E7Ozs7Ozs7QUMzSUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsb0JBQW1CO0FBQ25CLHFCQUFvQjs7QUFFcEIsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsaUJBQWdCO0FBQ2hCLGtCQUFpQjs7QUFFakI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNsRUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsK0NBQThDLFFBQVE7QUFDdEQ7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLDRCQUEyQixRQUFRO0FBQ25DO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNoYUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXNDLFNBQVM7QUFDL0M7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ3hIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQzlFQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxvQkFBbUI7QUFDbkI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVc7O0FBRVg7QUFDQTtBQUNBLFFBQU87QUFDUDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVzs7QUFFWDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTJCLE1BQU07QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLHVEQUFzRCxZQUFZO0FBQ2xFO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0NBQW1DO0FBQ25DO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBeUIsY0FBYztBQUN2QztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esd0JBQXVCLHdDQUF3QztBQUMvRDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZ0RBQStDLG1CQUFtQixFQUFFO0FBQ3BFOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFpQixvQkFBb0I7QUFDckM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE2QixNQUFNO0FBQ25DO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTtBQUNBLElBQUc7QUFDSDs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUMsc0JBQXFCLCtDQUErQztBQUNwRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsUUFBTztBQUNQOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CLDJCQUEyQjtBQUM5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUM7QUFDQTtBQUNBLHNCQUFxQiw0QkFBNEI7QUFDakQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDempDQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7Ozs7OztBQzlHQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFlBQVcsTUFBTTtBQUNqQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQixPQUFPO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQ2pIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLOztBQUVMOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQ0FBaUMsUUFBUTtBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4Q0FBNkMsU0FBUztBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBLHVDQUFzQztBQUN0QztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZSxXQUFXO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnREFBK0MsU0FBUztBQUN4RDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDBDQUF5QyxTQUFTO0FBQ2xEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVztBQUNYO0FBQ0E7QUFDQTtBQUNBLFlBQVc7QUFDWDtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSw2Q0FBNEMsY0FBYztBQUMxRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBLGNBQWE7QUFDYjtBQUNBLFlBQVc7QUFDWDtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBLElBQUc7O0FBRUgsV0FBVTtBQUNWOztBQUVBIiwiZmlsZSI6InNvdXJjZS1tYXAuZGVidWcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gd2VicGFja1VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24ocm9vdCwgZmFjdG9yeSkge1xuXHRpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcgJiYgdHlwZW9mIG1vZHVsZSA9PT0gJ29iamVjdCcpXG5cdFx0bW9kdWxlLmV4cG9ydHMgPSBmYWN0b3J5KCk7XG5cdGVsc2UgaWYodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKVxuXHRcdGRlZmluZShbXSwgZmFjdG9yeSk7XG5cdGVsc2UgaWYodHlwZW9mIGV4cG9ydHMgPT09ICdvYmplY3QnKVxuXHRcdGV4cG9ydHNbXCJzb3VyY2VNYXBcIl0gPSBmYWN0b3J5KCk7XG5cdGVsc2Vcblx0XHRyb290W1wic291cmNlTWFwXCJdID0gZmFjdG9yeSgpO1xufSkodGhpcywgZnVuY3Rpb24oKSB7XG5yZXR1cm4gXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svdW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbiIsIiBcdC8vIFRoZSBtb2R1bGUgY2FjaGVcbiBcdHZhciBpbnN0YWxsZWRNb2R1bGVzID0ge307XG5cbiBcdC8vIFRoZSByZXF1aXJlIGZ1bmN0aW9uXG4gXHRmdW5jdGlvbiBfX3dlYnBhY2tfcmVxdWlyZV9fKG1vZHVsZUlkKSB7XG5cbiBcdFx0Ly8gQ2hlY2sgaWYgbW9kdWxlIGlzIGluIGNhY2hlXG4gXHRcdGlmKGluc3RhbGxlZE1vZHVsZXNbbW9kdWxlSWRdKVxuIFx0XHRcdHJldHVybiBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXS5leHBvcnRzO1xuXG4gXHRcdC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gXHRcdHZhciBtb2R1bGUgPSBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSA9IHtcbiBcdFx0XHRleHBvcnRzOiB7fSxcbiBcdFx0XHRpZDogbW9kdWxlSWQsXG4gXHRcdFx0bG9hZGVkOiBmYWxzZVxuIFx0XHR9O1xuXG4gXHRcdC8vIEV4ZWN1dGUgdGhlIG1vZHVsZSBmdW5jdGlvblxuIFx0XHRtb2R1bGVzW21vZHVsZUlkXS5jYWxsKG1vZHVsZS5leHBvcnRzLCBtb2R1bGUsIG1vZHVsZS5leHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKTtcblxuIFx0XHQvLyBGbGFnIHRoZSBtb2R1bGUgYXMgbG9hZGVkXG4gXHRcdG1vZHVsZS5sb2FkZWQgPSB0cnVlO1xuXG4gXHRcdC8vIFJldHVybiB0aGUgZXhwb3J0cyBvZiB0aGUgbW9kdWxlXG4gXHRcdHJldHVybiBtb2R1bGUuZXhwb3J0cztcbiBcdH1cblxuXG4gXHQvLyBleHBvc2UgdGhlIG1vZHVsZXMgb2JqZWN0IChfX3dlYnBhY2tfbW9kdWxlc19fKVxuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5tID0gbW9kdWxlcztcblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGUgY2FjaGVcbiBcdF9fd2VicGFja19yZXF1aXJlX18uYyA9IGluc3RhbGxlZE1vZHVsZXM7XG5cbiBcdC8vIF9fd2VicGFja19wdWJsaWNfcGF0aF9fXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLnAgPSBcIlwiO1xuXG4gXHQvLyBMb2FkIGVudHJ5IG1vZHVsZSBhbmQgcmV0dXJuIGV4cG9ydHNcbiBcdHJldHVybiBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svYm9vdHN0cmFwIGU0NzM4ZmM3MmE3YjIzMDM5ODg5IiwiLypcbiAqIENvcHlyaWdodCAyMDA5LTIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFLnR4dCBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuZXhwb3J0cy5Tb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvcicpLlNvdXJjZU1hcEdlbmVyYXRvcjtcbmV4cG9ydHMuU291cmNlTWFwQ29uc3VtZXIgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyJykuU291cmNlTWFwQ29uc3VtZXI7XG5leHBvcnRzLlNvdXJjZU5vZGUgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2Utbm9kZScpLlNvdXJjZU5vZGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NvdXJjZS1tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgYmFzZTY0VkxRID0gcmVxdWlyZSgnLi9iYXNlNjQtdmxxJyk7XG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBNYXBwaW5nTGlzdCA9IHJlcXVpcmUoJy4vbWFwcGluZy1saXN0JykuTWFwcGluZ0xpc3Q7XG5cbi8qKlxuICogQW4gaW5zdGFuY2Ugb2YgdGhlIFNvdXJjZU1hcEdlbmVyYXRvciByZXByZXNlbnRzIGEgc291cmNlIG1hcCB3aGljaCBpc1xuICogYmVpbmcgYnVpbHQgaW5jcmVtZW50YWxseS4gWW91IG1heSBwYXNzIGFuIG9iamVjdCB3aXRoIHRoZSBmb2xsb3dpbmdcbiAqIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGZpbGU6IFRoZSBmaWxlbmFtZSBvZiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBzb3VyY2VSb290OiBBIHJvb3QgZm9yIGFsbCByZWxhdGl2ZSBVUkxzIGluIHRoaXMgc291cmNlIG1hcC5cbiAqL1xuZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKSB7XG4gIGlmICghYUFyZ3MpIHtcbiAgICBhQXJncyA9IHt9O1xuICB9XG4gIHRoaXMuX2ZpbGUgPSB1dGlsLmdldEFyZyhhQXJncywgJ2ZpbGUnLCBudWxsKTtcbiAgdGhpcy5fc291cmNlUm9vdCA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB0aGlzLl9za2lwVmFsaWRhdGlvbiA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc2tpcFZhbGlkYXRpb24nLCBmYWxzZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbmFtZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbWFwcGluZ3MgPSBuZXcgTWFwcGluZ0xpc3QoKTtcbiAgdGhpcy5fc291cmNlc0NvbnRlbnRzID0gbnVsbDtcbn1cblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBTb3VyY2VNYXBHZW5lcmF0b3IgYmFzZWQgb24gYSBTb3VyY2VNYXBDb25zdW1lclxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcC5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLmZyb21Tb3VyY2VNYXAgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIpIHtcbiAgICB2YXIgc291cmNlUm9vdCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VSb290O1xuICAgIHZhciBnZW5lcmF0b3IgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKHtcbiAgICAgIGZpbGU6IGFTb3VyY2VNYXBDb25zdW1lci5maWxlLFxuICAgICAgc291cmNlUm9vdDogc291cmNlUm9vdFxuICAgIH0pO1xuICAgIGFTb3VyY2VNYXBDb25zdW1lci5lYWNoTWFwcGluZyhmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIG5ld01hcHBpbmcgPSB7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgIG5ld01hcHBpbmcuc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbmV3TWFwcGluZy5zb3VyY2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3TWFwcGluZy5vcmlnaW5hbCA9IHtcbiAgICAgICAgICBsaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcub3JpZ2luYWxDb2x1bW5cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLm5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZ2VuZXJhdG9yLmFkZE1hcHBpbmcobmV3TWFwcGluZyk7XG4gICAgfSk7XG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZXMuZm9yRWFjaChmdW5jdGlvbiAoc291cmNlRmlsZSkge1xuICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgIGlmIChjb250ZW50ICE9IG51bGwpIHtcbiAgICAgICAgZ2VuZXJhdG9yLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGdlbmVyYXRvcjtcbiAgfTtcblxuLyoqXG4gKiBBZGQgYSBzaW5nbGUgbWFwcGluZyBmcm9tIG9yaWdpbmFsIHNvdXJjZSBsaW5lIGFuZCBjb2x1bW4gdG8gdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIGZvciB0aGlzIHNvdXJjZSBtYXAgYmVpbmcgY3JlYXRlZC4gVGhlIG1hcHBpbmdcbiAqIG9iamVjdCBzaG91bGQgaGF2ZSB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGdlbmVyYXRlZDogQW4gb2JqZWN0IHdpdGggdGhlIGdlbmVyYXRlZCBsaW5lIGFuZCBjb2x1bW4gcG9zaXRpb25zLlxuICogICAtIG9yaWdpbmFsOiBBbiBvYmplY3Qgd2l0aCB0aGUgb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucy5cbiAqICAgLSBzb3VyY2U6IFRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZSAocmVsYXRpdmUgdG8gdGhlIHNvdXJjZVJvb3QpLlxuICogICAtIG5hbWU6IEFuIG9wdGlvbmFsIG9yaWdpbmFsIHRva2VuIG5hbWUgZm9yIHRoaXMgbWFwcGluZy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hZGRNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX2FkZE1hcHBpbmcoYUFyZ3MpIHtcbiAgICB2YXIgZ2VuZXJhdGVkID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdnZW5lcmF0ZWQnKTtcbiAgICB2YXIgb3JpZ2luYWwgPSB1dGlsLmdldEFyZyhhQXJncywgJ29yaWdpbmFsJywgbnVsbCk7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJywgbnVsbCk7XG4gICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhhQXJncywgJ25hbWUnLCBudWxsKTtcblxuICAgIGlmICghdGhpcy5fc2tpcFZhbGlkYXRpb24pIHtcbiAgICAgIHRoaXMuX3ZhbGlkYXRlTWFwcGluZyhnZW5lcmF0ZWQsIG9yaWdpbmFsLCBzb3VyY2UsIG5hbWUpO1xuICAgIH1cblxuICAgIGlmIChzb3VyY2UgIT0gbnVsbCkge1xuICAgICAgc291cmNlID0gU3RyaW5nKHNvdXJjZSk7XG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobmFtZSAhPSBudWxsKSB7XG4gICAgICBuYW1lID0gU3RyaW5nKG5hbWUpO1xuICAgICAgaWYgKCF0aGlzLl9uYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgdGhpcy5fbmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMuX21hcHBpbmdzLmFkZCh7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogZ2VuZXJhdGVkLmNvbHVtbixcbiAgICAgIG9yaWdpbmFsTGluZTogb3JpZ2luYWwgIT0gbnVsbCAmJiBvcmlnaW5hbC5saW5lLFxuICAgICAgb3JpZ2luYWxDb2x1bW46IG9yaWdpbmFsICE9IG51bGwgJiYgb3JpZ2luYWwuY29sdW1uLFxuICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICBuYW1lOiBuYW1lXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3NldFNvdXJjZUNvbnRlbnQoYVNvdXJjZUZpbGUsIGFTb3VyY2VDb250ZW50KSB7XG4gICAgdmFyIHNvdXJjZSA9IGFTb3VyY2VGaWxlO1xuICAgIGlmICh0aGlzLl9zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5fc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG5cbiAgICBpZiAoYVNvdXJjZUNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgLy8gQWRkIHRoZSBzb3VyY2UgY29udGVudCB0byB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAuXG4gICAgICAvLyBDcmVhdGUgYSBuZXcgX3NvdXJjZXNDb250ZW50cyBtYXAgaWYgdGhlIHByb3BlcnR5IGlzIG51bGwuXG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICB0aGlzLl9zb3VyY2VzQ29udGVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgfVxuICAgICAgdGhpcy5fc291cmNlc0NvbnRlbnRzW3V0aWwudG9TZXRTdHJpbmcoc291cmNlKV0gPSBhU291cmNlQ29udGVudDtcbiAgICB9IGVsc2UgaWYgKHRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgLy8gUmVtb3ZlIHRoZSBzb3VyY2UgZmlsZSBmcm9tIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcC5cbiAgICAgIC8vIElmIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcCBpcyBlbXB0eSwgc2V0IHRoZSBwcm9wZXJ0eSB0byBudWxsLlxuICAgICAgZGVsZXRlIHRoaXMuX3NvdXJjZXNDb250ZW50c1t1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSldO1xuICAgICAgaWYgKE9iamVjdC5rZXlzKHRoaXMuX3NvdXJjZXNDb250ZW50cykubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHRoaXMuX3NvdXJjZXNDb250ZW50cyA9IG51bGw7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIEFwcGxpZXMgdGhlIG1hcHBpbmdzIG9mIGEgc3ViLXNvdXJjZS1tYXAgZm9yIGEgc3BlY2lmaWMgc291cmNlIGZpbGUgdG8gdGhlXG4gKiBzb3VyY2UgbWFwIGJlaW5nIGdlbmVyYXRlZC4gRWFjaCBtYXBwaW5nIHRvIHRoZSBzdXBwbGllZCBzb3VyY2UgZmlsZSBpc1xuICogcmV3cml0dGVuIHVzaW5nIHRoZSBzdXBwbGllZCBzb3VyY2UgbWFwLiBOb3RlOiBUaGUgcmVzb2x1dGlvbiBmb3IgdGhlXG4gKiByZXN1bHRpbmcgbWFwcGluZ3MgaXMgdGhlIG1pbmltaXVtIG9mIHRoaXMgbWFwIGFuZCB0aGUgc3VwcGxpZWQgbWFwLlxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIHNvdXJjZSBtYXAgdG8gYmUgYXBwbGllZC5cbiAqIEBwYXJhbSBhU291cmNlRmlsZSBPcHRpb25hbC4gVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZS5cbiAqICAgICAgICBJZiBvbWl0dGVkLCBTb3VyY2VNYXBDb25zdW1lcidzIGZpbGUgcHJvcGVydHkgd2lsbCBiZSB1c2VkLlxuICogQHBhcmFtIGFTb3VyY2VNYXBQYXRoIE9wdGlvbmFsLiBUaGUgZGlybmFtZSBvZiB0aGUgcGF0aCB0byB0aGUgc291cmNlIG1hcFxuICogICAgICAgIHRvIGJlIGFwcGxpZWQuIElmIHJlbGF0aXZlLCBpdCBpcyByZWxhdGl2ZSB0byB0aGUgU291cmNlTWFwQ29uc3VtZXIuXG4gKiAgICAgICAgVGhpcyBwYXJhbWV0ZXIgaXMgbmVlZGVkIHdoZW4gdGhlIHR3byBzb3VyY2UgbWFwcyBhcmVuJ3QgaW4gdGhlIHNhbWVcbiAqICAgICAgICBkaXJlY3RvcnksIGFuZCB0aGUgc291cmNlIG1hcCB0byBiZSBhcHBsaWVkIGNvbnRhaW5zIHJlbGF0aXZlIHNvdXJjZVxuICogICAgICAgIHBhdGhzLiBJZiBzbywgdGhvc2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIG5lZWQgdG8gYmUgcmV3cml0dGVuXG4gKiAgICAgICAgcmVsYXRpdmUgdG8gdGhlIFNvdXJjZU1hcEdlbmVyYXRvci5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hcHBseVNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9hcHBseVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIsIGFTb3VyY2VGaWxlLCBhU291cmNlTWFwUGF0aCkge1xuICAgIHZhciBzb3VyY2VGaWxlID0gYVNvdXJjZUZpbGU7XG4gICAgLy8gSWYgYVNvdXJjZUZpbGUgaXMgb21pdHRlZCwgd2Ugd2lsbCB1c2UgdGhlIGZpbGUgcHJvcGVydHkgb2YgdGhlIFNvdXJjZU1hcFxuICAgIGlmIChhU291cmNlRmlsZSA9PSBudWxsKSB7XG4gICAgICBpZiAoYVNvdXJjZU1hcENvbnN1bWVyLmZpbGUgPT0gbnVsbCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgJ1NvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYXBwbHlTb3VyY2VNYXAgcmVxdWlyZXMgZWl0aGVyIGFuIGV4cGxpY2l0IHNvdXJjZSBmaWxlLCAnICtcbiAgICAgICAgICAnb3IgdGhlIHNvdXJjZSBtYXBcXCdzIFwiZmlsZVwiIHByb3BlcnR5LiBCb3RoIHdlcmUgb21pdHRlZC4nXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBzb3VyY2VGaWxlID0gYVNvdXJjZU1hcENvbnN1bWVyLmZpbGU7XG4gICAgfVxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5fc291cmNlUm9vdDtcbiAgICAvLyBNYWtlIFwic291cmNlRmlsZVwiIHJlbGF0aXZlIGlmIGFuIGFic29sdXRlIFVybCBpcyBwYXNzZWQuXG4gICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgc291cmNlRmlsZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlRmlsZSk7XG4gICAgfVxuICAgIC8vIEFwcGx5aW5nIHRoZSBTb3VyY2VNYXAgY2FuIGFkZCBhbmQgcmVtb3ZlIGl0ZW1zIGZyb20gdGhlIHNvdXJjZXMgYW5kXG4gICAgLy8gdGhlIG5hbWVzIGFycmF5LlxuICAgIHZhciBuZXdTb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gICAgdmFyIG5ld05hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgICAvLyBGaW5kIG1hcHBpbmdzIGZvciB0aGUgXCJzb3VyY2VGaWxlXCJcbiAgICB0aGlzLl9tYXBwaW5ncy51bnNvcnRlZEZvckVhY2goZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSA9PT0gc291cmNlRmlsZSAmJiBtYXBwaW5nLm9yaWdpbmFsTGluZSAhPSBudWxsKSB7XG4gICAgICAgIC8vIENoZWNrIGlmIGl0IGNhbiBiZSBtYXBwZWQgYnkgdGhlIHNvdXJjZSBtYXAsIHRoZW4gdXBkYXRlIHRoZSBtYXBwaW5nLlxuICAgICAgICB2YXIgb3JpZ2luYWwgPSBhU291cmNlTWFwQ29uc3VtZXIub3JpZ2luYWxQb3NpdGlvbkZvcih7XG4gICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAob3JpZ2luYWwuc291cmNlICE9IG51bGwpIHtcbiAgICAgICAgICAvLyBDb3B5IG1hcHBpbmdcbiAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IG9yaWdpbmFsLnNvdXJjZTtcbiAgICAgICAgICBpZiAoYVNvdXJjZU1hcFBhdGggIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSA9IG9yaWdpbmFsLmxpbmU7XG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICBpZiAob3JpZ2luYWwubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICBpZiAoc291cmNlICE9IG51bGwgJiYgIW5ld1NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgbmV3U291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cblxuICAgICAgdmFyIG5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICBpZiAobmFtZSAhPSBudWxsICYmICFuZXdOYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuXG4gICAgfSwgdGhpcyk7XG4gICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgdGhpcy5fbmFtZXMgPSBuZXdOYW1lcztcblxuICAgIC8vIENvcHkgc291cmNlc0NvbnRlbnRzIG9mIGFwcGxpZWQgbWFwLlxuICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgIHZhciBjb250ZW50ID0gYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3Ioc291cmNlRmlsZSk7XG4gICAgICBpZiAoY29udGVudCAhPSBudWxsKSB7XG4gICAgICAgIGlmIChhU291cmNlTWFwUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhU291cmNlTWFwUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIHNvdXJjZUZpbGUpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgIH1cbiAgICB9LCB0aGlzKTtcbiAgfTtcblxuLyoqXG4gKiBBIG1hcHBpbmcgY2FuIGhhdmUgb25lIG9mIHRoZSB0aHJlZSBsZXZlbHMgb2YgZGF0YTpcbiAqXG4gKiAgIDEuIEp1c3QgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi5cbiAqICAgMi4gVGhlIEdlbmVyYXRlZCBwb3NpdGlvbiwgb3JpZ2luYWwgcG9zaXRpb24sIGFuZCBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIDMuIEdlbmVyYXRlZCBhbmQgb3JpZ2luYWwgcG9zaXRpb24sIG9yaWdpbmFsIHNvdXJjZSwgYXMgd2VsbCBhcyBhIG5hbWVcbiAqICAgICAgdG9rZW4uXG4gKlxuICogVG8gbWFpbnRhaW4gY29uc2lzdGVuY3ksIHdlIHZhbGlkYXRlIHRoYXQgYW55IG5ldyBtYXBwaW5nIGJlaW5nIGFkZGVkIGZhbGxzXG4gKiBpbiB0byBvbmUgb2YgdGhlc2UgY2F0ZWdvcmllcy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmFsaWRhdGVNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3ZhbGlkYXRlTWFwcGluZyhhR2VuZXJhdGVkLCBhT3JpZ2luYWwsIGFTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYU5hbWUpIHtcbiAgICAvLyBXaGVuIGFPcmlnaW5hbCBpcyB0cnV0aHkgYnV0IGhhcyBlbXB0eSB2YWx1ZXMgZm9yIC5saW5lIGFuZCAuY29sdW1uLFxuICAgIC8vIGl0IGlzIG1vc3QgbGlrZWx5IGEgcHJvZ3JhbW1lciBlcnJvci4gSW4gdGhpcyBjYXNlIHdlIHRocm93IGEgdmVyeVxuICAgIC8vIHNwZWNpZmljIGVycm9yIG1lc3NhZ2UgdG8gdHJ5IHRvIGd1aWRlIHRoZW0gdGhlIHJpZ2h0IHdheS5cbiAgICAvLyBGb3IgZXhhbXBsZTogaHR0cHM6Ly9naXRodWIuY29tL1BvbHltZXIvcG9seW1lci1idW5kbGVyL3B1bGwvNTE5XG4gICAgaWYgKGFPcmlnaW5hbCAmJiB0eXBlb2YgYU9yaWdpbmFsLmxpbmUgIT09ICdudW1iZXInICYmIHR5cGVvZiBhT3JpZ2luYWwuY29sdW1uICE9PSAnbnVtYmVyJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAnb3JpZ2luYWwubGluZSBhbmQgb3JpZ2luYWwuY29sdW1uIGFyZSBub3QgbnVtYmVycyAtLSB5b3UgcHJvYmFibHkgbWVhbnQgdG8gb21pdCAnICtcbiAgICAgICAgICAgICd0aGUgb3JpZ2luYWwgbWFwcGluZyBlbnRpcmVseSBhbmQgb25seSBtYXAgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi4gSWYgc28sIHBhc3MgJyArXG4gICAgICAgICAgICAnbnVsbCBmb3IgdGhlIG9yaWdpbmFsIG1hcHBpbmcgaW5zdGVhZCBvZiBhbiBvYmplY3Qgd2l0aCBlbXB0eSBvciBudWxsIHZhbHVlcy4nXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKGFHZW5lcmF0ZWQgJiYgJ2xpbmUnIGluIGFHZW5lcmF0ZWQgJiYgJ2NvbHVtbicgaW4gYUdlbmVyYXRlZFxuICAgICAgICAmJiBhR2VuZXJhdGVkLmxpbmUgPiAwICYmIGFHZW5lcmF0ZWQuY29sdW1uID49IDBcbiAgICAgICAgJiYgIWFPcmlnaW5hbCAmJiAhYVNvdXJjZSAmJiAhYU5hbWUpIHtcbiAgICAgIC8vIENhc2UgMS5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUdlbmVyYXRlZCAmJiAnbGluZScgaW4gYUdlbmVyYXRlZCAmJiAnY29sdW1uJyBpbiBhR2VuZXJhdGVkXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsICYmICdsaW5lJyBpbiBhT3JpZ2luYWwgJiYgJ2NvbHVtbicgaW4gYU9yaWdpbmFsXG4gICAgICAgICAgICAgJiYgYUdlbmVyYXRlZC5saW5lID4gMCAmJiBhR2VuZXJhdGVkLmNvbHVtbiA+PSAwXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsLmxpbmUgPiAwICYmIGFPcmlnaW5hbC5jb2x1bW4gPj0gMFxuICAgICAgICAgICAgICYmIGFTb3VyY2UpIHtcbiAgICAgIC8vIENhc2VzIDIgYW5kIDMuXG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIG1hcHBpbmc6ICcgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGdlbmVyYXRlZDogYUdlbmVyYXRlZCxcbiAgICAgICAgc291cmNlOiBhU291cmNlLFxuICAgICAgICBvcmlnaW5hbDogYU9yaWdpbmFsLFxuICAgICAgICBuYW1lOiBhTmFtZVxuICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBTZXJpYWxpemUgdGhlIGFjY3VtdWxhdGVkIG1hcHBpbmdzIGluIHRvIHRoZSBzdHJlYW0gb2YgYmFzZSA2NCBWTFFzXG4gKiBzcGVjaWZpZWQgYnkgdGhlIHNvdXJjZSBtYXAgZm9ybWF0LlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9zZXJpYWxpemVNYXBwaW5ncyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXJpYWxpemVNYXBwaW5ncygpIHtcbiAgICB2YXIgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbExpbmUgPSAwO1xuICAgIHZhciBwcmV2aW91c05hbWUgPSAwO1xuICAgIHZhciBwcmV2aW91c1NvdXJjZSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgIHZhciBuZXh0O1xuICAgIHZhciBtYXBwaW5nO1xuICAgIHZhciBuYW1lSWR4O1xuICAgIHZhciBzb3VyY2VJZHg7XG5cbiAgICB2YXIgbWFwcGluZ3MgPSB0aGlzLl9tYXBwaW5ncy50b0FycmF5KCk7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IG1hcHBpbmdzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBtYXBwaW5nID0gbWFwcGluZ3NbaV07XG4gICAgICBuZXh0ID0gJydcblxuICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgd2hpbGUgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKG5hbWVJZHggLSBwcmV2aW91c05hbWUpO1xuICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmVzdWx0ICs9IG5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfTtcblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50KGFTb3VyY2VzLCBhU291cmNlUm9vdCkge1xuICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICBpZiAoYVNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKGFTb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgdmFyIGtleSA9IHV0aWwudG9TZXRTdHJpbmcoc291cmNlKTtcbiAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodGhpcy5fc291cmNlc0NvbnRlbnRzLCBrZXkpXG4gICAgICAgID8gdGhpcy5fc291cmNlc0NvbnRlbnRzW2tleV1cbiAgICAgICAgOiBudWxsO1xuICAgIH0sIHRoaXMpO1xuICB9O1xuXG4vKipcbiAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLnRvSlNPTiA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgdmFyIG1hcCA9IHtcbiAgICAgIHZlcnNpb246IHRoaXMuX3ZlcnNpb24sXG4gICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgIG5hbWVzOiB0aGlzLl9uYW1lcy50b0FycmF5KCksXG4gICAgICBtYXBwaW5nczogdGhpcy5fc2VyaWFsaXplTWFwcGluZ3MoKVxuICAgIH07XG4gICAgaWYgKHRoaXMuX2ZpbGUgIT0gbnVsbCkge1xuICAgICAgbWFwLmZpbGUgPSB0aGlzLl9maWxlO1xuICAgIH1cbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBtYXAuc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgfVxuICAgIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IHRoaXMuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQobWFwLnNvdXJjZXMsIG1hcC5zb3VyY2VSb290KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xuICB9O1xuXG4vKipcbiAqIFJlbmRlciB0aGUgc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQgdG8gYSBzdHJpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUudG9TdHJpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHRoaXMudG9KU09OKCkpO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcEdlbmVyYXRvciA9IFNvdXJjZU1hcEdlbmVyYXRvcjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3NvdXJjZS1tYXAtZ2VuZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKlxuICogQmFzZWQgb24gdGhlIEJhc2UgNjQgVkxRIGltcGxlbWVudGF0aW9uIGluIENsb3N1cmUgQ29tcGlsZXI6XG4gKiBodHRwczovL2NvZGUuZ29vZ2xlLmNvbS9wL2Nsb3N1cmUtY29tcGlsZXIvc291cmNlL2Jyb3dzZS90cnVuay9zcmMvY29tL2dvb2dsZS9kZWJ1Z2dpbmcvc291cmNlbWFwL0Jhc2U2NFZMUS5qYXZhXG4gKlxuICogQ29weXJpZ2h0IDIwMTEgVGhlIENsb3N1cmUgQ29tcGlsZXIgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dFxuICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zIGFyZVxuICogbWV0OlxuICpcbiAqICAqIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0XG4gKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuXG4gKiAgKiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlXG4gKiAgICBjb3B5cmlnaHQgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZ1xuICogICAgZGlzY2xhaW1lciBpbiB0aGUgZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkXG4gKiAgICB3aXRoIHRoZSBkaXN0cmlidXRpb24uXG4gKiAgKiBOZWl0aGVyIHRoZSBuYW1lIG9mIEdvb2dsZSBJbmMuIG5vciB0aGUgbmFtZXMgb2YgaXRzXG4gKiAgICBjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWRcbiAqICAgIGZyb20gdGhpcyBzb2Z0d2FyZSB3aXRob3V0IHNwZWNpZmljIHByaW9yIHdyaXR0ZW4gcGVybWlzc2lvbi5cbiAqXG4gKiBUSElTIFNPRlRXQVJFIElTIFBST1ZJREVEIEJZIFRIRSBDT1BZUklHSFQgSE9MREVSUyBBTkQgQ09OVFJJQlVUT1JTXG4gKiBcIkFTIElTXCIgQU5EIEFOWSBFWFBSRVNTIE9SIElNUExJRUQgV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UXG4gKiBMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUyBGT1JcbiAqIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFSRSBESVNDTEFJTUVELiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQ09QWVJJR0hUXG4gKiBPV05FUiBPUiBDT05UUklCVVRPUlMgQkUgTElBQkxFIEZPUiBBTlkgRElSRUNULCBJTkRJUkVDVCwgSU5DSURFTlRBTCxcbiAqIFNQRUNJQUwsIEVYRU1QTEFSWSwgT1IgQ09OU0VRVUVOVElBTCBEQU1BR0VTIChJTkNMVURJTkcsIEJVVCBOT1RcbiAqIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7IExPU1MgT0YgVVNFLFxuICogREFUQSwgT1IgUFJPRklUUzsgT1IgQlVTSU5FU1MgSU5URVJSVVBUSU9OKSBIT1dFVkVSIENBVVNFRCBBTkQgT04gQU5ZXG4gKiBUSEVPUlkgT0YgTElBQklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUXG4gKiAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0VcbiAqIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKi9cblxudmFyIGJhc2U2NCA9IHJlcXVpcmUoJy4vYmFzZTY0Jyk7XG5cbi8vIEEgc2luZ2xlIGJhc2UgNjQgZGlnaXQgY2FuIGNvbnRhaW4gNiBiaXRzIG9mIGRhdGEuIEZvciB0aGUgYmFzZSA2NCB2YXJpYWJsZVxuLy8gbGVuZ3RoIHF1YW50aXRpZXMgd2UgdXNlIGluIHRoZSBzb3VyY2UgbWFwIHNwZWMsIHRoZSBmaXJzdCBiaXQgaXMgdGhlIHNpZ24sXG4vLyB0aGUgbmV4dCBmb3VyIGJpdHMgYXJlIHRoZSBhY3R1YWwgdmFsdWUsIGFuZCB0aGUgNnRoIGJpdCBpcyB0aGVcbi8vIGNvbnRpbnVhdGlvbiBiaXQuIFRoZSBjb250aW51YXRpb24gYml0IHRlbGxzIHVzIHdoZXRoZXIgdGhlcmUgYXJlIG1vcmVcbi8vIGRpZ2l0cyBpbiB0aGlzIHZhbHVlIGZvbGxvd2luZyB0aGlzIGRpZ2l0LlxuLy9cbi8vICAgQ29udGludWF0aW9uXG4vLyAgIHwgICAgU2lnblxuLy8gICB8ICAgIHxcbi8vICAgViAgICBWXG4vLyAgIDEwMTAxMVxuXG52YXIgVkxRX0JBU0VfU0hJRlQgPSA1O1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9CQVNFID0gMSA8PCBWTFFfQkFTRV9TSElGVDtcblxuLy8gYmluYXJ5OiAwMTExMTFcbnZhciBWTFFfQkFTRV9NQVNLID0gVkxRX0JBU0UgLSAxO1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9DT05USU5VQVRJT05fQklUID0gVkxRX0JBU0U7XG5cbi8qKlxuICogQ29udmVydHMgZnJvbSBhIHR3by1jb21wbGVtZW50IHZhbHVlIHRvIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMSBiZWNvbWVzIDIgKDEwIGJpbmFyeSksIC0xIGJlY29tZXMgMyAoMTEgYmluYXJ5KVxuICogICAyIGJlY29tZXMgNCAoMTAwIGJpbmFyeSksIC0yIGJlY29tZXMgNSAoMTAxIGJpbmFyeSlcbiAqL1xuZnVuY3Rpb24gdG9WTFFTaWduZWQoYVZhbHVlKSB7XG4gIHJldHVybiBhVmFsdWUgPCAwXG4gICAgPyAoKC1hVmFsdWUpIDw8IDEpICsgMVxuICAgIDogKGFWYWx1ZSA8PCAxKSArIDA7XG59XG5cbi8qKlxuICogQ29udmVydHMgdG8gYSB0d28tY29tcGxlbWVudCB2YWx1ZSBmcm9tIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMiAoMTAgYmluYXJ5KSBiZWNvbWVzIDEsIDMgKDExIGJpbmFyeSkgYmVjb21lcyAtMVxuICogICA0ICgxMDAgYmluYXJ5KSBiZWNvbWVzIDIsIDUgKDEwMSBiaW5hcnkpIGJlY29tZXMgLTJcbiAqL1xuZnVuY3Rpb24gZnJvbVZMUVNpZ25lZChhVmFsdWUpIHtcbiAgdmFyIGlzTmVnYXRpdmUgPSAoYVZhbHVlICYgMSkgPT09IDE7XG4gIHZhciBzaGlmdGVkID0gYVZhbHVlID4+IDE7XG4gIHJldHVybiBpc05lZ2F0aXZlXG4gICAgPyAtc2hpZnRlZFxuICAgIDogc2hpZnRlZDtcbn1cblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBiYXNlIDY0IFZMUSBlbmNvZGVkIHZhbHVlLlxuICovXG5leHBvcnRzLmVuY29kZSA9IGZ1bmN0aW9uIGJhc2U2NFZMUV9lbmNvZGUoYVZhbHVlKSB7XG4gIHZhciBlbmNvZGVkID0gXCJcIjtcbiAgdmFyIGRpZ2l0O1xuXG4gIHZhciB2bHEgPSB0b1ZMUVNpZ25lZChhVmFsdWUpO1xuXG4gIGRvIHtcbiAgICBkaWdpdCA9IHZscSAmIFZMUV9CQVNFX01BU0s7XG4gICAgdmxxID4+Pj0gVkxRX0JBU0VfU0hJRlQ7XG4gICAgaWYgKHZscSA+IDApIHtcbiAgICAgIC8vIFRoZXJlIGFyZSBzdGlsbCBtb3JlIGRpZ2l0cyBpbiB0aGlzIHZhbHVlLCBzbyB3ZSBtdXN0IG1ha2Ugc3VyZSB0aGVcbiAgICAgIC8vIGNvbnRpbnVhdGlvbiBiaXQgaXMgbWFya2VkLlxuICAgICAgZGlnaXQgfD0gVkxRX0NPTlRJTlVBVElPTl9CSVQ7XG4gICAgfVxuICAgIGVuY29kZWQgKz0gYmFzZTY0LmVuY29kZShkaWdpdCk7XG4gIH0gd2hpbGUgKHZscSA+IDApO1xuXG4gIHJldHVybiBlbmNvZGVkO1xufTtcblxuLyoqXG4gKiBEZWNvZGVzIHRoZSBuZXh0IGJhc2UgNjQgVkxRIHZhbHVlIGZyb20gdGhlIGdpdmVuIHN0cmluZyBhbmQgcmV0dXJucyB0aGVcbiAqIHZhbHVlIGFuZCB0aGUgcmVzdCBvZiB0aGUgc3RyaW5nIHZpYSB0aGUgb3V0IHBhcmFtZXRlci5cbiAqL1xuZXhwb3J0cy5kZWNvZGUgPSBmdW5jdGlvbiBiYXNlNjRWTFFfZGVjb2RlKGFTdHIsIGFJbmRleCwgYU91dFBhcmFtKSB7XG4gIHZhciBzdHJMZW4gPSBhU3RyLmxlbmd0aDtcbiAgdmFyIHJlc3VsdCA9IDA7XG4gIHZhciBzaGlmdCA9IDA7XG4gIHZhciBjb250aW51YXRpb24sIGRpZ2l0O1xuXG4gIGRvIHtcbiAgICBpZiAoYUluZGV4ID49IHN0ckxlbikge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhwZWN0ZWQgbW9yZSBkaWdpdHMgaW4gYmFzZSA2NCBWTFEgdmFsdWUuXCIpO1xuICAgIH1cblxuICAgIGRpZ2l0ID0gYmFzZTY0LmRlY29kZShhU3RyLmNoYXJDb2RlQXQoYUluZGV4KyspKTtcbiAgICBpZiAoZGlnaXQgPT09IC0xKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIGJhc2U2NCBkaWdpdDogXCIgKyBhU3RyLmNoYXJBdChhSW5kZXggLSAxKSk7XG4gICAgfVxuXG4gICAgY29udGludWF0aW9uID0gISEoZGlnaXQgJiBWTFFfQ09OVElOVUFUSU9OX0JJVCk7XG4gICAgZGlnaXQgJj0gVkxRX0JBU0VfTUFTSztcbiAgICByZXN1bHQgPSByZXN1bHQgKyAoZGlnaXQgPDwgc2hpZnQpO1xuICAgIHNoaWZ0ICs9IFZMUV9CQVNFX1NISUZUO1xuICB9IHdoaWxlIChjb250aW51YXRpb24pO1xuXG4gIGFPdXRQYXJhbS52YWx1ZSA9IGZyb21WTFFTaWduZWQocmVzdWx0KTtcbiAgYU91dFBhcmFtLnJlc3QgPSBhSW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LXZscS5qc1xuLy8gbW9kdWxlIGlkID0gMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBpbnRUb0NoYXJNYXAgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycuc3BsaXQoJycpO1xuXG4vKipcbiAqIEVuY29kZSBhbiBpbnRlZ2VyIGluIHRoZSByYW5nZSBvZiAwIHRvIDYzIHRvIGEgc2luZ2xlIGJhc2UgNjQgZGlnaXQuXG4gKi9cbmV4cG9ydHMuZW5jb2RlID0gZnVuY3Rpb24gKG51bWJlcikge1xuICBpZiAoMCA8PSBudW1iZXIgJiYgbnVtYmVyIDwgaW50VG9DaGFyTWFwLmxlbmd0aCkge1xuICAgIHJldHVybiBpbnRUb0NoYXJNYXBbbnVtYmVyXTtcbiAgfVxuICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiTXVzdCBiZSBiZXR3ZWVuIDAgYW5kIDYzOiBcIiArIG51bWJlcik7XG59O1xuXG4vKipcbiAqIERlY29kZSBhIHNpbmdsZSBiYXNlIDY0IGNoYXJhY3RlciBjb2RlIGRpZ2l0IHRvIGFuIGludGVnZXIuIFJldHVybnMgLTEgb25cbiAqIGZhaWx1cmUuXG4gKi9cbmV4cG9ydHMuZGVjb2RlID0gZnVuY3Rpb24gKGNoYXJDb2RlKSB7XG4gIHZhciBiaWdBID0gNjU7ICAgICAvLyAnQSdcbiAgdmFyIGJpZ1ogPSA5MDsgICAgIC8vICdaJ1xuXG4gIHZhciBsaXR0bGVBID0gOTc7ICAvLyAnYSdcbiAgdmFyIGxpdHRsZVogPSAxMjI7IC8vICd6J1xuXG4gIHZhciB6ZXJvID0gNDg7ICAgICAvLyAnMCdcbiAgdmFyIG5pbmUgPSA1NzsgICAgIC8vICc5J1xuXG4gIHZhciBwbHVzID0gNDM7ICAgICAvLyAnKydcbiAgdmFyIHNsYXNoID0gNDc7ICAgIC8vICcvJ1xuXG4gIHZhciBsaXR0bGVPZmZzZXQgPSAyNjtcbiAgdmFyIG51bWJlck9mZnNldCA9IDUyO1xuXG4gIC8vIDAgLSAyNTogQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpcbiAgaWYgKGJpZ0EgPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gYmlnWikge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSBiaWdBKTtcbiAgfVxuXG4gIC8vIDI2IC0gNTE6IGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6XG4gIGlmIChsaXR0bGVBIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IGxpdHRsZVopIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gbGl0dGxlQSArIGxpdHRsZU9mZnNldCk7XG4gIH1cblxuICAvLyA1MiAtIDYxOiAwMTIzNDU2Nzg5XG4gIGlmICh6ZXJvIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IG5pbmUpIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gemVybyArIG51bWJlck9mZnNldCk7XG4gIH1cblxuICAvLyA2MjogK1xuICBpZiAoY2hhckNvZGUgPT0gcGx1cykge1xuICAgIHJldHVybiA2MjtcbiAgfVxuXG4gIC8vIDYzOiAvXG4gIGlmIChjaGFyQ29kZSA9PSBzbGFzaCkge1xuICAgIHJldHVybiA2MztcbiAgfVxuXG4gIC8vIEludmFsaWQgYmFzZTY0IGRpZ2l0LlxuICByZXR1cm4gLTE7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLyoqXG4gKiBUaGlzIGlzIGEgaGVscGVyIGZ1bmN0aW9uIGZvciBnZXR0aW5nIHZhbHVlcyBmcm9tIHBhcmFtZXRlci9vcHRpb25zXG4gKiBvYmplY3RzLlxuICpcbiAqIEBwYXJhbSBhcmdzIFRoZSBvYmplY3Qgd2UgYXJlIGV4dHJhY3RpbmcgdmFsdWVzIGZyb21cbiAqIEBwYXJhbSBuYW1lIFRoZSBuYW1lIG9mIHRoZSBwcm9wZXJ0eSB3ZSBhcmUgZ2V0dGluZy5cbiAqIEBwYXJhbSBkZWZhdWx0VmFsdWUgQW4gb3B0aW9uYWwgdmFsdWUgdG8gcmV0dXJuIGlmIHRoZSBwcm9wZXJ0eSBpcyBtaXNzaW5nXG4gKiBmcm9tIHRoZSBvYmplY3QuIElmIHRoaXMgaXMgbm90IHNwZWNpZmllZCBhbmQgdGhlIHByb3BlcnR5IGlzIG1pc3NpbmcsIGFuXG4gKiBlcnJvciB3aWxsIGJlIHRocm93bi5cbiAqL1xuZnVuY3Rpb24gZ2V0QXJnKGFBcmdzLCBhTmFtZSwgYURlZmF1bHRWYWx1ZSkge1xuICBpZiAoYU5hbWUgaW4gYUFyZ3MpIHtcbiAgICByZXR1cm4gYUFyZ3NbYU5hbWVdO1xuICB9IGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDMpIHtcbiAgICByZXR1cm4gYURlZmF1bHRWYWx1ZTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFOYW1lICsgJ1wiIGlzIGEgcmVxdWlyZWQgYXJndW1lbnQuJyk7XG4gIH1cbn1cbmV4cG9ydHMuZ2V0QXJnID0gZ2V0QXJnO1xuXG52YXIgdXJsUmVnZXhwID0gL14oPzooW1xcdytcXC0uXSspOik/XFwvXFwvKD86KFxcdys6XFx3KylAKT8oW1xcdy5dKikoPzo6KFxcZCspKT8oXFxTKikkLztcbnZhciBkYXRhVXJsUmVnZXhwID0gL15kYXRhOi4rXFwsLiskLztcblxuZnVuY3Rpb24gdXJsUGFyc2UoYVVybCkge1xuICB2YXIgbWF0Y2ggPSBhVXJsLm1hdGNoKHVybFJlZ2V4cCk7XG4gIGlmICghbWF0Y2gpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4ge1xuICAgIHNjaGVtZTogbWF0Y2hbMV0sXG4gICAgYXV0aDogbWF0Y2hbMl0sXG4gICAgaG9zdDogbWF0Y2hbM10sXG4gICAgcG9ydDogbWF0Y2hbNF0sXG4gICAgcGF0aDogbWF0Y2hbNV1cbiAgfTtcbn1cbmV4cG9ydHMudXJsUGFyc2UgPSB1cmxQYXJzZTtcblxuZnVuY3Rpb24gdXJsR2VuZXJhdGUoYVBhcnNlZFVybCkge1xuICB2YXIgdXJsID0gJyc7XG4gIGlmIChhUGFyc2VkVXJsLnNjaGVtZSkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLnNjaGVtZSArICc6JztcbiAgfVxuICB1cmwgKz0gJy8vJztcbiAgaWYgKGFQYXJzZWRVcmwuYXV0aCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmF1dGggKyAnQCc7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwuaG9zdCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmhvc3Q7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwucG9ydCkge1xuICAgIHVybCArPSBcIjpcIiArIGFQYXJzZWRVcmwucG9ydFxuICB9XG4gIGlmIChhUGFyc2VkVXJsLnBhdGgpIHtcbiAgICB1cmwgKz0gYVBhcnNlZFVybC5wYXRoO1xuICB9XG4gIHJldHVybiB1cmw7XG59XG5leHBvcnRzLnVybEdlbmVyYXRlID0gdXJsR2VuZXJhdGU7XG5cbi8qKlxuICogTm9ybWFsaXplcyBhIHBhdGgsIG9yIHRoZSBwYXRoIHBvcnRpb24gb2YgYSBVUkw6XG4gKlxuICogLSBSZXBsYWNlcyBjb25zZWN1dGl2ZSBzbGFzaGVzIHdpdGggb25lIHNsYXNoLlxuICogLSBSZW1vdmVzIHVubmVjZXNzYXJ5ICcuJyBwYXJ0cy5cbiAqIC0gUmVtb3ZlcyB1bm5lY2Vzc2FyeSAnPGRpcj4vLi4nIHBhcnRzLlxuICpcbiAqIEJhc2VkIG9uIGNvZGUgaW4gdGhlIE5vZGUuanMgJ3BhdGgnIGNvcmUgbW9kdWxlLlxuICpcbiAqIEBwYXJhbSBhUGF0aCBUaGUgcGF0aCBvciB1cmwgdG8gbm9ybWFsaXplLlxuICovXG5mdW5jdGlvbiBub3JtYWxpemUoYVBhdGgpIHtcbiAgdmFyIHBhdGggPSBhUGF0aDtcbiAgdmFyIHVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgaWYgKHVybCkge1xuICAgIGlmICghdXJsLnBhdGgpIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG4gICAgcGF0aCA9IHVybC5wYXRoO1xuICB9XG4gIHZhciBpc0Fic29sdXRlID0gZXhwb3J0cy5pc0Fic29sdXRlKHBhdGgpO1xuXG4gIHZhciBwYXJ0cyA9IHBhdGguc3BsaXQoL1xcLysvKTtcbiAgZm9yICh2YXIgcGFydCwgdXAgPSAwLCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICBwYXJ0ID0gcGFydHNbaV07XG4gICAgaWYgKHBhcnQgPT09ICcuJykge1xuICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgIH0gZWxzZSBpZiAocGFydCA9PT0gJy4uJykge1xuICAgICAgdXArKztcbiAgICB9IGVsc2UgaWYgKHVwID4gMCkge1xuICAgICAgaWYgKHBhcnQgPT09ICcnKSB7XG4gICAgICAgIC8vIFRoZSBmaXJzdCBwYXJ0IGlzIGJsYW5rIGlmIHRoZSBwYXRoIGlzIGFic29sdXRlLiBUcnlpbmcgdG8gZ29cbiAgICAgICAgLy8gYWJvdmUgdGhlIHJvb3QgaXMgYSBuby1vcC4gVGhlcmVmb3JlIHdlIGNhbiByZW1vdmUgYWxsICcuLicgcGFydHNcbiAgICAgICAgLy8gZGlyZWN0bHkgYWZ0ZXIgdGhlIHJvb3QuXG4gICAgICAgIHBhcnRzLnNwbGljZShpICsgMSwgdXApO1xuICAgICAgICB1cCA9IDA7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMik7XG4gICAgICAgIHVwLS07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHBhdGggPSBwYXJ0cy5qb2luKCcvJyk7XG5cbiAgaWYgKHBhdGggPT09ICcnKSB7XG4gICAgcGF0aCA9IGlzQWJzb2x1dGUgPyAnLycgOiAnLic7XG4gIH1cblxuICBpZiAodXJsKSB7XG4gICAgdXJsLnBhdGggPSBwYXRoO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZSh1cmwpO1xuICB9XG4gIHJldHVybiBwYXRoO1xufVxuZXhwb3J0cy5ub3JtYWxpemUgPSBub3JtYWxpemU7XG5cbi8qKlxuICogSm9pbnMgdHdvIHBhdGhzL1VSTHMuXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBqb2luZWQgd2l0aCB0aGUgcm9vdC5cbiAqXG4gKiAtIElmIGFQYXRoIGlzIGEgVVJMIG9yIGEgZGF0YSBVUkksIGFQYXRoIGlzIHJldHVybmVkLCB1bmxlc3MgYVBhdGggaXMgYVxuICogICBzY2hlbWUtcmVsYXRpdmUgVVJMOiBUaGVuIHRoZSBzY2hlbWUgb2YgYVJvb3QsIGlmIGFueSwgaXMgcHJlcGVuZGVkXG4gKiAgIGZpcnN0LlxuICogLSBPdGhlcndpc2UgYVBhdGggaXMgYSBwYXRoLiBJZiBhUm9vdCBpcyBhIFVSTCwgdGhlbiBpdHMgcGF0aCBwb3J0aW9uXG4gKiAgIGlzIHVwZGF0ZWQgd2l0aCB0aGUgcmVzdWx0IGFuZCBhUm9vdCBpcyByZXR1cm5lZC4gT3RoZXJ3aXNlIHRoZSByZXN1bHRcbiAqICAgaXMgcmV0dXJuZWQuXG4gKiAgIC0gSWYgYVBhdGggaXMgYWJzb2x1dGUsIHRoZSByZXN1bHQgaXMgYVBhdGguXG4gKiAgIC0gT3RoZXJ3aXNlIHRoZSB0d28gcGF0aHMgYXJlIGpvaW5lZCB3aXRoIGEgc2xhc2guXG4gKiAtIEpvaW5pbmcgZm9yIGV4YW1wbGUgJ2h0dHA6Ly8nIGFuZCAnd3d3LmV4YW1wbGUuY29tJyBpcyBhbHNvIHN1cHBvcnRlZC5cbiAqL1xuZnVuY3Rpb24gam9pbihhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuICBpZiAoYVBhdGggPT09IFwiXCIpIHtcbiAgICBhUGF0aCA9IFwiLlwiO1xuICB9XG4gIHZhciBhUGF0aFVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgdmFyIGFSb290VXJsID0gdXJsUGFyc2UoYVJvb3QpO1xuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdCA9IGFSb290VXJsLnBhdGggfHwgJy8nO1xuICB9XG5cbiAgLy8gYGpvaW4oZm9vLCAnLy93d3cuZXhhbXBsZS5vcmcnKWBcbiAgaWYgKGFQYXRoVXJsICYmICFhUGF0aFVybC5zY2hlbWUpIHtcbiAgICBpZiAoYVJvb3RVcmwpIHtcbiAgICAgIGFQYXRoVXJsLnNjaGVtZSA9IGFSb290VXJsLnNjaGVtZTtcbiAgICB9XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFQYXRoVXJsKTtcbiAgfVxuXG4gIGlmIChhUGF0aFVybCB8fCBhUGF0aC5tYXRjaChkYXRhVXJsUmVnZXhwKSkge1xuICAgIHJldHVybiBhUGF0aDtcbiAgfVxuXG4gIC8vIGBqb2luKCdodHRwOi8vJywgJ3d3dy5leGFtcGxlLmNvbScpYFxuICBpZiAoYVJvb3RVcmwgJiYgIWFSb290VXJsLmhvc3QgJiYgIWFSb290VXJsLnBhdGgpIHtcbiAgICBhUm9vdFVybC5ob3N0ID0gYVBhdGg7XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFSb290VXJsKTtcbiAgfVxuXG4gIHZhciBqb2luZWQgPSBhUGF0aC5jaGFyQXQoMCkgPT09ICcvJ1xuICAgID8gYVBhdGhcbiAgICA6IG5vcm1hbGl6ZShhUm9vdC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIGFQYXRoKTtcblxuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdFVybC5wYXRoID0gam9pbmVkO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZShhUm9vdFVybCk7XG4gIH1cbiAgcmV0dXJuIGpvaW5lZDtcbn1cbmV4cG9ydHMuam9pbiA9IGpvaW47XG5cbmV4cG9ydHMuaXNBYnNvbHV0ZSA9IGZ1bmN0aW9uIChhUGF0aCkge1xuICByZXR1cm4gYVBhdGguY2hhckF0KDApID09PSAnLycgfHwgISFhUGF0aC5tYXRjaCh1cmxSZWdleHApO1xufTtcblxuLyoqXG4gKiBNYWtlIGEgcGF0aCByZWxhdGl2ZSB0byBhIFVSTCBvciBhbm90aGVyIHBhdGguXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBtYWRlIHJlbGF0aXZlIHRvIGFSb290LlxuICovXG5mdW5jdGlvbiByZWxhdGl2ZShhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuXG4gIGFSb290ID0gYVJvb3QucmVwbGFjZSgvXFwvJC8sICcnKTtcblxuICAvLyBJdCBpcyBwb3NzaWJsZSBmb3IgdGhlIHBhdGggdG8gYmUgYWJvdmUgdGhlIHJvb3QuIEluIHRoaXMgY2FzZSwgc2ltcGx5XG4gIC8vIGNoZWNraW5nIHdoZXRoZXIgdGhlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlIHBhdGggd29uJ3Qgd29yay4gSW5zdGVhZCwgd2VcbiAgLy8gbmVlZCB0byByZW1vdmUgY29tcG9uZW50cyBmcm9tIHRoZSByb290IG9uZSBieSBvbmUsIHVudGlsIGVpdGhlciB3ZSBmaW5kXG4gIC8vIGEgcHJlZml4IHRoYXQgZml0cywgb3Igd2UgcnVuIG91dCBvZiBjb21wb25lbnRzIHRvIHJlbW92ZS5cbiAgdmFyIGxldmVsID0gMDtcbiAgd2hpbGUgKGFQYXRoLmluZGV4T2YoYVJvb3QgKyAnLycpICE9PSAwKSB7XG4gICAgdmFyIGluZGV4ID0gYVJvb3QubGFzdEluZGV4T2YoXCIvXCIpO1xuICAgIGlmIChpbmRleCA8IDApIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG5cbiAgICAvLyBJZiB0aGUgb25seSBwYXJ0IG9mIHRoZSByb290IHRoYXQgaXMgbGVmdCBpcyB0aGUgc2NoZW1lIChpLmUuIGh0dHA6Ly8sXG4gICAgLy8gZmlsZTovLy8sIGV0Yy4pLCBvbmUgb3IgbW9yZSBzbGFzaGVzICgvKSwgb3Igc2ltcGx5IG5vdGhpbmcgYXQgYWxsLCB3ZVxuICAgIC8vIGhhdmUgZXhoYXVzdGVkIGFsbCBjb21wb25lbnRzLCBzbyB0aGUgcGF0aCBpcyBub3QgcmVsYXRpdmUgdG8gdGhlIHJvb3QuXG4gICAgYVJvb3QgPSBhUm9vdC5zbGljZSgwLCBpbmRleCk7XG4gICAgaWYgKGFSb290Lm1hdGNoKC9eKFteXFwvXSs6XFwvKT9cXC8qJC8pKSB7XG4gICAgICByZXR1cm4gYVBhdGg7XG4gICAgfVxuXG4gICAgKytsZXZlbDtcbiAgfVxuXG4gIC8vIE1ha2Ugc3VyZSB3ZSBhZGQgYSBcIi4uL1wiIGZvciBlYWNoIGNvbXBvbmVudCB3ZSByZW1vdmVkIGZyb20gdGhlIHJvb3QuXG4gIHJldHVybiBBcnJheShsZXZlbCArIDEpLmpvaW4oXCIuLi9cIikgKyBhUGF0aC5zdWJzdHIoYVJvb3QubGVuZ3RoICsgMSk7XG59XG5leHBvcnRzLnJlbGF0aXZlID0gcmVsYXRpdmU7XG5cbnZhciBzdXBwb3J0c051bGxQcm90byA9IChmdW5jdGlvbiAoKSB7XG4gIHZhciBvYmogPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICByZXR1cm4gISgnX19wcm90b19fJyBpbiBvYmopO1xufSgpKTtcblxuZnVuY3Rpb24gaWRlbnRpdHkgKHMpIHtcbiAgcmV0dXJuIHM7XG59XG5cbi8qKlxuICogQmVjYXVzZSBiZWhhdmlvciBnb2VzIHdhY2t5IHdoZW4geW91IHNldCBgX19wcm90b19fYCBvbiBvYmplY3RzLCB3ZVxuICogaGF2ZSB0byBwcmVmaXggYWxsIHRoZSBzdHJpbmdzIGluIG91ciBzZXQgd2l0aCBhbiBhcmJpdHJhcnkgY2hhcmFjdGVyLlxuICpcbiAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL3B1bGwvMzEgYW5kXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8zMFxuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5mdW5jdGlvbiB0b1NldFN0cmluZyhhU3RyKSB7XG4gIGlmIChpc1Byb3RvU3RyaW5nKGFTdHIpKSB7XG4gICAgcmV0dXJuICckJyArIGFTdHI7XG4gIH1cblxuICByZXR1cm4gYVN0cjtcbn1cbmV4cG9ydHMudG9TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogdG9TZXRTdHJpbmc7XG5cbmZ1bmN0aW9uIGZyb21TZXRTdHJpbmcoYVN0cikge1xuICBpZiAoaXNQcm90b1N0cmluZyhhU3RyKSkge1xuICAgIHJldHVybiBhU3RyLnNsaWNlKDEpO1xuICB9XG5cbiAgcmV0dXJuIGFTdHI7XG59XG5leHBvcnRzLmZyb21TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogZnJvbVNldFN0cmluZztcblxuZnVuY3Rpb24gaXNQcm90b1N0cmluZyhzKSB7XG4gIGlmICghcykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBzLmxlbmd0aDtcblxuICBpZiAobGVuZ3RoIDwgOSAvKiBcIl9fcHJvdG9fX1wiLmxlbmd0aCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChzLmNoYXJDb2RlQXQobGVuZ3RoIC0gMSkgIT09IDk1ICAvKiAnXycgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSAyKSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDMpICE9PSAxMTEgLyogJ28nICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNCkgIT09IDExNiAvKiAndCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA1KSAhPT0gMTExIC8qICdvJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDYpICE9PSAxMTQgLyogJ3InICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNykgIT09IDExMiAvKiAncCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA4KSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDkpICE9PSA5NSAgLyogJ18nICovKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IGxlbmd0aCAtIDEwOyBpID49IDA7IGktLSkge1xuICAgIGlmIChzLmNoYXJDb2RlQXQoaSkgIT09IDM2IC8qICckJyAqLykge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2hlcmUgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKlxuICogT3B0aW9uYWxseSBwYXNzIGluIGB0cnVlYCBhcyBgb25seUNvbXBhcmVHZW5lcmF0ZWRgIHRvIGNvbnNpZGVyIHR3b1xuICogbWFwcGluZ3Mgd2l0aCB0aGUgc2FtZSBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4sIGJ1dCBkaWZmZXJlbnQgZ2VuZXJhdGVkXG4gKiBsaW5lIGFuZCBjb2x1bW4gdGhlIHNhbWUuIFVzZWZ1bCB3aGVuIHNlYXJjaGluZyBmb3IgYSBtYXBwaW5nIHdpdGggYVxuICogc3R1YmJlZCBvdXQgbWFwcGluZy5cbiAqL1xuZnVuY3Rpb24gY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMobWFwcGluZ0EsIG1hcHBpbmdCLCBvbmx5Q29tcGFyZU9yaWdpbmFsKSB7XG4gIHZhciBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDAgfHwgb25seUNvbXBhcmVPcmlnaW5hbCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5nZW5lcmF0ZWRDb2x1bW4gLSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyA9IGNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zO1xuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2l0aCBkZWZsYXRlZCBzb3VyY2UgYW5kIG5hbWUgaW5kaWNlcyB3aGVyZVxuICogdGhlIGdlbmVyYXRlZCBwb3NpdGlvbnMgYXJlIGNvbXBhcmVkLlxuICpcbiAqIE9wdGlvbmFsbHkgcGFzcyBpbiBgdHJ1ZWAgYXMgYG9ubHlDb21wYXJlR2VuZXJhdGVkYCB0byBjb25zaWRlciB0d29cbiAqIG1hcHBpbmdzIHdpdGggdGhlIHNhbWUgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiwgYnV0IGRpZmZlcmVudFxuICogc291cmNlL25hbWUvb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHRoZSBzYW1lLiBVc2VmdWwgd2hlbiBzZWFyY2hpbmcgZm9yIGFcbiAqIG1hcHBpbmcgd2l0aCBhIHN0dWJiZWQgb3V0IG1hcHBpbmcuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQiwgb25seUNvbXBhcmVHZW5lcmF0ZWQpIHtcbiAgdmFyIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmUgLSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbiAtIG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgaWYgKGNtcCAhPT0gMCB8fCBvbmx5Q29tcGFyZUdlbmVyYXRlZCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCA9IGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkO1xuXG5mdW5jdGlvbiBzdHJjbXAoYVN0cjEsIGFTdHIyKSB7XG4gIGlmIChhU3RyMSA9PT0gYVN0cjIpIHtcbiAgICByZXR1cm4gMDtcbiAgfVxuXG4gIGlmIChhU3RyMSA+IGFTdHIyKSB7XG4gICAgcmV0dXJuIDE7XG4gIH1cblxuICByZXR1cm4gLTE7XG59XG5cbi8qKlxuICogQ29tcGFyYXRvciBiZXR3ZWVuIHR3byBtYXBwaW5ncyB3aXRoIGluZmxhdGVkIHNvdXJjZSBhbmQgbmFtZSBzdHJpbmdzIHdoZXJlXG4gKiB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikge1xuICB2YXIgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uIC0gbWFwcGluZ0IuZ2VuZXJhdGVkQ29sdW1uO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IHN0cmNtcChtYXBwaW5nQS5zb3VyY2UsIG1hcHBpbmdCLnNvdXJjZSk7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIHN0cmNtcChtYXBwaW5nQS5uYW1lLCBtYXBwaW5nQi5uYW1lKTtcbn1cbmV4cG9ydHMuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQgPSBjb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3V0aWwuanNcbi8vIG1vZHVsZSBpZCA9IDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGhhcyA9IE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHk7XG52YXIgaGFzTmF0aXZlTWFwID0gdHlwZW9mIE1hcCAhPT0gXCJ1bmRlZmluZWRcIjtcblxuLyoqXG4gKiBBIGRhdGEgc3RydWN0dXJlIHdoaWNoIGlzIGEgY29tYmluYXRpb24gb2YgYW4gYXJyYXkgYW5kIGEgc2V0LiBBZGRpbmcgYSBuZXdcbiAqIG1lbWJlciBpcyBPKDEpLCB0ZXN0aW5nIGZvciBtZW1iZXJzaGlwIGlzIE8oMSksIGFuZCBmaW5kaW5nIHRoZSBpbmRleCBvZiBhblxuICogZWxlbWVudCBpcyBPKDEpLiBSZW1vdmluZyBlbGVtZW50cyBmcm9tIHRoZSBzZXQgaXMgbm90IHN1cHBvcnRlZC4gT25seVxuICogc3RyaW5ncyBhcmUgc3VwcG9ydGVkIGZvciBtZW1iZXJzaGlwLlxuICovXG5mdW5jdGlvbiBBcnJheVNldCgpIHtcbiAgdGhpcy5fYXJyYXkgPSBbXTtcbiAgdGhpcy5fc2V0ID0gaGFzTmF0aXZlTWFwID8gbmV3IE1hcCgpIDogT2JqZWN0LmNyZWF0ZShudWxsKTtcbn1cblxuLyoqXG4gKiBTdGF0aWMgbWV0aG9kIGZvciBjcmVhdGluZyBBcnJheVNldCBpbnN0YW5jZXMgZnJvbSBhbiBleGlzdGluZyBhcnJheS5cbiAqL1xuQXJyYXlTZXQuZnJvbUFycmF5ID0gZnVuY3Rpb24gQXJyYXlTZXRfZnJvbUFycmF5KGFBcnJheSwgYUFsbG93RHVwbGljYXRlcykge1xuICB2YXIgc2V0ID0gbmV3IEFycmF5U2V0KCk7XG4gIGZvciAodmFyIGkgPSAwLCBsZW4gPSBhQXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzZXQuYWRkKGFBcnJheVtpXSwgYUFsbG93RHVwbGljYXRlcyk7XG4gIH1cbiAgcmV0dXJuIHNldDtcbn07XG5cbi8qKlxuICogUmV0dXJuIGhvdyBtYW55IHVuaXF1ZSBpdGVtcyBhcmUgaW4gdGhpcyBBcnJheVNldC4gSWYgZHVwbGljYXRlcyBoYXZlIGJlZW5cbiAqIGFkZGVkLCB0aGFuIHRob3NlIGRvIG5vdCBjb3VudCB0b3dhcmRzIHRoZSBzaXplLlxuICpcbiAqIEByZXR1cm5zIE51bWJlclxuICovXG5BcnJheVNldC5wcm90b3R5cGUuc2l6ZSA9IGZ1bmN0aW9uIEFycmF5U2V0X3NpemUoKSB7XG4gIHJldHVybiBoYXNOYXRpdmVNYXAgPyB0aGlzLl9zZXQuc2l6ZSA6IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHRoaXMuX3NldCkubGVuZ3RoO1xufTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHN0cmluZyB0byB0aGlzIHNldC5cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIEFycmF5U2V0X2FkZChhU3RyLCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzU3RyID0gaGFzTmF0aXZlTWFwID8gYVN0ciA6IHV0aWwudG9TZXRTdHJpbmcoYVN0cik7XG4gIHZhciBpc0R1cGxpY2F0ZSA9IGhhc05hdGl2ZU1hcCA/IHRoaXMuaGFzKGFTdHIpIDogaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKTtcbiAgdmFyIGlkeCA9IHRoaXMuX2FycmF5Lmxlbmd0aDtcbiAgaWYgKCFpc0R1cGxpY2F0ZSB8fCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhU3RyKTtcbiAgfVxuICBpZiAoIWlzRHVwbGljYXRlKSB7XG4gICAgaWYgKGhhc05hdGl2ZU1hcCkge1xuICAgICAgdGhpcy5fc2V0LnNldChhU3RyLCBpZHgpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLl9zZXRbc1N0cl0gPSBpZHg7XG4gICAgfVxuICB9XG59O1xuXG4vKipcbiAqIElzIHRoZSBnaXZlbiBzdHJpbmcgYSBtZW1iZXIgb2YgdGhpcyBzZXQ/XG4gKlxuICogQHBhcmFtIFN0cmluZyBhU3RyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiBBcnJheVNldF9oYXMoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NldC5oYXMoYVN0cik7XG4gIH0gZWxzZSB7XG4gICAgdmFyIHNTdHIgPSB1dGlsLnRvU2V0U3RyaW5nKGFTdHIpO1xuICAgIHJldHVybiBoYXMuY2FsbCh0aGlzLl9zZXQsIHNTdHIpO1xuICB9XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGluZGV4IG9mIHRoZSBnaXZlbiBzdHJpbmcgaW4gdGhlIGFycmF5P1xuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5BcnJheVNldC5wcm90b3R5cGUuaW5kZXhPZiA9IGZ1bmN0aW9uIEFycmF5U2V0X2luZGV4T2YoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgdmFyIGlkeCA9IHRoaXMuX3NldC5nZXQoYVN0cik7XG4gICAgaWYgKGlkeCA+PSAwKSB7XG4gICAgICAgIHJldHVybiBpZHg7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHZhciBzU3RyID0gdXRpbC50b1NldFN0cmluZyhhU3RyKTtcbiAgICBpZiAoaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKSkge1xuICAgICAgcmV0dXJuIHRoaXMuX3NldFtzU3RyXTtcbiAgICB9XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFTdHIgKyAnXCIgaXMgbm90IGluIHRoZSBzZXQuJyk7XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGVsZW1lbnQgYXQgdGhlIGdpdmVuIGluZGV4P1xuICpcbiAqIEBwYXJhbSBOdW1iZXIgYUlkeFxuICovXG5BcnJheVNldC5wcm90b3R5cGUuYXQgPSBmdW5jdGlvbiBBcnJheVNldF9hdChhSWR4KSB7XG4gIGlmIChhSWR4ID49IDAgJiYgYUlkeCA8IHRoaXMuX2FycmF5Lmxlbmd0aCkge1xuICAgIHJldHVybiB0aGlzLl9hcnJheVthSWR4XTtcbiAgfVxuICB0aHJvdyBuZXcgRXJyb3IoJ05vIGVsZW1lbnQgaW5kZXhlZCBieSAnICsgYUlkeCk7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIGFycmF5IHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgc2V0ICh3aGljaCBoYXMgdGhlIHByb3BlciBpbmRpY2VzXG4gKiBpbmRpY2F0ZWQgYnkgaW5kZXhPZikuIE5vdGUgdGhhdCB0aGlzIGlzIGEgY29weSBvZiB0aGUgaW50ZXJuYWwgYXJyYXkgdXNlZFxuICogZm9yIHN0b3JpbmcgdGhlIG1lbWJlcnMgc28gdGhhdCBubyBvbmUgY2FuIG1lc3Mgd2l0aCBpbnRlcm5hbCBzdGF0ZS5cbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBBcnJheVNldF90b0FycmF5KCkge1xuICByZXR1cm4gdGhpcy5fYXJyYXkuc2xpY2UoKTtcbn07XG5cbmV4cG9ydHMuQXJyYXlTZXQgPSBBcnJheVNldDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL2FycmF5LXNldC5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTQgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciB1dGlsID0gcmVxdWlyZSgnLi91dGlsJyk7XG5cbi8qKlxuICogRGV0ZXJtaW5lIHdoZXRoZXIgbWFwcGluZ0IgaXMgYWZ0ZXIgbWFwcGluZ0Egd2l0aCByZXNwZWN0IHRvIGdlbmVyYXRlZFxuICogcG9zaXRpb24uXG4gKi9cbmZ1bmN0aW9uIGdlbmVyYXRlZFBvc2l0aW9uQWZ0ZXIobWFwcGluZ0EsIG1hcHBpbmdCKSB7XG4gIC8vIE9wdGltaXplZCBmb3IgbW9zdCBjb21tb24gY2FzZVxuICB2YXIgbGluZUEgPSBtYXBwaW5nQS5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgbGluZUIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgY29sdW1uQSA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbjtcbiAgdmFyIGNvbHVtbkIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIHJldHVybiBsaW5lQiA+IGxpbmVBIHx8IGxpbmVCID09IGxpbmVBICYmIGNvbHVtbkIgPj0gY29sdW1uQSB8fFxuICAgICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nQSwgbWFwcGluZ0IpIDw9IDA7XG59XG5cbi8qKlxuICogQSBkYXRhIHN0cnVjdHVyZSB0byBwcm92aWRlIGEgc29ydGVkIHZpZXcgb2YgYWNjdW11bGF0ZWQgbWFwcGluZ3MgaW4gYVxuICogcGVyZm9ybWFuY2UgY29uc2Npb3VzIG1hbm5lci4gSXQgdHJhZGVzIGEgbmVnbGliYWJsZSBvdmVyaGVhZCBpbiBnZW5lcmFsXG4gKiBjYXNlIGZvciBhIGxhcmdlIHNwZWVkdXAgaW4gY2FzZSBvZiBtYXBwaW5ncyBiZWluZyBhZGRlZCBpbiBvcmRlci5cbiAqL1xuZnVuY3Rpb24gTWFwcGluZ0xpc3QoKSB7XG4gIHRoaXMuX2FycmF5ID0gW107XG4gIHRoaXMuX3NvcnRlZCA9IHRydWU7XG4gIC8vIFNlcnZlcyBhcyBpbmZpbXVtXG4gIHRoaXMuX2xhc3QgPSB7Z2VuZXJhdGVkTGluZTogLTEsIGdlbmVyYXRlZENvbHVtbjogMH07XG59XG5cbi8qKlxuICogSXRlcmF0ZSB0aHJvdWdoIGludGVybmFsIGl0ZW1zLiBUaGlzIG1ldGhvZCB0YWtlcyB0aGUgc2FtZSBhcmd1bWVudHMgdGhhdFxuICogYEFycmF5LnByb3RvdHlwZS5mb3JFYWNoYCB0YWtlcy5cbiAqXG4gKiBOT1RFOiBUaGUgb3JkZXIgb2YgdGhlIG1hcHBpbmdzIGlzIE5PVCBndWFyYW50ZWVkLlxuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUudW5zb3J0ZWRGb3JFYWNoID1cbiAgZnVuY3Rpb24gTWFwcGluZ0xpc3RfZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKSB7XG4gICAgdGhpcy5fYXJyYXkuZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKTtcbiAgfTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHNvdXJjZSBtYXBwaW5nLlxuICpcbiAqIEBwYXJhbSBPYmplY3QgYU1hcHBpbmdcbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIE1hcHBpbmdMaXN0X2FkZChhTWFwcGluZykge1xuICBpZiAoZ2VuZXJhdGVkUG9zaXRpb25BZnRlcih0aGlzLl9sYXN0LCBhTWFwcGluZykpIHtcbiAgICB0aGlzLl9sYXN0ID0gYU1hcHBpbmc7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH0gZWxzZSB7XG4gICAgdGhpcy5fc29ydGVkID0gZmFsc2U7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH1cbn07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgZmxhdCwgc29ydGVkIGFycmF5IG9mIG1hcHBpbmdzLiBUaGUgbWFwcGluZ3MgYXJlIHNvcnRlZCBieVxuICogZ2VuZXJhdGVkIHBvc2l0aW9uLlxuICpcbiAqIFdBUk5JTkc6IFRoaXMgbWV0aG9kIHJldHVybnMgaW50ZXJuYWwgZGF0YSB3aXRob3V0IGNvcHlpbmcsIGZvclxuICogcGVyZm9ybWFuY2UuIFRoZSByZXR1cm4gdmFsdWUgbXVzdCBOT1QgYmUgbXV0YXRlZCwgYW5kIHNob3VsZCBiZSB0cmVhdGVkIGFzXG4gKiBhbiBpbW11dGFibGUgYm9ycm93LiBJZiB5b3Ugd2FudCB0byB0YWtlIG93bmVyc2hpcCwgeW91IG11c3QgbWFrZSB5b3VyIG93blxuICogY29weS5cbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBNYXBwaW5nTGlzdF90b0FycmF5KCkge1xuICBpZiAoIXRoaXMuX3NvcnRlZCkge1xuICAgIHRoaXMuX2FycmF5LnNvcnQodXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZCk7XG4gICAgdGhpcy5fc29ydGVkID0gdHJ1ZTtcbiAgfVxuICByZXR1cm4gdGhpcy5fYXJyYXk7XG59O1xuXG5leHBvcnRzLk1hcHBpbmdMaXN0ID0gTWFwcGluZ0xpc3Q7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2xpYi9tYXBwaW5nLWxpc3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGJpbmFyeVNlYXJjaCA9IHJlcXVpcmUoJy4vYmluYXJ5LXNlYXJjaCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBiYXNlNjRWTFEgPSByZXF1aXJlKCcuL2Jhc2U2NC12bHEnKTtcbnZhciBxdWlja1NvcnQgPSByZXF1aXJlKCcuL3F1aWNrLXNvcnQnKS5xdWlja1NvcnQ7XG5cbmZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyKGFTb3VyY2VNYXApIHtcbiAgdmFyIHNvdXJjZU1hcCA9IGFTb3VyY2VNYXA7XG4gIGlmICh0eXBlb2YgYVNvdXJjZU1hcCA9PT0gJ3N0cmluZycpIHtcbiAgICBzb3VyY2VNYXAgPSBKU09OLnBhcnNlKGFTb3VyY2VNYXAucmVwbGFjZSgvXlxcKVxcXVxcfScvLCAnJykpO1xuICB9XG5cbiAgcmV0dXJuIHNvdXJjZU1hcC5zZWN0aW9ucyAhPSBudWxsXG4gICAgPyBuZXcgSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcClcbiAgICA6IG5ldyBCYXNpY1NvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcCk7XG59XG5cblNvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAgPSBmdW5jdGlvbihhU291cmNlTWFwKSB7XG4gIHJldHVybiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcCk7XG59XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vLyBgX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kIGBfX29yaWdpbmFsTWFwcGluZ3NgIGFyZSBhcnJheXMgdGhhdCBob2xkIHRoZVxuLy8gcGFyc2VkIG1hcHBpbmcgY29vcmRpbmF0ZXMgZnJvbSB0aGUgc291cmNlIG1hcCdzIFwibWFwcGluZ3NcIiBhdHRyaWJ1dGUuIFRoZXlcbi8vIGFyZSBsYXppbHkgaW5zdGFudGlhdGVkLCBhY2Nlc3NlZCB2aWEgdGhlIGBfZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuLy8gYF9vcmlnaW5hbE1hcHBpbmdzYCBnZXR0ZXJzIHJlc3BlY3RpdmVseSwgYW5kIHdlIG9ubHkgcGFyc2UgdGhlIG1hcHBpbmdzXG4vLyBhbmQgY3JlYXRlIHRoZXNlIGFycmF5cyBvbmNlIHF1ZXJpZWQgZm9yIGEgc291cmNlIGxvY2F0aW9uLiBXZSBqdW1wIHRocm91Z2hcbi8vIHRoZXNlIGhvb3BzIGJlY2F1c2UgdGhlcmUgY2FuIGJlIG1hbnkgdGhvdXNhbmRzIG9mIG1hcHBpbmdzLCBhbmQgcGFyc2luZ1xuLy8gdGhlbSBpcyBleHBlbnNpdmUsIHNvIHdlIG9ubHkgd2FudCB0byBkbyBpdCBpZiB3ZSBtdXN0LlxuLy9cbi8vIEVhY2ggb2JqZWN0IGluIHRoZSBhcnJheXMgaXMgb2YgdGhlIGZvcm06XG4vL1xuLy8gICAgIHtcbi8vICAgICAgIGdlbmVyYXRlZExpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBnZW5lcmF0ZWRDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgY29kZSxcbi8vICAgICAgIHNvdXJjZTogVGhlIHBhdGggdG8gdGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlIHRoYXQgZ2VuZXJhdGVkIHRoaXNcbi8vICAgICAgICAgICAgICAgY2h1bmsgb2YgY29kZSxcbi8vICAgICAgIG9yaWdpbmFsTGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICBjb3JyZXNwb25kcyB0byB0aGlzIGNodW5rIG9mIGdlbmVyYXRlZCBjb2RlLFxuLy8gICAgICAgb3JpZ2luYWxDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICAgIGNvcnJlc3BvbmRzIHRvIHRoaXMgY2h1bmsgb2YgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBuYW1lOiBUaGUgbmFtZSBvZiB0aGUgb3JpZ2luYWwgc3ltYm9sIHdoaWNoIGdlbmVyYXRlZCB0aGlzIGNodW5rIG9mXG4vLyAgICAgICAgICAgICBjb2RlLlxuLy8gICAgIH1cbi8vXG4vLyBBbGwgcHJvcGVydGllcyBleGNlcHQgZm9yIGBnZW5lcmF0ZWRMaW5lYCBhbmQgYGdlbmVyYXRlZENvbHVtbmAgY2FuIGJlXG4vLyBgbnVsbGAuXG4vL1xuLy8gYF9nZW5lcmF0ZWRNYXBwaW5nc2AgaXMgb3JkZXJlZCBieSB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucy5cbi8vXG4vLyBgX29yaWdpbmFsTWFwcGluZ3NgIGlzIG9yZGVyZWQgYnkgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucy5cblxuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19nZW5lcmF0ZWRNYXBwaW5ncycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgaWYgKCF0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MpIHtcbiAgICAgIHRoaXMuX3BhcnNlTWFwcGluZ3ModGhpcy5fbWFwcGluZ3MsIHRoaXMuc291cmNlUm9vdCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fX29yaWdpbmFsTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19vcmlnaW5hbE1hcHBpbmdzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoIXRoaXMuX19vcmlnaW5hbE1hcHBpbmdzKSB7XG4gICAgICB0aGlzLl9wYXJzZU1hcHBpbmdzKHRoaXMuX21hcHBpbmdzLCB0aGlzLnNvdXJjZVJvb3QpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fY2hhcklzTWFwcGluZ1NlcGFyYXRvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NoYXJJc01hcHBpbmdTZXBhcmF0b3IoYVN0ciwgaW5kZXgpIHtcbiAgICB2YXIgYyA9IGFTdHIuY2hhckF0KGluZGV4KTtcbiAgICByZXR1cm4gYyA9PT0gXCI7XCIgfHwgYyA9PT0gXCIsXCI7XG4gIH07XG5cbi8qKlxuICogUGFyc2UgdGhlIG1hcHBpbmdzIGluIGEgc3RyaW5nIGluIHRvIGEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggd2UgY2FuIGVhc2lseVxuICogcXVlcnkgKHRoZSBvcmRlcmVkIGFycmF5cyBpbiB0aGUgYHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kXG4gKiBgdGhpcy5fX29yaWdpbmFsTWFwcGluZ3NgIHByb3BlcnRpZXMpLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiU3ViY2xhc3NlcyBtdXN0IGltcGxlbWVudCBfcGFyc2VNYXBwaW5nc1wiKTtcbiAgfTtcblxuU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSID0gMTtcblNvdXJjZU1hcENvbnN1bWVyLk9SSUdJTkFMX09SREVSID0gMjtcblxuU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIEl0ZXJhdGUgb3ZlciBlYWNoIG1hcHBpbmcgYmV0d2VlbiBhbiBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4gYW5kIGFcbiAqIGdlbmVyYXRlZCBsaW5lL2NvbHVtbiBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKlxuICogQHBhcmFtIEZ1bmN0aW9uIGFDYWxsYmFja1xuICogICAgICAgIFRoZSBmdW5jdGlvbiB0aGF0IGlzIGNhbGxlZCB3aXRoIGVhY2ggbWFwcGluZy5cbiAqIEBwYXJhbSBPYmplY3QgYUNvbnRleHRcbiAqICAgICAgICBPcHRpb25hbC4gSWYgc3BlY2lmaWVkLCB0aGlzIG9iamVjdCB3aWxsIGJlIHRoZSB2YWx1ZSBvZiBgdGhpc2AgZXZlcnlcbiAqICAgICAgICB0aW1lIHRoYXQgYGFDYWxsYmFja2AgaXMgY2FsbGVkLlxuICogQHBhcmFtIGFPcmRlclxuICogICAgICAgIEVpdGhlciBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYCBvclxuICogICAgICAgIGBTb3VyY2VNYXBDb25zdW1lci5PUklHSU5BTF9PUkRFUmAuIFNwZWNpZmllcyB3aGV0aGVyIHlvdSB3YW50IHRvXG4gKiAgICAgICAgaXRlcmF0ZSBvdmVyIHRoZSBtYXBwaW5ncyBzb3J0ZWQgYnkgdGhlIGdlbmVyYXRlZCBmaWxlJ3MgbGluZS9jb2x1bW5cbiAqICAgICAgICBvcmRlciBvciB0aGUgb3JpZ2luYWwncyBzb3VyY2UvbGluZS9jb2x1bW4gb3JkZXIsIHJlc3BlY3RpdmVseS4gRGVmYXVsdHMgdG9cbiAqICAgICAgICBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYC5cbiAqL1xuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmVhY2hNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZWFjaE1hcHBpbmcoYUNhbGxiYWNrLCBhQ29udGV4dCwgYU9yZGVyKSB7XG4gICAgdmFyIGNvbnRleHQgPSBhQ29udGV4dCB8fCBudWxsO1xuICAgIHZhciBvcmRlciA9IGFPcmRlciB8fCBTb3VyY2VNYXBDb25zdW1lci5HRU5FUkFURURfT1JERVI7XG5cbiAgICB2YXIgbWFwcGluZ3M7XG4gICAgc3dpdGNoIChvcmRlcikge1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSOlxuICAgICAgbWFwcGluZ3MgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuT1JJR0lOQUxfT1JERVI6XG4gICAgICBtYXBwaW5ncyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3M7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBvcmRlciBvZiBpdGVyYXRpb24uXCIpO1xuICAgIH1cblxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5zb3VyY2VSb290O1xuICAgIG1hcHBpbmdzLm1hcChmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlID09PSBudWxsID8gbnVsbCA6IHRoaXMuX3NvdXJjZXMuYXQobWFwcGluZy5zb3VyY2UpO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmIHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4oc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBnZW5lcmF0ZWRMaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgIGdlbmVyYXRlZENvbHVtbjogbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4sXG4gICAgICAgIG9yaWdpbmFsTGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgIG9yaWdpbmFsQ29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICBuYW1lOiBtYXBwaW5nLm5hbWUgPT09IG51bGwgPyBudWxsIDogdGhpcy5fbmFtZXMuYXQobWFwcGluZy5uYW1lKVxuICAgICAgfTtcbiAgICB9LCB0aGlzKS5mb3JFYWNoKGFDYWxsYmFjaywgY29udGV4dCk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyBhbGwgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIG9yaWdpbmFsIHNvdXJjZSxcbiAqIGxpbmUsIGFuZCBjb2x1bW4gcHJvdmlkZWQuIElmIG5vIGNvbHVtbiBpcyBwcm92aWRlZCwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gYSBlaXRoZXIgdGhlIGxpbmUgd2UgYXJlIHNlYXJjaGluZyBmb3Igb3IgdGhlIG5leHRcbiAqIGNsb3Nlc3QgbGluZSB0aGF0IGhhcyBhbnkgbWFwcGluZ3MuIE90aGVyd2lzZSwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gdGhlIGdpdmVuIGxpbmUgYW5kIGVpdGhlciB0aGUgY29sdW1uIHdlIGFyZSBzZWFyY2hpbmcgZm9yXG4gKiBvciB0aGUgbmV4dCBjbG9zZXN0IGNvbHVtbiB0aGF0IGhhcyBhbnkgb2Zmc2V0cy5cbiAqXG4gKiBUaGUgb25seSBhcmd1bWVudCBpcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBPcHRpb25hbC4gdGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZS5cbiAqXG4gKiBhbmQgYW4gYXJyYXkgb2Ygb2JqZWN0cyBpcyByZXR1cm5lZCwgZWFjaCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UsIG9yIG51bGwuXG4gKi9cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IoYUFyZ3MpIHtcbiAgICB2YXIgbGluZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpO1xuXG4gICAgLy8gV2hlbiB0aGVyZSBpcyBubyBleGFjdCBtYXRjaCwgQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX2ZpbmRNYXBwaW5nXG4gICAgLy8gcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGNsb3Nlc3QgbWFwcGluZyBsZXNzIHRoYW4gdGhlIG5lZWRsZS4gQnlcbiAgICAvLyBzZXR0aW5nIG5lZWRsZS5vcmlnaW5hbENvbHVtbiB0byAwLCB3ZSB0aHVzIGZpbmQgdGhlIGxhc3QgbWFwcGluZyBmb3JcbiAgICAvLyB0aGUgZ2l2ZW4gbGluZSwgcHJvdmlkZWQgc3VjaCBhIG1hcHBpbmcgZXhpc3RzLlxuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBzb3VyY2U6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyksXG4gICAgICBvcmlnaW5hbExpbmU6IGxpbmUsXG4gICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nLCAwKVxuICAgIH07XG5cbiAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIG5lZWRsZS5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgbmVlZGxlLnNvdXJjZSk7XG4gICAgfVxuICAgIGlmICghdGhpcy5fc291cmNlcy5oYXMobmVlZGxlLnNvdXJjZSkpIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihuZWVkbGUuc291cmNlKTtcblxuICAgIHZhciBtYXBwaW5ncyA9IFtdO1xuXG4gICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29yaWdpbmFsTWFwcGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQpO1xuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAoYUFyZ3MuY29sdW1uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2UgZm91bmQuIFNpbmNlXG4gICAgICAgIC8vIG1hcHBpbmdzIGFyZSBzb3J0ZWQsIHRoaXMgaXMgZ3VhcmFudGVlZCB0byBmaW5kIGFsbCBtYXBwaW5ncyBmb3JcbiAgICAgICAgLy8gdGhlIGxpbmUgd2UgZm91bmQuXG4gICAgICAgIHdoaWxlIChtYXBwaW5nICYmIG1hcHBpbmcub3JpZ2luYWxMaW5lID09PSBvcmlnaW5hbExpbmUpIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgb3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2Ugd2VyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICAvLyBTaW5jZSBtYXBwaW5ncyBhcmUgc29ydGVkLCB0aGlzIGlzIGd1YXJhbnRlZWQgdG8gZmluZCBhbGwgbWFwcGluZ3MgZm9yXG4gICAgICAgIC8vIHRoZSBsaW5lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICB3aGlsZSAobWFwcGluZyAmJlxuICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09IGxpbmUgJiZcbiAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPT0gb3JpZ2luYWxDb2x1bW4pIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcHBpbmdzO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcENvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluc3RhbmNlIHJlcHJlc2VudHMgYSBwYXJzZWQgc291cmNlIG1hcCB3aGljaCB3ZSBjYW5cbiAqIHF1ZXJ5IGZvciBpbmZvcm1hdGlvbiBhYm91dCB0aGUgb3JpZ2luYWwgZmlsZSBwb3NpdGlvbnMgYnkgZ2l2aW5nIGl0IGEgZmlsZVxuICogcG9zaXRpb24gaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKlxuICogVGhlIG9ubHkgcGFyYW1ldGVyIGlzIHRoZSByYXcgc291cmNlIG1hcCAoZWl0aGVyIGFzIGEgSlNPTiBzdHJpbmcsIG9yXG4gKiBhbHJlYWR5IHBhcnNlZCB0byBhbiBvYmplY3QpLiBBY2NvcmRpbmcgdG8gdGhlIHNwZWMsIHNvdXJjZSBtYXBzIGhhdmUgdGhlXG4gKiBmb2xsb3dpbmcgYXR0cmlidXRlczpcbiAqXG4gKiAgIC0gdmVyc2lvbjogV2hpY2ggdmVyc2lvbiBvZiB0aGUgc291cmNlIG1hcCBzcGVjIHRoaXMgbWFwIGlzIGZvbGxvd2luZy5cbiAqICAgLSBzb3VyY2VzOiBBbiBhcnJheSBvZiBVUkxzIHRvIHRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZXMuXG4gKiAgIC0gbmFtZXM6IEFuIGFycmF5IG9mIGlkZW50aWZpZXJzIHdoaWNoIGNhbiBiZSByZWZlcnJlbmNlZCBieSBpbmRpdmlkdWFsIG1hcHBpbmdzLlxuICogICAtIHNvdXJjZVJvb3Q6IE9wdGlvbmFsLiBUaGUgVVJMIHJvb3QgZnJvbSB3aGljaCBhbGwgc291cmNlcyBhcmUgcmVsYXRpdmUuXG4gKiAgIC0gc291cmNlc0NvbnRlbnQ6IE9wdGlvbmFsLiBBbiBhcnJheSBvZiBjb250ZW50cyBvZiB0aGUgb3JpZ2luYWwgc291cmNlIGZpbGVzLlxuICogICAtIG1hcHBpbmdzOiBBIHN0cmluZyBvZiBiYXNlNjQgVkxRcyB3aGljaCBjb250YWluIHRoZSBhY3R1YWwgbWFwcGluZ3MuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICpcbiAqIEhlcmUgaXMgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF06XG4gKlxuICogICAgIHtcbiAqICAgICAgIHZlcnNpb24gOiAzLFxuICogICAgICAgZmlsZTogXCJvdXQuanNcIixcbiAqICAgICAgIHNvdXJjZVJvb3QgOiBcIlwiLFxuICogICAgICAgc291cmNlczogW1wiZm9vLmpzXCIsIFwiYmFyLmpzXCJdLFxuICogICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICBtYXBwaW5nczogXCJBQSxBQjs7QUJDREU7XCJcbiAqICAgICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQ/cGxpPTEjXG4gKi9cbmZ1bmN0aW9uIEJhc2ljU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNvdXJjZXMgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzJyk7XG4gIC8vIFNhc3MgMy4zIGxlYXZlcyBvdXQgdGhlICduYW1lcycgYXJyYXksIHNvIHdlIGRldmlhdGUgZnJvbSB0aGUgc3BlYyAod2hpY2hcbiAgLy8gcmVxdWlyZXMgdGhlIGFycmF5KSB0byBwbGF5IG5pY2UgaGVyZS5cbiAgdmFyIG5hbWVzID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnbmFtZXMnLCBbXSk7XG4gIHZhciBzb3VyY2VSb290ID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB2YXIgc291cmNlc0NvbnRlbnQgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzQ29udGVudCcsIG51bGwpO1xuICB2YXIgbWFwcGluZ3MgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdtYXBwaW5ncycpO1xuICB2YXIgZmlsZSA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ2ZpbGUnLCBudWxsKTtcblxuICAvLyBPbmNlIGFnYWluLCBTYXNzIGRldmlhdGVzIGZyb20gdGhlIHNwZWMgYW5kIHN1cHBsaWVzIHRoZSB2ZXJzaW9uIGFzIGFcbiAgLy8gc3RyaW5nIHJhdGhlciB0aGFuIGEgbnVtYmVyLCBzbyB3ZSB1c2UgbG9vc2UgZXF1YWxpdHkgY2hlY2tpbmcgaGVyZS5cbiAgaWYgKHZlcnNpb24gIT0gdGhpcy5fdmVyc2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgdmVyc2lvbjogJyArIHZlcnNpb24pO1xuICB9XG5cbiAgc291cmNlcyA9IHNvdXJjZXNcbiAgICAubWFwKFN0cmluZylcbiAgICAvLyBTb21lIHNvdXJjZSBtYXBzIHByb2R1Y2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIGxpa2UgXCIuL2Zvby5qc1wiIGluc3RlYWQgb2ZcbiAgICAvLyBcImZvby5qc1wiLiAgTm9ybWFsaXplIHRoZXNlIGZpcnN0IHNvIHRoYXQgZnV0dXJlIGNvbXBhcmlzb25zIHdpbGwgc3VjY2VlZC5cbiAgICAvLyBTZWUgYnVnemlsLmxhLzEwOTA3NjguXG4gICAgLm1hcCh1dGlsLm5vcm1hbGl6ZSlcbiAgICAvLyBBbHdheXMgZW5zdXJlIHRoYXQgYWJzb2x1dGUgc291cmNlcyBhcmUgaW50ZXJuYWxseSBzdG9yZWQgcmVsYXRpdmUgdG9cbiAgICAvLyB0aGUgc291cmNlIHJvb3QsIGlmIHRoZSBzb3VyY2Ugcm9vdCBpcyBhYnNvbHV0ZS4gTm90IGRvaW5nIHRoaXMgd291bGRcbiAgICAvLyBiZSBwYXJ0aWN1bGFybHkgcHJvYmxlbWF0aWMgd2hlbiB0aGUgc291cmNlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlXG4gICAgLy8gc291cmNlICh2YWxpZCwgYnV0IHdoeT8/KS4gU2VlIGdpdGh1YiBpc3N1ZSAjMTk5IGFuZCBidWd6aWwubGEvMTE4ODk4Mi5cbiAgICAubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIHJldHVybiBzb3VyY2VSb290ICYmIHV0aWwuaXNBYnNvbHV0ZShzb3VyY2VSb290KSAmJiB1dGlsLmlzQWJzb2x1dGUoc291cmNlKVxuICAgICAgICA/IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlKVxuICAgICAgICA6IHNvdXJjZTtcbiAgICB9KTtcblxuICAvLyBQYXNzIGB0cnVlYCBiZWxvdyB0byBhbGxvdyBkdXBsaWNhdGUgbmFtZXMgYW5kIHNvdXJjZXMuIFdoaWxlIHNvdXJjZSBtYXBzXG4gIC8vIGFyZSBpbnRlbmRlZCB0byBiZSBjb21wcmVzc2VkIGFuZCBkZWR1cGxpY2F0ZWQsIHRoZSBUeXBlU2NyaXB0IGNvbXBpbGVyXG4gIC8vIHNvbWV0aW1lcyBnZW5lcmF0ZXMgc291cmNlIG1hcHMgd2l0aCBkdXBsaWNhdGVzIGluIHRoZW0uIFNlZSBHaXRodWIgaXNzdWVcbiAgLy8gIzcyIGFuZCBidWd6aWwubGEvODg5NDkyLlxuICB0aGlzLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShuYW1lcy5tYXAoU3RyaW5nKSwgdHJ1ZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBBcnJheVNldC5mcm9tQXJyYXkoc291cmNlcywgdHJ1ZSk7XG5cbiAgdGhpcy5zb3VyY2VSb290ID0gc291cmNlUm9vdDtcbiAgdGhpcy5zb3VyY2VzQ29udGVudCA9IHNvdXJjZXNDb250ZW50O1xuICB0aGlzLl9tYXBwaW5ncyA9IG1hcHBpbmdzO1xuICB0aGlzLmZpbGUgPSBmaWxlO1xufVxuXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlKTtcbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQ3JlYXRlIGEgQmFzaWNTb3VyY2VNYXBDb25zdW1lciBmcm9tIGEgU291cmNlTWFwR2VuZXJhdG9yLlxuICpcbiAqIEBwYXJhbSBTb3VyY2VNYXBHZW5lcmF0b3IgYVNvdXJjZU1hcFxuICogICAgICAgIFRoZSBzb3VyY2UgbWFwIHRoYXQgd2lsbCBiZSBjb25zdW1lZC5cbiAqIEByZXR1cm5zIEJhc2ljU291cmNlTWFwQ29uc3VtZXJcbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwKSB7XG4gICAgdmFyIHNtYyA9IE9iamVjdC5jcmVhdGUoQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuXG4gICAgdmFyIG5hbWVzID0gc21jLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShhU291cmNlTWFwLl9uYW1lcy50b0FycmF5KCksIHRydWUpO1xuICAgIHZhciBzb3VyY2VzID0gc21jLl9zb3VyY2VzID0gQXJyYXlTZXQuZnJvbUFycmF5KGFTb3VyY2VNYXAuX3NvdXJjZXMudG9BcnJheSgpLCB0cnVlKTtcbiAgICBzbWMuc291cmNlUm9vdCA9IGFTb3VyY2VNYXAuX3NvdXJjZVJvb3Q7XG4gICAgc21jLnNvdXJjZXNDb250ZW50ID0gYVNvdXJjZU1hcC5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudChzbWMuX3NvdXJjZXMudG9BcnJheSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc21jLnNvdXJjZVJvb3QpO1xuICAgIHNtYy5maWxlID0gYVNvdXJjZU1hcC5fZmlsZTtcblxuICAgIC8vIEJlY2F1c2Ugd2UgYXJlIG1vZGlmeWluZyB0aGUgZW50cmllcyAoYnkgY29udmVydGluZyBzdHJpbmcgc291cmNlcyBhbmRcbiAgICAvLyBuYW1lcyB0byBpbmRpY2VzIGludG8gdGhlIHNvdXJjZXMgYW5kIG5hbWVzIEFycmF5U2V0cyksIHdlIGhhdmUgdG8gbWFrZVxuICAgIC8vIGEgY29weSBvZiB0aGUgZW50cnkgb3IgZWxzZSBiYWQgdGhpbmdzIGhhcHBlbi4gU2hhcmVkIG11dGFibGUgc3RhdGVcbiAgICAvLyBzdHJpa2VzIGFnYWluISBTZWUgZ2l0aHViIGlzc3VlICMxOTEuXG5cbiAgICB2YXIgZ2VuZXJhdGVkTWFwcGluZ3MgPSBhU291cmNlTWFwLl9tYXBwaW5ncy50b0FycmF5KCkuc2xpY2UoKTtcbiAgICB2YXIgZGVzdEdlbmVyYXRlZE1hcHBpbmdzID0gc21jLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBbXTtcbiAgICB2YXIgZGVzdE9yaWdpbmFsTWFwcGluZ3MgPSBzbWMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuZ3RoID0gZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBzcmNNYXBwaW5nID0gZ2VuZXJhdGVkTWFwcGluZ3NbaV07XG4gICAgICB2YXIgZGVzdE1hcHBpbmcgPSBuZXcgTWFwcGluZztcbiAgICAgIGRlc3RNYXBwaW5nLmdlbmVyYXRlZExpbmUgPSBzcmNNYXBwaW5nLmdlbmVyYXRlZExpbmU7XG4gICAgICBkZXN0TWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gPSBzcmNNYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKHNyY01hcHBpbmcuc291cmNlKSB7XG4gICAgICAgIGRlc3RNYXBwaW5nLnNvdXJjZSA9IHNvdXJjZXMuaW5kZXhPZihzcmNNYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgIGRlc3RNYXBwaW5nLm9yaWdpbmFsTGluZSA9IHNyY01hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICBkZXN0TWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IHNyY01hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgaWYgKHNyY01hcHBpbmcubmFtZSkge1xuICAgICAgICAgIGRlc3RNYXBwaW5nLm5hbWUgPSBuYW1lcy5pbmRleE9mKHNyY01hcHBpbmcubmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkZXN0T3JpZ2luYWxNYXBwaW5ncy5wdXNoKGRlc3RNYXBwaW5nKTtcbiAgICAgIH1cblxuICAgICAgZGVzdEdlbmVyYXRlZE1hcHBpbmdzLnB1c2goZGVzdE1hcHBpbmcpO1xuICAgIH1cblxuICAgIHF1aWNrU29ydChzbWMuX19vcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcblxuICAgIHJldHVybiBzbWM7XG4gIH07XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLCAnc291cmNlcycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NvdXJjZXMudG9BcnJheSgpLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlUm9vdCAhPSBudWxsID8gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgcykgOiBzO1xuICAgIH0sIHRoaXMpO1xuICB9XG59KTtcblxuLyoqXG4gKiBQcm92aWRlIHRoZSBKSVQgd2l0aCBhIG5pY2Ugc2hhcGUgLyBoaWRkZW4gY2xhc3MuXG4gKi9cbmZ1bmN0aW9uIE1hcHBpbmcoKSB7XG4gIHRoaXMuZ2VuZXJhdGVkTGluZSA9IDA7XG4gIHRoaXMuZ2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgdGhpcy5zb3VyY2UgPSBudWxsO1xuICB0aGlzLm9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHRoaXMub3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB0aGlzLm5hbWUgPSBudWxsO1xufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBtYXBwaW5ncyBpbiBhIHN0cmluZyBpbiB0byBhIGRhdGEgc3RydWN0dXJlIHdoaWNoIHdlIGNhbiBlYXNpbHlcbiAqIHF1ZXJ5ICh0aGUgb3JkZXJlZCBhcnJheXMgaW4gdGhlIGB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuICogYHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzYCBwcm9wZXJ0aWVzKS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdmFyIGdlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzU291cmNlID0gMDtcbiAgICB2YXIgcHJldmlvdXNOYW1lID0gMDtcbiAgICB2YXIgbGVuZ3RoID0gYVN0ci5sZW5ndGg7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICB2YXIgY2FjaGVkU2VnbWVudHMgPSB7fTtcbiAgICB2YXIgdGVtcCA9IHt9O1xuICAgIHZhciBvcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgdmFyIGdlbmVyYXRlZE1hcHBpbmdzID0gW107XG4gICAgdmFyIG1hcHBpbmcsIHN0ciwgc2VnbWVudCwgZW5kLCB2YWx1ZTtcblxuICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgaWYgKGFTdHIuY2hhckF0KGluZGV4KSA9PT0gJzsnKSB7XG4gICAgICAgIGdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgaW5kZXgrKztcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgfVxuICAgICAgZWxzZSBpZiAoYVN0ci5jaGFyQXQoaW5kZXgpID09PSAnLCcpIHtcbiAgICAgICAgaW5kZXgrKztcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBtYXBwaW5nID0gbmV3IE1hcHBpbmcoKTtcbiAgICAgICAgbWFwcGluZy5nZW5lcmF0ZWRMaW5lID0gZ2VuZXJhdGVkTGluZTtcblxuICAgICAgICAvLyBCZWNhdXNlIGVhY2ggb2Zmc2V0IGlzIGVuY29kZWQgcmVsYXRpdmUgdG8gdGhlIHByZXZpb3VzIG9uZSxcbiAgICAgICAgLy8gbWFueSBzZWdtZW50cyBvZnRlbiBoYXZlIHRoZSBzYW1lIGVuY29kaW5nLiBXZSBjYW4gZXhwbG9pdCB0aGlzXG4gICAgICAgIC8vIGZhY3QgYnkgY2FjaGluZyB0aGUgcGFyc2VkIHZhcmlhYmxlIGxlbmd0aCBmaWVsZHMgb2YgZWFjaCBzZWdtZW50LFxuICAgICAgICAvLyBhbGxvd2luZyB1cyB0byBhdm9pZCBhIHNlY29uZCBwYXJzZSBpZiB3ZSBlbmNvdW50ZXIgdGhlIHNhbWVcbiAgICAgICAgLy8gc2VnbWVudCBhZ2Fpbi5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tTb3J0KGdlbmVyYXRlZE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKTtcbiAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgIHF1aWNrU29ydChvcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcbiAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IG9yaWdpbmFsTWFwcGluZ3M7XG4gIH07XG5cbi8qKlxuICogRmluZCB0aGUgbWFwcGluZyB0aGF0IGJlc3QgbWF0Y2hlcyB0aGUgaHlwb3RoZXRpY2FsIFwibmVlZGxlXCIgbWFwcGluZyB0aGF0XG4gKiB3ZSBhcmUgc2VhcmNoaW5nIGZvciBpbiB0aGUgZ2l2ZW4gXCJoYXlzdGFja1wiIG9mIG1hcHBpbmdzLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fZmluZE1hcHBpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9maW5kTWFwcGluZyhhTmVlZGxlLCBhTWFwcGluZ3MsIGFMaW5lTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUNvbHVtbk5hbWUsIGFDb21wYXJhdG9yLCBhQmlhcykge1xuICAgIC8vIFRvIHJldHVybiB0aGUgcG9zaXRpb24gd2UgYXJlIHNlYXJjaGluZyBmb3IsIHdlIG11c3QgZmlyc3QgZmluZCB0aGVcbiAgICAvLyBtYXBwaW5nIGZvciB0aGUgZ2l2ZW4gcG9zaXRpb24gYW5kIHRoZW4gcmV0dXJuIHRoZSBvcHBvc2l0ZSBwb3NpdGlvbiBpdFxuICAgIC8vIHBvaW50cyB0by4gQmVjYXVzZSB0aGUgbWFwcGluZ3MgYXJlIHNvcnRlZCwgd2UgY2FuIHVzZSBiaW5hcnkgc2VhcmNoIHRvXG4gICAgLy8gZmluZCB0aGUgYmVzdCBtYXBwaW5nLlxuXG4gICAgaWYgKGFOZWVkbGVbYUxpbmVOYW1lXSA8PSAwKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdMaW5lIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDEsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthTGluZU5hbWVdKTtcbiAgICB9XG4gICAgaWYgKGFOZWVkbGVbYUNvbHVtbk5hbWVdIDwgMCkge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ29sdW1uIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDAsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthQ29sdW1uTmFtZV0pO1xuICAgIH1cblxuICAgIHJldHVybiBiaW5hcnlTZWFyY2guc2VhcmNoKGFOZWVkbGUsIGFNYXBwaW5ncywgYUNvbXBhcmF0b3IsIGFCaWFzKTtcbiAgfTtcblxuLyoqXG4gKiBDb21wdXRlIHRoZSBsYXN0IGNvbHVtbiBmb3IgZWFjaCBnZW5lcmF0ZWQgbWFwcGluZy4gVGhlIGxhc3QgY29sdW1uIGlzXG4gKiBpbmNsdXNpdmUuXG4gKi9cbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbXB1dGVDb2x1bW5TcGFucyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NvbXB1dGVDb2x1bW5TcGFucygpIHtcbiAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyArK2luZGV4KSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgLy8gTWFwcGluZ3MgZG8gbm90IGNvbnRhaW4gYSBmaWVsZCBmb3IgdGhlIGxhc3QgZ2VuZXJhdGVkIGNvbHVtbnQuIFdlXG4gICAgICAvLyBjYW4gY29tZSB1cCB3aXRoIGFuIG9wdGltaXN0aWMgZXN0aW1hdGUsIGhvd2V2ZXIsIGJ5IGFzc3VtaW5nIHRoYXRcbiAgICAgIC8vIG1hcHBpbmdzIGFyZSBjb250aWd1b3VzIChpLmUuIGdpdmVuIHR3byBjb25zZWN1dGl2ZSBtYXBwaW5ncywgdGhlXG4gICAgICAvLyBmaXJzdCBtYXBwaW5nIGVuZHMgd2hlcmUgdGhlIHNlY29uZCBvbmUgc3RhcnRzKS5cbiAgICAgIGlmIChpbmRleCArIDEgPCB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG5leHRNYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXggKyAxXTtcblxuICAgICAgICBpZiAobWFwcGluZy5nZW5lcmF0ZWRMaW5lID09PSBuZXh0TWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gbmV4dE1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC0gMTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgbGFzdCBtYXBwaW5nIGZvciBlYWNoIGxpbmUgc3BhbnMgdGhlIGVudGlyZSBsaW5lLlxuICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gSW5maW5pdHk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSwgbGluZSwgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucyBwcm92aWRlZC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgYW4gb2JqZWN0XG4gKiB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gYmlhczogRWl0aGVyICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICogICAgIERlZmF1bHRzIHRvICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKlxuICogYW5kIGFuIG9iamVjdCBpcyByZXR1cm5lZCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUsIG9yIG51bGwuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UsIG9yIG51bGwuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIG5hbWU6IFRoZSBvcmlnaW5hbCBpZGVudGlmaWVyLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfb3JpZ2luYWxQb3NpdGlvbkZvcihhQXJncykge1xuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgIH07XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhcbiAgICAgIG5lZWRsZSxcbiAgICAgIHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzLFxuICAgICAgXCJnZW5lcmF0ZWRMaW5lXCIsXG4gICAgICBcImdlbmVyYXRlZENvbHVtblwiLFxuICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCxcbiAgICAgIHV0aWwuZ2V0QXJnKGFBcmdzLCAnYmlhcycsIFNvdXJjZU1hcENvbnN1bWVyLkdSRUFURVNUX0xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuaGFzQ29udGVudHNPZkFsbFNvdXJjZXMgPVxuICBmdW5jdGlvbiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyX2hhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCkge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICF0aGlzLnNvdXJjZXNDb250ZW50LnNvbWUoZnVuY3Rpb24gKHNjKSB7IHJldHVybiBzYyA9PSBudWxsOyB9KTtcbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UgY29udGVudC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgdGhlIHVybCBvZiB0aGVcbiAqIG9yaWdpbmFsIHNvdXJjZSBmaWxlLiBSZXR1cm5zIG51bGwgaWYgbm8gb3JpZ2luYWwgc291cmNlIGNvbnRlbnQgaXNcbiAqIGF2YWlsYWJsZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX3NvdXJjZUNvbnRlbnRGb3IoYVNvdXJjZSwgbnVsbE9uTWlzc2luZykge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBhU291cmNlID0gdXRpbC5yZWxhdGl2ZSh0aGlzLnNvdXJjZVJvb3QsIGFTb3VyY2UpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLl9zb3VyY2VzLmhhcyhhU291cmNlKSkge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlc0NvbnRlbnRbdGhpcy5fc291cmNlcy5pbmRleE9mKGFTb3VyY2UpXTtcbiAgICB9XG5cbiAgICB2YXIgdXJsO1xuICAgIGlmICh0aGlzLnNvdXJjZVJvb3QgIT0gbnVsbFxuICAgICAgICAmJiAodXJsID0gdXRpbC51cmxQYXJzZSh0aGlzLnNvdXJjZVJvb3QpKSkge1xuICAgICAgLy8gWFhYOiBmaWxlOi8vIFVSSXMgYW5kIGFic29sdXRlIHBhdGhzIGxlYWQgdG8gdW5leHBlY3RlZCBiZWhhdmlvciBmb3JcbiAgICAgIC8vIG1hbnkgdXNlcnMuIFdlIGNhbiBoZWxwIHRoZW0gb3V0IHdoZW4gdGhleSBleHBlY3QgZmlsZTovLyBVUklzIHRvXG4gICAgICAvLyBiZWhhdmUgbGlrZSBpdCB3b3VsZCBpZiB0aGV5IHdlcmUgcnVubmluZyBhIGxvY2FsIEhUVFAgc2VydmVyLiBTZWVcbiAgICAgIC8vIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTg4NTU5Ny5cbiAgICAgIHZhciBmaWxlVXJpQWJzUGF0aCA9IGFTb3VyY2UucmVwbGFjZSgvXmZpbGU6XFwvXFwvLywgXCJcIik7XG4gICAgICBpZiAodXJsLnNjaGVtZSA9PSBcImZpbGVcIlxuICAgICAgICAgICYmIHRoaXMuX3NvdXJjZXMuaGFzKGZpbGVVcmlBYnNQYXRoKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudFt0aGlzLl9zb3VyY2VzLmluZGV4T2YoZmlsZVVyaUFic1BhdGgpXVxuICAgICAgfVxuXG4gICAgICBpZiAoKCF1cmwucGF0aCB8fCB1cmwucGF0aCA9PSBcIi9cIilcbiAgICAgICAgICAmJiB0aGlzLl9zb3VyY2VzLmhhcyhcIi9cIiArIGFTb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNvdXJjZXNDb250ZW50W3RoaXMuX3NvdXJjZXMuaW5kZXhPZihcIi9cIiArIGFTb3VyY2UpXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgcmVjdXJzaXZlbHkgZnJvbVxuICAgIC8vIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvci4gSW4gdGhhdCBjYXNlLCB3ZVxuICAgIC8vIGRvbid0IHdhbnQgdG8gdGhyb3cgaWYgd2UgY2FuJ3QgZmluZCB0aGUgc291cmNlIC0gd2UganVzdCB3YW50IHRvXG4gICAgLy8gcmV0dXJuIG51bGwsIHNvIHdlIHByb3ZpZGUgYSBmbGFnIHRvIGV4aXQgZ3JhY2VmdWxseS5cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICogICAtIGJpYXM6IEVpdGhlciAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ1NvdXJjZU1hcENvbnN1bWVyLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5nZW5lcmF0ZWRQb3NpdGlvbkZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyk7XG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsaW5lOiBudWxsLFxuICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICAgIH07XG4gICAgfVxuICAgIHNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihzb3VyY2UpO1xuXG4gICAgdmFyIG5lZWRsZSA9IHtcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgb3JpZ2luYWxMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiB1dGlsLmdldEFyZyhhQXJncywgJ2NvbHVtbicpXG4gICAgfTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKFxuICAgICAgbmVlZGxlLFxuICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgdXRpbC5nZXRBcmcoYUFyZ3MsICdiaWFzJywgU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQpXG4gICAgKTtcblxuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IG5lZWRsZS5zb3VyY2UpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsaW5lOiB1dGlsLmdldEFyZyhtYXBwaW5nLCAnZ2VuZXJhdGVkTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ2dlbmVyYXRlZENvbHVtbicsIG51bGwpLFxuICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbGluZTogbnVsbCxcbiAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICB9O1xuICB9O1xuXG5leHBvcnRzLkJhc2ljU291cmNlTWFwQ29uc3VtZXIgPSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIEFuIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lciBpbnN0YW5jZSByZXByZXNlbnRzIGEgcGFyc2VkIHNvdXJjZSBtYXAgd2hpY2hcbiAqIHdlIGNhbiBxdWVyeSBmb3IgaW5mb3JtYXRpb24uIEl0IGRpZmZlcnMgZnJvbSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluXG4gKiB0aGF0IGl0IHRha2VzIFwiaW5kZXhlZFwiIHNvdXJjZSBtYXBzIChpLmUuIG9uZXMgd2l0aCBhIFwic2VjdGlvbnNcIiBmaWVsZCkgYXNcbiAqIGlucHV0LlxuICpcbiAqIFRoZSBvbmx5IHBhcmFtZXRlciBpcyBhIHJhdyBzb3VyY2UgbWFwIChlaXRoZXIgYXMgYSBKU09OIHN0cmluZywgb3IgYWxyZWFkeVxuICogcGFyc2VkIHRvIGFuIG9iamVjdCkuIEFjY29yZGluZyB0byB0aGUgc3BlYyBmb3IgaW5kZXhlZCBzb3VyY2UgbWFwcywgdGhleVxuICogaGF2ZSB0aGUgZm9sbG93aW5nIGF0dHJpYnV0ZXM6XG4gKlxuICogICAtIHZlcnNpb246IFdoaWNoIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXAgc3BlYyB0aGlzIG1hcCBpcyBmb2xsb3dpbmcuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICogICAtIHNlY3Rpb25zOiBBIGxpc3Qgb2Ygc2VjdGlvbiBkZWZpbml0aW9ucy5cbiAqXG4gKiBFYWNoIHZhbHVlIHVuZGVyIHRoZSBcInNlY3Rpb25zXCIgZmllbGQgaGFzIHR3byBmaWVsZHM6XG4gKiAgIC0gb2Zmc2V0OiBUaGUgb2Zmc2V0IGludG8gdGhlIG9yaWdpbmFsIHNwZWNpZmllZCBhdCB3aGljaCB0aGlzIHNlY3Rpb25cbiAqICAgICAgIGJlZ2lucyB0byBhcHBseSwgZGVmaW5lZCBhcyBhbiBvYmplY3Qgd2l0aCBhIFwibGluZVwiIGFuZCBcImNvbHVtblwiXG4gKiAgICAgICBmaWVsZC5cbiAqICAgLSBtYXA6IEEgc291cmNlIG1hcCBkZWZpbml0aW9uLiBUaGlzIHNvdXJjZSBtYXAgY291bGQgYWxzbyBiZSBpbmRleGVkLFxuICogICAgICAgYnV0IGRvZXNuJ3QgaGF2ZSB0byBiZS5cbiAqXG4gKiBJbnN0ZWFkIG9mIHRoZSBcIm1hcFwiIGZpZWxkLCBpdCdzIGFsc28gcG9zc2libGUgdG8gaGF2ZSBhIFwidXJsXCIgZmllbGRcbiAqIHNwZWNpZnlpbmcgYSBVUkwgdG8gcmV0cmlldmUgYSBzb3VyY2UgbWFwIGZyb20sIGJ1dCB0aGF0J3MgY3VycmVudGx5XG4gKiB1bnN1cHBvcnRlZC5cbiAqXG4gKiBIZXJlJ3MgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF0sIGJ1dFxuICogbW9kaWZpZWQgdG8gb21pdCBhIHNlY3Rpb24gd2hpY2ggdXNlcyB0aGUgXCJ1cmxcIiBmaWVsZC5cbiAqXG4gKiAge1xuICogICAgdmVyc2lvbiA6IDMsXG4gKiAgICBmaWxlOiBcImFwcC5qc1wiLFxuICogICAgc2VjdGlvbnM6IFt7XG4gKiAgICAgIG9mZnNldDoge2xpbmU6MTAwLCBjb2x1bW46MTB9LFxuICogICAgICBtYXA6IHtcbiAqICAgICAgICB2ZXJzaW9uIDogMyxcbiAqICAgICAgICBmaWxlOiBcInNlY3Rpb24uanNcIixcbiAqICAgICAgICBzb3VyY2VzOiBbXCJmb28uanNcIiwgXCJiYXIuanNcIl0sXG4gKiAgICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICAgbWFwcGluZ3M6IFwiQUFBQSxFOztBQkNERTtcIlxuICogICAgICB9XG4gKiAgICB9XSxcbiAqICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQjaGVhZGluZz1oLjUzNWVzM3hlcHJndFxuICovXG5mdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNlY3Rpb25zID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc2VjdGlvbnMnKTtcblxuICBpZiAodmVyc2lvbiAhPSB0aGlzLl92ZXJzaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCB2ZXJzaW9uOiAnICsgdmVyc2lvbik7XG4gIH1cblxuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgdmFyIGxhc3RPZmZzZXQgPSB7XG4gICAgbGluZTogLTEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHRoaXMuX3NlY3Rpb25zID0gc2VjdGlvbnMubWFwKGZ1bmN0aW9uIChzKSB7XG4gICAgaWYgKHMudXJsKSB7XG4gICAgICAvLyBUaGUgdXJsIGZpZWxkIHdpbGwgcmVxdWlyZSBzdXBwb3J0IGZvciBhc3luY2hyb25pY2l0eS5cbiAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8xNlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdTdXBwb3J0IGZvciB1cmwgZmllbGQgaW4gc2VjdGlvbnMgbm90IGltcGxlbWVudGVkLicpO1xuICAgIH1cbiAgICB2YXIgb2Zmc2V0ID0gdXRpbC5nZXRBcmcocywgJ29mZnNldCcpO1xuICAgIHZhciBvZmZzZXRMaW5lID0gdXRpbC5nZXRBcmcob2Zmc2V0LCAnbGluZScpO1xuICAgIHZhciBvZmZzZXRDb2x1bW4gPSB1dGlsLmdldEFyZyhvZmZzZXQsICdjb2x1bW4nKTtcblxuICAgIGlmIChvZmZzZXRMaW5lIDwgbGFzdE9mZnNldC5saW5lIHx8XG4gICAgICAgIChvZmZzZXRMaW5lID09PSBsYXN0T2Zmc2V0LmxpbmUgJiYgb2Zmc2V0Q29sdW1uIDwgbGFzdE9mZnNldC5jb2x1bW4pKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NlY3Rpb24gb2Zmc2V0cyBtdXN0IGJlIG9yZGVyZWQgYW5kIG5vbi1vdmVybGFwcGluZy4nKTtcbiAgICB9XG4gICAgbGFzdE9mZnNldCA9IG9mZnNldDtcblxuICAgIHJldHVybiB7XG4gICAgICBnZW5lcmF0ZWRPZmZzZXQ6IHtcbiAgICAgICAgLy8gVGhlIG9mZnNldCBmaWVsZHMgYXJlIDAtYmFzZWQsIGJ1dCB3ZSB1c2UgMS1iYXNlZCBpbmRpY2VzIHdoZW5cbiAgICAgICAgLy8gZW5jb2RpbmcvZGVjb2RpbmcgZnJvbSBWTFEuXG4gICAgICAgIGdlbmVyYXRlZExpbmU6IG9mZnNldExpbmUgKyAxLFxuICAgICAgICBnZW5lcmF0ZWRDb2x1bW46IG9mZnNldENvbHVtbiArIDFcbiAgICAgIH0sXG4gICAgICBjb25zdW1lcjogbmV3IFNvdXJjZU1hcENvbnN1bWVyKHV0aWwuZ2V0QXJnKHMsICdtYXAnKSlcbiAgICB9XG4gIH0pO1xufVxuXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFNvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBzb3VyY2UgbWFwcGluZyBzcGVjIHRoYXQgd2UgYXJlIGNvbnN1bWluZy5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUsICdzb3VyY2VzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgc291cmNlcyA9IFtdO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fc2VjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlcy5sZW5ndGg7IGorKykge1xuICAgICAgICBzb3VyY2VzLnB1c2godGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlc1tqXSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzb3VyY2VzO1xuICB9XG59KTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UsIGxpbmUsIGFuZCBjb2x1bW4gaW5mb3JtYXRpb24gZm9yIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdFxuICogd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlLCBvciBudWxsLlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBuYW1lOiBUaGUgb3JpZ2luYWwgaWRlbnRpZmllciwgb3IgbnVsbC5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX29yaWdpbmFsUG9zaXRpb25Gb3IoYUFyZ3MpIHtcbiAgICB2YXIgbmVlZGxlID0ge1xuICAgICAgZ2VuZXJhdGVkTGluZTogdXRpbC5nZXRBcmcoYUFyZ3MsICdsaW5lJyksXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IHV0aWwuZ2V0QXJnKGFBcmdzLCAnY29sdW1uJylcbiAgICB9O1xuXG4gICAgLy8gRmluZCB0aGUgc2VjdGlvbiBjb250YWluaW5nIHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24gd2UncmUgdHJ5aW5nIHRvIG1hcFxuICAgIC8vIHRvIGFuIG9yaWdpbmFsIHBvc2l0aW9uLlxuICAgIHZhciBzZWN0aW9uSW5kZXggPSBiaW5hcnlTZWFyY2guc2VhcmNoKG5lZWRsZSwgdGhpcy5fc2VjdGlvbnMsXG4gICAgICBmdW5jdGlvbihuZWVkbGUsIHNlY3Rpb24pIHtcbiAgICAgICAgdmFyIGNtcCA9IG5lZWRsZS5nZW5lcmF0ZWRMaW5lIC0gc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZTtcbiAgICAgICAgaWYgKGNtcCkge1xuICAgICAgICAgIHJldHVybiBjbXA7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gKG5lZWRsZS5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgIHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbik7XG4gICAgICB9KTtcbiAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW3NlY3Rpb25JbmRleF07XG5cbiAgICBpZiAoIXNlY3Rpb24pIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogbnVsbCxcbiAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgICBuYW1lOiBudWxsXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBzZWN0aW9uLmNvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgbGluZTogbmVlZGxlLmdlbmVyYXRlZExpbmUgLVxuICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgY29sdW1uOiBuZWVkbGUuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgKHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgIDogMCksXG4gICAgICBiaWFzOiBhQXJncy5iaWFzXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICByZXR1cm4gdGhpcy5fc2VjdGlvbnMuZXZlcnkoZnVuY3Rpb24gKHMpIHtcbiAgICAgIHJldHVybiBzLmNvbnN1bWVyLmhhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCk7XG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgb3JpZ2luYWwgc291cmNlIGNvbnRlbnQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIHRoZSB1cmwgb2YgdGhlXG4gKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gKiBhdmFpbGFibGUuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9zb3VyY2VDb250ZW50Rm9yKGFTb3VyY2UsIG51bGxPbk1pc3NpbmcpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3NlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuXG4gICAgICB2YXIgY29udGVudCA9IHNlY3Rpb24uY29uc3VtZXIuc291cmNlQ29udGVudEZvcihhU291cmNlLCB0cnVlKTtcbiAgICAgIGlmIChjb250ZW50KSB7XG4gICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmdlbmVyYXRlZFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcblxuICAgICAgLy8gT25seSBjb25zaWRlciB0aGlzIHNlY3Rpb24gaWYgdGhlIHJlcXVlc3RlZCBzb3VyY2UgaXMgaW4gdGhlIGxpc3Qgb2ZcbiAgICAgIC8vIHNvdXJjZXMgb2YgdGhlIGNvbnN1bWVyLlxuICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlcy5pbmRleE9mKHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJykpID09PSAtMSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHZhciBnZW5lcmF0ZWRQb3NpdGlvbiA9IHNlY3Rpb24uY29uc3VtZXIuZ2VuZXJhdGVkUG9zaXRpb25Gb3IoYUFyZ3MpO1xuICAgICAgaWYgKGdlbmVyYXRlZFBvc2l0aW9uKSB7XG4gICAgICAgIHZhciByZXQgPSB7XG4gICAgICAgICAgbGluZTogZ2VuZXJhdGVkUG9zaXRpb24ubGluZSArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkUG9zaXRpb24uY29sdW1uICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lID09PSBnZW5lcmF0ZWRQb3NpdGlvbi5saW5lXG4gICAgICAgICAgICAgPyBzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRDb2x1bW4gLSAxXG4gICAgICAgICAgICAgOiAwKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsXG4gICAgfTtcbiAgfTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgbWFwcGluZ3MgaW4gYSBzdHJpbmcgaW4gdG8gYSBkYXRhIHN0cnVjdHVyZSB3aGljaCB3ZSBjYW4gZWFzaWx5XG4gKiBxdWVyeSAodGhlIG9yZGVyZWQgYXJyYXlzIGluIHRoZSBgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzYCBhbmRcbiAqIGB0aGlzLl9fb3JpZ2luYWxNYXBwaW5nc2AgcHJvcGVydGllcykuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXJfcGFyc2VNYXBwaW5ncyhhU3RyLCBhU291cmNlUm9vdCkge1xuICAgIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncyA9IFtdO1xuICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcbiAgICAgIHZhciBzZWN0aW9uTWFwcGluZ3MgPSBzZWN0aW9uLmNvbnN1bWVyLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gc2VjdGlvbk1hcHBpbmdzW2pdO1xuXG4gICAgICAgIHZhciBzb3VyY2UgPSBzZWN0aW9uLmNvbnN1bWVyLl9zb3VyY2VzLmF0KG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZSA9IHV0aWwuam9pbihzZWN0aW9uLmNvbnN1bWVyLnNvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgICAgdmFyIG5hbWUgPSBzZWN0aW9uLmNvbnN1bWVyLl9uYW1lcy5hdChtYXBwaW5nLm5hbWUpO1xuICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgIG5hbWUgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpO1xuXG4gICAgICAgIC8vIFRoZSBtYXBwaW5ncyBjb21pbmcgZnJvbSB0aGUgY29uc3VtZXIgZm9yIHRoZSBzZWN0aW9uIGhhdmVcbiAgICAgICAgLy8gZ2VuZXJhdGVkIHBvc2l0aW9ucyByZWxhdGl2ZSB0byB0aGUgc3RhcnQgb2YgdGhlIHNlY3Rpb24sIHNvIHdlXG4gICAgICAgIC8vIG5lZWQgdG8gb2Zmc2V0IHRoZW0gdG8gYmUgcmVsYXRpdmUgdG8gdGhlIHN0YXJ0IG9mIHRoZSBjb25jYXRlbmF0ZWRcbiAgICAgICAgLy8gZ2VuZXJhdGVkIGZpbGUuXG4gICAgICAgIHZhciBhZGp1c3RlZE1hcHBpbmcgPSB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgZ2VuZXJhdGVkTGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lIC0gMSksXG4gICAgICAgICAgZ2VuZXJhdGVkQ29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSA9PT0gbWFwcGluZy5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgICAgIDogMCksXG4gICAgICAgICAgb3JpZ2luYWxMaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBvcmlnaW5hbENvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgaWYgKHR5cGVvZiBhZGp1c3RlZE1hcHBpbmcub3JpZ2luYWxMaW5lID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHF1aWNrU29ydCh0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MsIHV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zRGVmbGF0ZWQpO1xuICAgIHF1aWNrU29ydCh0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyk7XG4gIH07XG5cbmV4cG9ydHMuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyID0gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qc1xuLy8gbW9kdWxlIGlkID0gN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbmV4cG9ydHMuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCA9IDI7XG5cbi8qKlxuICogUmVjdXJzaXZlIGltcGxlbWVudGF0aW9uIG9mIGJpbmFyeSBzZWFyY2guXG4gKlxuICogQHBhcmFtIGFMb3cgSW5kaWNlcyBoZXJlIGFuZCBsb3dlciBkbyBub3QgY29udGFpbiB0aGUgbmVlZGxlLlxuICogQHBhcmFtIGFIaWdoIEluZGljZXMgaGVyZSBhbmQgaGlnaGVyIGRvIG5vdCBjb250YWluIHRoZSBuZWVkbGUuXG4gKiBAcGFyYW0gYU5lZWRsZSBUaGUgZWxlbWVudCBiZWluZyBzZWFyY2hlZCBmb3IuXG4gKiBAcGFyYW0gYUhheXN0YWNrIFRoZSBub24tZW1wdHkgYXJyYXkgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgRnVuY3Rpb24gd2hpY2ggdGFrZXMgdHdvIGVsZW1lbnRzIGFuZCByZXR1cm5zIC0xLCAwLCBvciAxLlxuICogQHBhcmFtIGFCaWFzIEVpdGhlciAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJyBvclxuICogICAgICdiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICovXG5mdW5jdGlvbiByZWN1cnNpdmVTZWFyY2goYUxvdywgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKSB7XG4gIC8vIFRoaXMgZnVuY3Rpb24gdGVybWluYXRlcyB3aGVuIG9uZSBvZiB0aGUgZm9sbG93aW5nIGlzIHRydWU6XG4gIC8vXG4gIC8vICAgMS4gV2UgZmluZCB0aGUgZXhhY3QgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gIC8vXG4gIC8vICAgMi4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBidXQgd2UgY2FuIHJldHVybiB0aGUgaW5kZXggb2ZcbiAgLy8gICAgICB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQuXG4gIC8vXG4gIC8vICAgMy4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBhbmQgdGhlcmUgaXMgbm8gbmV4dC1jbG9zZXN0XG4gIC8vICAgICAgZWxlbWVudCB0aGFuIHRoZSBvbmUgd2UgYXJlIHNlYXJjaGluZyBmb3IsIHNvIHdlIHJldHVybiAtMS5cbiAgdmFyIG1pZCA9IE1hdGguZmxvb3IoKGFIaWdoIC0gYUxvdykgLyAyKSArIGFMb3c7XG4gIHZhciBjbXAgPSBhQ29tcGFyZShhTmVlZGxlLCBhSGF5c3RhY2tbbWlkXSwgdHJ1ZSk7XG4gIGlmIChjbXAgPT09IDApIHtcbiAgICAvLyBGb3VuZCB0aGUgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gICAgcmV0dXJuIG1pZDtcbiAgfVxuICBlbHNlIGlmIChjbXAgPiAwKSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBncmVhdGVyIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKGFIaWdoIC0gbWlkID4gMSkge1xuICAgICAgLy8gVGhlIGVsZW1lbnQgaXMgaW4gdGhlIHVwcGVyIGhhbGYuXG4gICAgICByZXR1cm4gcmVjdXJzaXZlU2VhcmNoKG1pZCwgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKTtcbiAgICB9XG5cbiAgICAvLyBUaGUgZXhhY3QgbmVlZGxlIGVsZW1lbnQgd2FzIG5vdCBmb3VuZCBpbiB0aGlzIGhheXN0YWNrLiBEZXRlcm1pbmUgaWZcbiAgICAvLyB3ZSBhcmUgaW4gdGVybWluYXRpb24gY2FzZSAoMykgb3IgKDIpIGFuZCByZXR1cm4gdGhlIGFwcHJvcHJpYXRlIHRoaW5nLlxuICAgIGlmIChhQmlhcyA9PSBleHBvcnRzLkxFQVNUX1VQUEVSX0JPVU5EKSB7XG4gICAgICByZXR1cm4gYUhpZ2ggPCBhSGF5c3RhY2subGVuZ3RoID8gYUhpZ2ggOiAtMTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9XG4gIH1cbiAgZWxzZSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBsZXNzIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKG1pZCAtIGFMb3cgPiAxKSB7XG4gICAgICAvLyBUaGUgZWxlbWVudCBpcyBpbiB0aGUgbG93ZXIgaGFsZi5cbiAgICAgIHJldHVybiByZWN1cnNpdmVTZWFyY2goYUxvdywgbWlkLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcyk7XG4gICAgfVxuXG4gICAgLy8gd2UgYXJlIGluIHRlcm1pbmF0aW9uIGNhc2UgKDMpIG9yICgyKSBhbmQgcmV0dXJuIHRoZSBhcHByb3ByaWF0ZSB0aGluZy5cbiAgICBpZiAoYUJpYXMgPT0gZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCkge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFMb3cgPCAwID8gLTEgOiBhTG93O1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIFRoaXMgaXMgYW4gaW1wbGVtZW50YXRpb24gb2YgYmluYXJ5IHNlYXJjaCB3aGljaCB3aWxsIGFsd2F5cyB0cnkgYW5kIHJldHVyblxuICogdGhlIGluZGV4IG9mIHRoZSBjbG9zZXN0IGVsZW1lbnQgaWYgdGhlcmUgaXMgbm8gZXhhY3QgaGl0LiBUaGlzIGlzIGJlY2F1c2VcbiAqIG1hcHBpbmdzIGJldHdlZW4gb3JpZ2luYWwgYW5kIGdlbmVyYXRlZCBsaW5lL2NvbCBwYWlycyBhcmUgc2luZ2xlIHBvaW50cyxcbiAqIGFuZCB0aGVyZSBpcyBhbiBpbXBsaWNpdCByZWdpb24gYmV0d2VlbiBlYWNoIG9mIHRoZW0sIHNvIGEgbWlzcyBqdXN0IG1lYW5zXG4gKiB0aGF0IHlvdSBhcmVuJ3Qgb24gdGhlIHZlcnkgc3RhcnQgb2YgYSByZWdpb24uXG4gKlxuICogQHBhcmFtIGFOZWVkbGUgVGhlIGVsZW1lbnQgeW91IGFyZSBsb29raW5nIGZvci5cbiAqIEBwYXJhbSBhSGF5c3RhY2sgVGhlIGFycmF5IHRoYXQgaXMgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgQSBmdW5jdGlvbiB3aGljaCB0YWtlcyB0aGUgbmVlZGxlIGFuZCBhbiBlbGVtZW50IGluIHRoZVxuICogICAgIGFycmF5IGFuZCByZXR1cm5zIC0xLCAwLCBvciAxIGRlcGVuZGluZyBvbiB3aGV0aGVyIHRoZSBuZWVkbGUgaXMgbGVzc1xuICogICAgIHRoYW4sIGVxdWFsIHRvLCBvciBncmVhdGVyIHRoYW4gdGhlIGVsZW1lbnQsIHJlc3BlY3RpdmVseS5cbiAqIEBwYXJhbSBhQmlhcyBFaXRoZXIgJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJy5cbiAqL1xuZXhwb3J0cy5zZWFyY2ggPSBmdW5jdGlvbiBzZWFyY2goYU5lZWRsZSwgYUhheXN0YWNrLCBhQ29tcGFyZSwgYUJpYXMpIHtcbiAgaWYgKGFIYXlzdGFjay5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gLTE7XG4gIH1cblxuICB2YXIgaW5kZXggPSByZWN1cnNpdmVTZWFyY2goLTEsIGFIYXlzdGFjay5sZW5ndGgsIGFOZWVkbGUsIGFIYXlzdGFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFDb21wYXJlLCBhQmlhcyB8fCBleHBvcnRzLkdSRUFURVNUX0xPV0VSX0JPVU5EKTtcbiAgaWYgKGluZGV4IDwgMCkge1xuICAgIHJldHVybiAtMTtcbiAgfVxuXG4gIC8vIFdlIGhhdmUgZm91bmQgZWl0aGVyIHRoZSBleGFjdCBlbGVtZW50LCBvciB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQgdGhhblxuICAvLyB0aGUgb25lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLiBIb3dldmVyLCB0aGVyZSBtYXkgYmUgbW9yZSB0aGFuIG9uZSBzdWNoXG4gIC8vIGVsZW1lbnQuIE1ha2Ugc3VyZSB3ZSBhbHdheXMgcmV0dXJuIHRoZSBzbWFsbGVzdCBvZiB0aGVzZS5cbiAgd2hpbGUgKGluZGV4IC0gMSA+PSAwKSB7XG4gICAgaWYgKGFDb21wYXJlKGFIYXlzdGFja1tpbmRleF0sIGFIYXlzdGFja1tpbmRleCAtIDFdLCB0cnVlKSAhPT0gMCkge1xuICAgICAgYnJlYWs7XG4gICAgfVxuICAgIC0taW5kZXg7XG4gIH1cblxuICByZXR1cm4gaW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmluYXJ5LXNlYXJjaC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbi8vIEl0IHR1cm5zIG91dCB0aGF0IHNvbWUgKG1vc3Q/KSBKYXZhU2NyaXB0IGVuZ2luZXMgZG9uJ3Qgc2VsZi1ob3N0XG4vLyBgQXJyYXkucHJvdG90eXBlLnNvcnRgLiBUaGlzIG1ha2VzIHNlbnNlIGJlY2F1c2UgQysrIHdpbGwgbGlrZWx5IHJlbWFpblxuLy8gZmFzdGVyIHRoYW4gSlMgd2hlbiBkb2luZyByYXcgQ1BVLWludGVuc2l2ZSBzb3J0aW5nLiBIb3dldmVyLCB3aGVuIHVzaW5nIGFcbi8vIGN1c3RvbSBjb21wYXJhdG9yIGZ1bmN0aW9uLCBjYWxsaW5nIGJhY2sgYW5kIGZvcnRoIGJldHdlZW4gdGhlIFZNJ3MgQysrIGFuZFxuLy8gSklUJ2QgSlMgaXMgcmF0aGVyIHNsb3cgKmFuZCogbG9zZXMgSklUIHR5cGUgaW5mb3JtYXRpb24sIHJlc3VsdGluZyBpblxuLy8gd29yc2UgZ2VuZXJhdGVkIGNvZGUgZm9yIHRoZSBjb21wYXJhdG9yIGZ1bmN0aW9uIHRoYW4gd291bGQgYmUgb3B0aW1hbC4gSW5cbi8vIGZhY3QsIHdoZW4gc29ydGluZyB3aXRoIGEgY29tcGFyYXRvciwgdGhlc2UgY29zdHMgb3V0d2VpZ2ggdGhlIGJlbmVmaXRzIG9mXG4vLyBzb3J0aW5nIGluIEMrKy4gQnkgdXNpbmcgb3VyIG93biBKUy1pbXBsZW1lbnRlZCBRdWljayBTb3J0IChiZWxvdyksIHdlIGdldFxuLy8gYSB+MzUwMG1zIG1lYW4gc3BlZWQtdXAgaW4gYGJlbmNoL2JlbmNoLmh0bWxgLlxuXG4vKipcbiAqIFN3YXAgdGhlIGVsZW1lbnRzIGluZGV4ZWQgYnkgYHhgIGFuZCBgeWAgaW4gdGhlIGFycmF5IGBhcnlgLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIFRoZSBhcnJheS5cbiAqIEBwYXJhbSB7TnVtYmVyfSB4XG4gKiAgICAgICAgVGhlIGluZGV4IG9mIHRoZSBmaXJzdCBpdGVtLlxuICogQHBhcmFtIHtOdW1iZXJ9IHlcbiAqICAgICAgICBUaGUgaW5kZXggb2YgdGhlIHNlY29uZCBpdGVtLlxuICovXG5mdW5jdGlvbiBzd2FwKGFyeSwgeCwgeSkge1xuICB2YXIgdGVtcCA9IGFyeVt4XTtcbiAgYXJ5W3hdID0gYXJ5W3ldO1xuICBhcnlbeV0gPSB0ZW1wO1xufVxuXG4vKipcbiAqIFJldHVybnMgYSByYW5kb20gaW50ZWdlciB3aXRoaW4gdGhlIHJhbmdlIGBsb3cgLi4gaGlnaGAgaW5jbHVzaXZlLlxuICpcbiAqIEBwYXJhbSB7TnVtYmVyfSBsb3dcbiAqICAgICAgICBUaGUgbG93ZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICogQHBhcmFtIHtOdW1iZXJ9IGhpZ2hcbiAqICAgICAgICBUaGUgdXBwZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICovXG5mdW5jdGlvbiByYW5kb21JbnRJblJhbmdlKGxvdywgaGlnaCkge1xuICByZXR1cm4gTWF0aC5yb3VuZChsb3cgKyAoTWF0aC5yYW5kb20oKSAqIChoaWdoIC0gbG93KSkpO1xufVxuXG4vKipcbiAqIFRoZSBRdWljayBTb3J0IGFsZ29yaXRobS5cbiAqXG4gKiBAcGFyYW0ge0FycmF5fSBhcnlcbiAqICAgICAgICBBbiBhcnJheSB0byBzb3J0LlxuICogQHBhcmFtIHtmdW5jdGlvbn0gY29tcGFyYXRvclxuICogICAgICAgIEZ1bmN0aW9uIHRvIHVzZSB0byBjb21wYXJlIHR3byBpdGVtcy5cbiAqIEBwYXJhbSB7TnVtYmVyfSBwXG4gKiAgICAgICAgU3RhcnQgaW5kZXggb2YgdGhlIGFycmF5XG4gKiBAcGFyYW0ge051bWJlcn0gclxuICogICAgICAgIEVuZCBpbmRleCBvZiB0aGUgYXJyYXlcbiAqL1xuZnVuY3Rpb24gZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCByKSB7XG4gIC8vIElmIG91ciBsb3dlciBib3VuZCBpcyBsZXNzIHRoYW4gb3VyIHVwcGVyIGJvdW5kLCB3ZSAoMSkgcGFydGl0aW9uIHRoZVxuICAvLyBhcnJheSBpbnRvIHR3byBwaWVjZXMgYW5kICgyKSByZWN1cnNlIG9uIGVhY2ggaGFsZi4gSWYgaXQgaXMgbm90LCB0aGlzIGlzXG4gIC8vIHRoZSBlbXB0eSBhcnJheSBhbmQgb3VyIGJhc2UgY2FzZS5cblxuICBpZiAocCA8IHIpIHtcbiAgICAvLyAoMSkgUGFydGl0aW9uaW5nLlxuICAgIC8vXG4gICAgLy8gVGhlIHBhcnRpdGlvbmluZyBjaG9vc2VzIGEgcGl2b3QgYmV0d2VlbiBgcGAgYW5kIGByYCBhbmQgbW92ZXMgYWxsXG4gICAgLy8gZWxlbWVudHMgdGhhdCBhcmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdCB0byB0aGUgYmVmb3JlIGl0LCBhbmRcbiAgICAvLyBhbGwgdGhlIGVsZW1lbnRzIHRoYXQgYXJlIGdyZWF0ZXIgdGhhbiBpdCBhZnRlciBpdC4gVGhlIGVmZmVjdCBpcyB0aGF0XG4gICAgLy8gb25jZSBwYXJ0aXRpb24gaXMgZG9uZSwgdGhlIHBpdm90IGlzIGluIHRoZSBleGFjdCBwbGFjZSBpdCB3aWxsIGJlIHdoZW5cbiAgICAvLyB0aGUgYXJyYXkgaXMgcHV0IGluIHNvcnRlZCBvcmRlciwgYW5kIGl0IHdpbGwgbm90IG5lZWQgdG8gYmUgbW92ZWRcbiAgICAvLyBhZ2Fpbi4gVGhpcyBydW5zIGluIE8obikgdGltZS5cblxuICAgIC8vIEFsd2F5cyBjaG9vc2UgYSByYW5kb20gcGl2b3Qgc28gdGhhdCBhbiBpbnB1dCBhcnJheSB3aGljaCBpcyByZXZlcnNlXG4gICAgLy8gc29ydGVkIGRvZXMgbm90IGNhdXNlIE8obl4yKSBydW5uaW5nIHRpbWUuXG4gICAgdmFyIHBpdm90SW5kZXggPSByYW5kb21JbnRJblJhbmdlKHAsIHIpO1xuICAgIHZhciBpID0gcCAtIDE7XG5cbiAgICBzd2FwKGFyeSwgcGl2b3RJbmRleCwgcik7XG4gICAgdmFyIHBpdm90ID0gYXJ5W3JdO1xuXG4gICAgLy8gSW1tZWRpYXRlbHkgYWZ0ZXIgYGpgIGlzIGluY3JlbWVudGVkIGluIHRoaXMgbG9vcCwgdGhlIGZvbGxvd2luZyBob2xkXG4gICAgLy8gdHJ1ZTpcbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbcCAuLiBpXWAgaXMgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdC5cbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbaSsxIC4uIGotMV1gIGlzIGdyZWF0ZXIgdGhhbiB0aGUgcGl2b3QuXG4gICAgZm9yICh2YXIgaiA9IHA7IGogPCByOyBqKyspIHtcbiAgICAgIGlmIChjb21wYXJhdG9yKGFyeVtqXSwgcGl2b3QpIDw9IDApIHtcbiAgICAgICAgaSArPSAxO1xuICAgICAgICBzd2FwKGFyeSwgaSwgaik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgc3dhcChhcnksIGkgKyAxLCBqKTtcbiAgICB2YXIgcSA9IGkgKyAxO1xuXG4gICAgLy8gKDIpIFJlY3Vyc2Ugb24gZWFjaCBoYWxmLlxuXG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCBxIC0gMSk7XG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBxICsgMSwgcik7XG4gIH1cbn1cblxuLyoqXG4gKiBTb3J0IHRoZSBnaXZlbiBhcnJheSBpbi1wbGFjZSB3aXRoIHRoZSBnaXZlbiBjb21wYXJhdG9yIGZ1bmN0aW9uLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIEFuIGFycmF5IHRvIHNvcnQuXG4gKiBAcGFyYW0ge2Z1bmN0aW9ufSBjb21wYXJhdG9yXG4gKiAgICAgICAgRnVuY3Rpb24gdG8gdXNlIHRvIGNvbXBhcmUgdHdvIGl0ZW1zLlxuICovXG5leHBvcnRzLnF1aWNrU29ydCA9IGZ1bmN0aW9uIChhcnksIGNvbXBhcmF0b3IpIHtcbiAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCAwLCBhcnkubGVuZ3RoIC0gMSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvcXVpY2stc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBTb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL3NvdXJjZS1tYXAtZ2VuZXJhdG9yJykuU291cmNlTWFwR2VuZXJhdG9yO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLy8gTWF0Y2hlcyBhIFdpbmRvd3Mtc3R5bGUgYFxcclxcbmAgbmV3bGluZSBvciBhIGBcXG5gIG5ld2xpbmUgdXNlZCBieSBhbGwgb3RoZXJcbi8vIG9wZXJhdGluZyBzeXN0ZW1zIHRoZXNlIGRheXMgKGNhcHR1cmluZyB0aGUgcmVzdWx0KS5cbnZhciBSRUdFWF9ORVdMSU5FID0gLyhcXHI/XFxuKS87XG5cbi8vIE5ld2xpbmUgY2hhcmFjdGVyIGNvZGUgZm9yIGNoYXJDb2RlQXQoKSBjb21wYXJpc29uc1xudmFyIE5FV0xJTkVfQ09ERSA9IDEwO1xuXG4vLyBQcml2YXRlIHN5bWJvbCBmb3IgaWRlbnRpZnlpbmcgYFNvdXJjZU5vZGVgcyB3aGVuIG11bHRpcGxlIHZlcnNpb25zIG9mXG4vLyB0aGUgc291cmNlLW1hcCBsaWJyYXJ5IGFyZSBsb2FkZWQuIFRoaXMgTVVTVCBOT1QgQ0hBTkdFIGFjcm9zc1xuLy8gdmVyc2lvbnMhXG52YXIgaXNTb3VyY2VOb2RlID0gXCIkJCRpc1NvdXJjZU5vZGUkJCRcIjtcblxuLyoqXG4gKiBTb3VyY2VOb2RlcyBwcm92aWRlIGEgd2F5IHRvIGFic3RyYWN0IG92ZXIgaW50ZXJwb2xhdGluZy9jb25jYXRlbmF0aW5nXG4gKiBzbmlwcGV0cyBvZiBnZW5lcmF0ZWQgSmF2YVNjcmlwdCBzb3VyY2UgY29kZSB3aGlsZSBtYWludGFpbmluZyB0aGUgbGluZSBhbmRcbiAqIGNvbHVtbiBpbmZvcm1hdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIG9yaWdpbmFsIHNvdXJjZSBjb2RlLlxuICpcbiAqIEBwYXJhbSBhTGluZSBUaGUgb3JpZ2luYWwgbGluZSBudW1iZXIuXG4gKiBAcGFyYW0gYUNvbHVtbiBUaGUgb3JpZ2luYWwgY29sdW1uIG51bWJlci5cbiAqIEBwYXJhbSBhU291cmNlIFRoZSBvcmlnaW5hbCBzb3VyY2UncyBmaWxlbmFtZS5cbiAqIEBwYXJhbSBhQ2h1bmtzIE9wdGlvbmFsLiBBbiBhcnJheSBvZiBzdHJpbmdzIHdoaWNoIGFyZSBzbmlwcGV0cyBvZlxuICogICAgICAgIGdlbmVyYXRlZCBKUywgb3Igb3RoZXIgU291cmNlTm9kZXMuXG4gKiBAcGFyYW0gYU5hbWUgVGhlIG9yaWdpbmFsIGlkZW50aWZpZXIuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU5vZGUoYUxpbmUsIGFDb2x1bW4sIGFTb3VyY2UsIGFDaHVua3MsIGFOYW1lKSB7XG4gIHRoaXMuY2hpbGRyZW4gPSBbXTtcbiAgdGhpcy5zb3VyY2VDb250ZW50cyA9IHt9O1xuICB0aGlzLmxpbmUgPSBhTGluZSA9PSBudWxsID8gbnVsbCA6IGFMaW5lO1xuICB0aGlzLmNvbHVtbiA9IGFDb2x1bW4gPT0gbnVsbCA/IG51bGwgOiBhQ29sdW1uO1xuICB0aGlzLnNvdXJjZSA9IGFTb3VyY2UgPT0gbnVsbCA/IG51bGwgOiBhU291cmNlO1xuICB0aGlzLm5hbWUgPSBhTmFtZSA9PSBudWxsID8gbnVsbCA6IGFOYW1lO1xuICB0aGlzW2lzU291cmNlTm9kZV0gPSB0cnVlO1xuICBpZiAoYUNodW5rcyAhPSBudWxsKSB0aGlzLmFkZChhQ2h1bmtzKTtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgU291cmNlTm9kZSBmcm9tIGdlbmVyYXRlZCBjb2RlIGFuZCBhIFNvdXJjZU1hcENvbnN1bWVyLlxuICpcbiAqIEBwYXJhbSBhR2VuZXJhdGVkQ29kZSBUaGUgZ2VuZXJhdGVkIGNvZGVcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcCBmb3IgdGhlIGdlbmVyYXRlZCBjb2RlXG4gKiBAcGFyYW0gYVJlbGF0aXZlUGF0aCBPcHRpb25hbC4gVGhlIHBhdGggdGhhdCByZWxhdGl2ZSBzb3VyY2VzIGluIHRoZVxuICogICAgICAgIFNvdXJjZU1hcENvbnN1bWVyIHNob3VsZCBiZSByZWxhdGl2ZSB0by5cbiAqL1xuU291cmNlTm9kZS5mcm9tU3RyaW5nV2l0aFNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfZnJvbVN0cmluZ1dpdGhTb3VyY2VNYXAoYUdlbmVyYXRlZENvZGUsIGFTb3VyY2VNYXBDb25zdW1lciwgYVJlbGF0aXZlUGF0aCkge1xuICAgIC8vIFRoZSBTb3VyY2VOb2RlIHdlIHdhbnQgdG8gZmlsbCB3aXRoIHRoZSBnZW5lcmF0ZWQgY29kZVxuICAgIC8vIGFuZCB0aGUgU291cmNlTWFwXG4gICAgdmFyIG5vZGUgPSBuZXcgU291cmNlTm9kZSgpO1xuXG4gICAgLy8gQWxsIGV2ZW4gaW5kaWNlcyBvZiB0aGlzIGFycmF5IGFyZSBvbmUgbGluZSBvZiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4gICAgLy8gd2hpbGUgYWxsIG9kZCBpbmRpY2VzIGFyZSB0aGUgbmV3bGluZXMgYmV0d2VlbiB0d28gYWRqYWNlbnQgbGluZXNcbiAgICAvLyAoc2luY2UgYFJFR0VYX05FV0xJTkVgIGNhcHR1cmVzIGl0cyBtYXRjaCkuXG4gICAgLy8gUHJvY2Vzc2VkIGZyYWdtZW50cyBhcmUgYWNjZXNzZWQgYnkgY2FsbGluZyBgc2hpZnROZXh0TGluZWAuXG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzID0gYUdlbmVyYXRlZENvZGUuc3BsaXQoUkVHRVhfTkVXTElORSk7XG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzSW5kZXggPSAwO1xuICAgIHZhciBzaGlmdE5leHRMaW5lID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgbGluZUNvbnRlbnRzID0gZ2V0TmV4dExpbmUoKTtcbiAgICAgIC8vIFRoZSBsYXN0IGxpbmUgb2YgYSBmaWxlIG1pZ2h0IG5vdCBoYXZlIGEgbmV3bGluZS5cbiAgICAgIHZhciBuZXdMaW5lID0gZ2V0TmV4dExpbmUoKSB8fCBcIlwiO1xuICAgICAgcmV0dXJuIGxpbmVDb250ZW50cyArIG5ld0xpbmU7XG5cbiAgICAgIGZ1bmN0aW9uIGdldE5leHRMaW5lKCkge1xuICAgICAgICByZXR1cm4gcmVtYWluaW5nTGluZXNJbmRleCA8IHJlbWFpbmluZ0xpbmVzLmxlbmd0aCA/XG4gICAgICAgICAgICByZW1haW5pbmdMaW5lc1tyZW1haW5pbmdMaW5lc0luZGV4KytdIDogdW5kZWZpbmVkO1xuICAgICAgfVxuICAgIH07XG5cbiAgICAvLyBXZSBuZWVkIHRvIHJlbWVtYmVyIHRoZSBwb3NpdGlvbiBvZiBcInJlbWFpbmluZ0xpbmVzXCJcbiAgICB2YXIgbGFzdEdlbmVyYXRlZExpbmUgPSAxLCBsYXN0R2VuZXJhdGVkQ29sdW1uID0gMDtcblxuICAgIC8vIFRoZSBnZW5lcmF0ZSBTb3VyY2VOb2RlcyB3ZSBuZWVkIGEgY29kZSByYW5nZS5cbiAgICAvLyBUbyBleHRyYWN0IGl0IGN1cnJlbnQgYW5kIGxhc3QgbWFwcGluZyBpcyB1c2VkLlxuICAgIC8vIEhlcmUgd2Ugc3RvcmUgdGhlIGxhc3QgbWFwcGluZy5cbiAgICB2YXIgbGFzdE1hcHBpbmcgPSBudWxsO1xuXG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLmVhY2hNYXBwaW5nKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcgIT09IG51bGwpIHtcbiAgICAgICAgLy8gV2UgYWRkIHRoZSBjb2RlIGZyb20gXCJsYXN0TWFwcGluZ1wiIHRvIFwibWFwcGluZ1wiOlxuICAgICAgICAvLyBGaXJzdCBjaGVjayBpZiB0aGVyZSBpcyBhIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgIGlmIChsYXN0R2VuZXJhdGVkTGluZSA8IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSkge1xuICAgICAgICAgIC8vIEFzc29jaWF0ZSBmaXJzdCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBzaGlmdE5leHRMaW5lKCkpO1xuICAgICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgICAgbGFzdEdlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgICAgICAgLy8gVGhlIHJlbWFpbmluZyBjb2RlIGlzIGFkZGVkIHdpdGhvdXQgbWFwcGluZ1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIFRoZXJlIGlzIG5vIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSBjb2RlIGJldHdlZW4gXCJsYXN0R2VuZXJhdGVkQ29sdW1uXCIgYW5kXG4gICAgICAgICAgLy8gXCJtYXBwaW5nLmdlbmVyYXRlZENvbHVtblwiIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgdmFyIG5leHRMaW5lID0gcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF07XG4gICAgICAgICAgdmFyIGNvZGUgPSBuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICAgIHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdID0gbmV4dExpbmUuc3Vic3RyKG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBjb2RlKTtcbiAgICAgICAgICAvLyBObyBtb3JlIHJlbWFpbmluZyBjb2RlLCBjb250aW51ZVxuICAgICAgICAgIGxhc3RNYXBwaW5nID0gbWFwcGluZztcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIFdlIGFkZCB0aGUgZ2VuZXJhdGVkIGNvZGUgdW50aWwgdGhlIGZpcnN0IG1hcHBpbmdcbiAgICAgIC8vIHRvIHRoZSBTb3VyY2VOb2RlIHdpdGhvdXQgYW55IG1hcHBpbmcuXG4gICAgICAvLyBFYWNoIGxpbmUgaXMgYWRkZWQgYXMgc2VwYXJhdGUgc3RyaW5nLlxuICAgICAgd2hpbGUgKGxhc3RHZW5lcmF0ZWRMaW5lIDwgbWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIG5vZGUuYWRkKHNoaWZ0TmV4dExpbmUoKSk7XG4gICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICB9XG4gICAgICBpZiAobGFzdEdlbmVyYXRlZENvbHVtbiA8IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uKSB7XG4gICAgICAgIHZhciBuZXh0TGluZSA9IHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdO1xuICAgICAgICBub2RlLmFkZChuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pKTtcbiAgICAgICAgcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF0gPSBuZXh0TGluZS5zdWJzdHIobWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICB9XG4gICAgICBsYXN0TWFwcGluZyA9IG1hcHBpbmc7XG4gICAgfSwgdGhpcyk7XG4gICAgLy8gV2UgaGF2ZSBwcm9jZXNzZWQgYWxsIG1hcHBpbmdzLlxuICAgIGlmIChyZW1haW5pbmdMaW5lc0luZGV4IDwgcmVtYWluaW5nTGluZXMubGVuZ3RoKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcpIHtcbiAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSByZW1haW5pbmcgY29kZSBpbiB0aGUgY3VycmVudCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgIGFkZE1hcHBpbmdXaXRoQ29kZShsYXN0TWFwcGluZywgc2hpZnROZXh0TGluZSgpKTtcbiAgICAgIH1cbiAgICAgIC8vIGFuZCBhZGQgdGhlIHJlbWFpbmluZyBsaW5lcyB3aXRob3V0IGFueSBtYXBwaW5nXG4gICAgICBub2RlLmFkZChyZW1haW5pbmdMaW5lcy5zcGxpY2UocmVtYWluaW5nTGluZXNJbmRleCkuam9pbihcIlwiKSk7XG4gICAgfVxuXG4gICAgLy8gQ29weSBzb3VyY2VzQ29udGVudCBpbnRvIFNvdXJjZU5vZGVcbiAgICBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1xuICAgICAgdGhpcy5jaGlsZHJlbi5wdXNoKGFDaHVuayk7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3RyaW5nLCBvciBhbiBhcnJheSBvZiBTb3VyY2VOb2RlcyBhbmQgc3RyaW5ncy4gR290IFwiICsgYUNodW5rXG4gICAgKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhpcyBzb3VyY2Ugbm9kZS5cbiAqXG4gKiBAcGFyYW0gYUNodW5rIEEgc3RyaW5nIHNuaXBwZXQgb2YgZ2VuZXJhdGVkIEpTIGNvZGUsIGFub3RoZXIgaW5zdGFuY2Ugb2ZcbiAqICAgICAgICBTb3VyY2VOb2RlLCBvciBhbiBhcnJheSB3aGVyZSBlYWNoIG1lbWJlciBpcyBvbmUgb2YgdGhvc2UgdGhpbmdzLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5wcmVwZW5kID0gZnVuY3Rpb24gU291cmNlTm9kZV9wcmVwZW5kKGFDaHVuaykge1xuICBpZiAoQXJyYXkuaXNBcnJheShhQ2h1bmspKSB7XG4gICAgZm9yICh2YXIgaSA9IGFDaHVuay5sZW5ndGgtMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIHRoaXMucHJlcGVuZChhQ2h1bmtbaV0pO1xuICAgIH1cbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgdGhpcy5jaGlsZHJlbi51bnNoaWZ0KGFDaHVuayk7XG4gIH1cbiAgZWxzZSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgIFwiRXhwZWN0ZWQgYSBTb3VyY2VOb2RlLCBzdHJpbmcsIG9yIGFuIGFycmF5IG9mIFNvdXJjZU5vZGVzIGFuZCBzdHJpbmdzLiBHb3QgXCIgKyBhQ2h1bmtcbiAgICApO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBXYWxrIG92ZXIgdGhlIHRyZWUgb2YgSlMgc25pcHBldHMgaW4gdGhpcyBub2RlIGFuZCBpdHMgY2hpbGRyZW4uIFRoZVxuICogd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgb25jZSBmb3IgZWFjaCBzbmlwcGV0IG9mIEpTIGFuZCBpcyBwYXNzZWQgdGhhdFxuICogc25pcHBldCBhbmQgdGhlIGl0cyBvcmlnaW5hbCBhc3NvY2lhdGVkIHNvdXJjZSdzIGxpbmUvY29sdW1uIGxvY2F0aW9uLlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2FsayA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfd2FsayhhRm4pIHtcbiAgdmFyIGNodW5rO1xuICBmb3IgKHZhciBpID0gMCwgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgIGNodW5rID0gdGhpcy5jaGlsZHJlbltpXTtcbiAgICBpZiAoY2h1bmtbaXNTb3VyY2VOb2RlXSkge1xuICAgICAgY2h1bmsud2FsayhhRm4pO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIGlmIChjaHVuayAhPT0gJycpIHtcbiAgICAgICAgYUZuKGNodW5rLCB7IHNvdXJjZTogdGhpcy5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICBsaW5lOiB0aGlzLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuLyoqXG4gKiBMaWtlIGBTdHJpbmcucHJvdG90eXBlLmpvaW5gIGV4Y2VwdCBmb3IgU291cmNlTm9kZXMuIEluc2VydHMgYGFTdHJgIGJldHdlZW5cbiAqIGVhY2ggb2YgYHRoaXMuY2hpbGRyZW5gLlxuICpcbiAqIEBwYXJhbSBhU2VwIFRoZSBzZXBhcmF0b3IuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLmpvaW4gPSBmdW5jdGlvbiBTb3VyY2VOb2RlX2pvaW4oYVNlcCkge1xuICB2YXIgbmV3Q2hpbGRyZW47XG4gIHZhciBpO1xuICB2YXIgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7XG4gIGlmIChsZW4gPiAwKSB7XG4gICAgbmV3Q2hpbGRyZW4gPSBbXTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuLTE7IGkrKykge1xuICAgICAgbmV3Q2hpbGRyZW4ucHVzaCh0aGlzLmNoaWxkcmVuW2ldKTtcbiAgICAgIG5ld0NoaWxkcmVuLnB1c2goYVNlcCk7XG4gICAgfVxuICAgIG5ld0NoaWxkcmVuLnB1c2godGhpcy5jaGlsZHJlbltpXSk7XG4gICAgdGhpcy5jaGlsZHJlbiA9IG5ld0NoaWxkcmVuO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBDYWxsIFN0cmluZy5wcm90b3R5cGUucmVwbGFjZSBvbiB0aGUgdmVyeSByaWdodC1tb3N0IHNvdXJjZSBzbmlwcGV0LiBVc2VmdWxcbiAqIGZvciB0cmltbWluZyB3aGl0ZXNwYWNlIGZyb20gdGhlIGVuZCBvZiBhIHNvdXJjZSBub2RlLCBldGMuXG4gKlxuICogQHBhcmFtIGFQYXR0ZXJuIFRoZSBwYXR0ZXJuIHRvIHJlcGxhY2UuXG4gKiBAcGFyYW0gYVJlcGxhY2VtZW50IFRoZSB0aGluZyB0byByZXBsYWNlIHRoZSBwYXR0ZXJuIHdpdGguXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnJlcGxhY2VSaWdodCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfcmVwbGFjZVJpZ2h0KGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpIHtcbiAgdmFyIGxhc3RDaGlsZCA9IHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXTtcbiAgaWYgKGxhc3RDaGlsZFtpc1NvdXJjZU5vZGVdKSB7XG4gICAgbGFzdENoaWxkLnJlcGxhY2VSaWdodChhUGF0dGVybiwgYVJlcGxhY2VtZW50KTtcbiAgfVxuICBlbHNlIGlmICh0eXBlb2YgbGFzdENoaWxkID09PSAnc3RyaW5nJykge1xuICAgIHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXSA9IGxhc3RDaGlsZC5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpO1xuICB9XG4gIGVsc2Uge1xuICAgIHRoaXMuY2hpbGRyZW4ucHVzaCgnJy5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS4gVGhpcyB3aWxsIGJlIGFkZGVkIHRvIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3JcbiAqIGluIHRoZSBzb3VyY2VzQ29udGVudCBmaWVsZC5cbiAqXG4gKiBAcGFyYW0gYVNvdXJjZUZpbGUgVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZVxuICogQHBhcmFtIGFTb3VyY2VDb250ZW50IFRoZSBjb250ZW50IG9mIHRoZSBzb3VyY2UgZmlsZVxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV9zZXRTb3VyY2VDb250ZW50KGFTb3VyY2VGaWxlLCBhU291cmNlQ29udGVudCkge1xuICAgIHRoaXMuc291cmNlQ29udGVudHNbdXRpbC50b1NldFN0cmluZyhhU291cmNlRmlsZSldID0gYVNvdXJjZUNvbnRlbnQ7XG4gIH07XG5cbi8qKlxuICogV2FsayBvdmVyIHRoZSB0cmVlIG9mIFNvdXJjZU5vZGVzLiBUaGUgd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgZm9yIGVhY2hcbiAqIHNvdXJjZSBmaWxlIGNvbnRlbnQgYW5kIGlzIHBhc3NlZCB0aGUgZmlsZW5hbWUgYW5kIHNvdXJjZSBjb250ZW50LlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2Fsa1NvdXJjZUNvbnRlbnRzID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV93YWxrU291cmNlQ29udGVudHMoYUZuKSB7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgIGlmICh0aGlzLmNoaWxkcmVuW2ldW2lzU291cmNlTm9kZV0pIHtcbiAgICAgICAgdGhpcy5jaGlsZHJlbltpXS53YWxrU291cmNlQ29udGVudHMoYUZuKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgc291cmNlcyA9IE9iamVjdC5rZXlzKHRoaXMuc291cmNlQ29udGVudHMpO1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzb3VyY2VzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBhRm4odXRpbC5mcm9tU2V0U3RyaW5nKHNvdXJjZXNbaV0pLCB0aGlzLnNvdXJjZUNvbnRlbnRzW3NvdXJjZXNbaV1dKTtcbiAgICB9XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBzb3VyY2Ugbm9kZS4gV2Fsa3Mgb3ZlciB0aGUgdHJlZVxuICogYW5kIGNvbmNhdGVuYXRlcyBhbGwgdGhlIHZhcmlvdXMgc25pcHBldHMgdG9nZXRoZXIgdG8gb25lIHN0cmluZy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3RvU3RyaW5nKCkge1xuICB2YXIgc3RyID0gXCJcIjtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaykge1xuICAgIHN0ciArPSBjaHVuaztcbiAgfSk7XG4gIHJldHVybiBzdHI7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGlzIHNvdXJjZSBub2RlIGFsb25nIHdpdGggYSBzb3VyY2VcbiAqIG1hcC5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmdXaXRoU291cmNlTWFwID0gZnVuY3Rpb24gU291cmNlTm9kZV90b1N0cmluZ1dpdGhTb3VyY2VNYXAoYUFyZ3MpIHtcbiAgdmFyIGdlbmVyYXRlZCA9IHtcbiAgICBjb2RlOiBcIlwiLFxuICAgIGxpbmU6IDEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHZhciBtYXAgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKTtcbiAgdmFyIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgdmFyIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxMaW5lID0gbnVsbDtcbiAgdmFyIGxhc3RPcmlnaW5hbENvbHVtbiA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxOYW1lID0gbnVsbDtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaywgb3JpZ2luYWwpIHtcbiAgICBnZW5lcmF0ZWQuY29kZSArPSBjaHVuaztcbiAgICBpZiAob3JpZ2luYWwuc291cmNlICE9PSBudWxsXG4gICAgICAgICYmIG9yaWdpbmFsLmxpbmUgIT09IG51bGxcbiAgICAgICAgJiYgb3JpZ2luYWwuY29sdW1uICE9PSBudWxsKSB7XG4gICAgICBpZihsYXN0T3JpZ2luYWxTb3VyY2UgIT09IG9yaWdpbmFsLnNvdXJjZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsTGluZSAhPT0gb3JpZ2luYWwubGluZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsQ29sdW1uICE9PSBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbE5hbWUgIT09IG9yaWdpbmFsLm5hbWUpIHtcbiAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgIHNvdXJjZTogb3JpZ2luYWwuc291cmNlLFxuICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIG5hbWU6IG9yaWdpbmFsLm5hbWVcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBvcmlnaW5hbC5zb3VyY2U7XG4gICAgICBsYXN0T3JpZ2luYWxMaW5lID0gb3JpZ2luYWwubGluZTtcbiAgICAgIGxhc3RPcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgIGxhc3RPcmlnaW5hbE5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IHRydWU7XG4gICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICBtYXAuYWRkTWFwcGluZyh7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgfVxuICAgIGZvciAodmFyIGlkeCA9IDAsIGxlbmd0aCA9IGNodW5rLmxlbmd0aDsgaWR4IDwgbGVuZ3RoOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.js b/node_modules/source-map/dist/source-map.js new file mode 100644 index 0000000..4e630e2 --- /dev/null +++ b/node_modules/source-map/dist/source-map.js @@ -0,0 +1,3090 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.min.js b/node_modules/source-map/dist/source-map.min.js new file mode 100644 index 0000000..f2a46bd --- /dev/null +++ b/node_modules/source-map/dist/source-map.min.js @@ -0,0 +1,2 @@ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;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(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=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){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;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+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/source-map/lib/array-set.js b/node_modules/source-map/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/node_modules/source-map/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/node_modules/source-map/lib/base64-vlq.js b/node_modules/source-map/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/node_modules/source-map/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/node_modules/source-map/lib/base64.js b/node_modules/source-map/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/node_modules/source-map/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/node_modules/source-map/lib/binary-search.js b/node_modules/source-map/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/node_modules/source-map/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/node_modules/source-map/lib/mapping-list.js b/node_modules/source-map/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/node_modules/source-map/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/node_modules/source-map/lib/quick-sort.js b/node_modules/source-map/lib/quick-sort.js new file mode 100644 index 0000000..6a7caad --- /dev/null +++ b/node_modules/source-map/lib/quick-sort.js @@ -0,0 +1,114 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; diff --git a/node_modules/source-map/lib/source-map-consumer.js b/node_modules/source-map/lib/source-map-consumer.js new file mode 100644 index 0000000..6abcc28 --- /dev/null +++ b/node_modules/source-map/lib/source-map-consumer.js @@ -0,0 +1,1082 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap) + : new BasicSourceMapConsumer(sourceMap); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: Optional. the column number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + if (!this._sources.has(needle.source)) { + return []; + } + needle.source = this._sources.indexOf(needle.source); + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + if (this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + if (this.sourceRoot != null) { + source = util.relative(this.sourceRoot, source); + } + if (!this._sources.has(source)) { + return { + line: null, + column: null, + lastColumn: null + }; + } + source = this._sources.indexOf(source); + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if (section.consumer.sourceRoot !== null) { + source = util.join(section.consumer.sourceRoot, source); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map/lib/source-map-generator.js b/node_modules/source-map/lib/source-map-generator.js new file mode 100644 index 0000000..aff1e7f --- /dev/null +++ b/node_modules/source-map/lib/source-map-generator.js @@ -0,0 +1,416 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map/lib/source-node.js b/node_modules/source-map/lib/source-node.js new file mode 100644 index 0000000..d196a53 --- /dev/null +++ b/node_modules/source-map/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/node_modules/source-map/lib/util.js b/node_modules/source-map/lib/util.js new file mode 100644 index 0000000..44e0e45 --- /dev/null +++ b/node_modules/source-map/lib/util.js @@ -0,0 +1,417 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +} +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = mappingA.source - mappingB.source; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return mappingA.name - mappingB.name; +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/node_modules/source-map/package.json b/node_modules/source-map/package.json new file mode 100644 index 0000000..6efc539 --- /dev/null +++ b/node_modules/source-map/package.json @@ -0,0 +1,211 @@ +{ + "_from": "source-map@^0.5.6", + "_id": "source-map@0.5.7", + "_inBundle": false, + "_integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "_location": "/source-map", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "source-map@^0.5.6", + "name": "source-map", + "escapedName": "source-map", + "rawSpec": "^0.5.6", + "saveSpec": null, + "fetchSpec": "^0.5.6" + }, + "_requiredBy": [ + "/snapdragon" + ], + "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "_shasum": "8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc", + "_spec": "source-map@^0.5.6", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/snapdragon", + "author": { + "name": "Nick Fitzgerald", + "email": "nfitzgerald@mozilla.com" + }, + "bugs": { + "url": "https://github.com/mozilla/source-map/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Tobias Koppers", + "email": "tobias.koppers@googlemail.com" + }, + { + "name": "Duncan Beevers", + "email": "duncan@dweebd.com" + }, + { + "name": "Stephen Crane", + "email": "scrane@mozilla.com" + }, + { + "name": "Ryan Seddon", + "email": "seddon.ryan@gmail.com" + }, + { + "name": "Miles Elam", + "email": "miles.elam@deem.com" + }, + { + "name": "Mihai Bazon", + "email": "mihai.bazon@gmail.com" + }, + { + "name": "Michael Ficarra", + "email": "github.public.email@michael.ficarra.me" + }, + { + "name": "Todd Wolfson", + "email": "todd@twolfson.com" + }, + { + "name": "Alexander Solovyov", + "email": "alexander@solovyov.net" + }, + { + "name": "Felix Gnass", + "email": "fgnass@gmail.com" + }, + { + "name": "Conrad Irwin", + "email": "conrad.irwin@gmail.com" + }, + { + "name": "usrbincc", + "email": "usrbincc@yahoo.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Chase Douglas", + "email": "chase@newrelic.com" + }, + { + "name": "Evan Wallace", + "email": "evan.exe@gmail.com" + }, + { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Simon Lydell", + "email": "simon.lydell@gmail.com" + }, + { + "name": "Jmeas Smith", + "email": "jellyes2@gmail.com" + }, + { + "name": "Michael Z Goddard", + "email": "mzgoddard@gmail.com" + }, + { + "name": "azu", + "email": "azu@users.noreply.github.com" + }, + { + "name": "John Gozde", + "email": "john@gozde.ca" + }, + { + "name": "Adam Kirkton", + "email": "akirkton@truefitinnovation.com" + }, + { + "name": "Chris Montgomery", + "email": "christopher.montgomery@dowjones.com" + }, + { + "name": "J. Ryan Stinnett", + "email": "jryans@gmail.com" + }, + { + "name": "Jack Herrington", + "email": "jherrington@walmartlabs.com" + }, + { + "name": "Chris Truter", + "email": "jeffpalentine@gmail.com" + }, + { + "name": "Daniel Espeset", + "email": "daniel@danielespeset.com" + }, + { + "name": "Jamie Wong", + "email": "jamie.lf.wong@gmail.com" + }, + { + "name": "Eddy Bruël", + "email": "ejpbruel@mozilla.com" + }, + { + "name": "Hawken Rives", + "email": "hawkrives@gmail.com" + }, + { + "name": "Gilad Peleg", + "email": "giladp007@gmail.com" + }, + { + "name": "djchie", + "email": "djchie.dev@gmail.com" + }, + { + "name": "Gary Ye", + "email": "garysye@gmail.com" + }, + { + "name": "Nicolas Lalevée", + "email": "nicolas.lalevee@hibnet.org" + } + ], + "deprecated": false, + "description": "Generates and consumes source maps", + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "source-map.js", + "lib/", + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map" + ], + "homepage": "https://github.com/mozilla/source-map", + "license": "BSD-3-Clause", + "main": "./source-map.js", + "name": "source-map", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/mozilla/source-map.git" + }, + "scripts": { + "build": "webpack --color", + "test": "npm run build && node test/run-tests.js", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "typings": "source-map", + "version": "0.5.7" +} diff --git a/node_modules/source-map/source-map.js b/node_modules/source-map/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/node_modules/source-map/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/spdx-correct/LICENSE b/node_modules/spdx-correct/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/spdx-correct/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/spdx-correct/README.md b/node_modules/spdx-correct/README.md new file mode 100644 index 0000000..4169e61 --- /dev/null +++ b/node_modules/spdx-correct/README.md @@ -0,0 +1,10 @@ +```javascript +var correct = require('spdx-correct') +var assert = require('assert') + +assert.equal(correct('mit'), 'MIT') + +assert.equal(correct('Apache 2'), 'Apache-2.0') + +assert(correct('No idea what license') === null) +``` diff --git a/node_modules/spdx-correct/index.js b/node_modules/spdx-correct/index.js new file mode 100644 index 0000000..a5ff877 --- /dev/null +++ b/node_modules/spdx-correct/index.js @@ -0,0 +1,326 @@ +/* +Copyright 2015 Kyle E. Mitchell + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +var parse = require('spdx-expression-parse') +var spdxLicenseIds = require('spdx-license-ids') + +function valid (string) { + try { + parse(string) + return true + } catch (error) { + return false + } +} + +// Common transpositions of license identifier acronyms +var transpositions = [ + ['APGL', 'AGPL'], + ['Gpl', 'GPL'], + ['GLP', 'GPL'], + ['APL', 'Apache'], + ['ISD', 'ISC'], + ['GLP', 'GPL'], + ['IST', 'ISC'], + ['Claude', 'Clause'], + [' or later', '+'], + [' International', ''], + ['GNU', 'GPL'], + ['GUN', 'GPL'], + ['+', ''], + ['GNU GPL', 'GPL'], + ['GNU/GPL', 'GPL'], + ['GNU GLP', 'GPL'], + ['GNU General Public License', 'GPL'], + ['Gnu public license', 'GPL'], + ['GNU Public License', 'GPL'], + ['GNU GENERAL PUBLIC LICENSE', 'GPL'], + ['MTI', 'MIT'], + ['Mozilla Public License', 'MPL'], + ['WTH', 'WTF'], + ['-License', ''] +] + +var TRANSPOSED = 0 +var CORRECT = 1 + +// Simple corrections to nearly valid identifiers. +var transforms = [ + // e.g. 'mit' + function (argument) { + return argument.toUpperCase() + }, + // e.g. 'MIT ' + function (argument) { + return argument.trim() + }, + // e.g. 'M.I.T.' + function (argument) { + return argument.replace(/\./g, '') + }, + // e.g. 'Apache- 2.0' + function (argument) { + return argument.replace(/\s+/g, '') + }, + // e.g. 'CC BY 4.0'' + function (argument) { + return argument.replace(/\s+/g, '-') + }, + // e.g. 'LGPLv2.1' + function (argument) { + return argument.replace('v', '-') + }, + // e.g. 'Apache 2.0' + function (argument) { + return argument.replace(/,?\s*(\d)/, '-$1') + }, + // e.g. 'GPL 2' + function (argument) { + return argument.replace(/,?\s*(\d)/, '-$1.0') + }, + // e.g. 'Apache Version 2.0' + function (argument) { + return argument + .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2') + }, + // e.g. 'Apache Version 2' + function (argument) { + return argument + .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0') + }, + // e.g. 'ZLIB' + function (argument) { + return argument[0].toUpperCase() + argument.slice(1) + }, + // e.g. 'MPL/2.0' + function (argument) { + return argument.replace('/', '-') + }, + // e.g. 'Apache 2' + function (argument) { + return argument + .replace(/\s*V\s*(\d)/, '-$1') + .replace(/(\d)$/, '$1.0') + }, + // e.g. 'GPL-2.0', 'GPL-3.0' + function (argument) { + if (argument.indexOf('3.0') !== -1) { + return argument + '-or-later' + } else { + return argument + '-only' + } + }, + // e.g. 'GPL-2.0-' + function (argument) { + return argument + 'only' + }, + // e.g. 'GPL2' + function (argument) { + return argument.replace(/(\d)$/, '-$1.0') + }, + // e.g. 'BSD 3' + function (argument) { + return argument.replace(/(-| )?(\d)$/, '-$2-Clause') + }, + // e.g. 'BSD clause 3' + function (argument) { + return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause') + }, + // e.g. 'BY-NC-4.0' + function (argument) { + return 'CC-' + argument + }, + // e.g. 'BY-NC' + function (argument) { + return 'CC-' + argument + '-4.0' + }, + // e.g. 'Attribution-NonCommercial' + function (argument) { + return argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, '') + }, + // e.g. 'Attribution-NonCommercial' + function (argument) { + return 'CC-' + + argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, '') + + '-4.0' + } +] + +var licensesWithVersions = spdxLicenseIds + .map(function (id) { + var match = /^(.*)-\d+\.\d+$/.exec(id) + return match + ? [match[0], match[1]] + : [id, null] + }) + .reduce(function (objectMap, item) { + var key = item[1] + objectMap[key] = objectMap[key] || [] + objectMap[key].push(item[0]) + return objectMap + }, {}) + +var licensesWithOneVersion = Object.keys(licensesWithVersions) + .map(function makeEntries (key) { + return [key, licensesWithVersions[key]] + }) + .filter(function identifySoleVersions (item) { + return ( + // Licenses has just one valid version suffix. + item[1].length === 1 && + item[0] !== null && + // APL will be considered Apache, rather than APL-1.0 + item[0] !== 'APL' + ) + }) + .map(function createLastResorts (item) { + return [item[0], item[1][0]] + }) + +licensesWithVersions = undefined + +// If all else fails, guess that strings containing certain substrings +// meant to identify certain licenses. +var lastResorts = [ + ['UNLI', 'Unlicense'], + ['WTF', 'WTFPL'], + ['2 CLAUSE', 'BSD-2-Clause'], + ['2-CLAUSE', 'BSD-2-Clause'], + ['3 CLAUSE', 'BSD-3-Clause'], + ['3-CLAUSE', 'BSD-3-Clause'], + ['AFFERO', 'AGPL-3.0-or-later'], + ['AGPL', 'AGPL-3.0-or-later'], + ['APACHE', 'Apache-2.0'], + ['ARTISTIC', 'Artistic-2.0'], + ['Affero', 'AGPL-3.0-or-later'], + ['BEER', 'Beerware'], + ['BOOST', 'BSL-1.0'], + ['BSD', 'BSD-2-Clause'], + ['CDDL', 'CDDL-1.1'], + ['ECLIPSE', 'EPL-1.0'], + ['FUCK', 'WTFPL'], + ['GNU', 'GPL-3.0-or-later'], + ['LGPL', 'LGPL-3.0-or-later'], + ['GPLV1', 'GPL-1.0-only'], + ['GPLV2', 'GPL-2.0-only'], + ['GPL', 'GPL-3.0-or-later'], + ['MIT +NO-FALSE-ATTRIBS', 'MITNFA'], + ['MIT', 'MIT'], + ['MPL', 'MPL-2.0'], + ['X11', 'X11'], + ['ZLIB', 'Zlib'] +].concat(licensesWithOneVersion) + +var SUBSTRING = 0 +var IDENTIFIER = 1 + +var validTransformation = function (identifier) { + for (var i = 0; i < transforms.length; i++) { + var transformed = transforms[i](identifier).trim() + if (transformed !== identifier && valid(transformed)) { + return transformed + } + } + return null +} + +var validLastResort = function (identifier) { + var upperCased = identifier.toUpperCase() + for (var i = 0; i < lastResorts.length; i++) { + var lastResort = lastResorts[i] + if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { + return lastResort[IDENTIFIER] + } + } + return null +} + +var anyCorrection = function (identifier, check) { + for (var i = 0; i < transpositions.length; i++) { + var transposition = transpositions[i] + var transposed = transposition[TRANSPOSED] + if (identifier.indexOf(transposed) > -1) { + var corrected = identifier.replace( + transposed, + transposition[CORRECT] + ) + var checked = check(corrected) + if (checked !== null) { + return checked + } + } + } + return null +} + +module.exports = function (identifier) { + var validArugment = ( + typeof identifier === 'string' && + identifier.trim().length !== 0 + ) + if (!validArugment) { + throw Error('Invalid argument. Expected non-empty string.') + } + identifier = identifier.replace(/\+$/, '').trim() + if (valid(identifier)) { + return upgradeGPLs(identifier) + } + var transformed = validTransformation(identifier) + if (transformed !== null) { + return upgradeGPLs(transformed) + } + transformed = anyCorrection(identifier, function (argument) { + if (valid(argument)) { + return argument + } + return validTransformation(argument) + }) + if (transformed !== null) { + return upgradeGPLs(transformed) + } + transformed = validLastResort(identifier) + if (transformed !== null) { + return upgradeGPLs(transformed) + } + transformed = anyCorrection(identifier, validLastResort) + if (transformed !== null) { + return upgradeGPLs(transformed) + } + return null +} + +function upgradeGPLs (value) { + if ([ + 'GPL-1.0', 'LGPL-1.0', 'AGPL-1.0', + 'GPL-2.0', 'LGPL-2.0', 'AGPL-2.0', + 'LGPL-2.1' + ].indexOf(value) !== -1) { + return value + '-only' + } else if (['GPL-3.0', 'LGPL-3.0', 'AGPL-3.0'].indexOf(value) !== -1) { + return value + '-or-later' + } else { + return value + } +} diff --git a/node_modules/spdx-correct/package.json b/node_modules/spdx-correct/package.json new file mode 100644 index 0000000..aecf7f9 --- /dev/null +++ b/node_modules/spdx-correct/package.json @@ -0,0 +1,80 @@ +{ + "_from": "spdx-correct@^3.0.0", + "_id": "spdx-correct@3.0.0", + "_inBundle": false, + "_integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "_location": "/spdx-correct", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "spdx-correct@^3.0.0", + "name": "spdx-correct", + "escapedName": "spdx-correct", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/validate-npm-package-license" + ], + "_resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "_shasum": "05a5b4d7153a195bc92c3c425b69f3b2a9524c82", + "_spec": "spdx-correct@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/validate-npm-package-license", + "author": { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "https://kemitchell.com" + }, + "bugs": { + "url": "https://github.com/jslicense/spdx-correct.js/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "https://kemitchell.com" + }, + { + "name": "Christian Zommerfelds", + "email": "aero_super@yahoo.com" + } + ], + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + }, + "deprecated": false, + "description": "correct invalid SPDX expressions", + "devDependencies": { + "defence-cli": "^2.0.1", + "replace-require-self": "^1.0.0", + "standard": "^11.0.0", + "standard-markdown": "^4.0.2", + "tape": "^4.9.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jslicense/spdx-correct.js#readme", + "keywords": [ + "SPDX", + "law", + "legal", + "license", + "metadata" + ], + "license": "Apache-2.0", + "name": "spdx-correct", + "repository": { + "type": "git", + "url": "git+https://github.com/jslicense/spdx-correct.js.git" + }, + "scripts": { + "lint": "standard && standard-markdown", + "test": "defence README.md | replace-require-self | node && node test.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/spdx-exceptions/README.md b/node_modules/spdx-exceptions/README.md new file mode 100644 index 0000000..6c927ec --- /dev/null +++ b/node_modules/spdx-exceptions/README.md @@ -0,0 +1,36 @@ +The package exports an array of strings. Each string is an identifier +for a license exception under the [Software Package Data Exchange +(SPDX)][SPDX] software license metadata standard. + +[SPDX]: https://spdx.org + +## Copyright and Licensing + +### SPDX + +"SPDX" is a federally registered United States trademark of The Linux +Foundation Corporation. + +From version 2.0 of the [SPDX] specification: + +> Copyright © 2010-2015 Linux Foundation and its Contributors. Licensed +> under the Creative Commons Attribution License 3.0 Unported. All other +> rights are expressly reserved. + +The Linux Foundation and the SPDX working groups are good people. Only +they decide what "SPDX" means, as a standard and otherwise. I respect +their work and their rights. You should, too. + +### This Package + +> I created this package by copying exception identifiers out of the +> SPDX specification. That work was mechanical, routine, and required no +> creativity whatsoever. - Kyle Mitchell, package author + +United States users concerned about intellectual property may wish to +discuss the following Supreme Court decisions with their attorneys: + +- _Baker v. Selden_, 101 U.S. 99 (1879) + +- _Feist Publications, Inc., v. Rural Telephone Service Co._, + 499 U.S. 340 (1991) diff --git a/node_modules/spdx-exceptions/index.json b/node_modules/spdx-exceptions/index.json new file mode 100644 index 0000000..6981ce3 --- /dev/null +++ b/node_modules/spdx-exceptions/index.json @@ -0,0 +1,29 @@ +[ + "389-exception", + "Autoconf-exception-2.0", + "Autoconf-exception-3.0", + "Bison-exception-2.2", + "Bootloader-exception", + "CLISP-exception-2.0", + "Classpath-exception-2.0", + "DigiRule-FOSS-exception", + "FLTK-exception", + "Fawkes-Runtime-exception", + "Font-exception-2.0", + "GCC-exception-2.0", + "GCC-exception-3.1", + "LZMA-exception", + "Libtool-exception", + "Linux-syscall-note", + "Nokia-Qt-exception-1.1", + "OCCT-exception-1.0", + "Qwt-exception-1.0", + "WxWindows-exception-3.1", + "eCos-exception-2.0", + "freertos-exception-2.0", + "gnu-javamail-exception", + "i2p-gpl-java-exception", + "mif-exception", + "openvpn-openssl-exception", + "u-boot-exception-2.0" +] diff --git a/node_modules/spdx-exceptions/package.json b/node_modules/spdx-exceptions/package.json new file mode 100644 index 0000000..fab19ac --- /dev/null +++ b/node_modules/spdx-exceptions/package.json @@ -0,0 +1,49 @@ +{ + "_from": "spdx-exceptions@^2.1.0", + "_id": "spdx-exceptions@2.1.0", + "_inBundle": false, + "_integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "_location": "/spdx-exceptions", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "spdx-exceptions@^2.1.0", + "name": "spdx-exceptions", + "escapedName": "spdx-exceptions", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/spdx-expression-parse" + ], + "_resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "_shasum": "2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9", + "_spec": "spdx-exceptions@^2.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/spdx-expression-parse", + "author": { + "name": "The Linux Foundation" + }, + "bugs": { + "url": "https://github.com/kemitchell/spdx-exceptions.json/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "https://kemitchell.com/" + } + ], + "deprecated": false, + "description": "list of SPDX standard license exceptions", + "homepage": "https://github.com/kemitchell/spdx-exceptions.json#readme", + "license": "CC-BY-3.0", + "name": "spdx-exceptions", + "repository": { + "type": "git", + "url": "git+https://github.com/kemitchell/spdx-exceptions.json.git" + }, + "version": "2.1.0" +} diff --git a/node_modules/spdx-expression-parse/AUTHORS b/node_modules/spdx-expression-parse/AUTHORS new file mode 100644 index 0000000..257a76b --- /dev/null +++ b/node_modules/spdx-expression-parse/AUTHORS @@ -0,0 +1,4 @@ +C. Scott Ananian (http://cscott.net) +Kyle E. Mitchell (https://kemitchell.com) +Shinnosuke Watanabe +Antoine Motet diff --git a/node_modules/spdx-expression-parse/LICENSE b/node_modules/spdx-expression-parse/LICENSE new file mode 100644 index 0000000..831618e --- /dev/null +++ b/node_modules/spdx-expression-parse/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal 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/node_modules/spdx-expression-parse/README.md b/node_modules/spdx-expression-parse/README.md new file mode 100644 index 0000000..514895b --- /dev/null +++ b/node_modules/spdx-expression-parse/README.md @@ -0,0 +1,91 @@ +This package parses [SPDX license expression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60) strings describing license terms, like [package.json license strings](https://docs.npmjs.com/files/package.json#license), into consistently structured ECMAScript objects. The npm command-line interface depends on this package, as do many automatic license-audit tools. + +In a nutshell: + +```javascript +var parse = require('spdx-expression-parse') +var assert = require('assert') + +assert.deepEqual( + // Licensed under the terms of the Two-Clause BSD License. + parse('BSD-2-Clause'), + {license: 'BSD-2-Clause'} +) + +assert.throws(function () { + // An invalid SPDX license expression. + // Should be `Apache-2.0`. + parse('Apache 2') +}) + +assert.deepEqual( + // Dual licensed under either: + // - LGPL 2.1 + // - a combination of Three-Clause BSD and MIT + parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'), + { + left: {license: 'LGPL-2.1'}, + conjunction: 'or', + right: { + left: {license: 'BSD-3-Clause'}, + conjunction: 'and', + right: {license: 'MIT'} + } + } +) +``` + +The syntax comes from the [Software Package Data eXchange (SPDX)](https://spdx.org/), a standard from the [Linux Foundation](https://www.linuxfoundation.org) for shareable data about software package license terms. SPDX aims to make sharing and auditing license data easy, especially for users of open-source software. + +The bulk of the SPDX standard describes syntax and semantics of XML metadata files. This package implements two lightweight, plain-text components of that larger standard: + +1. The [license list](https://spdx.org/licenses), a mapping from specific string identifiers, like `Apache-2.0`, to standard form license texts and bolt-on license exceptions. The [spdx-license-ids](https://www.npmjs.com/package/spdx-exceptions) and [spdx-exceptions](https://www.npmjs.com/package/spdx-license-ids) packages implement the license list. `spdx-expression-parse` depends on and `require()`s them. + + Any license identifier from the license list is a valid license expression: + + ```javascript + var identifiers = [] + .concat(require('spdx-license-ids')) + .concat(require('spdx-license-ids/deprecated')) + + identifiers.forEach(function (id) { + assert.deepEqual(parse(id), {license: id}) + }) + ``` + + So is any license identifier `WITH` a standardized license exception: + + ```javascript + identifiers.forEach(function (id) { + require('spdx-exceptions').forEach(function (e) { + assert.deepEqual( + parse(id + ' WITH ' + e), + {license: id, exception: e} + ) + }) + }) + ``` + +2. The license expression language, for describing simple and complex license terms, like `MIT` for MIT-licensed and `(GPL-2.0 OR Apache-2.0)` for dual-licensing under GPL 2.0 and Apache 2.0. `spdx-expression-parse` itself implements license expression language, exporting a parser. + + ```javascript + assert.deepEqual( + // Licensed under a combination of: + // - the MIT License AND + // - a combination of: + // - LGPL 2.1 (or a later version) AND + // - Three-Clause BSD + parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'), + { + left: {license: 'MIT'}, + conjunction: 'and', + right: { + left: {license: 'LGPL-2.1', plus: true}, + conjunction: 'and', + right: {license: 'BSD-3-Clause'} + } + } + ) + ``` + +The Linux Foundation and its contributors license the SPDX standard under the terms of [the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0")](http://spdx.org/licenses/CC-BY-3.0). "SPDX" is a United States federally registered trademark of the Linux Foundation. The authors of this package license their work under the terms of the MIT License. diff --git a/node_modules/spdx-expression-parse/index.js b/node_modules/spdx-expression-parse/index.js new file mode 100644 index 0000000..52fab56 --- /dev/null +++ b/node_modules/spdx-expression-parse/index.js @@ -0,0 +1,8 @@ +'use strict' + +var scan = require('./scan') +var parse = require('./parse') + +module.exports = function (source) { + return parse(scan(source)) +} diff --git a/node_modules/spdx-expression-parse/package.json b/node_modules/spdx-expression-parse/package.json new file mode 100644 index 0000000..1e28433 --- /dev/null +++ b/node_modules/spdx-expression-parse/package.json @@ -0,0 +1,97 @@ +{ + "_from": "spdx-expression-parse@^3.0.0", + "_id": "spdx-expression-parse@3.0.0", + "_inBundle": false, + "_integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "_location": "/spdx-expression-parse", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "spdx-expression-parse@^3.0.0", + "name": "spdx-expression-parse", + "escapedName": "spdx-expression-parse", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/spdx-correct", + "/validate-npm-package-license" + ], + "_resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "_shasum": "99e119b7a5da00e05491c9fa338b7904823b41d0", + "_spec": "spdx-expression-parse@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/validate-npm-package-license", + "author": { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "http://kemitchell.com" + }, + "bugs": { + "url": "https://github.com/jslicense/spdx-expression-parse.js/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "C. Scott Ananian", + "email": "cscott@cscott.net", + "url": "http://cscott.net" + }, + { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "https://kemitchell.com" + }, + { + "name": "Shinnosuke Watanabe", + "email": "snnskwtnb@gmail.com" + }, + { + "name": "Antoine Motet", + "email": "antoine.motet@gmail.com" + } + ], + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + }, + "deprecated": false, + "description": "parse SPDX license expressions", + "devDependencies": { + "defence-cli": "^2.0.1", + "mocha": "^3.4.2", + "replace-require-self": "^1.0.0", + "standard": "^10.0.2" + }, + "files": [ + "AUTHORS", + "index.js", + "parse.js", + "scan.js" + ], + "homepage": "https://github.com/jslicense/spdx-expression-parse.js#readme", + "keywords": [ + "SPDX", + "law", + "legal", + "license", + "metadata", + "package", + "package.json", + "standards" + ], + "license": "MIT", + "name": "spdx-expression-parse", + "repository": { + "type": "git", + "url": "git+https://github.com/jslicense/spdx-expression-parse.js.git" + }, + "scripts": { + "lint": "standard", + "test": "npm run test:mocha && npm run test:readme", + "test:mocha": "mocha test/index.js", + "test:readme": "defence -i javascript README.md | replace-require-self | node" + }, + "version": "3.0.0" +} diff --git a/node_modules/spdx-expression-parse/parse.js b/node_modules/spdx-expression-parse/parse.js new file mode 100644 index 0000000..a4a52ce --- /dev/null +++ b/node_modules/spdx-expression-parse/parse.js @@ -0,0 +1,138 @@ +'use strict' + +// The ABNF grammar in the spec is totally ambiguous. +// +// This parser follows the operator precedence defined in the +// `Order of Precedence and Parentheses` section. + +module.exports = function (tokens) { + var index = 0 + + function hasMore () { + return index < tokens.length + } + + function token () { + return hasMore() ? tokens[index] : null + } + + function next () { + if (!hasMore()) { + throw new Error() + } + index++ + } + + function parseOperator (operator) { + var t = token() + if (t && t.type === 'OPERATOR' && operator === t.string) { + next() + return t.string + } + } + + function parseWith () { + if (parseOperator('WITH')) { + var t = token() + if (t && t.type === 'EXCEPTION') { + next() + return t.string + } + throw new Error('Expected exception after `WITH`') + } + } + + function parseLicenseRef () { + // TODO: Actually, everything is concatenated into one string + // for backward-compatibility but it could be better to return + // a nice structure. + var begin = index + var string = '' + var t = token() + if (t.type === 'DOCUMENTREF') { + next() + string += 'DocumentRef-' + t.string + ':' + if (!parseOperator(':')) { + throw new Error('Expected `:` after `DocumentRef-...`') + } + } + t = token() + if (t.type === 'LICENSEREF') { + next() + string += 'LicenseRef-' + t.string + return {license: string} + } + index = begin + } + + function parseLicense () { + var t = token() + if (t && t.type === 'LICENSE') { + next() + var node = {license: t.string} + if (parseOperator('+')) { + node.plus = true + } + var exception = parseWith() + if (exception) { + node.exception = exception + } + return node + } + } + + function parseParenthesizedExpression () { + var left = parseOperator('(') + if (!left) { + return + } + + var expr = parseExpression() + + if (!parseOperator(')')) { + throw new Error('Expected `)`') + } + + return expr + } + + function parseAtom () { + return ( + parseParenthesizedExpression() || + parseLicenseRef() || + parseLicense() + ) + } + + function makeBinaryOpParser (operator, nextParser) { + return function parseBinaryOp () { + var left = nextParser() + if (!left) { + return + } + + if (!parseOperator(operator)) { + return left + } + + var right = parseBinaryOp() + if (!right) { + throw new Error('Expected expression') + } + return { + left: left, + conjunction: operator.toLowerCase(), + right: right + } + } + } + + var parseAnd = makeBinaryOpParser('AND', parseAtom) + var parseExpression = makeBinaryOpParser('OR', parseAnd) + + var node = parseExpression() + if (!node || hasMore()) { + throw new Error('Syntax error') + } + return node +} diff --git a/node_modules/spdx-expression-parse/scan.js b/node_modules/spdx-expression-parse/scan.js new file mode 100644 index 0000000..d0567f4 --- /dev/null +++ b/node_modules/spdx-expression-parse/scan.js @@ -0,0 +1,131 @@ +'use strict' + +var licenses = [] + .concat(require('spdx-license-ids')) + .concat(require('spdx-license-ids/deprecated')) +var exceptions = require('spdx-exceptions') + +module.exports = function (source) { + var index = 0 + + function hasMore () { + return index < source.length + } + + // `value` can be a regexp or a string. + // If it is recognized, the matching source string is returned and + // the index is incremented. Otherwise `undefined` is returned. + function read (value) { + if (value instanceof RegExp) { + var chars = source.slice(index) + var match = chars.match(value) + if (match) { + index += match[0].length + return match[0] + } + } else { + if (source.indexOf(value, index) === index) { + index += value.length + return value + } + } + } + + function skipWhitespace () { + read(/[ ]*/) + } + + function operator () { + var string + var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+'] + for (var i = 0; i < possibilities.length; i++) { + string = read(possibilities[i]) + if (string) { + break + } + } + + if (string === '+' && index > 1 && source[index - 2] === ' ') { + throw new Error('Space before `+`') + } + + return string && { + type: 'OPERATOR', + string: string + } + } + + function idstring () { + return read(/[A-Za-z0-9-.]+/) + } + + function expectIdstring () { + var string = idstring() + if (!string) { + throw new Error('Expected idstring at offset ' + index) + } + return string + } + + function documentRef () { + if (read('DocumentRef-')) { + var string = expectIdstring() + return {type: 'DOCUMENTREF', string: string} + } + } + + function licenseRef () { + if (read('LicenseRef-')) { + var string = expectIdstring() + return {type: 'LICENSEREF', string: string} + } + } + + function identifier () { + var begin = index + var string = idstring() + + if (licenses.indexOf(string) !== -1) { + return { + type: 'LICENSE', + string: string + } + } else if (exceptions.indexOf(string) !== -1) { + return { + type: 'EXCEPTION', + string: string + } + } + + index = begin + } + + // Tries to read the next token. Returns `undefined` if no token is + // recognized. + function parseToken () { + // Ordering matters + return ( + operator() || + documentRef() || + licenseRef() || + identifier() + ) + } + + var tokens = [] + while (hasMore()) { + skipWhitespace() + if (!hasMore()) { + break + } + + var token = parseToken() + if (!token) { + throw new Error('Unexpected `' + source[index] + + '` at offset ' + index) + } + + tokens.push(token) + } + return tokens +} diff --git a/node_modules/spdx-license-ids/README.md b/node_modules/spdx-license-ids/README.md new file mode 100644 index 0000000..09b080c --- /dev/null +++ b/node_modules/spdx-license-ids/README.md @@ -0,0 +1,52 @@ +# spdx-license-ids + +[![npm version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.org/package/spdx-license-ids) +[![Build Status](https://travis-ci.org/shinnn/spdx-license-ids.svg?branch=master)](https://travis-ci.org/shinnn/spdx-license-ids) + +A list of [SPDX license](https://spdx.org/licenses/) identifiers + +## Installation + +[Download JSON directly](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm): + +``` +npm install spdx-license-ids +``` + +## [Node.js](https://nodejs.org/) API + +### require('spdx-license-ids') + +Type: `>` + +All license IDs except for the currently deprecated ones. + +```javascript +const ids = require('spdx-license-ids'); +//=> ['0BSD', 'AAL', 'Abstyles', 'Adobe-2006', 'Adobe-Glyph', 'ADSL', 'AFL-1.1', ...] + +ids.includes('BSD-3-Clause'); //=> true +ids.includes('CC-BY-1.0'); //=> true + +ids.includes('GPL-3.0'); //=> false +``` + +### require('spdx-license-ids/deprecated') + +Type: `>` + +Deprecated license IDs. + +```javascript +const deprecatedIds = require('spdx-license-ids/deprecated'); +//=> ['AGPL-3.0', 'eCos-2.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', ...] + +deprecatedIds.includes('BSD-3-Clause'); //=> false +deprecatedIds.includes('CC-BY-1.0'); //=> false + +deprecatedIds.includes('GPL-3.0'); //=> true +``` + +## License + +[Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed) diff --git a/node_modules/spdx-license-ids/deprecated.json b/node_modules/spdx-license-ids/deprecated.json new file mode 100644 index 0000000..2e40ab7 --- /dev/null +++ b/node_modules/spdx-license-ids/deprecated.json @@ -0,0 +1,23 @@ +[ + "AGPL-3.0", + "eCos-2.0", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-2.0-with-autoconf-exception", + "GPL-2.0-with-bison-exception", + "GPL-2.0-with-classpath-exception", + "GPL-2.0-with-font-exception", + "GPL-2.0-with-GCC-exception", + "GPL-2.0", + "GPL-3.0-with-autoconf-exception", + "GPL-3.0-with-GCC-exception", + "GPL-3.0", + "LGPL-2.0", + "LGPL-2.1", + "LGPL-3.0", + "Nunit", + "StandardML-NJ", + "wxWindows" +] diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json new file mode 100644 index 0000000..d383fcc --- /dev/null +++ b/node_modules/spdx-license-ids/index.json @@ -0,0 +1,344 @@ +[ + "0BSD", + "AAL", + "Abstyles", + "Adobe-2006", + "Adobe-Glyph", + "ADSL", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "Afmparse", + "AGPL-1.0", + "AGPL-3.0-only", + "AGPL-3.0-or-later", + "Aladdin", + "AMDPLPA", + "AML", + "AMPAS", + "ANTLR-PD", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "APAFML", + "APL-1.0", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "Artistic-1.0-cl8", + "Artistic-1.0-Perl", + "Artistic-1.0", + "Artistic-2.0", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "Borceux", + "BSD-1-Clause", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "BSD-2-Clause-Patent", + "BSD-2-Clause", + "BSD-3-Clause-Attribution", + "BSD-3-Clause-Clear", + "BSD-3-Clause-LBNL", + "BSD-3-Clause-No-Nuclear-License-2014", + "BSD-3-Clause-No-Nuclear-License", + "BSD-3-Clause-No-Nuclear-Warranty", + "BSD-3-Clause", + "BSD-4-Clause-UC", + "BSD-4-Clause", + "BSD-Protection", + "BSD-Source-Code", + "BSL-1.0", + "bzip2-1.0.5", + "bzip2-1.0.6", + "Caldera", + "CATOSL-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-3.0", + "CC-BY-4.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-4.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-4.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-4.0", + "CC0-1.0", + "CDDL-1.0", + "CDDL-1.1", + "CDLA-Permissive-1.0", + "CDLA-Sharing-1.0", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-2.1", + "CECILL-B", + "CECILL-C", + "ClArtistic", + "CNRI-Jython", + "CNRI-Python-GPL-Compatible", + "CNRI-Python", + "Condor-1.1", + "CPAL-1.0", + "CPL-1.0", + "CPOL-1.02", + "Crossword", + "CrystalStacker", + "CUA-OPL-1.0", + "Cube", + "curl", + "D-FSL-1.0", + "diffmark", + "DOC", + "Dotseqn", + "DSDP", + "dvipdfm", + "ECL-1.0", + "ECL-2.0", + "EFL-1.0", + "EFL-2.0", + "eGenix", + "Entessa", + "EPL-1.0", + "EPL-2.0", + "ErlPL-1.1", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "EUPL-1.2", + "Eurosym", + "Fair", + "Frameworx-1.0", + "FreeImage", + "FSFAP", + "FSFUL", + "FSFULLR", + "FTL", + "GFDL-1.1-only", + "GFDL-1.1-or-later", + "GFDL-1.2-only", + "GFDL-1.2-or-later", + "GFDL-1.3-only", + "GFDL-1.3-or-later", + "Giftware", + "GL2PS", + "Glide", + "Glulxe", + "gnuplot", + "GPL-1.0-only", + "GPL-1.0-or-later", + "GPL-2.0-only", + "GPL-2.0-or-later", + "GPL-3.0-only", + "GPL-3.0-or-later", + "gSOAP-1.3b", + "HaskellReport", + "HPND", + "IBM-pibs", + "ICU", + "IJG", + "ImageMagick", + "iMatix", + "Imlib2", + "Info-ZIP", + "Intel-ACPI", + "Intel", + "Interbase-1.0", + "IPA", + "IPL-1.0", + "ISC", + "JasPer-2.0", + "JSON", + "LAL-1.2", + "LAL-1.3", + "Latex2e", + "Leptonica", + "LGPL-2.0-only", + "LGPL-2.0-or-later", + "LGPL-2.1-only", + "LGPL-2.1-or-later", + "LGPL-3.0-only", + "LGPL-3.0-or-later", + "LGPLLR", + "Libpng", + "libtiff", + "LiLiQ-P-1.1", + "LiLiQ-R-1.1", + "LiLiQ-Rplus-1.1", + "LPL-1.0", + "LPL-1.02", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a", + "LPPL-1.3c", + "MakeIndex", + "MirOS", + "MIT-advertising", + "MIT-CMU", + "MIT-enna", + "MIT-feh", + "MIT", + "MITNFA", + "Motosoto", + "mpich2", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0-no-copyleft-exception", + "MPL-2.0", + "MS-PL", + "MS-RL", + "MTLL", + "Multics", + "Mup", + "NASA-1.3", + "Naumen", + "NBPL-1.0", + "NCSA", + "Net-SNMP", + "NetCDF", + "Newsletr", + "NGPL", + "NLOD-1.0", + "NLPL", + "Nokia", + "NOSL", + "Noweb", + "NPL-1.0", + "NPL-1.1", + "NPOSL-3.0", + "NRL", + "NTP", + "OCCT-PL", + "OCLC-2.0", + "ODbL-1.0", + "OFL-1.0", + "OFL-1.1", + "OGTSL", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0.1", + "OLDAP-2.0", + "OLDAP-2.1", + "OLDAP-2.2.1", + "OLDAP-2.2.2", + "OLDAP-2.2", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OML", + "OpenSSL", + "OPL-1.0", + "OSET-PL-2.1", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "PDDL-1.0", + "PHP-3.0", + "PHP-3.01", + "Plexus", + "PostgreSQL", + "psfrag", + "psutils", + "Python-2.0", + "Qhull", + "QPL-1.0", + "Rdisc", + "RHeCos-1.1", + "RPL-1.1", + "RPL-1.5", + "RPSL-1.0", + "RSA-MD", + "RSCPL", + "Ruby", + "SAX-PD", + "Saxpath", + "SCEA", + "Sendmail", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "SimPL-2.0", + "SISSL-1.2", + "SISSL", + "Sleepycat", + "SMLNJ", + "SMPPL", + "SNIA", + "Spencer-86", + "Spencer-94", + "Spencer-99", + "SPL-1.0", + "SugarCRM-1.1.3", + "SWL", + "TCL", + "TCP-wrappers", + "TMate", + "TORQUE-1.1", + "TOSL", + "Unicode-DFS-2015", + "Unicode-DFS-2016", + "Unicode-TOU", + "Unlicense", + "UPL-1.0", + "Vim", + "VOSTROM", + "VSL-1.0", + "W3C-19980720", + "W3C-20150513", + "W3C", + "Watcom-1.0", + "Wsuipa", + "WTFPL", + "X11", + "Xerox", + "XFree86-1.1", + "xinetd", + "Xnet", + "xpp", + "XSkat", + "YPL-1.0", + "YPL-1.1", + "Zed", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "zlib-acknowledgement", + "Zlib", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1" +] diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json new file mode 100644 index 0000000..41c4b73 --- /dev/null +++ b/node_modules/spdx-license-ids/package.json @@ -0,0 +1,78 @@ +{ + "_from": "spdx-license-ids@^3.0.0", + "_id": "spdx-license-ids@3.0.0", + "_inBundle": false, + "_integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "_location": "/spdx-license-ids", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "spdx-license-ids@^3.0.0", + "name": "spdx-license-ids", + "escapedName": "spdx-license-ids", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/spdx-correct", + "/spdx-expression-parse" + ], + "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "_shasum": "7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87", + "_spec": "spdx-license-ids@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/spdx-correct", + "author": { + "name": "Shinnosuke Watanabe", + "url": "https://github.com/shinnn" + }, + "bugs": { + "url": "https://github.com/shinnn/spdx-license-ids/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A list of SPDX license identifiers", + "devDependencies": { + "@shinnn/eslint-config-node": "^5.0.0", + "chalk": "^2.3.0", + "eslint": "^4.16.0", + "get-spdx-license-ids": "^2.1.0", + "log-symbols": "^2.2.0", + "loud-rejection": "^1.6.0", + "rmfr": "^2.0.0-3", + "tape": "^4.8.0", + "write-file-atomically": "^1.0.0" + }, + "eslintConfig": { + "extends": "@shinnn/node" + }, + "files": [ + "deprecated.json", + "index.json" + ], + "homepage": "https://github.com/shinnn/spdx-license-ids#readme", + "keywords": [ + "spdx", + "license", + "licenses", + "id", + "identifier", + "identifiers", + "json", + "array", + "oss" + ], + "license": "CC0-1.0", + "name": "spdx-license-ids", + "repository": { + "type": "git", + "url": "git+https://github.com/shinnn/spdx-license-ids.git" + }, + "scripts": { + "build": "node build.js", + "pretest": "eslint --fix --format=codeframe .", + "test": "node test.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/split-string/LICENSE b/node_modules/split-string/LICENSE new file mode 100644 index 0000000..e33d14b --- /dev/null +++ b/node_modules/split-string/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/split-string/README.md b/node_modules/split-string/README.md new file mode 100644 index 0000000..d622e44 --- /dev/null +++ b/node_modules/split-string/README.md @@ -0,0 +1,321 @@ +# split-string [![NPM version](https://img.shields.io/npm/v/split-string.svg?style=flat)](https://www.npmjs.com/package/split-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/split-string.svg?style=flat)](https://npmjs.org/package/split-string) [![NPM total downloads](https://img.shields.io/npm/dt/split-string.svg?style=flat)](https://npmjs.org/package/split-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/split-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/split-string) + +> Split a string on a character except when the character is escaped. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save split-string +``` + + + +
    +Why use this? + +
    + +Although it's easy to split on a string: + +```js +console.log('a.b.c'.split('.')); +//=> ['a', 'b', 'c'] +``` + +It's more challenging to split a string whilst respecting escaped or quoted characters. + +**Bad** + +```js +console.log('a\\.b.c'.split('.')); +//=> ['a\\', 'b', 'c'] + +console.log('"a.b.c".d'.split('.')); +//=> ['"a', 'b', 'c"', 'd'] +``` + +**Good** + +```js +var split = require('split-string'); +console.log(split('a\\.b.c')); +//=> ['a.b', 'c'] + +console.log(split('"a.b.c".d')); +//=> ['a.b.c', 'd'] +``` + +See the [options](#options) to learn how to choose the separator or retain quotes or escaping. + +
    + +
    + +## Usage + +```js +var split = require('split-string'); + +split('a.b.c'); +//=> ['a', 'b', 'c'] + +// respects escaped characters +split('a.b.c\\.d'); +//=> ['a', 'b', 'c.d'] + +// respects double-quoted strings +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] +``` + +**Brackets** + +Also respects brackets [unless disabled](#optionsbrackets): + +```js +split('a (b c d) e', ' '); +//=> ['a', '(b c d)', 'e'] +``` + +## Options + +### options.brackets + +**Type**: `object|boolean` + +**Default**: `undefined` + +**Description** + +If enabled, split-string will not split inside brackets. The following brackets types are supported when `options.brackets` is `true`, + +```js +{ + '<': '>', + '(': ')', + '[': ']', + '{': '}' +} +``` + +Or, if object of brackets must be passed, each property on the object must be a bracket type, where the property key is the opening delimiter and property value is the closing delimiter. + +**Examples** + +```js +// no bracket support by default +split('a.{b.c}'); +//=> [ 'a', '{b', 'c}' ] + +// support all basic bracket types: "<>{}[]()" +split('a.{b.c}', {brackets: true}); +//=> [ 'a', '{b.c}' ] + +// also supports nested brackets +split('a.{b.{c.d}.e}.f', {brackets: true}); +//=> [ 'a', '{b.{c.d}.e}', 'f' ] + +// support only the specified brackets +split('[a.b].(c.d)', {brackets: {'[': ']'}}); +//=> [ '[a.b]', '(c', 'd)' ] +``` + +### options.sep + +**Type**: `string` + +**Default**: `.` + +The separator/character to split on. + +**Example** + +```js +split('a.b,c', {sep: ','}); +//=> ['a.b', 'c'] + +// you can also pass the separator as string as the last argument +split('a.b,c', ','); +//=> ['a.b', 'c'] +``` + +### options.keepEscaping + +**Type**: `boolean` + +**Default**: `undefined` + +Keep backslashes in the result. + +**Example** + +```js +split('a.b\\.c'); +//=> ['a', 'b.c'] + +split('a.b.\\c', {keepEscaping: true}); +//=> ['a', 'b\.c'] +``` + +### options.keepQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep single- or double-quotes in the result. + +**Example** + +```js +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] + +split('a."b.c.d".e', {keepQuotes: true}); +//=> ['a', '"b.c.d"', 'e'] + +split('a.\'b.c.d\'.e', {keepQuotes: true}); +//=> ['a', '\'b.c.d\'', 'e'] +``` + +### options.keepDoubleQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep double-quotes in the result. + +**Example** + +```js +split('a."b.c.d".e'); +//=> ['a', 'b.c.d', 'e'] + +split('a."b.c.d".e', {keepDoubleQuotes: true}); +//=> ['a', '"b.c.d"', 'e'] +``` + +### options.keepSingleQuotes + +**Type**: `boolean` + +**Default**: `undefined` + +Keep single-quotes in the result. + +**Example** + +```js +split('a.\'b.c.d\'.e'); +//=> ['a', 'b.c.d', 'e'] + +split('a.\'b.c.d\'.e', {keepSingleQuotes: true}); +//=> ['a', '\'b.c.d\'', 'e'] +``` + +## Customizer + +**Type**: `function` + +**Default**: `undefined` + +Pass a function as the last argument to customize how tokens are added to the array. + +**Example** + +```js +var arr = split('a.b', function(tok) { + if (tok.arr[tok.arr.length - 1] === 'a') { + tok.split = false; + } +}); +console.log(arr); +//=> ['a.b'] +``` + +**Properties** + +The `tok` object has the following properties: + +* `tok.val` (string) The current value about to be pushed onto the result array +* `tok.idx` (number) the current index in the string +* `tok.str` (string) the entire string +* `tok.arr` (array) the result array + +## Release history + +### v3.0.0 - 2017-06-17 + +**Added** + +* adds support for brackets + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [deromanize](https://www.npmjs.com/package/deromanize): Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc) | [homepage](https://github.com/jonschlinkert/deromanize "Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc)") +* [randomatic](https://www.npmjs.com/package/randomatic): Generate randomized strings of a specified length using simple character sequences. The original generate-password. | [homepage](https://github.com/jonschlinkert/randomatic "Generate randomized strings of a specified length using simple character sequences. The original generate-password.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") +* [romanize](https://www.npmjs.com/package/romanize): Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc) | [homepage](https://github.com/jonschlinkert/romanize "Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 28 | [jonschlinkert](https://github.com/jonschlinkert) | +| 9 | [doowb](https://github.com/doowb) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._ \ No newline at end of file diff --git a/node_modules/split-string/index.js b/node_modules/split-string/index.js new file mode 100644 index 0000000..7bc0ea9 --- /dev/null +++ b/node_modules/split-string/index.js @@ -0,0 +1,171 @@ +/*! + * split-string + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var extend = require('extend-shallow'); + +module.exports = function(str, options, fn) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + if (typeof options === 'function') { + fn = options; + options = null; + } + + // allow separator to be defined as a string + if (typeof options === 'string') { + options = { sep: options }; + } + + var opts = extend({sep: '.'}, options); + var quotes = opts.quotes || ['"', "'", '`']; + var brackets; + + if (opts.brackets === true) { + brackets = { + '<': '>', + '(': ')', + '[': ']', + '{': '}' + }; + } else if (opts.brackets) { + brackets = opts.brackets; + } + + var tokens = []; + var stack = []; + var arr = ['']; + var sep = opts.sep; + var len = str.length; + var idx = -1; + var closeIdx; + + function expected() { + if (brackets && stack.length) { + return brackets[stack[stack.length - 1]]; + } + } + + while (++idx < len) { + var ch = str[idx]; + var next = str[idx + 1]; + var tok = { val: ch, idx: idx, arr: arr, str: str }; + tokens.push(tok); + + if (ch === '\\') { + tok.val = keepEscaping(opts, str, idx) === true ? (ch + next) : next; + tok.escaped = true; + if (typeof fn === 'function') { + fn(tok); + } + arr[arr.length - 1] += tok.val; + idx++; + continue; + } + + if (brackets && brackets[ch]) { + stack.push(ch); + var e = expected(); + var i = idx + 1; + + if (str.indexOf(e, i + 1) !== -1) { + while (stack.length && i < len) { + var s = str[++i]; + if (s === '\\') { + s++; + continue; + } + + if (quotes.indexOf(s) !== -1) { + i = getClosingQuote(str, s, i + 1); + continue; + } + + e = expected(); + if (stack.length && str.indexOf(e, i + 1) === -1) { + break; + } + + if (brackets[s]) { + stack.push(s); + continue; + } + + if (e === s) { + stack.pop(); + } + } + } + + closeIdx = i; + if (closeIdx === -1) { + arr[arr.length - 1] += ch; + continue; + } + + ch = str.slice(idx, closeIdx + 1); + tok.val = ch; + tok.idx = idx = closeIdx; + } + + if (quotes.indexOf(ch) !== -1) { + closeIdx = getClosingQuote(str, ch, idx + 1); + if (closeIdx === -1) { + arr[arr.length - 1] += ch; + continue; + } + + if (keepQuotes(ch, opts) === true) { + ch = str.slice(idx, closeIdx + 1); + } else { + ch = str.slice(idx + 1, closeIdx); + } + + tok.val = ch; + tok.idx = idx = closeIdx; + } + + if (typeof fn === 'function') { + fn(tok, tokens); + ch = tok.val; + idx = tok.idx; + } + + if (tok.val === sep && tok.split !== false) { + arr.push(''); + continue; + } + + arr[arr.length - 1] += tok.val; + } + + return arr; +}; + +function getClosingQuote(str, ch, i, brackets) { + var idx = str.indexOf(ch, i); + if (str.charAt(idx - 1) === '\\') { + return getClosingQuote(str, ch, idx + 1); + } + return idx; +} + +function keepQuotes(ch, opts) { + if (opts.keepDoubleQuotes === true && ch === '"') return true; + if (opts.keepSingleQuotes === true && ch === "'") return true; + return opts.keepQuotes; +} + +function keepEscaping(opts, str, idx) { + if (typeof opts.keepEscaping === 'function') { + return opts.keepEscaping(str, idx); + } + return opts.keepEscaping === true || str[idx + 1] === '\\'; +} diff --git a/node_modules/split-string/package.json b/node_modules/split-string/package.json new file mode 100644 index 0000000..1fc591e --- /dev/null +++ b/node_modules/split-string/package.json @@ -0,0 +1,103 @@ +{ + "_from": "split-string@^3.0.2", + "_id": "split-string@3.1.0", + "_inBundle": false, + "_integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "_location": "/split-string", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "split-string@^3.0.2", + "name": "split-string", + "escapedName": "split-string", + "rawSpec": "^3.0.2", + "saveSpec": null, + "fetchSpec": "^3.0.2" + }, + "_requiredBy": [ + "/braces", + "/set-value" + ], + "_resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "_shasum": "7cb09dda3a86585705c64b39a6466038682e8fe2", + "_spec": "split-string@^3.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/split-string/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } + ], + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "deprecated": false, + "description": "Split a string on a character except when the character is escaped.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/split-string", + "keywords": [ + "character", + "escape", + "split", + "string" + ], + "license": "MIT", + "main": "index.js", + "name": "split-string", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/split-string.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "titles": [ + ".", + "install", + "Why use this?" + ], + "related": { + "list": [ + "deromanize", + "randomatic", + "repeat-string", + "romanize" + ] + }, + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "3.1.0" +} diff --git a/node_modules/split/.npmignore b/node_modules/split/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/split/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/split/.travis.yml b/node_modules/split/.travis.yml new file mode 100644 index 0000000..6e5919d --- /dev/null +++ b/node_modules/split/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/node_modules/split/LICENCE b/node_modules/split/LICENCE new file mode 100644 index 0000000..171dd97 --- /dev/null +++ b/node_modules/split/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +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/node_modules/split/examples/pretty.js b/node_modules/split/examples/pretty.js new file mode 100644 index 0000000..2e89131 --- /dev/null +++ b/node_modules/split/examples/pretty.js @@ -0,0 +1,26 @@ + +var inspect = require('util').inspect +var es = require('event-stream') //load event-stream +var split = require('../') + +if(!module.parent) { + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/node_modules/split/index.js b/node_modules/split/index.js new file mode 100644 index 0000000..d2bbe5d --- /dev/null +++ b/node_modules/split/index.js @@ -0,0 +1,63 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var through = require('through') +var Decoder = require('string_decoder').StringDecoder + +module.exports = split + +//TODO pass in a function to map across the lines. + +function split (matcher, mapper, options) { + var decoder = new Decoder() + var soFar = '' + var maxLength = options && options.maxLength; + var trailing = options && options.trailing === false ? false : true + if('function' === typeof matcher) + mapper = matcher, matcher = null + if (!matcher) + matcher = /\r?\n/ + + function emit(stream, piece) { + if(mapper) { + try { + piece = mapper(piece) + } + catch (err) { + return stream.emit('error', err) + } + if('undefined' !== typeof piece) + stream.queue(piece) + } + else + stream.queue(piece) + } + + function next (stream, buffer) { + var pieces = ((soFar != null ? soFar : '') + buffer).split(matcher) + soFar = pieces.pop() + + if (maxLength && soFar.length > maxLength) + return stream.emit('error', new Error('maximum buffer reached')) + + for (var i = 0; i < pieces.length; i++) { + var piece = pieces[i] + emit(stream, piece) + } + } + + return through(function (b) { + next(this, decoder.write(b)) + }, + function () { + if(decoder.end) + next(this, decoder.end()) + if(trailing && soFar != null) + emit(this, soFar) + this.queue(null) + }) +} diff --git a/node_modules/split/package.json b/node_modules/split/package.json new file mode 100644 index 0000000..df3c321 --- /dev/null +++ b/node_modules/split/package.json @@ -0,0 +1,65 @@ +{ + "_args": [ + [ + "split@1.0.1", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "split@1.0.1", + "_id": "split@1.0.1", + "_inBundle": false, + "_integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "_location": "/split", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "split@1.0.1", + "name": "split", + "escapedName": "split", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/pgpass" + ], + "_resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://bit.ly/dominictarr" + }, + "bugs": { + "url": "https://github.com/dominictarr/split/issues" + }, + "dependencies": { + "through": "2" + }, + "description": "split a Text Stream into a Line Stream", + "devDependencies": { + "asynct": "*", + "event-stream": "~3.0.2", + "it-is": "1", + "stream-spec": "~0.2", + "string-to-stream": "~1.0.0", + "ubelt": "~2.9" + }, + "engines": { + "node": "*" + }, + "homepage": "http://github.com/dominictarr/split", + "license": "MIT", + "name": "split", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/split.git" + }, + "scripts": { + "test": "asynct test/" + }, + "version": "1.0.1" +} diff --git a/node_modules/split/readme.markdown b/node_modules/split/readme.markdown new file mode 100644 index 0000000..c2e527d --- /dev/null +++ b/node_modules/split/readme.markdown @@ -0,0 +1,72 @@ +# Split (matcher) + +[![build status](https://secure.travis-ci.org/dominictarr/split.png)](http://travis-ci.org/dominictarr/split) + +Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` + +Example, read every line in a file ... + +``` js + fs.createReadStream(file) + .pipe(split()) + .on('data', function (line) { + //each chunk now is a separate line! + }) + +``` + +`split` takes the same arguments as `string.split` except it defaults to '/\r?\n/' instead of ',', and the optional `limit` parameter is ignored. +[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) + +`split` takes an optional options object on its third argument. + +``` js + split(matcher, mapper, options) +``` + +Valid options: + +* maxLength - The maximum buffer length without seeing a newline or `matcher`, + if a single line exceeds this, the split stream will emit an error. + +``` js + split(JSON.parse, null, { maxLength: 2}) +``` + +* trailing - By default the last buffer not delimited by a newline or `matcher` will be emitted. To prevent this set `options.trailing` to `false`. + +``` js + split(JSON.parse, null, { trailing: false }) +``` + +## keep matched splitter + +As with `String#split`, if you split by a regular expression with a matching group, +the matches will be retained in the collection. + +``` +stdin +.pipe(split(/(\r?\n)/)) +... //lines + separators. +``` + + +# NDJ - Newline Delimited Json + +`split` accepts a function which transforms each line. + +``` js +fs.createReadStream(file) + .pipe(split(JSON.parse)) + .on('data', function (obj) { + //each chunk now is a a js object + }) + .on('error', function (err) { + //syntax errors will land here + //note, this ends the stream. + }) +``` + +# License + +MIT diff --git a/node_modules/split/test/options.asynct.js b/node_modules/split/test/options.asynct.js new file mode 100644 index 0000000..3f137d9 --- /dev/null +++ b/node_modules/split/test/options.asynct.js @@ -0,0 +1,46 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['maximum buffer limit'] = function (test) { + var s = split(JSON.parse, null, { + maxLength: 2 + }) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + s.write('{ "') + it(caughtError).equal(true) + + s.end() + test.done() +} + +exports ['ignore trailing buffers'] = function (test) { + var s = split(JSON.parse, null, { + trailing: false + }) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + s.write('{ "') + s.end() + + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + test.done() +} diff --git a/node_modules/split/test/partitioned_unicode.js b/node_modules/split/test/partitioned_unicode.js new file mode 100644 index 0000000..aff3d5d --- /dev/null +++ b/node_modules/split/test/partitioned_unicode.js @@ -0,0 +1,34 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['split data with partitioned unicode character'] = function (test) { + var s = split(/,/g) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + var x = 'テスト試験今日とても,よい天気で' + unicodeData = new Buffer(x); + + // partition of 日 + piece1 = unicodeData.slice(0, 20); + piece2 = unicodeData.slice(20, unicodeData.length); + + s.write(piece1); + s.write(piece2); + + s.end() + + it(caughtError).equal(false) + + it(rows).deepEqual(['テスト試験今日とても', 'よい天気で']); + + it(rows).deepEqual(x.split(',')) + + test.done() +} diff --git a/node_modules/split/test/split.asynct.js b/node_modules/split/test/split.asynct.js new file mode 100644 index 0000000..a586e12 --- /dev/null +++ b/node_modules/split/test/split.asynct.js @@ -0,0 +1,137 @@ +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('ubelt') + , split = require('..') + , join = require('path').join + , fs = require('fs') + , Stream = require('stream').Stream + , Readable = require('stream').Readable + , spec = require('stream-spec') + , through = require('through') + , stringStream = require('string-to-stream') + +exports ['split() works like String#split'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split() + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +exports ['split() takes mapper function'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split(function (line) { return line.toUpperCase() }) + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).equal(v.trim().toUpperCase()) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + +exports ['split() works with empty string chunks'] = function (test) { + var str = ' foo' + , expected = str.split(/[\s]*/).reduce(splitBy(/[\s]*/), []) + , cs1 = split(/[\s]*/) + , cs2 = split(/[\s]*/) + , actual = [] + , ended = false + , x = spec(cs1).through() + , y = spec(cs2).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + y.validate() + }) + } + a.writable = true + + cs1.pipe(cs2) + cs2.pipe(a) + + cs1.write(str) + cs1.end() + +} + +function splitBy (delimiter) { + return function (arr, piece) { + return arr.concat(piece.split(delimiter)) + } +} diff --git a/node_modules/split/test/try_catch.asynct.js b/node_modules/split/test/try_catch.asynct.js new file mode 100644 index 0000000..39e49f7 --- /dev/null +++ b/node_modules/split/test/try_catch.asynct.js @@ -0,0 +1,51 @@ +var it = require('it-is').style('colour') + , split = require('..') + +exports ['emit mapper exceptions as error events'] = function (test) { + var s = split(JSON.parse) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + s.write('b":2}\n{"c":}\n') + it(caughtError).equal(true) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + s.end() + test.done() +} + +exports ['mapper error events on trailing chunks'] = function (test) { + var s = split(JSON.parse) + , caughtError = false + , rows = [] + + s.on('error', function (err) { + caughtError = true + }) + + s.on('data', function (row) { rows.push(row) }) + + s.write('{"a":1}\n{"') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 } ]) + + s.write('b":2}\n{"c":}') + it(caughtError).equal(false) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + s.end() + it(caughtError).equal(true) + it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) + + test.done() +} diff --git a/node_modules/static-extend/LICENSE b/node_modules/static-extend/LICENSE new file mode 100644 index 0000000..e28e603 --- /dev/null +++ b/node_modules/static-extend/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016, Jon Schlinkert. + +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/node_modules/static-extend/index.js b/node_modules/static-extend/index.js new file mode 100644 index 0000000..f4124b2 --- /dev/null +++ b/node_modules/static-extend/index.js @@ -0,0 +1,90 @@ +/*! + * static-extend + * + * Copyright (c) 2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var copy = require('object-copy'); +var define = require('define-property'); +var util = require('util'); + +/** + * Returns a function for extending the static properties, + * prototype properties, and descriptors from the `Parent` + * constructor onto `Child` constructors. + * + * ```js + * var extend = require('static-extend'); + * Parent.extend = extend(Parent); + * + * // optionally pass a custom merge function as the second arg + * Parent.extend = extend(Parent, function(Child) { + * Child.prototype.mixin = function(key, val) { + * Child.prototype[key] = val; + * }; + * }); + * + * // extend "child" constructors + * Parent.extend(Child); + * + * // optionally define prototype methods as the second arg + * Parent.extend(Child, { + * foo: function() {}, + * bar: function() {} + * }); + * ``` + * @param {Function} `Parent` Parent ctor + * @param {Function} `extendFn` Optional extend function for handling any necessary custom merging. Useful when updating methods that require a specific prototype. + * @param {Function} `Child` Child ctor + * @param {Object} `proto` Optionally pass additional prototype properties to inherit. + * @return {Object} + * @api public + */ + +function extend(Parent, extendFn) { + if (typeof Parent !== 'function') { + throw new TypeError('expected Parent to be a function.'); + } + + return function(Ctor, proto) { + if (typeof Ctor !== 'function') { + throw new TypeError('expected Ctor to be a function.'); + } + + util.inherits(Ctor, Parent); + copy(Ctor, Parent); + + // proto can be null or a plain object + if (typeof proto === 'object') { + var obj = Object.create(proto); + + for (var k in obj) { + Ctor.prototype[k] = obj[k]; + } + } + + // keep a reference to the parent prototype + define(Ctor.prototype, '_parent_', { + configurable: true, + set: function() {}, + get: function() { + return Parent.prototype; + } + }); + + if (typeof extendFn === 'function') { + extendFn(Ctor, Parent); + } + + Ctor.extend = extend(Ctor, extendFn); + }; +}; + +/** + * Expose `extend` + */ + +module.exports = extend; diff --git a/node_modules/static-extend/node_modules/define-property/LICENSE b/node_modules/static-extend/node_modules/define-property/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/node_modules/static-extend/node_modules/define-property/README.md b/node_modules/static-extend/node_modules/define-property/README.md new file mode 100644 index 0000000..8cac698 --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/README.md @@ -0,0 +1,77 @@ +# define-property [![NPM version](https://badge.fury.io/js/define-property.svg)](http://badge.fury.io/js/define-property) + +> Define a non-enumerable property on an object. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i define-property --save +``` + +## Usage + +**Params** + +* `obj`: The object on which to define the property. +* `prop`: The name of the property to be defined or modified. +* `descriptor`: The descriptor for the property being defined or modified. + +```js +var define = require('define-property'); +var obj = {}; +define(obj, 'foo', function(val) { + return val.toUpperCase(); +}); + +console.log(obj); +//=> {} + +console.log(obj.foo('bar')); +//=> 'BAR' +``` + +**get/set** + +```js +define(obj, 'foo', { + get: function() {}, + set: function() {} +}); +``` + +## Related projects + +* [delegate-object](https://www.npmjs.com/package/delegate-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/delegate-object) | [homepage](https://github.com/doowb/delegate-object) +* [forward-object](https://www.npmjs.com/package/forward-object): Copy properties from an object to another object, where properties with function values will be… [more](https://www.npmjs.com/package/forward-object) | [homepage](https://github.com/doowb/forward-object) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) +* [mixin-object](https://www.npmjs.com/package/mixin-object): Mixin the own and inherited properties of other objects onto the first object. Pass an… [more](https://www.npmjs.com/package/mixin-object) | [homepage](https://github.com/jonschlinkert/mixin-object) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/define-property/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 31, 2015._ diff --git a/node_modules/static-extend/node_modules/define-property/index.js b/node_modules/static-extend/node_modules/define-property/index.js new file mode 100644 index 0000000..3e0e5e1 --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/index.js @@ -0,0 +1,31 @@ +/*! + * define-property + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isDescriptor = require('is-descriptor'); + +module.exports = function defineProperty(obj, prop, val) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new TypeError('expected an object or function.'); + } + + if (typeof prop !== 'string') { + throw new TypeError('expected `prop` to be a string.'); + } + + if (isDescriptor(val) && ('set' in val || 'get' in val)) { + return Object.defineProperty(obj, prop, val); + } + + return Object.defineProperty(obj, prop, { + configurable: true, + enumerable: false, + writable: true, + value: val + }); +}; diff --git a/node_modules/static-extend/node_modules/define-property/package.json b/node_modules/static-extend/node_modules/define-property/package.json new file mode 100644 index 0000000..7a65b99 --- /dev/null +++ b/node_modules/static-extend/node_modules/define-property/package.json @@ -0,0 +1,82 @@ +{ + "_from": "define-property@^0.2.5", + "_id": "define-property@0.2.5", + "_inBundle": false, + "_integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "_location": "/static-extend/define-property", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "define-property@^0.2.5", + "name": "define-property", + "escapedName": "define-property", + "rawSpec": "^0.2.5", + "saveSpec": null, + "fetchSpec": "^0.2.5" + }, + "_requiredBy": [ + "/static-extend" + ], + "_resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "_shasum": "c35b1ef918ec3c990f9a5bc57be04aacec5c8116", + "_spec": "define-property@^0.2.5", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/static-extend", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/define-property/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "deprecated": false, + "description": "Define a non-enumerable property on an object.", + "devDependencies": { + "mocha": "*", + "should": "^7.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/define-property", + "keywords": [ + "define", + "define-property", + "enumerable", + "key", + "non", + "non-enumerable", + "object", + "prop", + "property", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "define-property", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/define-property.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "mixin-deep", + "mixin-object", + "delegate-object", + "forward-object" + ] + } + }, + "version": "0.2.5" +} diff --git a/node_modules/static-extend/node_modules/is-accessor-descriptor/LICENSE b/node_modules/static-extend/node_modules/is-accessor-descriptor/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/static-extend/node_modules/is-accessor-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/node_modules/static-extend/node_modules/is-accessor-descriptor/README.md b/node_modules/static-extend/node_modules/is-accessor-descriptor/README.md new file mode 100644 index 0000000..3743fe6 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-accessor-descriptor/README.md @@ -0,0 +1,123 @@ +# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg)](https://www.npmjs.com/package/is-accessor-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. + +- [Install](#install) +- [Usage](#usage) +- [Examples](#examples) +- [API](#api) +- [Related projects](#related-projects) +- [Running tests](#running-tests) +- [Contributing](#contributing) +- [Author](#author) +- [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i is-accessor-descriptor --save +``` + +## Usage + +```js +var isAccessor = require('is-accessor-descriptor'); + +isAccessor({get: function() {}}); +//=> true +``` + +You may also pass an object and property name to check if the property is an accessor: + +```js +isAccessor(foo, 'bar'); +``` + +## Examples + +`false` when not an object + +```js +isAccessor('a') +isAccessor(null) +isAccessor([]) +//=> false +``` + +`true` when the object has valid properties + +and the properties all have the correct JavaScript types: + +```js +isAccessor({get: noop, set: noop}) +isAccessor({get: noop}) +isAccessor({set: noop}) +//=> true +``` + +`false` when the object has invalid properties + +```js +isAccessor({get: noop, set: noop, bar: 'baz'}) +isAccessor({get: noop, writable: true}) +isAccessor({get: noop, value: true}) +//=> false +``` + +`false` when an accessor is not a function + +```js +isAccessor({get: noop, set: 'baz'}) +isAccessor({get: 'foo', set: noop}) +isAccessor({get: 'foo', bar: 'baz'}) +isAccessor({get: 'foo', set: 'baz'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isAccessor({get: noop, set: noop, enumerable: 'foo'}) +isAccessor({set: noop, configurable: 'foo'}) +isAccessor({get: noop, configurable: 'foo'}) +//=> false +``` + +## Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor) +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor) +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-accessor-descriptor/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._ \ No newline at end of file diff --git a/node_modules/static-extend/node_modules/is-accessor-descriptor/index.js b/node_modules/static-extend/node_modules/is-accessor-descriptor/index.js new file mode 100644 index 0000000..2ca4af8 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-accessor-descriptor/index.js @@ -0,0 +1,69 @@ +/*! + * is-accessor-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// accessor descriptor properties +var accessor = { + get: 'function', + set: 'function', + configurable: 'boolean', + enumerable: 'boolean' +}; + +function isAccessorDescriptor(obj, prop) { + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (typeOf(obj) !== 'object') { + return false; + } + + if (has(obj, 'value') || has(obj, 'writable')) { + return false; + } + + if (!has(obj, 'get') || typeof obj.get !== 'function') { + return false; + } + + // tldr: it's valid to have "set" be undefined + // "set" might be undefined if `Object.getOwnPropertyDescriptor` + // was used to get the value, and only `get` was defined by the user + if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { + return false; + } + + for (var key in obj) { + if (!accessor.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === accessor[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +function has(obj, key) { + return {}.hasOwnProperty.call(obj, key); +} + +/** + * Expose `isAccessorDescriptor` + */ + +module.exports = isAccessorDescriptor; diff --git a/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE b/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md b/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js b/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json b/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..960f3d5 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,139 @@ +{ + "_from": "kind-of@^3.0.2", + "_id": "kind-of@3.2.2", + "_inBundle": false, + "_integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "_location": "/static-extend/is-accessor-descriptor/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^3.0.2", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^3.0.2", + "saveSpec": null, + "fetchSpec": "^3.0.2" + }, + "_requiredBy": [ + "/static-extend/is-accessor-descriptor" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "_shasum": "31ea21a734bab9bbb0f32466d893aea51e4a3c64", + "_spec": "kind-of@^3.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/static-extend/node_modules/is-accessor-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "is-buffer": "^1.1.5" + }, + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "3.2.2" +} diff --git a/node_modules/static-extend/node_modules/is-accessor-descriptor/package.json b/node_modules/static-extend/node_modules/is-accessor-descriptor/package.json new file mode 100644 index 0000000..c51d875 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-accessor-descriptor/package.json @@ -0,0 +1,94 @@ +{ + "_from": "is-accessor-descriptor@^0.1.6", + "_id": "is-accessor-descriptor@0.1.6", + "_inBundle": false, + "_integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "_location": "/static-extend/is-accessor-descriptor", + "_phantomChildren": { + "is-buffer": "1.1.6" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-accessor-descriptor@^0.1.6", + "name": "is-accessor-descriptor", + "escapedName": "is-accessor-descriptor", + "rawSpec": "^0.1.6", + "saveSpec": null, + "fetchSpec": "^0.1.6" + }, + "_requiredBy": [ + "/static-extend/is-descriptor" + ], + "_resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "_shasum": "a9e12cb3ae8d876727eeef3843f8a0897b5c98d6", + "_spec": "is-accessor-descriptor@^0.1.6", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/static-extend/node_modules/is-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues" + }, + "bundleDependencies": false, + "dependencies": { + "kind-of": "^3.0.2" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-accessor-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-accessor-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-accessor-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "layout": "default" + }, + "version": "0.1.6" +} diff --git a/node_modules/static-extend/node_modules/is-data-descriptor/LICENSE b/node_modules/static-extend/node_modules/is-data-descriptor/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/node_modules/static-extend/node_modules/is-data-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +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/node_modules/static-extend/node_modules/is-data-descriptor/README.md b/node_modules/static-extend/node_modules/is-data-descriptor/README.md new file mode 100644 index 0000000..41e1643 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-data-descriptor/README.md @@ -0,0 +1,128 @@ +# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg)](https://www.npmjs.com/package/is-data-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-data-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript data descriptor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i is-data-descriptor --save +``` + +## Usage + +```js +var isDataDesc = require('is-data-descriptor'); +``` + +## Examples + +`true` when the descriptor has valid properties with valid values. + +```js +// `value` can be anything +isDataDesc({value: 'foo'}) +isDataDesc({value: function() {}}) +isDataDesc({value: true}) +//=> true +``` + +`false` when not an object + +```js +isDataDesc('a') +//=> false +isDataDesc(null) +//=> false +isDataDesc([]) +//=> false +``` + +`false` when the object has invalid properties + +```js +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', bar: 'baz'}) +//=> false +isDataDesc({value: 'foo', get: function(){}}) +//=> false +isDataDesc({get: function(){}, value: 'foo'}) +//=> false +``` + +`false` when a value is not the correct type + +```js +isDataDesc({value: 'foo', enumerable: 'foo'}) +//=> false +isDataDesc({value: 'foo', configurable: 'foo'}) +//=> false +isDataDesc({value: 'foo', writable: 'foo'}) +//=> false +``` + +## Valid properties + +The only valid data descriptor properties are the following: + +* `configurable` (required) +* `enumerable` (required) +* `value` (optional) +* `writable` (optional) + +To be a valid data descriptor, either `value` or `writable` must be defined. + +**Invalid properties** + +A descriptor may have additional _invalid_ properties (an error will **not** be thrown). + +```js +var foo = {}; + +Object.defineProperty(foo, 'bar', { + enumerable: true, + whatever: 'blah', // invalid, but doesn't cause an error + get: function() { + return 'baz'; + } +}); + +console.log(foo.bar); +//=> 'baz' +``` + +## Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor) +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://www.npmjs.com/package/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor) +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-data-descriptor/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._ \ No newline at end of file diff --git a/node_modules/static-extend/node_modules/is-data-descriptor/index.js b/node_modules/static-extend/node_modules/is-data-descriptor/index.js new file mode 100644 index 0000000..d4d09c9 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-data-descriptor/index.js @@ -0,0 +1,55 @@ +/*! + * is-data-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +// data descriptor properties +var data = { + configurable: 'boolean', + enumerable: 'boolean', + writable: 'boolean' +}; + +function isDataDescriptor(obj, prop) { + if (typeOf(obj) !== 'object') { + return false; + } + + if (typeof prop === 'string') { + var val = Object.getOwnPropertyDescriptor(obj, prop); + return typeof val !== 'undefined'; + } + + if (!('value' in obj) && !('writable' in obj)) { + return false; + } + + for (var key in obj) { + if (key === 'value') continue; + + if (!data.hasOwnProperty(key)) { + continue; + } + + if (typeOf(obj[key]) === data[key]) { + continue; + } + + if (typeof obj[key] !== 'undefined') { + return false; + } + } + return true; +} + +/** + * Expose `isDataDescriptor` + */ + +module.exports = isDataDescriptor; diff --git a/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE b/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/README.md b/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/index.js b/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/package.json b/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/package.json new file mode 100644 index 0000000..0c04a5d --- /dev/null +++ b/node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of/package.json @@ -0,0 +1,139 @@ +{ + "_from": "kind-of@^3.0.2", + "_id": "kind-of@3.2.2", + "_inBundle": false, + "_integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "_location": "/static-extend/is-data-descriptor/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^3.0.2", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^3.0.2", + "saveSpec": null, + "fetchSpec": "^3.0.2" + }, + "_requiredBy": [ + "/static-extend/is-data-descriptor" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "_shasum": "31ea21a734bab9bbb0f32466d893aea51e4a3c64", + "_spec": "kind-of@^3.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/static-extend/node_modules/is-data-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "is-buffer": "^1.1.5" + }, + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "3.2.2" +} diff --git a/node_modules/static-extend/node_modules/is-data-descriptor/package.json b/node_modules/static-extend/node_modules/is-data-descriptor/package.json new file mode 100644 index 0000000..45365df --- /dev/null +++ b/node_modules/static-extend/node_modules/is-data-descriptor/package.json @@ -0,0 +1,93 @@ +{ + "_from": "is-data-descriptor@^0.1.4", + "_id": "is-data-descriptor@0.1.4", + "_inBundle": false, + "_integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "_location": "/static-extend/is-data-descriptor", + "_phantomChildren": { + "is-buffer": "1.1.6" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-data-descriptor@^0.1.4", + "name": "is-data-descriptor", + "escapedName": "is-data-descriptor", + "rawSpec": "^0.1.4", + "saveSpec": null, + "fetchSpec": "^0.1.4" + }, + "_requiredBy": [ + "/static-extend/is-descriptor" + ], + "_resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "_shasum": "0b5ee648388e2c860282e793f1856fec3f301b56", + "_spec": "is-data-descriptor@^0.1.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/static-extend/node_modules/is-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-data-descriptor/issues" + }, + "bundleDependencies": false, + "dependencies": { + "kind-of": "^3.0.2" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-data-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-data-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-data-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ] + }, + "version": "0.1.4" +} diff --git a/node_modules/static-extend/node_modules/is-descriptor/LICENSE b/node_modules/static-extend/node_modules/is-descriptor/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +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/node_modules/static-extend/node_modules/is-descriptor/README.md b/node_modules/static-extend/node_modules/is-descriptor/README.md new file mode 100644 index 0000000..658e533 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/README.md @@ -0,0 +1,193 @@ +# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor) + +> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-descriptor +``` + +## Usage + +```js +var isDescriptor = require('is-descriptor'); + +isDescriptor({value: 'foo'}) +//=> true +isDescriptor({get: function(){}, set: function(){}}) +//=> true +isDescriptor({get: 'foo', set: function(){}}) +//=> false +``` + +You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. + +```js +var obj = {}; +obj.foo = 'abc'; + +Object.defineProperty(obj, 'bar', { + value: 'xyz' +}); + +isDescriptor(obj, 'foo'); +//=> true +isDescriptor(obj, 'bar'); +//=> true +``` + +## Examples + +### value type + +`false` when not an object + +```js +isDescriptor('a'); +//=> false +isDescriptor(null); +//=> false +isDescriptor([]); +//=> false +``` + +### data descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({value: 'foo'}); +//=> true +isDescriptor({value: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', bar: 'baz'}); +//=> false +isDescriptor({value: 'foo', get: noop}); +//=> false +isDescriptor({get: noop, value: noop}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({value: 'foo', enumerable: 'foo'}); +//=> false +isDescriptor({value: 'foo', configurable: 'foo'}); +//=> false +isDescriptor({value: 'foo', writable: 'foo'}); +//=> false +``` + +### accessor descriptor + +`true` when the object has valid properties with valid values. + +```js +isDescriptor({get: noop, set: noop}); +//=> true +isDescriptor({get: noop}); +//=> true +isDescriptor({set: noop}); +//=> true +``` + +`false` when the object has invalid properties + +```js +isDescriptor({get: noop, set: noop, bar: 'baz'}); +//=> false +isDescriptor({get: noop, writable: true}); +//=> false +isDescriptor({get: noop, value: true}); +//=> false +``` + +`false` when an accessor is not a function + +```js +isDescriptor({get: noop, set: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: noop}); +//=> false +isDescriptor({get: 'foo', bar: 'baz'}); +//=> false +isDescriptor({get: 'foo', set: 'baz'}); +//=> false +``` + +`false` when a value is not the correct type + +```js +isDescriptor({get: noop, set: noop, enumerable: 'foo'}); +//=> false +isDescriptor({set: noop, configurable: 'foo'}); +//=> false +isDescriptor({get: noop, configurable: 'foo'}); +//=> false +``` + +## About + +### Related projects + +* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") +* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") +* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 24 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [doowb](https://github.com/doowb) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/node_modules/static-extend/node_modules/is-descriptor/index.js b/node_modules/static-extend/node_modules/is-descriptor/index.js new file mode 100644 index 0000000..c9b91d7 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/index.js @@ -0,0 +1,22 @@ +/*! + * is-descriptor + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); +var isAccessor = require('is-accessor-descriptor'); +var isData = require('is-data-descriptor'); + +module.exports = function isDescriptor(obj, key) { + if (typeOf(obj) !== 'object') { + return false; + } + if ('get' in obj) { + return isAccessor(obj, key); + } + return isData(obj, key); +}; diff --git a/node_modules/static-extend/node_modules/is-descriptor/package.json b/node_modules/static-extend/node_modules/is-descriptor/package.json new file mode 100644 index 0000000..293e300 --- /dev/null +++ b/node_modules/static-extend/node_modules/is-descriptor/package.json @@ -0,0 +1,114 @@ +{ + "_from": "is-descriptor@^0.1.0", + "_id": "is-descriptor@0.1.6", + "_inBundle": false, + "_integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "_location": "/static-extend/is-descriptor", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-descriptor@^0.1.0", + "name": "is-descriptor", + "escapedName": "is-descriptor", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/static-extend/define-property" + ], + "_resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "_shasum": "366d8240dde487ca51823b1ab9f07a10a78251ca", + "_spec": "is-descriptor@^0.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/static-extend/node_modules/define-property", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-descriptor/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "deprecated": false, + "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-descriptor", + "keywords": [ + "accessor", + "check", + "data", + "descriptor", + "get", + "getter", + "is", + "keys", + "object", + "properties", + "property", + "set", + "setter", + "type", + "valid", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-descriptor", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-descriptor.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-accessor-descriptor", + "is-data-descriptor", + "is-descriptor", + "isobject" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "0.1.6" +} diff --git a/node_modules/static-extend/node_modules/kind-of/LICENSE b/node_modules/static-extend/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/static-extend/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/static-extend/node_modules/kind-of/README.md b/node_modules/static-extend/node_modules/kind-of/README.md new file mode 100644 index 0000000..170bf30 --- /dev/null +++ b/node_modules/static-extend/node_modules/kind-of/README.md @@ -0,0 +1,342 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Release history + +### v4.0.0 + +**Added** + +* `promise` support + +### v5.0.0 + +**Added** + +* `Set Iterator` and `Map Iterator` support + +**Fixed** + +* Now returns `generatorfunction` for generator functions + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of is more correct than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly tests instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 82 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 13, 2017._ \ No newline at end of file diff --git a/node_modules/static-extend/node_modules/kind-of/index.js b/node_modules/static-extend/node_modules/kind-of/index.js new file mode 100644 index 0000000..fc5cde9 --- /dev/null +++ b/node_modules/static-extend/node_modules/kind-of/index.js @@ -0,0 +1,147 @@ +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + var type = typeof val; + + // primitivies + if (type === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (type === 'string' || val instanceof String) { + return 'string'; + } + if (type === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (type === 'function' || val instanceof Function) { + if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') { + return 'generatorfunction'; + } + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + if (type === '[object Map Iterator]') { + return 'mapiterator'; + } + if (type === '[object Set Iterator]') { + return 'setiterator'; + } + if (type === '[object String Iterator]') { + return 'stringiterator'; + } + if (type === '[object Array Iterator]') { + return 'arrayiterator'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + return val.constructor + && typeof val.constructor.isBuffer === 'function' + && val.constructor.isBuffer(val); +} diff --git a/node_modules/static-extend/node_modules/kind-of/package.json b/node_modules/static-extend/node_modules/kind-of/package.json new file mode 100644 index 0000000..da588c5 --- /dev/null +++ b/node_modules/static-extend/node_modules/kind-of/package.json @@ -0,0 +1,146 @@ +{ + "_from": "kind-of@^5.0.0", + "_id": "kind-of@5.1.0", + "_inBundle": false, + "_integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "_location": "/static-extend/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^5.0.0", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^5.0.0", + "saveSpec": null, + "fetchSpec": "^5.0.0" + }, + "_requiredBy": [ + "/static-extend/is-descriptor" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "_shasum": "729c91e2d857b7a419a1f9aa65685c4c33f5845d", + "_spec": "kind-of@^5.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/static-extend/node_modules/is-descriptor", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "James", + "url": "https://twitter.com/aretecode" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + }, + { + "name": "tunnckoCore", + "url": "https://i.am.charlike.online" + } + ], + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.1.1", + "browserify": "^14.4.0", + "gulp-format-md": "^0.1.12", + "matched": "^0.4.4", + "mocha": "^3.4.2", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + }, + "version": "5.1.0" +} diff --git a/node_modules/static-extend/package.json b/node_modules/static-extend/package.json new file mode 100644 index 0000000..d25fb9d --- /dev/null +++ b/node_modules/static-extend/package.json @@ -0,0 +1,96 @@ +{ + "_from": "static-extend@^0.1.1", + "_id": "static-extend@0.1.2", + "_inBundle": false, + "_integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "_location": "/static-extend", + "_phantomChildren": { + "is-buffer": "1.1.6" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "static-extend@^0.1.1", + "name": "static-extend", + "escapedName": "static-extend", + "rawSpec": "^0.1.1", + "saveSpec": null, + "fetchSpec": "^0.1.1" + }, + "_requiredBy": [ + "/class-utils" + ], + "_resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "_shasum": "60809c39cbff55337226fd5e0b520f341f1fb5c6", + "_spec": "static-extend@^0.1.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/class-utils", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/static-extend/issues" + }, + "bundleDependencies": false, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "deprecated": false, + "description": "Adds a static `extend` method to a class, to simplify inheritance. Extends the static properties, prototype properties, and descriptors from a `Parent` constructor onto `Child` constructors.", + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/static-extend", + "keywords": [ + "class", + "ctor", + "descriptor", + "extend", + "extends", + "inherit", + "inheritance", + "merge", + "method", + "prop", + "properties", + "property", + "prototype" + ], + "license": "MIT", + "main": "index.js", + "name": "static-extend", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/static-extend.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb", + "verb-readme-generator" + ], + "lint": { + "reflinks": true + } + }, + "version": "0.1.2" +} diff --git a/node_modules/statuses/HISTORY.md b/node_modules/statuses/HISTORY.md new file mode 100644 index 0000000..7b59790 --- /dev/null +++ b/node_modules/statuses/HISTORY.md @@ -0,0 +1,60 @@ +1.4.0 / 2017-10-20 +================== + + * Add `STATUS_CODES` export + +1.3.1 / 2016-11-11 +================== + + * Fix return type in JSDoc + +1.3.0 / 2016-05-17 +================== + + * Add `421 Misdirected Request` + * perf: enable strict mode + +1.2.1 / 2015-02-01 +================== + + * Fix message for status 451 + - `451 Unavailable For Legal Reasons` + +1.2.0 / 2014-09-28 +================== + + * Add `208 Already Repored` + * Add `226 IM Used` + * Add `306 (Unused)` + * Add `415 Unable For Legal Reasons` + * Add `508 Loop Detected` + +1.1.1 / 2014-09-24 +================== + + * Add missing 308 to `codes.json` + +1.1.0 / 2014-09-21 +================== + + * Add `codes.json` for universal support + +1.0.4 / 2014-08-20 +================== + + * Package cleanup + +1.0.3 / 2014-06-08 +================== + + * Add 308 to `.redirect` category + +1.0.2 / 2014-03-13 +================== + + * Add `.retry` category + +1.0.1 / 2014-03-12 +================== + + * Initial release diff --git a/node_modules/statuses/LICENSE b/node_modules/statuses/LICENSE new file mode 100644 index 0000000..28a3161 --- /dev/null +++ b/node_modules/statuses/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2016 Douglas Christopher Wilson + +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/node_modules/statuses/README.md b/node_modules/statuses/README.md new file mode 100644 index 0000000..0fe5720 --- /dev/null +++ b/node_modules/statuses/README.md @@ -0,0 +1,127 @@ +# Statuses + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP status utility for node. + +This module provides a list of status codes and messages sourced from +a few different projects: + + * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) + * The [Node.js project](https://nodejs.org/) + * The [NGINX project](https://www.nginx.com/) + * The [Apache HTTP Server project](https://httpd.apache.org/) + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install statuses +``` + +## API + + + +```js +var status = require('statuses') +``` + +### var code = status(Integer || String) + +If `Integer` or `String` is a valid HTTP code or status message, then the +appropriate `code` will be returned. Otherwise, an error will be thrown. + + + +```js +status(403) // => 403 +status('403') // => 403 +status('forbidden') // => 403 +status('Forbidden') // => 403 +status(306) // throws, as it's not supported by node.js +``` + +### status.STATUS_CODES + +Returns an object which maps status codes to status messages, in +the same format as the +[Node.js http module](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes). + +### status.codes + +Returns an array of all the status codes as `Integer`s. + +### var msg = status[code] + +Map of `code` to `status message`. `undefined` for invalid `code`s. + + + +```js +status[404] // => 'Not Found' +``` + +### var code = status[msg] + +Map of `status message` to `code`. `msg` can either be title-cased or +lower-cased. `undefined` for invalid `status message`s. + + + +```js +status['not found'] // => 404 +status['Not Found'] // => 404 +``` + +### status.redirect[code] + +Returns `true` if a status code is a valid redirect status. + + + +```js +status.redirect[200] // => undefined +status.redirect[301] // => true +``` + +### status.empty[code] + +Returns `true` if a status code expects an empty body. + + + +```js +status.empty[200] // => undefined +status.empty[204] // => true +status.empty[304] // => true +``` + +### status.retry[code] + +Returns `true` if you should retry the rest. + + + +```js +status.retry[501] // => undefined +status.retry[503] // => true +``` + +[npm-image]: https://img.shields.io/npm/v/statuses.svg +[npm-url]: https://npmjs.org/package/statuses +[node-version-image]: https://img.shields.io/node/v/statuses.svg +[node-version-url]: https://nodejs.org/en/download +[travis-image]: https://img.shields.io/travis/jshttp/statuses.svg +[travis-url]: https://travis-ci.org/jshttp/statuses +[coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg +[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master +[downloads-image]: https://img.shields.io/npm/dm/statuses.svg +[downloads-url]: https://npmjs.org/package/statuses diff --git a/node_modules/statuses/codes.json b/node_modules/statuses/codes.json new file mode 100644 index 0000000..66f70e3 --- /dev/null +++ b/node_modules/statuses/codes.json @@ -0,0 +1,65 @@ +{ + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "306": "(Unused)", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} diff --git a/node_modules/statuses/index.js b/node_modules/statuses/index.js new file mode 100644 index 0000000..4df469a --- /dev/null +++ b/node_modules/statuses/index.js @@ -0,0 +1,113 @@ +/*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var codes = require('./codes.json') + +/** + * Module exports. + * @public + */ + +module.exports = status + +// status code to message map +status.STATUS_CODES = codes + +// array of status codes +status.codes = populateStatusesMap(status, codes) + +// status codes for redirects +status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true +} + +// status codes for empty bodies +status.empty = { + 204: true, + 205: true, + 304: true +} + +// status codes for when you should retry the request +status.retry = { + 502: true, + 503: true, + 504: true +} + +/** + * Populate the statuses map for given codes. + * @private + */ + +function populateStatusesMap (statuses, codes) { + var arr = [] + + Object.keys(codes).forEach(function forEachCode (code) { + var message = codes[code] + var status = Number(code) + + // Populate properties + statuses[status] = message + statuses[message] = status + statuses[message.toLowerCase()] = status + + // Add to array + arr.push(status) + }) + + return arr +} + +/** + * Get the status code. + * + * Given a number, this will throw if it is not a known status + * code, otherwise the code will be returned. Given a string, + * the string will be parsed for a number and return the code + * if valid, otherwise will lookup the code assuming this is + * the status message. + * + * @param {string|number} code + * @returns {number} + * @public + */ + +function status (code) { + if (typeof code === 'number') { + if (!status[code]) throw new Error('invalid status code: ' + code) + return code + } + + if (typeof code !== 'string') { + throw new TypeError('code must be a number or string') + } + + // '403' + var n = parseInt(code, 10) + if (!isNaN(n)) { + if (!status[n]) throw new Error('invalid status code: ' + n) + return n + } + + n = status[code.toLowerCase()] + if (!n) throw new Error('invalid status message: "' + code + '"') + return n +} diff --git a/node_modules/statuses/package.json b/node_modules/statuses/package.json new file mode 100644 index 0000000..6997976 --- /dev/null +++ b/node_modules/statuses/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "statuses@1.4.0", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "statuses@1.4.0", + "_id": "statuses@1.4.0", + "_inBundle": false, + "_integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "_location": "/statuses", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "statuses@1.4.0", + "name": "statuses", + "escapedName": "statuses", + "rawSpec": "1.4.0", + "saveSpec": null, + "fetchSpec": "1.4.0" + }, + "_requiredBy": [ + "/http-errors" + ], + "_resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "_spec": "1.4.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/jshttp/statuses/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "description": "HTTP status utility", + "devDependencies": { + "csv-parse": "1.2.4", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.8.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.2.0", + "eslint-plugin-promise": "3.6.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5", + "raw-body": "2.3.2", + "stream-to-array": "2.3.0" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "index.js", + "codes.json", + "LICENSE" + ], + "homepage": "https://github.com/jshttp/statuses#readme", + "keywords": [ + "http", + "status", + "code" + ], + "license": "MIT", + "name": "statuses", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/statuses.git" + }, + "scripts": { + "build": "node scripts/build.js", + "fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "update": "npm run fetch && npm run build" + }, + "version": "1.4.0" +} diff --git a/node_modules/stream-combiner/.npmignore b/node_modules/stream-combiner/.npmignore new file mode 100644 index 0000000..13abef4 --- /dev/null +++ b/node_modules/stream-combiner/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/node_modules/stream-combiner/.travis.yml b/node_modules/stream-combiner/.travis.yml new file mode 100644 index 0000000..895dbd3 --- /dev/null +++ b/node_modules/stream-combiner/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/node_modules/stream-combiner/LICENSE b/node_modules/stream-combiner/LICENSE new file mode 100644 index 0000000..6d03581 --- /dev/null +++ b/node_modules/stream-combiner/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012 'Dominic Tarr' + +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/node_modules/stream-combiner/README.md b/node_modules/stream-combiner/README.md new file mode 100644 index 0000000..565e0e2 --- /dev/null +++ b/node_modules/stream-combiner/README.md @@ -0,0 +1,29 @@ +# stream-combiner + + + +## Combine (stream1,...,streamN) + +Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream +and reads from the last stream. + +Listening for 'error' will recieve errors from all streams inside the pipe. + +``` js + var Combine = require('stream-combiner') + var es = require('event-stream') + + Combine( //connect streams together with `pipe` + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + callback(null + , inspect(JSON.parse(data))) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) +``` + +## License + +MIT diff --git a/node_modules/stream-combiner/index.js b/node_modules/stream-combiner/index.js new file mode 100644 index 0000000..99cf5b6 --- /dev/null +++ b/node_modules/stream-combiner/index.js @@ -0,0 +1,39 @@ +var duplexer = require('duplexer') + +module.exports = function () { + + var streams = [].slice.call(arguments) + , first = streams[0] + , last = streams[streams.length - 1] + , thepipe = duplexer(first, last) + + if(streams.length == 1) + return streams[0] + else if (!streams.length) + throw new Error('connect called with empty args') + + //pipe all the streams together + + function recurse (streams) { + if(streams.length < 2) + return + streams[0].pipe(streams[1]) + recurse(streams.slice(1)) + } + + recurse(streams) + + function onerror () { + var args = [].slice.call(arguments) + args.unshift('error') + thepipe.emit.apply(thepipe, args) + } + + //es.duplex already reemits the error from the first and last stream. + //add a listener for the inner streams in the pipeline. + for(var i = 1; i < streams.length - 1; i ++) + streams[i].on('error', onerror) + + return thepipe +} + diff --git a/node_modules/stream-combiner/package.json b/node_modules/stream-combiner/package.json new file mode 100644 index 0000000..d58fa0e --- /dev/null +++ b/node_modules/stream-combiner/package.json @@ -0,0 +1,54 @@ +{ + "_from": "stream-combiner@~0.0.4", + "_id": "stream-combiner@0.0.4", + "_inBundle": false, + "_integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "_location": "/stream-combiner", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "stream-combiner@~0.0.4", + "name": "stream-combiner", + "escapedName": "stream-combiner", + "rawSpec": "~0.0.4", + "saveSpec": null, + "fetchSpec": "~0.0.4" + }, + "_requiredBy": [ + "/event-stream" + ], + "_resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "_shasum": "4d5e433c185261dde623ca3f44c586bcf5c4ad14", + "_spec": "stream-combiner@~0.0.4", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/event-stream", + "author": { + "name": "'Dominic Tarr'", + "email": "dominic.tarr@gmail.com", + "url": "http://dominictarr.com" + }, + "bugs": { + "url": "https://github.com/dominictarr/stream-combiner/issues" + }, + "bundleDependencies": false, + "dependencies": { + "duplexer": "~0.1.1" + }, + "deprecated": false, + "description": "", + "devDependencies": { + "event-stream": "~3.0.7", + "tape": "~2.3.0" + }, + "homepage": "https://github.com/dominictarr/stream-combiner", + "license": "MIT", + "name": "stream-combiner", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/stream-combiner.git" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "version": "0.0.4" +} diff --git a/node_modules/stream-combiner/test/index.js b/node_modules/stream-combiner/test/index.js new file mode 100644 index 0000000..d17ddad --- /dev/null +++ b/node_modules/stream-combiner/test/index.js @@ -0,0 +1,52 @@ +var es = require('event-stream') +var combine = require('..') +var test = require('tape') + +test('do not duplicate errors', function (test) { + + var errors = 0; + var pipe = combine( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }) + ) + + pipe.on('error', function(err) { + errors++ + test.ok(errors, 'expected error count') + process.nextTick(function () { + return test.end(); + }) + }) + + return pipe.write('meh'); +}) + +test('3 pipe do not duplicate errors', function (test) { + + var errors = 0; + var pipe = combine( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }), + es.through() + ) + + pipe.on('error', function(err) { + errors++ + test.ok(errors, 'expected error count') + process.nextTick(function () { + return test.end(); + }) + }) + + return pipe.write('meh'); + +}) + diff --git a/node_modules/string-width/index.js b/node_modules/string-width/index.js new file mode 100644 index 0000000..bbc49d2 --- /dev/null +++ b/node_modules/string-width/index.js @@ -0,0 +1,36 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +module.exports = str => { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + str = stripAnsi(str); + + let width = 0; + + for (let i = 0; i < str.length; i++) { + const code = str.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/node_modules/string-width/license b/node_modules/string-width/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/string-width/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/node_modules/string-width/package.json b/node_modules/string-width/package.json new file mode 100644 index 0000000..777f87f --- /dev/null +++ b/node_modules/string-width/package.json @@ -0,0 +1,89 @@ +{ + "_from": "string-width@^2.0.0", + "_id": "string-width@2.1.1", + "_inBundle": false, + "_integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "_location": "/string-width", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "string-width@^2.0.0", + "name": "string-width", + "escapedName": "string-width", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/ansi-align", + "/boxen", + "/widest-line" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "_shasum": "ab93f27a8dc13d28cac815c462143a6d9012ae9e", + "_spec": "string-width@^2.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/boxen", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "deprecated": false, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/string-width#readme", + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "license": "MIT", + "name": "string-width", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.1" +} diff --git a/node_modules/string-width/readme.md b/node_modules/string-width/readme.md new file mode 100644 index 0000000..df5b719 --- /dev/null +++ b/node_modules/string-width/readme.md @@ -0,0 +1,42 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/string_decoder/.npmignore b/node_modules/string_decoder/.npmignore new file mode 100644 index 0000000..206320c --- /dev/null +++ b/node_modules/string_decoder/.npmignore @@ -0,0 +1,2 @@ +build +test diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE new file mode 100644 index 0000000..778edb2 --- /dev/null +++ b/node_modules/string_decoder/LICENSE @@ -0,0 +1,48 @@ +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/node_modules/string_decoder/README.md b/node_modules/string_decoder/README.md new file mode 100644 index 0000000..dc3a2d2 --- /dev/null +++ b/node_modules/string_decoder/README.md @@ -0,0 +1,28 @@ +# string_decoder + +***Node-core v7.0.0 string_decoder for userland*** + + +[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) +[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) + + +```bash +npm install --save string_decoder +``` + +***Node-core string_decoderstring_decoder for userland*** + +This package is a mirror of the string_decoder implementation in Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/). + +As of version 1.0.0 **string_decoder** uses semantic versioning. + +## Previous versions + +Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. + +## Update + +The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. diff --git a/node_modules/string_decoder/lib/string_decoder.js b/node_modules/string_decoder/lib/string_decoder.js new file mode 100644 index 0000000..26fb94c --- /dev/null +++ b/node_modules/string_decoder/lib/string_decoder.js @@ -0,0 +1,272 @@ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return -1; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'.repeat(p); + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'.repeat(p + 1); + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'.repeat(p + 2); + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character for each buffered byte of a (partial) +// character needs to be added to the output. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed); + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} \ No newline at end of file diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json new file mode 100644 index 0000000..eef68c0 --- /dev/null +++ b/node_modules/string_decoder/package.json @@ -0,0 +1,56 @@ +{ + "_from": "string_decoder@~1.0.3", + "_id": "string_decoder@1.0.3", + "_inBundle": false, + "_integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "_location": "/string_decoder", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "string_decoder@~1.0.3", + "name": "string_decoder", + "escapedName": "string_decoder", + "rawSpec": "~1.0.3", + "saveSpec": null, + "fetchSpec": "~1.0.3" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "_shasum": "0fc67d7c141825de94282dd536bec6b9bce860ab", + "_spec": "string_decoder@~1.0.3", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/readable-stream", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "bundleDependencies": false, + "dependencies": { + "safe-buffer": "~5.1.0" + }, + "deprecated": false, + "description": "The string_decoder module from Node core", + "devDependencies": { + "babel-polyfill": "^6.23.0", + "tap": "~0.4.8" + }, + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "main": "lib/string_decoder.js", + "name": "string_decoder", + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "scripts": { + "test": "tap test/parallel/*.js && node test/verify-dependencies" + }, + "version": "1.0.3" +} diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js new file mode 100644 index 0000000..96e0292 --- /dev/null +++ b/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; diff --git a/node_modules/strip-ansi/license b/node_modules/strip-ansi/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/strip-ansi/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/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json new file mode 100644 index 0000000..1c2e75e --- /dev/null +++ b/node_modules/strip-ansi/package.json @@ -0,0 +1,84 @@ +{ + "_from": "strip-ansi@^4.0.0", + "_id": "strip-ansi@4.0.0", + "_inBundle": false, + "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "_location": "/strip-ansi", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-ansi@^4.0.0", + "name": "strip-ansi", + "escapedName": "strip-ansi", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/string-width" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "_shasum": "a8479022eb1ac368a871389b635262c505ee368f", + "_spec": "strip-ansi@^4.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "deprecated": false, + "description": "Strip ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/strip-ansi#readme", + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "strip-ansi", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.0.0" +} diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000..dc76f0c --- /dev/null +++ b/node_modules/strip-ansi/readme.md @@ -0,0 +1,39 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/strip-bom/index.js b/node_modules/strip-bom/index.js new file mode 100644 index 0000000..b00feb9 --- /dev/null +++ b/node_modules/strip-bom/index.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = x => { + if (typeof x !== 'string') { + throw new TypeError('Expected a string, got ' + typeof x); + } + + // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string + // conversion translates it to FEFF (UTF-16 BOM) + if (x.charCodeAt(0) === 0xFEFF) { + return x.slice(1); + } + + return x; +}; diff --git a/node_modules/strip-bom/license b/node_modules/strip-bom/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/strip-bom/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/node_modules/strip-bom/package.json b/node_modules/strip-bom/package.json new file mode 100644 index 0000000..014fddc --- /dev/null +++ b/node_modules/strip-bom/package.json @@ -0,0 +1,72 @@ +{ + "_from": "strip-bom@^3.0.0", + "_id": "strip-bom@3.0.0", + "_inBundle": false, + "_integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "_location": "/strip-bom", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-bom@^3.0.0", + "name": "strip-bom", + "escapedName": "strip-bom", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/load-json-file" + ], + "_resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "_shasum": "2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3", + "_spec": "strip-bom@^3.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/load-json-file", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-bom/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Strip UTF-8 byte order mark (BOM) from a string", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/strip-bom#readme", + "keywords": [ + "strip", + "bom", + "byte", + "order", + "mark", + "unicode", + "utf8", + "utf-8", + "remove", + "delete", + "trim", + "text", + "string" + ], + "license": "MIT", + "name": "strip-bom", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-bom.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/strip-bom/readme.md b/node_modules/strip-bom/readme.md new file mode 100644 index 0000000..812a980 --- /dev/null +++ b/node_modules/strip-bom/readme.md @@ -0,0 +1,36 @@ +# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom) + +> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string + +From Wikipedia: + +> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8. + + +## Install + +``` +$ npm install --save strip-bom +``` + + +## Usage + +```js +const stripBom = require('strip-bom'); + +stripBom('\uFEFFunicorn'); +//=> 'unicorn' +``` + + +## Related + +- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module +- [strip-bom-buf](https://github.com/sindresorhus/strip-bom-buf) - Buffer version of this module +- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/strip-eof/index.js b/node_modules/strip-eof/index.js new file mode 100644 index 0000000..a17d0af --- /dev/null +++ b/node_modules/strip-eof/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (x) { + var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); + var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); + + if (x[x.length - 1] === lf) { + x = x.slice(0, x.length - 1); + } + + if (x[x.length - 1] === cr) { + x = x.slice(0, x.length - 1); + } + + return x; +}; diff --git a/node_modules/strip-eof/license b/node_modules/strip-eof/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/strip-eof/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/node_modules/strip-eof/package.json b/node_modules/strip-eof/package.json new file mode 100644 index 0000000..329f3d6 --- /dev/null +++ b/node_modules/strip-eof/package.json @@ -0,0 +1,71 @@ +{ + "_from": "strip-eof@^1.0.0", + "_id": "strip-eof@1.0.0", + "_inBundle": false, + "_integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "_location": "/strip-eof", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-eof@^1.0.0", + "name": "strip-eof", + "escapedName": "strip-eof", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "_shasum": "bb43ff5598a6eb05d89b59fcd129c983313606bf", + "_spec": "strip-eof@^1.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/execa", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-eof/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Strip the End-Of-File (EOF) character from a string/buffer", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/strip-eof#readme", + "keywords": [ + "strip", + "trim", + "remove", + "delete", + "eof", + "end", + "file", + "newline", + "linebreak", + "character", + "string", + "buffer" + ], + "license": "MIT", + "name": "strip-eof", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-eof.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/strip-eof/readme.md b/node_modules/strip-eof/readme.md new file mode 100644 index 0000000..45ffe04 --- /dev/null +++ b/node_modules/strip-eof/readme.md @@ -0,0 +1,28 @@ +# strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof) + +> Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer + + +## Install + +``` +$ npm install --save strip-eof +``` + + +## Usage + +```js +const stripEof = require('strip-eof'); + +stripEof('foo\nbar\n\n'); +//=> 'foo\nbar\n' + +stripEof(new Buffer('foo\nbar\n\n')).toString(); +//=> 'foo\nbar\n' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/strip-json-comments/index.js b/node_modules/strip-json-comments/index.js new file mode 100644 index 0000000..4e6576e --- /dev/null +++ b/node_modules/strip-json-comments/index.js @@ -0,0 +1,70 @@ +'use strict'; +var singleComment = 1; +var multiComment = 2; + +function stripWithoutWhitespace() { + return ''; +} + +function stripWithWhitespace(str, start, end) { + return str.slice(start, end).replace(/\S/g, ' '); +} + +module.exports = function (str, opts) { + opts = opts || {}; + + var currentChar; + var nextChar; + var insideString = false; + var insideComment = false; + var offset = 0; + var ret = ''; + var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; + + for (var i = 0; i < str.length; i++) { + currentChar = str[i]; + nextChar = str[i + 1]; + + if (!insideComment && currentChar === '"') { + var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; + if (!escaped) { + insideString = !insideString; + } + } + + if (insideString) { + continue; + } + + if (!insideComment && currentChar + nextChar === '//') { + ret += str.slice(offset, i); + offset = i; + insideComment = singleComment; + i++; + } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { + i++; + insideComment = false; + ret += strip(str, offset, i); + offset = i; + continue; + } else if (insideComment === singleComment && currentChar === '\n') { + insideComment = false; + ret += strip(str, offset, i); + offset = i; + } else if (!insideComment && currentChar + nextChar === '/*') { + ret += str.slice(offset, i); + offset = i; + insideComment = multiComment; + i++; + continue; + } else if (insideComment === multiComment && currentChar + nextChar === '*/') { + i++; + insideComment = false; + ret += strip(str, offset, i + 1); + offset = i + 1; + continue; + } + } + + return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset)); +}; diff --git a/node_modules/strip-json-comments/license b/node_modules/strip-json-comments/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/strip-json-comments/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/node_modules/strip-json-comments/package.json b/node_modules/strip-json-comments/package.json new file mode 100644 index 0000000..ac359fc --- /dev/null +++ b/node_modules/strip-json-comments/package.json @@ -0,0 +1,74 @@ +{ + "_from": "strip-json-comments@~2.0.1", + "_id": "strip-json-comments@2.0.1", + "_inBundle": false, + "_integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "_location": "/strip-json-comments", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-json-comments@~2.0.1", + "name": "strip-json-comments", + "escapedName": "strip-json-comments", + "rawSpec": "~2.0.1", + "saveSpec": null, + "fetchSpec": "~2.0.1" + }, + "_requiredBy": [ + "/rc" + ], + "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "_shasum": "3c531942e908c2697c0ec344858c286c7ca0a60a", + "_spec": "strip-json-comments@~2.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/rc", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-json-comments/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Strip comments from JSON. Lets you use comments in your JSON files!", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", + "keywords": [ + "json", + "strip", + "remove", + "delete", + "trim", + "comments", + "multiline", + "parse", + "config", + "configuration", + "conf", + "settings", + "util", + "env", + "environment" + ], + "license": "MIT", + "name": "strip-json-comments", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-json-comments.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.1" +} diff --git a/node_modules/strip-json-comments/readme.md b/node_modules/strip-json-comments/readme.md new file mode 100644 index 0000000..0ee58df --- /dev/null +++ b/node_modules/strip-json-comments/readme.md @@ -0,0 +1,64 @@ +# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments) + +> Strip comments from JSON. Lets you use comments in your JSON files! + +This is now possible: + +```js +{ + // rainbows + "unicorn": /* ❤ */ "cake" +} +``` + +It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. + +Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. + + +## Install + +``` +$ npm install --save strip-json-comments +``` + + +## Usage + +```js +const json = '{/*rainbows*/"unicorn":"cake"}'; + +JSON.parse(stripJsonComments(json)); +//=> {unicorn: 'cake'} +``` + + +## API + +### stripJsonComments(input, [options]) + +#### input + +Type: `string` + +Accepts a string with JSON and returns a string without comments. + +#### options + +##### whitespace + +Type: `boolean` +Default: `true` + +Replace comments with whitespace instead of stripping them entirely. + + +## Related + +- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module +- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js new file mode 100644 index 0000000..62afa3a --- /dev/null +++ b/node_modules/supports-color/browser.js @@ -0,0 +1,5 @@ +'use strict'; +module.exports = { + stdout: false, + stderr: false +}; diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js new file mode 100644 index 0000000..8880927 --- /dev/null +++ b/node_modules/supports-color/index.js @@ -0,0 +1,129 @@ +'use strict'; +const os = require('os'); +const hasFlag = require('has-flag'); + +const env = process.env; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + const min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Hyper': + return 3; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/supports-color/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/node_modules/supports-color/package.json b/node_modules/supports-color/package.json new file mode 100644 index 0000000..3403fde --- /dev/null +++ b/node_modules/supports-color/package.json @@ -0,0 +1,86 @@ +{ + "_from": "supports-color@^5.2.0", + "_id": "supports-color@5.2.0", + "_inBundle": false, + "_integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "_location": "/supports-color", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "supports-color@^5.2.0", + "name": "supports-color", + "escapedName": "supports-color", + "rawSpec": "^5.2.0", + "saveSpec": null, + "fetchSpec": "^5.2.0" + }, + "_requiredBy": [ + "/chalk", + "/nodemon" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "_shasum": "b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a", + "_spec": "supports-color@^5.2.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/nodemon", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "bundleDependencies": false, + "dependencies": { + "has-flag": "^3.0.0" + }, + "deprecated": false, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "ava": "*", + "import-fresh": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "browser.js" + ], + "homepage": "https://github.com/chalk/supports-color#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "license": "MIT", + "name": "supports-color", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "5.2.0" +} diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md new file mode 100644 index 0000000..f6e4019 --- /dev/null +++ b/node_modules/supports-color/readme.md @@ -0,0 +1,66 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install supports-color +``` + + +## Usage + +```js +const supportsColor = require('supports-color'); + +if (supportsColor.stdout) { + console.log('Terminal stdout supports color'); +} + +if (supportsColor.stdout.has256) { + console.log('Terminal stdout supports 256 colors'); +} + +if (supportsColor.stderr.has16m) { + console.log('Terminal stderr supports 16 million colors (truecolor)'); +} +``` + + +## API + +Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. + +The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: + +- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) +- `.level = 2` and `.has256 = true`: 256 color support +- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) + + +## Info + +It obeys the `--color` and `--no-color` CLI flags. + +Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. + +Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/term-size/index.js b/node_modules/term-size/index.js new file mode 100644 index 0000000..95e410d --- /dev/null +++ b/node_modules/term-size/index.js @@ -0,0 +1,70 @@ +'use strict'; +const path = require('path'); +const execa = require('execa'); + +const create = (columns, rows) => ({ + columns: parseInt(columns, 10), + rows: parseInt(rows, 10) +}); + +module.exports = () => { + const env = process.env; + const stdout = process.stdout; + const stderr = process.stderr; + + if (stdout && stdout.columns && stdout.rows) { + return create(stdout.columns, stdout.rows); + } + + if (stderr && stderr.columns && stderr.rows) { + return create(stderr.columns, stderr.rows); + } + + // These values are static, so not the first choice + if (env.COLUMNS && env.LINES) { + return create(env.COLUMNS, env.LINES); + } + + if (process.platform === 'win32') { + try { + // Binary: https://github.com/sindresorhus/win-term-size + const size = execa.sync(path.join(__dirname, 'vendor/windows/term-size.exe')).stdout.split(/\r?\n/); + + if (size.length === 2) { + return create(size[0], size[1]); + } + } catch (err) {} + } else { + if (process.platform === 'darwin') { + try { + // Binary: https://github.com/sindresorhus/macos-term-size + const size = execa.shellSync(path.join(__dirname, 'vendor/macos/term-size')).stdout.split(/\r?\n/); + + if (size.length === 2) { + return create(size[0], size[1]); + } + } catch (err) {} + } + + // `resize` is preferred as it works even when all file descriptors are redirected + // https://linux.die.net/man/1/resize + try { + const size = execa.sync('resize', ['-u']).stdout.match(/\d+/g); + + if (size.length === 2) { + return create(size[0], size[1]); + } + } catch (err) {} + + try { + const columns = execa.sync('tput', ['cols']).stdout; + const rows = execa.sync('tput', ['lines']).stdout; + + if (columns && rows) { + return create(columns, rows); + } + } catch (err) {} + } + + return create(80, 24); +}; diff --git a/node_modules/term-size/license b/node_modules/term-size/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/term-size/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/node_modules/term-size/package.json b/node_modules/term-size/package.json new file mode 100644 index 0000000..a79047a --- /dev/null +++ b/node_modules/term-size/package.json @@ -0,0 +1,75 @@ +{ + "_from": "term-size@^1.2.0", + "_id": "term-size@1.2.0", + "_inBundle": false, + "_integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "_location": "/term-size", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "term-size@^1.2.0", + "name": "term-size", + "escapedName": "term-size", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/boxen" + ], + "_resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "_shasum": "458b83887f288fc56d6fffbfad262e26638efa69", + "_spec": "term-size@^1.2.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/boxen", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/term-size/issues" + }, + "bundleDependencies": false, + "dependencies": { + "execa": "^0.7.0" + }, + "deprecated": false, + "description": "Reliably get the terminal window size (columns & rows)", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "vendor" + ], + "homepage": "https://github.com/sindresorhus/term-size#readme", + "keywords": [ + "term", + "terminal", + "size", + "console", + "window", + "width", + "height", + "columns", + "rows", + "lines", + "tty", + "redirected" + ], + "license": "MIT", + "name": "term-size", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/term-size.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0" +} diff --git a/node_modules/term-size/readme.md b/node_modules/term-size/readme.md new file mode 100644 index 0000000..dd642ca --- /dev/null +++ b/node_modules/term-size/readme.md @@ -0,0 +1,41 @@ +# term-size [![Build Status: Linux & macOS](https://travis-ci.org/sindresorhus/term-size.svg?branch=master)](https://travis-ci.org/sindresorhus/term-size) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/c3tydg6uedsk0bob/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/term-size/branch/master) + +> Reliably get the terminal window size + +Because [`process.stdout.columns`](https://nodejs.org/api/tty.html#tty_writestream_columns) doesn't exist when run [non-interactively](http://www.tldp.org/LDP/abs/html/intandnonint.html), for example, in a child process or when piped. This module even works when all the TTY file descriptors are redirected! + +Confirmed working on macOS, Linux, and Windows. + + +## Install + +``` +$ npm install --save term-size +``` + + +## Usage + +```js +const termSize = require('term-size'); + +termSize(); +//=> {columns: 143, rows: 24} +``` + + +## API + +### termSize() + +Returns an `Object` with `columns` and `rows` properties. + + +## Related + +- [term-size-cli](https://github.com/sindresorhus/term-size-cli) - CLI for this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/term-size/vendor/macos/term-size b/node_modules/term-size/vendor/macos/term-size new file mode 100755 index 0000000000000000000000000000000000000000..e383cc737f8e232aecd06a8492657b28d5fb9f1c GIT binary patch literal 8760 zcmeHNU1%It6u#SRHO6341ZnVxNpUreke{0B+M;AjmP|;rF+Vj}^){QGGz**EWp`E+ zA2bm9u!O)q`qoE%(+8z5vP2@-H>D3%RImuj1{D-RLBaL=?%dhV&Q|G@FWy7$ob%m# z?zwlqvja2td(I9~5PxETz6rN@b*+Eywmwt`T~ zl3PxdnqA>|Kk9f7YY!j$6FPOgJ9LK^Pp&!Hf>T6aI9@LZ=Kf~1KQVc4O56TcN^UWe zyQm$)@m|vL=JYsmP+DSRK+1CNwM;H8Gr85g!masuPsd} z@6V4%9FEuN2Uqd3%l{V7((y+09O7U+-fveR-p%J~X6m`=nnc7A+|BWxFfb8M3!9 zAGg{jcx;4)){Qn?E)|EfnbdH4Gn)pc+>ge6ygL|ud$RAzQy*Ts_wqx(#{2l3sd(LB z3vJNH(3An(FX!>O4hq+aqj8LTjy!%nN~W4?WBvKflIyGwof*PDGATGg9zo-JS1pgf z;~JA6BZdLPfMLKeU>GnA7zX|i3@qA}?-DO0&dtx-yHB5v2vLh}2{F1?{~UK;+28)N z;Z7z;f3tTNZ`9V@&hgQ`$~W~7FqWu%0_!rZ?MB0$ws#J{gX#88yywc|w>?*$y*5EGT3?d^{{&nI3<$d~u4jo1)+8?g~}J)y2+>iUGb@;hc`_rVBM zV!jdk1re%ixQK)A8;!;qzpM_vru6`=YqTDtb(I!hJ`ZZNCTP76YdGz^I_$ce;%vdm z;SiQ*3W2dYdxp+Z3Q(>h5^HXVZbn87%&VN z1`Gp+0mFb{z%XDKFbw>s3>-OTo#TQ>#wAPFX{T5$i06x>G-8~VnBFRIJ`xN%hM*OoA=;rxH z4C6sO62hlL_)G{-hcN5#!FWp{oC;y?m;c|u+BIvttl_fW$}<}jF#VeG_&@nssBE`$ hBo#-nI6g4iDD~~02@qkn#&%AI*_*;)(f-*0&EJjm8-Ovk_|qj$0nrx_n^ty+eL=UUa_-zByDqxj$ylpl z4*Sue7uROB9bwjjVuSHQ_8DLtfLVZ2fDKRuASAVon%xF8$$nlQ#}l10lY#rin5fYb z1M#5fmDcHpNRt0BW9<}(Ke7lT&~+M~vfCJY{WSP2s#5Z7k-hriqF}@Xpo%_KwcrbyzbfNX(I6cSp3OL2p|96=ctMvEw4^` zhw3PpZ8xS04|Y440r*tm{#wtOuA-!W zi%e5W)1Vl&yYZ;NBk}NU4kp{u|AMh-omd5FQeSm4I$oYN3)}{h)DB6RC%q#|X)P=p zdYbH`y(9kj)QSvRcim9t9s01?ApH$hMr-UAD2+Zf3}%aU`%UO5_fMl!os7L`{c>{h zdSK$4$-0TpI9U2gtQ$>nbgKl0MZ_SdHHHJk@EKsdBhjOa5=r=wYO>qdMqZmrv|1>m zTCkU+8l|yB2^^A}?B?`c=QB2H11dVcXe_=HQnT@1U7dXD9CYQMuU!*g{YZ!WO7!Tq z_rLvkRr*WV@fME9o9q`wk4&Z5L6nq3&?=KwnYGHMRV7+grd8!sMc0TmZz}+sxUy1r>3k=%v*#RiX|g&CaTb=J{+Ak zScl6%$@{USb-0Jv3WbeY5^yvpnhSjFuyyz{B96Yha+pLjuTZ|VS0BifYGIXs5Pjd^ zjehu7)}|jslSb<<8#>}Z+8cXOGDm-AkY+zc`ILD(`YR%vKVaolOX6!)>TZ5-v<#A! zc|2%`rBdsz)h{1+P8fE>KxTFB9mO8X5;VoKb3{(Xg&1u-vh!XU;k%{;eyg%`hcb_H z!Frz$x~f(A6C|3xz7*lR-slo$9sUm3o+eYGdtu17_D@*kKjO9L%C+|NvGcG}+IGmo z6N>q}(R~Jao81KQa;sfPPhjkt$Vg=QJOY!o!>VQ#w-dgju?9W~<-J767t4w95on$g&ck)rg|(3YUFxaZjVo4alr zd(H@g$+cJte72wA4j?aL>Hkz!%+-7hr|%^$${9+A*!wgBwWdLBHc_Q-1V!v{s*s3C zqBZstP~FWlZt?{*t7&0&VAU&E*1{Z0M+b8B zr?87wz_Z|z$FkVcbs$kn9h%*vBD^DO&jW{CZkJcTqrMnDYLZjR>URjgP{VWNsDQkR zsnR(#Aa3NE_P0aRD~TE!NlHtgrG7>?c0k6Y^ND;V$-yqGD>lh{k?eCoPMqqCXo%+{ zQ1>GQ*?E+Y>-m@}B*j!{>e=L0+7`79iX-5E^k`XvTbJZQxm6Phat>CRxnjHK@qsby zkF7AtMzTl-ko+qEv?`2yHu8C%{r=bp$xjs$f~GaIgC-y`48PPPd@ks*T3aoN zMKCNc5wI~bR=468j%Ot62NR=J7{#lQZz+hjjYp`NPraaQu-mTKU@uWitALQ7S4(TC zPN}7>RPW=nLlNDe(Sx=OP+py>{`cxnhCbm+%H*jJCgdy0iW8KL?0)>h=bFC15{6`s zkUu=XD^i7yZU>tqu%zM?;;V&JVH5g1d3mxjxm0jL)HHk_ZN-q{G>slbhx;izrxN6m z>^zoxc_Gk#2O?A2uUV;xAkJ4G(Np>*&RYdA#fX>mn4lpezs{$o{H`Fc$V^&0=<{TL1WP{iP47r` zQd_4p{?#U4MgZSvvNr?TV@W*MNef?n0iHSDz+3{zGaLF%Xjh<3TZB!y1P7 zFFIbU5viJJI&gD1ASCZ_UG{1C;CVB@P(Lt-%~&9JZhQ`E*|v%E~eiYy^_%7Nx~61CD)CP188 zx`n5?8EMo9XDZ_DA4lK%NV+PTc0`XnCsmSz1@nl5L^yO2z?Q&m?d>9Q2{yha3du1; zbi4|C$5{38$?LF@sijLmf#8)l@c9$c58@n<$XP*Yx!i>DG=fV8rZ>|$VS`-&Za;8o zFZ$ZDNxTmE&@@{=rf1*(t*Js9F~Gib8R8Qc960;Y2XUOv)4xD0Qrt8kv{U3#TTGAW^la;WUniF7V(WdYAuB;>?D?@cu!&y1Gl-5-=ST0EenP3%;l&_+hKQ9$ z6F*gb1VnVqJoFJE!!62r%JqVB7oCXXPta3#j$3yUt<5@IM6}bQbvVWwChKq;8Wafl zzomiv$MH$uHuQrYSEftPC}BZ4FFIx_c#tdD&K0aanEoQz6z4&WOy=m&O9`5x>cg?* zotDfKBgn05<`L$Oe~#C#=W`OTp;HqxOer>;Q{IfX9n2*UPPnujPe>c<@UK7}ckYM5 zW^Gc1-DsN>=OOX|25<&FOEPgSPFEoNW7i-#5Eweyj$w)?FGJtDYlz$5h72G2F~hBw zH~JJ|n6){j+%dkG+6yNPDS1l1<6!#RI0{;KIS(prNw3T~b78mM6(ga=By{I2u*!Re z4nUqdcr9e@IZ4na613BK@Sa(jXBDF6(s= z)PlVjRoa8k5&Yv@nSs{7v{)a&uG^hEFV^hyo4Ue_d^K{s1v&pIF&f}3T)>5k!K|5Ph#_dk&$s4fSuWs zSNfY6NC!St)y&Sid1M^F0LWt}U(-VxyHrMp_ZBFGdKyqCCbyyI9mx~R8QQ@x>B5kH zO_DdxgGTpWll7+^=l0rY{9=sjGo+o5%As}|@ls1g>|DycDYWs4LRsvmZXIoBIJs3I z3`zkd_fIe=?^9pFQO_JZE}4`@L9W5;P+4z^9gZB%N$Uh7NO4}!j#isl;uxQnNOnJ? z_Ye7iw;F|xBA9**If4CtOlrWkE9%1J0(9(hBhKVxV?sAk=C)>O8ck{`>BNDYwBkI; zXEAdumoNN%M>gPCC&GLysH&4V7-!>oLLf?YE!Y<>P>f3tMT#;j6w}gIr3!hk(qIDr zd#Cz(f;^?!Bwxo*Mc>E#olKnhH+e!?Ws~K2+hN}D>7G)n>9u$ zo;&f3jpXnT0M9#=jc@YsAf3-q)^X+aP#!xhABw!2DkPt%qzWkxyp?sjT$``VKjz}4 z%a<913-JC|?;j@qFmbWtW1;^^WX@eXY% zD>mRm20meoQGOv8yhBUcZq&y!KRWR~a7_o!VP-m$7p$ta?h4Ja?rJEB9gjB|%cP5{ z4~!`7=B2L<%r0m*Eqy6uj_xr;lNC$fi=;8fH}`6^HGj2+ocyKj0K>_;?znV`$Q_z2;wy9P^mb<3>y24h+5*AYu5h4bD%Lv*ZS z>2IVCC3aIbaLG-C_$)5Jfx z>0!|9*@=A~_PmW~*)RiS58u6M8&1E9LE;)CzP!s*sQ{muG=4g7fd5_Y4?LL#0owU> zP4)4d@(zUAEX^fbbL&Inze?l(xfYLm^5PNiG?ZC)wakhgkW$b+a=hVlqBI+u$NA9= z<^l)1ilzG_lhwz$RPTuVQ{Kqs8~o4dmjv=a(>RVaiY0m5iuWw=+WFuF|Bz1zp2qM1 zXOI>kMCMaMv{M^AS8>=snAnq^k8tJWWqzxlJotUX+BMZG*5u5LD3ZNQnnUrOrX!!G z>=I4hB#(#k)j@<4F2AN9=_owuMvY|O&=_^)*CNH4r;(4*-ykF<%5^vsL}n`ubSy28 z9ltZJ+-`=B^*0ZtIQev!ZXb}iz~id<4t_&>9erIBZ?&64r9+d{j?O_cpymSunT30R zSoZ}S`qc$Tu}G;->-9T&eMGNc*Xu)i{jy$9==DLp-mll=dY#nk@9FiEdi|JQKcd$U z>GfCjdPJ}9)$4oodXU%H9Yzu*ZlopxmG}AO?m~{_{^NXc)8sFY=H6#msA?7N4X99? zH_kr(Y$8ykTiT8}r1{Gg;Ee$4+b|{q=w{^!T%Y{eICs|2-x~qHZ&OcqcUQQ}J#hKr z>PolY&$_xoo*rLV@`U&|#hxx-z#9bC?KvHu3%F%*^;H`0b(_0Z>D-NeS2*kmGq%88 zg#XxAar|*?bg&~AI@s#Kt%2Y`K=gz{!4RzM>T^lG=u|AcT3isOUkfYO(z|K2Jar-N8N=D7g%=qG@GYeani4Gs9tDpeN#Yg?!Rhv7)18 zImXz^&7P3g9~=-vu0W3`%er!nbJeoem1`HW&R+an!4r=7B@sVmkb*%m+~@N9(c(X3 z@bqI4sy%M8V)crqEEm4V4@xe-=nsa&V$dsweLVr6*N0y~bbG{#&eoM39njtG3Q4{* zQnl+;j6Laau$KT+02{6+ngM=58~hnqJaAPF{h&hf^?5|E%jb`TJXaU7dbb;vg~bK^ zVy`PK27;om&(-5u9QJfezF>ff;u>E_in#nYL_DFboDn{FgCTK&Timo&@`Oc~B)W1^ zC~<^Oc^e>Q$+ zGJ2(?!W)n@&A+Tr+4Z9*TTP;g>i=4S24pjli?z>Al!pnCw!h|^nK2e z=Tz0G8!w{9>yW(;+-K=#s?j1EV?`FBx!8Ccs(RdrlDtm9p`@xdq6SUXofd&DLemeh z?NQYm3(%;ym}173xrNK_F4!(a3k$w(EE=odSD&hX9v0LWlbnYDj&W6`pGHECZ58AY z{z*XdY4AjLvLB?E{8$3|V?@C9HstggU&vE?T`{L^1)1r2RsDQE{jFq|<{zO?)*}K( zdKma_rMl75-e;-B^9D;Zp540bG;}g=1#rY$177+*j%sB6|o1!K3G` zxSFT-MnsG8{H;a(IL7}DbuM0R#A_Mi)mZG&TTS%E0L8;kbSYJ(bfZ?=eQEags%*f_JEYeDi5zz=%*S|b>-?uYt*2D#Zh zasziR=|K?zbn(;=Tpen%eLLkuv|#HPrhOk)sT=5Cz`dX$KTjK9r=_Y3y9OLPVPApi zSnegxlhBRD2tCm@=IueWUrzwWp{HHf6E!+5HYB1Rv0E%Ah{DD}zI+TwgZ46_MWNib zA(w<7>GQ^YX(eA;igagMijA$=c4IMQX)f|Ow1T%8yqA(N@J5a8AjQ_WmaF7{kI)aA zPSA7`O^3z28GG4sY4XM}UJ#xpJm8Nc;rDpvMm_^m)Zv=4S;$oGpK91Zw+d zI3J1Ny>c7oB@bucjCUe%rz^*Rx8d@x0^k6w0QdoefCmAO0lo*A0K5e_2C(2h@Uwuc z0jmI;0NVgx1N;+UCtw_K1n^q`6{7?_01RT?zzdK7e+Re+umkWA;1R&T0(JxT z0$u>T40s*z3&3vx(*PstfL%%6uWU>$(}zI*WzXe^01w~FxCwuD=bC{m5x=L|6>$4K z^^7?QN5b_BQN}!k>5y>u8tErH*0R6ln60?s?(4)YYJGT_&+nlY`wES8`nqpz4C00r zKdv*j1P}+8AGeVwyM9SQtH-tZ6f|2{&>D2P^@zZt2MYL=Ydh|pgP}gU5$3`X>mH%Q zBdrefa@*a`E#01ex-*3}h%}Rg4!_6K&+ZaBJ)u5d027uC8k2=ie;B5&arq-2_MmV^ zA#A6h-}{1>?r<4s%)dOQ+c$Gbv3ShrgULn1r@>>&5EE>~Z;r;Dq=AIEfcYpwGP zU0(W&K*nx1aD{NZk8MIbxC!SBLl^FmZ)IU)mu_8iL02Teal-{&1KoXYe}K&wT$_R+ ziCrcjT`|VkRe~mcnc(dY`2v!cwFzEiDRvFPJAlMS>u!Or^@;jRLZ7FvyMHTVUlDY2 z_HBV~@Lf1uJu8Hzklz!)FN&xY=-=1&EkI;u6M3l;cUI)a{dhq)RjQr z|0eW>H+P4mtajQR&z8TW2vnWp$hl*);XAsrnLd42Hv%|Y{(>Vg;$Y=~iEalI2hYy+ zU+_%-9@h-~^D6FU22Uh3FnnaB&upjQ@z*T;K5E^=I8)O-i(aOUHE6A29jpsaCtHP9 z3tP!npx=V$GPJ2YE4=#&Zc4a(>XV+|SJpv~0rDgk!uce?dLYe*bBPC%1I){C)MPcB zrV96GRctAs1~!mItJsC$Z3ImpUfV9vZ-q53^l&IZ>4j7YBVl$m`#k=Ixdt~hdC(4` z?qw0QDp@y|K|Gt-Jjl%2(8MXbxo!QBAoE_R2H#Wc{}*d<;SfFdJM=`7bIn^ hqbO<_h5KZNWJd%-pa>v#e$@H%J4bk&2>z_fe*q!}CAt6r literal 0 HcmV?d00001 diff --git a/node_modules/terraformer-wkt-parser/.npmignore b/node_modules/terraformer-wkt-parser/.npmignore new file mode 100644 index 0000000..6dc90cd --- /dev/null +++ b/node_modules/terraformer-wkt-parser/.npmignore @@ -0,0 +1 @@ +versions \ No newline at end of file diff --git a/node_modules/terraformer-wkt-parser/.travis.yml b/node_modules/terraformer-wkt-parser/.travis.yml new file mode 100644 index 0000000..2c97028 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +sudo: false +before_install: npm install -g grunt-cli +node_js: + - "4" +cache: + directories: + - node_modules diff --git a/node_modules/terraformer-wkt-parser/AUTHORS b/node_modules/terraformer-wkt-parser/AUTHORS new file mode 100644 index 0000000..45d142b --- /dev/null +++ b/node_modules/terraformer-wkt-parser/AUTHORS @@ -0,0 +1,2 @@ +# Primary Authors / Esri +Jerry Sievert (http://legitimatesounding.com) \ No newline at end of file diff --git a/node_modules/terraformer-wkt-parser/CHANGELOG.md b/node_modules/terraformer-wkt-parser/CHANGELOG.md new file mode 100644 index 0000000..28c37d8 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/CHANGELOG.md @@ -0,0 +1,38 @@ +# Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## [unreleased] + +## [1.1.2] - 2016-08-17 + +### Fixed +* Ensured that built files are accessible in root directory when installing via `npm` + +## [1.1.1] - 2016-08-17 + +### Added +* typings for TypeScript folks (thx [@JeffJacobson](https://github.com/JeffJacobson)) [#20](https://github.com/Esri/terraformer-wkt-parser/pull/20) + +## [1.1.0] - 2016-03-11 + +### Added +* Support for coordinates in Scientific Notation + +### Fixed +* Allow module to be loaded in Browser via CommonJS + +## [1.0.1] - 2015-06-02 +### Fixed +* Better error parsing + +## [1.0.0] - 2013-11-12 + +Initial Release + +[unreleased]: https://github.com/Esri/terraformer-wkt-parser/compare/v1.1.2...HEAD +[1.1.2]: https://github.com/Esri/terraformer-wkt-parser/compare/v1.1.1...v1.1.2 +[1.1.1]: https://github.com/Esri/terraformer-wkt-parser/compare/v1.1.0...v1.1.1 +[1.1.0]: https://github.com/Esri/terraformer-wkt-parser/compare/v1.0.1...v1.1.0 +[1.0.1]: https://github.com/Esri/terraformer-wkt-parser/compare/v1.0.0...v1.0.1 +[1.0.0]: https://github.com/Esri/terraformer-wkt-parser/releases/tag/v1.0.0 diff --git a/node_modules/terraformer-wkt-parser/Gruntfile.js b/node_modules/terraformer-wkt-parser/Gruntfile.js new file mode 100644 index 0000000..9a67dd9 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/Gruntfile.js @@ -0,0 +1,135 @@ +var fs = require('fs'); +var jison = require('jison'); + +module.exports = function (grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + + meta: { + banner: '/*! Terraformer JS - <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' + + '* https://github.com/esri/terraformer-wkt-parser\n' + + '* Copyright (c) <%= grunt.template.today("yyyy") %> Esri, Inc.\n' + + '* Licensed MIT */' + }, + + uglify: { + options: { + report: 'gzip', + banner: '<%= meta.banner %>' + }, + wkt: { + src: ["terraformer-wkt-parser.js"], + dest: 'terraformer-wkt-parser.min.js' + } + }, + + vows: { + all: { + options: { + reporter: "spec", + verbose: true, + silent: false, + colors: true + }, + src: [ "test/*.js" ] + } + }, + + jasmine: { + coverage: { + src: [ + "terraformer-wkt-parser.js" + ], + options: { + specs: 'spec/*Spec.js', + helpers: [ + "node_modules/terraformer/terraformer.js" + ], + //keepRunner: true, + outfile: 'SpecRunner.html', + template: require('grunt-template-jasmine-istanbul'), + templateOptions: { + coverage: './coverage/coverage.json', + report: './coverage', + // due to the generated aspects of the parser, thresholds are much lower + thresholds: { + lines: 70, + statements: 70, + branches: 70, + // to do: get this back above 70 + functions: 65 + } + } + } + } + }, + + jasmine_node: { + options: { + forceExit: true, + match: '.', + matchall: false, + extensions: 'js', + specNameMatcher: 'Spec', + helperNameMatcher: 'Helpers' + }, + all: ['spec/'] + }, + + s3: { + options: { + key: '<%= aws.key %>', + secret: '<%= aws.secret %>', + bucket: '<%= aws.bucket %>', + access: 'public-read', + headers: { + // 1 Year cache policy (1000 * 60 * 60 * 24 * 365) + "Cache-Control": "max-age=630720000, public", + "Expires": new Date(Date.now() + 63072000000).toUTCString() + } + }, + dev: { + upload: [ + { + src: 'terraformer-wkt-parser.min.js', + dest: 'terraformer-wkt-parser/<%= pkg.version %>/terraformer-wkt-parser.min.js' + } + ] + }, + } + }); + + var awsExists = fs.existsSync(process.env.HOME + '/terraformer-s3.json'); + + if (awsExists) { + grunt.config.set('aws', grunt.file.readJSON(process.env.HOME + '/terraformer-s3.json')); + } + + grunt.registerTask('wkt-parser', 'Building WKT Parser', function() { + var grammar = fs.readFileSync('./src/wkt.yy', 'utf8'); + + var wrapper = fs.readFileSync('./src/module-source.js', 'utf8'); + + var Parser = jison.Parser; + var parser = new Parser(grammar); + + // generate source, ready to be written to disk + var parserSource = parser.generate({ moduleType: "js" }); + + wrapper = wrapper.replace('"SOURCE";', parserSource); + + fs.writeFileSync("./terraformer-wkt-parser.js", wrapper, "utf8"); + + grunt.log.write('Files created.\n'); + }); + + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks("grunt-vows"); + grunt.loadNpmTasks('grunt-contrib-jasmine'); + grunt.loadNpmTasks('grunt-jasmine-node'); + grunt.loadNpmTasks('grunt-s3'); + + grunt.registerTask('test', [ 'wkt-parser', 'vows', 'jasmine', 'jasmine_node' ]); + grunt.registerTask('default', [ 'test' ]); + grunt.registerTask('version', [ 'test', 'uglify', 's3' ]); +}; diff --git a/node_modules/terraformer-wkt-parser/LICENSE b/node_modules/terraformer-wkt-parser/LICENSE new file mode 100644 index 0000000..7365790 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2013 Esri, Inc + +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/node_modules/terraformer-wkt-parser/README.md b/node_modules/terraformer-wkt-parser/README.md new file mode 100644 index 0000000..b4845c9 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/README.md @@ -0,0 +1,68 @@ +# Terraformer Well-Known Text Parser + +[![Build Status](https://travis-ci.org/Esri/terraformer-wkt-parser.svg?branch=master)](https://travis-ci.org/Esri/terraformer-wkt-parser) + +> Two way conversion between [GeoJSON](http://geojson.org/geojson-spec.html) and WKT. Part of the [Terraformer](http://terraformer.io) project. + +## Installing + +### Node.js + + $ npm install terraformer-wkt-parser + +### Browser + +In the browser, Terraformer is required to be used as well. + + $ bower install terraformer-wkt-parser + +## Documentation + +For full documentation check out the [offical website](http://terraformer.io/wkt-parser/). + +```js +var wkt = require('terraformer-wkt-parser'); + +// parse a WKT file, convert it into a terraformer primitive +var primitive = wkt.parse('LINESTRING (30 10, 10 30, 40 40)'); + +// take a terraformer primitive and convert it into a WKT representation +var polygon = wkt.convert( + { + "type": "Polygon", + "coordinates": [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], + [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ] + ] + } +); +``` + +```html + + + + + + + + +``` + +## Resources + +* [Terraformer Website](http://terraformer.io) +* [twitter@EsriPDX](http://twitter.com/esripdx) + +## Issues + +Find a bug or want to request a new feature? Please let us know by submitting an issue. + +## Contributing + +Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing). + +[](Esri Tags: Terraformer GeoJSON WKT Well-Known-Text) +[](Esri Language: JavaScript) diff --git a/node_modules/terraformer-wkt-parser/bower.json b/node_modules/terraformer-wkt-parser/bower.json new file mode 100644 index 0000000..8d502ac --- /dev/null +++ b/node_modules/terraformer-wkt-parser/bower.json @@ -0,0 +1,8 @@ +{ + "name": "terraformer-wkt-parser", + "main": "terraformer-wkt-parser.min.js", + "ignore" : ["versions", "spec", "examples", "test"], + "dependencies": { + "terraformer": "~1.0.5" + } +} diff --git a/node_modules/terraformer-wkt-parser/coverage/__root__/index.html b/node_modules/terraformer-wkt-parser/coverage/__root__/index.html new file mode 100644 index 0000000..eebf33f --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/__root__/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for __root__/ + + + + + + + +
    +
    +

    + all files __root__/ +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    terraformer-wkt-parser.js
    78.64%405/51574.38%209/28165.31%32/4979.17%399/504
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/__root__/terraformer-wkt-parser.js.html b/node_modules/terraformer-wkt-parser/coverage/__root__/terraformer-wkt-parser.js.html new file mode 100644 index 0000000..bca77d8 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/__root__/terraformer-wkt-parser.js.html @@ -0,0 +1,2348 @@ + + + + Code coverage report for terraformer-wkt-parser.js + + + + + + + +
    +
    +

    + all files / __root__/ terraformer-wkt-parser.js +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +  +  + +  + +  + +  +  + +  +  +  + +  +  + + +  +  +  +  +  +  +  +500× +500× + +  + +  + +  + +  + +  + +  +71× +71× +56× +56× +29× +29× +82× +82× +30× +30× + + +19× +19× +25× +25× + + + + + + + + + + +28× +28× +16× +16× + + + + +10× +10× +32× +32× +12× +12× + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  +  +  +  +  +  +  +  +37× +37× +37× +37× +37× +37× +  +37× +37× +37× +37× +  + +  +  +  +  + +816× +816× +816× +  +  +816× +  +37× +37× +1316× +1316× +74× +  +1242× +816× +  +1242× +  +1316× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1316× +  +  +1316× +  +816× +816× +816× +816× +816× +816× +816× +816× +816× +816× +816× +  +  +  +  +  +816× +  +500× +500× +500× +500× +  +  +500× +500× +37× +  +463× +463× +463× +463× +  +463× +463× +463× +463× +463× +463× +  +  +  +  +  +  +  + + + +  +  +  +  +  +  +  +  +37× +37× +37× +37× +37× +37× +37× +37× +37× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1258× +  +  +1258× +  +1258× +  +  +  +  +  +1258× +1258× +1258× +  +1258× +1258× +5168× +5168× +1258× +1258× +1258× +  +  +1258× +1258× +1258× +1258× +  +  +  +1258× +1258× +1258× +1258× +1258× +  +  +1258× +1258× +1258× +1258× +1258× +1258× +442× +  +  +  +  +  +  +  +  +  +1258× +1258× +816× +  +442× +  +  +  +  +  +  +  +  +  +1258× +  +  +  +  +  +  +  + + +  +  +1258× +1258× +  +442× +82× +  +82× +  +426× +  + +  + +  + +  + +  + +  + +  +125× +  + +  + +  + +  + +  +37× +  +  +  +  +  + + + + + + +  +  + +156× +156× +  +  + +114× +114× +  +  +  +  +114× +  +  + +  +  +  + +25× +25× +  +  + +25× +  +25× +107× +  +  +25× +  +  + +19× +19× +  +  + + +  + +  +  + +19× +  +19× +25× +  +  +19× +13× +  + +  +  +  + + + +  +  + + +  + +  +  + + +  + +10× +  +  + +  +  + +  +  +  + +37× +  +37× +37× +  +  +  +  +37× +  +  + +28× +  +28× +108× +  +  +28× +  +28× +  +  +  + + +  + + +  + + +  + + +  + +  + +  + +  +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + +  +  + + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + +  +  + + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + + + +12× +  +  + + +  + +  +  + + +  + +  +  + +31× +  + +  + +  + +  + +  + +  + +  + +  +  +  +  +  + + + + +  + +  + 
    (function (root, factory) {
    + 
    +  // Node.
    +  Iif(typeof module === 'object' && typeof module.exports === 'object') {
    +    exports = module.exports = factory(require("terraformer"));
    +  } else Eif(typeof navigator === "object") {
    +    // Browser Global.
    +    Iif (!root.Terraformer){
    +      throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer")
    +    }
    +    root.Terraformer.WKT = factory(root.Terraformer);
    +  }
    + 
    +}(this, function(Terraformer) {
    +  var exports = { };
    + 
    +  /* Jison generated parser */
    +var parser = (function(){
    +var parser = {trace: function trace() { },
    +yy: {},
    +symbols_: {"error":2,"expressions":3,"point":4,"EOF":5,"linestring":6,"polygon":7,"multipoint":8,"multilinestring":9,"multipolygon":10,"coordinate":11,"DOUBLE_TOK":12,"ptarray":13,"COMMA":14,"ring_list":15,"ring":16,"(":17,")":18,"POINT":19,"Z":20,"ZM":21,"M":22,"EMPTY":23,"point_untagged":24,"polygon_list":25,"polygon_untagged":26,"point_list":27,"LINESTRING":28,"POLYGON":29,"MULTIPOINT":30,"MULTILINESTRING":31,"MULTIPOLYGON":32,"$accept":0,"$end":1},
    +terminals_: {2:"error",5:"EOF",12:"DOUBLE_TOK",14:"COMMA",17:"(",18:")",19:"POINT",20:"Z",21:"ZM",22:"M",23:"EMPTY",28:"LINESTRING",29:"POLYGON",30:"MULTIPOINT",31:"MULTILINESTRING",32:"MULTIPOLYGON"},
    +productions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]],
    +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$
    +/**/) {
    + 
    +var $0 = $.length - 1;
    +switch (yystate) {
    +case 1: return $[$0-1]; 
    +break;
    +case 2: return $[$0-1]; 
    +break;
    +case 3: return $[$0-1]; 
    +break;
    +case 4: return $[$0-1]; 
    +break;
    +case 5: return $[$0-1]; 
    +break;
    +case 6: return $[$0-1]; 
    +break;
    +case 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 10: this.$ = $[$0-2].addPoint($[$0]); 
    +break;
    +case 11: this.$ = $[$0]; 
    +break;
    +case 12: this.$ = $[$0-2].addRing($[$0]); 
    +break;
    +case 13: this.$ = new RingList($[$0]); 
    +break;
    +case 14: this.$ = new Ring($[$0-1]); 
    +break;
    +case 15: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0] }; 
    +break;
    +case 16: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true } }; 
    +break;
    +case 17: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true, m: true } }; 
    +break;
    +case 18: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { m: true } }; 
    +break;
    +case 19: this.$ = { "type": "Point", "coordinates": [ ] }; 
    +break;
    +case 20: this.$ = $[$0]; 
    +break;
    +case 21: this.$ = $[$0-1]; 
    +break;
    +case 22: this.$ = $[$0-2].addPolygon($[$0]); 
    +break;
    +case 23: this.$ = new PolygonList($[$0]); 
    +break;
    +case 24: this.$ = $[$0-1]; 
    +break;
    +case 25: this.$ = $[$0-2].addPoint($[$0]); 
    +break;
    +case 26: this.$ = $[$0]; 
    +break;
    +case 27: this.$ = { "type": "LineString", "coordinates": $[$0-1].data }; 
    +break;
    +case 28: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true } }; 
    +break;
    +case 29: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { m: true } }; 
    +break;
    +case 30: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; 
    +break;
    +case 31: this.$ = { "type": "LineString", "coordinates": [ ] }; 
    +break;
    +case 32: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 33: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 34: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 35: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 36: this.$ = { "type": "Polygon", "coordinates": [ ] }; 
    +break;
    +case 37: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data }; 
    +break;
    +case 38: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true } }; 
    +break;
    +case 39: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { m: true } }; 
    +break;
    +case 40: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; 
    +break;
    +case 41: this.$ = { "type": "MultiPoint", "coordinates": [ ] } 
    +break;
    +case 42: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 43: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 44: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 45: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 46: this.$ = { "type": "MultiLineString", "coordinates": [ ] }; 
    +break;
    +case 47: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 48: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 49: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 50: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 51: this.$ = { "type": "MultiPolygon", "coordinates": [ ] }; 
    +break;
    +}
    +},
    +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,19:[1,8],28:[1,9],29:[1,10],30:[1,11],31:[1,12],32:[1,13]},{1:[3]},{5:[1,14]},{5:[1,15]},{5:[1,16]},{5:[1,17]},{5:[1,18]},{5:[1,19]},{17:[1,20],20:[1,21],21:[1,22],22:[1,23],23:[1,24]},{17:[1,25],20:[1,26],21:[1,28],22:[1,27],23:[1,29]},{17:[1,30],20:[1,31],21:[1,33],22:[1,32],23:[1,34]},{17:[1,35],20:[1,36],21:[1,38],22:[1,37],23:[1,39]},{17:[1,40],20:[1,41],21:[1,43],22:[1,42],23:[1,44]},{17:[1,45],20:[1,46],21:[1,48],22:[1,47],23:[1,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{11:51,12:[1,52],13:50},{17:[1,53]},{17:[1,54]},{17:[1,55]},{5:[2,19]},{11:58,12:[1,52],17:[1,59],24:57,27:56},{17:[1,60]},{17:[1,61]},{17:[1,62]},{5:[2,31]},{15:63,16:64,17:[1,65]},{17:[1,66]},{17:[1,67]},{17:[1,68]},{5:[2,36]},{11:58,12:[1,52],17:[1,59],24:57,27:69},{17:[1,70]},{17:[1,71]},{17:[1,72]},{5:[2,41]},{15:73,16:64,17:[1,65]},{17:[1,74]},{17:[1,75]},{17:[1,76]},{5:[2,46]},{17:[1,79],25:77,26:78},{17:[1,80]},{17:[1,81]},{17:[1,82]},{5:[2,51]},{14:[1,84],18:[1,83]},{14:[2,11],18:[2,11]},{12:[1,85]},{11:51,12:[1,52],13:86},{11:51,12:[1,52],13:87},{11:51,12:[1,52],13:88},{14:[1,90],18:[1,89]},{14:[2,26],18:[2,26]},{14:[2,20],18:[2,20]},{11:91,12:[1,52]},{11:58,12:[1,52],17:[1,59],24:57,27:92},{11:58,12:[1,52],17:[1,59],24:57,27:93},{11:58,12:[1,52],17:[1,59],24:57,27:94},{14:[1,96],18:[1,95]},{14:[2,13],18:[2,13]},{11:51,12:[1,52],13:97},{15:98,16:64,17:[1,65]},{15:99,16:64,17:[1,65]},{15:100,16:64,17:[1,65]},{14:[1,90],18:[1,101]},{11:58,12:[1,52],17:[1,59],24:57,27:102},{11:58,12:[1,52],17:[1,59],24:57,27:103},{11:58,12:[1,52],17:[1,59],24:57,27:104},{14:[1,96],18:[1,105]},{15:106,16:64,17:[1,65]},{15:107,16:64,17:[1,65]},{15:108,16:64,17:[1,65]},{14:[1,110],18:[1,109]},{14:[2,23],18:[2,23]},{15:111,16:64,17:[1,65]},{17:[1,79],25:112,26:78},{17:[1,79],25:113,26:78},{17:[1,79],25:114,26:78},{5:[2,15]},{11:115,12:[1,52]},{12:[1,116],14:[2,7],18:[2,7]},{14:[1,84],18:[1,117]},{14:[1,84],18:[1,118]},{14:[1,84],18:[1,119]},{5:[2,27]},{11:58,12:[1,52],17:[1,59],24:120},{18:[1,121]},{14:[1,90],18:[1,122]},{14:[1,90],18:[1,123]},{14:[1,90],18:[1,124]},{5:[2,32]},{16:125,17:[1,65]},{14:[1,84],18:[1,126]},{14:[1,96],18:[1,127]},{14:[1,96],18:[1,128]},{14:[1,96],18:[1,129]},{5:[2,37]},{14:[1,90],18:[1,130]},{14:[1,90],18:[1,131]},{14:[1,90],18:[1,132]},{5:[2,42]},{14:[1,96],18:[1,133]},{14:[1,96],18:[1,134]},{14:[1,96],18:[1,135]},{5:[2,47]},{17:[1,79],26:136},{14:[1,96],18:[1,137]},{14:[1,110],18:[1,138]},{14:[1,110],18:[1,139]},{14:[1,110],18:[1,140]},{14:[2,10],18:[2,10]},{12:[1,141],14:[2,8],18:[2,8]},{5:[2,16]},{5:[2,17]},{5:[2,18]},{14:[2,25],18:[2,25]},{14:[2,21],18:[2,21]},{5:[2,28]},{5:[2,29]},{5:[2,30]},{14:[2,12],18:[2,12]},{14:[2,14],18:[2,14]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,43]},{5:[2,44]},{5:[2,45]},{14:[2,22],18:[2,22]},{14:[2,24],18:[2,24]},{5:[2,48]},{5:[2,49]},{5:[2,50]},{14:[2,9],18:[2,9]}],
    +defaultActions: {14:[2,1],15:[2,2],16:[2,3],17:[2,4],18:[2,5],19:[2,6],24:[2,19],29:[2,31],34:[2,36],39:[2,41],44:[2,46],49:[2,51],83:[2,15],89:[2,27],95:[2,32],101:[2,37],105:[2,42],109:[2,47],117:[2,16],118:[2,17],119:[2,18],122:[2,28],123:[2,29],124:[2,30],127:[2,33],128:[2,34],129:[2,35],130:[2,38],131:[2,39],132:[2,40],133:[2,43],134:[2,44],135:[2,45],138:[2,48],139:[2,49],140:[2,50]},
    +parseError: function parseError(str, hash) {
    +    throw new Error(str);
    +},
    +parse: function parse(input) {
    +    var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
    +    this.lexer.setInput(input);
    +    this.lexer.yy = this.yy;
    +    this.yy.lexer = this.lexer;
    +    this.yy.parser = this;
    +    Iif (typeof this.lexer.yylloc == "undefined")
    +        this.lexer.yylloc = {};
    +    var yyloc = this.lexer.yylloc;
    +    lstack.push(yyloc);
    +    var ranges = this.lexer.options && this.lexer.options.ranges;
    +    Iif (typeof this.yy.parseError === "function")
    +        this.parseError = this.yy.parseError;
    +    function popStack(n) {
    +        stack.length = stack.length - 2 * n;
    +        vstack.length = vstack.length - n;
    +        lstack.length = lstack.length - n;
    +    }
    +    function lex() {
    +        var token;
    +        token = self.lexer.lex() || 1;
    +        Iif (typeof token !== "number") {
    +            token = self.symbols_[token] || token;
    +        }
    +        return token;
    +    }
    +    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
    +    while (true) {
    +        state = stack[stack.length - 1];
    +        if (this.defaultActions[state]) {
    +            action = this.defaultActions[state];
    +        } else {
    +            if (symbol === null || typeof symbol == "undefined") {
    +                symbol = lex();
    +            }
    +            action = table[state] && table[state][symbol];
    +        }
    +        Iif (typeof action === "undefined" || !action.length || !action[0]) {
    +            var errStr = "";
    +            if (!recovering) {
    +                expected = [];
    +                for (p in table[state])
    +                    if (this.terminals_[p] && p > 2) {
    +                        expected.push("'" + this.terminals_[p] + "'");
    +                    }
    +                if (this.lexer.showPosition) {
    +                    errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
    +                } else {
    +                    errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
    +                }
    +                this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
    +            }
    +        }
    +        Iif (action[0] instanceof Array && action.length > 1) {
    +            throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
    +        }
    +        switch (action[0]) {
    +        case 1:
    +            stack.push(symbol);
    +            vstack.push(this.lexer.yytext);
    +            lstack.push(this.lexer.yylloc);
    +            stack.push(action[1]);
    +            symbol = null;
    +            Eif (!preErrorSymbol) {
    +                yyleng = this.lexer.yyleng;
    +                yytext = this.lexer.yytext;
    +                yylineno = this.lexer.yylineno;
    +                yyloc = this.lexer.yylloc;
    +                Iif (recovering > 0)
    +                    recovering--;
    +            } else {
    +                symbol = preErrorSymbol;
    +                preErrorSymbol = null;
    +            }
    +            break;
    +        case 2:
    +            len = this.productions_[action[1]][1];
    +            yyval.$ = vstack[vstack.length - len];
    +            yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
    +            Iif (ranges) {
    +                yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
    +            }
    +            r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
    +            if (typeof r !== "undefined") {
    +                return r;
    +            }
    +            Eif (len) {
    +                stack = stack.slice(0, -1 * len * 2);
    +                vstack = vstack.slice(0, -1 * len);
    +                lstack = lstack.slice(0, -1 * len);
    +            }
    +            stack.push(this.productions_[action[1]][0]);
    +            vstack.push(yyval.$);
    +            lstack.push(yyval._$);
    +            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
    +            stack.push(newState);
    +            break;
    +        case 3:
    +            return true;
    +        }
    +    }
    +    return true;
    +}
    +};
    +undefined/* Jison generated lexer */
    +var lexer = (function(){
    +var lexer = ({EOF:1,
    +parseError:function parseError(str, hash) {
    +        if (this.yy.parser) {
    +            this.yy.parser.parseError(str, hash);
    +        } else {
    +            throw new Error(str);
    +        }
    +    },
    +setInput:function (input) {
    +        this._input = input;
    +        this._more = this._less = this.done = false;
    +        this.yylineno = this.yyleng = 0;
    +        this.yytext = this.matched = this.match = '';
    +        this.conditionStack = ['INITIAL'];
    +        this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
    +        Iif (this.options.ranges) this.yylloc.range = [0,0];
    +        this.offset = 0;
    +        return this;
    +    },
    +input:function () {
    +        var ch = this._input[0];
    +        this.yytext += ch;
    +        this.yyleng++;
    +        this.offset++;
    +        this.match += ch;
    +        this.matched += ch;
    +        var lines = ch.match(/(?:\r\n?|\n).*/g);
    +        if (lines) {
    +            this.yylineno++;
    +            this.yylloc.last_line++;
    +        } else {
    +            this.yylloc.last_column++;
    +        }
    +        if (this.options.ranges) this.yylloc.range[1]++;
    + 
    +        this._input = this._input.slice(1);
    +        return ch;
    +    },
    +unput:function (ch) {
    +        var len = ch.length;
    +        var lines = ch.split(/(?:\r\n?|\n)/g);
    + 
    +        this._input = ch + this._input;
    +        this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
    +        //this.yyleng -= len;
    +        this.offset -= len;
    +        var oldLines = this.match.split(/(?:\r\n?|\n)/g);
    +        this.match = this.match.substr(0, this.match.length-1);
    +        this.matched = this.matched.substr(0, this.matched.length-1);
    + 
    +        if (lines.length-1) this.yylineno -= lines.length-1;
    +        var r = this.yylloc.range;
    + 
    +        this.yylloc = {first_line: this.yylloc.first_line,
    +          last_line: this.yylineno+1,
    +          first_column: this.yylloc.first_column,
    +          last_column: lines ?
    +              (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
    +              this.yylloc.first_column - len
    +          };
    + 
    +        if (this.options.ranges) {
    +            this.yylloc.range = [r[0], r[0] + this.yyleng - len];
    +        }
    +        return this;
    +    },
    +more:function () {
    +        this._more = true;
    +        return this;
    +    },
    +less:function (n) {
    +        this.unput(this.match.slice(n));
    +    },
    +pastInput:function () {
    +        var past = this.matched.substr(0, this.matched.length - this.match.length);
    +        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
    +    },
    +upcomingInput:function () {
    +        var next = this.match;
    +        if (next.length < 20) {
    +            next += this._input.substr(0, 20-next.length);
    +        }
    +        return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
    +    },
    +showPosition:function () {
    +        var pre = this.pastInput();
    +        var c = new Array(pre.length + 1).join("-");
    +        return pre + this.upcomingInput() + "\n" + c+"^";
    +    },
    +next:function () {
    +        Iif (this.done) {
    +            return this.EOF;
    +        }
    +        if (!this._input) this.done = true;
    + 
    +        var token,
    +            match,
    +            tempMatch,
    +            index,
    +            col,
    +            lines;
    +        Eif (!this._more) {
    +            this.yytext = '';
    +            this.match = '';
    +        }
    +        var rules = this._currentRules();
    +        for (var i=0;i < rules.length; i++) {
    +            tempMatch = this._input.match(this.rules[rules[i]]);
    +            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
    +                match = tempMatch;
    +                index = i;
    +                Eif (!this.options.flex) break;
    +            }
    +        }
    +        Eif (match) {
    +            lines = match[0].match(/(?:\r\n?|\n).*/g);
    +            Iif (lines) this.yylineno += lines.length;
    +            this.yylloc = {first_line: this.yylloc.last_line,
    +                           last_line: this.yylineno+1,
    +                           first_column: this.yylloc.last_column,
    +                           last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
    +            this.yytext += match[0];
    +            this.match += match[0];
    +            this.matches = match;
    +            this.yyleng = this.yytext.length;
    +            Iif (this.options.ranges) {
    +                this.yylloc.range = [this.offset, this.offset += this.yyleng];
    +            }
    +            this._more = false;
    +            this._input = this._input.slice(match[0].length);
    +            this.matched += match[0];
    +            token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
    +            Iif (this.done && this._input) this.done = false;
    +            if (token) return token;
    +            else return;
    +        }
    +        if (this._input === "") {
    +            return this.EOF;
    +        } else {
    +            return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
    +                    {text: "", token: null, line: this.yylineno});
    +        }
    +    },
    +lex:function lex() {
    +        var r = this.next();
    +        if (typeof r !== 'undefined') {
    +            return r;
    +        } else {
    +            return this.lex();
    +        }
    +    },
    +begin:function begin(condition) {
    +        this.conditionStack.push(condition);
    +    },
    +popState:function popState() {
    +        return this.conditionStack.pop();
    +    },
    +_currentRules:function _currentRules() {
    +        return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
    +    },
    +topState:function () {
    +        return this.conditionStack[this.conditionStack.length-2];
    +    },
    +pushState:function begin(condition) {
    +        this.begin(condition);
    +    }});
    +lexer.options = {};
    +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START
    +/**/) {
    + 
    +var YYSTATE=YY_START
    +switch($avoiding_name_collisions) {
    +case 0:// ignore
    +break;
    +case 1:return 17
    +break;
    +case 2:return 18
    +break;
    +case 3:return 12
    +break;
    +case 4:return 19
    +break;
    +case 5:return 28
    +break;
    +case 6:return 29
    +break;
    +case 7:return 30
    +break;
    +case 8:return 31
    +break;
    +case 9:return 32
    +break;
    +case 10:return 14
    +break;
    +case 11:return 23
    +break;
    +case 12:return 22
    +break;
    +case 13:return 20
    +break;
    +case 14:return 21
    +break;
    +case 15:return 5
    +break;
    +case 16:return "INVALID"
    +break;
    +}
    +};
    +lexer.rules = [/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/];
    +lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"inclusive":true}};
    +return lexer;})()
    +parser.lexer = lexer;
    +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
    +return new Parser;
    +})();
    + 
    +  function PointArray (point) {
    +    this.data = [ point ];
    +    this.type = 'PointArray';
    +  }
    + 
    +  PointArray.prototype.addPoint = function (point) {
    +    Eif (point.type === 'PointArray') {
    +      this.data = this.data.concat(point.data);
    +    } else {
    +      this.data.push(point);
    +    }
    + 
    +    return this;
    +  };
    + 
    +  PointArray.prototype.toJSON = function () {
    +    return this.data;
    +  };
    + 
    +  function Ring (point) {
    +    this.data = point;
    +    this.type = 'Ring';
    +  }
    + 
    +  Ring.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.data.length; i++) {
    +      data.push(this.data.data[i]);
    +    }
    + 
    +    return data;
    +  };
    + 
    +  function RingList (ring) {
    +    this.data = [ ring ];
    +    this.type = 'RingList';
    +  }
    + 
    +  RingList.prototype.addRing = function (ring) {
    +    this.data.push(ring);
    + 
    +    return this;
    +  };
    + 
    +  RingList.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.length; i++) {
    +      data.push(this.data[i].toJSON());
    +    }
    + 
    +    if (data.length === 1) {
    +      return data;
    +    } else {
    +      return data;
    +    }
    +  };
    + 
    +  function PolygonList (polygon) {
    +    this.data = [ polygon ];
    +    this.type = 'PolygonList';
    +  }
    + 
    +  PolygonList.prototype.addPolygon = function (polygon) {
    +    this.data.push(polygon);
    + 
    +    return this;
    +  };
    + 
    +  PolygonList.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.length; i++) {
    +      data = data.concat( [ this.data[i].toJSON() ] );
    +    }
    + 
    +    return data;
    +  };
    + 
    +  function _parse () {
    +    return parser.parse.apply(parser, arguments);
    +  }
    + 
    +  function parse (element) {
    +    var res, primitive;
    + 
    +    try {
    +      res = parser.parse(element);
    +    } catch (err) {
    +      throw Error("Unable to parse: " + err);
    +    }
    + 
    +    return Terraformer.Primitive(res);
    +  }
    + 
    +  function arrayToRing (arr) {
    +    var parts = [ ], ret = '';
    + 
    +    for (var i = 0; i < arr.length; i++) {
    +      parts.push(arr[i].join(' '));
    +    }
    + 
    +    ret += '(' + parts.join(', ') + ')';
    + 
    +    return ret;
    + 
    +  }
    + 
    +  function pointToWKTPoint (primitive) {
    +    var ret = 'POINT ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates.length === 3) {
    +      // 3d or time? default to 3d
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates.length === 4) {
    +      // 3d and time
    +      ret += 'ZM ';
    +    }
    + 
    +    // include coordinates
    +    ret += '(' + primitive.coordinates.join(' ') + ')';
    + 
    +    return ret;
    +  }
    + 
    +  function lineStringToWKTLineString (primitive) {
    +    var ret = 'LINESTRING ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += arrayToRing(primitive.coordinates);
    + 
    +    return ret;
    +  }
    + 
    +  function polygonToWKTPolygon (primitive) {
    +    var ret = 'POLYGON ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var parts = [ ];
    +    for (var i = 0; i < primitive.coordinates.length; i++) {
    +      parts.push(arrayToRing(primitive.coordinates[i]));
    +    }
    + 
    +    ret += parts.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function multiPointToWKTMultiPoint (primitive) {
    +    var ret = 'MULTIPOINT ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += arrayToRing(primitive.coordinates);
    + 
    +    return ret;
    +  }
    + 
    +  function multiLineStringToWKTMultiLineString (primitive) {
    +    var ret = 'MULTILINESTRING ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var parts = [ ];
    +    for (var i = 0; i < primitive.coordinates.length; i++) {
    +      parts.push(arrayToRing(primitive.coordinates[i]));
    +    }
    + 
    +    ret += parts.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function multiPolygonToWKTMultiPolygon (primitive) {
    +    var ret = 'MULTIPOLYGON ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var inner = [ ];
    +    for (var c = 0; c < primitive.coordinates.length; c++) {
    +      var it = '(';
    +      var parts = [ ];
    +      for (var i = 0; i < primitive.coordinates[c].length; i++) {
    +        parts.push(arrayToRing(primitive.coordinates[c][i]));
    +      }
    + 
    +      it += parts.join(', ');
    +      it += ')';
    + 
    +      inner.push(it);
    +    }
    + 
    +    ret += inner.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function convert (primitive) {
    +    switch (primitive.type) {
    +      case 'Point':
    +        return pointToWKTPoint(primitive);
    +      case 'LineString':
    +        return lineStringToWKTLineString(primitive);
    +      case 'Polygon':
    +        return polygonToWKTPolygon(primitive);
    +      case 'MultiPoint':
    +        return multiPointToWKTMultiPoint(primitive);
    +      case 'MultiLineString':
    +        return multiLineStringToWKTMultiLineString(primitive);
    +      case 'MultiPolygon':
    +        return multiPolygonToWKTMultiPolygon(primitive);
    +      default:
    +        throw Error ("Unknown Type: " + primitive.type);
    +    }
    +  }
    + 
    + 
    + 
    +  exports.parser  = parser;
    +  exports.Parser  = parser.Parser;
    +  exports.parse   = parse;
    +  exports.convert = convert;
    + 
    +  return exports;
    +}));
    + 
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/base.css b/node_modules/terraformer-wkt-parser/coverage/base.css new file mode 100644 index 0000000..29737bc --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/base.css @@ -0,0 +1,213 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + 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; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.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; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.medium .chart { border:1px solid #f9cd0b; } +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } +/* light gray */ +span.cline-neutral { background: #eaeaea; } + +.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; } + + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.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; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/node_modules/terraformer-wkt-parser/coverage/coverage.json b/node_modules/terraformer-wkt-parser/coverage/coverage.json new file mode 100644 index 0000000..32c80c0 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/coverage.json @@ -0,0 +1 @@ +{"./terraformer-wkt-parser.js":{"path":"./terraformer-wkt-parser.js","s":{"1":1,"2":1,"3":0,"4":1,"5":1,"6":0,"7":1,"8":1,"9":1,"10":1,"11":500,"12":500,"13":6,"14":0,"15":5,"16":0,"17":6,"18":0,"19":9,"20":0,"21":5,"22":0,"23":6,"24":0,"25":71,"26":71,"27":56,"28":56,"29":29,"30":29,"31":82,"32":82,"33":30,"34":30,"35":6,"36":6,"37":19,"38":19,"39":25,"40":25,"41":2,"42":2,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":28,"52":28,"53":16,"54":16,"55":5,"56":5,"57":5,"58":5,"59":10,"60":10,"61":32,"62":32,"63":12,"64":12,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":2,"76":2,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":2,"86":2,"87":2,"88":2,"89":2,"90":2,"91":2,"92":2,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":2,"106":2,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":0,"116":37,"117":37,"118":37,"119":37,"120":37,"121":37,"122":0,"123":37,"124":37,"125":37,"126":37,"127":0,"128":1,"129":0,"130":0,"131":0,"132":1,"133":816,"134":816,"135":816,"136":0,"137":816,"138":37,"139":37,"140":1316,"141":1316,"142":74,"143":1242,"144":816,"145":1242,"146":1316,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":1316,"158":0,"159":1316,"160":816,"161":816,"162":816,"163":816,"164":816,"165":816,"166":816,"167":816,"168":816,"169":816,"170":816,"171":0,"172":0,"173":0,"174":816,"175":500,"176":500,"177":500,"178":500,"179":0,"180":500,"181":500,"182":37,"183":463,"184":463,"185":463,"186":463,"187":463,"188":463,"189":463,"190":463,"191":463,"192":463,"193":0,"194":0,"195":1,"196":1,"197":1,"198":0,"199":0,"200":0,"201":37,"202":37,"203":37,"204":37,"205":37,"206":37,"207":37,"208":0,"209":37,"210":37,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":1258,"254":0,"255":1258,"256":37,"257":1258,"258":1258,"259":1258,"260":1258,"261":1258,"262":1258,"263":5168,"264":5168,"265":1258,"266":1258,"267":1258,"268":1258,"269":1258,"270":1258,"271":1258,"272":0,"273":1258,"274":1258,"275":1258,"276":1258,"277":1258,"278":1258,"279":0,"280":1258,"281":1258,"282":1258,"283":1258,"284":1258,"285":0,"286":1258,"287":816,"288":442,"289":0,"290":0,"291":0,"292":1258,"293":1258,"294":816,"295":442,"296":0,"297":0,"298":1258,"299":0,"300":0,"301":1,"302":1,"303":1258,"304":1258,"305":442,"306":82,"307":0,"308":82,"309":0,"310":426,"311":0,"312":6,"313":0,"314":5,"315":0,"316":6,"317":0,"318":9,"319":0,"320":5,"321":0,"322":6,"323":0,"324":125,"325":0,"326":6,"327":0,"328":7,"329":0,"330":7,"331":0,"332":7,"333":0,"334":37,"335":0,"336":0,"337":0,"338":1,"339":1,"340":1,"341":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"348":156,"349":156,"350":1,"351":114,"352":114,"353":0,"354":114,"355":1,"356":0,"357":1,"358":25,"359":25,"360":1,"361":25,"362":25,"363":107,"364":25,"365":1,"366":19,"367":19,"368":1,"369":6,"370":6,"371":1,"372":19,"373":19,"374":25,"375":19,"376":13,"377":6,"378":1,"379":5,"380":5,"381":1,"382":5,"383":5,"384":1,"385":5,"386":5,"387":10,"388":5,"389":1,"390":0,"391":1,"392":37,"393":37,"394":37,"395":0,"396":37,"397":1,"398":28,"399":28,"400":108,"401":28,"402":28,"403":1,"404":5,"405":5,"406":1,"407":1,"408":4,"409":2,"410":1,"411":1,"412":2,"413":1,"414":4,"415":4,"416":1,"417":5,"418":5,"419":1,"420":1,"421":4,"422":2,"423":1,"424":1,"425":2,"426":1,"427":4,"428":4,"429":1,"430":5,"431":5,"432":1,"433":1,"434":4,"435":2,"436":1,"437":1,"438":2,"439":1,"440":4,"441":4,"442":4,"443":4,"444":4,"445":4,"446":4,"447":1,"448":5,"449":5,"450":1,"451":1,"452":4,"453":2,"454":1,"455":1,"456":2,"457":1,"458":4,"459":4,"460":1,"461":5,"462":5,"463":1,"464":1,"465":4,"466":2,"467":1,"468":1,"469":2,"470":1,"471":4,"472":4,"473":4,"474":4,"475":4,"476":4,"477":4,"478":1,"479":5,"480":5,"481":1,"482":1,"483":4,"484":2,"485":1,"486":1,"487":2,"488":1,"489":4,"490":4,"491":4,"492":8,"493":8,"494":8,"495":12,"496":8,"497":8,"498":8,"499":4,"500":4,"501":4,"502":1,"503":31,"504":5,"505":5,"506":5,"507":5,"508":5,"509":5,"510":1,"511":1,"512":1,"513":1,"514":1,"515":1},"b":{"1":[0,1],"2":[1,0],"3":[1,0],"4":[0,1],"5":[6,5,6,9,5,6,71,56,29,82,30,6,19,25,2,1,1,1,1,28,16,5,5,10,32,12,1,1,1,1,1,2,1,1,1,1,2,2,2,2,1,1,1,1,1,1,2,1,1,1,1],"6":[0,37],"7":[37,37],"8":[0,37],"9":[816,0],"10":[0,816],"11":[0,0],"12":[74,1242],"13":[816,426],"14":[1242,463],"15":[1242,1242],"16":[0,1316],"17":[1316,1316,1316],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,1316],"27":[1316,0],"28":[816,500,0],"29":[816,0],"30":[0,816],"31":[500,0],"32":[500,0],"33":[0,500],"34":[0,0],"35":[37,463],"36":[463,0],"37":[0,0],"38":[0,37],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,1258],"49":[37,1221],"50":[1258,0],"51":[1258,3910],"52":[5168,1258,0],"53":[1258,0],"54":[1258,0],"55":[0,1258],"56":[0,1258],"57":[0,1258],"58":[0,1258],"59":[1258,37],"60":[816,442],"61":[0,0],"62":[816,442],"63":[442,82,82,426,6,5,6,9,5,6,125,6,7,7,7,37,0],"64":[114,0],"65":[13,6],"66":[1,4],"67":[5,5],"68":[2,2],"69":[1,1],"70":[2,1],"71":[1,1],"72":[1,4],"73":[5,5,4],"74":[2,2],"75":[1,1],"76":[2,1],"77":[1,1],"78":[1,4],"79":[5,5,4],"80":[2,2],"81":[1,1],"82":[2,1],"83":[1,1],"84":[1,4],"85":[5,5,4],"86":[2,2],"87":[1,1],"88":[2,1],"89":[1,1],"90":[1,4],"91":[5,5,4],"92":[2,2],"93":[1,1],"94":[2,1],"95":[1,1],"96":[1,4],"97":[5,5,4],"98":[2,2],"99":[1,1],"100":[2,1],"101":[1,1],"102":[5,5,5,5,5,5,1]},"f":{"1":1,"2":1,"3":1,"4":0,"5":500,"6":0,"7":37,"8":0,"9":816,"10":1,"11":0,"12":37,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":1258,"21":1258,"22":0,"23":0,"24":1258,"25":0,"26":0,"27":1258,"28":1,"29":156,"30":114,"31":0,"32":25,"33":25,"34":19,"35":6,"36":19,"37":5,"38":5,"39":5,"40":0,"41":37,"42":28,"43":5,"44":5,"45":5,"46":5,"47":5,"48":5,"49":31},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":26}}},"2":{"name":"(anonymous_2)","line":14,"loc":{"start":{"line":14,"column":8},"end":{"line":14,"column":30}}},"3":{"name":"(anonymous_3)","line":18,"loc":{"start":{"line":18,"column":14},"end":{"line":18,"column":24}}},"4":{"name":"trace","line":19,"loc":{"start":{"line":19,"column":21},"end":{"line":19,"column":38}}},"5":{"name":"anonymous","line":24,"loc":{"start":{"line":24,"column":15},"end":{"line":25,"column":6}}},"6":{"name":"parseError","line":135,"loc":{"start":{"line":135,"column":12},"end":{"line":135,"column":43}}},"7":{"name":"parse","line":138,"loc":{"start":{"line":138,"column":7},"end":{"line":138,"column":29}}},"8":{"name":"popStack","line":151,"loc":{"start":{"line":151,"column":4},"end":{"line":151,"column":25}}},"9":{"name":"lex","line":156,"loc":{"start":{"line":156,"column":4},"end":{"line":156,"column":19}}},"10":{"name":"(anonymous_10)","line":243,"loc":{"start":{"line":243,"column":13},"end":{"line":243,"column":23}}},"11":{"name":"parseError","line":245,"loc":{"start":{"line":245,"column":11},"end":{"line":245,"column":42}}},"12":{"name":"(anonymous_12)","line":252,"loc":{"start":{"line":252,"column":9},"end":{"line":252,"column":26}}},"13":{"name":"(anonymous_13)","line":263,"loc":{"start":{"line":263,"column":6},"end":{"line":263,"column":18}}},"14":{"name":"(anonymous_14)","line":282,"loc":{"start":{"line":282,"column":6},"end":{"line":282,"column":20}}},"15":{"name":"(anonymous_15)","line":310,"loc":{"start":{"line":310,"column":5},"end":{"line":310,"column":17}}},"16":{"name":"(anonymous_16)","line":314,"loc":{"start":{"line":314,"column":5},"end":{"line":314,"column":18}}},"17":{"name":"(anonymous_17)","line":317,"loc":{"start":{"line":317,"column":10},"end":{"line":317,"column":22}}},"18":{"name":"(anonymous_18)","line":321,"loc":{"start":{"line":321,"column":14},"end":{"line":321,"column":26}}},"19":{"name":"(anonymous_19)","line":328,"loc":{"start":{"line":328,"column":13},"end":{"line":328,"column":25}}},"20":{"name":"(anonymous_20)","line":333,"loc":{"start":{"line":333,"column":5},"end":{"line":333,"column":17}}},"21":{"name":"lex","line":387,"loc":{"start":{"line":387,"column":4},"end":{"line":387,"column":19}}},"22":{"name":"begin","line":395,"loc":{"start":{"line":395,"column":6},"end":{"line":395,"column":32}}},"23":{"name":"popState","line":398,"loc":{"start":{"line":398,"column":9},"end":{"line":398,"column":29}}},"24":{"name":"_currentRules","line":401,"loc":{"start":{"line":401,"column":14},"end":{"line":401,"column":39}}},"25":{"name":"(anonymous_25)","line":404,"loc":{"start":{"line":404,"column":9},"end":{"line":404,"column":21}}},"26":{"name":"begin","line":407,"loc":{"start":{"line":407,"column":10},"end":{"line":407,"column":36}}},"27":{"name":"anonymous","line":411,"loc":{"start":{"line":411,"column":22},"end":{"line":412,"column":6}}},"28":{"name":"Parser","line":456,"loc":{"start":{"line":456,"column":0},"end":{"line":456,"column":19}}},"29":{"name":"PointArray","line":460,"loc":{"start":{"line":460,"column":2},"end":{"line":460,"column":30}}},"30":{"name":"(anonymous_30)","line":465,"loc":{"start":{"line":465,"column":34},"end":{"line":465,"column":51}}},"31":{"name":"(anonymous_31)","line":475,"loc":{"start":{"line":475,"column":32},"end":{"line":475,"column":44}}},"32":{"name":"Ring","line":479,"loc":{"start":{"line":479,"column":2},"end":{"line":479,"column":24}}},"33":{"name":"(anonymous_33)","line":484,"loc":{"start":{"line":484,"column":26},"end":{"line":484,"column":38}}},"34":{"name":"RingList","line":494,"loc":{"start":{"line":494,"column":2},"end":{"line":494,"column":27}}},"35":{"name":"(anonymous_35)","line":499,"loc":{"start":{"line":499,"column":31},"end":{"line":499,"column":47}}},"36":{"name":"(anonymous_36)","line":505,"loc":{"start":{"line":505,"column":30},"end":{"line":505,"column":42}}},"37":{"name":"PolygonList","line":519,"loc":{"start":{"line":519,"column":2},"end":{"line":519,"column":33}}},"38":{"name":"(anonymous_38)","line":524,"loc":{"start":{"line":524,"column":37},"end":{"line":524,"column":56}}},"39":{"name":"(anonymous_39)","line":530,"loc":{"start":{"line":530,"column":33},"end":{"line":530,"column":45}}},"40":{"name":"_parse","line":540,"loc":{"start":{"line":540,"column":2},"end":{"line":540,"column":21}}},"41":{"name":"parse","line":544,"loc":{"start":{"line":544,"column":2},"end":{"line":544,"column":27}}},"42":{"name":"arrayToRing","line":556,"loc":{"start":{"line":556,"column":2},"end":{"line":556,"column":29}}},"43":{"name":"pointToWKTPoint","line":569,"loc":{"start":{"line":569,"column":2},"end":{"line":569,"column":39}}},"44":{"name":"lineStringToWKTLineString","line":594,"loc":{"start":{"line":594,"column":2},"end":{"line":594,"column":49}}},"45":{"name":"polygonToWKTPolygon","line":616,"loc":{"start":{"line":616,"column":2},"end":{"line":616,"column":43}}},"46":{"name":"multiPointToWKTMultiPoint","line":645,"loc":{"start":{"line":645,"column":2},"end":{"line":645,"column":49}}},"47":{"name":"multiLineStringToWKTMultiLineString","line":667,"loc":{"start":{"line":667,"column":2},"end":{"line":667,"column":59}}},"48":{"name":"multiPolygonToWKTMultiPolygon","line":696,"loc":{"start":{"line":696,"column":2},"end":{"line":696,"column":53}}},"49":{"name":"convert","line":734,"loc":{"start":{"line":734,"column":2},"end":{"line":734,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":761,"column":4}},"2":{"start":{"line":4,"column":2},"end":{"line":12,"column":3}},"3":{"start":{"line":5,"column":4},"end":{"line":5,"column":63}},"4":{"start":{"line":6,"column":9},"end":{"line":12,"column":3}},"5":{"start":{"line":8,"column":4},"end":{"line":10,"column":5}},"6":{"start":{"line":9,"column":6},"end":{"line":9,"column":114}},"7":{"start":{"line":11,"column":4},"end":{"line":11,"column":53}},"8":{"start":{"line":15,"column":2},"end":{"line":15,"column":20}},"9":{"start":{"line":18,"column":0},"end":{"line":458,"column":5}},"10":{"start":{"line":19,"column":0},"end":{"line":241,"column":2}},"11":{"start":{"line":27,"column":0},"end":{"line":27,"column":22}},"12":{"start":{"line":28,"column":0},"end":{"line":131,"column":1}},"13":{"start":{"line":29,"column":8},"end":{"line":29,"column":23}},"14":{"start":{"line":30,"column":0},"end":{"line":30,"column":6}},"15":{"start":{"line":31,"column":8},"end":{"line":31,"column":23}},"16":{"start":{"line":32,"column":0},"end":{"line":32,"column":6}},"17":{"start":{"line":33,"column":8},"end":{"line":33,"column":23}},"18":{"start":{"line":34,"column":0},"end":{"line":34,"column":6}},"19":{"start":{"line":35,"column":8},"end":{"line":35,"column":23}},"20":{"start":{"line":36,"column":0},"end":{"line":36,"column":6}},"21":{"start":{"line":37,"column":8},"end":{"line":37,"column":23}},"22":{"start":{"line":38,"column":0},"end":{"line":38,"column":6}},"23":{"start":{"line":39,"column":8},"end":{"line":39,"column":23}},"24":{"start":{"line":40,"column":0},"end":{"line":40,"column":6}},"25":{"start":{"line":41,"column":8},"end":{"line":41,"column":68}},"26":{"start":{"line":42,"column":0},"end":{"line":42,"column":6}},"27":{"start":{"line":43,"column":8},"end":{"line":43,"column":85}},"28":{"start":{"line":44,"column":0},"end":{"line":44,"column":6}},"29":{"start":{"line":45,"column":8},"end":{"line":45,"column":102}},"30":{"start":{"line":46,"column":0},"end":{"line":46,"column":6}},"31":{"start":{"line":47,"column":9},"end":{"line":47,"column":42}},"32":{"start":{"line":48,"column":0},"end":{"line":48,"column":6}},"33":{"start":{"line":49,"column":9},"end":{"line":49,"column":24}},"34":{"start":{"line":50,"column":0},"end":{"line":50,"column":6}},"35":{"start":{"line":51,"column":9},"end":{"line":51,"column":41}},"36":{"start":{"line":52,"column":0},"end":{"line":52,"column":6}},"37":{"start":{"line":53,"column":9},"end":{"line":53,"column":38}},"38":{"start":{"line":54,"column":0},"end":{"line":54,"column":6}},"39":{"start":{"line":55,"column":9},"end":{"line":55,"column":36}},"40":{"start":{"line":56,"column":0},"end":{"line":56,"column":6}},"41":{"start":{"line":57,"column":9},"end":{"line":57,"column":70}},"42":{"start":{"line":58,"column":0},"end":{"line":58,"column":6}},"43":{"start":{"line":59,"column":9},"end":{"line":59,"column":97}},"44":{"start":{"line":60,"column":0},"end":{"line":60,"column":6}},"45":{"start":{"line":61,"column":9},"end":{"line":61,"column":106}},"46":{"start":{"line":62,"column":0},"end":{"line":62,"column":6}},"47":{"start":{"line":63,"column":9},"end":{"line":63,"column":97}},"48":{"start":{"line":64,"column":0},"end":{"line":64,"column":6}},"49":{"start":{"line":65,"column":9},"end":{"line":65,"column":58}},"50":{"start":{"line":66,"column":0},"end":{"line":66,"column":6}},"51":{"start":{"line":67,"column":9},"end":{"line":67,"column":24}},"52":{"start":{"line":68,"column":0},"end":{"line":68,"column":6}},"53":{"start":{"line":69,"column":9},"end":{"line":69,"column":26}},"54":{"start":{"line":70,"column":0},"end":{"line":70,"column":6}},"55":{"start":{"line":71,"column":9},"end":{"line":71,"column":44}},"56":{"start":{"line":72,"column":0},"end":{"line":72,"column":6}},"57":{"start":{"line":73,"column":9},"end":{"line":73,"column":41}},"58":{"start":{"line":74,"column":0},"end":{"line":74,"column":6}},"59":{"start":{"line":75,"column":9},"end":{"line":75,"column":26}},"60":{"start":{"line":76,"column":0},"end":{"line":76,"column":6}},"61":{"start":{"line":77,"column":9},"end":{"line":77,"column":42}},"62":{"start":{"line":78,"column":0},"end":{"line":78,"column":6}},"63":{"start":{"line":79,"column":9},"end":{"line":79,"column":24}},"64":{"start":{"line":80,"column":0},"end":{"line":80,"column":6}},"65":{"start":{"line":81,"column":9},"end":{"line":81,"column":72}},"66":{"start":{"line":82,"column":0},"end":{"line":82,"column":6}},"67":{"start":{"line":83,"column":9},"end":{"line":83,"column":99}},"68":{"start":{"line":84,"column":0},"end":{"line":84,"column":6}},"69":{"start":{"line":85,"column":9},"end":{"line":85,"column":99}},"70":{"start":{"line":86,"column":0},"end":{"line":86,"column":6}},"71":{"start":{"line":87,"column":9},"end":{"line":87,"column":108}},"72":{"start":{"line":88,"column":0},"end":{"line":88,"column":6}},"73":{"start":{"line":89,"column":9},"end":{"line":89,"column":63}},"74":{"start":{"line":90,"column":0},"end":{"line":90,"column":6}},"75":{"start":{"line":91,"column":9},"end":{"line":91,"column":73}},"76":{"start":{"line":92,"column":0},"end":{"line":92,"column":6}},"77":{"start":{"line":93,"column":9},"end":{"line":93,"column":100}},"78":{"start":{"line":94,"column":0},"end":{"line":94,"column":6}},"79":{"start":{"line":95,"column":9},"end":{"line":95,"column":100}},"80":{"start":{"line":96,"column":0},"end":{"line":96,"column":6}},"81":{"start":{"line":97,"column":9},"end":{"line":97,"column":109}},"82":{"start":{"line":98,"column":0},"end":{"line":98,"column":6}},"83":{"start":{"line":99,"column":9},"end":{"line":99,"column":60}},"84":{"start":{"line":100,"column":0},"end":{"line":100,"column":6}},"85":{"start":{"line":101,"column":9},"end":{"line":101,"column":72}},"86":{"start":{"line":102,"column":0},"end":{"line":102,"column":6}},"87":{"start":{"line":103,"column":9},"end":{"line":103,"column":99}},"88":{"start":{"line":104,"column":0},"end":{"line":104,"column":6}},"89":{"start":{"line":105,"column":9},"end":{"line":105,"column":99}},"90":{"start":{"line":106,"column":0},"end":{"line":106,"column":6}},"91":{"start":{"line":107,"column":9},"end":{"line":107,"column":108}},"92":{"start":{"line":108,"column":0},"end":{"line":108,"column":6}},"93":{"start":{"line":109,"column":9},"end":{"line":109,"column":62}},"94":{"start":{"line":110,"column":0},"end":{"line":110,"column":6}},"95":{"start":{"line":111,"column":9},"end":{"line":111,"column":81}},"96":{"start":{"line":112,"column":0},"end":{"line":112,"column":6}},"97":{"start":{"line":113,"column":9},"end":{"line":113,"column":108}},"98":{"start":{"line":114,"column":0},"end":{"line":114,"column":6}},"99":{"start":{"line":115,"column":9},"end":{"line":115,"column":108}},"100":{"start":{"line":116,"column":0},"end":{"line":116,"column":6}},"101":{"start":{"line":117,"column":9},"end":{"line":117,"column":117}},"102":{"start":{"line":118,"column":0},"end":{"line":118,"column":6}},"103":{"start":{"line":119,"column":9},"end":{"line":119,"column":68}},"104":{"start":{"line":120,"column":0},"end":{"line":120,"column":6}},"105":{"start":{"line":121,"column":9},"end":{"line":121,"column":78}},"106":{"start":{"line":122,"column":0},"end":{"line":122,"column":6}},"107":{"start":{"line":123,"column":9},"end":{"line":123,"column":105}},"108":{"start":{"line":124,"column":0},"end":{"line":124,"column":6}},"109":{"start":{"line":125,"column":9},"end":{"line":125,"column":105}},"110":{"start":{"line":126,"column":0},"end":{"line":126,"column":6}},"111":{"start":{"line":127,"column":9},"end":{"line":127,"column":114}},"112":{"start":{"line":128,"column":0},"end":{"line":128,"column":6}},"113":{"start":{"line":129,"column":9},"end":{"line":129,"column":65}},"114":{"start":{"line":130,"column":0},"end":{"line":130,"column":6}},"115":{"start":{"line":136,"column":4},"end":{"line":136,"column":25}},"116":{"start":{"line":139,"column":4},"end":{"line":139,"column":159}},"117":{"start":{"line":140,"column":4},"end":{"line":140,"column":31}},"118":{"start":{"line":141,"column":4},"end":{"line":141,"column":28}},"119":{"start":{"line":142,"column":4},"end":{"line":142,"column":31}},"120":{"start":{"line":143,"column":4},"end":{"line":143,"column":26}},"121":{"start":{"line":144,"column":4},"end":{"line":145,"column":31}},"122":{"start":{"line":145,"column":8},"end":{"line":145,"column":31}},"123":{"start":{"line":146,"column":4},"end":{"line":146,"column":34}},"124":{"start":{"line":147,"column":4},"end":{"line":147,"column":23}},"125":{"start":{"line":148,"column":4},"end":{"line":148,"column":65}},"126":{"start":{"line":149,"column":4},"end":{"line":150,"column":45}},"127":{"start":{"line":150,"column":8},"end":{"line":150,"column":45}},"128":{"start":{"line":151,"column":4},"end":{"line":155,"column":5}},"129":{"start":{"line":152,"column":8},"end":{"line":152,"column":44}},"130":{"start":{"line":153,"column":8},"end":{"line":153,"column":42}},"131":{"start":{"line":154,"column":8},"end":{"line":154,"column":42}},"132":{"start":{"line":156,"column":4},"end":{"line":163,"column":5}},"133":{"start":{"line":157,"column":8},"end":{"line":157,"column":18}},"134":{"start":{"line":158,"column":8},"end":{"line":158,"column":38}},"135":{"start":{"line":159,"column":8},"end":{"line":161,"column":9}},"136":{"start":{"line":160,"column":12},"end":{"line":160,"column":50}},"137":{"start":{"line":162,"column":8},"end":{"line":162,"column":21}},"138":{"start":{"line":164,"column":4},"end":{"line":164,"column":92}},"139":{"start":{"line":165,"column":4},"end":{"line":238,"column":5}},"140":{"start":{"line":166,"column":8},"end":{"line":166,"column":40}},"141":{"start":{"line":167,"column":8},"end":{"line":174,"column":9}},"142":{"start":{"line":168,"column":12},"end":{"line":168,"column":48}},"143":{"start":{"line":170,"column":12},"end":{"line":172,"column":13}},"144":{"start":{"line":171,"column":16},"end":{"line":171,"column":31}},"145":{"start":{"line":173,"column":12},"end":{"line":173,"column":58}},"146":{"start":{"line":175,"column":8},"end":{"line":190,"column":9}},"147":{"start":{"line":176,"column":12},"end":{"line":176,"column":28}},"148":{"start":{"line":177,"column":12},"end":{"line":189,"column":13}},"149":{"start":{"line":178,"column":16},"end":{"line":178,"column":30}},"150":{"start":{"line":179,"column":16},"end":{"line":182,"column":21}},"151":{"start":{"line":180,"column":20},"end":{"line":182,"column":21}},"152":{"start":{"line":181,"column":24},"end":{"line":181,"column":70}},"153":{"start":{"line":183,"column":16},"end":{"line":187,"column":17}},"154":{"start":{"line":184,"column":20},"end":{"line":184,"column":200}},"155":{"start":{"line":186,"column":20},"end":{"line":186,"column":166}},"156":{"start":{"line":188,"column":16},"end":{"line":188,"column":167}},"157":{"start":{"line":191,"column":8},"end":{"line":193,"column":9}},"158":{"start":{"line":192,"column":12},"end":{"line":192,"column":112}},"159":{"start":{"line":194,"column":8},"end":{"line":237,"column":9}},"160":{"start":{"line":196,"column":12},"end":{"line":196,"column":31}},"161":{"start":{"line":197,"column":12},"end":{"line":197,"column":43}},"162":{"start":{"line":198,"column":12},"end":{"line":198,"column":43}},"163":{"start":{"line":199,"column":12},"end":{"line":199,"column":34}},"164":{"start":{"line":200,"column":12},"end":{"line":200,"column":26}},"165":{"start":{"line":201,"column":12},"end":{"line":211,"column":13}},"166":{"start":{"line":202,"column":16},"end":{"line":202,"column":43}},"167":{"start":{"line":203,"column":16},"end":{"line":203,"column":43}},"168":{"start":{"line":204,"column":16},"end":{"line":204,"column":47}},"169":{"start":{"line":205,"column":16},"end":{"line":205,"column":42}},"170":{"start":{"line":206,"column":16},"end":{"line":207,"column":33}},"171":{"start":{"line":207,"column":20},"end":{"line":207,"column":33}},"172":{"start":{"line":209,"column":16},"end":{"line":209,"column":40}},"173":{"start":{"line":210,"column":16},"end":{"line":210,"column":38}},"174":{"start":{"line":212,"column":12},"end":{"line":212,"column":18}},"175":{"start":{"line":214,"column":12},"end":{"line":214,"column":50}},"176":{"start":{"line":215,"column":12},"end":{"line":215,"column":50}},"177":{"start":{"line":216,"column":12},"end":{"line":216,"column":246}},"178":{"start":{"line":217,"column":12},"end":{"line":219,"column":13}},"179":{"start":{"line":218,"column":16},"end":{"line":218,"column":115}},"180":{"start":{"line":220,"column":12},"end":{"line":220,"column":109}},"181":{"start":{"line":221,"column":12},"end":{"line":223,"column":13}},"182":{"start":{"line":222,"column":16},"end":{"line":222,"column":25}},"183":{"start":{"line":224,"column":12},"end":{"line":228,"column":13}},"184":{"start":{"line":225,"column":16},"end":{"line":225,"column":53}},"185":{"start":{"line":226,"column":16},"end":{"line":226,"column":51}},"186":{"start":{"line":227,"column":16},"end":{"line":227,"column":51}},"187":{"start":{"line":229,"column":12},"end":{"line":229,"column":56}},"188":{"start":{"line":230,"column":12},"end":{"line":230,"column":33}},"189":{"start":{"line":231,"column":12},"end":{"line":231,"column":34}},"190":{"start":{"line":232,"column":12},"end":{"line":232,"column":79}},"191":{"start":{"line":233,"column":12},"end":{"line":233,"column":33}},"192":{"start":{"line":234,"column":12},"end":{"line":234,"column":18}},"193":{"start":{"line":236,"column":12},"end":{"line":236,"column":24}},"194":{"start":{"line":239,"column":4},"end":{"line":239,"column":16}},"195":{"start":{"line":242,"column":0},"end":{"line":242,"column":9}},"196":{"start":{"line":243,"column":0},"end":{"line":454,"column":17}},"197":{"start":{"line":244,"column":0},"end":{"line":409,"column":8}},"198":{"start":{"line":246,"column":8},"end":{"line":250,"column":9}},"199":{"start":{"line":247,"column":12},"end":{"line":247,"column":49}},"200":{"start":{"line":249,"column":12},"end":{"line":249,"column":33}},"201":{"start":{"line":253,"column":8},"end":{"line":253,"column":28}},"202":{"start":{"line":254,"column":8},"end":{"line":254,"column":52}},"203":{"start":{"line":255,"column":8},"end":{"line":255,"column":40}},"204":{"start":{"line":256,"column":8},"end":{"line":256,"column":53}},"205":{"start":{"line":257,"column":8},"end":{"line":257,"column":42}},"206":{"start":{"line":258,"column":8},"end":{"line":258,"column":78}},"207":{"start":{"line":259,"column":8},"end":{"line":259,"column":59}},"208":{"start":{"line":259,"column":33},"end":{"line":259,"column":59}},"209":{"start":{"line":260,"column":8},"end":{"line":260,"column":24}},"210":{"start":{"line":261,"column":8},"end":{"line":261,"column":20}},"211":{"start":{"line":264,"column":8},"end":{"line":264,"column":32}},"212":{"start":{"line":265,"column":8},"end":{"line":265,"column":26}},"213":{"start":{"line":266,"column":8},"end":{"line":266,"column":22}},"214":{"start":{"line":267,"column":8},"end":{"line":267,"column":22}},"215":{"start":{"line":268,"column":8},"end":{"line":268,"column":25}},"216":{"start":{"line":269,"column":8},"end":{"line":269,"column":27}},"217":{"start":{"line":270,"column":8},"end":{"line":270,"column":48}},"218":{"start":{"line":271,"column":8},"end":{"line":276,"column":9}},"219":{"start":{"line":272,"column":12},"end":{"line":272,"column":28}},"220":{"start":{"line":273,"column":12},"end":{"line":273,"column":36}},"221":{"start":{"line":275,"column":12},"end":{"line":275,"column":38}},"222":{"start":{"line":277,"column":8},"end":{"line":277,"column":56}},"223":{"start":{"line":277,"column":33},"end":{"line":277,"column":56}},"224":{"start":{"line":279,"column":8},"end":{"line":279,"column":43}},"225":{"start":{"line":280,"column":8},"end":{"line":280,"column":18}},"226":{"start":{"line":283,"column":8},"end":{"line":283,"column":28}},"227":{"start":{"line":284,"column":8},"end":{"line":284,"column":46}},"228":{"start":{"line":286,"column":8},"end":{"line":286,"column":39}},"229":{"start":{"line":287,"column":8},"end":{"line":287,"column":70}},"230":{"start":{"line":289,"column":8},"end":{"line":289,"column":27}},"231":{"start":{"line":290,"column":8},"end":{"line":290,"column":57}},"232":{"start":{"line":291,"column":8},"end":{"line":291,"column":63}},"233":{"start":{"line":292,"column":8},"end":{"line":292,"column":69}},"234":{"start":{"line":294,"column":8},"end":{"line":294,"column":60}},"235":{"start":{"line":294,"column":28},"end":{"line":294,"column":60}},"236":{"start":{"line":295,"column":8},"end":{"line":295,"column":34}},"237":{"start":{"line":297,"column":8},"end":{"line":303,"column":12}},"238":{"start":{"line":305,"column":8},"end":{"line":307,"column":9}},"239":{"start":{"line":306,"column":12},"end":{"line":306,"column":65}},"240":{"start":{"line":308,"column":8},"end":{"line":308,"column":20}},"241":{"start":{"line":311,"column":8},"end":{"line":311,"column":26}},"242":{"start":{"line":312,"column":8},"end":{"line":312,"column":20}},"243":{"start":{"line":315,"column":8},"end":{"line":315,"column":40}},"244":{"start":{"line":318,"column":8},"end":{"line":318,"column":83}},"245":{"start":{"line":319,"column":8},"end":{"line":319,"column":83}},"246":{"start":{"line":322,"column":8},"end":{"line":322,"column":30}},"247":{"start":{"line":323,"column":8},"end":{"line":325,"column":9}},"248":{"start":{"line":324,"column":12},"end":{"line":324,"column":58}},"249":{"start":{"line":326,"column":8},"end":{"line":326,"column":84}},"250":{"start":{"line":329,"column":8},"end":{"line":329,"column":35}},"251":{"start":{"line":330,"column":8},"end":{"line":330,"column":52}},"252":{"start":{"line":331,"column":8},"end":{"line":331,"column":57}},"253":{"start":{"line":334,"column":8},"end":{"line":336,"column":9}},"254":{"start":{"line":335,"column":12},"end":{"line":335,"column":28}},"255":{"start":{"line":337,"column":8},"end":{"line":337,"column":43}},"256":{"start":{"line":337,"column":26},"end":{"line":337,"column":43}},"257":{"start":{"line":339,"column":8},"end":{"line":344,"column":18}},"258":{"start":{"line":345,"column":8},"end":{"line":348,"column":9}},"259":{"start":{"line":346,"column":12},"end":{"line":346,"column":29}},"260":{"start":{"line":347,"column":12},"end":{"line":347,"column":28}},"261":{"start":{"line":349,"column":8},"end":{"line":349,"column":41}},"262":{"start":{"line":350,"column":8},"end":{"line":357,"column":9}},"263":{"start":{"line":351,"column":12},"end":{"line":351,"column":64}},"264":{"start":{"line":352,"column":12},"end":{"line":356,"column":13}},"265":{"start":{"line":353,"column":16},"end":{"line":353,"column":34}},"266":{"start":{"line":354,"column":16},"end":{"line":354,"column":26}},"267":{"start":{"line":355,"column":16},"end":{"line":355,"column":46}},"268":{"start":{"line":355,"column":40},"end":{"line":355,"column":46}},"269":{"start":{"line":358,"column":8},"end":{"line":379,"column":9}},"270":{"start":{"line":359,"column":12},"end":{"line":359,"column":54}},"271":{"start":{"line":360,"column":12},"end":{"line":360,"column":53}},"272":{"start":{"line":360,"column":23},"end":{"line":360,"column":53}},"273":{"start":{"line":361,"column":12},"end":{"line":364,"column":170}},"274":{"start":{"line":365,"column":12},"end":{"line":365,"column":36}},"275":{"start":{"line":366,"column":12},"end":{"line":366,"column":35}},"276":{"start":{"line":367,"column":12},"end":{"line":367,"column":33}},"277":{"start":{"line":368,"column":12},"end":{"line":368,"column":45}},"278":{"start":{"line":369,"column":12},"end":{"line":371,"column":13}},"279":{"start":{"line":370,"column":16},"end":{"line":370,"column":78}},"280":{"start":{"line":372,"column":12},"end":{"line":372,"column":31}},"281":{"start":{"line":373,"column":12},"end":{"line":373,"column":61}},"282":{"start":{"line":374,"column":12},"end":{"line":374,"column":37}},"283":{"start":{"line":375,"column":12},"end":{"line":375,"column":129}},"284":{"start":{"line":376,"column":12},"end":{"line":376,"column":60}},"285":{"start":{"line":376,"column":42},"end":{"line":376,"column":60}},"286":{"start":{"line":377,"column":12},"end":{"line":378,"column":24}},"287":{"start":{"line":377,"column":23},"end":{"line":377,"column":36}},"288":{"start":{"line":378,"column":17},"end":{"line":378,"column":24}},"289":{"start":{"line":380,"column":8},"end":{"line":385,"column":9}},"290":{"start":{"line":381,"column":12},"end":{"line":381,"column":28}},"291":{"start":{"line":383,"column":12},"end":{"line":384,"column":66}},"292":{"start":{"line":388,"column":8},"end":{"line":388,"column":28}},"293":{"start":{"line":389,"column":8},"end":{"line":393,"column":9}},"294":{"start":{"line":390,"column":12},"end":{"line":390,"column":21}},"295":{"start":{"line":392,"column":12},"end":{"line":392,"column":30}},"296":{"start":{"line":396,"column":8},"end":{"line":396,"column":44}},"297":{"start":{"line":399,"column":8},"end":{"line":399,"column":41}},"298":{"start":{"line":402,"column":8},"end":{"line":402,"column":88}},"299":{"start":{"line":405,"column":8},"end":{"line":405,"column":65}},"300":{"start":{"line":408,"column":8},"end":{"line":408,"column":30}},"301":{"start":{"line":410,"column":0},"end":{"line":410,"column":19}},"302":{"start":{"line":411,"column":0},"end":{"line":451,"column":2}},"303":{"start":{"line":414,"column":0},"end":{"line":414,"column":20}},"304":{"start":{"line":415,"column":0},"end":{"line":450,"column":1}},"305":{"start":{"line":417,"column":0},"end":{"line":417,"column":6}},"306":{"start":{"line":418,"column":7},"end":{"line":418,"column":16}},"307":{"start":{"line":419,"column":0},"end":{"line":419,"column":6}},"308":{"start":{"line":420,"column":7},"end":{"line":420,"column":16}},"309":{"start":{"line":421,"column":0},"end":{"line":421,"column":6}},"310":{"start":{"line":422,"column":7},"end":{"line":422,"column":16}},"311":{"start":{"line":423,"column":0},"end":{"line":423,"column":6}},"312":{"start":{"line":424,"column":7},"end":{"line":424,"column":16}},"313":{"start":{"line":425,"column":0},"end":{"line":425,"column":6}},"314":{"start":{"line":426,"column":7},"end":{"line":426,"column":16}},"315":{"start":{"line":427,"column":0},"end":{"line":427,"column":6}},"316":{"start":{"line":428,"column":7},"end":{"line":428,"column":16}},"317":{"start":{"line":429,"column":0},"end":{"line":429,"column":6}},"318":{"start":{"line":430,"column":7},"end":{"line":430,"column":16}},"319":{"start":{"line":431,"column":0},"end":{"line":431,"column":6}},"320":{"start":{"line":432,"column":7},"end":{"line":432,"column":16}},"321":{"start":{"line":433,"column":0},"end":{"line":433,"column":6}},"322":{"start":{"line":434,"column":7},"end":{"line":434,"column":16}},"323":{"start":{"line":435,"column":0},"end":{"line":435,"column":6}},"324":{"start":{"line":436,"column":8},"end":{"line":436,"column":17}},"325":{"start":{"line":437,"column":0},"end":{"line":437,"column":6}},"326":{"start":{"line":438,"column":8},"end":{"line":438,"column":17}},"327":{"start":{"line":439,"column":0},"end":{"line":439,"column":6}},"328":{"start":{"line":440,"column":8},"end":{"line":440,"column":17}},"329":{"start":{"line":441,"column":0},"end":{"line":441,"column":6}},"330":{"start":{"line":442,"column":8},"end":{"line":442,"column":17}},"331":{"start":{"line":443,"column":0},"end":{"line":443,"column":6}},"332":{"start":{"line":444,"column":8},"end":{"line":444,"column":17}},"333":{"start":{"line":445,"column":0},"end":{"line":445,"column":6}},"334":{"start":{"line":446,"column":8},"end":{"line":446,"column":16}},"335":{"start":{"line":447,"column":0},"end":{"line":447,"column":6}},"336":{"start":{"line":448,"column":8},"end":{"line":448,"column":24}},"337":{"start":{"line":449,"column":0},"end":{"line":449,"column":6}},"338":{"start":{"line":452,"column":0},"end":{"line":452,"column":289}},"339":{"start":{"line":453,"column":0},"end":{"line":453,"column":101}},"340":{"start":{"line":454,"column":0},"end":{"line":454,"column":13}},"341":{"start":{"line":455,"column":0},"end":{"line":455,"column":21}},"342":{"start":{"line":456,"column":0},"end":{"line":456,"column":36}},"343":{"start":{"line":456,"column":21},"end":{"line":456,"column":34}},"344":{"start":{"line":456,"column":36},"end":{"line":456,"column":62}},"345":{"start":{"line":456,"column":62},"end":{"line":456,"column":85}},"346":{"start":{"line":457,"column":0},"end":{"line":457,"column":18}},"347":{"start":{"line":460,"column":2},"end":{"line":463,"column":3}},"348":{"start":{"line":461,"column":4},"end":{"line":461,"column":26}},"349":{"start":{"line":462,"column":4},"end":{"line":462,"column":29}},"350":{"start":{"line":465,"column":2},"end":{"line":473,"column":4}},"351":{"start":{"line":466,"column":4},"end":{"line":470,"column":5}},"352":{"start":{"line":467,"column":6},"end":{"line":467,"column":47}},"353":{"start":{"line":469,"column":6},"end":{"line":469,"column":28}},"354":{"start":{"line":472,"column":4},"end":{"line":472,"column":16}},"355":{"start":{"line":475,"column":2},"end":{"line":477,"column":4}},"356":{"start":{"line":476,"column":4},"end":{"line":476,"column":21}},"357":{"start":{"line":479,"column":2},"end":{"line":482,"column":3}},"358":{"start":{"line":480,"column":4},"end":{"line":480,"column":22}},"359":{"start":{"line":481,"column":4},"end":{"line":481,"column":23}},"360":{"start":{"line":484,"column":2},"end":{"line":492,"column":4}},"361":{"start":{"line":485,"column":4},"end":{"line":485,"column":19}},"362":{"start":{"line":487,"column":4},"end":{"line":489,"column":5}},"363":{"start":{"line":488,"column":6},"end":{"line":488,"column":35}},"364":{"start":{"line":491,"column":4},"end":{"line":491,"column":16}},"365":{"start":{"line":494,"column":2},"end":{"line":497,"column":3}},"366":{"start":{"line":495,"column":4},"end":{"line":495,"column":25}},"367":{"start":{"line":496,"column":4},"end":{"line":496,"column":27}},"368":{"start":{"line":499,"column":2},"end":{"line":503,"column":4}},"369":{"start":{"line":500,"column":4},"end":{"line":500,"column":25}},"370":{"start":{"line":502,"column":4},"end":{"line":502,"column":16}},"371":{"start":{"line":505,"column":2},"end":{"line":517,"column":4}},"372":{"start":{"line":506,"column":4},"end":{"line":506,"column":19}},"373":{"start":{"line":508,"column":4},"end":{"line":510,"column":5}},"374":{"start":{"line":509,"column":6},"end":{"line":509,"column":39}},"375":{"start":{"line":512,"column":4},"end":{"line":516,"column":5}},"376":{"start":{"line":513,"column":6},"end":{"line":513,"column":18}},"377":{"start":{"line":515,"column":6},"end":{"line":515,"column":18}},"378":{"start":{"line":519,"column":2},"end":{"line":522,"column":3}},"379":{"start":{"line":520,"column":4},"end":{"line":520,"column":28}},"380":{"start":{"line":521,"column":4},"end":{"line":521,"column":30}},"381":{"start":{"line":524,"column":2},"end":{"line":528,"column":4}},"382":{"start":{"line":525,"column":4},"end":{"line":525,"column":28}},"383":{"start":{"line":527,"column":4},"end":{"line":527,"column":16}},"384":{"start":{"line":530,"column":2},"end":{"line":538,"column":4}},"385":{"start":{"line":531,"column":4},"end":{"line":531,"column":19}},"386":{"start":{"line":533,"column":4},"end":{"line":535,"column":5}},"387":{"start":{"line":534,"column":6},"end":{"line":534,"column":54}},"388":{"start":{"line":537,"column":4},"end":{"line":537,"column":16}},"389":{"start":{"line":540,"column":2},"end":{"line":542,"column":3}},"390":{"start":{"line":541,"column":4},"end":{"line":541,"column":49}},"391":{"start":{"line":544,"column":2},"end":{"line":554,"column":3}},"392":{"start":{"line":545,"column":4},"end":{"line":545,"column":23}},"393":{"start":{"line":547,"column":4},"end":{"line":551,"column":5}},"394":{"start":{"line":548,"column":6},"end":{"line":548,"column":34}},"395":{"start":{"line":550,"column":6},"end":{"line":550,"column":45}},"396":{"start":{"line":553,"column":4},"end":{"line":553,"column":38}},"397":{"start":{"line":556,"column":2},"end":{"line":567,"column":3}},"398":{"start":{"line":557,"column":4},"end":{"line":557,"column":30}},"399":{"start":{"line":559,"column":4},"end":{"line":561,"column":5}},"400":{"start":{"line":560,"column":6},"end":{"line":560,"column":35}},"401":{"start":{"line":563,"column":4},"end":{"line":563,"column":40}},"402":{"start":{"line":565,"column":4},"end":{"line":565,"column":15}},"403":{"start":{"line":569,"column":2},"end":{"line":592,"column":3}},"404":{"start":{"line":570,"column":4},"end":{"line":570,"column":23}},"405":{"start":{"line":572,"column":4},"end":{"line":586,"column":5}},"406":{"start":{"line":573,"column":6},"end":{"line":573,"column":21}},"407":{"start":{"line":575,"column":6},"end":{"line":575,"column":17}},"408":{"start":{"line":576,"column":11},"end":{"line":586,"column":5}},"409":{"start":{"line":578,"column":6},"end":{"line":582,"column":7}},"410":{"start":{"line":579,"column":8},"end":{"line":579,"column":20}},"411":{"start":{"line":581,"column":8},"end":{"line":581,"column":20}},"412":{"start":{"line":583,"column":11},"end":{"line":586,"column":5}},"413":{"start":{"line":585,"column":6},"end":{"line":585,"column":19}},"414":{"start":{"line":589,"column":4},"end":{"line":589,"column":55}},"415":{"start":{"line":591,"column":4},"end":{"line":591,"column":15}},"416":{"start":{"line":594,"column":2},"end":{"line":614,"column":3}},"417":{"start":{"line":595,"column":4},"end":{"line":595,"column":28}},"418":{"start":{"line":597,"column":4},"end":{"line":609,"column":5}},"419":{"start":{"line":598,"column":6},"end":{"line":598,"column":21}},"420":{"start":{"line":600,"column":6},"end":{"line":600,"column":17}},"421":{"start":{"line":601,"column":11},"end":{"line":609,"column":5}},"422":{"start":{"line":602,"column":6},"end":{"line":606,"column":7}},"423":{"start":{"line":603,"column":8},"end":{"line":603,"column":20}},"424":{"start":{"line":605,"column":8},"end":{"line":605,"column":20}},"425":{"start":{"line":607,"column":11},"end":{"line":609,"column":5}},"426":{"start":{"line":608,"column":6},"end":{"line":608,"column":19}},"427":{"start":{"line":611,"column":4},"end":{"line":611,"column":46}},"428":{"start":{"line":613,"column":4},"end":{"line":613,"column":15}},"429":{"start":{"line":616,"column":2},"end":{"line":643,"column":3}},"430":{"start":{"line":617,"column":4},"end":{"line":617,"column":25}},"431":{"start":{"line":619,"column":4},"end":{"line":631,"column":5}},"432":{"start":{"line":620,"column":6},"end":{"line":620,"column":21}},"433":{"start":{"line":622,"column":6},"end":{"line":622,"column":17}},"434":{"start":{"line":623,"column":11},"end":{"line":631,"column":5}},"435":{"start":{"line":624,"column":6},"end":{"line":628,"column":7}},"436":{"start":{"line":625,"column":8},"end":{"line":625,"column":20}},"437":{"start":{"line":627,"column":8},"end":{"line":627,"column":20}},"438":{"start":{"line":629,"column":11},"end":{"line":631,"column":5}},"439":{"start":{"line":630,"column":6},"end":{"line":630,"column":19}},"440":{"start":{"line":633,"column":4},"end":{"line":633,"column":15}},"441":{"start":{"line":634,"column":4},"end":{"line":634,"column":20}},"442":{"start":{"line":635,"column":4},"end":{"line":637,"column":5}},"443":{"start":{"line":636,"column":6},"end":{"line":636,"column":56}},"444":{"start":{"line":639,"column":4},"end":{"line":639,"column":28}},"445":{"start":{"line":640,"column":4},"end":{"line":640,"column":15}},"446":{"start":{"line":642,"column":4},"end":{"line":642,"column":15}},"447":{"start":{"line":645,"column":2},"end":{"line":665,"column":3}},"448":{"start":{"line":646,"column":4},"end":{"line":646,"column":28}},"449":{"start":{"line":648,"column":4},"end":{"line":660,"column":5}},"450":{"start":{"line":649,"column":6},"end":{"line":649,"column":21}},"451":{"start":{"line":651,"column":6},"end":{"line":651,"column":17}},"452":{"start":{"line":652,"column":11},"end":{"line":660,"column":5}},"453":{"start":{"line":653,"column":6},"end":{"line":657,"column":7}},"454":{"start":{"line":654,"column":8},"end":{"line":654,"column":20}},"455":{"start":{"line":656,"column":8},"end":{"line":656,"column":20}},"456":{"start":{"line":658,"column":11},"end":{"line":660,"column":5}},"457":{"start":{"line":659,"column":6},"end":{"line":659,"column":19}},"458":{"start":{"line":662,"column":4},"end":{"line":662,"column":46}},"459":{"start":{"line":664,"column":4},"end":{"line":664,"column":15}},"460":{"start":{"line":667,"column":2},"end":{"line":694,"column":3}},"461":{"start":{"line":668,"column":4},"end":{"line":668,"column":33}},"462":{"start":{"line":670,"column":4},"end":{"line":682,"column":5}},"463":{"start":{"line":671,"column":6},"end":{"line":671,"column":21}},"464":{"start":{"line":673,"column":6},"end":{"line":673,"column":17}},"465":{"start":{"line":674,"column":11},"end":{"line":682,"column":5}},"466":{"start":{"line":675,"column":6},"end":{"line":679,"column":7}},"467":{"start":{"line":676,"column":8},"end":{"line":676,"column":20}},"468":{"start":{"line":678,"column":8},"end":{"line":678,"column":20}},"469":{"start":{"line":680,"column":11},"end":{"line":682,"column":5}},"470":{"start":{"line":681,"column":6},"end":{"line":681,"column":19}},"471":{"start":{"line":684,"column":4},"end":{"line":684,"column":15}},"472":{"start":{"line":685,"column":4},"end":{"line":685,"column":20}},"473":{"start":{"line":686,"column":4},"end":{"line":688,"column":5}},"474":{"start":{"line":687,"column":6},"end":{"line":687,"column":56}},"475":{"start":{"line":690,"column":4},"end":{"line":690,"column":28}},"476":{"start":{"line":691,"column":4},"end":{"line":691,"column":15}},"477":{"start":{"line":693,"column":4},"end":{"line":693,"column":15}},"478":{"start":{"line":696,"column":2},"end":{"line":732,"column":3}},"479":{"start":{"line":697,"column":4},"end":{"line":697,"column":30}},"480":{"start":{"line":699,"column":4},"end":{"line":711,"column":5}},"481":{"start":{"line":700,"column":6},"end":{"line":700,"column":21}},"482":{"start":{"line":702,"column":6},"end":{"line":702,"column":17}},"483":{"start":{"line":703,"column":11},"end":{"line":711,"column":5}},"484":{"start":{"line":704,"column":6},"end":{"line":708,"column":7}},"485":{"start":{"line":705,"column":8},"end":{"line":705,"column":20}},"486":{"start":{"line":707,"column":8},"end":{"line":707,"column":20}},"487":{"start":{"line":709,"column":11},"end":{"line":711,"column":5}},"488":{"start":{"line":710,"column":6},"end":{"line":710,"column":19}},"489":{"start":{"line":713,"column":4},"end":{"line":713,"column":15}},"490":{"start":{"line":714,"column":4},"end":{"line":714,"column":20}},"491":{"start":{"line":715,"column":4},"end":{"line":726,"column":5}},"492":{"start":{"line":716,"column":6},"end":{"line":716,"column":19}},"493":{"start":{"line":717,"column":6},"end":{"line":717,"column":22}},"494":{"start":{"line":718,"column":6},"end":{"line":720,"column":7}},"495":{"start":{"line":719,"column":8},"end":{"line":719,"column":61}},"496":{"start":{"line":722,"column":6},"end":{"line":722,"column":29}},"497":{"start":{"line":723,"column":6},"end":{"line":723,"column":16}},"498":{"start":{"line":725,"column":6},"end":{"line":725,"column":21}},"499":{"start":{"line":728,"column":4},"end":{"line":728,"column":28}},"500":{"start":{"line":729,"column":4},"end":{"line":729,"column":15}},"501":{"start":{"line":731,"column":4},"end":{"line":731,"column":15}},"502":{"start":{"line":734,"column":2},"end":{"line":751,"column":3}},"503":{"start":{"line":735,"column":4},"end":{"line":750,"column":5}},"504":{"start":{"line":737,"column":8},"end":{"line":737,"column":42}},"505":{"start":{"line":739,"column":8},"end":{"line":739,"column":52}},"506":{"start":{"line":741,"column":8},"end":{"line":741,"column":46}},"507":{"start":{"line":743,"column":8},"end":{"line":743,"column":52}},"508":{"start":{"line":745,"column":8},"end":{"line":745,"column":62}},"509":{"start":{"line":747,"column":8},"end":{"line":747,"column":56}},"510":{"start":{"line":749,"column":8},"end":{"line":749,"column":56}},"511":{"start":{"line":755,"column":2},"end":{"line":755,"column":27}},"512":{"start":{"line":756,"column":2},"end":{"line":756,"column":34}},"513":{"start":{"line":757,"column":2},"end":{"line":757,"column":26}},"514":{"start":{"line":758,"column":2},"end":{"line":758,"column":28}},"515":{"start":{"line":760,"column":2},"end":{"line":760,"column":17}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":5},"end":{"line":4,"column":31}},{"start":{"line":4,"column":35},"end":{"line":4,"column":69}}]},"3":{"line":6,"type":"if","locations":[{"start":{"line":6,"column":9},"end":{"line":6,"column":9}},{"start":{"line":6,"column":9},"end":{"line":6,"column":9}}]},"4":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":4},"end":{"line":8,"column":4}},{"start":{"line":8,"column":4},"end":{"line":8,"column":4}}]},"5":{"line":28,"type":"switch","locations":[{"start":{"line":29,"column":0},"end":{"line":30,"column":6}},{"start":{"line":31,"column":0},"end":{"line":32,"column":6}},{"start":{"line":33,"column":0},"end":{"line":34,"column":6}},{"start":{"line":35,"column":0},"end":{"line":36,"column":6}},{"start":{"line":37,"column":0},"end":{"line":38,"column":6}},{"start":{"line":39,"column":0},"end":{"line":40,"column":6}},{"start":{"line":41,"column":0},"end":{"line":42,"column":6}},{"start":{"line":43,"column":0},"end":{"line":44,"column":6}},{"start":{"line":45,"column":0},"end":{"line":46,"column":6}},{"start":{"line":47,"column":0},"end":{"line":48,"column":6}},{"start":{"line":49,"column":0},"end":{"line":50,"column":6}},{"start":{"line":51,"column":0},"end":{"line":52,"column":6}},{"start":{"line":53,"column":0},"end":{"line":54,"column":6}},{"start":{"line":55,"column":0},"end":{"line":56,"column":6}},{"start":{"line":57,"column":0},"end":{"line":58,"column":6}},{"start":{"line":59,"column":0},"end":{"line":60,"column":6}},{"start":{"line":61,"column":0},"end":{"line":62,"column":6}},{"start":{"line":63,"column":0},"end":{"line":64,"column":6}},{"start":{"line":65,"column":0},"end":{"line":66,"column":6}},{"start":{"line":67,"column":0},"end":{"line":68,"column":6}},{"start":{"line":69,"column":0},"end":{"line":70,"column":6}},{"start":{"line":71,"column":0},"end":{"line":72,"column":6}},{"start":{"line":73,"column":0},"end":{"line":74,"column":6}},{"start":{"line":75,"column":0},"end":{"line":76,"column":6}},{"start":{"line":77,"column":0},"end":{"line":78,"column":6}},{"start":{"line":79,"column":0},"end":{"line":80,"column":6}},{"start":{"line":81,"column":0},"end":{"line":82,"column":6}},{"start":{"line":83,"column":0},"end":{"line":84,"column":6}},{"start":{"line":85,"column":0},"end":{"line":86,"column":6}},{"start":{"line":87,"column":0},"end":{"line":88,"column":6}},{"start":{"line":89,"column":0},"end":{"line":90,"column":6}},{"start":{"line":91,"column":0},"end":{"line":92,"column":6}},{"start":{"line":93,"column":0},"end":{"line":94,"column":6}},{"start":{"line":95,"column":0},"end":{"line":96,"column":6}},{"start":{"line":97,"column":0},"end":{"line":98,"column":6}},{"start":{"line":99,"column":0},"end":{"line":100,"column":6}},{"start":{"line":101,"column":0},"end":{"line":102,"column":6}},{"start":{"line":103,"column":0},"end":{"line":104,"column":6}},{"start":{"line":105,"column":0},"end":{"line":106,"column":6}},{"start":{"line":107,"column":0},"end":{"line":108,"column":6}},{"start":{"line":109,"column":0},"end":{"line":110,"column":6}},{"start":{"line":111,"column":0},"end":{"line":112,"column":6}},{"start":{"line":113,"column":0},"end":{"line":114,"column":6}},{"start":{"line":115,"column":0},"end":{"line":116,"column":6}},{"start":{"line":117,"column":0},"end":{"line":118,"column":6}},{"start":{"line":119,"column":0},"end":{"line":120,"column":6}},{"start":{"line":121,"column":0},"end":{"line":122,"column":6}},{"start":{"line":123,"column":0},"end":{"line":124,"column":6}},{"start":{"line":125,"column":0},"end":{"line":126,"column":6}},{"start":{"line":127,"column":0},"end":{"line":128,"column":6}},{"start":{"line":129,"column":0},"end":{"line":130,"column":6}}]},"6":{"line":144,"type":"if","locations":[{"start":{"line":144,"column":4},"end":{"line":144,"column":4}},{"start":{"line":144,"column":4},"end":{"line":144,"column":4}}]},"7":{"line":148,"type":"binary-expr","locations":[{"start":{"line":148,"column":17},"end":{"line":148,"column":35}},{"start":{"line":148,"column":39},"end":{"line":148,"column":64}}]},"8":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":4},"end":{"line":149,"column":4}},{"start":{"line":149,"column":4},"end":{"line":149,"column":4}}]},"9":{"line":158,"type":"binary-expr","locations":[{"start":{"line":158,"column":16},"end":{"line":158,"column":32}},{"start":{"line":158,"column":36},"end":{"line":158,"column":37}}]},"10":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":8},"end":{"line":159,"column":8}},{"start":{"line":159,"column":8},"end":{"line":159,"column":8}}]},"11":{"line":160,"type":"binary-expr","locations":[{"start":{"line":160,"column":20},"end":{"line":160,"column":40}},{"start":{"line":160,"column":44},"end":{"line":160,"column":49}}]},"12":{"line":167,"type":"if","locations":[{"start":{"line":167,"column":8},"end":{"line":167,"column":8}},{"start":{"line":167,"column":8},"end":{"line":167,"column":8}}]},"13":{"line":170,"type":"if","locations":[{"start":{"line":170,"column":12},"end":{"line":170,"column":12}},{"start":{"line":170,"column":12},"end":{"line":170,"column":12}}]},"14":{"line":170,"type":"binary-expr","locations":[{"start":{"line":170,"column":16},"end":{"line":170,"column":31}},{"start":{"line":170,"column":35},"end":{"line":170,"column":63}}]},"15":{"line":173,"type":"binary-expr","locations":[{"start":{"line":173,"column":21},"end":{"line":173,"column":33}},{"start":{"line":173,"column":37},"end":{"line":173,"column":57}}]},"16":{"line":175,"type":"if","locations":[{"start":{"line":175,"column":8},"end":{"line":175,"column":8}},{"start":{"line":175,"column":8},"end":{"line":175,"column":8}}]},"17":{"line":175,"type":"binary-expr","locations":[{"start":{"line":175,"column":12},"end":{"line":175,"column":41}},{"start":{"line":175,"column":45},"end":{"line":175,"column":59}},{"start":{"line":175,"column":63},"end":{"line":175,"column":73}}]},"18":{"line":177,"type":"if","locations":[{"start":{"line":177,"column":12},"end":{"line":177,"column":12}},{"start":{"line":177,"column":12},"end":{"line":177,"column":12}}]},"19":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":20},"end":{"line":180,"column":20}},{"start":{"line":180,"column":20},"end":{"line":180,"column":20}}]},"20":{"line":180,"type":"binary-expr","locations":[{"start":{"line":180,"column":24},"end":{"line":180,"column":42}},{"start":{"line":180,"column":46},"end":{"line":180,"column":51}}]},"21":{"line":183,"type":"if","locations":[{"start":{"line":183,"column":16},"end":{"line":183,"column":16}},{"start":{"line":183,"column":16},"end":{"line":183,"column":16}}]},"22":{"line":184,"type":"binary-expr","locations":[{"start":{"line":184,"column":159},"end":{"line":184,"column":182}},{"start":{"line":184,"column":186},"end":{"line":184,"column":192}}]},"23":{"line":186,"type":"cond-expr","locations":[{"start":{"line":186,"column":102},"end":{"line":186,"column":116}},{"start":{"line":186,"column":117},"end":{"line":186,"column":164}}]},"24":{"line":186,"type":"binary-expr","locations":[{"start":{"line":186,"column":124},"end":{"line":186,"column":147}},{"start":{"line":186,"column":151},"end":{"line":186,"column":157}}]},"25":{"line":188,"type":"binary-expr","locations":[{"start":{"line":188,"column":72},"end":{"line":188,"column":95}},{"start":{"line":188,"column":99},"end":{"line":188,"column":105}}]},"26":{"line":191,"type":"if","locations":[{"start":{"line":191,"column":8},"end":{"line":191,"column":8}},{"start":{"line":191,"column":8},"end":{"line":191,"column":8}}]},"27":{"line":191,"type":"binary-expr","locations":[{"start":{"line":191,"column":12},"end":{"line":191,"column":38}},{"start":{"line":191,"column":42},"end":{"line":191,"column":59}}]},"28":{"line":194,"type":"switch","locations":[{"start":{"line":195,"column":8},"end":{"line":212,"column":18}},{"start":{"line":213,"column":8},"end":{"line":234,"column":18}},{"start":{"line":235,"column":8},"end":{"line":236,"column":24}}]},"29":{"line":201,"type":"if","locations":[{"start":{"line":201,"column":12},"end":{"line":201,"column":12}},{"start":{"line":201,"column":12},"end":{"line":201,"column":12}}]},"30":{"line":206,"type":"if","locations":[{"start":{"line":206,"column":16},"end":{"line":206,"column":16}},{"start":{"line":206,"column":16},"end":{"line":206,"column":16}}]},"31":{"line":216,"type":"binary-expr","locations":[{"start":{"line":216,"column":60},"end":{"line":216,"column":63}},{"start":{"line":216,"column":67},"end":{"line":216,"column":68}}]},"32":{"line":216,"type":"binary-expr","locations":[{"start":{"line":216,"column":169},"end":{"line":216,"column":172}},{"start":{"line":216,"column":176},"end":{"line":216,"column":177}}]},"33":{"line":217,"type":"if","locations":[{"start":{"line":217,"column":12},"end":{"line":217,"column":12}},{"start":{"line":217,"column":12},"end":{"line":217,"column":12}}]},"34":{"line":218,"type":"binary-expr","locations":[{"start":{"line":218,"column":58},"end":{"line":218,"column":61}},{"start":{"line":218,"column":65},"end":{"line":218,"column":66}}]},"35":{"line":221,"type":"if","locations":[{"start":{"line":221,"column":12},"end":{"line":221,"column":12}},{"start":{"line":221,"column":12},"end":{"line":221,"column":12}}]},"36":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":12},"end":{"line":224,"column":12}},{"start":{"line":224,"column":12},"end":{"line":224,"column":12}}]},"37":{"line":246,"type":"if","locations":[{"start":{"line":246,"column":8},"end":{"line":246,"column":8}},{"start":{"line":246,"column":8},"end":{"line":246,"column":8}}]},"38":{"line":259,"type":"if","locations":[{"start":{"line":259,"column":8},"end":{"line":259,"column":8}},{"start":{"line":259,"column":8},"end":{"line":259,"column":8}}]},"39":{"line":271,"type":"if","locations":[{"start":{"line":271,"column":8},"end":{"line":271,"column":8}},{"start":{"line":271,"column":8},"end":{"line":271,"column":8}}]},"40":{"line":277,"type":"if","locations":[{"start":{"line":277,"column":8},"end":{"line":277,"column":8}},{"start":{"line":277,"column":8},"end":{"line":277,"column":8}}]},"41":{"line":294,"type":"if","locations":[{"start":{"line":294,"column":8},"end":{"line":294,"column":8}},{"start":{"line":294,"column":8},"end":{"line":294,"column":8}}]},"42":{"line":300,"type":"cond-expr","locations":[{"start":{"line":301,"column":14},"end":{"line":301,"column":147}},{"start":{"line":302,"column":14},"end":{"line":302,"column":44}}]},"43":{"line":301,"type":"cond-expr","locations":[{"start":{"line":301,"column":50},"end":{"line":301,"column":74}},{"start":{"line":301,"column":77},"end":{"line":301,"column":78}}]},"44":{"line":305,"type":"if","locations":[{"start":{"line":305,"column":8},"end":{"line":305,"column":8}},{"start":{"line":305,"column":8},"end":{"line":305,"column":8}}]},"45":{"line":319,"type":"cond-expr","locations":[{"start":{"line":319,"column":35},"end":{"line":319,"column":40}},{"start":{"line":319,"column":41},"end":{"line":319,"column":43}}]},"46":{"line":323,"type":"if","locations":[{"start":{"line":323,"column":8},"end":{"line":323,"column":8}},{"start":{"line":323,"column":8},"end":{"line":323,"column":8}}]},"47":{"line":326,"type":"cond-expr","locations":[{"start":{"line":326,"column":54},"end":{"line":326,"column":59}},{"start":{"line":326,"column":60},"end":{"line":326,"column":62}}]},"48":{"line":334,"type":"if","locations":[{"start":{"line":334,"column":8},"end":{"line":334,"column":8}},{"start":{"line":334,"column":8},"end":{"line":334,"column":8}}]},"49":{"line":337,"type":"if","locations":[{"start":{"line":337,"column":8},"end":{"line":337,"column":8}},{"start":{"line":337,"column":8},"end":{"line":337,"column":8}}]},"50":{"line":345,"type":"if","locations":[{"start":{"line":345,"column":8},"end":{"line":345,"column":8}},{"start":{"line":345,"column":8},"end":{"line":345,"column":8}}]},"51":{"line":352,"type":"if","locations":[{"start":{"line":352,"column":12},"end":{"line":352,"column":12}},{"start":{"line":352,"column":12},"end":{"line":352,"column":12}}]},"52":{"line":352,"type":"binary-expr","locations":[{"start":{"line":352,"column":16},"end":{"line":352,"column":25}},{"start":{"line":352,"column":30},"end":{"line":352,"column":36}},{"start":{"line":352,"column":40},"end":{"line":352,"column":77}}]},"53":{"line":355,"type":"if","locations":[{"start":{"line":355,"column":16},"end":{"line":355,"column":16}},{"start":{"line":355,"column":16},"end":{"line":355,"column":16}}]},"54":{"line":358,"type":"if","locations":[{"start":{"line":358,"column":8},"end":{"line":358,"column":8}},{"start":{"line":358,"column":8},"end":{"line":358,"column":8}}]},"55":{"line":360,"type":"if","locations":[{"start":{"line":360,"column":12},"end":{"line":360,"column":12}},{"start":{"line":360,"column":12},"end":{"line":360,"column":12}}]},"56":{"line":364,"type":"cond-expr","locations":[{"start":{"line":364,"column":48},"end":{"line":364,"column":124}},{"start":{"line":364,"column":127},"end":{"line":364,"column":168}}]},"57":{"line":369,"type":"if","locations":[{"start":{"line":369,"column":12},"end":{"line":369,"column":12}},{"start":{"line":369,"column":12},"end":{"line":369,"column":12}}]},"58":{"line":376,"type":"if","locations":[{"start":{"line":376,"column":12},"end":{"line":376,"column":12}},{"start":{"line":376,"column":12},"end":{"line":376,"column":12}}]},"59":{"line":376,"type":"binary-expr","locations":[{"start":{"line":376,"column":16},"end":{"line":376,"column":25}},{"start":{"line":376,"column":29},"end":{"line":376,"column":40}}]},"60":{"line":377,"type":"if","locations":[{"start":{"line":377,"column":12},"end":{"line":377,"column":12}},{"start":{"line":377,"column":12},"end":{"line":377,"column":12}}]},"61":{"line":380,"type":"if","locations":[{"start":{"line":380,"column":8},"end":{"line":380,"column":8}},{"start":{"line":380,"column":8},"end":{"line":380,"column":8}}]},"62":{"line":389,"type":"if","locations":[{"start":{"line":389,"column":8},"end":{"line":389,"column":8}},{"start":{"line":389,"column":8},"end":{"line":389,"column":8}}]},"63":{"line":415,"type":"switch","locations":[{"start":{"line":416,"column":0},"end":{"line":417,"column":6}},{"start":{"line":418,"column":0},"end":{"line":419,"column":6}},{"start":{"line":420,"column":0},"end":{"line":421,"column":6}},{"start":{"line":422,"column":0},"end":{"line":423,"column":6}},{"start":{"line":424,"column":0},"end":{"line":425,"column":6}},{"start":{"line":426,"column":0},"end":{"line":427,"column":6}},{"start":{"line":428,"column":0},"end":{"line":429,"column":6}},{"start":{"line":430,"column":0},"end":{"line":431,"column":6}},{"start":{"line":432,"column":0},"end":{"line":433,"column":6}},{"start":{"line":434,"column":0},"end":{"line":435,"column":6}},{"start":{"line":436,"column":0},"end":{"line":437,"column":6}},{"start":{"line":438,"column":0},"end":{"line":439,"column":6}},{"start":{"line":440,"column":0},"end":{"line":441,"column":6}},{"start":{"line":442,"column":0},"end":{"line":443,"column":6}},{"start":{"line":444,"column":0},"end":{"line":445,"column":6}},{"start":{"line":446,"column":0},"end":{"line":447,"column":6}},{"start":{"line":448,"column":0},"end":{"line":449,"column":6}}]},"64":{"line":466,"type":"if","locations":[{"start":{"line":466,"column":4},"end":{"line":466,"column":4}},{"start":{"line":466,"column":4},"end":{"line":466,"column":4}}]},"65":{"line":512,"type":"if","locations":[{"start":{"line":512,"column":4},"end":{"line":512,"column":4}},{"start":{"line":512,"column":4},"end":{"line":512,"column":4}}]},"66":{"line":572,"type":"if","locations":[{"start":{"line":572,"column":4},"end":{"line":572,"column":4}},{"start":{"line":572,"column":4},"end":{"line":572,"column":4}}]},"67":{"line":572,"type":"binary-expr","locations":[{"start":{"line":572,"column":8},"end":{"line":572,"column":43}},{"start":{"line":572,"column":47},"end":{"line":572,"column":81}}]},"68":{"line":576,"type":"if","locations":[{"start":{"line":576,"column":11},"end":{"line":576,"column":11}},{"start":{"line":576,"column":11},"end":{"line":576,"column":11}}]},"69":{"line":578,"type":"if","locations":[{"start":{"line":578,"column":6},"end":{"line":578,"column":6}},{"start":{"line":578,"column":6},"end":{"line":578,"column":6}}]},"70":{"line":578,"type":"binary-expr","locations":[{"start":{"line":578,"column":10},"end":{"line":578,"column":30}},{"start":{"line":578,"column":34},"end":{"line":578,"column":65}}]},"71":{"line":583,"type":"if","locations":[{"start":{"line":583,"column":11},"end":{"line":583,"column":11}},{"start":{"line":583,"column":11},"end":{"line":583,"column":11}}]},"72":{"line":597,"type":"if","locations":[{"start":{"line":597,"column":4},"end":{"line":597,"column":4}},{"start":{"line":597,"column":4},"end":{"line":597,"column":4}}]},"73":{"line":597,"type":"binary-expr","locations":[{"start":{"line":597,"column":8},"end":{"line":597,"column":43}},{"start":{"line":597,"column":47},"end":{"line":597,"column":81}},{"start":{"line":597,"column":85},"end":{"line":597,"column":122}}]},"74":{"line":601,"type":"if","locations":[{"start":{"line":601,"column":11},"end":{"line":601,"column":11}},{"start":{"line":601,"column":11},"end":{"line":601,"column":11}}]},"75":{"line":602,"type":"if","locations":[{"start":{"line":602,"column":6},"end":{"line":602,"column":6}},{"start":{"line":602,"column":6},"end":{"line":602,"column":6}}]},"76":{"line":602,"type":"binary-expr","locations":[{"start":{"line":602,"column":10},"end":{"line":602,"column":30}},{"start":{"line":602,"column":34},"end":{"line":602,"column":65}}]},"77":{"line":607,"type":"if","locations":[{"start":{"line":607,"column":11},"end":{"line":607,"column":11}},{"start":{"line":607,"column":11},"end":{"line":607,"column":11}}]},"78":{"line":619,"type":"if","locations":[{"start":{"line":619,"column":4},"end":{"line":619,"column":4}},{"start":{"line":619,"column":4},"end":{"line":619,"column":4}}]},"79":{"line":619,"type":"binary-expr","locations":[{"start":{"line":619,"column":8},"end":{"line":619,"column":43}},{"start":{"line":619,"column":47},"end":{"line":619,"column":81}},{"start":{"line":619,"column":85},"end":{"line":619,"column":122}}]},"80":{"line":623,"type":"if","locations":[{"start":{"line":623,"column":11},"end":{"line":623,"column":11}},{"start":{"line":623,"column":11},"end":{"line":623,"column":11}}]},"81":{"line":624,"type":"if","locations":[{"start":{"line":624,"column":6},"end":{"line":624,"column":6}},{"start":{"line":624,"column":6},"end":{"line":624,"column":6}}]},"82":{"line":624,"type":"binary-expr","locations":[{"start":{"line":624,"column":10},"end":{"line":624,"column":30}},{"start":{"line":624,"column":34},"end":{"line":624,"column":65}}]},"83":{"line":629,"type":"if","locations":[{"start":{"line":629,"column":11},"end":{"line":629,"column":11}},{"start":{"line":629,"column":11},"end":{"line":629,"column":11}}]},"84":{"line":648,"type":"if","locations":[{"start":{"line":648,"column":4},"end":{"line":648,"column":4}},{"start":{"line":648,"column":4},"end":{"line":648,"column":4}}]},"85":{"line":648,"type":"binary-expr","locations":[{"start":{"line":648,"column":8},"end":{"line":648,"column":43}},{"start":{"line":648,"column":47},"end":{"line":648,"column":81}},{"start":{"line":648,"column":85},"end":{"line":648,"column":122}}]},"86":{"line":652,"type":"if","locations":[{"start":{"line":652,"column":11},"end":{"line":652,"column":11}},{"start":{"line":652,"column":11},"end":{"line":652,"column":11}}]},"87":{"line":653,"type":"if","locations":[{"start":{"line":653,"column":6},"end":{"line":653,"column":6}},{"start":{"line":653,"column":6},"end":{"line":653,"column":6}}]},"88":{"line":653,"type":"binary-expr","locations":[{"start":{"line":653,"column":10},"end":{"line":653,"column":30}},{"start":{"line":653,"column":34},"end":{"line":653,"column":65}}]},"89":{"line":658,"type":"if","locations":[{"start":{"line":658,"column":11},"end":{"line":658,"column":11}},{"start":{"line":658,"column":11},"end":{"line":658,"column":11}}]},"90":{"line":670,"type":"if","locations":[{"start":{"line":670,"column":4},"end":{"line":670,"column":4}},{"start":{"line":670,"column":4},"end":{"line":670,"column":4}}]},"91":{"line":670,"type":"binary-expr","locations":[{"start":{"line":670,"column":8},"end":{"line":670,"column":43}},{"start":{"line":670,"column":47},"end":{"line":670,"column":81}},{"start":{"line":670,"column":85},"end":{"line":670,"column":122}}]},"92":{"line":674,"type":"if","locations":[{"start":{"line":674,"column":11},"end":{"line":674,"column":11}},{"start":{"line":674,"column":11},"end":{"line":674,"column":11}}]},"93":{"line":675,"type":"if","locations":[{"start":{"line":675,"column":6},"end":{"line":675,"column":6}},{"start":{"line":675,"column":6},"end":{"line":675,"column":6}}]},"94":{"line":675,"type":"binary-expr","locations":[{"start":{"line":675,"column":10},"end":{"line":675,"column":30}},{"start":{"line":675,"column":34},"end":{"line":675,"column":65}}]},"95":{"line":680,"type":"if","locations":[{"start":{"line":680,"column":11},"end":{"line":680,"column":11}},{"start":{"line":680,"column":11},"end":{"line":680,"column":11}}]},"96":{"line":699,"type":"if","locations":[{"start":{"line":699,"column":4},"end":{"line":699,"column":4}},{"start":{"line":699,"column":4},"end":{"line":699,"column":4}}]},"97":{"line":699,"type":"binary-expr","locations":[{"start":{"line":699,"column":8},"end":{"line":699,"column":43}},{"start":{"line":699,"column":47},"end":{"line":699,"column":81}},{"start":{"line":699,"column":85},"end":{"line":699,"column":122}}]},"98":{"line":703,"type":"if","locations":[{"start":{"line":703,"column":11},"end":{"line":703,"column":11}},{"start":{"line":703,"column":11},"end":{"line":703,"column":11}}]},"99":{"line":704,"type":"if","locations":[{"start":{"line":704,"column":6},"end":{"line":704,"column":6}},{"start":{"line":704,"column":6},"end":{"line":704,"column":6}}]},"100":{"line":704,"type":"binary-expr","locations":[{"start":{"line":704,"column":10},"end":{"line":704,"column":30}},{"start":{"line":704,"column":34},"end":{"line":704,"column":65}}]},"101":{"line":709,"type":"if","locations":[{"start":{"line":709,"column":11},"end":{"line":709,"column":11}},{"start":{"line":709,"column":11},"end":{"line":709,"column":11}}]},"102":{"line":735,"type":"switch","locations":[{"start":{"line":736,"column":6},"end":{"line":737,"column":42}},{"start":{"line":738,"column":6},"end":{"line":739,"column":52}},{"start":{"line":740,"column":6},"end":{"line":741,"column":46}},{"start":{"line":742,"column":6},"end":{"line":743,"column":52}},{"start":{"line":744,"column":6},"end":{"line":745,"column":62}},{"start":{"line":746,"column":6},"end":{"line":747,"column":56}},{"start":{"line":748,"column":6},"end":{"line":749,"column":56}}]}}}} \ No newline at end of file diff --git a/node_modules/terraformer-wkt-parser/coverage/dist/index.html b/node_modules/terraformer-wkt-parser/coverage/dist/index.html new file mode 100644 index 0000000..5e463a4 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/dist/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for dist/ + + + + + + + +
    +
    +

    + all files dist/ +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    terraformer-wkt-parser.js
    78.64%405/51574.38%209/28165.31%32/4979.17%399/504
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/dist/terraformer-wkt-parser.js.html b/node_modules/terraformer-wkt-parser/coverage/dist/terraformer-wkt-parser.js.html new file mode 100644 index 0000000..9060587 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/dist/terraformer-wkt-parser.js.html @@ -0,0 +1,2348 @@ + + + + Code coverage report for dist/terraformer-wkt-parser.js + + + + + + + +
    +
    +

    + all files / dist/ terraformer-wkt-parser.js +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +  +  + +  + +  + +  +  + +  +  +  + +  +  + + +  +  +  +  +  +  +  +500× +500× + +  + +  + +  + +  + +  + +  +71× +71× +56× +56× +29× +29× +82× +82× +30× +30× + + +19× +19× +25× +25× + + + + + + + + + + +28× +28× +16× +16× + + + + +10× +10× +32× +32× +12× +12× + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  +  +  +  +  +  +  +  +37× +37× +37× +37× +37× +37× +  +37× +37× +37× +37× +  + +  +  +  +  + +816× +816× +816× +  +  +816× +  +37× +37× +1316× +1316× +74× +  +1242× +816× +  +1242× +  +1316× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1316× +  +  +1316× +  +816× +816× +816× +816× +816× +816× +816× +816× +816× +816× +816× +  +  +  +  +  +816× +  +500× +500× +500× +500× +  +  +500× +500× +37× +  +463× +463× +463× +463× +  +463× +463× +463× +463× +463× +463× +  +  +  +  +  +  +  + + + +  +  +  +  +  +  +  +  +37× +37× +37× +37× +37× +37× +37× +37× +37× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1258× +  +  +1258× +  +1258× +  +  +  +  +  +1258× +1258× +1258× +  +1258× +1258× +5168× +5168× +1258× +1258× +1258× +  +  +1258× +1258× +1258× +1258× +  +  +  +1258× +1258× +1258× +1258× +1258× +  +  +1258× +1258× +1258× +1258× +1258× +1258× +442× +  +  +  +  +  +  +  +  +  +1258× +1258× +816× +  +442× +  +  +  +  +  +  +  +  +  +1258× +  +  +  +  +  +  +  + + +  +  +1258× +1258× +  +442× +82× +  +82× +  +426× +  + +  + +  + +  + +  + +  + +  +125× +  + +  + +  + +  + +  +37× +  +  +  +  +  + + + + + + +  +  + +156× +156× +  +  + +114× +114× +  +  +  +  +114× +  +  + +  +  +  + +25× +25× +  +  + +25× +  +25× +107× +  +  +25× +  +  + +19× +19× +  +  + + +  + +  +  + +19× +  +19× +25× +  +  +19× +13× +  + +  +  +  + + + +  +  + + +  + +  +  + + +  + +10× +  +  + +  +  + +  +  +  + +37× +  +37× +37× +  +  +  +  +37× +  +  + +28× +  +28× +108× +  +  +28× +  +28× +  +  +  + + +  + + +  + + +  + + +  + +  + +  + +  +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + +  +  + + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + +  +  + + +  + +  +  + + +  + + +  + + + + +  + +  + + +  +  + + + + + + +12× +  +  + + +  + +  +  + + +  + +  +  + +31× +  + +  + +  + +  + +  + +  + +  + +  +  +  +  +  + + + + +  + +  + 
    (function (root, factory) {
    + 
    +  // Node.
    +  Iif(typeof module === 'object' && typeof module.exports === 'object') {
    +    exports = module.exports = factory(require("terraformer"));
    +  } else Eif(typeof navigator === "object") {
    +    // Browser Global.
    +    Iif (!root.Terraformer){
    +      throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer")
    +    }
    +    root.Terraformer.WKT = factory(root.Terraformer);
    +  }
    + 
    +}(this, function(Terraformer) {
    +  var exports = { };
    + 
    +  /* Jison generated parser */
    +var parser = (function(){
    +var parser = {trace: function trace() { },
    +yy: {},
    +symbols_: {"error":2,"expressions":3,"point":4,"EOF":5,"linestring":6,"polygon":7,"multipoint":8,"multilinestring":9,"multipolygon":10,"coordinate":11,"DOUBLE_TOK":12,"ptarray":13,"COMMA":14,"ring_list":15,"ring":16,"(":17,")":18,"POINT":19,"Z":20,"ZM":21,"M":22,"EMPTY":23,"point_untagged":24,"polygon_list":25,"polygon_untagged":26,"point_list":27,"LINESTRING":28,"POLYGON":29,"MULTIPOINT":30,"MULTILINESTRING":31,"MULTIPOLYGON":32,"$accept":0,"$end":1},
    +terminals_: {2:"error",5:"EOF",12:"DOUBLE_TOK",14:"COMMA",17:"(",18:")",19:"POINT",20:"Z",21:"ZM",22:"M",23:"EMPTY",28:"LINESTRING",29:"POLYGON",30:"MULTIPOINT",31:"MULTILINESTRING",32:"MULTIPOLYGON"},
    +productions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]],
    +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$
    +/**/) {
    + 
    +var $0 = $.length - 1;
    +switch (yystate) {
    +case 1: return $[$0-1]; 
    +break;
    +case 2: return $[$0-1]; 
    +break;
    +case 3: return $[$0-1]; 
    +break;
    +case 4: return $[$0-1]; 
    +break;
    +case 5: return $[$0-1]; 
    +break;
    +case 6: return $[$0-1]; 
    +break;
    +case 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); 
    +break;
    +case 10: this.$ = $[$0-2].addPoint($[$0]); 
    +break;
    +case 11: this.$ = $[$0]; 
    +break;
    +case 12: this.$ = $[$0-2].addRing($[$0]); 
    +break;
    +case 13: this.$ = new RingList($[$0]); 
    +break;
    +case 14: this.$ = new Ring($[$0-1]); 
    +break;
    +case 15: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0] }; 
    +break;
    +case 16: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true } }; 
    +break;
    +case 17: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true, m: true } }; 
    +break;
    +case 18: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { m: true } }; 
    +break;
    +case 19: this.$ = { "type": "Point", "coordinates": [ ] }; 
    +break;
    +case 20: this.$ = $[$0]; 
    +break;
    +case 21: this.$ = $[$0-1]; 
    +break;
    +case 22: this.$ = $[$0-2].addPolygon($[$0]); 
    +break;
    +case 23: this.$ = new PolygonList($[$0]); 
    +break;
    +case 24: this.$ = $[$0-1]; 
    +break;
    +case 25: this.$ = $[$0-2].addPoint($[$0]); 
    +break;
    +case 26: this.$ = $[$0]; 
    +break;
    +case 27: this.$ = { "type": "LineString", "coordinates": $[$0-1].data }; 
    +break;
    +case 28: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true } }; 
    +break;
    +case 29: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { m: true } }; 
    +break;
    +case 30: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; 
    +break;
    +case 31: this.$ = { "type": "LineString", "coordinates": [ ] }; 
    +break;
    +case 32: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 33: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 34: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 35: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 36: this.$ = { "type": "Polygon", "coordinates": [ ] }; 
    +break;
    +case 37: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data }; 
    +break;
    +case 38: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true } }; 
    +break;
    +case 39: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { m: true } }; 
    +break;
    +case 40: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; 
    +break;
    +case 41: this.$ = { "type": "MultiPoint", "coordinates": [ ] } 
    +break;
    +case 42: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 43: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 44: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 45: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 46: this.$ = { "type": "MultiLineString", "coordinates": [ ] }; 
    +break;
    +case 47: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON() }; 
    +break;
    +case 48: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; 
    +break;
    +case 49: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; 
    +break;
    +case 50: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; 
    +break;
    +case 51: this.$ = { "type": "MultiPolygon", "coordinates": [ ] }; 
    +break;
    +}
    +},
    +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,19:[1,8],28:[1,9],29:[1,10],30:[1,11],31:[1,12],32:[1,13]},{1:[3]},{5:[1,14]},{5:[1,15]},{5:[1,16]},{5:[1,17]},{5:[1,18]},{5:[1,19]},{17:[1,20],20:[1,21],21:[1,22],22:[1,23],23:[1,24]},{17:[1,25],20:[1,26],21:[1,28],22:[1,27],23:[1,29]},{17:[1,30],20:[1,31],21:[1,33],22:[1,32],23:[1,34]},{17:[1,35],20:[1,36],21:[1,38],22:[1,37],23:[1,39]},{17:[1,40],20:[1,41],21:[1,43],22:[1,42],23:[1,44]},{17:[1,45],20:[1,46],21:[1,48],22:[1,47],23:[1,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{11:51,12:[1,52],13:50},{17:[1,53]},{17:[1,54]},{17:[1,55]},{5:[2,19]},{11:58,12:[1,52],17:[1,59],24:57,27:56},{17:[1,60]},{17:[1,61]},{17:[1,62]},{5:[2,31]},{15:63,16:64,17:[1,65]},{17:[1,66]},{17:[1,67]},{17:[1,68]},{5:[2,36]},{11:58,12:[1,52],17:[1,59],24:57,27:69},{17:[1,70]},{17:[1,71]},{17:[1,72]},{5:[2,41]},{15:73,16:64,17:[1,65]},{17:[1,74]},{17:[1,75]},{17:[1,76]},{5:[2,46]},{17:[1,79],25:77,26:78},{17:[1,80]},{17:[1,81]},{17:[1,82]},{5:[2,51]},{14:[1,84],18:[1,83]},{14:[2,11],18:[2,11]},{12:[1,85]},{11:51,12:[1,52],13:86},{11:51,12:[1,52],13:87},{11:51,12:[1,52],13:88},{14:[1,90],18:[1,89]},{14:[2,26],18:[2,26]},{14:[2,20],18:[2,20]},{11:91,12:[1,52]},{11:58,12:[1,52],17:[1,59],24:57,27:92},{11:58,12:[1,52],17:[1,59],24:57,27:93},{11:58,12:[1,52],17:[1,59],24:57,27:94},{14:[1,96],18:[1,95]},{14:[2,13],18:[2,13]},{11:51,12:[1,52],13:97},{15:98,16:64,17:[1,65]},{15:99,16:64,17:[1,65]},{15:100,16:64,17:[1,65]},{14:[1,90],18:[1,101]},{11:58,12:[1,52],17:[1,59],24:57,27:102},{11:58,12:[1,52],17:[1,59],24:57,27:103},{11:58,12:[1,52],17:[1,59],24:57,27:104},{14:[1,96],18:[1,105]},{15:106,16:64,17:[1,65]},{15:107,16:64,17:[1,65]},{15:108,16:64,17:[1,65]},{14:[1,110],18:[1,109]},{14:[2,23],18:[2,23]},{15:111,16:64,17:[1,65]},{17:[1,79],25:112,26:78},{17:[1,79],25:113,26:78},{17:[1,79],25:114,26:78},{5:[2,15]},{11:115,12:[1,52]},{12:[1,116],14:[2,7],18:[2,7]},{14:[1,84],18:[1,117]},{14:[1,84],18:[1,118]},{14:[1,84],18:[1,119]},{5:[2,27]},{11:58,12:[1,52],17:[1,59],24:120},{18:[1,121]},{14:[1,90],18:[1,122]},{14:[1,90],18:[1,123]},{14:[1,90],18:[1,124]},{5:[2,32]},{16:125,17:[1,65]},{14:[1,84],18:[1,126]},{14:[1,96],18:[1,127]},{14:[1,96],18:[1,128]},{14:[1,96],18:[1,129]},{5:[2,37]},{14:[1,90],18:[1,130]},{14:[1,90],18:[1,131]},{14:[1,90],18:[1,132]},{5:[2,42]},{14:[1,96],18:[1,133]},{14:[1,96],18:[1,134]},{14:[1,96],18:[1,135]},{5:[2,47]},{17:[1,79],26:136},{14:[1,96],18:[1,137]},{14:[1,110],18:[1,138]},{14:[1,110],18:[1,139]},{14:[1,110],18:[1,140]},{14:[2,10],18:[2,10]},{12:[1,141],14:[2,8],18:[2,8]},{5:[2,16]},{5:[2,17]},{5:[2,18]},{14:[2,25],18:[2,25]},{14:[2,21],18:[2,21]},{5:[2,28]},{5:[2,29]},{5:[2,30]},{14:[2,12],18:[2,12]},{14:[2,14],18:[2,14]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,43]},{5:[2,44]},{5:[2,45]},{14:[2,22],18:[2,22]},{14:[2,24],18:[2,24]},{5:[2,48]},{5:[2,49]},{5:[2,50]},{14:[2,9],18:[2,9]}],
    +defaultActions: {14:[2,1],15:[2,2],16:[2,3],17:[2,4],18:[2,5],19:[2,6],24:[2,19],29:[2,31],34:[2,36],39:[2,41],44:[2,46],49:[2,51],83:[2,15],89:[2,27],95:[2,32],101:[2,37],105:[2,42],109:[2,47],117:[2,16],118:[2,17],119:[2,18],122:[2,28],123:[2,29],124:[2,30],127:[2,33],128:[2,34],129:[2,35],130:[2,38],131:[2,39],132:[2,40],133:[2,43],134:[2,44],135:[2,45],138:[2,48],139:[2,49],140:[2,50]},
    +parseError: function parseError(str, hash) {
    +    throw new Error(str);
    +},
    +parse: function parse(input) {
    +    var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
    +    this.lexer.setInput(input);
    +    this.lexer.yy = this.yy;
    +    this.yy.lexer = this.lexer;
    +    this.yy.parser = this;
    +    Iif (typeof this.lexer.yylloc == "undefined")
    +        this.lexer.yylloc = {};
    +    var yyloc = this.lexer.yylloc;
    +    lstack.push(yyloc);
    +    var ranges = this.lexer.options && this.lexer.options.ranges;
    +    Iif (typeof this.yy.parseError === "function")
    +        this.parseError = this.yy.parseError;
    +    function popStack(n) {
    +        stack.length = stack.length - 2 * n;
    +        vstack.length = vstack.length - n;
    +        lstack.length = lstack.length - n;
    +    }
    +    function lex() {
    +        var token;
    +        token = self.lexer.lex() || 1;
    +        Iif (typeof token !== "number") {
    +            token = self.symbols_[token] || token;
    +        }
    +        return token;
    +    }
    +    var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
    +    while (true) {
    +        state = stack[stack.length - 1];
    +        if (this.defaultActions[state]) {
    +            action = this.defaultActions[state];
    +        } else {
    +            if (symbol === null || typeof symbol == "undefined") {
    +                symbol = lex();
    +            }
    +            action = table[state] && table[state][symbol];
    +        }
    +        Iif (typeof action === "undefined" || !action.length || !action[0]) {
    +            var errStr = "";
    +            if (!recovering) {
    +                expected = [];
    +                for (p in table[state])
    +                    if (this.terminals_[p] && p > 2) {
    +                        expected.push("'" + this.terminals_[p] + "'");
    +                    }
    +                if (this.lexer.showPosition) {
    +                    errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
    +                } else {
    +                    errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
    +                }
    +                this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
    +            }
    +        }
    +        Iif (action[0] instanceof Array && action.length > 1) {
    +            throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
    +        }
    +        switch (action[0]) {
    +        case 1:
    +            stack.push(symbol);
    +            vstack.push(this.lexer.yytext);
    +            lstack.push(this.lexer.yylloc);
    +            stack.push(action[1]);
    +            symbol = null;
    +            Eif (!preErrorSymbol) {
    +                yyleng = this.lexer.yyleng;
    +                yytext = this.lexer.yytext;
    +                yylineno = this.lexer.yylineno;
    +                yyloc = this.lexer.yylloc;
    +                Iif (recovering > 0)
    +                    recovering--;
    +            } else {
    +                symbol = preErrorSymbol;
    +                preErrorSymbol = null;
    +            }
    +            break;
    +        case 2:
    +            len = this.productions_[action[1]][1];
    +            yyval.$ = vstack[vstack.length - len];
    +            yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
    +            Iif (ranges) {
    +                yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
    +            }
    +            r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
    +            if (typeof r !== "undefined") {
    +                return r;
    +            }
    +            Eif (len) {
    +                stack = stack.slice(0, -1 * len * 2);
    +                vstack = vstack.slice(0, -1 * len);
    +                lstack = lstack.slice(0, -1 * len);
    +            }
    +            stack.push(this.productions_[action[1]][0]);
    +            vstack.push(yyval.$);
    +            lstack.push(yyval._$);
    +            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
    +            stack.push(newState);
    +            break;
    +        case 3:
    +            return true;
    +        }
    +    }
    +    return true;
    +}
    +};
    +undefined/* Jison generated lexer */
    +var lexer = (function(){
    +var lexer = ({EOF:1,
    +parseError:function parseError(str, hash) {
    +        if (this.yy.parser) {
    +            this.yy.parser.parseError(str, hash);
    +        } else {
    +            throw new Error(str);
    +        }
    +    },
    +setInput:function (input) {
    +        this._input = input;
    +        this._more = this._less = this.done = false;
    +        this.yylineno = this.yyleng = 0;
    +        this.yytext = this.matched = this.match = '';
    +        this.conditionStack = ['INITIAL'];
    +        this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
    +        Iif (this.options.ranges) this.yylloc.range = [0,0];
    +        this.offset = 0;
    +        return this;
    +    },
    +input:function () {
    +        var ch = this._input[0];
    +        this.yytext += ch;
    +        this.yyleng++;
    +        this.offset++;
    +        this.match += ch;
    +        this.matched += ch;
    +        var lines = ch.match(/(?:\r\n?|\n).*/g);
    +        if (lines) {
    +            this.yylineno++;
    +            this.yylloc.last_line++;
    +        } else {
    +            this.yylloc.last_column++;
    +        }
    +        if (this.options.ranges) this.yylloc.range[1]++;
    + 
    +        this._input = this._input.slice(1);
    +        return ch;
    +    },
    +unput:function (ch) {
    +        var len = ch.length;
    +        var lines = ch.split(/(?:\r\n?|\n)/g);
    + 
    +        this._input = ch + this._input;
    +        this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
    +        //this.yyleng -= len;
    +        this.offset -= len;
    +        var oldLines = this.match.split(/(?:\r\n?|\n)/g);
    +        this.match = this.match.substr(0, this.match.length-1);
    +        this.matched = this.matched.substr(0, this.matched.length-1);
    + 
    +        if (lines.length-1) this.yylineno -= lines.length-1;
    +        var r = this.yylloc.range;
    + 
    +        this.yylloc = {first_line: this.yylloc.first_line,
    +          last_line: this.yylineno+1,
    +          first_column: this.yylloc.first_column,
    +          last_column: lines ?
    +              (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
    +              this.yylloc.first_column - len
    +          };
    + 
    +        if (this.options.ranges) {
    +            this.yylloc.range = [r[0], r[0] + this.yyleng - len];
    +        }
    +        return this;
    +    },
    +more:function () {
    +        this._more = true;
    +        return this;
    +    },
    +less:function (n) {
    +        this.unput(this.match.slice(n));
    +    },
    +pastInput:function () {
    +        var past = this.matched.substr(0, this.matched.length - this.match.length);
    +        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
    +    },
    +upcomingInput:function () {
    +        var next = this.match;
    +        if (next.length < 20) {
    +            next += this._input.substr(0, 20-next.length);
    +        }
    +        return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
    +    },
    +showPosition:function () {
    +        var pre = this.pastInput();
    +        var c = new Array(pre.length + 1).join("-");
    +        return pre + this.upcomingInput() + "\n" + c+"^";
    +    },
    +next:function () {
    +        Iif (this.done) {
    +            return this.EOF;
    +        }
    +        if (!this._input) this.done = true;
    + 
    +        var token,
    +            match,
    +            tempMatch,
    +            index,
    +            col,
    +            lines;
    +        Eif (!this._more) {
    +            this.yytext = '';
    +            this.match = '';
    +        }
    +        var rules = this._currentRules();
    +        for (var i=0;i < rules.length; i++) {
    +            tempMatch = this._input.match(this.rules[rules[i]]);
    +            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
    +                match = tempMatch;
    +                index = i;
    +                Eif (!this.options.flex) break;
    +            }
    +        }
    +        Eif (match) {
    +            lines = match[0].match(/(?:\r\n?|\n).*/g);
    +            Iif (lines) this.yylineno += lines.length;
    +            this.yylloc = {first_line: this.yylloc.last_line,
    +                           last_line: this.yylineno+1,
    +                           first_column: this.yylloc.last_column,
    +                           last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
    +            this.yytext += match[0];
    +            this.match += match[0];
    +            this.matches = match;
    +            this.yyleng = this.yytext.length;
    +            Iif (this.options.ranges) {
    +                this.yylloc.range = [this.offset, this.offset += this.yyleng];
    +            }
    +            this._more = false;
    +            this._input = this._input.slice(match[0].length);
    +            this.matched += match[0];
    +            token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
    +            Iif (this.done && this._input) this.done = false;
    +            if (token) return token;
    +            else return;
    +        }
    +        if (this._input === "") {
    +            return this.EOF;
    +        } else {
    +            return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
    +                    {text: "", token: null, line: this.yylineno});
    +        }
    +    },
    +lex:function lex() {
    +        var r = this.next();
    +        if (typeof r !== 'undefined') {
    +            return r;
    +        } else {
    +            return this.lex();
    +        }
    +    },
    +begin:function begin(condition) {
    +        this.conditionStack.push(condition);
    +    },
    +popState:function popState() {
    +        return this.conditionStack.pop();
    +    },
    +_currentRules:function _currentRules() {
    +        return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
    +    },
    +topState:function () {
    +        return this.conditionStack[this.conditionStack.length-2];
    +    },
    +pushState:function begin(condition) {
    +        this.begin(condition);
    +    }});
    +lexer.options = {};
    +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START
    +/**/) {
    + 
    +var YYSTATE=YY_START
    +switch($avoiding_name_collisions) {
    +case 0:// ignore
    +break;
    +case 1:return 17
    +break;
    +case 2:return 18
    +break;
    +case 3:return 12
    +break;
    +case 4:return 19
    +break;
    +case 5:return 28
    +break;
    +case 6:return 29
    +break;
    +case 7:return 30
    +break;
    +case 8:return 31
    +break;
    +case 9:return 32
    +break;
    +case 10:return 14
    +break;
    +case 11:return 23
    +break;
    +case 12:return 22
    +break;
    +case 13:return 20
    +break;
    +case 14:return 21
    +break;
    +case 15:return 5
    +break;
    +case 16:return "INVALID"
    +break;
    +}
    +};
    +lexer.rules = [/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/];
    +lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"inclusive":true}};
    +return lexer;})()
    +parser.lexer = lexer;
    +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
    +return new Parser;
    +})();
    + 
    +  function PointArray (point) {
    +    this.data = [ point ];
    +    this.type = 'PointArray';
    +  }
    + 
    +  PointArray.prototype.addPoint = function (point) {
    +    Eif (point.type === 'PointArray') {
    +      this.data = this.data.concat(point.data);
    +    } else {
    +      this.data.push(point);
    +    }
    + 
    +    return this;
    +  };
    + 
    +  PointArray.prototype.toJSON = function () {
    +    return this.data;
    +  };
    + 
    +  function Ring (point) {
    +    this.data = point;
    +    this.type = 'Ring';
    +  }
    + 
    +  Ring.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.data.length; i++) {
    +      data.push(this.data.data[i]);
    +    }
    + 
    +    return data;
    +  };
    + 
    +  function RingList (ring) {
    +    this.data = [ ring ];
    +    this.type = 'RingList';
    +  }
    + 
    +  RingList.prototype.addRing = function (ring) {
    +    this.data.push(ring);
    + 
    +    return this;
    +  };
    + 
    +  RingList.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.length; i++) {
    +      data.push(this.data[i].toJSON());
    +    }
    + 
    +    if (data.length === 1) {
    +      return data;
    +    } else {
    +      return data;
    +    }
    +  };
    + 
    +  function PolygonList (polygon) {
    +    this.data = [ polygon ];
    +    this.type = 'PolygonList';
    +  }
    + 
    +  PolygonList.prototype.addPolygon = function (polygon) {
    +    this.data.push(polygon);
    + 
    +    return this;
    +  };
    + 
    +  PolygonList.prototype.toJSON = function () {
    +    var data = [ ];
    + 
    +    for (var i = 0; i < this.data.length; i++) {
    +      data = data.concat( [ this.data[i].toJSON() ] );
    +    }
    + 
    +    return data;
    +  };
    + 
    +  function _parse () {
    +    return parser.parse.apply(parser, arguments);
    +  }
    + 
    +  function parse (element) {
    +    var res, primitive;
    + 
    +    try {
    +      res = parser.parse(element);
    +    } catch (err) {
    +      throw Error("Unable to parse: " + err);
    +    }
    + 
    +    return Terraformer.Primitive(res);
    +  }
    + 
    +  function arrayToRing (arr) {
    +    var parts = [ ], ret = '';
    + 
    +    for (var i = 0; i < arr.length; i++) {
    +      parts.push(arr[i].join(' '));
    +    }
    + 
    +    ret += '(' + parts.join(', ') + ')';
    + 
    +    return ret;
    + 
    +  }
    + 
    +  function pointToWKTPoint (primitive) {
    +    var ret = 'POINT ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates.length === 3) {
    +      // 3d or time? default to 3d
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates.length === 4) {
    +      // 3d and time
    +      ret += 'ZM ';
    +    }
    + 
    +    // include coordinates
    +    ret += '(' + primitive.coordinates.join(' ') + ')';
    + 
    +    return ret;
    +  }
    + 
    +  function lineStringToWKTLineString (primitive) {
    +    var ret = 'LINESTRING ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += arrayToRing(primitive.coordinates);
    + 
    +    return ret;
    +  }
    + 
    +  function polygonToWKTPolygon (primitive) {
    +    var ret = 'POLYGON ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var parts = [ ];
    +    for (var i = 0; i < primitive.coordinates.length; i++) {
    +      parts.push(arrayToRing(primitive.coordinates[i]));
    +    }
    + 
    +    ret += parts.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function multiPointToWKTMultiPoint (primitive) {
    +    var ret = 'MULTIPOINT ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += arrayToRing(primitive.coordinates);
    + 
    +    return ret;
    +  }
    + 
    +  function multiLineStringToWKTMultiLineString (primitive) {
    +    var ret = 'MULTILINESTRING ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var parts = [ ];
    +    for (var i = 0; i < primitive.coordinates.length; i++) {
    +      parts.push(arrayToRing(primitive.coordinates[i]));
    +    }
    + 
    +    ret += parts.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function multiPolygonToWKTMultiPolygon (primitive) {
    +    var ret = 'MULTIPOLYGON ';
    + 
    +    if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) {
    +      ret += 'EMPTY';
    + 
    +      return ret;
    +    } else if (primitive.coordinates[0][0][0].length === 3) {
    +      if (primitive.properties && primitive.properties.m === true) {
    +        ret += 'M ';
    +      } else {
    +        ret += 'Z ';
    +      }
    +    } else if (primitive.coordinates[0][0][0].length === 4) {
    +      ret += 'ZM ';
    +    }
    + 
    +    ret += '(';
    +    var inner = [ ];
    +    for (var c = 0; c < primitive.coordinates.length; c++) {
    +      var it = '(';
    +      var parts = [ ];
    +      for (var i = 0; i < primitive.coordinates[c].length; i++) {
    +        parts.push(arrayToRing(primitive.coordinates[c][i]));
    +      }
    + 
    +      it += parts.join(', ');
    +      it += ')';
    + 
    +      inner.push(it);
    +    }
    + 
    +    ret += inner.join(', ');
    +    ret += ')';
    + 
    +    return ret;
    +  }
    + 
    +  function convert (primitive) {
    +    switch (primitive.type) {
    +      case 'Point':
    +        return pointToWKTPoint(primitive);
    +      case 'LineString':
    +        return lineStringToWKTLineString(primitive);
    +      case 'Polygon':
    +        return polygonToWKTPolygon(primitive);
    +      case 'MultiPoint':
    +        return multiPointToWKTMultiPoint(primitive);
    +      case 'MultiLineString':
    +        return multiLineStringToWKTMultiLineString(primitive);
    +      case 'MultiPolygon':
    +        return multiPolygonToWKTMultiPolygon(primitive);
    +      default:
    +        throw Error ("Unknown Type: " + primitive.type);
    +    }
    +  }
    + 
    + 
    + 
    +  exports.parser  = parser;
    +  exports.Parser  = parser.Parser;
    +  exports.parse   = parse;
    +  exports.convert = convert;
    + 
    +  return exports;
    +}));
    + 
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/index.html b/node_modules/terraformer-wkt-parser/coverage/index.html new file mode 100644 index 0000000..47bae3d --- /dev/null +++ b/node_modules/terraformer-wkt-parser/coverage/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
    +
    +

    + / +

    +
    +
    + 78.64% + Statements + 405/515 +
    +
    + 74.38% + Branches + 209/281 +
    +
    + 65.31% + Functions + 32/49 +
    +
    + 79.17% + Lines + 399/504 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    __root__/
    78.64%405/51574.38%209/28165.31%32/4979.17%399/504
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer-wkt-parser/coverage/prettify.css b/node_modules/terraformer-wkt-parser/coverage/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/terraformer-wkt-parser/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/node_modules/terraformer-wkt-parser/coverage/prettify.js b/node_modules/terraformer-wkt-parser/coverage/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/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/node_modules/terraformer-wkt-parser/coverage/sort-arrow-sprite.png b/node_modules/terraformer-wkt-parser/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) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + 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/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.js b/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.js new file mode 100644 index 0000000..fed561b --- /dev/null +++ b/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.js @@ -0,0 +1,761 @@ +(function (root, factory) { + + // Node. + if(typeof module === 'object' && typeof module.exports === 'object') { + exports = module.exports = factory(require("terraformer")); + } else if(typeof navigator === "object") { + // Browser Global. + if (!root.Terraformer){ + throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer") + } + root.Terraformer.WKT = factory(root.Terraformer); + } + +}(this, function(Terraformer) { + var exports = { }; + + /* Jison generated parser */ +var parser = (function(){ +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"expressions":3,"point":4,"EOF":5,"linestring":6,"polygon":7,"multipoint":8,"multilinestring":9,"multipolygon":10,"coordinate":11,"DOUBLE_TOK":12,"ptarray":13,"COMMA":14,"ring_list":15,"ring":16,"(":17,")":18,"POINT":19,"Z":20,"ZM":21,"M":22,"EMPTY":23,"point_untagged":24,"polygon_list":25,"polygon_untagged":26,"point_list":27,"LINESTRING":28,"POLYGON":29,"MULTIPOINT":30,"MULTILINESTRING":31,"MULTIPOLYGON":32,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",12:"DOUBLE_TOK",14:"COMMA",17:"(",18:")",19:"POINT",20:"Z",21:"ZM",22:"M",23:"EMPTY",28:"LINESTRING",29:"POLYGON",30:"MULTIPOINT",31:"MULTILINESTRING",32:"MULTIPOLYGON"}, +productions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]], +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$ +/**/) { + +var $0 = $.length - 1; +switch (yystate) { +case 1: return $[$0-1]; +break; +case 2: return $[$0-1]; +break; +case 3: return $[$0-1]; +break; +case 4: return $[$0-1]; +break; +case 5: return $[$0-1]; +break; +case 6: return $[$0-1]; +break; +case 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); +break; +case 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); +break; +case 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); +break; +case 10: this.$ = $[$0-2].addPoint($[$0]); +break; +case 11: this.$ = $[$0]; +break; +case 12: this.$ = $[$0-2].addRing($[$0]); +break; +case 13: this.$ = new RingList($[$0]); +break; +case 14: this.$ = new Ring($[$0-1]); +break; +case 15: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0] }; +break; +case 16: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true } }; +break; +case 17: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true, m: true } }; +break; +case 18: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { m: true } }; +break; +case 19: this.$ = { "type": "Point", "coordinates": [ ] }; +break; +case 20: this.$ = $[$0]; +break; +case 21: this.$ = $[$0-1]; +break; +case 22: this.$ = $[$0-2].addPolygon($[$0]); +break; +case 23: this.$ = new PolygonList($[$0]); +break; +case 24: this.$ = $[$0-1]; +break; +case 25: this.$ = $[$0-2].addPoint($[$0]); +break; +case 26: this.$ = $[$0]; +break; +case 27: this.$ = { "type": "LineString", "coordinates": $[$0-1].data }; +break; +case 28: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true } }; +break; +case 29: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { m: true } }; +break; +case 30: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; +break; +case 31: this.$ = { "type": "LineString", "coordinates": [ ] }; +break; +case 32: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON() }; +break; +case 33: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 34: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 35: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 36: this.$ = { "type": "Polygon", "coordinates": [ ] }; +break; +case 37: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data }; +break; +case 38: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true } }; +break; +case 39: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { m: true } }; +break; +case 40: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; +break; +case 41: this.$ = { "type": "MultiPoint", "coordinates": [ ] } +break; +case 42: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON() }; +break; +case 43: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 44: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 45: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 46: this.$ = { "type": "MultiLineString", "coordinates": [ ] }; +break; +case 47: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON() }; +break; +case 48: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 49: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 50: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 51: this.$ = { "type": "MultiPolygon", "coordinates": [ ] }; +break; +} +}, +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,19:[1,8],28:[1,9],29:[1,10],30:[1,11],31:[1,12],32:[1,13]},{1:[3]},{5:[1,14]},{5:[1,15]},{5:[1,16]},{5:[1,17]},{5:[1,18]},{5:[1,19]},{17:[1,20],20:[1,21],21:[1,22],22:[1,23],23:[1,24]},{17:[1,25],20:[1,26],21:[1,28],22:[1,27],23:[1,29]},{17:[1,30],20:[1,31],21:[1,33],22:[1,32],23:[1,34]},{17:[1,35],20:[1,36],21:[1,38],22:[1,37],23:[1,39]},{17:[1,40],20:[1,41],21:[1,43],22:[1,42],23:[1,44]},{17:[1,45],20:[1,46],21:[1,48],22:[1,47],23:[1,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{11:51,12:[1,52],13:50},{17:[1,53]},{17:[1,54]},{17:[1,55]},{5:[2,19]},{11:58,12:[1,52],17:[1,59],24:57,27:56},{17:[1,60]},{17:[1,61]},{17:[1,62]},{5:[2,31]},{15:63,16:64,17:[1,65]},{17:[1,66]},{17:[1,67]},{17:[1,68]},{5:[2,36]},{11:58,12:[1,52],17:[1,59],24:57,27:69},{17:[1,70]},{17:[1,71]},{17:[1,72]},{5:[2,41]},{15:73,16:64,17:[1,65]},{17:[1,74]},{17:[1,75]},{17:[1,76]},{5:[2,46]},{17:[1,79],25:77,26:78},{17:[1,80]},{17:[1,81]},{17:[1,82]},{5:[2,51]},{14:[1,84],18:[1,83]},{14:[2,11],18:[2,11]},{12:[1,85]},{11:51,12:[1,52],13:86},{11:51,12:[1,52],13:87},{11:51,12:[1,52],13:88},{14:[1,90],18:[1,89]},{14:[2,26],18:[2,26]},{14:[2,20],18:[2,20]},{11:91,12:[1,52]},{11:58,12:[1,52],17:[1,59],24:57,27:92},{11:58,12:[1,52],17:[1,59],24:57,27:93},{11:58,12:[1,52],17:[1,59],24:57,27:94},{14:[1,96],18:[1,95]},{14:[2,13],18:[2,13]},{11:51,12:[1,52],13:97},{15:98,16:64,17:[1,65]},{15:99,16:64,17:[1,65]},{15:100,16:64,17:[1,65]},{14:[1,90],18:[1,101]},{11:58,12:[1,52],17:[1,59],24:57,27:102},{11:58,12:[1,52],17:[1,59],24:57,27:103},{11:58,12:[1,52],17:[1,59],24:57,27:104},{14:[1,96],18:[1,105]},{15:106,16:64,17:[1,65]},{15:107,16:64,17:[1,65]},{15:108,16:64,17:[1,65]},{14:[1,110],18:[1,109]},{14:[2,23],18:[2,23]},{15:111,16:64,17:[1,65]},{17:[1,79],25:112,26:78},{17:[1,79],25:113,26:78},{17:[1,79],25:114,26:78},{5:[2,15]},{11:115,12:[1,52]},{12:[1,116],14:[2,7],18:[2,7]},{14:[1,84],18:[1,117]},{14:[1,84],18:[1,118]},{14:[1,84],18:[1,119]},{5:[2,27]},{11:58,12:[1,52],17:[1,59],24:120},{18:[1,121]},{14:[1,90],18:[1,122]},{14:[1,90],18:[1,123]},{14:[1,90],18:[1,124]},{5:[2,32]},{16:125,17:[1,65]},{14:[1,84],18:[1,126]},{14:[1,96],18:[1,127]},{14:[1,96],18:[1,128]},{14:[1,96],18:[1,129]},{5:[2,37]},{14:[1,90],18:[1,130]},{14:[1,90],18:[1,131]},{14:[1,90],18:[1,132]},{5:[2,42]},{14:[1,96],18:[1,133]},{14:[1,96],18:[1,134]},{14:[1,96],18:[1,135]},{5:[2,47]},{17:[1,79],26:136},{14:[1,96],18:[1,137]},{14:[1,110],18:[1,138]},{14:[1,110],18:[1,139]},{14:[1,110],18:[1,140]},{14:[2,10],18:[2,10]},{12:[1,141],14:[2,8],18:[2,8]},{5:[2,16]},{5:[2,17]},{5:[2,18]},{14:[2,25],18:[2,25]},{14:[2,21],18:[2,21]},{5:[2,28]},{5:[2,29]},{5:[2,30]},{14:[2,12],18:[2,12]},{14:[2,14],18:[2,14]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,43]},{5:[2,44]},{5:[2,45]},{14:[2,22],18:[2,22]},{14:[2,24],18:[2,24]},{5:[2,48]},{5:[2,49]},{5:[2,50]},{14:[2,9],18:[2,9]}], +defaultActions: {14:[2,1],15:[2,2],16:[2,3],17:[2,4],18:[2,5],19:[2,6],24:[2,19],29:[2,31],34:[2,36],39:[2,41],44:[2,46],49:[2,51],83:[2,15],89:[2,27],95:[2,32],101:[2,37],105:[2,42],109:[2,47],117:[2,16],118:[2,17],119:[2,18],122:[2,28],123:[2,29],124:[2,30],127:[2,33],128:[2,34],129:[2,35],130:[2,38],131:[2,39],132:[2,40],133:[2,43],134:[2,44],135:[2,45],138:[2,48],139:[2,49],140:[2,50]}, +parseError: function parseError(str, hash) { + throw new Error(str); +}, +parse: function parse(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") + this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") + this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) + if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) + recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +} +}; +undefined/* Jison generated lexer */ +var lexer = (function(){ +var lexer = ({EOF:1, +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +setInput:function (input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; + if (this.options.ranges) this.yylloc.range = [0,0]; + this.offset = 0; + return this; + }, +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length-len-1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length-1); + this.matched = this.matched.substr(0, this.matched.length-1); + + if (lines.length-1) this.yylineno -= lines.length-1; + var r = this.yylloc.range; + + this.yylloc = {first_line: this.yylloc.first_line, + last_line: this.yylineno+1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, +more:function () { + this._more = true; + return this; + }, +less:function (n) { + this.unput(this.match.slice(n)); + }, +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); + }, +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c+"^"; + }, +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, + match, + tempMatch, + index, + col, + lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i=0;i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = {first_line: this.yylloc.last_line, + last_line: this.yylineno+1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), + {text: "", token: null, line: this.yylineno}); + } + }, +lex:function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, +begin:function begin(condition) { + this.conditionStack.push(condition); + }, +popState:function popState() { + return this.conditionStack.pop(); + }, +_currentRules:function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; + }, +topState:function () { + return this.conditionStack[this.conditionStack.length-2]; + }, +pushState:function begin(condition) { + this.begin(condition); + }}); +lexer.options = {}; +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START +/**/) { + +var YYSTATE=YY_START +switch($avoiding_name_collisions) { +case 0:// ignore +break; +case 1:return 17 +break; +case 2:return 18 +break; +case 3:return 12 +break; +case 4:return 19 +break; +case 5:return 28 +break; +case 6:return 29 +break; +case 7:return 30 +break; +case 8:return 31 +break; +case 9:return 32 +break; +case 10:return 14 +break; +case 11:return 23 +break; +case 12:return 22 +break; +case 13:return 20 +break; +case 14:return 21 +break; +case 15:return 5 +break; +case 16:return "INVALID" +break; +} +}; +lexer.rules = [/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/]; +lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"inclusive":true}}; +return lexer;})() +parser.lexer = lexer; +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + function PointArray (point) { + this.data = [ point ]; + this.type = 'PointArray'; + } + + PointArray.prototype.addPoint = function (point) { + if (point.type === 'PointArray') { + this.data = this.data.concat(point.data); + } else { + this.data.push(point); + } + + return this; + }; + + PointArray.prototype.toJSON = function () { + return this.data; + }; + + function Ring (point) { + this.data = point; + this.type = 'Ring'; + } + + Ring.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.data.length; i++) { + data.push(this.data.data[i]); + } + + return data; + }; + + function RingList (ring) { + this.data = [ ring ]; + this.type = 'RingList'; + } + + RingList.prototype.addRing = function (ring) { + this.data.push(ring); + + return this; + }; + + RingList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data.push(this.data[i].toJSON()); + } + + if (data.length === 1) { + return data; + } else { + return data; + } + }; + + function PolygonList (polygon) { + this.data = [ polygon ]; + this.type = 'PolygonList'; + } + + PolygonList.prototype.addPolygon = function (polygon) { + this.data.push(polygon); + + return this; + }; + + PolygonList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data = data.concat( [ this.data[i].toJSON() ] ); + } + + return data; + }; + + function _parse () { + return parser.parse.apply(parser, arguments); + } + + function parse (element) { + var res, primitive; + + try { + res = parser.parse(element); + } catch (err) { + throw Error("Unable to parse: " + err); + } + + return Terraformer.Primitive(res); + } + + function arrayToRing (arr) { + var parts = [ ], ret = ''; + + for (var i = 0; i < arr.length; i++) { + parts.push(arr[i].join(' ')); + } + + ret += '(' + parts.join(', ') + ')'; + + return ret; + + } + + function pointToWKTPoint (primitive) { + var ret = 'POINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates.length === 3) { + // 3d or time? default to 3d + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates.length === 4) { + // 3d and time + ret += 'ZM '; + } + + // include coordinates + ret += '(' + primitive.coordinates.join(' ') + ')'; + + return ret; + } + + function lineStringToWKTLineString (primitive) { + var ret = 'LINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function polygonToWKTPolygon (primitive) { + var ret = 'POLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPointToWKTMultiPoint (primitive) { + var ret = 'MULTIPOINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function multiLineStringToWKTMultiLineString (primitive) { + var ret = 'MULTILINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPolygonToWKTMultiPolygon (primitive) { + var ret = 'MULTIPOLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var inner = [ ]; + for (var c = 0; c < primitive.coordinates.length; c++) { + var it = '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates[c].length; i++) { + parts.push(arrayToRing(primitive.coordinates[c][i])); + } + + it += parts.join(', '); + it += ')'; + + inner.push(it); + } + + ret += inner.join(', '); + ret += ')'; + + return ret; + } + + function convert (primitive) { + switch (primitive.type) { + case 'Point': + return pointToWKTPoint(primitive); + case 'LineString': + return lineStringToWKTLineString(primitive); + case 'Polygon': + return polygonToWKTPolygon(primitive); + case 'MultiPoint': + return multiPointToWKTMultiPoint(primitive); + case 'MultiLineString': + return multiLineStringToWKTMultiLineString(primitive); + case 'MultiPolygon': + return multiPolygonToWKTMultiPolygon(primitive); + default: + throw Error ("Unknown Type: " + primitive.type); + } + } + + + + exports.parser = parser; + exports.Parser = parser.Parser; + exports.parse = parse; + exports.convert = convert; + + return exports; +})); diff --git a/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.min.js b/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.min.js new file mode 100644 index 0000000..8530ed4 --- /dev/null +++ b/node_modules/terraformer-wkt-parser/dist/terraformer-wkt-parser.min.js @@ -0,0 +1,4 @@ +/*! Terraformer JS - 1.1.1 - 2016-08-17 +* https://github.com/esri/terraformer-wkt-parser +* Copyright (c) 2016 Esri, Inc. +* Licensed MIT */!function(a,b){if("object"==typeof module&&"object"==typeof module.exports)exports=module.exports=b(require("terraformer"));else if("object"==typeof navigator){if(!a.Terraformer)throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer");a.Terraformer.WKT=b(a.Terraformer)}}(this,function(a){function b(a){this.data=[a],this.type="PointArray"}function c(a){this.data=a,this.type="Ring"}function d(a){this.data=[a],this.type="RingList"}function e(a){this.data=[a],this.type="PolygonList"}function f(b){var c;try{c=p.parse(b)}catch(d){throw Error("Unable to parse: "+d)}return a.Primitive(c)}function g(a){for(var b=[],c="",d=0;d2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},g=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){switch(c){case 0:break;case 1:return 17;case 2:return 18;case 3:return 12;case 4:return 19;case 5:return 28;case 6:return 29;case 7:return 30;case 8:return 31;case 9:return 32;case 10:return 14;case 11:return 23;case 12:return 22;case 13:return 20;case 14:return 21;case 15:return 5;case 16:return"INVALID"}},a.rules=[/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],inclusive:!0}},a}();return f.lexer=g,a.prototype=f,f.Parser=a,new a}();return b.prototype.addPoint=function(a){return"PointArray"===a.type?this.data=this.data.concat(a.data):this.data.push(a),this},b.prototype.toJSON=function(){return this.data},c.prototype.toJSON=function(){for(var a=[],b=0;b> return 'EOF' +. return "INVALID" + +/lex + + +%start expressions + +%% /* language grammar */ + +expressions + : point EOF + { return $1; } + | linestring EOF + { return $1; } + | polygon EOF + { return $1; } + | multipoint EOF + { return $1; } + | multilinestring EOF + { return $1; } + | multipolygon EOF + { return $1; } + ; + +coordinate + : DOUBLE_TOK DOUBLE_TOK + { $$ = new PointArray([ Number($1), Number($2) ]); } + | DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK + { $$ = new PointArray([ Number($1), Number($2), Number($3) ]); } + | DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK + { $$ = new PointArray([ Number($1), Number($2), Number($3), Number($4) ]); } + ; + +ptarray + : ptarray COMMA coordinate + { $$ = $1.addPoint($3); } + | coordinate + { $$ = $1; } + ; + +ring_list + : ring_list COMMA ring + { $$ = $1.addRing($3); } + | ring + { $$ = new RingList($1); } + ; + +ring + : '(' ptarray ')' + { $$ = new Ring($2); } + ; + +point + : POINT '(' ptarray ')' + { $$ = { "type": "Point", "coordinates": $3.data[0] }; } + | POINT Z '(' ptarray ')' + { $$ = { "type": "Point", "coordinates": $4.data[0], "properties": { z: true } }; } + | POINT ZM '(' ptarray ')' + { $$ = { "type": "Point", "coordinates": $4.data[0], "properties": { z: true, m: true } }; } + | POINT M '(' ptarray ')' + { $$ = { "type": "Point", "coordinates": $4.data[0], "properties": { m: true } }; } + | POINT EMPTY + { $$ = { "type": "Point", "coordinates": [ ] }; } + ; + +point_untagged + : coordinate + { $$ = $1; } + | '(' coordinate ')' + { $$ = $2; } + ; + +polygon_list + : polygon_list COMMA polygon_untagged + { $$ = $1.addPolygon($3); } + | polygon_untagged + { $$ = new PolygonList($1); } + ; + +polygon_untagged + : '(' ring_list ')' + { $$ = $2; } + ; + + +point_list + : point_list COMMA point_untagged + { $$ = $1.addPoint($3); } + | point_untagged + { $$ = $1; } + ; + +linestring + : LINESTRING '(' point_list ')' + { $$ = { "type": "LineString", "coordinates": $3.data }; } + | LINESTRING Z '(' point_list ')' + { $$ = { "type": "LineString", "coordinates": $4.data, "properties": { z: true } }; } + | LINESTRING M '(' point_list ')' + { $$ = { "type": "LineString", "coordinates": $4.data, "properties": { m: true } }; } + | LINESTRING ZM '(' point_list ')' + { $$ = { "type": "LineString", "coordinates": $4.data, "properties": { z: true, m: true } }; } + | LINESTRING EMPTY + { $$ = { "type": "LineString", "coordinates": [ ] }; } + ; + +polygon + : POLYGON '(' ring_list ')' + { $$ = { "type": "Polygon", "coordinates": $3.toJSON() }; } + | POLYGON Z '(' ring_list ')' + { $$ = { "type": "Polygon", "coordinates": $4.toJSON(), "properties": { z: true } }; } + | POLYGON M '(' ring_list ')' + { $$ = { "type": "Polygon", "coordinates": $4.toJSON(), "properties": { m: true } }; } + | POLYGON ZM '(' ring_list ')' + { $$ = { "type": "Polygon", "coordinates": $4.toJSON(), "properties": { z: true, m: true } }; } + | POLYGON EMPTY + { $$ = { "type": "Polygon", "coordinates": [ ] }; } + ; + +multipoint + : MULTIPOINT '(' point_list ')' + { $$ = { "type": "MultiPoint", "coordinates": $3.data }; } + | MULTIPOINT Z '(' point_list ')' + { $$ = { "type": "MultiPoint", "coordinates": $4.data, "properties": { z: true } }; } + | MULTIPOINT M '(' point_list ')' + { $$ = { "type": "MultiPoint", "coordinates": $4.data, "properties": { m: true } }; } + | MULTIPOINT ZM '(' point_list ')' + { $$ = { "type": "MultiPoint", "coordinates": $4.data, "properties": { z: true, m: true } }; } + | MULTIPOINT EMPTY + { $$ = { "type": "MultiPoint", "coordinates": [ ] } } + ; + +multilinestring + : MULTILINESTRING '(' ring_list ')' + { $$ = { "type": "MultiLineString", "coordinates": $3.toJSON() }; } + | MULTILINESTRING Z '(' ring_list ')' + { $$ = { "type": "MultiLineString", "coordinates": $4.toJSON(), "properties": { z: true } }; } + | MULTILINESTRING M '(' ring_list ')' + { $$ = { "type": "MultiLineString", "coordinates": $4.toJSON(), "properties": { m: true } }; } + | MULTILINESTRING ZM '(' ring_list ')' + { $$ = { "type": "MultiLineString", "coordinates": $4.toJSON(), "properties": { z: true, m: true } }; } + | MULTILINESTRING EMPTY + { $$ = { "type": "MultiLineString", "coordinates": [ ] }; } + ; + +multipolygon + : MULTIPOLYGON '(' polygon_list ')' + { $$ = { "type": "MultiPolygon", "coordinates": $3.toJSON() }; } + | MULTIPOLYGON Z '(' polygon_list ')' + { $$ = { "type": "MultiPolygon", "coordinates": $4.toJSON(), "properties": { z: true } }; } + | MULTIPOLYGON M '(' polygon_list ')' + { $$ = { "type": "MultiPolygon", "coordinates": $4.toJSON(), "properties": { m: true } }; } + | MULTIPOLYGON ZM '(' polygon_list ')' + { $$ = { "type": "MultiPolygon", "coordinates": $4.toJSON(), "properties": { z: true, m: true } }; } + | MULTIPOLYGON EMPTY + { $$ = { "type": "MultiPolygon", "coordinates": [ ] }; } + ; diff --git a/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.d.ts b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.d.ts new file mode 100644 index 0000000..6fa885b --- /dev/null +++ b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.d.ts @@ -0,0 +1,8 @@ +declare namespace Terraformer { + namespace WKT { + function parse(wkt: string): GeoJSON.GeometryObject; + function convert(geoJSON: GeoJSON.GeometryObject): string; + } +} + +export = Terraformer.WKT; \ No newline at end of file diff --git a/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js new file mode 100644 index 0000000..fed561b --- /dev/null +++ b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js @@ -0,0 +1,761 @@ +(function (root, factory) { + + // Node. + if(typeof module === 'object' && typeof module.exports === 'object') { + exports = module.exports = factory(require("terraformer")); + } else if(typeof navigator === "object") { + // Browser Global. + if (!root.Terraformer){ + throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer") + } + root.Terraformer.WKT = factory(root.Terraformer); + } + +}(this, function(Terraformer) { + var exports = { }; + + /* Jison generated parser */ +var parser = (function(){ +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"expressions":3,"point":4,"EOF":5,"linestring":6,"polygon":7,"multipoint":8,"multilinestring":9,"multipolygon":10,"coordinate":11,"DOUBLE_TOK":12,"ptarray":13,"COMMA":14,"ring_list":15,"ring":16,"(":17,")":18,"POINT":19,"Z":20,"ZM":21,"M":22,"EMPTY":23,"point_untagged":24,"polygon_list":25,"polygon_untagged":26,"point_list":27,"LINESTRING":28,"POLYGON":29,"MULTIPOINT":30,"MULTILINESTRING":31,"MULTIPOLYGON":32,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",12:"DOUBLE_TOK",14:"COMMA",17:"(",18:")",19:"POINT",20:"Z",21:"ZM",22:"M",23:"EMPTY",28:"LINESTRING",29:"POLYGON",30:"MULTIPOINT",31:"MULTILINESTRING",32:"MULTIPOLYGON"}, +productions_: [0,[3,2],[3,2],[3,2],[3,2],[3,2],[3,2],[11,2],[11,3],[11,4],[13,3],[13,1],[15,3],[15,1],[16,3],[4,4],[4,5],[4,5],[4,5],[4,2],[24,1],[24,3],[25,3],[25,1],[26,3],[27,3],[27,1],[6,4],[6,5],[6,5],[6,5],[6,2],[7,4],[7,5],[7,5],[7,5],[7,2],[8,4],[8,5],[8,5],[8,5],[8,2],[9,4],[9,5],[9,5],[9,5],[9,2],[10,4],[10,5],[10,5],[10,5],[10,2]], +performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$,_$ +/**/) { + +var $0 = $.length - 1; +switch (yystate) { +case 1: return $[$0-1]; +break; +case 2: return $[$0-1]; +break; +case 3: return $[$0-1]; +break; +case 4: return $[$0-1]; +break; +case 5: return $[$0-1]; +break; +case 6: return $[$0-1]; +break; +case 7: this.$ = new PointArray([ Number($[$0-1]), Number($[$0]) ]); +break; +case 8: this.$ = new PointArray([ Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); +break; +case 9: this.$ = new PointArray([ Number($[$0-3]), Number($[$0-2]), Number($[$0-1]), Number($[$0]) ]); +break; +case 10: this.$ = $[$0-2].addPoint($[$0]); +break; +case 11: this.$ = $[$0]; +break; +case 12: this.$ = $[$0-2].addRing($[$0]); +break; +case 13: this.$ = new RingList($[$0]); +break; +case 14: this.$ = new Ring($[$0-1]); +break; +case 15: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0] }; +break; +case 16: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true } }; +break; +case 17: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { z: true, m: true } }; +break; +case 18: this.$ = { "type": "Point", "coordinates": $[$0-1].data[0], "properties": { m: true } }; +break; +case 19: this.$ = { "type": "Point", "coordinates": [ ] }; +break; +case 20: this.$ = $[$0]; +break; +case 21: this.$ = $[$0-1]; +break; +case 22: this.$ = $[$0-2].addPolygon($[$0]); +break; +case 23: this.$ = new PolygonList($[$0]); +break; +case 24: this.$ = $[$0-1]; +break; +case 25: this.$ = $[$0-2].addPoint($[$0]); +break; +case 26: this.$ = $[$0]; +break; +case 27: this.$ = { "type": "LineString", "coordinates": $[$0-1].data }; +break; +case 28: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true } }; +break; +case 29: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { m: true } }; +break; +case 30: this.$ = { "type": "LineString", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; +break; +case 31: this.$ = { "type": "LineString", "coordinates": [ ] }; +break; +case 32: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON() }; +break; +case 33: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 34: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 35: this.$ = { "type": "Polygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 36: this.$ = { "type": "Polygon", "coordinates": [ ] }; +break; +case 37: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data }; +break; +case 38: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true } }; +break; +case 39: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { m: true } }; +break; +case 40: this.$ = { "type": "MultiPoint", "coordinates": $[$0-1].data, "properties": { z: true, m: true } }; +break; +case 41: this.$ = { "type": "MultiPoint", "coordinates": [ ] } +break; +case 42: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON() }; +break; +case 43: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 44: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 45: this.$ = { "type": "MultiLineString", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 46: this.$ = { "type": "MultiLineString", "coordinates": [ ] }; +break; +case 47: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON() }; +break; +case 48: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true } }; +break; +case 49: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { m: true } }; +break; +case 50: this.$ = { "type": "MultiPolygon", "coordinates": $[$0-1].toJSON(), "properties": { z: true, m: true } }; +break; +case 51: this.$ = { "type": "MultiPolygon", "coordinates": [ ] }; +break; +} +}, +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,19:[1,8],28:[1,9],29:[1,10],30:[1,11],31:[1,12],32:[1,13]},{1:[3]},{5:[1,14]},{5:[1,15]},{5:[1,16]},{5:[1,17]},{5:[1,18]},{5:[1,19]},{17:[1,20],20:[1,21],21:[1,22],22:[1,23],23:[1,24]},{17:[1,25],20:[1,26],21:[1,28],22:[1,27],23:[1,29]},{17:[1,30],20:[1,31],21:[1,33],22:[1,32],23:[1,34]},{17:[1,35],20:[1,36],21:[1,38],22:[1,37],23:[1,39]},{17:[1,40],20:[1,41],21:[1,43],22:[1,42],23:[1,44]},{17:[1,45],20:[1,46],21:[1,48],22:[1,47],23:[1,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{11:51,12:[1,52],13:50},{17:[1,53]},{17:[1,54]},{17:[1,55]},{5:[2,19]},{11:58,12:[1,52],17:[1,59],24:57,27:56},{17:[1,60]},{17:[1,61]},{17:[1,62]},{5:[2,31]},{15:63,16:64,17:[1,65]},{17:[1,66]},{17:[1,67]},{17:[1,68]},{5:[2,36]},{11:58,12:[1,52],17:[1,59],24:57,27:69},{17:[1,70]},{17:[1,71]},{17:[1,72]},{5:[2,41]},{15:73,16:64,17:[1,65]},{17:[1,74]},{17:[1,75]},{17:[1,76]},{5:[2,46]},{17:[1,79],25:77,26:78},{17:[1,80]},{17:[1,81]},{17:[1,82]},{5:[2,51]},{14:[1,84],18:[1,83]},{14:[2,11],18:[2,11]},{12:[1,85]},{11:51,12:[1,52],13:86},{11:51,12:[1,52],13:87},{11:51,12:[1,52],13:88},{14:[1,90],18:[1,89]},{14:[2,26],18:[2,26]},{14:[2,20],18:[2,20]},{11:91,12:[1,52]},{11:58,12:[1,52],17:[1,59],24:57,27:92},{11:58,12:[1,52],17:[1,59],24:57,27:93},{11:58,12:[1,52],17:[1,59],24:57,27:94},{14:[1,96],18:[1,95]},{14:[2,13],18:[2,13]},{11:51,12:[1,52],13:97},{15:98,16:64,17:[1,65]},{15:99,16:64,17:[1,65]},{15:100,16:64,17:[1,65]},{14:[1,90],18:[1,101]},{11:58,12:[1,52],17:[1,59],24:57,27:102},{11:58,12:[1,52],17:[1,59],24:57,27:103},{11:58,12:[1,52],17:[1,59],24:57,27:104},{14:[1,96],18:[1,105]},{15:106,16:64,17:[1,65]},{15:107,16:64,17:[1,65]},{15:108,16:64,17:[1,65]},{14:[1,110],18:[1,109]},{14:[2,23],18:[2,23]},{15:111,16:64,17:[1,65]},{17:[1,79],25:112,26:78},{17:[1,79],25:113,26:78},{17:[1,79],25:114,26:78},{5:[2,15]},{11:115,12:[1,52]},{12:[1,116],14:[2,7],18:[2,7]},{14:[1,84],18:[1,117]},{14:[1,84],18:[1,118]},{14:[1,84],18:[1,119]},{5:[2,27]},{11:58,12:[1,52],17:[1,59],24:120},{18:[1,121]},{14:[1,90],18:[1,122]},{14:[1,90],18:[1,123]},{14:[1,90],18:[1,124]},{5:[2,32]},{16:125,17:[1,65]},{14:[1,84],18:[1,126]},{14:[1,96],18:[1,127]},{14:[1,96],18:[1,128]},{14:[1,96],18:[1,129]},{5:[2,37]},{14:[1,90],18:[1,130]},{14:[1,90],18:[1,131]},{14:[1,90],18:[1,132]},{5:[2,42]},{14:[1,96],18:[1,133]},{14:[1,96],18:[1,134]},{14:[1,96],18:[1,135]},{5:[2,47]},{17:[1,79],26:136},{14:[1,96],18:[1,137]},{14:[1,110],18:[1,138]},{14:[1,110],18:[1,139]},{14:[1,110],18:[1,140]},{14:[2,10],18:[2,10]},{12:[1,141],14:[2,8],18:[2,8]},{5:[2,16]},{5:[2,17]},{5:[2,18]},{14:[2,25],18:[2,25]},{14:[2,21],18:[2,21]},{5:[2,28]},{5:[2,29]},{5:[2,30]},{14:[2,12],18:[2,12]},{14:[2,14],18:[2,14]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,43]},{5:[2,44]},{5:[2,45]},{14:[2,22],18:[2,22]},{14:[2,24],18:[2,24]},{5:[2,48]},{5:[2,49]},{5:[2,50]},{14:[2,9],18:[2,9]}], +defaultActions: {14:[2,1],15:[2,2],16:[2,3],17:[2,4],18:[2,5],19:[2,6],24:[2,19],29:[2,31],34:[2,36],39:[2,41],44:[2,46],49:[2,51],83:[2,15],89:[2,27],95:[2,32],101:[2,37],105:[2,42],109:[2,47],117:[2,16],118:[2,17],119:[2,18],122:[2,28],123:[2,29],124:[2,30],127:[2,33],128:[2,34],129:[2,35],130:[2,38],131:[2,39],132:[2,40],133:[2,43],134:[2,44],135:[2,45],138:[2,48],139:[2,49],140:[2,50]}, +parseError: function parseError(str, hash) { + throw new Error(str); +}, +parse: function parse(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") + this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") + this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) + if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) + recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +} +}; +undefined/* Jison generated lexer */ +var lexer = (function(){ +var lexer = ({EOF:1, +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +setInput:function (input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; + if (this.options.ranges) this.yylloc.range = [0,0]; + this.offset = 0; + return this; + }, +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length-len-1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length-1); + this.matched = this.matched.substr(0, this.matched.length-1); + + if (lines.length-1) this.yylineno -= lines.length-1; + var r = this.yylloc.range; + + this.yylloc = {first_line: this.yylloc.first_line, + last_line: this.yylineno+1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: + this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, +more:function () { + this._more = true; + return this; + }, +less:function (n) { + this.unput(this.match.slice(n)); + }, +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); + }, +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c+"^"; + }, +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, + match, + tempMatch, + index, + col, + lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i=0;i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = {first_line: this.yylloc.last_line, + last_line: this.yylineno+1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), + {text: "", token: null, line: this.yylineno}); + } + }, +lex:function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, +begin:function begin(condition) { + this.conditionStack.push(condition); + }, +popState:function popState() { + return this.conditionStack.pop(); + }, +_currentRules:function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; + }, +topState:function () { + return this.conditionStack[this.conditionStack.length-2]; + }, +pushState:function begin(condition) { + this.begin(condition); + }}); +lexer.options = {}; +lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START +/**/) { + +var YYSTATE=YY_START +switch($avoiding_name_collisions) { +case 0:// ignore +break; +case 1:return 17 +break; +case 2:return 18 +break; +case 3:return 12 +break; +case 4:return 19 +break; +case 5:return 28 +break; +case 6:return 29 +break; +case 7:return 30 +break; +case 8:return 31 +break; +case 9:return 32 +break; +case 10:return 14 +break; +case 11:return 23 +break; +case 12:return 22 +break; +case 13:return 20 +break; +case 14:return 21 +break; +case 15:return 5 +break; +case 16:return "INVALID" +break; +} +}; +lexer.rules = [/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/]; +lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"inclusive":true}}; +return lexer;})() +parser.lexer = lexer; +function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + function PointArray (point) { + this.data = [ point ]; + this.type = 'PointArray'; + } + + PointArray.prototype.addPoint = function (point) { + if (point.type === 'PointArray') { + this.data = this.data.concat(point.data); + } else { + this.data.push(point); + } + + return this; + }; + + PointArray.prototype.toJSON = function () { + return this.data; + }; + + function Ring (point) { + this.data = point; + this.type = 'Ring'; + } + + Ring.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.data.length; i++) { + data.push(this.data.data[i]); + } + + return data; + }; + + function RingList (ring) { + this.data = [ ring ]; + this.type = 'RingList'; + } + + RingList.prototype.addRing = function (ring) { + this.data.push(ring); + + return this; + }; + + RingList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data.push(this.data[i].toJSON()); + } + + if (data.length === 1) { + return data; + } else { + return data; + } + }; + + function PolygonList (polygon) { + this.data = [ polygon ]; + this.type = 'PolygonList'; + } + + PolygonList.prototype.addPolygon = function (polygon) { + this.data.push(polygon); + + return this; + }; + + PolygonList.prototype.toJSON = function () { + var data = [ ]; + + for (var i = 0; i < this.data.length; i++) { + data = data.concat( [ this.data[i].toJSON() ] ); + } + + return data; + }; + + function _parse () { + return parser.parse.apply(parser, arguments); + } + + function parse (element) { + var res, primitive; + + try { + res = parser.parse(element); + } catch (err) { + throw Error("Unable to parse: " + err); + } + + return Terraformer.Primitive(res); + } + + function arrayToRing (arr) { + var parts = [ ], ret = ''; + + for (var i = 0; i < arr.length; i++) { + parts.push(arr[i].join(' ')); + } + + ret += '(' + parts.join(', ') + ')'; + + return ret; + + } + + function pointToWKTPoint (primitive) { + var ret = 'POINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates.length === 3) { + // 3d or time? default to 3d + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates.length === 4) { + // 3d and time + ret += 'ZM '; + } + + // include coordinates + ret += '(' + primitive.coordinates.join(' ') + ')'; + + return ret; + } + + function lineStringToWKTLineString (primitive) { + var ret = 'LINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function polygonToWKTPolygon (primitive) { + var ret = 'POLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPointToWKTMultiPoint (primitive) { + var ret = 'MULTIPOINT '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0].length === 4) { + ret += 'ZM '; + } + + ret += arrayToRing(primitive.coordinates); + + return ret; + } + + function multiLineStringToWKTMultiLineString (primitive) { + var ret = 'MULTILINESTRING '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates.length; i++) { + parts.push(arrayToRing(primitive.coordinates[i])); + } + + ret += parts.join(', '); + ret += ')'; + + return ret; + } + + function multiPolygonToWKTMultiPolygon (primitive) { + var ret = 'MULTIPOLYGON '; + + if (primitive.coordinates === undefined || primitive.coordinates.length === 0 || primitive.coordinates[0].length === 0) { + ret += 'EMPTY'; + + return ret; + } else if (primitive.coordinates[0][0][0].length === 3) { + if (primitive.properties && primitive.properties.m === true) { + ret += 'M '; + } else { + ret += 'Z '; + } + } else if (primitive.coordinates[0][0][0].length === 4) { + ret += 'ZM '; + } + + ret += '('; + var inner = [ ]; + for (var c = 0; c < primitive.coordinates.length; c++) { + var it = '('; + var parts = [ ]; + for (var i = 0; i < primitive.coordinates[c].length; i++) { + parts.push(arrayToRing(primitive.coordinates[c][i])); + } + + it += parts.join(', '); + it += ')'; + + inner.push(it); + } + + ret += inner.join(', '); + ret += ')'; + + return ret; + } + + function convert (primitive) { + switch (primitive.type) { + case 'Point': + return pointToWKTPoint(primitive); + case 'LineString': + return lineStringToWKTLineString(primitive); + case 'Polygon': + return polygonToWKTPolygon(primitive); + case 'MultiPoint': + return multiPointToWKTMultiPoint(primitive); + case 'MultiLineString': + return multiLineStringToWKTMultiLineString(primitive); + case 'MultiPolygon': + return multiPolygonToWKTMultiPolygon(primitive); + default: + throw Error ("Unknown Type: " + primitive.type); + } + } + + + + exports.parser = parser; + exports.Parser = parser.Parser; + exports.parse = parse; + exports.convert = convert; + + return exports; +})); diff --git a/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.min.js b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.min.js new file mode 100644 index 0000000..934c39e --- /dev/null +++ b/node_modules/terraformer-wkt-parser/terraformer-wkt-parser.min.js @@ -0,0 +1,4 @@ +/*! Terraformer JS - 1.1.2 - 2016-08-17 +* https://github.com/esri/terraformer-wkt-parser +* Copyright (c) 2016 Esri, Inc. +* Licensed MIT */!function(a,b){if("object"==typeof module&&"object"==typeof module.exports)exports=module.exports=b(require("terraformer"));else if("object"==typeof navigator){if(!a.Terraformer)throw new Error("Terraformer.WKT requires the core Terraformer library. http://github.com/esri/terraformer");a.Terraformer.WKT=b(a.Terraformer)}}(this,function(a){function b(a){this.data=[a],this.type="PointArray"}function c(a){this.data=a,this.type="Ring"}function d(a){this.data=[a],this.type="RingList"}function e(a){this.data=[a],this.type="PolygonList"}function f(b){var c;try{c=p.parse(b)}catch(d){throw Error("Unable to parse: "+d)}return a.Primitive(c)}function g(a){for(var b=[],c="",d=0;d2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},g=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){switch(c){case 0:break;case 1:return 17;case 2:return 18;case 3:return 12;case 4:return 19;case 5:return 28;case 6:return 29;case 7:return 30;case 8:return 31;case 9:return 32;case 10:return 14;case 11:return 23;case 12:return 22;case 13:return 20;case 14:return 21;case 15:return 5;case 16:return"INVALID"}},a.rules=[/^(?:\s+)/,/^(?:\()/,/^(?:\))/,/^(?:-?[0-9]+(\.[0-9]+)?([eE][\-\+]?[0-9]+)?)/,/^(?:POINT\b)/,/^(?:LINESTRING\b)/,/^(?:POLYGON\b)/,/^(?:MULTIPOINT\b)/,/^(?:MULTILINESTRING\b)/,/^(?:MULTIPOLYGON\b)/,/^(?:,)/,/^(?:EMPTY\b)/,/^(?:M\b)/,/^(?:Z\b)/,/^(?:ZM\b)/,/^(?:$)/,/^(?:.)/],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],inclusive:!0}},a}();return f.lexer=g,a.prototype=f,f.Parser=a,new a}();return b.prototype.addPoint=function(a){return"PointArray"===a.type?this.data=this.data.concat(a.data):this.data.push(a),this},b.prototype.toJSON=function(){return this.data},c.prototype.toJSON=function(){for(var a=[],b=0;b extends GeoJsonObject + { + type: 'Feature' + geometry: T; + properties: any; + id?: string; + } + + /*** + * http://geojson.org/geojson-spec.html#feature-collection-objects + */ + export interface FeatureCollection extends GeoJsonObject + { + type: 'FeatureCollection' + features: Feature[]; + } + + /*** + * http://geojson.org/geojson-spec.html#coordinate-reference-system-objects + */ + export interface CoordinateReferenceSystem + { + type: string; + properties: any; + } + + export interface NamedCoordinateReferenceSystem extends CoordinateReferenceSystem + { + properties: { name: string } + } + + export interface LinkedCoordinateReferenceSystem extends CoordinateReferenceSystem + { + properties: { href: string; type: string } + } +} diff --git a/node_modules/terraformer-wkt-parser/typings/globals/geojson/typings.json b/node_modules/terraformer-wkt-parser/typings/globals/geojson/typings.json new file mode 100644 index 0000000..8d74b7a --- /dev/null +++ b/node_modules/terraformer-wkt-parser/typings/globals/geojson/typings.json @@ -0,0 +1,8 @@ +{ + "resolution": "main", + "tree": { + "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/29708b6a46a61274d2d402d336ef60c697085b64/geojson/geojson.d.ts", + "raw": "registry:dt/geojson#0.0.0+20160619034323", + "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/29708b6a46a61274d2d402d336ef60c697085b64/geojson/geojson.d.ts" + } +} diff --git a/node_modules/terraformer-wkt-parser/typings/index.d.ts b/node_modules/terraformer-wkt-parser/typings/index.d.ts new file mode 100644 index 0000000..e5a355f --- /dev/null +++ b/node_modules/terraformer-wkt-parser/typings/index.d.ts @@ -0,0 +1 @@ +/// diff --git a/node_modules/terraformer/.coverage/__root__/index.html b/node_modules/terraformer/.coverage/__root__/index.html new file mode 100644 index 0000000..9394707 --- /dev/null +++ b/node_modules/terraformer/.coverage/__root__/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for __root__/ + + + + + + + +
    +
    +

    + all files __root__/ +

    +
    +
    + 96.77% + Statements + 660/682 +
    +
    + 91.65% + Branches + 384/419 +
    +
    + 96.51% + Functions + 83/86 +
    +
    + 96.77% + Lines + 660/682 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    terraformer.js
    96.77%660/68291.65%384/41996.51%83/8696.77%660/682
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer/.coverage/__root__/terraformer.js.html b/node_modules/terraformer/.coverage/__root__/terraformer.js.html new file mode 100644 index 0000000..0d644b1 --- /dev/null +++ b/node_modules/terraformer/.coverage/__root__/terraformer.js.html @@ -0,0 +1,4319 @@ + + + + Code coverage report for terraformer.js + + + + + + + +
    +
    +

    + all files / __root__/ terraformer.js +

    +
    +
    + 96.77% + Statements + 660/682 +
    +
    + 91.65% + Branches + 384/419 +
    +
    + 96.51% + Functions + 83/86 +
    +
    + 96.77% + Lines + 660/682 +
    +
    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +  +  + +  +  +  +  + + +  +  +  + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +216× +  +  +  +  +  + +  +  +  +  +  +  +  +  +  +  + +96× +685× +226× +  +  +96× +  +  +  +  +  + +73× +73× +  + +  +  + +  +  + +  +  + +  +  +29× +  +  + +  +  +15× +  +  + +  +  + +  +  + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +32× +  +32× +40× +  +40× +1600× +  +1600× +1600× +  +1600× +32× +1568× +553× +  +  +1600× +32× +1568× +275× +  +  +1600× +32× +1568× +323× +  +  +1600× +32× +1568× +429× +  +  +  +  +32× +  +  +  +  +  +  +  +  +  +  + + +  + + +  + + + +220× +  +220× +220× +  +220× + +217× + +  +  +220× + +217× +119× +  +  +220× + +217× +11× +  +  +220× + +217× +82× +  +  +  +  +  + +  +  +  +  +  +  +  +  + +16× +  +16× +69× +69× +69× +  +69× +16× +53× +10× +  +  +69× +16× +53× +39× +  +  +69× +16× +53× +21× +  +  +69× +16× +53× +22× +  +  +  +16× +  +  +  +  +  + + + + + + +  +  + +  +  +  +  +  + + +  + + + + +  +  + +  +  + +13× +13× +  +  +  +  +  +  +  +  +  +  + +5709× +  +  +  +  +  + +141× +  +  +  +  +  + +1976× +  +5790× +1920× +  +  +5790× +1950× +  +  +1976× +  +  +  +  +  + +1903× +1903× +1903× +  +  +  +  +  + +47× +47× +47× +  +  +  +  +  + +50× +14× +36× + +30× + + +  +28× + + +  +  +26× +  +  +50× +36× +10× +  +  +  +50× +33× +  +  +50× +  +  +  +  +  + +10× +  +  +  +  +  + +26× +  +  +  +  +  +  + +280× +58× +222× +108× +  +114× +  +  +  +  +  +  + +403× +143× +260× +90× +170× +94× +76× +40× +  +36× +  +  +  +  +  +  +  + +  +280× +  +  +  +  +  + +  +228× +228× +  +228× +  +  + +  +48× +48× +280× +280× +108× +  +  +48× +  +  + +  +  +  +14× + +13× + +  +  +  +12× +  +12× +48× +  +48× +36× +  +  +  +12× +  +  + + +  + + + + + +  +  + +  + + +  +  + +  +  + + +  +  +  +  + +  +  + +70× +70× +378× +  +  +43× +  +  +70× +  +  + +69× +68× +65× +  + + + + +  +  +  + +  + +  +  +  + +  +  +  + +192× +192× +192× +  +192× +105× +105× +  +105× +25× +  +  +  +167× +  +  + +210× +  +  + +121× +89× +41× +72× +192× +25× +  +  +  +  +48× +51× +31× +  +  +  +  +32× +32× +23× +  +  +  +42× +  +  +  +  +  + +48× +  +48× +50× +50× +42× +  +  +50× +  +  +48× +  +  + +64× +  +94× +52× +  +  +  +12× +  +  + +28× + +  +  +27× +27× +  +27× +46× + +  +45× +137× +21× +  +  +  +  + +  +  +  +  +  + +  +  +  +  + +65× +55× +  + +  +  + +  +  + +  +  + +  +  +25× +  +  + +  +  + +  +  + +  +  + +  +  + +  +  +  +  + + +  +  + + +  +  + +13× +  +  + +13× +  +  + +23× +23× + +21× + + +  + +  +14× + + + +  + +  +  +  + +  + + + + + +  +  + +  +  +  + +  + + + +  +  +12× +  +  +  +  +  + +19× +19× +291× +45× +  +  +19× +19× +  +  + +  +  +  + +115× +  +  +115× + +  +  +  +115× + + +  +  +  +  +  +113× + + + +  + + +  +  +  +  +  +  +112× +19× + +13× + +  +  +12× + +  +  +  +  +  +108× +  +60× +  +20× +20× +20× + +  +  +  +  +16× + +  + +  +  +  +40× + +  +  +35× +22× + +  +  +21× +39× +13× +  +  +  + +  +  +13× + + +  + + + +  +  +  + +  +  + + +12× +  +12× + +  +  +  + +  +  +  +  +48× +  +25× + + + + + +  +  +  +  + +  +23× + + + + + +  +  +  +  +  + + + + + + +  + +  +  +  + +  +  +  +  +17× + + +  + + +  +  + +  +  +  + + + +  + + +  +  +  + +  +  + + + +  + + +  +  +  + +  +  +  +  +27× +  +  + +  +24× +  +  +  +24× +24× + +  +  +  +23× +  +23× +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +32× +  +32× + +29× +19× +10× + +  + +  +  +31× +  +  + + +  +  +  +  +  +  +  +  +  +  + +19× + +18× +17× +  + +  +  +18× +  +  + + + + + +  + +  + + + +  + + + +  + + + +  + +  + +  + + +  +  +  +  +  +  +  +  +  +  +  + +49× + +42× +41× +  + +  +  +48× +  +  + + + + + +  + + + +  + + + +  +  +  +  +  +  +  +  +  +  +  + +27× + +22× +21× +  + +  +  +26× +  +  + + + + + +  +  + + +  +  +  +  +  +  +  +  +  +  +  + +97× +37× +60× +59× +  + +  +  +96× +  +  + + + + + +  + + + +  + + + +  + +  +  + + +  + + + + + +  +  + +  +  +  +  +  +  +  +  +  +  +  + +43× + +34× +33× +  + +  +  +42× +  +  + + + + + +  +  + + +  + + + + +  + + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +23× +18× + + +  +  +  +  +23× +  +  + + +  +  +  +  +  +  +  +  +  +  + + + + + +  +  +  +  + +  +  + + + + + +  +  + + + + + +  +  + +  +  +  +  +  +  +  +  +  +  +  + + + + + +  +  +  +  +  +  +  + +  +  + + + + + +  +  + + +  +  + +16× +16× +16× +  +  +  +16× +1856× +1856× +  +16× +  +16× +  +  + +14× +14× +  +14× + +  +  +13× +  +  +  +  +  +  +  +  +  +  + + + + + +  + + + + +  + +  + + + + +  + +  + + + + +  + +  +  + + + +  +  + + + + + + + + + + + +  + + +  + + + + + + + +  + + +  + + + + + + + +  + + +  + +  + 
    (function (root, factory) {
    + 
    +  // Node.
    +  Iif(typeof module === 'object' && typeof module.exports === 'object') {
    +    exports = module.exports = factory();
    +  }
    + 
    +  // Browser Global.
    +  Eif(typeof window === "object") {
    +    root.Terraformer = factory();
    +  }
    + 
    +}(this, function(){
    +  var exports = {},
    +      EarthRadius = 6378137,
    +      DegreesPerRadian = 57.295779513082320,
    +      RadiansPerDegree =  0.017453292519943,
    +      MercatorCRS = {
    +        "type": "link",
    +        "properties": {
    +          "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/",
    +          "type": "ogcwkt"
    +        }
    +      },
    +      GeographicCRS = {
    +        "type": "link",
    +        "properties": {
    +          "href": "http://spatialreference.org/ref/epsg/4326/ogcwkt/",
    +          "type": "ogcwkt"
    +        }
    +      };
    + 
    +  /*
    +  Internal: isArray function
    +  */
    +  function isArray(obj) {
    +    return Object.prototype.toString.call(obj) === "[object Array]";
    +  }
    + 
    +  /*
    +  Internal: safe warning
    +  */
    +  function warn() {
    +    var args = Array.prototype.slice.apply(arguments);
    + 
    +    if (typeof console !== undefined && console.warn) {
    +      console.warn.apply(console, args);
    +    }
    +  }
    + 
    +  /*
    +  Internal: Extend one object with another.
    +  */
    +  function extend(destination, source) {
    +    for (var k in source) {
    +      if (source.hasOwnProperty(k)) {
    +        destination[k] = source[k];
    +      }
    +    }
    +    return destination;
    +  }
    + 
    +  /*
    +  Public: Calculate an bounding box for a geojson object
    +  */
    +  function calculateBounds (geojson) {
    +    Eif(geojson.type){
    +      switch (geojson.type) {
    +        case 'Point':
    +          return [ geojson.coordinates[0], geojson.coordinates[1], geojson.coordinates[0], geojson.coordinates[1]];
    + 
    +        case 'MultiPoint':
    +          return calculateBoundsFromArray(geojson.coordinates);
    + 
    +        case 'LineString':
    +          return calculateBoundsFromArray(geojson.coordinates);
    + 
    +        case 'MultiLineString':
    +          return calculateBoundsFromNestedArrays(geojson.coordinates);
    + 
    +        case 'Polygon':
    +          return calculateBoundsFromNestedArrays(geojson.coordinates);
    + 
    +        case 'MultiPolygon':
    +          return calculateBoundsFromNestedArrayOfArrays(geojson.coordinates);
    + 
    +        case 'Feature':
    +          return geojson.geometry? calculateBounds(geojson.geometry) : null;
    + 
    +        case 'FeatureCollection':
    +          return calculateBoundsForFeatureCollection(geojson);
    + 
    +        case 'GeometryCollection':
    +          return calculateBoundsForGeometryCollection(geojson);
    + 
    +        default:
    +          throw new Error("Unknown type: " + geojson.type);
    +      }
    +    }
    +    return null;
    +  }
    + 
    +  /*
    +  Internal: Calculate an bounding box from an nested array of positions
    +  [
    +    [
    +      [ [lng, lat],[lng, lat],[lng, lat] ]
    +    ]
    +    [
    +      [lng, lat],[lng, lat],[lng, lat]
    +    ]
    +    [
    +      [lng, lat],[lng, lat],[lng, lat]
    +    ]
    +  ]
    +  */
    +  function calculateBoundsFromNestedArrays (array) {
    +    var x1 = null, x2 = null, y1 = null, y2 = null;
    + 
    +    for (var i = 0; i < array.length; i++) {
    +      var inner = array[i];
    + 
    +      for (var j = 0; j < inner.length; j++) {
    +        var lonlat = inner[j];
    + 
    +        var lon = lonlat[0];
    +        var lat = lonlat[1];
    + 
    +        if (x1 === null) {
    +          x1 = lon;
    +        } else if (lon < x1) {
    +          x1 = lon;
    +        }
    + 
    +        if (x2 === null) {
    +          x2 = lon;
    +        } else if (lon > x2) {
    +          x2 = lon;
    +        }
    + 
    +        if (y1 === null) {
    +          y1 = lat;
    +        } else if (lat < y1) {
    +          y1 = lat;
    +        }
    + 
    +        if (y2 === null) {
    +          y2 = lat;
    +        } else if (lat > y2) {
    +          y2 = lat;
    +        }
    +      }
    +    }
    + 
    +    return [x1, y1, x2, y2 ];
    +  }
    + 
    +  /*
    +  Internal: Calculate a bounding box from an array of arrays of arrays
    +  [
    +    [ [lng, lat],[lng, lat],[lng, lat] ]
    +    [ [lng, lat],[lng, lat],[lng, lat] ]
    +    [ [lng, lat],[lng, lat],[lng, lat] ]
    +  ]
    +  */
    +  function calculateBoundsFromNestedArrayOfArrays (array) {
    +    var x1 = null, x2 = null, y1 = null, y2 = null;
    + 
    +    for (var i = 0; i < array.length; i++) {
    +      var inner = array[i];
    + 
    +      for (var j = 0; j < inner.length; j++) {
    +        var innerinner = inner[j];
    +        for (var k = 0; k < innerinner.length; k++) {
    +          var lonlat = innerinner[k];
    + 
    +          var lon = lonlat[0];
    +          var lat = lonlat[1];
    + 
    +          if (x1 === null) {
    +            x1 = lon;
    +          } else if (lon < x1) {
    +            x1 = lon;
    +          }
    + 
    +          if (x2 === null) {
    +            x2 = lon;
    +          } else if (lon > x2) {
    +            x2 = lon;
    +          }
    + 
    +          if (y1 === null) {
    +            y1 = lat;
    +          } else if (lat < y1) {
    +            y1 = lat;
    +          }
    + 
    +          if (y2 === null) {
    +            y2 = lat;
    +          } else if (lat > y2) {
    +            y2 = lat;
    +          }
    +        }
    +      }
    +    }
    + 
    +    return [x1, y1, x2, y2];
    +  }
    + 
    +  /*
    +  Internal: Calculate a bounding box from an array of positions
    +  [
    +    [lng, lat],[lng, lat],[lng, lat]
    +  ]
    +  */
    +  function calculateBoundsFromArray (array) {
    +    var x1 = null, x2 = null, y1 = null, y2 = null;
    + 
    +    for (var i = 0; i < array.length; i++) {
    +      var lonlat = array[i];
    +      var lon = lonlat[0];
    +      var lat = lonlat[1];
    + 
    +      if (x1 === null) {
    +        x1 = lon;
    +      } else if (lon < x1) {
    +        x1 = lon;
    +      }
    + 
    +      if (x2 === null) {
    +        x2 = lon;
    +      } else if (lon > x2) {
    +        x2 = lon;
    +      }
    + 
    +      if (y1 === null) {
    +        y1 = lat;
    +      } else if (lat < y1) {
    +        y1 = lat;
    +      }
    + 
    +      if (y2 === null) {
    +        y2 = lat;
    +      } else if (lat > y2) {
    +        y2 = lat;
    +      }
    +    }
    + 
    +    return [x1, y1, x2, y2 ];
    +  }
    + 
    +  /*
    +  Internal: Calculate an bounding box for a feature collection
    +  */
    +  function calculateBoundsForFeatureCollection(featureCollection){
    +    var extents = [], extent;
    +    for (var i = featureCollection.features.length - 1; i >= 0; i--) {
    +      extent = calculateBounds(featureCollection.features[i].geometry);
    +      extents.push([extent[0],extent[1]]);
    +      extents.push([extent[2],extent[3]]);
    +    }
    + 
    +    return calculateBoundsFromArray(extents);
    +  }
    + 
    +  /*
    +  Internal: Calculate an bounding box for a geometry collection
    +  */
    +  function calculateBoundsForGeometryCollection(geometryCollection){
    +    var extents = [], extent;
    + 
    +    for (var i = geometryCollection.geometries.length - 1; i >= 0; i--) {
    +      extent = calculateBounds(geometryCollection.geometries[i]);
    +      extents.push([extent[0],extent[1]]);
    +      extents.push([extent[2],extent[3]]);
    +    }
    + 
    +    return calculateBoundsFromArray(extents);
    +  }
    + 
    +  function calculateEnvelope(geojson){
    +    var bounds = calculateBounds(geojson);
    +    return {
    +      x: bounds[0],
    +      y: bounds[1],
    +      w: Math.abs(bounds[0] - bounds[2]),
    +      h: Math.abs(bounds[1] - bounds[3])
    +    };
    +  }
    + 
    +  /*
    +  Internal: Convert radians to degrees. Used by spatial reference converters.
    +  */
    +  function radToDeg(rad) {
    +    return rad * DegreesPerRadian;
    +  }
    + 
    +  /*
    +  Internal: Convert degrees to radians. Used by spatial reference converters.
    +  */
    +  function degToRad(deg) {
    +    return deg * RadiansPerDegree;
    +  }
    + 
    +  /*
    +  Internal: Loop over each array in a geojson object and apply a function to it. Used by spatial reference converters.
    +  */
    +  function eachPosition(coordinates, func) {
    +    for (var i = 0; i < coordinates.length; i++) {
    +      // we found a number so lets convert this pair
    +      if(typeof coordinates[i][0] === "number"){
    +        coordinates[i] = func(coordinates[i]);
    +      }
    +      // we found an coordinates array it again and run THIS function against it
    +      if(typeof coordinates[i] === "object"){
    +        coordinates[i] = eachPosition(coordinates[i], func);
    +      }
    +    }
    +    return coordinates;
    +  }
    + 
    +  /*
    +  Public: Convert a GeoJSON Position object to Geographic (4326)
    +  */
    +  function positionToGeographic(position) {
    +    var x = position[0];
    +    var y = position[1];
    +    return [radToDeg(x / EarthRadius) - (Math.floor((radToDeg(x / EarthRadius) + 180) / 360) * 360), radToDeg((Math.PI / 2) - (2 * Math.atan(Math.exp(-1.0 * y / EarthRadius))))];
    +  }
    + 
    +  /*
    +  Public: Convert a GeoJSON Position object to Web Mercator (102100)
    +  */
    +  function positionToMercator(position) {
    +    var lng = position[0];
    +    var lat = Math.max(Math.min(position[1], 89.99999), -89.99999);
    +    return [degToRad(lng) * EarthRadius, EarthRadius/2.0 * Math.log( (1.0 + Math.sin(degToRad(lat))) / (1.0 - Math.sin(degToRad(lat))) )];
    +  }
    + 
    +  /*
    +  Public: Apply a function agaist all positions in a geojson object. Used by spatial reference converters.
    +  */
    +  function applyConverter(geojson, converter, noCrs){
    +    if(geojson.type === "Point") {
    +      geojson.coordinates = converter(geojson.coordinates);
    +    } else if(geojson.type === "Feature") {
    +      geojson.geometry = applyConverter(geojson.geometry, converter, true);
    +    } else if(geojson.type === "FeatureCollection") {
    +      for (var f = 0; f < geojson.features.length; f++) {
    +        geojson.features[f] = applyConverter(geojson.features[f], converter, true);
    +      }
    +    } else if(geojson.type === "GeometryCollection") {
    +      for (var g = 0; g < geojson.geometries.length; g++) {
    +        geojson.geometries[g] = applyConverter(geojson.geometries[g], converter, true);
    +      }
    +    } else {
    +      geojson.coordinates = eachPosition(geojson.coordinates, converter);
    +    }
    + 
    +    if(!noCrs){
    +      if(converter === positionToMercator){
    +        geojson.crs = MercatorCRS;
    +      }
    +    }
    + 
    +    if(converter === positionToGeographic){
    +      delete geojson.crs;
    +    }
    + 
    +    return geojson;
    +  }
    + 
    +  /*
    +  Public: Convert a GeoJSON object to ESRI Web Mercator (102100)
    +  */
    +  function toMercator(geojson) {
    +    return applyConverter(geojson, positionToMercator);
    +  }
    + 
    +  /*
    +  Convert a GeoJSON object to Geographic coordinates (WSG84, 4326)
    +  */
    +  function toGeographic(geojson) {
    +    return applyConverter(geojson, positionToGeographic);
    +  }
    + 
    + 
    +  /*
    +  Internal: -1,0,1 comparison function
    +  */
    +  function cmp(a, b) {
    +    if(a < b) {
    +      return -1;
    +    } else if(a > b) {
    +      return 1;
    +    } else {
    +      return 0;
    +    }
    +  }
    + 
    +  /*
    +  Internal: used for sorting
    +  */
    +  function compSort(p1, p2) {
    +    if (p1[0] > p2[0]) {
    +      return -1;
    +    } else if (p1[0] < p2[0]) {
    +      return 1;
    +    } else if (p1[1] > p2[1]) {
    +      return -1;
    +    } else if (p1[1] < p2[1]) {
    +      return 1;
    +    } else {
    +      return 0;
    +    }
    +  }
    + 
    + 
    +  /*
    +  Internal: used to determine turn
    +  */
    +  function turn(p, q, r) {
    +    // Returns -1, 0, 1 if p,q,r forms a right, straight, or left turn.
    +    return cmp((q[0] - p[0]) * (r[1] - p[1]) - (r[0] - p[0]) * (q[1] - p[1]), 0);
    +  }
    + 
    +  /*
    +  Internal: used to determine euclidean distance between two points
    +  */
    +  function euclideanDistance(p, q) {
    +    // Returns the squared Euclidean distance between p and q.
    +    var dx = q[0] - p[0];
    +    var dy = q[1] - p[1];
    + 
    +    return dx * dx + dy * dy;
    +  }
    + 
    +  function nextHullPoint(points, p) {
    +    // Returns the next point on the convex hull in CCW from p.
    +    var q = p;
    +    for(var r in points) {
    +      var t = turn(p, q, points[r]);
    +      if(t === -1 || t === 0 && euclideanDistance(p, points[r]) > euclideanDistance(p, q)) {
    +        q = points[r];
    +      }
    +    }
    +    return q;
    +  }
    + 
    +  function convexHull(points) {
    +    // implementation of the Jarvis March algorithm
    +    // adapted from http://tixxit.wordpress.com/2009/12/09/jarvis-march/
    + 
    +    if(points.length === 0) {
    +      return [];
    +    } else if(points.length === 1) {
    +      return points;
    +    }
    + 
    +    // Returns the points on the convex hull of points in CCW order.
    +    var hull = [points.sort(compSort)[0]];
    + 
    +    for(var p = 0; p < hull.length; p++) {
    +      var q = nextHullPoint(points, hull[p]);
    + 
    +      if(q !== hull[0]) {
    +        hull.push(q);
    +      }
    +    }
    + 
    +    return hull;
    +  }
    + 
    +  function isConvex(points) {
    +    var ltz;
    + 
    +    for (var i = 0; i < points.length - 3; i++) {
    +      var p1 = points[i];
    +      var p2 = points[i + 1];
    +      var p3 = points[i + 2];
    +      var v = [p2[0] - p1[0], p2[1] - p1[1]];
    + 
    +      // p3.x * v.y - p3.y * v.x + v.x * p1.y - v.y * p1.x
    +      var res = p3[0] * v[1] - p3[1] * v[0] + v[0] * p1[1] - v[1] * p1[0];
    + 
    +      if (i === 0) {
    +        Iif (res < 0) {
    +          ltz = true;
    +        } else {
    +          ltz = false;
    +        }
    +      } else {
    +        Eif (ltz && (res > 0) || !ltz && (res < 0)) {
    +          return false;
    +        }
    +      }
    +    }
    + 
    +    return true;
    +  }
    + 
    +  function coordinatesContainPoint(coordinates, point) {
    +    var contains = false;
    +    for(var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) {
    +      if (((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1]) ||
    +           (coordinates[j][1] <= point[1] && point[1] < coordinates[i][1])) &&
    +          (point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0])) {
    +        contains = !contains;
    +      }
    +    }
    +    return contains;
    +  }
    + 
    +  function polygonContainsPoint(polygon, point) {
    +    if (polygon && polygon.length) {
    +      if (polygon.length === 1) { // polygon with no holes
    +        return coordinatesContainPoint(polygon[0], point);
    +      } else { // polygon with holes
    +        if (coordinatesContainPoint(polygon[0], point)) {
    +          for (var i = 1; i < polygon.length; i++) {
    +            if (coordinatesContainPoint(polygon[i], point)) {
    +              return false; // found in hole
    +            }
    +          }
    + 
    +          return true;
    +        } else {
    +          return false;
    +        }
    +      }
    +    } else {
    +      return false;
    +    }
    +  }
    + 
    +  function edgeIntersectsEdge(a1, a2, b1, b2) {
    +    var ua_t = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]);
    +    var ub_t = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]);
    +    var u_b  = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]);
    + 
    +    if ( u_b !== 0 ) {
    +      var ua = ua_t / u_b;
    +      var ub = ub_t / u_b;
    + 
    +      if ( 0 <= ua && ua <= 1 && 0 <= ub && ub <= 1 ) {
    +        return true;
    +      }
    +    }
    + 
    +    return false;
    +  }
    + 
    +  function isNumber(n) {
    +    return !isNaN(parseFloat(n)) && isFinite(n);
    +  }
    + 
    +  function arraysIntersectArrays(a, b) {
    +    if (isNumber(a[0][0])) {
    +      if (isNumber(b[0][0])) {
    +        for (var i = 0; i < a.length - 1; i++) {
    +          for (var j = 0; j < b.length - 1; j++) {
    +            if (edgeIntersectsEdge(a[i], a[i + 1], b[j], b[j + 1])) {
    +              return true;
    +            }
    +          }
    +        }
    +      } else {
    +        for (var k = 0; k < b.length; k++) {
    +          if (arraysIntersectArrays(a, b[k])) {
    +            return true;
    +          }
    +        }
    +      }
    +    } else {
    +      for (var l = 0; l < a.length; l++) {
    +        if (arraysIntersectArrays(a[l], b)) {
    +          return true;
    +        }
    +      }
    +    }
    +    return false;
    +  }
    + 
    +  /*
    +  Internal: Returns a copy of coordinates for s closed polygon
    +  */
    +  function closedPolygon(coordinates) {
    +    var outer = [ ];
    + 
    +    for (var i = 0; i < coordinates.length; i++) {
    +      var inner = coordinates[i].slice();
    +      if (pointsEqual(inner[0], inner[inner.length - 1]) === false) {
    +        inner.push(inner[0]);
    +      }
    + 
    +      outer.push(inner);
    +    }
    + 
    +    return outer;
    +  }
    + 
    +  function pointsEqual(a, b) {
    +    for (var i = 0; i < a.length; i++) {
    + 
    +      if (a[i] !== b[i]) {
    +        return false;
    +      }
    +    }
    + 
    +    return true;
    +  }
    + 
    +  function coordinatesEqual(a, b) {
    +    if (a.length !== b.length) {
    +      return false;
    +    }
    + 
    +    var na = a.slice().sort(compSort);
    +    var nb = b.slice().sort(compSort);
    + 
    +    for (var i = 0; i < na.length; i++) {
    +      if (na[i].length !== nb[i].length) {
    +        return false;
    +      }
    +      for (var j = 0; j < na.length; j++) {
    +        if (na[i][j] !== nb[i][j]) {
    +          return false;
    +        }
    +      }
    +    }
    + 
    +    return true;
    +  }
    + 
    +  /*
    +  Internal: An array of variables that will be excluded form JSON objects.
    +  */
    +  var excludeFromJSON = ["length"];
    + 
    +  /*
    +  Internal: Base GeoJSON Primitive
    +  */
    +  function Primitive(geojson){
    +    if(geojson){
    +      switch (geojson.type) {
    +      case 'Point':
    +        return new Point(geojson);
    + 
    +      case 'MultiPoint':
    +        return new MultiPoint(geojson);
    + 
    +      case 'LineString':
    +        return new LineString(geojson);
    + 
    +      case 'MultiLineString':
    +        return new MultiLineString(geojson);
    + 
    +      case 'Polygon':
    +        return new Polygon(geojson);
    + 
    +      case 'MultiPolygon':
    +        return new MultiPolygon(geojson);
    + 
    +      case 'Feature':
    +        return new Feature(geojson);
    + 
    +      case 'FeatureCollection':
    +        return new FeatureCollection(geojson);
    + 
    +      case 'GeometryCollection':
    +        return new GeometryCollection(geojson);
    + 
    +      default:
    +        throw new Error("Unknown type: " + geojson.type);
    +      }
    +    }
    +  }
    + 
    +  Primitive.prototype.toMercator = function(){
    +    return toMercator(this);
    +  };
    + 
    +  Primitive.prototype.toGeographic = function(){
    +    return toGeographic(this);
    +  };
    + 
    +  Primitive.prototype.envelope = function(){
    +    return calculateEnvelope(this);
    +  };
    + 
    +  Primitive.prototype.bbox = function(){
    +    return calculateBounds(this);
    +  };
    + 
    +  Primitive.prototype.convexHull = function(){
    +    var coordinates = [ ], i, j;
    +    if (this.type === 'Point') {
    +      return null;
    +    } else if (this.type === 'LineString' || this.type === 'MultiPoint') {
    +      if (this.coordinates && this.coordinates.length >= 3) {
    +        coordinates = this.coordinates;
    +      } else {
    +        return null;
    +      }
    +    } else if (this.type === 'Polygon' || this.type === 'MultiLineString') {
    +      if (this.coordinates && this.coordinates.length > 0) {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          coordinates = coordinates.concat(this.coordinates[i]);
    +        }
    +        Iif(coordinates.length < 3){
    +          return null;
    +        }
    +      } else {
    +        return null;
    +      }
    +    } else if (this.type === 'MultiPolygon') {
    +      if (this.coordinates && this.coordinates.length > 0) {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          for (j = 0; j < this.coordinates[i].length; j++) {
    +            coordinates = coordinates.concat(this.coordinates[i][j]);
    +          }
    +        }
    +        Iif(coordinates.length < 3){
    +          return null;
    +        }
    +      } else {
    +        return null;
    +      }
    +    } else Eif(this.type === "Feature"){
    +      var primitive = new Primitive(this.geometry);
    +      return primitive.convexHull();
    +    }
    + 
    +    return new Polygon({
    +      type: 'Polygon',
    +      coordinates: closedPolygon([convexHull(coordinates)])
    +    });
    +  };
    + 
    +  Primitive.prototype.toJSON = function(){
    +    var obj = {};
    +    for (var key in this) {
    +      if (this.hasOwnProperty(key) && excludeFromJSON.indexOf(key) === -1) {
    +        obj[key] = this[key];
    +      }
    +    }
    +    obj.bbox = calculateBounds(this);
    +    return obj;
    +  };
    + 
    +  Primitive.prototype.contains = function(primitive){
    +    return new Primitive(primitive).within(this);
    +  };
    + 
    +  Primitive.prototype.within = function(primitive) {
    +    var coordinates, i, contains;
    + 
    +    // if we are passed a feature, use the polygon inside instead
    +    if (primitive.type === 'Feature') {
    +      primitive = primitive.geometry;
    +    }
    + 
    +    // point.within(point) :: equality
    +    if (primitive.type === "Point") {
    +      Eif (this.type === "Point") {
    +        return pointsEqual(this.coordinates, primitive.coordinates);
    + 
    +      }
    +    }
    + 
    +    // point.within(multilinestring)
    +    if (primitive.type === "MultiLineString") {
    +      if (this.type === "Point") {
    +        for (i = 0; i < primitive.coordinates.length; i++) {
    +          var linestring = { type: "LineString", coordinates: primitive.coordinates[i] };
    + 
    +          Eif (this.within(linestring)) {
    +            return true;
    +          }
    +        }
    +      }
    +    }
    + 
    +    // point.within(linestring), point.within(multipoint)
    +    if (primitive.type === "LineString" || primitive.type === "MultiPoint") {
    +      if (this.type === "Point") {
    +        for (i = 0; i < primitive.coordinates.length; i++) {
    +          if (this.coordinates.length !== primitive.coordinates[i].length) {
    +            return false;
    +          }
    + 
    +          if (pointsEqual(this.coordinates, primitive.coordinates[i])) {
    +            return true;
    +          }
    +        }
    +      }
    +    }
    + 
    +    if (primitive.type === "Polygon") {
    +      // polygon.within(polygon)
    +      if (this.type === "Polygon") {
    +        // check for equal polygons
    +        Eif (primitive.coordinates.length === this.coordinates.length) {
    +          for (i = 0; i < this.coordinates.length; i++) {
    +            if (coordinatesEqual(this.coordinates[i], primitive.coordinates[i])) {
    +              return true;
    +            }
    +          }
    +        }
    + 
    +        if (this.coordinates.length && polygonContainsPoint(primitive.coordinates, this.coordinates[0][0])) {
    +          return !arraysIntersectArrays(closedPolygon(this.coordinates), closedPolygon(primitive.coordinates));
    +        } else {
    +          return false;
    +        }
    + 
    +      // point.within(polygon)
    +      } else if (this.type === "Point") {
    +        return polygonContainsPoint(primitive.coordinates, this.coordinates);
    + 
    +      // linestring/multipoint withing polygon
    +      } else if (this.type === "LineString" || this.type === "MultiPoint") {
    +        if (!this.coordinates || this.coordinates.length === 0) {
    +          return false;
    +        }
    + 
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          if (polygonContainsPoint(primitive.coordinates, this.coordinates[i]) === false) {
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    + 
    +      // multilinestring.within(polygon)
    +      } else if (this.type === "MultiLineString") {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          var ls = new LineString(this.coordinates[i]);
    + 
    +          if (ls.within(primitive) === false) {
    +            contains++;
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    + 
    +      // multipolygon.within(polygon)
    +      } else Eif (this.type === "MultiPolygon") {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          var p1 = new Primitive({ type: "Polygon", coordinates: this.coordinates[i] });
    + 
    +          if (p1.within(primitive) === false) {
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    +      }
    + 
    +    }
    + 
    +    if (primitive.type === "MultiPolygon") {
    +      // point.within(multipolygon)
    +      if (this.type === "Point") {
    +        Eif (primitive.coordinates.length) {
    +          for (i = 0; i < primitive.coordinates.length; i++) {
    +            coordinates = primitive.coordinates[i];
    +            if (polygonContainsPoint(coordinates, this.coordinates) && arraysIntersectArrays([this.coordinates], primitive.coordinates) === false) {
    +              return true;
    +            }
    +          }
    +        }
    + 
    +        return false;
    +      // polygon.within(multipolygon)
    +      } else if (this.type === "Polygon") {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          Eif (primitive.coordinates[i].length === this.coordinates.length) {
    +            for (j = 0; j < this.coordinates.length; j++) {
    +              if (coordinatesEqual(this.coordinates[j], primitive.coordinates[i][j])) {
    +                return true;
    +              }
    +            }
    +          }
    +        }
    + 
    +        if (arraysIntersectArrays(this.coordinates, primitive.coordinates) === false) {
    +          Eif (primitive.coordinates.length) {
    +            for (i = 0; i < primitive.coordinates.length; i++) {
    +              coordinates = primitive.coordinates[i];
    +              if (polygonContainsPoint(coordinates, this.coordinates[0][0]) === false) {
    +                contains = false;
    +              } else {
    +                contains = true;
    +              }
    +            }
    + 
    +            return contains;
    +          }
    +        }
    + 
    +      // linestring.within(multipolygon), multipoint.within(multipolygon)
    +      } else if (this.type === "LineString" || this.type === "MultiPoint") {
    +        for (i = 0; i < primitive.coordinates.length; i++) {
    +          var p = { type: "Polygon", coordinates: primitive.coordinates[i] };
    + 
    +          if (this.within(p)) {
    +            return true;
    +          }
    + 
    +          return false;
    +        }
    + 
    +      // multilinestring.within(multipolygon)
    +      } else if (this.type === "MultiLineString") {
    +        for (i = 0; i < this.coordinates.length; i++) {
    +          var lines = new LineString(this.coordinates[i]);
    + 
    +          if (lines.within(primitive) === false) {
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    + 
    +      // multipolygon.within(multipolygon)
    +      } else Eif (this.type === "MultiPolygon") {
    +        for (i = 0; i < primitive.coordinates.length; i++) {
    +          var mpoly = { type: "Polygon", coordinates: primitive.coordinates[i] };
    + 
    +          if (this.within(mpoly) === false) {
    +            return false;
    +          }
    +        }
    + 
    +        return true;
    +      }
    +    }
    + 
    +    // default to false
    +    return false;
    +  };
    + 
    +  Primitive.prototype.intersects = function(primitive) {
    +    // if we are passed a feature, use the polygon inside instead
    +    Iif (primitive.type === 'Feature') {
    +      primitive = primitive.geometry;
    +    }
    + 
    +    var p = new Primitive(primitive);
    +    if (this.within(primitive) || p.within(this)) {
    +      return true;
    +    }
    + 
    + 
    +    Eif (this.type !== 'Point' && this.type !== 'MultiPoint' &&
    +        primitive.type !== 'Point' && primitive.type !== 'MultiPoint') {
    +      return arraysIntersectArrays(this.coordinates, primitive.coordinates);
    +    } else if (this.type === 'Feature') {
    +      // in the case of a Feature, use the internal primitive for intersection
    +      var inner = new Primitive(this.geometry);
    +      return inner.intersects(primitive);
    +    }
    + 
    +    warn("Type " + this.type + " to " + primitive.type + " intersection is not supported by intersects");
    +    return false;
    +  };
    + 
    + 
    +  /*
    +  GeoJSON Point Class
    +    new Point();
    +    new Point(x,y,z,wtf);
    +    new Point([x,y,z,wtf]);
    +    new Point([x,y]);
    +    new Point({
    +      type: "Point",
    +      coordinates: [x,y]
    +    });
    +  */
    +  function Point(input){
    +    var args = Array.prototype.slice.call(arguments);
    + 
    +    if(input && input.type === "Point" && input.coordinates){
    +      extend(this, input);
    +    } else if(input && isArray(input)) {
    +      this.coordinates = input;
    +    } else if(args.length >= 2) {
    +      this.coordinates = args;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.Point";
    +    }
    + 
    +    this.type = "Point";
    +  }
    + 
    +  Point.prototype = new Primitive();
    +  Point.prototype.constructor = Point;
    + 
    +  /*
    +  GeoJSON MultiPoint Class
    +      new MultiPoint();
    +      new MultiPoint([[x,y], [x1,y1]]);
    +      new MultiPoint({
    +        type: "MultiPoint",
    +        coordinates: [x,y]
    +      });
    +  */
    +  function MultiPoint(input){
    +    if(input && input.type === "MultiPoint" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.MultiPoint";
    +    }
    + 
    +    this.type = "MultiPoint";
    +  }
    + 
    +  MultiPoint.prototype = new Primitive();
    +  MultiPoint.prototype.constructor = MultiPoint;
    +  MultiPoint.prototype.forEach = function(func){
    +    for (var i = 0; i < this.coordinates.length; i++) {
    +      func.apply(this, [this.coordinates[i], i, this.coordinates]);
    +    }
    +    return this;
    +  };
    +  MultiPoint.prototype.addPoint = function(point){
    +    this.coordinates.push(point);
    +    return this;
    +  };
    +  MultiPoint.prototype.insertPoint = function(point, index){
    +    this.coordinates.splice(index, 0, point);
    +    return this;
    +  };
    +  MultiPoint.prototype.removePoint = function(remove){
    +    if(typeof remove === "number"){
    +      this.coordinates.splice(remove, 1);
    +    } else {
    +      this.coordinates.splice(this.coordinates.indexOf(remove), 1);
    +    }
    +    return this;
    +  };
    +  MultiPoint.prototype.get = function(i){
    +    return new Point(this.coordinates[i]);
    +  };
    + 
    +  /*
    +  GeoJSON LineString Class
    +      new LineString();
    +      new LineString([[x,y], [x1,y1]]);
    +      new LineString({
    +        type: "LineString",
    +        coordinates: [x,y]
    +      });
    +  */
    +  function LineString(input){
    +    if(input && input.type === "LineString" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.LineString";
    +    }
    + 
    +    this.type = "LineString";
    +  }
    + 
    +  LineString.prototype = new Primitive();
    +  LineString.prototype.constructor = LineString;
    +  LineString.prototype.addVertex = function(point){
    +    this.coordinates.push(point);
    +    return this;
    +  };
    +  LineString.prototype.insertVertex = function(point, index){
    +    this.coordinates.splice(index, 0, point);
    +    return this;
    +  };
    +  LineString.prototype.removeVertex = function(remove){
    +    this.coordinates.splice(remove, 1);
    +    return this;
    +  };
    + 
    +  /*
    +  GeoJSON MultiLineString Class
    +      new MultiLineString();
    +      new MultiLineString([ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ]);
    +      new MultiLineString({
    +        type: "MultiLineString",
    +        coordinates: [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ]
    +      });
    +  */
    +  function MultiLineString(input){
    +    if(input && input.type === "MultiLineString" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.MultiLineString";
    +    }
    + 
    +    this.type = "MultiLineString";
    +  }
    + 
    +  MultiLineString.prototype = new Primitive();
    +  MultiLineString.prototype.constructor = MultiLineString;
    +  MultiLineString.prototype.forEach = function(func){
    +    for (var i = 0; i < this.coordinates.length; i++) {
    +      func.apply(this, [this.coordinates[i], i, this.coordinates ]);
    +    }
    +  };
    +  MultiLineString.prototype.get = function(i){
    +    return new LineString(this.coordinates[i]);
    +  };
    + 
    +  /*
    +  GeoJSON Polygon Class
    +      new Polygon();
    +      new Polygon([ [[x,y], [x1,y1], [x2,y2]] ]);
    +      new Polygon({
    +        type: "Polygon",
    +        coordinates: [ [[x,y], [x1,y1], [x2,y2]] ]
    +      });
    +  */
    +  function Polygon(input){
    +    if(input && input.type === "Polygon" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.Polygon";
    +    }
    + 
    +    this.type = "Polygon";
    +  }
    + 
    +  Polygon.prototype = new Primitive();
    +  Polygon.prototype.constructor = Polygon;
    +  Polygon.prototype.addVertex = function(point){
    +    this.insertVertex(point, this.coordinates[0].length - 1);
    +    return this;
    +  };
    +  Polygon.prototype.insertVertex = function(point, index){
    +    this.coordinates[0].splice(index, 0, point);
    +    return this;
    +  };
    +  Polygon.prototype.removeVertex = function(remove){
    +    this.coordinates[0].splice(remove, 1);
    +    return this;
    +  };
    +  Polygon.prototype.close = function() {
    +    this.coordinates = closedPolygon(this.coordinates);
    +  };
    +  Polygon.prototype.hasHoles = function() {
    +    return this.coordinates.length > 1;
    +  };
    +  Polygon.prototype.holes = function() {
    +    holes = [];
    +    Eif (this.hasHoles()) {
    +      for (var i = 1; i < this.coordinates.length; i++) {
    +        holes.push(new Polygon([this.coordinates[i]]));
    +      }
    +    }
    +    return holes;
    +  };
    + 
    +  /*
    +  GeoJSON MultiPolygon Class
    +      new MultiPolygon();
    +      new MultiPolygon([ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]);
    +      new MultiPolygon({
    +        type: "MultiPolygon",
    +        coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]
    +      });
    +  */
    +  function MultiPolygon(input){
    +    if(input && input.type === "MultiPolygon" && input.coordinates){
    +      extend(this, input);
    +    } else if(isArray(input)) {
    +      this.coordinates = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.MultiPolygon";
    +    }
    + 
    +    this.type = "MultiPolygon";
    +  }
    + 
    +  MultiPolygon.prototype = new Primitive();
    +  MultiPolygon.prototype.constructor = MultiPolygon;
    +  MultiPolygon.prototype.forEach = function(func){
    +    for (var i = 0; i < this.coordinates.length; i++) {
    +      func.apply(this, [this.coordinates[i], i, this.coordinates ]);
    +    }
    +  };
    +  MultiPolygon.prototype.get = function(i){
    +    return new Polygon(this.coordinates[i]);
    +  };
    +  MultiPolygon.prototype.close = function(){
    +    var outer = [];
    +    this.forEach(function(polygon){
    +      outer.push(closedPolygon(polygon));
    +    });
    +    this.coordinates = outer;
    +    return this;
    +  };
    + 
    +  /*
    +  GeoJSON Feature Class
    +      new Feature();
    +      new Feature({
    +        type: "Feature",
    +        geometry: {
    +          type: "Polygon",
    +          coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]
    +        }
    +      });
    +      new Feature({
    +        type: "Polygon",
    +        coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]
    +      });
    +  */
    +  function Feature(input){
    +    if(input && input.type === "Feature"){
    +      extend(this, input);
    +    } else Eif(input && input.type && input.coordinates) {
    +      this.geometry = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.Feature";
    +    }
    + 
    +    this.type = "Feature";
    +  }
    + 
    +  Feature.prototype = new Primitive();
    +  Feature.prototype.constructor = Feature;
    + 
    +  /*
    +  GeoJSON FeatureCollection Class
    +      new FeatureCollection();
    +      new FeatureCollection([feature, feature1]);
    +      new FeatureCollection({
    +        type: "FeatureCollection",
    +        coordinates: [feature, feature1]
    +      });
    +  */
    +  function FeatureCollection(input){
    +    if(input && input.type === "FeatureCollection" && input.features){
    +      extend(this, input);
    +    } else Eif(isArray(input)) {
    +      this.features = input;
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.FeatureCollection";
    +    }
    + 
    +    this.type = "FeatureCollection";
    +  }
    + 
    +  FeatureCollection.prototype = new Primitive();
    +  FeatureCollection.prototype.constructor = FeatureCollection;
    +  FeatureCollection.prototype.forEach = function(func){
    +    for (var i = 0; i < this.features.length; i++) {
    +      func.apply(this, [this.features[i], i, this.features]);
    +    }
    +  };
    +  FeatureCollection.prototype.get = function(id){
    +    var found;
    +    this.forEach(function(feature){
    +      if(feature.id === id){
    +        found = feature;
    +      }
    +    });
    +    return new Feature(found);
    +  };
    + 
    +  /*
    +  GeoJSON GeometryCollection Class
    +      new GeometryCollection();
    +      new GeometryCollection([geometry, geometry1]);
    +      new GeometryCollection({
    +        type: "GeometryCollection",
    +        coordinates: [geometry, geometry1]
    +      });
    +  */
    +  function GeometryCollection(input){
    +    if(input && input.type === "GeometryCollection" && input.geometries){
    +      extend(this, input);
    +    } else Eif(isArray(input)) {
    +      this.geometries = input;
    +    } else if(input.coordinates && input.type){
    +      this.type = "GeometryCollection";
    +      this.geometries = [input];
    +    } else {
    +      throw "Terraformer: invalid input for Terraformer.GeometryCollection";
    +    }
    + 
    +    this.type = "GeometryCollection";
    +  }
    + 
    +  GeometryCollection.prototype = new Primitive();
    +  GeometryCollection.prototype.constructor = GeometryCollection;
    +  GeometryCollection.prototype.forEach = function(func){
    +    for (var i = 0; i < this.geometries.length; i++) {
    +      func.apply(this, [this.geometries[i], i, this.geometries]);
    +    }
    +  };
    +  GeometryCollection.prototype.get = function(i){
    +    return new Primitive(this.geometries[i]);
    +  };
    + 
    +  function createCircle(center, radius, interpolate){
    +    var mercatorPosition = positionToMercator(center);
    +    var steps = interpolate || 64;
    +    var polygon = {
    +      type: "Polygon",
    +      coordinates: [[]]
    +    };
    +    for(var i=1; i<=steps; i++) {
    +      var radians = i * (360/steps) * Math.PI / 180;
    +      polygon.coordinates[0].push([mercatorPosition[0] + radius * Math.cos(radians), mercatorPosition[1] + radius * Math.sin(radians)]);
    +    }
    +    polygon.coordinates = closedPolygon(polygon.coordinates);
    + 
    +    return toGeographic(polygon);
    +  }
    + 
    +  function Circle (center, radius, interpolate) {
    +    var steps = interpolate || 64;
    +    var rad = radius || 250;
    + 
    +    if(!center || center.length < 2 || !rad || !steps) {
    +      throw new Error("Terraformer: missing parameter for Terraformer.Circle");
    +    }
    + 
    +    extend(this, new Feature({
    +      type: "Feature",
    +      geometry: createCircle(center, rad, steps),
    +      properties: {
    +        radius: rad,
    +        center: center,
    +        steps: steps
    +      }
    +    }));
    +  }
    + 
    +  Circle.prototype = new Primitive();
    +  Circle.prototype.constructor = Circle;
    +  Circle.prototype.recalculate = function(){
    +    this.geometry = createCircle(this.properties.center, this.properties.radius, this.properties.steps);
    +    return this;
    +  };
    +  Circle.prototype.center = function(coordinates){
    +    if(coordinates){
    +      this.properties.center = coordinates;
    +      this.recalculate();
    +    }
    +    return this.properties.center;
    +  };
    +  Circle.prototype.radius = function(radius){
    +    if(radius){
    +      this.properties.radius = radius;
    +      this.recalculate();
    +    }
    +    return this.properties.radius;
    +  };
    +  Circle.prototype.steps = function(steps){
    +    if(steps){
    +      this.properties.steps = steps;
    +      this.recalculate();
    +    }
    +    return this.properties.steps;
    +  };
    + 
    +  Circle.prototype.toJSON = function() {
    +    var output = Primitive.prototype.toJSON.call(this);
    +    return output;
    +  };
    + 
    +  exports.Primitive = Primitive;
    +  exports.Point = Point;
    +  exports.MultiPoint = MultiPoint;
    +  exports.LineString = LineString;
    +  exports.MultiLineString = MultiLineString;
    +  exports.Polygon = Polygon;
    +  exports.MultiPolygon = MultiPolygon;
    +  exports.Feature = Feature;
    +  exports.FeatureCollection = FeatureCollection;
    +  exports.GeometryCollection = GeometryCollection;
    +  exports.Circle = Circle;
    + 
    +  exports.toMercator = toMercator;
    +  exports.toGeographic = toGeographic;
    + 
    +  exports.Tools = {};
    +  exports.Tools.positionToMercator = positionToMercator;
    +  exports.Tools.positionToGeographic = positionToGeographic;
    +  exports.Tools.applyConverter = applyConverter;
    +  exports.Tools.toMercator = toMercator;
    +  exports.Tools.toGeographic = toGeographic;
    +  exports.Tools.createCircle = createCircle;
    + 
    +  exports.Tools.calculateBounds = calculateBounds;
    +  exports.Tools.calculateEnvelope = calculateEnvelope;
    + 
    +  exports.Tools.coordinatesContainPoint = coordinatesContainPoint;
    +  exports.Tools.polygonContainsPoint = polygonContainsPoint;
    +  exports.Tools.arraysIntersectArrays = arraysIntersectArrays;
    +  exports.Tools.coordinatesContainPoint = coordinatesContainPoint;
    +  exports.Tools.coordinatesEqual = coordinatesEqual;
    +  exports.Tools.convexHull = convexHull;
    +  exports.Tools.isConvex = isConvex;
    + 
    +  exports.MercatorCRS = MercatorCRS;
    +  exports.GeographicCRS = GeographicCRS;
    + 
    +  return exports;
    +}));
    + 
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer/.coverage/base.css b/node_modules/terraformer/.coverage/base.css new file mode 100644 index 0000000..29737bc --- /dev/null +++ b/node_modules/terraformer/.coverage/base.css @@ -0,0 +1,213 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + 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; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.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; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.medium .chart { border:1px solid #f9cd0b; } +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } +/* light gray */ +span.cline-neutral { background: #eaeaea; } + +.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; } + + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.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; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/node_modules/terraformer/.coverage/coverage.json b/node_modules/terraformer/.coverage/coverage.json new file mode 100644 index 0000000..d72eabe --- /dev/null +++ b/node_modules/terraformer/.coverage/coverage.json @@ -0,0 +1 @@ +{"./terraformer.js":{"path":"./terraformer.js","s":{"1":1,"2":1,"3":0,"4":1,"5":1,"6":1,"7":1,"8":216,"9":1,"10":0,"11":0,"12":0,"13":1,"14":96,"15":685,"16":226,"17":96,"18":1,"19":73,"20":73,"21":6,"22":5,"23":4,"24":3,"25":29,"26":3,"27":15,"28":3,"29":4,"30":1,"31":0,"32":1,"33":32,"34":32,"35":40,"36":40,"37":1600,"38":1600,"39":1600,"40":1600,"41":32,"42":1568,"43":553,"44":1600,"45":32,"46":1568,"47":275,"48":1600,"49":32,"50":1568,"51":323,"52":1600,"53":32,"54":1568,"55":429,"56":32,"57":1,"58":3,"59":3,"60":6,"61":6,"62":7,"63":7,"64":220,"65":220,"66":220,"67":220,"68":3,"69":217,"70":3,"71":220,"72":3,"73":217,"74":119,"75":220,"76":3,"77":217,"78":11,"79":220,"80":3,"81":217,"82":82,"83":3,"84":1,"85":16,"86":16,"87":69,"88":69,"89":69,"90":69,"91":16,"92":53,"93":10,"94":69,"95":16,"96":53,"97":39,"98":69,"99":16,"100":53,"101":21,"102":69,"103":16,"104":53,"105":22,"106":16,"107":1,"108":3,"109":3,"110":5,"111":5,"112":5,"113":3,"114":1,"115":4,"116":4,"117":8,"118":8,"119":8,"120":4,"121":1,"122":13,"123":13,"124":1,"125":5709,"126":1,"127":141,"128":1,"129":1976,"130":5790,"131":1920,"132":5790,"133":1950,"134":1976,"135":1,"136":1903,"137":1903,"138":1903,"139":1,"140":47,"141":47,"142":47,"143":1,"144":50,"145":14,"146":36,"147":6,"148":30,"149":2,"150":4,"151":28,"152":2,"153":4,"154":26,"155":50,"156":36,"157":10,"158":50,"159":33,"160":50,"161":1,"162":10,"163":1,"164":26,"165":1,"166":280,"167":58,"168":222,"169":108,"170":114,"171":1,"172":403,"173":143,"174":260,"175":90,"176":170,"177":94,"178":76,"179":40,"180":36,"181":1,"182":280,"183":1,"184":228,"185":228,"186":228,"187":1,"188":48,"189":48,"190":280,"191":280,"192":108,"193":48,"194":1,"195":14,"196":1,"197":13,"198":1,"199":12,"200":12,"201":48,"202":48,"203":36,"204":12,"205":1,"206":2,"207":2,"208":3,"209":3,"210":3,"211":3,"212":3,"213":3,"214":2,"215":0,"216":2,"217":1,"218":1,"219":1,"220":1,"221":70,"222":70,"223":378,"224":43,"225":70,"226":1,"227":69,"228":68,"229":65,"230":3,"231":2,"232":2,"233":1,"234":1,"235":1,"236":1,"237":1,"238":192,"239":192,"240":192,"241":192,"242":105,"243":105,"244":105,"245":25,"246":167,"247":1,"248":210,"249":1,"250":121,"251":89,"252":41,"253":72,"254":192,"255":25,"256":48,"257":51,"258":31,"259":32,"260":32,"261":23,"262":42,"263":1,"264":48,"265":48,"266":50,"267":50,"268":42,"269":50,"270":48,"271":1,"272":64,"273":94,"274":52,"275":12,"276":1,"277":28,"278":1,"279":27,"280":27,"281":27,"282":46,"283":1,"284":45,"285":137,"286":21,"287":5,"288":1,"289":1,"290":65,"291":55,"292":3,"293":1,"294":7,"295":5,"296":25,"297":8,"298":2,"299":1,"300":2,"301":1,"302":1,"303":1,"304":1,"305":1,"306":1,"307":13,"308":1,"309":13,"310":1,"311":23,"312":23,"313":2,"314":21,"315":7,"316":4,"317":3,"318":14,"319":8,"320":6,"321":8,"322":6,"323":0,"324":2,"325":6,"326":3,"327":2,"328":4,"329":4,"330":2,"331":0,"332":1,"333":3,"334":3,"335":3,"336":12,"337":1,"338":19,"339":19,"340":291,"341":45,"342":19,"343":19,"344":1,"345":0,"346":1,"347":115,"348":115,"349":1,"350":115,"351":2,"352":2,"353":113,"354":9,"355":1,"356":1,"357":1,"358":1,"359":112,"360":19,"361":4,"362":13,"363":1,"364":12,"365":3,"366":108,"367":60,"368":20,"369":20,"370":20,"371":4,"372":16,"373":9,"374":7,"375":40,"376":5,"377":35,"378":22,"379":1,"380":21,"381":39,"382":13,"383":8,"384":13,"385":4,"386":5,"387":5,"388":3,"389":3,"390":1,"391":9,"392":9,"393":12,"394":12,"395":7,"396":2,"397":48,"398":25,"399":2,"400":2,"401":4,"402":4,"403":1,"404":1,"405":23,"406":6,"407":6,"408":6,"409":6,"410":1,"411":5,"412":1,"413":1,"414":2,"415":2,"416":1,"417":1,"418":1,"419":17,"420":9,"421":9,"422":9,"423":4,"424":5,"425":8,"426":3,"427":4,"428":4,"429":2,"430":1,"431":5,"432":5,"433":5,"434":5,"435":4,"436":1,"437":27,"438":1,"439":24,"440":0,"441":24,"442":24,"443":1,"444":23,"445":23,"446":0,"447":0,"448":0,"449":0,"450":0,"451":1,"452":32,"453":32,"454":3,"455":29,"456":19,"457":10,"458":9,"459":1,"460":31,"461":1,"462":1,"463":1,"464":19,"465":1,"466":18,"467":17,"468":1,"469":18,"470":1,"471":1,"472":1,"473":1,"474":2,"475":1,"476":1,"477":2,"478":2,"479":1,"480":1,"481":1,"482":1,"483":2,"484":1,"485":1,"486":2,"487":1,"488":2,"489":1,"490":49,"491":7,"492":42,"493":41,"494":1,"495":48,"496":1,"497":1,"498":1,"499":2,"500":2,"501":1,"502":1,"503":1,"504":1,"505":1,"506":1,"507":1,"508":27,"509":5,"510":22,"511":21,"512":1,"513":26,"514":1,"515":1,"516":1,"517":1,"518":2,"519":1,"520":2,"521":1,"522":97,"523":37,"524":60,"525":59,"526":1,"527":96,"528":1,"529":1,"530":1,"531":1,"532":1,"533":1,"534":2,"535":2,"536":1,"537":1,"538":1,"539":1,"540":0,"541":1,"542":3,"543":1,"544":1,"545":1,"546":1,"547":1,"548":1,"549":1,"550":43,"551":9,"552":34,"553":33,"554":1,"555":42,"556":1,"557":1,"558":1,"559":3,"560":6,"561":1,"562":2,"563":1,"564":1,"565":1,"566":2,"567":1,"568":1,"569":1,"570":23,"571":18,"572":5,"573":5,"574":0,"575":23,"576":1,"577":1,"578":1,"579":6,"580":1,"581":5,"582":5,"583":0,"584":6,"585":1,"586":1,"587":1,"588":2,"589":4,"590":1,"591":2,"592":2,"593":4,"594":2,"595":2,"596":1,"597":8,"598":2,"599":6,"600":6,"601":0,"602":0,"603":0,"604":0,"605":8,"606":1,"607":1,"608":1,"609":1,"610":2,"611":1,"612":2,"613":1,"614":16,"615":16,"616":16,"617":16,"618":1856,"619":1856,"620":16,"621":16,"622":1,"623":14,"624":14,"625":14,"626":1,"627":13,"628":1,"629":1,"630":1,"631":3,"632":3,"633":1,"634":2,"635":1,"636":1,"637":2,"638":1,"639":2,"640":1,"641":1,"642":2,"643":1,"644":2,"645":1,"646":1,"647":2,"648":1,"649":1,"650":1,"651":1,"652":1,"653":1,"654":1,"655":1,"656":1,"657":1,"658":1,"659":1,"660":1,"661":1,"662":1,"663":1,"664":1,"665":1,"666":1,"667":1,"668":1,"669":1,"670":1,"671":1,"672":1,"673":1,"674":1,"675":1,"676":1,"677":1,"678":1,"679":1,"680":1,"681":1,"682":1},"b":{"1":[0,1],"2":[1,0],"3":[1,0],"4":[0,0],"5":[0,0],"6":[226,459],"7":[73,0],"8":[6,5,4,3,29,3,15,3,4,1],"9":[13,2],"10":[32,1568],"11":[553,1015],"12":[32,1568],"13":[275,1293],"14":[32,1568],"15":[323,1245],"16":[32,1568],"17":[429,1139],"18":[3,217],"19":[3,214],"20":[3,217],"21":[119,98],"22":[3,217],"23":[11,206],"24":[3,217],"25":[82,135],"26":[16,53],"27":[10,43],"28":[16,53],"29":[39,14],"30":[16,53],"31":[21,32],"32":[16,53],"33":[22,31],"34":[1920,3870],"35":[1950,3840],"36":[14,36],"37":[6,30],"38":[2,28],"39":[2,26],"40":[36,14],"41":[10,26],"42":[33,17],"43":[58,222],"44":[108,114],"45":[143,260],"46":[90,170],"47":[94,76],"48":[40,36],"49":[108,172],"50":[280,222,114],"51":[1,13],"52":[1,12],"53":[36,12],"54":[2,1],"55":[0,2],"56":[1,0],"57":[1,0,1,1],"58":[43,335],"59":[378,195,333,195,90],"60":[68,1],"61":[69,69],"62":[65,3],"63":[2,1],"64":[1,1],"65":[105,87],"66":[25,80],"67":[105,68,26,25],"68":[210,210],"69":[89,32],"70":[41,48],"71":[25,167],"72":[31,20],"73":[23,9],"74":[42,8],"75":[52,42],"76":[1,27],"77":[1,45],"78":[21,116],"79":[55,10],"80":[3,1,7,5,25,8,2,1,2,1],"81":[2,21],"82":[7,14],"83":[21,17],"84":[4,3],"85":[7,7],"86":[8,6],"87":[14,8],"88":[6,2],"89":[8,8],"90":[0,6],"91":[3,3],"92":[2,1],"93":[3,3],"94":[0,2],"95":[3,0],"96":[45,246],"97":[291,45],"98":[1,114],"99":[2,113],"100":[2,0],"101":[9,104],"102":[1,8],"103":[1,0],"104":[19,93],"105":[112,95],"106":[4,15],"107":[1,12],"108":[3,9],"109":[60,48],"110":[20,40],"111":[20,0],"112":[4,16],"113":[9,7],"114":[16,16],"115":[5,35],"116":[22,13],"117":[35,16],"118":[1,21],"119":[22,22],"120":[13,26],"121":[4,9],"122":[3,2],"123":[9,0],"124":[7,5],"125":[25,23],"126":[2,23],"127":[2,0],"128":[1,3],"129":[4,1],"130":[6,17],"131":[6,0],"132":[1,5],"133":[1,4],"134":[1,0],"135":[1,1],"136":[9,8],"137":[17,9],"138":[4,5],"139":[3,5],"140":[2,2],"141":[5,0],"142":[4,1],"143":[0,24],"144":[1,23],"145":[24,23],"146":[23,0],"147":[23,23,23,23],"148":[0,0],"149":[3,29],"150":[32,32,3],"151":[19,10],"152":[29,29],"153":[9,1],"154":[1,18],"155":[19,19,1],"156":[17,1],"157":[1,1],"158":[7,42],"159":[49,49,7],"160":[41,1],"161":[5,22],"162":[27,27,5],"163":[21,1],"164":[37,60],"165":[97,97,37],"166":[59,1],"167":[1,0],"168":[9,34],"169":[43,43,9],"170":[33,1],"171":[18,5],"172":[23,23],"173":[5,0],"174":[5,5,5],"175":[1,5],"176":[6,6,1],"177":[5,0],"178":[2,2],"179":[2,6],"180":[8,8,2],"181":[6,0],"182":[0,0],"183":[0,0],"184":[16,0],"185":[14,2],"186":[14,1],"187":[1,13],"188":[14,13,13,13],"189":[1,1],"190":[1,1],"191":[1,1]},"f":{"1":1,"2":1,"3":216,"4":0,"5":96,"6":73,"7":32,"8":3,"9":16,"10":3,"11":4,"12":13,"13":5709,"14":141,"15":1976,"16":1903,"17":47,"18":50,"19":10,"20":26,"21":280,"22":403,"23":280,"24":228,"25":48,"26":14,"27":2,"28":70,"29":69,"30":192,"31":210,"32":121,"33":48,"34":64,"35":28,"36":65,"37":1,"38":1,"39":13,"40":13,"41":23,"42":19,"43":0,"44":115,"45":24,"46":32,"47":19,"48":1,"49":2,"50":1,"51":2,"52":2,"53":49,"54":2,"55":1,"56":1,"57":27,"58":1,"59":2,"60":97,"61":1,"62":2,"63":1,"64":0,"65":3,"66":1,"67":43,"68":3,"69":2,"70":1,"71":2,"72":23,"73":6,"74":2,"75":2,"76":4,"77":8,"78":1,"79":2,"80":16,"81":14,"82":3,"83":2,"84":2,"85":2,"86":1},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":26}}},"2":{"name":"(anonymous_2)","line":13,"loc":{"start":{"line":13,"column":8},"end":{"line":13,"column":18}}},"3":{"name":"isArray","line":36,"loc":{"start":{"line":36,"column":2},"end":{"line":36,"column":24}}},"4":{"name":"warn","line":43,"loc":{"start":{"line":43,"column":2},"end":{"line":43,"column":18}}},"5":{"name":"extend","line":54,"loc":{"start":{"line":54,"column":2},"end":{"line":54,"column":39}}},"6":{"name":"calculateBounds","line":66,"loc":{"start":{"line":66,"column":2},"end":{"line":66,"column":37}}},"7":{"name":"calculateBoundsFromNestedArrays","line":117,"loc":{"start":{"line":117,"column":2},"end":{"line":117,"column":51}}},"8":{"name":"calculateBoundsFromNestedArrayOfArrays","line":166,"loc":{"start":{"line":166,"column":2},"end":{"line":166,"column":58}}},"9":{"name":"calculateBoundsFromArray","line":216,"loc":{"start":{"line":216,"column":2},"end":{"line":216,"column":44}}},"10":{"name":"calculateBoundsForFeatureCollection","line":255,"loc":{"start":{"line":255,"column":2},"end":{"line":255,"column":65}}},"11":{"name":"calculateBoundsForGeometryCollection","line":269,"loc":{"start":{"line":269,"column":2},"end":{"line":269,"column":67}}},"12":{"name":"calculateEnvelope","line":281,"loc":{"start":{"line":281,"column":2},"end":{"line":281,"column":37}}},"13":{"name":"radToDeg","line":294,"loc":{"start":{"line":294,"column":2},"end":{"line":294,"column":25}}},"14":{"name":"degToRad","line":301,"loc":{"start":{"line":301,"column":2},"end":{"line":301,"column":25}}},"15":{"name":"eachPosition","line":308,"loc":{"start":{"line":308,"column":2},"end":{"line":308,"column":43}}},"16":{"name":"positionToGeographic","line":325,"loc":{"start":{"line":325,"column":2},"end":{"line":325,"column":42}}},"17":{"name":"positionToMercator","line":334,"loc":{"start":{"line":334,"column":2},"end":{"line":334,"column":40}}},"18":{"name":"applyConverter","line":343,"loc":{"start":{"line":343,"column":2},"end":{"line":343,"column":52}}},"19":{"name":"toMercator","line":376,"loc":{"start":{"line":376,"column":2},"end":{"line":376,"column":31}}},"20":{"name":"toGeographic","line":383,"loc":{"start":{"line":383,"column":2},"end":{"line":383,"column":33}}},"21":{"name":"cmp","line":391,"loc":{"start":{"line":391,"column":2},"end":{"line":391,"column":21}}},"22":{"name":"compSort","line":404,"loc":{"start":{"line":404,"column":2},"end":{"line":404,"column":28}}},"23":{"name":"turn","line":422,"loc":{"start":{"line":422,"column":2},"end":{"line":422,"column":25}}},"24":{"name":"euclideanDistance","line":430,"loc":{"start":{"line":430,"column":2},"end":{"line":430,"column":35}}},"25":{"name":"nextHullPoint","line":438,"loc":{"start":{"line":438,"column":2},"end":{"line":438,"column":36}}},"26":{"name":"convexHull","line":450,"loc":{"start":{"line":450,"column":2},"end":{"line":450,"column":30}}},"27":{"name":"isConvex","line":474,"loc":{"start":{"line":474,"column":2},"end":{"line":474,"column":28}}},"28":{"name":"coordinatesContainPoint","line":502,"loc":{"start":{"line":502,"column":2},"end":{"line":502,"column":55}}},"29":{"name":"polygonContainsPoint","line":514,"loc":{"start":{"line":514,"column":2},"end":{"line":514,"column":48}}},"30":{"name":"edgeIntersectsEdge","line":536,"loc":{"start":{"line":536,"column":2},"end":{"line":536,"column":46}}},"31":{"name":"isNumber","line":553,"loc":{"start":{"line":553,"column":2},"end":{"line":553,"column":23}}},"32":{"name":"arraysIntersectArrays","line":557,"loc":{"start":{"line":557,"column":2},"end":{"line":557,"column":39}}},"33":{"name":"closedPolygon","line":587,"loc":{"start":{"line":587,"column":2},"end":{"line":587,"column":38}}},"34":{"name":"pointsEqual","line":602,"loc":{"start":{"line":602,"column":2},"end":{"line":602,"column":29}}},"35":{"name":"coordinatesEqual","line":613,"loc":{"start":{"line":613,"column":2},"end":{"line":613,"column":34}}},"36":{"name":"Primitive","line":643,"loc":{"start":{"line":643,"column":2},"end":{"line":643,"column":29}}},"37":{"name":"(anonymous_37)","line":679,"loc":{"start":{"line":679,"column":35},"end":{"line":679,"column":45}}},"38":{"name":"(anonymous_38)","line":683,"loc":{"start":{"line":683,"column":37},"end":{"line":683,"column":47}}},"39":{"name":"(anonymous_39)","line":687,"loc":{"start":{"line":687,"column":33},"end":{"line":687,"column":43}}},"40":{"name":"(anonymous_40)","line":691,"loc":{"start":{"line":691,"column":29},"end":{"line":691,"column":39}}},"41":{"name":"(anonymous_41)","line":695,"loc":{"start":{"line":695,"column":35},"end":{"line":695,"column":45}}},"42":{"name":"(anonymous_42)","line":740,"loc":{"start":{"line":740,"column":31},"end":{"line":740,"column":41}}},"43":{"name":"(anonymous_43)","line":751,"loc":{"start":{"line":751,"column":33},"end":{"line":751,"column":52}}},"44":{"name":"(anonymous_44)","line":755,"loc":{"start":{"line":755,"column":31},"end":{"line":755,"column":51}}},"45":{"name":"(anonymous_45)","line":945,"loc":{"start":{"line":945,"column":35},"end":{"line":945,"column":55}}},"46":{"name":"Point","line":982,"loc":{"start":{"line":982,"column":2},"end":{"line":982,"column":23}}},"47":{"name":"MultiPoint","line":1010,"loc":{"start":{"line":1010,"column":2},"end":{"line":1010,"column":28}}},"48":{"name":"(anonymous_48)","line":1024,"loc":{"start":{"line":1024,"column":33},"end":{"line":1024,"column":47}}},"49":{"name":"(anonymous_49)","line":1030,"loc":{"start":{"line":1030,"column":34},"end":{"line":1030,"column":49}}},"50":{"name":"(anonymous_50)","line":1034,"loc":{"start":{"line":1034,"column":37},"end":{"line":1034,"column":59}}},"51":{"name":"(anonymous_51)","line":1038,"loc":{"start":{"line":1038,"column":37},"end":{"line":1038,"column":53}}},"52":{"name":"(anonymous_52)","line":1046,"loc":{"start":{"line":1046,"column":29},"end":{"line":1046,"column":40}}},"53":{"name":"LineString","line":1059,"loc":{"start":{"line":1059,"column":2},"end":{"line":1059,"column":28}}},"54":{"name":"(anonymous_54)","line":1073,"loc":{"start":{"line":1073,"column":35},"end":{"line":1073,"column":50}}},"55":{"name":"(anonymous_55)","line":1077,"loc":{"start":{"line":1077,"column":38},"end":{"line":1077,"column":60}}},"56":{"name":"(anonymous_56)","line":1081,"loc":{"start":{"line":1081,"column":38},"end":{"line":1081,"column":54}}},"57":{"name":"MultiLineString","line":1095,"loc":{"start":{"line":1095,"column":2},"end":{"line":1095,"column":33}}},"58":{"name":"(anonymous_58)","line":1109,"loc":{"start":{"line":1109,"column":38},"end":{"line":1109,"column":52}}},"59":{"name":"(anonymous_59)","line":1114,"loc":{"start":{"line":1114,"column":34},"end":{"line":1114,"column":45}}},"60":{"name":"Polygon","line":1127,"loc":{"start":{"line":1127,"column":2},"end":{"line":1127,"column":25}}},"61":{"name":"(anonymous_61)","line":1141,"loc":{"start":{"line":1141,"column":32},"end":{"line":1141,"column":47}}},"62":{"name":"(anonymous_62)","line":1145,"loc":{"start":{"line":1145,"column":35},"end":{"line":1145,"column":57}}},"63":{"name":"(anonymous_63)","line":1149,"loc":{"start":{"line":1149,"column":35},"end":{"line":1149,"column":51}}},"64":{"name":"(anonymous_64)","line":1153,"loc":{"start":{"line":1153,"column":28},"end":{"line":1153,"column":39}}},"65":{"name":"(anonymous_65)","line":1156,"loc":{"start":{"line":1156,"column":31},"end":{"line":1156,"column":42}}},"66":{"name":"(anonymous_66)","line":1159,"loc":{"start":{"line":1159,"column":28},"end":{"line":1159,"column":39}}},"67":{"name":"MultiPolygon","line":1178,"loc":{"start":{"line":1178,"column":2},"end":{"line":1178,"column":30}}},"68":{"name":"(anonymous_68)","line":1192,"loc":{"start":{"line":1192,"column":35},"end":{"line":1192,"column":49}}},"69":{"name":"(anonymous_69)","line":1197,"loc":{"start":{"line":1197,"column":31},"end":{"line":1197,"column":42}}},"70":{"name":"(anonymous_70)","line":1200,"loc":{"start":{"line":1200,"column":33},"end":{"line":1200,"column":43}}},"71":{"name":"(anonymous_71)","line":1202,"loc":{"start":{"line":1202,"column":17},"end":{"line":1202,"column":34}}},"72":{"name":"Feature","line":1224,"loc":{"start":{"line":1224,"column":2},"end":{"line":1224,"column":25}}},"73":{"name":"FeatureCollection","line":1248,"loc":{"start":{"line":1248,"column":2},"end":{"line":1248,"column":35}}},"74":{"name":"(anonymous_74)","line":1262,"loc":{"start":{"line":1262,"column":40},"end":{"line":1262,"column":54}}},"75":{"name":"(anonymous_75)","line":1267,"loc":{"start":{"line":1267,"column":36},"end":{"line":1267,"column":48}}},"76":{"name":"(anonymous_76)","line":1269,"loc":{"start":{"line":1269,"column":17},"end":{"line":1269,"column":34}}},"77":{"name":"GeometryCollection","line":1286,"loc":{"start":{"line":1286,"column":2},"end":{"line":1286,"column":36}}},"78":{"name":"(anonymous_78)","line":1303,"loc":{"start":{"line":1303,"column":41},"end":{"line":1303,"column":55}}},"79":{"name":"(anonymous_79)","line":1308,"loc":{"start":{"line":1308,"column":37},"end":{"line":1308,"column":48}}},"80":{"name":"createCircle","line":1312,"loc":{"start":{"line":1312,"column":2},"end":{"line":1312,"column":52}}},"81":{"name":"Circle","line":1328,"loc":{"start":{"line":1328,"column":2},"end":{"line":1328,"column":48}}},"82":{"name":"(anonymous_82)","line":1349,"loc":{"start":{"line":1349,"column":33},"end":{"line":1349,"column":43}}},"83":{"name":"(anonymous_83)","line":1353,"loc":{"start":{"line":1353,"column":28},"end":{"line":1353,"column":49}}},"84":{"name":"(anonymous_84)","line":1360,"loc":{"start":{"line":1360,"column":28},"end":{"line":1360,"column":44}}},"85":{"name":"(anonymous_85)","line":1367,"loc":{"start":{"line":1367,"column":27},"end":{"line":1367,"column":42}}},"86":{"name":"(anonymous_86)","line":1375,"loc":{"start":{"line":1375,"column":28},"end":{"line":1375,"column":39}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1418,"column":4}},"2":{"start":{"line":4,"column":2},"end":{"line":6,"column":3}},"3":{"start":{"line":5,"column":4},"end":{"line":5,"column":41}},"4":{"start":{"line":9,"column":2},"end":{"line":11,"column":3}},"5":{"start":{"line":10,"column":4},"end":{"line":10,"column":33}},"6":{"start":{"line":14,"column":2},"end":{"line":31,"column":8}},"7":{"start":{"line":36,"column":2},"end":{"line":38,"column":3}},"8":{"start":{"line":37,"column":4},"end":{"line":37,"column":68}},"9":{"start":{"line":43,"column":2},"end":{"line":49,"column":3}},"10":{"start":{"line":44,"column":4},"end":{"line":44,"column":54}},"11":{"start":{"line":46,"column":4},"end":{"line":48,"column":5}},"12":{"start":{"line":47,"column":6},"end":{"line":47,"column":40}},"13":{"start":{"line":54,"column":2},"end":{"line":61,"column":3}},"14":{"start":{"line":55,"column":4},"end":{"line":59,"column":5}},"15":{"start":{"line":56,"column":6},"end":{"line":58,"column":7}},"16":{"start":{"line":57,"column":8},"end":{"line":57,"column":35}},"17":{"start":{"line":60,"column":4},"end":{"line":60,"column":23}},"18":{"start":{"line":66,"column":2},"end":{"line":101,"column":3}},"19":{"start":{"line":67,"column":4},"end":{"line":99,"column":5}},"20":{"start":{"line":68,"column":6},"end":{"line":98,"column":7}},"21":{"start":{"line":70,"column":10},"end":{"line":70,"column":115}},"22":{"start":{"line":73,"column":10},"end":{"line":73,"column":63}},"23":{"start":{"line":76,"column":10},"end":{"line":76,"column":63}},"24":{"start":{"line":79,"column":10},"end":{"line":79,"column":70}},"25":{"start":{"line":82,"column":10},"end":{"line":82,"column":70}},"26":{"start":{"line":85,"column":10},"end":{"line":85,"column":77}},"27":{"start":{"line":88,"column":10},"end":{"line":88,"column":76}},"28":{"start":{"line":91,"column":10},"end":{"line":91,"column":62}},"29":{"start":{"line":94,"column":10},"end":{"line":94,"column":63}},"30":{"start":{"line":97,"column":10},"end":{"line":97,"column":59}},"31":{"start":{"line":100,"column":4},"end":{"line":100,"column":16}},"32":{"start":{"line":117,"column":2},"end":{"line":156,"column":3}},"33":{"start":{"line":118,"column":4},"end":{"line":118,"column":51}},"34":{"start":{"line":120,"column":4},"end":{"line":153,"column":5}},"35":{"start":{"line":121,"column":6},"end":{"line":121,"column":27}},"36":{"start":{"line":123,"column":6},"end":{"line":152,"column":7}},"37":{"start":{"line":124,"column":8},"end":{"line":124,"column":30}},"38":{"start":{"line":126,"column":8},"end":{"line":126,"column":28}},"39":{"start":{"line":127,"column":8},"end":{"line":127,"column":28}},"40":{"start":{"line":129,"column":8},"end":{"line":133,"column":9}},"41":{"start":{"line":130,"column":10},"end":{"line":130,"column":19}},"42":{"start":{"line":131,"column":15},"end":{"line":133,"column":9}},"43":{"start":{"line":132,"column":10},"end":{"line":132,"column":19}},"44":{"start":{"line":135,"column":8},"end":{"line":139,"column":9}},"45":{"start":{"line":136,"column":10},"end":{"line":136,"column":19}},"46":{"start":{"line":137,"column":15},"end":{"line":139,"column":9}},"47":{"start":{"line":138,"column":10},"end":{"line":138,"column":19}},"48":{"start":{"line":141,"column":8},"end":{"line":145,"column":9}},"49":{"start":{"line":142,"column":10},"end":{"line":142,"column":19}},"50":{"start":{"line":143,"column":15},"end":{"line":145,"column":9}},"51":{"start":{"line":144,"column":10},"end":{"line":144,"column":19}},"52":{"start":{"line":147,"column":8},"end":{"line":151,"column":9}},"53":{"start":{"line":148,"column":10},"end":{"line":148,"column":19}},"54":{"start":{"line":149,"column":15},"end":{"line":151,"column":9}},"55":{"start":{"line":150,"column":10},"end":{"line":150,"column":19}},"56":{"start":{"line":155,"column":4},"end":{"line":155,"column":29}},"57":{"start":{"line":166,"column":2},"end":{"line":208,"column":3}},"58":{"start":{"line":167,"column":4},"end":{"line":167,"column":51}},"59":{"start":{"line":169,"column":4},"end":{"line":205,"column":5}},"60":{"start":{"line":170,"column":6},"end":{"line":170,"column":27}},"61":{"start":{"line":172,"column":6},"end":{"line":204,"column":7}},"62":{"start":{"line":173,"column":8},"end":{"line":173,"column":34}},"63":{"start":{"line":174,"column":8},"end":{"line":203,"column":9}},"64":{"start":{"line":175,"column":10},"end":{"line":175,"column":37}},"65":{"start":{"line":177,"column":10},"end":{"line":177,"column":30}},"66":{"start":{"line":178,"column":10},"end":{"line":178,"column":30}},"67":{"start":{"line":180,"column":10},"end":{"line":184,"column":11}},"68":{"start":{"line":181,"column":12},"end":{"line":181,"column":21}},"69":{"start":{"line":182,"column":17},"end":{"line":184,"column":11}},"70":{"start":{"line":183,"column":12},"end":{"line":183,"column":21}},"71":{"start":{"line":186,"column":10},"end":{"line":190,"column":11}},"72":{"start":{"line":187,"column":12},"end":{"line":187,"column":21}},"73":{"start":{"line":188,"column":17},"end":{"line":190,"column":11}},"74":{"start":{"line":189,"column":12},"end":{"line":189,"column":21}},"75":{"start":{"line":192,"column":10},"end":{"line":196,"column":11}},"76":{"start":{"line":193,"column":12},"end":{"line":193,"column":21}},"77":{"start":{"line":194,"column":17},"end":{"line":196,"column":11}},"78":{"start":{"line":195,"column":12},"end":{"line":195,"column":21}},"79":{"start":{"line":198,"column":10},"end":{"line":202,"column":11}},"80":{"start":{"line":199,"column":12},"end":{"line":199,"column":21}},"81":{"start":{"line":200,"column":17},"end":{"line":202,"column":11}},"82":{"start":{"line":201,"column":12},"end":{"line":201,"column":21}},"83":{"start":{"line":207,"column":4},"end":{"line":207,"column":28}},"84":{"start":{"line":216,"column":2},"end":{"line":250,"column":3}},"85":{"start":{"line":217,"column":4},"end":{"line":217,"column":51}},"86":{"start":{"line":219,"column":4},"end":{"line":247,"column":5}},"87":{"start":{"line":220,"column":6},"end":{"line":220,"column":28}},"88":{"start":{"line":221,"column":6},"end":{"line":221,"column":26}},"89":{"start":{"line":222,"column":6},"end":{"line":222,"column":26}},"90":{"start":{"line":224,"column":6},"end":{"line":228,"column":7}},"91":{"start":{"line":225,"column":8},"end":{"line":225,"column":17}},"92":{"start":{"line":226,"column":13},"end":{"line":228,"column":7}},"93":{"start":{"line":227,"column":8},"end":{"line":227,"column":17}},"94":{"start":{"line":230,"column":6},"end":{"line":234,"column":7}},"95":{"start":{"line":231,"column":8},"end":{"line":231,"column":17}},"96":{"start":{"line":232,"column":13},"end":{"line":234,"column":7}},"97":{"start":{"line":233,"column":8},"end":{"line":233,"column":17}},"98":{"start":{"line":236,"column":6},"end":{"line":240,"column":7}},"99":{"start":{"line":237,"column":8},"end":{"line":237,"column":17}},"100":{"start":{"line":238,"column":13},"end":{"line":240,"column":7}},"101":{"start":{"line":239,"column":8},"end":{"line":239,"column":17}},"102":{"start":{"line":242,"column":6},"end":{"line":246,"column":7}},"103":{"start":{"line":243,"column":8},"end":{"line":243,"column":17}},"104":{"start":{"line":244,"column":13},"end":{"line":246,"column":7}},"105":{"start":{"line":245,"column":8},"end":{"line":245,"column":17}},"106":{"start":{"line":249,"column":4},"end":{"line":249,"column":29}},"107":{"start":{"line":255,"column":2},"end":{"line":264,"column":3}},"108":{"start":{"line":256,"column":4},"end":{"line":256,"column":29}},"109":{"start":{"line":257,"column":4},"end":{"line":261,"column":5}},"110":{"start":{"line":258,"column":6},"end":{"line":258,"column":71}},"111":{"start":{"line":259,"column":6},"end":{"line":259,"column":42}},"112":{"start":{"line":260,"column":6},"end":{"line":260,"column":42}},"113":{"start":{"line":263,"column":4},"end":{"line":263,"column":45}},"114":{"start":{"line":269,"column":2},"end":{"line":279,"column":3}},"115":{"start":{"line":270,"column":4},"end":{"line":270,"column":29}},"116":{"start":{"line":272,"column":4},"end":{"line":276,"column":5}},"117":{"start":{"line":273,"column":6},"end":{"line":273,"column":65}},"118":{"start":{"line":274,"column":6},"end":{"line":274,"column":42}},"119":{"start":{"line":275,"column":6},"end":{"line":275,"column":42}},"120":{"start":{"line":278,"column":4},"end":{"line":278,"column":45}},"121":{"start":{"line":281,"column":2},"end":{"line":289,"column":3}},"122":{"start":{"line":282,"column":4},"end":{"line":282,"column":42}},"123":{"start":{"line":283,"column":4},"end":{"line":288,"column":6}},"124":{"start":{"line":294,"column":2},"end":{"line":296,"column":3}},"125":{"start":{"line":295,"column":4},"end":{"line":295,"column":34}},"126":{"start":{"line":301,"column":2},"end":{"line":303,"column":3}},"127":{"start":{"line":302,"column":4},"end":{"line":302,"column":34}},"128":{"start":{"line":308,"column":2},"end":{"line":320,"column":3}},"129":{"start":{"line":309,"column":4},"end":{"line":318,"column":5}},"130":{"start":{"line":311,"column":6},"end":{"line":313,"column":7}},"131":{"start":{"line":312,"column":8},"end":{"line":312,"column":46}},"132":{"start":{"line":315,"column":6},"end":{"line":317,"column":7}},"133":{"start":{"line":316,"column":8},"end":{"line":316,"column":60}},"134":{"start":{"line":319,"column":4},"end":{"line":319,"column":23}},"135":{"start":{"line":325,"column":2},"end":{"line":329,"column":3}},"136":{"start":{"line":326,"column":4},"end":{"line":326,"column":24}},"137":{"start":{"line":327,"column":4},"end":{"line":327,"column":24}},"138":{"start":{"line":328,"column":4},"end":{"line":328,"column":178}},"139":{"start":{"line":334,"column":2},"end":{"line":338,"column":3}},"140":{"start":{"line":335,"column":4},"end":{"line":335,"column":26}},"141":{"start":{"line":336,"column":4},"end":{"line":336,"column":67}},"142":{"start":{"line":337,"column":4},"end":{"line":337,"column":138}},"143":{"start":{"line":343,"column":2},"end":{"line":371,"column":3}},"144":{"start":{"line":344,"column":4},"end":{"line":358,"column":5}},"145":{"start":{"line":345,"column":6},"end":{"line":345,"column":59}},"146":{"start":{"line":346,"column":11},"end":{"line":358,"column":5}},"147":{"start":{"line":347,"column":6},"end":{"line":347,"column":75}},"148":{"start":{"line":348,"column":11},"end":{"line":358,"column":5}},"149":{"start":{"line":349,"column":6},"end":{"line":351,"column":7}},"150":{"start":{"line":350,"column":8},"end":{"line":350,"column":83}},"151":{"start":{"line":352,"column":11},"end":{"line":358,"column":5}},"152":{"start":{"line":353,"column":6},"end":{"line":355,"column":7}},"153":{"start":{"line":354,"column":8},"end":{"line":354,"column":87}},"154":{"start":{"line":357,"column":6},"end":{"line":357,"column":73}},"155":{"start":{"line":360,"column":4},"end":{"line":364,"column":5}},"156":{"start":{"line":361,"column":6},"end":{"line":363,"column":7}},"157":{"start":{"line":362,"column":8},"end":{"line":362,"column":34}},"158":{"start":{"line":366,"column":4},"end":{"line":368,"column":5}},"159":{"start":{"line":367,"column":6},"end":{"line":367,"column":25}},"160":{"start":{"line":370,"column":4},"end":{"line":370,"column":19}},"161":{"start":{"line":376,"column":2},"end":{"line":378,"column":3}},"162":{"start":{"line":377,"column":4},"end":{"line":377,"column":55}},"163":{"start":{"line":383,"column":2},"end":{"line":385,"column":3}},"164":{"start":{"line":384,"column":4},"end":{"line":384,"column":57}},"165":{"start":{"line":391,"column":2},"end":{"line":399,"column":3}},"166":{"start":{"line":392,"column":4},"end":{"line":398,"column":5}},"167":{"start":{"line":393,"column":6},"end":{"line":393,"column":16}},"168":{"start":{"line":394,"column":11},"end":{"line":398,"column":5}},"169":{"start":{"line":395,"column":6},"end":{"line":395,"column":15}},"170":{"start":{"line":397,"column":6},"end":{"line":397,"column":15}},"171":{"start":{"line":404,"column":2},"end":{"line":416,"column":3}},"172":{"start":{"line":405,"column":4},"end":{"line":415,"column":5}},"173":{"start":{"line":406,"column":6},"end":{"line":406,"column":16}},"174":{"start":{"line":407,"column":11},"end":{"line":415,"column":5}},"175":{"start":{"line":408,"column":6},"end":{"line":408,"column":15}},"176":{"start":{"line":409,"column":11},"end":{"line":415,"column":5}},"177":{"start":{"line":410,"column":6},"end":{"line":410,"column":16}},"178":{"start":{"line":411,"column":11},"end":{"line":415,"column":5}},"179":{"start":{"line":412,"column":6},"end":{"line":412,"column":15}},"180":{"start":{"line":414,"column":6},"end":{"line":414,"column":15}},"181":{"start":{"line":422,"column":2},"end":{"line":425,"column":3}},"182":{"start":{"line":424,"column":4},"end":{"line":424,"column":81}},"183":{"start":{"line":430,"column":2},"end":{"line":436,"column":3}},"184":{"start":{"line":432,"column":4},"end":{"line":432,"column":25}},"185":{"start":{"line":433,"column":4},"end":{"line":433,"column":25}},"186":{"start":{"line":435,"column":4},"end":{"line":435,"column":29}},"187":{"start":{"line":438,"column":2},"end":{"line":448,"column":3}},"188":{"start":{"line":440,"column":4},"end":{"line":440,"column":14}},"189":{"start":{"line":441,"column":4},"end":{"line":446,"column":5}},"190":{"start":{"line":442,"column":6},"end":{"line":442,"column":36}},"191":{"start":{"line":443,"column":6},"end":{"line":445,"column":7}},"192":{"start":{"line":444,"column":8},"end":{"line":444,"column":22}},"193":{"start":{"line":447,"column":4},"end":{"line":447,"column":13}},"194":{"start":{"line":450,"column":2},"end":{"line":472,"column":3}},"195":{"start":{"line":454,"column":4},"end":{"line":458,"column":5}},"196":{"start":{"line":455,"column":6},"end":{"line":455,"column":16}},"197":{"start":{"line":456,"column":11},"end":{"line":458,"column":5}},"198":{"start":{"line":457,"column":6},"end":{"line":457,"column":20}},"199":{"start":{"line":461,"column":4},"end":{"line":461,"column":42}},"200":{"start":{"line":463,"column":4},"end":{"line":469,"column":5}},"201":{"start":{"line":464,"column":6},"end":{"line":464,"column":45}},"202":{"start":{"line":466,"column":6},"end":{"line":468,"column":7}},"203":{"start":{"line":467,"column":8},"end":{"line":467,"column":21}},"204":{"start":{"line":471,"column":4},"end":{"line":471,"column":16}},"205":{"start":{"line":474,"column":2},"end":{"line":500,"column":3}},"206":{"start":{"line":475,"column":4},"end":{"line":475,"column":12}},"207":{"start":{"line":477,"column":4},"end":{"line":497,"column":5}},"208":{"start":{"line":478,"column":6},"end":{"line":478,"column":25}},"209":{"start":{"line":479,"column":6},"end":{"line":479,"column":29}},"210":{"start":{"line":480,"column":6},"end":{"line":480,"column":29}},"211":{"start":{"line":481,"column":6},"end":{"line":481,"column":45}},"212":{"start":{"line":484,"column":6},"end":{"line":484,"column":74}},"213":{"start":{"line":486,"column":6},"end":{"line":496,"column":7}},"214":{"start":{"line":487,"column":8},"end":{"line":491,"column":9}},"215":{"start":{"line":488,"column":10},"end":{"line":488,"column":21}},"216":{"start":{"line":490,"column":10},"end":{"line":490,"column":22}},"217":{"start":{"line":493,"column":8},"end":{"line":495,"column":9}},"218":{"start":{"line":494,"column":10},"end":{"line":494,"column":23}},"219":{"start":{"line":499,"column":4},"end":{"line":499,"column":16}},"220":{"start":{"line":502,"column":2},"end":{"line":512,"column":3}},"221":{"start":{"line":503,"column":4},"end":{"line":503,"column":25}},"222":{"start":{"line":504,"column":4},"end":{"line":510,"column":5}},"223":{"start":{"line":505,"column":6},"end":{"line":509,"column":7}},"224":{"start":{"line":508,"column":8},"end":{"line":508,"column":29}},"225":{"start":{"line":511,"column":4},"end":{"line":511,"column":20}},"226":{"start":{"line":514,"column":2},"end":{"line":534,"column":3}},"227":{"start":{"line":515,"column":4},"end":{"line":533,"column":5}},"228":{"start":{"line":516,"column":6},"end":{"line":530,"column":7}},"229":{"start":{"line":517,"column":8},"end":{"line":517,"column":58}},"230":{"start":{"line":519,"column":8},"end":{"line":529,"column":9}},"231":{"start":{"line":520,"column":10},"end":{"line":524,"column":11}},"232":{"start":{"line":521,"column":12},"end":{"line":523,"column":13}},"233":{"start":{"line":522,"column":14},"end":{"line":522,"column":27}},"234":{"start":{"line":526,"column":10},"end":{"line":526,"column":22}},"235":{"start":{"line":528,"column":10},"end":{"line":528,"column":23}},"236":{"start":{"line":532,"column":6},"end":{"line":532,"column":19}},"237":{"start":{"line":536,"column":2},"end":{"line":551,"column":3}},"238":{"start":{"line":537,"column":4},"end":{"line":537,"column":85}},"239":{"start":{"line":538,"column":4},"end":{"line":538,"column":85}},"240":{"start":{"line":539,"column":4},"end":{"line":539,"column":85}},"241":{"start":{"line":541,"column":4},"end":{"line":548,"column":5}},"242":{"start":{"line":542,"column":6},"end":{"line":542,"column":26}},"243":{"start":{"line":543,"column":6},"end":{"line":543,"column":26}},"244":{"start":{"line":545,"column":6},"end":{"line":547,"column":7}},"245":{"start":{"line":546,"column":8},"end":{"line":546,"column":20}},"246":{"start":{"line":550,"column":4},"end":{"line":550,"column":17}},"247":{"start":{"line":553,"column":2},"end":{"line":555,"column":3}},"248":{"start":{"line":554,"column":4},"end":{"line":554,"column":48}},"249":{"start":{"line":557,"column":2},"end":{"line":582,"column":3}},"250":{"start":{"line":558,"column":4},"end":{"line":580,"column":5}},"251":{"start":{"line":559,"column":6},"end":{"line":573,"column":7}},"252":{"start":{"line":560,"column":8},"end":{"line":566,"column":9}},"253":{"start":{"line":561,"column":10},"end":{"line":565,"column":11}},"254":{"start":{"line":562,"column":12},"end":{"line":564,"column":13}},"255":{"start":{"line":563,"column":14},"end":{"line":563,"column":26}},"256":{"start":{"line":568,"column":8},"end":{"line":572,"column":9}},"257":{"start":{"line":569,"column":10},"end":{"line":571,"column":11}},"258":{"start":{"line":570,"column":12},"end":{"line":570,"column":24}},"259":{"start":{"line":575,"column":6},"end":{"line":579,"column":7}},"260":{"start":{"line":576,"column":8},"end":{"line":578,"column":9}},"261":{"start":{"line":577,"column":10},"end":{"line":577,"column":22}},"262":{"start":{"line":581,"column":4},"end":{"line":581,"column":17}},"263":{"start":{"line":587,"column":2},"end":{"line":600,"column":3}},"264":{"start":{"line":588,"column":4},"end":{"line":588,"column":20}},"265":{"start":{"line":590,"column":4},"end":{"line":597,"column":5}},"266":{"start":{"line":591,"column":6},"end":{"line":591,"column":41}},"267":{"start":{"line":592,"column":6},"end":{"line":594,"column":7}},"268":{"start":{"line":593,"column":8},"end":{"line":593,"column":29}},"269":{"start":{"line":596,"column":6},"end":{"line":596,"column":24}},"270":{"start":{"line":599,"column":4},"end":{"line":599,"column":17}},"271":{"start":{"line":602,"column":2},"end":{"line":611,"column":3}},"272":{"start":{"line":603,"column":4},"end":{"line":608,"column":5}},"273":{"start":{"line":605,"column":6},"end":{"line":607,"column":7}},"274":{"start":{"line":606,"column":8},"end":{"line":606,"column":21}},"275":{"start":{"line":610,"column":4},"end":{"line":610,"column":16}},"276":{"start":{"line":613,"column":2},"end":{"line":633,"column":3}},"277":{"start":{"line":614,"column":4},"end":{"line":616,"column":5}},"278":{"start":{"line":615,"column":6},"end":{"line":615,"column":19}},"279":{"start":{"line":618,"column":4},"end":{"line":618,"column":38}},"280":{"start":{"line":619,"column":4},"end":{"line":619,"column":38}},"281":{"start":{"line":621,"column":4},"end":{"line":630,"column":5}},"282":{"start":{"line":622,"column":6},"end":{"line":624,"column":7}},"283":{"start":{"line":623,"column":8},"end":{"line":623,"column":21}},"284":{"start":{"line":625,"column":6},"end":{"line":629,"column":7}},"285":{"start":{"line":626,"column":8},"end":{"line":628,"column":9}},"286":{"start":{"line":627,"column":10},"end":{"line":627,"column":23}},"287":{"start":{"line":632,"column":4},"end":{"line":632,"column":16}},"288":{"start":{"line":638,"column":2},"end":{"line":638,"column":35}},"289":{"start":{"line":643,"column":2},"end":{"line":677,"column":3}},"290":{"start":{"line":644,"column":4},"end":{"line":676,"column":5}},"291":{"start":{"line":645,"column":6},"end":{"line":675,"column":7}},"292":{"start":{"line":647,"column":8},"end":{"line":647,"column":34}},"293":{"start":{"line":650,"column":8},"end":{"line":650,"column":39}},"294":{"start":{"line":653,"column":8},"end":{"line":653,"column":39}},"295":{"start":{"line":656,"column":8},"end":{"line":656,"column":44}},"296":{"start":{"line":659,"column":8},"end":{"line":659,"column":36}},"297":{"start":{"line":662,"column":8},"end":{"line":662,"column":41}},"298":{"start":{"line":665,"column":8},"end":{"line":665,"column":36}},"299":{"start":{"line":668,"column":8},"end":{"line":668,"column":46}},"300":{"start":{"line":671,"column":8},"end":{"line":671,"column":47}},"301":{"start":{"line":674,"column":8},"end":{"line":674,"column":57}},"302":{"start":{"line":679,"column":2},"end":{"line":681,"column":4}},"303":{"start":{"line":680,"column":4},"end":{"line":680,"column":28}},"304":{"start":{"line":683,"column":2},"end":{"line":685,"column":4}},"305":{"start":{"line":684,"column":4},"end":{"line":684,"column":30}},"306":{"start":{"line":687,"column":2},"end":{"line":689,"column":4}},"307":{"start":{"line":688,"column":4},"end":{"line":688,"column":35}},"308":{"start":{"line":691,"column":2},"end":{"line":693,"column":4}},"309":{"start":{"line":692,"column":4},"end":{"line":692,"column":33}},"310":{"start":{"line":695,"column":2},"end":{"line":738,"column":4}},"311":{"start":{"line":696,"column":4},"end":{"line":696,"column":32}},"312":{"start":{"line":697,"column":4},"end":{"line":732,"column":5}},"313":{"start":{"line":698,"column":6},"end":{"line":698,"column":18}},"314":{"start":{"line":699,"column":11},"end":{"line":732,"column":5}},"315":{"start":{"line":700,"column":6},"end":{"line":704,"column":7}},"316":{"start":{"line":701,"column":8},"end":{"line":701,"column":39}},"317":{"start":{"line":703,"column":8},"end":{"line":703,"column":20}},"318":{"start":{"line":705,"column":11},"end":{"line":732,"column":5}},"319":{"start":{"line":706,"column":6},"end":{"line":715,"column":7}},"320":{"start":{"line":707,"column":8},"end":{"line":709,"column":9}},"321":{"start":{"line":708,"column":10},"end":{"line":708,"column":64}},"322":{"start":{"line":710,"column":8},"end":{"line":712,"column":9}},"323":{"start":{"line":711,"column":10},"end":{"line":711,"column":22}},"324":{"start":{"line":714,"column":8},"end":{"line":714,"column":20}},"325":{"start":{"line":716,"column":11},"end":{"line":732,"column":5}},"326":{"start":{"line":717,"column":6},"end":{"line":728,"column":7}},"327":{"start":{"line":718,"column":8},"end":{"line":722,"column":9}},"328":{"start":{"line":719,"column":10},"end":{"line":721,"column":11}},"329":{"start":{"line":720,"column":12},"end":{"line":720,"column":69}},"330":{"start":{"line":723,"column":8},"end":{"line":725,"column":9}},"331":{"start":{"line":724,"column":10},"end":{"line":724,"column":22}},"332":{"start":{"line":727,"column":8},"end":{"line":727,"column":20}},"333":{"start":{"line":729,"column":11},"end":{"line":732,"column":5}},"334":{"start":{"line":730,"column":6},"end":{"line":730,"column":51}},"335":{"start":{"line":731,"column":6},"end":{"line":731,"column":36}},"336":{"start":{"line":734,"column":4},"end":{"line":737,"column":7}},"337":{"start":{"line":740,"column":2},"end":{"line":749,"column":4}},"338":{"start":{"line":741,"column":4},"end":{"line":741,"column":17}},"339":{"start":{"line":742,"column":4},"end":{"line":746,"column":5}},"340":{"start":{"line":743,"column":6},"end":{"line":745,"column":7}},"341":{"start":{"line":744,"column":8},"end":{"line":744,"column":29}},"342":{"start":{"line":747,"column":4},"end":{"line":747,"column":37}},"343":{"start":{"line":748,"column":4},"end":{"line":748,"column":15}},"344":{"start":{"line":751,"column":2},"end":{"line":753,"column":4}},"345":{"start":{"line":752,"column":4},"end":{"line":752,"column":49}},"346":{"start":{"line":755,"column":2},"end":{"line":943,"column":4}},"347":{"start":{"line":756,"column":4},"end":{"line":756,"column":33}},"348":{"start":{"line":759,"column":4},"end":{"line":761,"column":5}},"349":{"start":{"line":760,"column":6},"end":{"line":760,"column":37}},"350":{"start":{"line":764,"column":4},"end":{"line":769,"column":5}},"351":{"start":{"line":765,"column":6},"end":{"line":768,"column":7}},"352":{"start":{"line":766,"column":8},"end":{"line":766,"column":68}},"353":{"start":{"line":772,"column":4},"end":{"line":782,"column":5}},"354":{"start":{"line":773,"column":6},"end":{"line":781,"column":7}},"355":{"start":{"line":774,"column":8},"end":{"line":780,"column":9}},"356":{"start":{"line":775,"column":10},"end":{"line":775,"column":89}},"357":{"start":{"line":777,"column":10},"end":{"line":779,"column":11}},"358":{"start":{"line":778,"column":12},"end":{"line":778,"column":24}},"359":{"start":{"line":785,"column":4},"end":{"line":797,"column":5}},"360":{"start":{"line":786,"column":6},"end":{"line":796,"column":7}},"361":{"start":{"line":787,"column":8},"end":{"line":795,"column":9}},"362":{"start":{"line":788,"column":10},"end":{"line":790,"column":11}},"363":{"start":{"line":789,"column":12},"end":{"line":789,"column":25}},"364":{"start":{"line":792,"column":10},"end":{"line":794,"column":11}},"365":{"start":{"line":793,"column":12},"end":{"line":793,"column":24}},"366":{"start":{"line":799,"column":4},"end":{"line":861,"column":5}},"367":{"start":{"line":801,"column":6},"end":{"line":859,"column":7}},"368":{"start":{"line":803,"column":8},"end":{"line":809,"column":9}},"369":{"start":{"line":804,"column":10},"end":{"line":808,"column":11}},"370":{"start":{"line":805,"column":12},"end":{"line":807,"column":13}},"371":{"start":{"line":806,"column":14},"end":{"line":806,"column":26}},"372":{"start":{"line":811,"column":8},"end":{"line":815,"column":9}},"373":{"start":{"line":812,"column":10},"end":{"line":812,"column":111}},"374":{"start":{"line":814,"column":10},"end":{"line":814,"column":23}},"375":{"start":{"line":818,"column":13},"end":{"line":859,"column":7}},"376":{"start":{"line":819,"column":8},"end":{"line":819,"column":77}},"377":{"start":{"line":822,"column":13},"end":{"line":859,"column":7}},"378":{"start":{"line":823,"column":8},"end":{"line":825,"column":9}},"379":{"start":{"line":824,"column":10},"end":{"line":824,"column":23}},"380":{"start":{"line":827,"column":8},"end":{"line":831,"column":9}},"381":{"start":{"line":828,"column":10},"end":{"line":830,"column":11}},"382":{"start":{"line":829,"column":12},"end":{"line":829,"column":25}},"383":{"start":{"line":833,"column":8},"end":{"line":833,"column":20}},"384":{"start":{"line":836,"column":13},"end":{"line":859,"column":7}},"385":{"start":{"line":837,"column":8},"end":{"line":844,"column":9}},"386":{"start":{"line":838,"column":10},"end":{"line":838,"column":55}},"387":{"start":{"line":840,"column":10},"end":{"line":843,"column":11}},"388":{"start":{"line":841,"column":12},"end":{"line":841,"column":23}},"389":{"start":{"line":842,"column":12},"end":{"line":842,"column":25}},"390":{"start":{"line":846,"column":8},"end":{"line":846,"column":20}},"391":{"start":{"line":849,"column":13},"end":{"line":859,"column":7}},"392":{"start":{"line":850,"column":8},"end":{"line":856,"column":9}},"393":{"start":{"line":851,"column":10},"end":{"line":851,"column":88}},"394":{"start":{"line":853,"column":10},"end":{"line":855,"column":11}},"395":{"start":{"line":854,"column":12},"end":{"line":854,"column":25}},"396":{"start":{"line":858,"column":8},"end":{"line":858,"column":20}},"397":{"start":{"line":863,"column":4},"end":{"line":939,"column":5}},"398":{"start":{"line":865,"column":6},"end":{"line":938,"column":7}},"399":{"start":{"line":866,"column":8},"end":{"line":873,"column":9}},"400":{"start":{"line":867,"column":10},"end":{"line":872,"column":11}},"401":{"start":{"line":868,"column":12},"end":{"line":868,"column":51}},"402":{"start":{"line":869,"column":12},"end":{"line":871,"column":13}},"403":{"start":{"line":870,"column":14},"end":{"line":870,"column":26}},"404":{"start":{"line":875,"column":8},"end":{"line":875,"column":21}},"405":{"start":{"line":877,"column":13},"end":{"line":938,"column":7}},"406":{"start":{"line":878,"column":8},"end":{"line":886,"column":9}},"407":{"start":{"line":879,"column":10},"end":{"line":885,"column":11}},"408":{"start":{"line":880,"column":12},"end":{"line":884,"column":13}},"409":{"start":{"line":881,"column":14},"end":{"line":883,"column":15}},"410":{"start":{"line":882,"column":16},"end":{"line":882,"column":28}},"411":{"start":{"line":888,"column":8},"end":{"line":901,"column":9}},"412":{"start":{"line":889,"column":10},"end":{"line":900,"column":11}},"413":{"start":{"line":890,"column":12},"end":{"line":897,"column":13}},"414":{"start":{"line":891,"column":14},"end":{"line":891,"column":53}},"415":{"start":{"line":892,"column":14},"end":{"line":896,"column":15}},"416":{"start":{"line":893,"column":16},"end":{"line":893,"column":33}},"417":{"start":{"line":895,"column":16},"end":{"line":895,"column":32}},"418":{"start":{"line":899,"column":12},"end":{"line":899,"column":28}},"419":{"start":{"line":904,"column":13},"end":{"line":938,"column":7}},"420":{"start":{"line":905,"column":8},"end":{"line":913,"column":9}},"421":{"start":{"line":906,"column":10},"end":{"line":906,"column":77}},"422":{"start":{"line":908,"column":10},"end":{"line":910,"column":11}},"423":{"start":{"line":909,"column":12},"end":{"line":909,"column":24}},"424":{"start":{"line":912,"column":10},"end":{"line":912,"column":23}},"425":{"start":{"line":916,"column":13},"end":{"line":938,"column":7}},"426":{"start":{"line":917,"column":8},"end":{"line":923,"column":9}},"427":{"start":{"line":918,"column":10},"end":{"line":918,"column":58}},"428":{"start":{"line":920,"column":10},"end":{"line":922,"column":11}},"429":{"start":{"line":921,"column":12},"end":{"line":921,"column":25}},"430":{"start":{"line":925,"column":8},"end":{"line":925,"column":20}},"431":{"start":{"line":928,"column":13},"end":{"line":938,"column":7}},"432":{"start":{"line":929,"column":8},"end":{"line":935,"column":9}},"433":{"start":{"line":930,"column":10},"end":{"line":930,"column":81}},"434":{"start":{"line":932,"column":10},"end":{"line":934,"column":11}},"435":{"start":{"line":933,"column":12},"end":{"line":933,"column":25}},"436":{"start":{"line":937,"column":8},"end":{"line":937,"column":20}},"437":{"start":{"line":942,"column":4},"end":{"line":942,"column":17}},"438":{"start":{"line":945,"column":2},"end":{"line":968,"column":4}},"439":{"start":{"line":947,"column":4},"end":{"line":949,"column":5}},"440":{"start":{"line":948,"column":6},"end":{"line":948,"column":37}},"441":{"start":{"line":951,"column":4},"end":{"line":951,"column":37}},"442":{"start":{"line":952,"column":4},"end":{"line":954,"column":5}},"443":{"start":{"line":953,"column":6},"end":{"line":953,"column":18}},"444":{"start":{"line":957,"column":4},"end":{"line":964,"column":5}},"445":{"start":{"line":959,"column":6},"end":{"line":959,"column":76}},"446":{"start":{"line":960,"column":11},"end":{"line":964,"column":5}},"447":{"start":{"line":962,"column":6},"end":{"line":962,"column":47}},"448":{"start":{"line":963,"column":6},"end":{"line":963,"column":41}},"449":{"start":{"line":966,"column":4},"end":{"line":966,"column":105}},"450":{"start":{"line":967,"column":4},"end":{"line":967,"column":17}},"451":{"start":{"line":982,"column":2},"end":{"line":996,"column":3}},"452":{"start":{"line":983,"column":4},"end":{"line":983,"column":53}},"453":{"start":{"line":985,"column":4},"end":{"line":993,"column":5}},"454":{"start":{"line":986,"column":6},"end":{"line":986,"column":26}},"455":{"start":{"line":987,"column":11},"end":{"line":993,"column":5}},"456":{"start":{"line":988,"column":6},"end":{"line":988,"column":31}},"457":{"start":{"line":989,"column":11},"end":{"line":993,"column":5}},"458":{"start":{"line":990,"column":6},"end":{"line":990,"column":30}},"459":{"start":{"line":992,"column":6},"end":{"line":992,"column":63}},"460":{"start":{"line":995,"column":4},"end":{"line":995,"column":24}},"461":{"start":{"line":998,"column":2},"end":{"line":998,"column":36}},"462":{"start":{"line":999,"column":2},"end":{"line":999,"column":38}},"463":{"start":{"line":1010,"column":2},"end":{"line":1020,"column":3}},"464":{"start":{"line":1011,"column":4},"end":{"line":1017,"column":5}},"465":{"start":{"line":1012,"column":6},"end":{"line":1012,"column":26}},"466":{"start":{"line":1013,"column":11},"end":{"line":1017,"column":5}},"467":{"start":{"line":1014,"column":6},"end":{"line":1014,"column":31}},"468":{"start":{"line":1016,"column":6},"end":{"line":1016,"column":68}},"469":{"start":{"line":1019,"column":4},"end":{"line":1019,"column":29}},"470":{"start":{"line":1022,"column":2},"end":{"line":1022,"column":41}},"471":{"start":{"line":1023,"column":2},"end":{"line":1023,"column":48}},"472":{"start":{"line":1024,"column":2},"end":{"line":1029,"column":4}},"473":{"start":{"line":1025,"column":4},"end":{"line":1027,"column":5}},"474":{"start":{"line":1026,"column":6},"end":{"line":1026,"column":67}},"475":{"start":{"line":1028,"column":4},"end":{"line":1028,"column":16}},"476":{"start":{"line":1030,"column":2},"end":{"line":1033,"column":4}},"477":{"start":{"line":1031,"column":4},"end":{"line":1031,"column":33}},"478":{"start":{"line":1032,"column":4},"end":{"line":1032,"column":16}},"479":{"start":{"line":1034,"column":2},"end":{"line":1037,"column":4}},"480":{"start":{"line":1035,"column":4},"end":{"line":1035,"column":45}},"481":{"start":{"line":1036,"column":4},"end":{"line":1036,"column":16}},"482":{"start":{"line":1038,"column":2},"end":{"line":1045,"column":4}},"483":{"start":{"line":1039,"column":4},"end":{"line":1043,"column":5}},"484":{"start":{"line":1040,"column":6},"end":{"line":1040,"column":41}},"485":{"start":{"line":1042,"column":6},"end":{"line":1042,"column":67}},"486":{"start":{"line":1044,"column":4},"end":{"line":1044,"column":16}},"487":{"start":{"line":1046,"column":2},"end":{"line":1048,"column":4}},"488":{"start":{"line":1047,"column":4},"end":{"line":1047,"column":42}},"489":{"start":{"line":1059,"column":2},"end":{"line":1069,"column":3}},"490":{"start":{"line":1060,"column":4},"end":{"line":1066,"column":5}},"491":{"start":{"line":1061,"column":6},"end":{"line":1061,"column":26}},"492":{"start":{"line":1062,"column":11},"end":{"line":1066,"column":5}},"493":{"start":{"line":1063,"column":6},"end":{"line":1063,"column":31}},"494":{"start":{"line":1065,"column":6},"end":{"line":1065,"column":68}},"495":{"start":{"line":1068,"column":4},"end":{"line":1068,"column":29}},"496":{"start":{"line":1071,"column":2},"end":{"line":1071,"column":41}},"497":{"start":{"line":1072,"column":2},"end":{"line":1072,"column":48}},"498":{"start":{"line":1073,"column":2},"end":{"line":1076,"column":4}},"499":{"start":{"line":1074,"column":4},"end":{"line":1074,"column":33}},"500":{"start":{"line":1075,"column":4},"end":{"line":1075,"column":16}},"501":{"start":{"line":1077,"column":2},"end":{"line":1080,"column":4}},"502":{"start":{"line":1078,"column":4},"end":{"line":1078,"column":45}},"503":{"start":{"line":1079,"column":4},"end":{"line":1079,"column":16}},"504":{"start":{"line":1081,"column":2},"end":{"line":1084,"column":4}},"505":{"start":{"line":1082,"column":4},"end":{"line":1082,"column":39}},"506":{"start":{"line":1083,"column":4},"end":{"line":1083,"column":16}},"507":{"start":{"line":1095,"column":2},"end":{"line":1105,"column":3}},"508":{"start":{"line":1096,"column":4},"end":{"line":1102,"column":5}},"509":{"start":{"line":1097,"column":6},"end":{"line":1097,"column":26}},"510":{"start":{"line":1098,"column":11},"end":{"line":1102,"column":5}},"511":{"start":{"line":1099,"column":6},"end":{"line":1099,"column":31}},"512":{"start":{"line":1101,"column":6},"end":{"line":1101,"column":73}},"513":{"start":{"line":1104,"column":4},"end":{"line":1104,"column":34}},"514":{"start":{"line":1107,"column":2},"end":{"line":1107,"column":46}},"515":{"start":{"line":1108,"column":2},"end":{"line":1108,"column":58}},"516":{"start":{"line":1109,"column":2},"end":{"line":1113,"column":4}},"517":{"start":{"line":1110,"column":4},"end":{"line":1112,"column":5}},"518":{"start":{"line":1111,"column":6},"end":{"line":1111,"column":68}},"519":{"start":{"line":1114,"column":2},"end":{"line":1116,"column":4}},"520":{"start":{"line":1115,"column":4},"end":{"line":1115,"column":47}},"521":{"start":{"line":1127,"column":2},"end":{"line":1137,"column":3}},"522":{"start":{"line":1128,"column":4},"end":{"line":1134,"column":5}},"523":{"start":{"line":1129,"column":6},"end":{"line":1129,"column":26}},"524":{"start":{"line":1130,"column":11},"end":{"line":1134,"column":5}},"525":{"start":{"line":1131,"column":6},"end":{"line":1131,"column":31}},"526":{"start":{"line":1133,"column":6},"end":{"line":1133,"column":65}},"527":{"start":{"line":1136,"column":4},"end":{"line":1136,"column":26}},"528":{"start":{"line":1139,"column":2},"end":{"line":1139,"column":38}},"529":{"start":{"line":1140,"column":2},"end":{"line":1140,"column":42}},"530":{"start":{"line":1141,"column":2},"end":{"line":1144,"column":4}},"531":{"start":{"line":1142,"column":4},"end":{"line":1142,"column":61}},"532":{"start":{"line":1143,"column":4},"end":{"line":1143,"column":16}},"533":{"start":{"line":1145,"column":2},"end":{"line":1148,"column":4}},"534":{"start":{"line":1146,"column":4},"end":{"line":1146,"column":48}},"535":{"start":{"line":1147,"column":4},"end":{"line":1147,"column":16}},"536":{"start":{"line":1149,"column":2},"end":{"line":1152,"column":4}},"537":{"start":{"line":1150,"column":4},"end":{"line":1150,"column":42}},"538":{"start":{"line":1151,"column":4},"end":{"line":1151,"column":16}},"539":{"start":{"line":1153,"column":2},"end":{"line":1155,"column":4}},"540":{"start":{"line":1154,"column":4},"end":{"line":1154,"column":55}},"541":{"start":{"line":1156,"column":2},"end":{"line":1158,"column":4}},"542":{"start":{"line":1157,"column":4},"end":{"line":1157,"column":39}},"543":{"start":{"line":1159,"column":2},"end":{"line":1167,"column":4}},"544":{"start":{"line":1160,"column":4},"end":{"line":1160,"column":15}},"545":{"start":{"line":1161,"column":4},"end":{"line":1165,"column":5}},"546":{"start":{"line":1162,"column":6},"end":{"line":1164,"column":7}},"547":{"start":{"line":1163,"column":8},"end":{"line":1163,"column":55}},"548":{"start":{"line":1166,"column":4},"end":{"line":1166,"column":17}},"549":{"start":{"line":1178,"column":2},"end":{"line":1188,"column":3}},"550":{"start":{"line":1179,"column":4},"end":{"line":1185,"column":5}},"551":{"start":{"line":1180,"column":6},"end":{"line":1180,"column":26}},"552":{"start":{"line":1181,"column":11},"end":{"line":1185,"column":5}},"553":{"start":{"line":1182,"column":6},"end":{"line":1182,"column":31}},"554":{"start":{"line":1184,"column":6},"end":{"line":1184,"column":70}},"555":{"start":{"line":1187,"column":4},"end":{"line":1187,"column":31}},"556":{"start":{"line":1190,"column":2},"end":{"line":1190,"column":43}},"557":{"start":{"line":1191,"column":2},"end":{"line":1191,"column":52}},"558":{"start":{"line":1192,"column":2},"end":{"line":1196,"column":4}},"559":{"start":{"line":1193,"column":4},"end":{"line":1195,"column":5}},"560":{"start":{"line":1194,"column":6},"end":{"line":1194,"column":68}},"561":{"start":{"line":1197,"column":2},"end":{"line":1199,"column":4}},"562":{"start":{"line":1198,"column":4},"end":{"line":1198,"column":44}},"563":{"start":{"line":1200,"column":2},"end":{"line":1207,"column":4}},"564":{"start":{"line":1201,"column":4},"end":{"line":1201,"column":19}},"565":{"start":{"line":1202,"column":4},"end":{"line":1204,"column":7}},"566":{"start":{"line":1203,"column":6},"end":{"line":1203,"column":41}},"567":{"start":{"line":1205,"column":4},"end":{"line":1205,"column":29}},"568":{"start":{"line":1206,"column":4},"end":{"line":1206,"column":16}},"569":{"start":{"line":1224,"column":2},"end":{"line":1234,"column":3}},"570":{"start":{"line":1225,"column":4},"end":{"line":1231,"column":5}},"571":{"start":{"line":1226,"column":6},"end":{"line":1226,"column":26}},"572":{"start":{"line":1227,"column":11},"end":{"line":1231,"column":5}},"573":{"start":{"line":1228,"column":6},"end":{"line":1228,"column":28}},"574":{"start":{"line":1230,"column":6},"end":{"line":1230,"column":65}},"575":{"start":{"line":1233,"column":4},"end":{"line":1233,"column":26}},"576":{"start":{"line":1236,"column":2},"end":{"line":1236,"column":38}},"577":{"start":{"line":1237,"column":2},"end":{"line":1237,"column":42}},"578":{"start":{"line":1248,"column":2},"end":{"line":1258,"column":3}},"579":{"start":{"line":1249,"column":4},"end":{"line":1255,"column":5}},"580":{"start":{"line":1250,"column":6},"end":{"line":1250,"column":26}},"581":{"start":{"line":1251,"column":11},"end":{"line":1255,"column":5}},"582":{"start":{"line":1252,"column":6},"end":{"line":1252,"column":28}},"583":{"start":{"line":1254,"column":6},"end":{"line":1254,"column":75}},"584":{"start":{"line":1257,"column":4},"end":{"line":1257,"column":36}},"585":{"start":{"line":1260,"column":2},"end":{"line":1260,"column":48}},"586":{"start":{"line":1261,"column":2},"end":{"line":1261,"column":62}},"587":{"start":{"line":1262,"column":2},"end":{"line":1266,"column":4}},"588":{"start":{"line":1263,"column":4},"end":{"line":1265,"column":5}},"589":{"start":{"line":1264,"column":6},"end":{"line":1264,"column":61}},"590":{"start":{"line":1267,"column":2},"end":{"line":1275,"column":4}},"591":{"start":{"line":1268,"column":4},"end":{"line":1268,"column":14}},"592":{"start":{"line":1269,"column":4},"end":{"line":1273,"column":7}},"593":{"start":{"line":1270,"column":6},"end":{"line":1272,"column":7}},"594":{"start":{"line":1271,"column":8},"end":{"line":1271,"column":24}},"595":{"start":{"line":1274,"column":4},"end":{"line":1274,"column":30}},"596":{"start":{"line":1286,"column":2},"end":{"line":1299,"column":3}},"597":{"start":{"line":1287,"column":4},"end":{"line":1296,"column":5}},"598":{"start":{"line":1288,"column":6},"end":{"line":1288,"column":26}},"599":{"start":{"line":1289,"column":11},"end":{"line":1296,"column":5}},"600":{"start":{"line":1290,"column":6},"end":{"line":1290,"column":30}},"601":{"start":{"line":1291,"column":11},"end":{"line":1296,"column":5}},"602":{"start":{"line":1292,"column":6},"end":{"line":1292,"column":39}},"603":{"start":{"line":1293,"column":6},"end":{"line":1293,"column":32}},"604":{"start":{"line":1295,"column":6},"end":{"line":1295,"column":76}},"605":{"start":{"line":1298,"column":4},"end":{"line":1298,"column":37}},"606":{"start":{"line":1301,"column":2},"end":{"line":1301,"column":49}},"607":{"start":{"line":1302,"column":2},"end":{"line":1302,"column":64}},"608":{"start":{"line":1303,"column":2},"end":{"line":1307,"column":4}},"609":{"start":{"line":1304,"column":4},"end":{"line":1306,"column":5}},"610":{"start":{"line":1305,"column":6},"end":{"line":1305,"column":65}},"611":{"start":{"line":1308,"column":2},"end":{"line":1310,"column":4}},"612":{"start":{"line":1309,"column":4},"end":{"line":1309,"column":45}},"613":{"start":{"line":1312,"column":2},"end":{"line":1326,"column":3}},"614":{"start":{"line":1313,"column":4},"end":{"line":1313,"column":54}},"615":{"start":{"line":1314,"column":4},"end":{"line":1314,"column":34}},"616":{"start":{"line":1315,"column":4},"end":{"line":1318,"column":6}},"617":{"start":{"line":1319,"column":4},"end":{"line":1322,"column":5}},"618":{"start":{"line":1320,"column":6},"end":{"line":1320,"column":52}},"619":{"start":{"line":1321,"column":6},"end":{"line":1321,"column":136}},"620":{"start":{"line":1323,"column":4},"end":{"line":1323,"column":61}},"621":{"start":{"line":1325,"column":4},"end":{"line":1325,"column":33}},"622":{"start":{"line":1328,"column":2},"end":{"line":1345,"column":3}},"623":{"start":{"line":1329,"column":4},"end":{"line":1329,"column":34}},"624":{"start":{"line":1330,"column":4},"end":{"line":1330,"column":28}},"625":{"start":{"line":1332,"column":4},"end":{"line":1334,"column":5}},"626":{"start":{"line":1333,"column":6},"end":{"line":1333,"column":79}},"627":{"start":{"line":1336,"column":4},"end":{"line":1344,"column":8}},"628":{"start":{"line":1347,"column":2},"end":{"line":1347,"column":37}},"629":{"start":{"line":1348,"column":2},"end":{"line":1348,"column":40}},"630":{"start":{"line":1349,"column":2},"end":{"line":1352,"column":4}},"631":{"start":{"line":1350,"column":4},"end":{"line":1350,"column":104}},"632":{"start":{"line":1351,"column":4},"end":{"line":1351,"column":16}},"633":{"start":{"line":1353,"column":2},"end":{"line":1359,"column":4}},"634":{"start":{"line":1354,"column":4},"end":{"line":1357,"column":5}},"635":{"start":{"line":1355,"column":6},"end":{"line":1355,"column":43}},"636":{"start":{"line":1356,"column":6},"end":{"line":1356,"column":25}},"637":{"start":{"line":1358,"column":4},"end":{"line":1358,"column":34}},"638":{"start":{"line":1360,"column":2},"end":{"line":1366,"column":4}},"639":{"start":{"line":1361,"column":4},"end":{"line":1364,"column":5}},"640":{"start":{"line":1362,"column":6},"end":{"line":1362,"column":38}},"641":{"start":{"line":1363,"column":6},"end":{"line":1363,"column":25}},"642":{"start":{"line":1365,"column":4},"end":{"line":1365,"column":34}},"643":{"start":{"line":1367,"column":2},"end":{"line":1373,"column":4}},"644":{"start":{"line":1368,"column":4},"end":{"line":1371,"column":5}},"645":{"start":{"line":1369,"column":6},"end":{"line":1369,"column":36}},"646":{"start":{"line":1370,"column":6},"end":{"line":1370,"column":25}},"647":{"start":{"line":1372,"column":4},"end":{"line":1372,"column":33}},"648":{"start":{"line":1375,"column":2},"end":{"line":1378,"column":4}},"649":{"start":{"line":1376,"column":4},"end":{"line":1376,"column":55}},"650":{"start":{"line":1377,"column":4},"end":{"line":1377,"column":18}},"651":{"start":{"line":1380,"column":2},"end":{"line":1380,"column":32}},"652":{"start":{"line":1381,"column":2},"end":{"line":1381,"column":24}},"653":{"start":{"line":1382,"column":2},"end":{"line":1382,"column":34}},"654":{"start":{"line":1383,"column":2},"end":{"line":1383,"column":34}},"655":{"start":{"line":1384,"column":2},"end":{"line":1384,"column":44}},"656":{"start":{"line":1385,"column":2},"end":{"line":1385,"column":28}},"657":{"start":{"line":1386,"column":2},"end":{"line":1386,"column":38}},"658":{"start":{"line":1387,"column":2},"end":{"line":1387,"column":28}},"659":{"start":{"line":1388,"column":2},"end":{"line":1388,"column":48}},"660":{"start":{"line":1389,"column":2},"end":{"line":1389,"column":50}},"661":{"start":{"line":1390,"column":2},"end":{"line":1390,"column":26}},"662":{"start":{"line":1392,"column":2},"end":{"line":1392,"column":34}},"663":{"start":{"line":1393,"column":2},"end":{"line":1393,"column":38}},"664":{"start":{"line":1395,"column":2},"end":{"line":1395,"column":21}},"665":{"start":{"line":1396,"column":2},"end":{"line":1396,"column":56}},"666":{"start":{"line":1397,"column":2},"end":{"line":1397,"column":60}},"667":{"start":{"line":1398,"column":2},"end":{"line":1398,"column":48}},"668":{"start":{"line":1399,"column":2},"end":{"line":1399,"column":40}},"669":{"start":{"line":1400,"column":2},"end":{"line":1400,"column":44}},"670":{"start":{"line":1401,"column":2},"end":{"line":1401,"column":44}},"671":{"start":{"line":1403,"column":2},"end":{"line":1403,"column":50}},"672":{"start":{"line":1404,"column":2},"end":{"line":1404,"column":54}},"673":{"start":{"line":1406,"column":2},"end":{"line":1406,"column":66}},"674":{"start":{"line":1407,"column":2},"end":{"line":1407,"column":60}},"675":{"start":{"line":1408,"column":2},"end":{"line":1408,"column":62}},"676":{"start":{"line":1409,"column":2},"end":{"line":1409,"column":66}},"677":{"start":{"line":1410,"column":2},"end":{"line":1410,"column":52}},"678":{"start":{"line":1411,"column":2},"end":{"line":1411,"column":40}},"679":{"start":{"line":1412,"column":2},"end":{"line":1412,"column":36}},"680":{"start":{"line":1414,"column":2},"end":{"line":1414,"column":36}},"681":{"start":{"line":1415,"column":2},"end":{"line":1415,"column":40}},"682":{"start":{"line":1417,"column":2},"end":{"line":1417,"column":17}}},"branchMap":{"1":{"line":4,"type":"if","locations":[{"start":{"line":4,"column":2},"end":{"line":4,"column":2}},{"start":{"line":4,"column":2},"end":{"line":4,"column":2}}]},"2":{"line":4,"type":"binary-expr","locations":[{"start":{"line":4,"column":5},"end":{"line":4,"column":31}},{"start":{"line":4,"column":35},"end":{"line":4,"column":69}}]},"3":{"line":9,"type":"if","locations":[{"start":{"line":9,"column":2},"end":{"line":9,"column":2}},{"start":{"line":9,"column":2},"end":{"line":9,"column":2}}]},"4":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":4},"end":{"line":46,"column":4}},{"start":{"line":46,"column":4},"end":{"line":46,"column":4}}]},"5":{"line":46,"type":"binary-expr","locations":[{"start":{"line":46,"column":8},"end":{"line":46,"column":36}},{"start":{"line":46,"column":40},"end":{"line":46,"column":52}}]},"6":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":6},"end":{"line":56,"column":6}},{"start":{"line":56,"column":6},"end":{"line":56,"column":6}}]},"7":{"line":67,"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":67,"column":4}},{"start":{"line":67,"column":4},"end":{"line":67,"column":4}}]},"8":{"line":68,"type":"switch","locations":[{"start":{"line":69,"column":8},"end":{"line":70,"column":115}},{"start":{"line":72,"column":8},"end":{"line":73,"column":63}},{"start":{"line":75,"column":8},"end":{"line":76,"column":63}},{"start":{"line":78,"column":8},"end":{"line":79,"column":70}},{"start":{"line":81,"column":8},"end":{"line":82,"column":70}},{"start":{"line":84,"column":8},"end":{"line":85,"column":77}},{"start":{"line":87,"column":8},"end":{"line":88,"column":76}},{"start":{"line":90,"column":8},"end":{"line":91,"column":62}},{"start":{"line":93,"column":8},"end":{"line":94,"column":63}},{"start":{"line":96,"column":8},"end":{"line":97,"column":59}}]},"9":{"line":88,"type":"cond-expr","locations":[{"start":{"line":88,"column":35},"end":{"line":88,"column":68}},{"start":{"line":88,"column":71},"end":{"line":88,"column":75}}]},"10":{"line":129,"type":"if","locations":[{"start":{"line":129,"column":8},"end":{"line":129,"column":8}},{"start":{"line":129,"column":8},"end":{"line":129,"column":8}}]},"11":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":15},"end":{"line":131,"column":15}},{"start":{"line":131,"column":15},"end":{"line":131,"column":15}}]},"12":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":8},"end":{"line":135,"column":8}},{"start":{"line":135,"column":8},"end":{"line":135,"column":8}}]},"13":{"line":137,"type":"if","locations":[{"start":{"line":137,"column":15},"end":{"line":137,"column":15}},{"start":{"line":137,"column":15},"end":{"line":137,"column":15}}]},"14":{"line":141,"type":"if","locations":[{"start":{"line":141,"column":8},"end":{"line":141,"column":8}},{"start":{"line":141,"column":8},"end":{"line":141,"column":8}}]},"15":{"line":143,"type":"if","locations":[{"start":{"line":143,"column":15},"end":{"line":143,"column":15}},{"start":{"line":143,"column":15},"end":{"line":143,"column":15}}]},"16":{"line":147,"type":"if","locations":[{"start":{"line":147,"column":8},"end":{"line":147,"column":8}},{"start":{"line":147,"column":8},"end":{"line":147,"column":8}}]},"17":{"line":149,"type":"if","locations":[{"start":{"line":149,"column":15},"end":{"line":149,"column":15}},{"start":{"line":149,"column":15},"end":{"line":149,"column":15}}]},"18":{"line":180,"type":"if","locations":[{"start":{"line":180,"column":10},"end":{"line":180,"column":10}},{"start":{"line":180,"column":10},"end":{"line":180,"column":10}}]},"19":{"line":182,"type":"if","locations":[{"start":{"line":182,"column":17},"end":{"line":182,"column":17}},{"start":{"line":182,"column":17},"end":{"line":182,"column":17}}]},"20":{"line":186,"type":"if","locations":[{"start":{"line":186,"column":10},"end":{"line":186,"column":10}},{"start":{"line":186,"column":10},"end":{"line":186,"column":10}}]},"21":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":17},"end":{"line":188,"column":17}},{"start":{"line":188,"column":17},"end":{"line":188,"column":17}}]},"22":{"line":192,"type":"if","locations":[{"start":{"line":192,"column":10},"end":{"line":192,"column":10}},{"start":{"line":192,"column":10},"end":{"line":192,"column":10}}]},"23":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":17},"end":{"line":194,"column":17}},{"start":{"line":194,"column":17},"end":{"line":194,"column":17}}]},"24":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":10},"end":{"line":198,"column":10}},{"start":{"line":198,"column":10},"end":{"line":198,"column":10}}]},"25":{"line":200,"type":"if","locations":[{"start":{"line":200,"column":17},"end":{"line":200,"column":17}},{"start":{"line":200,"column":17},"end":{"line":200,"column":17}}]},"26":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":6},"end":{"line":224,"column":6}},{"start":{"line":224,"column":6},"end":{"line":224,"column":6}}]},"27":{"line":226,"type":"if","locations":[{"start":{"line":226,"column":13},"end":{"line":226,"column":13}},{"start":{"line":226,"column":13},"end":{"line":226,"column":13}}]},"28":{"line":230,"type":"if","locations":[{"start":{"line":230,"column":6},"end":{"line":230,"column":6}},{"start":{"line":230,"column":6},"end":{"line":230,"column":6}}]},"29":{"line":232,"type":"if","locations":[{"start":{"line":232,"column":13},"end":{"line":232,"column":13}},{"start":{"line":232,"column":13},"end":{"line":232,"column":13}}]},"30":{"line":236,"type":"if","locations":[{"start":{"line":236,"column":6},"end":{"line":236,"column":6}},{"start":{"line":236,"column":6},"end":{"line":236,"column":6}}]},"31":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":13},"end":{"line":238,"column":13}},{"start":{"line":238,"column":13},"end":{"line":238,"column":13}}]},"32":{"line":242,"type":"if","locations":[{"start":{"line":242,"column":6},"end":{"line":242,"column":6}},{"start":{"line":242,"column":6},"end":{"line":242,"column":6}}]},"33":{"line":244,"type":"if","locations":[{"start":{"line":244,"column":13},"end":{"line":244,"column":13}},{"start":{"line":244,"column":13},"end":{"line":244,"column":13}}]},"34":{"line":311,"type":"if","locations":[{"start":{"line":311,"column":6},"end":{"line":311,"column":6}},{"start":{"line":311,"column":6},"end":{"line":311,"column":6}}]},"35":{"line":315,"type":"if","locations":[{"start":{"line":315,"column":6},"end":{"line":315,"column":6}},{"start":{"line":315,"column":6},"end":{"line":315,"column":6}}]},"36":{"line":344,"type":"if","locations":[{"start":{"line":344,"column":4},"end":{"line":344,"column":4}},{"start":{"line":344,"column":4},"end":{"line":344,"column":4}}]},"37":{"line":346,"type":"if","locations":[{"start":{"line":346,"column":11},"end":{"line":346,"column":11}},{"start":{"line":346,"column":11},"end":{"line":346,"column":11}}]},"38":{"line":348,"type":"if","locations":[{"start":{"line":348,"column":11},"end":{"line":348,"column":11}},{"start":{"line":348,"column":11},"end":{"line":348,"column":11}}]},"39":{"line":352,"type":"if","locations":[{"start":{"line":352,"column":11},"end":{"line":352,"column":11}},{"start":{"line":352,"column":11},"end":{"line":352,"column":11}}]},"40":{"line":360,"type":"if","locations":[{"start":{"line":360,"column":4},"end":{"line":360,"column":4}},{"start":{"line":360,"column":4},"end":{"line":360,"column":4}}]},"41":{"line":361,"type":"if","locations":[{"start":{"line":361,"column":6},"end":{"line":361,"column":6}},{"start":{"line":361,"column":6},"end":{"line":361,"column":6}}]},"42":{"line":366,"type":"if","locations":[{"start":{"line":366,"column":4},"end":{"line":366,"column":4}},{"start":{"line":366,"column":4},"end":{"line":366,"column":4}}]},"43":{"line":392,"type":"if","locations":[{"start":{"line":392,"column":4},"end":{"line":392,"column":4}},{"start":{"line":392,"column":4},"end":{"line":392,"column":4}}]},"44":{"line":394,"type":"if","locations":[{"start":{"line":394,"column":11},"end":{"line":394,"column":11}},{"start":{"line":394,"column":11},"end":{"line":394,"column":11}}]},"45":{"line":405,"type":"if","locations":[{"start":{"line":405,"column":4},"end":{"line":405,"column":4}},{"start":{"line":405,"column":4},"end":{"line":405,"column":4}}]},"46":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":11},"end":{"line":407,"column":11}},{"start":{"line":407,"column":11},"end":{"line":407,"column":11}}]},"47":{"line":409,"type":"if","locations":[{"start":{"line":409,"column":11},"end":{"line":409,"column":11}},{"start":{"line":409,"column":11},"end":{"line":409,"column":11}}]},"48":{"line":411,"type":"if","locations":[{"start":{"line":411,"column":11},"end":{"line":411,"column":11}},{"start":{"line":411,"column":11},"end":{"line":411,"column":11}}]},"49":{"line":443,"type":"if","locations":[{"start":{"line":443,"column":6},"end":{"line":443,"column":6}},{"start":{"line":443,"column":6},"end":{"line":443,"column":6}}]},"50":{"line":443,"type":"binary-expr","locations":[{"start":{"line":443,"column":9},"end":{"line":443,"column":17}},{"start":{"line":443,"column":21},"end":{"line":443,"column":28}},{"start":{"line":443,"column":32},"end":{"line":443,"column":89}}]},"51":{"line":454,"type":"if","locations":[{"start":{"line":454,"column":4},"end":{"line":454,"column":4}},{"start":{"line":454,"column":4},"end":{"line":454,"column":4}}]},"52":{"line":456,"type":"if","locations":[{"start":{"line":456,"column":11},"end":{"line":456,"column":11}},{"start":{"line":456,"column":11},"end":{"line":456,"column":11}}]},"53":{"line":466,"type":"if","locations":[{"start":{"line":466,"column":6},"end":{"line":466,"column":6}},{"start":{"line":466,"column":6},"end":{"line":466,"column":6}}]},"54":{"line":486,"type":"if","locations":[{"start":{"line":486,"column":6},"end":{"line":486,"column":6}},{"start":{"line":486,"column":6},"end":{"line":486,"column":6}}]},"55":{"line":487,"type":"if","locations":[{"start":{"line":487,"column":8},"end":{"line":487,"column":8}},{"start":{"line":487,"column":8},"end":{"line":487,"column":8}}]},"56":{"line":493,"type":"if","locations":[{"start":{"line":493,"column":8},"end":{"line":493,"column":8}},{"start":{"line":493,"column":8},"end":{"line":493,"column":8}}]},"57":{"line":493,"type":"binary-expr","locations":[{"start":{"line":493,"column":12},"end":{"line":493,"column":15}},{"start":{"line":493,"column":20},"end":{"line":493,"column":27}},{"start":{"line":493,"column":32},"end":{"line":493,"column":36}},{"start":{"line":493,"column":41},"end":{"line":493,"column":48}}]},"58":{"line":505,"type":"if","locations":[{"start":{"line":505,"column":6},"end":{"line":505,"column":6}},{"start":{"line":505,"column":6},"end":{"line":505,"column":6}}]},"59":{"line":505,"type":"binary-expr","locations":[{"start":{"line":505,"column":12},"end":{"line":505,"column":41}},{"start":{"line":505,"column":45},"end":{"line":505,"column":73}},{"start":{"line":506,"column":12},"end":{"line":506,"column":41}},{"start":{"line":506,"column":45},"end":{"line":506,"column":73}},{"start":{"line":507,"column":11},"end":{"line":507,"column":156}}]},"60":{"line":515,"type":"if","locations":[{"start":{"line":515,"column":4},"end":{"line":515,"column":4}},{"start":{"line":515,"column":4},"end":{"line":515,"column":4}}]},"61":{"line":515,"type":"binary-expr","locations":[{"start":{"line":515,"column":8},"end":{"line":515,"column":15}},{"start":{"line":515,"column":19},"end":{"line":515,"column":33}}]},"62":{"line":516,"type":"if","locations":[{"start":{"line":516,"column":6},"end":{"line":516,"column":6}},{"start":{"line":516,"column":6},"end":{"line":516,"column":6}}]},"63":{"line":519,"type":"if","locations":[{"start":{"line":519,"column":8},"end":{"line":519,"column":8}},{"start":{"line":519,"column":8},"end":{"line":519,"column":8}}]},"64":{"line":521,"type":"if","locations":[{"start":{"line":521,"column":12},"end":{"line":521,"column":12}},{"start":{"line":521,"column":12},"end":{"line":521,"column":12}}]},"65":{"line":541,"type":"if","locations":[{"start":{"line":541,"column":4},"end":{"line":541,"column":4}},{"start":{"line":541,"column":4},"end":{"line":541,"column":4}}]},"66":{"line":545,"type":"if","locations":[{"start":{"line":545,"column":6},"end":{"line":545,"column":6}},{"start":{"line":545,"column":6},"end":{"line":545,"column":6}}]},"67":{"line":545,"type":"binary-expr","locations":[{"start":{"line":545,"column":11},"end":{"line":545,"column":18}},{"start":{"line":545,"column":22},"end":{"line":545,"column":29}},{"start":{"line":545,"column":33},"end":{"line":545,"column":40}},{"start":{"line":545,"column":44},"end":{"line":545,"column":51}}]},"68":{"line":554,"type":"binary-expr","locations":[{"start":{"line":554,"column":11},"end":{"line":554,"column":32}},{"start":{"line":554,"column":36},"end":{"line":554,"column":47}}]},"69":{"line":558,"type":"if","locations":[{"start":{"line":558,"column":4},"end":{"line":558,"column":4}},{"start":{"line":558,"column":4},"end":{"line":558,"column":4}}]},"70":{"line":559,"type":"if","locations":[{"start":{"line":559,"column":6},"end":{"line":559,"column":6}},{"start":{"line":559,"column":6},"end":{"line":559,"column":6}}]},"71":{"line":562,"type":"if","locations":[{"start":{"line":562,"column":12},"end":{"line":562,"column":12}},{"start":{"line":562,"column":12},"end":{"line":562,"column":12}}]},"72":{"line":569,"type":"if","locations":[{"start":{"line":569,"column":10},"end":{"line":569,"column":10}},{"start":{"line":569,"column":10},"end":{"line":569,"column":10}}]},"73":{"line":576,"type":"if","locations":[{"start":{"line":576,"column":8},"end":{"line":576,"column":8}},{"start":{"line":576,"column":8},"end":{"line":576,"column":8}}]},"74":{"line":592,"type":"if","locations":[{"start":{"line":592,"column":6},"end":{"line":592,"column":6}},{"start":{"line":592,"column":6},"end":{"line":592,"column":6}}]},"75":{"line":605,"type":"if","locations":[{"start":{"line":605,"column":6},"end":{"line":605,"column":6}},{"start":{"line":605,"column":6},"end":{"line":605,"column":6}}]},"76":{"line":614,"type":"if","locations":[{"start":{"line":614,"column":4},"end":{"line":614,"column":4}},{"start":{"line":614,"column":4},"end":{"line":614,"column":4}}]},"77":{"line":622,"type":"if","locations":[{"start":{"line":622,"column":6},"end":{"line":622,"column":6}},{"start":{"line":622,"column":6},"end":{"line":622,"column":6}}]},"78":{"line":626,"type":"if","locations":[{"start":{"line":626,"column":8},"end":{"line":626,"column":8}},{"start":{"line":626,"column":8},"end":{"line":626,"column":8}}]},"79":{"line":644,"type":"if","locations":[{"start":{"line":644,"column":4},"end":{"line":644,"column":4}},{"start":{"line":644,"column":4},"end":{"line":644,"column":4}}]},"80":{"line":645,"type":"switch","locations":[{"start":{"line":646,"column":6},"end":{"line":647,"column":34}},{"start":{"line":649,"column":6},"end":{"line":650,"column":39}},{"start":{"line":652,"column":6},"end":{"line":653,"column":39}},{"start":{"line":655,"column":6},"end":{"line":656,"column":44}},{"start":{"line":658,"column":6},"end":{"line":659,"column":36}},{"start":{"line":661,"column":6},"end":{"line":662,"column":41}},{"start":{"line":664,"column":6},"end":{"line":665,"column":36}},{"start":{"line":667,"column":6},"end":{"line":668,"column":46}},{"start":{"line":670,"column":6},"end":{"line":671,"column":47}},{"start":{"line":673,"column":6},"end":{"line":674,"column":57}}]},"81":{"line":697,"type":"if","locations":[{"start":{"line":697,"column":4},"end":{"line":697,"column":4}},{"start":{"line":697,"column":4},"end":{"line":697,"column":4}}]},"82":{"line":699,"type":"if","locations":[{"start":{"line":699,"column":11},"end":{"line":699,"column":11}},{"start":{"line":699,"column":11},"end":{"line":699,"column":11}}]},"83":{"line":699,"type":"binary-expr","locations":[{"start":{"line":699,"column":15},"end":{"line":699,"column":41}},{"start":{"line":699,"column":45},"end":{"line":699,"column":71}}]},"84":{"line":700,"type":"if","locations":[{"start":{"line":700,"column":6},"end":{"line":700,"column":6}},{"start":{"line":700,"column":6},"end":{"line":700,"column":6}}]},"85":{"line":700,"type":"binary-expr","locations":[{"start":{"line":700,"column":10},"end":{"line":700,"column":26}},{"start":{"line":700,"column":30},"end":{"line":700,"column":58}}]},"86":{"line":705,"type":"if","locations":[{"start":{"line":705,"column":11},"end":{"line":705,"column":11}},{"start":{"line":705,"column":11},"end":{"line":705,"column":11}}]},"87":{"line":705,"type":"binary-expr","locations":[{"start":{"line":705,"column":15},"end":{"line":705,"column":38}},{"start":{"line":705,"column":42},"end":{"line":705,"column":73}}]},"88":{"line":706,"type":"if","locations":[{"start":{"line":706,"column":6},"end":{"line":706,"column":6}},{"start":{"line":706,"column":6},"end":{"line":706,"column":6}}]},"89":{"line":706,"type":"binary-expr","locations":[{"start":{"line":706,"column":10},"end":{"line":706,"column":26}},{"start":{"line":706,"column":30},"end":{"line":706,"column":57}}]},"90":{"line":710,"type":"if","locations":[{"start":{"line":710,"column":8},"end":{"line":710,"column":8}},{"start":{"line":710,"column":8},"end":{"line":710,"column":8}}]},"91":{"line":716,"type":"if","locations":[{"start":{"line":716,"column":11},"end":{"line":716,"column":11}},{"start":{"line":716,"column":11},"end":{"line":716,"column":11}}]},"92":{"line":717,"type":"if","locations":[{"start":{"line":717,"column":6},"end":{"line":717,"column":6}},{"start":{"line":717,"column":6},"end":{"line":717,"column":6}}]},"93":{"line":717,"type":"binary-expr","locations":[{"start":{"line":717,"column":10},"end":{"line":717,"column":26}},{"start":{"line":717,"column":30},"end":{"line":717,"column":57}}]},"94":{"line":723,"type":"if","locations":[{"start":{"line":723,"column":8},"end":{"line":723,"column":8}},{"start":{"line":723,"column":8},"end":{"line":723,"column":8}}]},"95":{"line":729,"type":"if","locations":[{"start":{"line":729,"column":11},"end":{"line":729,"column":11}},{"start":{"line":729,"column":11},"end":{"line":729,"column":11}}]},"96":{"line":743,"type":"if","locations":[{"start":{"line":743,"column":6},"end":{"line":743,"column":6}},{"start":{"line":743,"column":6},"end":{"line":743,"column":6}}]},"97":{"line":743,"type":"binary-expr","locations":[{"start":{"line":743,"column":10},"end":{"line":743,"column":34}},{"start":{"line":743,"column":38},"end":{"line":743,"column":73}}]},"98":{"line":759,"type":"if","locations":[{"start":{"line":759,"column":4},"end":{"line":759,"column":4}},{"start":{"line":759,"column":4},"end":{"line":759,"column":4}}]},"99":{"line":764,"type":"if","locations":[{"start":{"line":764,"column":4},"end":{"line":764,"column":4}},{"start":{"line":764,"column":4},"end":{"line":764,"column":4}}]},"100":{"line":765,"type":"if","locations":[{"start":{"line":765,"column":6},"end":{"line":765,"column":6}},{"start":{"line":765,"column":6},"end":{"line":765,"column":6}}]},"101":{"line":772,"type":"if","locations":[{"start":{"line":772,"column":4},"end":{"line":772,"column":4}},{"start":{"line":772,"column":4},"end":{"line":772,"column":4}}]},"102":{"line":773,"type":"if","locations":[{"start":{"line":773,"column":6},"end":{"line":773,"column":6}},{"start":{"line":773,"column":6},"end":{"line":773,"column":6}}]},"103":{"line":777,"type":"if","locations":[{"start":{"line":777,"column":10},"end":{"line":777,"column":10}},{"start":{"line":777,"column":10},"end":{"line":777,"column":10}}]},"104":{"line":785,"type":"if","locations":[{"start":{"line":785,"column":4},"end":{"line":785,"column":4}},{"start":{"line":785,"column":4},"end":{"line":785,"column":4}}]},"105":{"line":785,"type":"binary-expr","locations":[{"start":{"line":785,"column":8},"end":{"line":785,"column":39}},{"start":{"line":785,"column":43},"end":{"line":785,"column":74}}]},"106":{"line":786,"type":"if","locations":[{"start":{"line":786,"column":6},"end":{"line":786,"column":6}},{"start":{"line":786,"column":6},"end":{"line":786,"column":6}}]},"107":{"line":788,"type":"if","locations":[{"start":{"line":788,"column":10},"end":{"line":788,"column":10}},{"start":{"line":788,"column":10},"end":{"line":788,"column":10}}]},"108":{"line":792,"type":"if","locations":[{"start":{"line":792,"column":10},"end":{"line":792,"column":10}},{"start":{"line":792,"column":10},"end":{"line":792,"column":10}}]},"109":{"line":799,"type":"if","locations":[{"start":{"line":799,"column":4},"end":{"line":799,"column":4}},{"start":{"line":799,"column":4},"end":{"line":799,"column":4}}]},"110":{"line":801,"type":"if","locations":[{"start":{"line":801,"column":6},"end":{"line":801,"column":6}},{"start":{"line":801,"column":6},"end":{"line":801,"column":6}}]},"111":{"line":803,"type":"if","locations":[{"start":{"line":803,"column":8},"end":{"line":803,"column":8}},{"start":{"line":803,"column":8},"end":{"line":803,"column":8}}]},"112":{"line":805,"type":"if","locations":[{"start":{"line":805,"column":12},"end":{"line":805,"column":12}},{"start":{"line":805,"column":12},"end":{"line":805,"column":12}}]},"113":{"line":811,"type":"if","locations":[{"start":{"line":811,"column":8},"end":{"line":811,"column":8}},{"start":{"line":811,"column":8},"end":{"line":811,"column":8}}]},"114":{"line":811,"type":"binary-expr","locations":[{"start":{"line":811,"column":12},"end":{"line":811,"column":35}},{"start":{"line":811,"column":39},"end":{"line":811,"column":106}}]},"115":{"line":818,"type":"if","locations":[{"start":{"line":818,"column":13},"end":{"line":818,"column":13}},{"start":{"line":818,"column":13},"end":{"line":818,"column":13}}]},"116":{"line":822,"type":"if","locations":[{"start":{"line":822,"column":13},"end":{"line":822,"column":13}},{"start":{"line":822,"column":13},"end":{"line":822,"column":13}}]},"117":{"line":822,"type":"binary-expr","locations":[{"start":{"line":822,"column":17},"end":{"line":822,"column":43}},{"start":{"line":822,"column":47},"end":{"line":822,"column":73}}]},"118":{"line":823,"type":"if","locations":[{"start":{"line":823,"column":8},"end":{"line":823,"column":8}},{"start":{"line":823,"column":8},"end":{"line":823,"column":8}}]},"119":{"line":823,"type":"binary-expr","locations":[{"start":{"line":823,"column":12},"end":{"line":823,"column":29}},{"start":{"line":823,"column":33},"end":{"line":823,"column":62}}]},"120":{"line":828,"type":"if","locations":[{"start":{"line":828,"column":10},"end":{"line":828,"column":10}},{"start":{"line":828,"column":10},"end":{"line":828,"column":10}}]},"121":{"line":836,"type":"if","locations":[{"start":{"line":836,"column":13},"end":{"line":836,"column":13}},{"start":{"line":836,"column":13},"end":{"line":836,"column":13}}]},"122":{"line":840,"type":"if","locations":[{"start":{"line":840,"column":10},"end":{"line":840,"column":10}},{"start":{"line":840,"column":10},"end":{"line":840,"column":10}}]},"123":{"line":849,"type":"if","locations":[{"start":{"line":849,"column":13},"end":{"line":849,"column":13}},{"start":{"line":849,"column":13},"end":{"line":849,"column":13}}]},"124":{"line":853,"type":"if","locations":[{"start":{"line":853,"column":10},"end":{"line":853,"column":10}},{"start":{"line":853,"column":10},"end":{"line":853,"column":10}}]},"125":{"line":863,"type":"if","locations":[{"start":{"line":863,"column":4},"end":{"line":863,"column":4}},{"start":{"line":863,"column":4},"end":{"line":863,"column":4}}]},"126":{"line":865,"type":"if","locations":[{"start":{"line":865,"column":6},"end":{"line":865,"column":6}},{"start":{"line":865,"column":6},"end":{"line":865,"column":6}}]},"127":{"line":866,"type":"if","locations":[{"start":{"line":866,"column":8},"end":{"line":866,"column":8}},{"start":{"line":866,"column":8},"end":{"line":866,"column":8}}]},"128":{"line":869,"type":"if","locations":[{"start":{"line":869,"column":12},"end":{"line":869,"column":12}},{"start":{"line":869,"column":12},"end":{"line":869,"column":12}}]},"129":{"line":869,"type":"binary-expr","locations":[{"start":{"line":869,"column":16},"end":{"line":869,"column":67}},{"start":{"line":869,"column":71},"end":{"line":869,"column":145}}]},"130":{"line":877,"type":"if","locations":[{"start":{"line":877,"column":13},"end":{"line":877,"column":13}},{"start":{"line":877,"column":13},"end":{"line":877,"column":13}}]},"131":{"line":879,"type":"if","locations":[{"start":{"line":879,"column":10},"end":{"line":879,"column":10}},{"start":{"line":879,"column":10},"end":{"line":879,"column":10}}]},"132":{"line":881,"type":"if","locations":[{"start":{"line":881,"column":14},"end":{"line":881,"column":14}},{"start":{"line":881,"column":14},"end":{"line":881,"column":14}}]},"133":{"line":888,"type":"if","locations":[{"start":{"line":888,"column":8},"end":{"line":888,"column":8}},{"start":{"line":888,"column":8},"end":{"line":888,"column":8}}]},"134":{"line":889,"type":"if","locations":[{"start":{"line":889,"column":10},"end":{"line":889,"column":10}},{"start":{"line":889,"column":10},"end":{"line":889,"column":10}}]},"135":{"line":892,"type":"if","locations":[{"start":{"line":892,"column":14},"end":{"line":892,"column":14}},{"start":{"line":892,"column":14},"end":{"line":892,"column":14}}]},"136":{"line":904,"type":"if","locations":[{"start":{"line":904,"column":13},"end":{"line":904,"column":13}},{"start":{"line":904,"column":13},"end":{"line":904,"column":13}}]},"137":{"line":904,"type":"binary-expr","locations":[{"start":{"line":904,"column":17},"end":{"line":904,"column":43}},{"start":{"line":904,"column":47},"end":{"line":904,"column":73}}]},"138":{"line":908,"type":"if","locations":[{"start":{"line":908,"column":10},"end":{"line":908,"column":10}},{"start":{"line":908,"column":10},"end":{"line":908,"column":10}}]},"139":{"line":916,"type":"if","locations":[{"start":{"line":916,"column":13},"end":{"line":916,"column":13}},{"start":{"line":916,"column":13},"end":{"line":916,"column":13}}]},"140":{"line":920,"type":"if","locations":[{"start":{"line":920,"column":10},"end":{"line":920,"column":10}},{"start":{"line":920,"column":10},"end":{"line":920,"column":10}}]},"141":{"line":928,"type":"if","locations":[{"start":{"line":928,"column":13},"end":{"line":928,"column":13}},{"start":{"line":928,"column":13},"end":{"line":928,"column":13}}]},"142":{"line":932,"type":"if","locations":[{"start":{"line":932,"column":10},"end":{"line":932,"column":10}},{"start":{"line":932,"column":10},"end":{"line":932,"column":10}}]},"143":{"line":947,"type":"if","locations":[{"start":{"line":947,"column":4},"end":{"line":947,"column":4}},{"start":{"line":947,"column":4},"end":{"line":947,"column":4}}]},"144":{"line":952,"type":"if","locations":[{"start":{"line":952,"column":4},"end":{"line":952,"column":4}},{"start":{"line":952,"column":4},"end":{"line":952,"column":4}}]},"145":{"line":952,"type":"binary-expr","locations":[{"start":{"line":952,"column":8},"end":{"line":952,"column":30}},{"start":{"line":952,"column":34},"end":{"line":952,"column":48}}]},"146":{"line":957,"type":"if","locations":[{"start":{"line":957,"column":4},"end":{"line":957,"column":4}},{"start":{"line":957,"column":4},"end":{"line":957,"column":4}}]},"147":{"line":957,"type":"binary-expr","locations":[{"start":{"line":957,"column":8},"end":{"line":957,"column":29}},{"start":{"line":957,"column":33},"end":{"line":957,"column":59}},{"start":{"line":958,"column":8},"end":{"line":958,"column":34}},{"start":{"line":958,"column":38},"end":{"line":958,"column":69}}]},"148":{"line":960,"type":"if","locations":[{"start":{"line":960,"column":11},"end":{"line":960,"column":11}},{"start":{"line":960,"column":11},"end":{"line":960,"column":11}}]},"149":{"line":985,"type":"if","locations":[{"start":{"line":985,"column":4},"end":{"line":985,"column":4}},{"start":{"line":985,"column":4},"end":{"line":985,"column":4}}]},"150":{"line":985,"type":"binary-expr","locations":[{"start":{"line":985,"column":7},"end":{"line":985,"column":12}},{"start":{"line":985,"column":16},"end":{"line":985,"column":38}},{"start":{"line":985,"column":42},"end":{"line":985,"column":59}}]},"151":{"line":987,"type":"if","locations":[{"start":{"line":987,"column":11},"end":{"line":987,"column":11}},{"start":{"line":987,"column":11},"end":{"line":987,"column":11}}]},"152":{"line":987,"type":"binary-expr","locations":[{"start":{"line":987,"column":14},"end":{"line":987,"column":19}},{"start":{"line":987,"column":23},"end":{"line":987,"column":37}}]},"153":{"line":989,"type":"if","locations":[{"start":{"line":989,"column":11},"end":{"line":989,"column":11}},{"start":{"line":989,"column":11},"end":{"line":989,"column":11}}]},"154":{"line":1011,"type":"if","locations":[{"start":{"line":1011,"column":4},"end":{"line":1011,"column":4}},{"start":{"line":1011,"column":4},"end":{"line":1011,"column":4}}]},"155":{"line":1011,"type":"binary-expr","locations":[{"start":{"line":1011,"column":7},"end":{"line":1011,"column":12}},{"start":{"line":1011,"column":16},"end":{"line":1011,"column":43}},{"start":{"line":1011,"column":47},"end":{"line":1011,"column":64}}]},"156":{"line":1013,"type":"if","locations":[{"start":{"line":1013,"column":11},"end":{"line":1013,"column":11}},{"start":{"line":1013,"column":11},"end":{"line":1013,"column":11}}]},"157":{"line":1039,"type":"if","locations":[{"start":{"line":1039,"column":4},"end":{"line":1039,"column":4}},{"start":{"line":1039,"column":4},"end":{"line":1039,"column":4}}]},"158":{"line":1060,"type":"if","locations":[{"start":{"line":1060,"column":4},"end":{"line":1060,"column":4}},{"start":{"line":1060,"column":4},"end":{"line":1060,"column":4}}]},"159":{"line":1060,"type":"binary-expr","locations":[{"start":{"line":1060,"column":7},"end":{"line":1060,"column":12}},{"start":{"line":1060,"column":16},"end":{"line":1060,"column":43}},{"start":{"line":1060,"column":47},"end":{"line":1060,"column":64}}]},"160":{"line":1062,"type":"if","locations":[{"start":{"line":1062,"column":11},"end":{"line":1062,"column":11}},{"start":{"line":1062,"column":11},"end":{"line":1062,"column":11}}]},"161":{"line":1096,"type":"if","locations":[{"start":{"line":1096,"column":4},"end":{"line":1096,"column":4}},{"start":{"line":1096,"column":4},"end":{"line":1096,"column":4}}]},"162":{"line":1096,"type":"binary-expr","locations":[{"start":{"line":1096,"column":7},"end":{"line":1096,"column":12}},{"start":{"line":1096,"column":16},"end":{"line":1096,"column":48}},{"start":{"line":1096,"column":52},"end":{"line":1096,"column":69}}]},"163":{"line":1098,"type":"if","locations":[{"start":{"line":1098,"column":11},"end":{"line":1098,"column":11}},{"start":{"line":1098,"column":11},"end":{"line":1098,"column":11}}]},"164":{"line":1128,"type":"if","locations":[{"start":{"line":1128,"column":4},"end":{"line":1128,"column":4}},{"start":{"line":1128,"column":4},"end":{"line":1128,"column":4}}]},"165":{"line":1128,"type":"binary-expr","locations":[{"start":{"line":1128,"column":7},"end":{"line":1128,"column":12}},{"start":{"line":1128,"column":16},"end":{"line":1128,"column":40}},{"start":{"line":1128,"column":44},"end":{"line":1128,"column":61}}]},"166":{"line":1130,"type":"if","locations":[{"start":{"line":1130,"column":11},"end":{"line":1130,"column":11}},{"start":{"line":1130,"column":11},"end":{"line":1130,"column":11}}]},"167":{"line":1161,"type":"if","locations":[{"start":{"line":1161,"column":4},"end":{"line":1161,"column":4}},{"start":{"line":1161,"column":4},"end":{"line":1161,"column":4}}]},"168":{"line":1179,"type":"if","locations":[{"start":{"line":1179,"column":4},"end":{"line":1179,"column":4}},{"start":{"line":1179,"column":4},"end":{"line":1179,"column":4}}]},"169":{"line":1179,"type":"binary-expr","locations":[{"start":{"line":1179,"column":7},"end":{"line":1179,"column":12}},{"start":{"line":1179,"column":16},"end":{"line":1179,"column":45}},{"start":{"line":1179,"column":49},"end":{"line":1179,"column":66}}]},"170":{"line":1181,"type":"if","locations":[{"start":{"line":1181,"column":11},"end":{"line":1181,"column":11}},{"start":{"line":1181,"column":11},"end":{"line":1181,"column":11}}]},"171":{"line":1225,"type":"if","locations":[{"start":{"line":1225,"column":4},"end":{"line":1225,"column":4}},{"start":{"line":1225,"column":4},"end":{"line":1225,"column":4}}]},"172":{"line":1225,"type":"binary-expr","locations":[{"start":{"line":1225,"column":7},"end":{"line":1225,"column":12}},{"start":{"line":1225,"column":16},"end":{"line":1225,"column":40}}]},"173":{"line":1227,"type":"if","locations":[{"start":{"line":1227,"column":11},"end":{"line":1227,"column":11}},{"start":{"line":1227,"column":11},"end":{"line":1227,"column":11}}]},"174":{"line":1227,"type":"binary-expr","locations":[{"start":{"line":1227,"column":14},"end":{"line":1227,"column":19}},{"start":{"line":1227,"column":23},"end":{"line":1227,"column":33}},{"start":{"line":1227,"column":37},"end":{"line":1227,"column":54}}]},"175":{"line":1249,"type":"if","locations":[{"start":{"line":1249,"column":4},"end":{"line":1249,"column":4}},{"start":{"line":1249,"column":4},"end":{"line":1249,"column":4}}]},"176":{"line":1249,"type":"binary-expr","locations":[{"start":{"line":1249,"column":7},"end":{"line":1249,"column":12}},{"start":{"line":1249,"column":16},"end":{"line":1249,"column":50}},{"start":{"line":1249,"column":54},"end":{"line":1249,"column":68}}]},"177":{"line":1251,"type":"if","locations":[{"start":{"line":1251,"column":11},"end":{"line":1251,"column":11}},{"start":{"line":1251,"column":11},"end":{"line":1251,"column":11}}]},"178":{"line":1270,"type":"if","locations":[{"start":{"line":1270,"column":6},"end":{"line":1270,"column":6}},{"start":{"line":1270,"column":6},"end":{"line":1270,"column":6}}]},"179":{"line":1287,"type":"if","locations":[{"start":{"line":1287,"column":4},"end":{"line":1287,"column":4}},{"start":{"line":1287,"column":4},"end":{"line":1287,"column":4}}]},"180":{"line":1287,"type":"binary-expr","locations":[{"start":{"line":1287,"column":7},"end":{"line":1287,"column":12}},{"start":{"line":1287,"column":16},"end":{"line":1287,"column":51}},{"start":{"line":1287,"column":55},"end":{"line":1287,"column":71}}]},"181":{"line":1289,"type":"if","locations":[{"start":{"line":1289,"column":11},"end":{"line":1289,"column":11}},{"start":{"line":1289,"column":11},"end":{"line":1289,"column":11}}]},"182":{"line":1291,"type":"if","locations":[{"start":{"line":1291,"column":11},"end":{"line":1291,"column":11}},{"start":{"line":1291,"column":11},"end":{"line":1291,"column":11}}]},"183":{"line":1291,"type":"binary-expr","locations":[{"start":{"line":1291,"column":14},"end":{"line":1291,"column":31}},{"start":{"line":1291,"column":35},"end":{"line":1291,"column":45}}]},"184":{"line":1314,"type":"binary-expr","locations":[{"start":{"line":1314,"column":16},"end":{"line":1314,"column":27}},{"start":{"line":1314,"column":31},"end":{"line":1314,"column":33}}]},"185":{"line":1329,"type":"binary-expr","locations":[{"start":{"line":1329,"column":16},"end":{"line":1329,"column":27}},{"start":{"line":1329,"column":31},"end":{"line":1329,"column":33}}]},"186":{"line":1330,"type":"binary-expr","locations":[{"start":{"line":1330,"column":14},"end":{"line":1330,"column":20}},{"start":{"line":1330,"column":24},"end":{"line":1330,"column":27}}]},"187":{"line":1332,"type":"if","locations":[{"start":{"line":1332,"column":4},"end":{"line":1332,"column":4}},{"start":{"line":1332,"column":4},"end":{"line":1332,"column":4}}]},"188":{"line":1332,"type":"binary-expr","locations":[{"start":{"line":1332,"column":7},"end":{"line":1332,"column":14}},{"start":{"line":1332,"column":18},"end":{"line":1332,"column":35}},{"start":{"line":1332,"column":39},"end":{"line":1332,"column":43}},{"start":{"line":1332,"column":47},"end":{"line":1332,"column":53}}]},"189":{"line":1354,"type":"if","locations":[{"start":{"line":1354,"column":4},"end":{"line":1354,"column":4}},{"start":{"line":1354,"column":4},"end":{"line":1354,"column":4}}]},"190":{"line":1361,"type":"if","locations":[{"start":{"line":1361,"column":4},"end":{"line":1361,"column":4}},{"start":{"line":1361,"column":4},"end":{"line":1361,"column":4}}]},"191":{"line":1368,"type":"if","locations":[{"start":{"line":1368,"column":4},"end":{"line":1368,"column":4}},{"start":{"line":1368,"column":4},"end":{"line":1368,"column":4}}]}}}} \ No newline at end of file diff --git a/node_modules/terraformer/.coverage/index.html b/node_modules/terraformer/.coverage/index.html new file mode 100644 index 0000000..be0e549 --- /dev/null +++ b/node_modules/terraformer/.coverage/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
    +
    +

    + / +

    +
    +
    + 96.77% + Statements + 660/682 +
    +
    + 91.65% + Branches + 384/419 +
    +
    + 96.51% + Functions + 83/86 +
    +
    + 96.77% + Lines + 660/682 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    __root__/
    96.77%660/68291.65%384/41996.51%83/8696.77%660/682
    +
    +
    + + + + + + + diff --git a/node_modules/terraformer/.coverage/prettify.css b/node_modules/terraformer/.coverage/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/terraformer/.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/node_modules/terraformer/.coverage/prettify.js b/node_modules/terraformer/.coverage/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/terraformer/.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/node_modules/terraformer/.coverage/sort-arrow-sprite.png b/node_modules/terraformer/.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) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + 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/node_modules/terraformer/.npmignore b/node_modules/terraformer/.npmignore new file mode 100644 index 0000000..343abba --- /dev/null +++ b/node_modules/terraformer/.npmignore @@ -0,0 +1,14 @@ +examples +versions +source +out +docs +config.rb + +# Ignore Grunt temp files +.grunt + +# SASS +.sass-cache + +playing-around.js \ No newline at end of file diff --git a/node_modules/terraformer/.travis.yml b/node_modules/terraformer/.travis.yml new file mode 100755 index 0000000..d98c3f0 --- /dev/null +++ b/node_modules/terraformer/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +sudo: false +before_install: npm install -g grunt-cli +node_js: + - "6" + - "4" +cache: + directories: + - node_modules diff --git a/node_modules/terraformer/CHANGELOG.md b/node_modules/terraformer/CHANGELOG.md new file mode 100644 index 0000000..cafb346 --- /dev/null +++ b/node_modules/terraformer/CHANGELOG.md @@ -0,0 +1,78 @@ +# Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## [unreleased] + +## [1.0.8] - 2017-04-24 + +### Changed +* removed `.sass-cache` and another local debugging file from npm package + +## [1.0.7] - 2016-10-17 + +### Fixed +* ensure that contains()/within() can compare the geometry of GeoJSON feature objects. [#281](https://github.com/Esri/Terraformer/issues/281) + +### Removed +* the minified library and archived versions have been removed from source control + +## [1.0.6] - 2016-08-17 + +### Added +* typings for TypeScript folks (thx [@JeffJacobson](https://github.com/JeffJacobson)) [#20](https://github.com/Esri/terraformer-wkt-parser/pull/20) +* lots of little website improvements + +## [1.0.5] - 2015-03-14 + +### Changed + +* Use Jarvis March for convex hulls + +## [1.0.4] - 2014-08-06 + +### Fixed + +* Internal improvements to `addVertex()` and `arrayIntersectsArrays` + +### Added + +* new `isConvex()` method + +## [1.0.3] - 2014-02-24 + +### Fixed + +* MultiPolygons can now be closed with the `multipolygon.close()` method. +* Circles are now closed properly [#234](https://github.com/Esri/Terraformer/pull/234) + +## [1.0.2] - 2013-12-16 + +This release fixes several issues related to convexHull and ensures the Polygons are closed under a variety of situations. + +### Breaking Changes + +primitive.convexHull() now always returns null or a valid Terraformer.Polygon. It will not return arrays or throw errors. + +### Fixed + +* `Terraformer.Circle` is now closed. +* `Polygon`s returned by `primitive.convexHull()` are now closed. + +### Added + +* `primitive.convexHull()`` will now handle features. + +## [1.0.1] - 2013-11-12 + +Initial Release + +[unreleased]: https://github.com/Esri/Terraformer/compare/v1.0.8...HEAD +[1.0.8]: https://github.com/Esri/Terraformer/compare/v1.0.7...v1.0.8 +[1.0.7]: https://github.com/Esri/Terraformer/compare/v1.0.6...v1.0.7 +[1.0.6]: https://github.com/Esri/Terraformer/compare/v1.0.5...v1.0.6 +[1.0.5]: https://github.com/Esri/Terraformer/compare/v1.0.4...v1.0.5 +[1.0.4]: https://github.com/Esri/Terraformer/compare/v1.0.3...v1.0.4 +[1.0.3]: https://github.com/Esri/Terraformer/compare/v1.0.2...v1.0.3 +[1.0.2]: https://github.com/Esri/Terraformer/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/Esri/Terraformer/releases/tag/v1.0.1 diff --git a/node_modules/terraformer/Gemfile b/node_modules/terraformer/Gemfile new file mode 100644 index 0000000..7ae8f88 --- /dev/null +++ b/node_modules/terraformer/Gemfile @@ -0,0 +1,7 @@ +# If you have OpenSSL installed, we recommend updating +# the following line to use "https" +source 'http://rubygems.org' + +gem "middleman", "~>3.1.6" +gem "middleman-rouge" +gem "redcarpet" \ No newline at end of file diff --git a/node_modules/terraformer/Gemfile.lock b/node_modules/terraformer/Gemfile.lock new file mode 100644 index 0000000..d73c50d --- /dev/null +++ b/node_modules/terraformer/Gemfile.lock @@ -0,0 +1,101 @@ +GEM + remote: http://rubygems.org/ + specs: + activesupport (3.2.21) + i18n (~> 0.6, >= 0.6.4) + multi_json (~> 1.0) + chunky_png (1.3.4) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.9.1.1) + compass (1.0.3) + chunky_png (~> 1.2) + compass-core (~> 1.0.2) + compass-import-once (~> 1.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + sass (>= 3.3.13, < 3.5) + compass-core (1.0.3) + multi_json (~> 1.0) + sass (>= 3.3.0, < 3.5) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + execjs (1.4.1) + multi_json (~> 1.0) + ffi (1.9.8) + haml (4.0.6) + tilt + hike (1.2.3) + i18n (0.6.11) + kramdown (1.7.0) + listen (1.3.1) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + rb-kqueue (>= 0.2) + middleman (3.1.6) + coffee-script (~> 2.2.0) + compass (>= 0.12.2) + execjs (~> 1.4.0) + haml (>= 3.1.6) + kramdown (~> 1.2) + middleman-core (= 3.1.6) + middleman-more (= 3.1.6) + middleman-sprockets (>= 3.1.2) + sass (>= 3.1.20) + uglifier (~> 2.1.0) + middleman-core (3.1.6) + activesupport (~> 3.2.6) + bundler (~> 1.1) + i18n (~> 0.6.1) + listen (~> 1.1) + rack (>= 1.4.5) + rack-test (~> 0.6.1) + thor (>= 0.15.2, < 2.0) + tilt (~> 1.3.6) + middleman-more (3.1.6) + middleman-rouge (0.0.1) + middleman-core (>= 3.0.0) + redcarpet (>= 2.2.0) + rouge (>= 0.3.0) + middleman-sprockets (3.1.4) + middleman-core (>= 3.0.14) + middleman-more (>= 3.0.14) + sprockets (~> 2.1) + sprockets-helpers (~> 1.0.0) + sprockets-sass (~> 1.0.0) + multi_json (1.11.1) + rack (1.6.1) + rack-test (0.6.3) + rack (>= 1.0) + rb-fsevent (0.9.5) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rb-kqueue (0.2.4) + ffi (>= 0.5.0) + redcarpet (3.3.1) + rouge (1.9.0) + sass (3.4.14) + sprockets (2.12.3) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-helpers (1.0.1) + sprockets (~> 2.0) + sprockets-sass (1.0.3) + sprockets (~> 2.0) + tilt (~> 1.1) + thor (0.19.1) + tilt (1.3.7) + uglifier (2.1.2) + execjs (>= 0.3.0) + multi_json (~> 1.0, >= 1.0.2) + +PLATFORMS + ruby + +DEPENDENCIES + middleman (~> 3.1.6) + middleman-rouge + redcarpet diff --git a/node_modules/terraformer/LICENSE b/node_modules/terraformer/LICENSE new file mode 100755 index 0000000..7365790 --- /dev/null +++ b/node_modules/terraformer/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2013 Esri, Inc + +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/node_modules/terraformer/README.md b/node_modules/terraformer/README.md new file mode 100755 index 0000000..92e299e --- /dev/null +++ b/node_modules/terraformer/README.md @@ -0,0 +1,125 @@ +# Terraformer + +[![Build Status](https://travis-ci.org/Esri/Terraformer.svg?branch=master)](https://travis-ci.org/Esri/Terraformer) + +> A modular toolkit for working with geographic data. + +## Modules + +The Terraformer project is broken up into a series of smaller modules. + +* [Terraformer Core](http://terraformer.io/core/) - Contains methods and objects for working with GeoJSON. This also contains common methods used by other modules. +* [WKT Parser](http://terraformer.io/wkt-parser/) - Parse Well Known Text into GeoJSON and vice versa. +* [ArcGIS Geometry Parser](http://terraformer.io/arcgis-parser/) - Parse the [ArcGIS Geometry Format](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Geometry_Objects/02r3000000n1000000/) into GeoJSON and vice versa. +* [GeoStore](http://terraformer.io/geostore/) - A framework for persisting and querying GeoJSON features with pluggable indexes and persistent stores. + +## Features + +* Designed to work in Node and the browser +* No dependencies on other tools or libraries + +## Getting Started + +Check out the getting [started guide](http://terraformer.io/getting-started/) which will give you an overview of core concepts and methods in Terraformer. + +### Node.js + +Install the core module with npm and then require it in your Node program. + +``` +$ npm install terraformer +``` + +```js +var Terraformer = require('terraformer'); +``` + +If needed, supporting packages can be added too. + +```js +require('terraformer-arcgis-parser'); +require('terraformer-wkt-parser'); +require('terraformer-geostore'); +``` + +### Browser + +To see Terraformer in action in the browser, check out our [live demos](http://terraformer.io/examples/browser/index.html). To use it in the browser yourself, reference it using a ` +``` + +To utilize supporting packages, you must load their source as well. + +```html + + +``` + +## Documentation + +Make sure you check out the full documentation on the [Terraformer website](http://terraformer.io/core/) and the [getting started guide](http://terraformer.io/getting-started/). + +```js +var polygon = new Terraformer.Primitive({ + "type": "Polygon", + "coordinates": [ + [ + [-122.665894, 45.5229015], + [-122.669263, 45.5229165], + [-122.671151, 45.5184062], + [-122.673254, 45.5140008], + [-122.668426, 45.5127378], + [-122.667654, 45.5169478], + [-122.665894, 45.5229015] + ] + ] +}); + +var point = new Terraformer.Primitive({ + "type": "Point", + "coordinates": [-122.669477, 45.517760] +}); +``` + +Now that you have a point and a polygon primitive you can use the primitive helper methods. + +```js +// add a new vertex to our polygon +polygon.insertVertex([-122.670851, 45.513189], 2); + +// figure out if our point is within our polygon +point.within(polygon); // returns true +``` + +You can also have Terraformer perform many geometric operations like convex hulls and bounding boxes. + +```js +var convexHull = polygon.convexHull(); + +point.within(convexHull); // returns true + +var boundingBox = polygon.bbox(); // returns the geojson bounding box for this object. +``` + +## Resources + +* [Documentation Site](http://terraformer.io) +* [@EsriPDX](http://twitter.com/esripdx) + +## Building the documentation + +To build the site locally, first `bundle install` then `bundle exec middleman` to run a local server. Maintainers can run `bundle exec middleman build`, then `grunt gh-pages` to deploy to github pages. + +## Issues + +Find a bug or want to request a new feature? Please let us know by submitting an issue. + +## Contributing + +Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing). + +## Licensing + +A copy of the license is available in the repository's [LICENSE](./LICENSE) file. diff --git a/node_modules/terraformer/bower.json b/node_modules/terraformer/bower.json new file mode 100644 index 0000000..c0e3fb9 --- /dev/null +++ b/node_modules/terraformer/bower.json @@ -0,0 +1,13 @@ +{ + "name": "terraformer", + "main": "terraformer.min.js", + "ignore": [ + "docs", + "examples", + "spec", + "versions", + "source", + "Gemfile", + "config.rb" + ] +} diff --git a/node_modules/terraformer/docs-build/CNAME b/node_modules/terraformer/docs-build/CNAME new file mode 100644 index 0000000..50fee9f --- /dev/null +++ b/node_modules/terraformer/docs-build/CNAME @@ -0,0 +1 @@ +terraformer.io \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/arcgis-parser/index.html b/node_modules/terraformer/docs-build/arcgis-parser/index.html new file mode 100644 index 0000000..e8da289 --- /dev/null +++ b/node_modules/terraformer/docs-build/arcgis-parser/index.html @@ -0,0 +1,197 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    ArcGIS JSON Parser

    + + +

    This plugin handles two-way conversion between GeoJSON and the ArcGIS Geometry format used by Esri.

    +

    + + Link + Using the ArcGIS JSON Parser + Back to Top +

    +

    The ArcGIS parser can be used client-side in a browser and server-side via Node.js.

    +
    // parse an ArcGIS Geometry to GeoJSON
    +var geojsonPoint = Terraformer.ArcGIS.parse({
    +  "x":-122.6764,
    +  "y":45.5165,
    +  "spatialReference": {
    +    "wkid": 4326
    +  }
    +});
    +
    +// convert a GeoJSON object into an ArcGIS geometry
    +var arcgisPoint = Terraformer.ArcGIS.convert({
    +  "type": "Point",
    +  "coordinates": [45.5165, -122.6764]
    +});
    +
    +

    + + Link + Using in the Browser + Back to Top +

    +

    In the browser, the core Terraformer library is required.

    +
    <script src="terraformer.min.js"></script>
    +<script src="terraformer-arcgis-parser.min.js"></script>
    +<script>
    +  // Terraformer and Terraformer.ArcGIS will be defined.
    +</script>
    +
    + +

    You can also use Bower to install the components if you like, or download them and host them yourself.

    +
    $ bower install terraformer-arcgis-parser
    +
    +

    + + Link + Using in Node.js + Back to Top +

    +

    Just install the package from npm with $ npm install terraformer-arcgis-parser Then include it in your application.

    +
    Terraformer.ArcGIS = require('terraformer-arcgis-parser');
    +
    +// Start parsing and converting!
    +
    +

    + + Link + Methods + Back to Top +

    + + Link + ArcGIS.parse(json, options) + Back to Top +

    +

    Terraformer.ArcGIS.parse(json, options) - Converts from ArcGIS JSON to GeoJSON or a Terraformer.Primitive.

    + + + + + + + + + + + + + + + +
    OptionTypeDefaultDescription
    idAttributeString"OBJECTID"By default, when converting GeoJSON Features the id key of your output feature will be set on the OBJECTID field. This option allows you to assign your ID using a different fieldname.
    +
    Notes
    +

    Terraformer will also handle converting FeatureCollection and GeometryCollection objects to arrays of ArcGIS geometries or features. However it will not do this in reverse. This is because there is no official structure for arrays of features and geometries in ArcGIS and output features will be missing an id property. See this issue for more details.

    +
    Example
    // parse an ArcGIS Geometry to GeoJSON
    +var point = Terraformer.ArcGIS.parse({
    +  "x":-122.6764,
    +  "y":45.5165,
    +  "spatialReference": {
    +    "wkid": 4326
    +  }
    +});
    +
    +

    + + Link + ArcGIS.convert(geojson, options) + Back to Top +

    +

    Terraformer.ArcGIS.convert(geoJSON, options) will convert GeoJSON or a Terraformer Primitive to ArcGIS JSON.

    + + + + + + + + + + + + + + + + + + + + + +
    OptionTypeDefaultDescription
    srNumber4326This is used to set the value of spatialReference.wkid in the output. Setting sr does not convert the geojson coordinates, it only identifies the projection using the appropriate code.
    idAttributeString"OBJECTID" "FID"When converting ArcGIS Feature the attributes will contain the ID of the feature. This is usually called OBJECTID or FID. If your feature does not use the OBJECTID or FID keys as its ID, you should define what the key representing your Features ID is.
    +
    Notes
    +

    If the geometry is in the Web Mercator spatial reference it will be reprojected to WGS84.

    +
    Example
    // take a Terraformer.Primitive or GeoJSON and convert it to an ArcGIS JSON object
    +var point = ArcGIS.convert({
    +  "type": "Point",
    +  "coordinates": [45.5165, -122.6764]
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/css/terraformer-02847305.css b/node_modules/terraformer/docs-build/assets/css/terraformer-02847305.css new file mode 100644 index 0000000..335da2d --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/css/terraformer-02847305.css @@ -0,0 +1 @@ +@import url(http://fonts.googleapis.com/css?family=Cardo:700,400italic);@import url(http://fonts.googleapis.com/css?family=PT+Mono);@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700);html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio[controls],canvas,video{display:inline-block;zoom:1}a:hover,a:active{outline:0}svg:not(:root){overflow:hidden}a,abbr,acronym,address,b,big,cite,code,del,em,i,ins,kbd,mark,output,q,samp,small,strike,strong,sub,sup,time,tt,var,dfn,dl,dt,dd,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6,p,pre,applet,canvas,embed,figure,figcaption,iframe,img,object{background:transparent;border:0;font-size:100%;font:inherit;line-height:1.0;margin:0;padding:0;vertical-align:baseline}body{background-color:#EAE8E5;color:#333333;font-family:'Lucida Grande', 'Lucida Sans Unicode', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility}h1{font-size:2.375rem;line-height:3rem;margin-top:0;padding-top:0.54167rem;margin-bottom:-0.54167rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h2{font-size:2rem;line-height:3rem;margin-top:0;padding-top:0.66667rem;margin-bottom:-0.66667rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h3{font-size:1.5rem;line-height:1.5rem;margin-top:0;padding-top:0.25rem;margin-bottom:-0.25rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h4{font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h5{font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h6{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;padding-bottom:1.5rem}h1,h2,h3,h4,h5,h6{margin-top:2rem;position:relative}h1:hover .header-link,h2:hover .header-link,h3:hover .header-link,h4:hover .header-link,h5:hover .header-link,h6:hover .header-link{display:block}p{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;padding-bottom:1.5rem}a{color:#B26A61;border-bottom:1px dashed;padding-bottom:0.25rem;text-decoration:none}a:hover{color:#d3aba6;border-bottom:1px dashed}a code{color:#B26A61}li{padding-bottom:0.75rem}blockquote{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;margin-left:0;padding-top:1.5rem;padding-bottom:1.5rem}b,strong{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility}em,cite{font-family:'Open Sans', sans-serif;font-style:italic;font-weight:400;text-rendering:optimizeLegibility}small{font-size:0.75rem;line-height:1.16667rem}sub,sup{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;font-size:75%;line-height:0;position:relative;vertical-align:baseline;padding-left:0.08333rem;padding-right:0.08333rem}sup{top:-0.5em}sub{bottom:-0.25em}code{font-family:'PT Mono', sans-serif;letter-spacing:0.08333rem;padding:3px;color:#72a983}code em{color:gray}pre{font-family:'PT Mono', sans-serif;letter-spacing:0.08333rem;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem;line-height:1.5rem;margin-bottom:1.5rem;overflow-x:auto;display:block;padding:1rem;background:#002b36;color:#839496}@media screen and (max-width: 960px){pre{width:90%}}pre code{display:block;overflow:auto;word-wrap:normal;padding:1.5rem;line-height:1.125rem}ul,ol{margin-bottom:1.16667rem}ul li:first-child,ol li:first-child{margin-top:0.33333rem}ul ul,ul ol,ol ul,ol ol{margin-top:-0.5rem}ul ul li:first-child,ul ol li:first-child,ol ul li:first-child,ol ol li:first-child{margin-top:0.5rem}ul ol,ol ol{list-style-type:lower-alpha}nav ul li:first-child,nav ol li:first-child{margin-top:0}dl{margin-top:0}dl dt{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem}dl dd{margin:0;font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem}dl.horizontal{padding-top:0.5rem}dl.horizontal dt{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem;float:left}dl.horizontal dd{margin-left:12rem;font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem}table{width:100%;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem;border-spacing:0;border-collapse:collapse;border:1px solid #c8c3bb;margin-bottom:1.5rem}table thead{background:#d3cfc9}table thead th{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;text-align:left}table th,table td{padding:0.5rem;border-bottom:1px solid #c8c3bb}table tbody tr:nth-child(even){background:#dfdcd7}.button{display:inline-block;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem;padding:0.5rem 1rem;background-color:#595959;color:white;border:1px solid #404040;text-decoration:none}.button:hover{color:white;background-color:#404040}.button.button-light{background-color:#a6a6a6;border:1px solid #8c8c8c}.button.button-light:hover{color:white;background-color:#92BC9F;border:1px solid #72a983}.button.button-green{background-color:#92BC9F;border:1px solid #72a983}.button.button-green:hover{background-color:#72a983}.button.button-blue{background-color:#7EB3FE;border:1px solid #4b95fe}.button.button-blue:hover{background-color:#4b95fe}.button.button-red{background-color:#B26A61;border:1px solid #975249}.button.button-red:hover{background-color:#975249}.button.button-disabled,.button.button:disabled{background-color:#ededed;border:1px solid #d4d4d4;color:#a6a6a6}.button.button-disabled:hover,.button.button:disabled:hover{background-color:#ededed}.button.button-cancel{background-color:gray;border:1px solid #666666}.button.button-cancel:hover{background-color:#666666}.c{color:#586e75}.cm{color:#586e75}.cp{color:#586e75}.c1{color:#586e75}.cs{color:#586e75}.err{color:#dc322f}.k{color:#cb4b16}.o{color:#93a1a1}.p{color:#93a1a1}.ow{color:#2aa198}.gd{color:#93a1a1;display:inline-block}.gd .x{color:#93a1a1;display:inline-block}.ge{color:#93a1a1}.gr{color:#aa0000}.gh{color:#586e75}.gi{color:#93a1a1;display:inline-block}.gi .x{color:#93a1a1;display:inline-block}.go{color:#888888}.gp{color:#555555}.gs{color:#93a1a1}.gu{color:#6c71c4}.gt{color:#aa0000}.kc{color:#859900}.kd{color:#268bd2}.kp{color:#cb4b16}.kr{color:#d33682}.kt{color:#2aa198}.n{color:#268bd2}.na{color:#268bd2}.nb{color:#859900}.nc{color:#d33682}.no{color:#b58900}.ni{color:#800080}.nl{color:#859900}.ne{color:#268bd2}.nf{color:#268bd2}.nn{color:#b58900}.nt{color:#268bd2}.nx{color:#b58900}.bp{color:#999999}.vc{color:#008080}.vg{color:#268bd2}.vi{color:#268bd2}.nv{color:#268bd2}.w{color:#bbbbbb}.mf{color:#2aa198}.m{color:#2aa198}.mh{color:#2aa198}.mi{color:#2aa198}.mo{color:#009999}.s{color:#2aa198}.sb{color:#d14}.sc{color:#d14}.sd{color:#2aa198}.s2{color:#2aa198}.se{color:#dc322f}.sh{color:#d14}.si{color:#268bd2}.sx{color:#d14}.sr{color:#2aa198}.s1{color:#2aa198}.ss{color:#990073}.il{color:#009999}div .gd,div .gd .x,div .gi,div .gi .x{display:inline-block;width:100%}#wrap{overflow:hidden}.index,.docs{max-width:1680px;margin:auto;padding-top:3rem;padding-bottom:3rem;padding-left:18.75%;width:80%}@media screen and (max-width: 960px){.index,.docs{padding-left:18.75%;padding-right:18.75%}}@media screen and (max-width: 662px){.index,.docs{padding-left:9.375%;padding-right:9.375%}}.index .subhead,.docs .subhead{position:relative;background-color:transparent;padding-top:1.5rem;clear:both}.index .subhead h2,.docs .subhead h2{font-size:2.375rem;line-height:3rem;margin-top:0;padding-top:0.54167rem;margin-bottom:-0.54167rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;margin-bottom:-0.91667rem;line-height:3rem}.index .subhead h3,.docs .subhead h3{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem}.index .subhead img,.docs .subhead img{margin:auto;position:absolute;margin-left:-31.25%;width:25%}@media screen and (max-width: 960px){.index .subhead img,.docs .subhead img{display:none}}.index h4,.docs h4{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:700;text-rendering:optimizeLegibility;font-size:1.125rem;line-height:1.5rem;margin-top:0;padding-top:0.375rem;margin-bottom:-0.375rem}.index p,.docs p{width:62.5%}@media screen and (max-width: 960px){.index p,.docs p{width:100%}}.index blockquote,.docs blockquote{float:right;max-width:37.5%;padding-top:1rem}@media screen and (max-width: 960px){.index blockquote,.docs blockquote{float:none;max-width:100%;padding-bottom:0;text-align:center}}.index blockquote p,.docs blockquote p{color:#589069;font-family:'PT Mono', sans-serif;font-size:1.5rem;line-height:1.5rem;margin-top:0;padding-top:0.25rem;margin-bottom:-0.25rem;max-width:100%;min-width:0;line-height:2.25rem;padding-left:2em}@media screen and (max-width: 960px){.index blockquote p,.docs blockquote p{padding-left:0}}.index .button-light,.docs .button-light{color:white}.index aside,.docs aside{width:18.75%}.docs{padding-left:0}.docs pre{padding-left:1em;margin-left:37.5%;width:63%}.docs table{margin-left:37.5%;width:62.5%}.docs aside{width:18.75%;padding-left:0;float:left;z-index:150}.docs main{overflow:hidden;*zoom:1;width:62.5%;padding-top:4.5rem}.docs p{width:62.5%;padding-left:18.75%}.docs img{width:31.25%;margin-left:18.75%;display:block;padding-bottom:1.5rem}@media screen and (max-width: 960px){.docs img{width:41.25%}}.index{padding-left:18.75%;width:60%}.container{max-width:1680px}.docs h1,.docs h2,.docs h3,.docs h4,.docs h5,.docs h6,.docs ol,.docs ul,.docs p{padding-left:37.5%;z-index:1}.docs li{font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem}aside.docs{position:absolute;float:left;padding-left:0;margin-top:1.5rem;z-index:100}aside.docs ul{padding-left:18.75%;list-style-type:none}aside.docs li{z-index:2;padding-bottom:0.75rem}aside.docs a:hover{color:#72a983}nav{top:0;left:0;right:0;background:#1D2D42;position:fixed;padding-bottom:0.5rem;display:block;z-index:250}nav ul{margin:auto;max-width:1680px;padding-bottom:0.25rem;padding-right:9.375%}nav ul li{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;text-transform:uppercase;letter-spacing:0.08333rem;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem;display:inline;float:right;padding:0.5rem 0.5rem}nav ul li:first-child{float:left;padding-left:9.375%}@media screen and (max-width: 662px){nav ul li:first-child{padding-left:9.375%}}nav ul li a{color:#fafafa;text-decoration:none;padding-bottom:0.08333rem}nav ul li a:hover{color:#92BC9F;border-bottom:1px dashed #92BC9F}.doctoc .container{padding-left:37.5%}.doctoc ul{padding-top:3rem;float:left;list-style-type:none}.doctoc li{margin-bottom:0.375rem}.doctoc .indent{padding-left:2em}.doctoc a{color:#ededed}.doctoc a:hover{color:#B26A61;background-color:transparent}.subnav{background-color:#1D2D42;overflow:hidden;*zoom:1}.subnav .container{max-width:1680px;margin:auto}.subnav section{text-align:center;float:left;width:25%;padding:0;margin:0}.subnav h4{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;font-size:1rem;line-height:1.5rem;margin-top:0;padding-top:0.33333rem;margin-bottom:-0.33333rem;padding:0.75rem 0 1.125rem 0}.subnav h4:hover{background-color:#0d151f}.subnav a{width:100%;margin:0.75rem 0;color:#ededed;text-decoration:none}.subnav a:hover{color:#ededed;background-color:#0d151f}footer{margin:0;padding-top:1.5rem;padding-bottom:0;width:100%;color:white;background-color:#333333;text-align:center}footer p{font-family:'Open Sans', sans-serif;font-style:normal;font-weight:400;text-rendering:optimizeLegibility;font-size:0.875rem;line-height:1.5rem;margin-top:0;padding-top:0.45833rem;margin-bottom:-0.45833rem}.cover{background:#39567F;padding:4.5rem 0 0;width:100%}@media screen and (max-width: 960px){.cover{padding-bottom:0}}.cover section{width:65%;margin:auto}.cover h1{padding:0;width:1em;margin:20px 0 0 48px;float:left;background-color:#ededed;font-size:256px;border-radius:0.5em}@media screen and (max-width: 960px){.cover h1{font-size:9em;margin:auto;text-align:center;float:none}}.cover h2{font-size:2.375rem;line-height:3rem;margin-top:0;padding-top:0.54167rem;margin-bottom:-0.54167rem;font-family:'PT Mono', sans-serif;color:#EAE8E5;padding-left:9em;margin-top:0;width:45%;padding-top:1.5rem}@media screen and (max-width: 960px){.cover h2{font-size:1.5rem;line-height:1.5rem;margin-top:0;padding-top:0.25rem;margin-bottom:-0.25rem;padding-top:1.5rem;margin:auto;text-align:center;width:100%;padding-left:0}}.cover .cover-actions{padding-left:21.5rem;padding-bottom:4.5rem;width:45%}@font-face{font-family:'esri-logo';src:url("../fonts/esri-logo-fc93d7bf.eot");src:url("../fonts/esri-logo-fc93d7bf.eot?#iefix") format("embedded-opentype"),url("../fonts/esri-logo-80bed756.woff") format("woff"),url("../fonts/esri-logo-71163913.ttf") format("truetype"),url("../fonts/esri-logo-3a94862e.svg#esri-Set") format("svg");font-weight:normal;font-style:normal}.icon{font-family:'esri-logo';-webkit-font-feature-settings:"liga","dlig";-moz-font-feature-settings:"liga=1, dlig=1";-moz-font-feature-settings:"liga","dlig";-ms-font-feature-settings:"liga","dlig";-o-font-feature-settings:"liga","dlig";font-feature-settings:"liga","dlig";text-rendering:optimizeLegibility;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;color:#6d6e71}.terraformer{color:rgba(38,122,64,0.5)}.terraformer:after{content:"terraformerfront";color:#000000;opacity:0.5;margin-left:-1em}.terraformer:before{content:"terraformerback";color:#912a1d;opacity:0.7;margin-right:-1em}.semantic-toc{position:absolute;z-index:100}.semantic-toc ol{float:left;padding-left:0}.semantic-toc ol li{line-height:1.5rem;padding-left:0;list-style-type:lower-roman}.semantic-toc ol li:first-child{margin-top:1.5rem}.semantic-toc ol li ol{padding-left:1.5rem;margin-bottom:0;float:none}.header-link,.back-to-top-link{font-size:0.75rem;line-height:1.5rem;margin-top:0;padding-top:0.58333rem;margin-bottom:-0.58333rem;font-family:'Open Sans', sans-serif;font-style:normal;font-weight:300;text-rendering:optimizeLegibility;border:none;display:none;position:absolute;margin-left:-3em;margin-right:0.5em;color:#c8c3bb;z-index:10}.header-link:hover,.back-to-top-link:hover{color:#a69d90;border:none}h2 .header-link,h2 .back-to-top-link{margin-top:0.66667rem}h3 .header-link,h3 .back-to-top-link{margin-top:-0.25rem}h4 .header-link,h4 .back-to-top-link{margin-top:-0.33333rem}.back-to-top-link{right:0;float:right;margin-left:0;margin-right:0}.section-link{border:none;position:absolute;height:40px;top:-40px;display:block;z-index:-100;opacity:0}h2 .header-link,h2 .back-to-top-link{margin-top:10px}h4 .header-link,h4 .back-to-top-link{margin-top:-7px}h2:hover .header-link,h2:hover .back-to-top-link,h3:hover .header-link,h3:hover .back-to-top-link,h4:hover .header-link,h4:hover .back-to-top-link,h5:hover .header-link,h5:hover .back-to-top-link,h6:hover .header-link,h6:hover .back-to-top-link{display:inline-block}.drawer{-webkit-transform:translate3d(0, 0, 0);background:transparent;background:transparent;overflow:hidden;position:fixed;visibility:hidden;z-index:200;bottom:0;height:100%;width:100%;left:0;right:0;top:0;-webkit-transition:all 400ms linear;-moz-transition:all 400ms linear;-ms-transition:all 400ms linear;-o-transition:all 400ms linear;transition:all 400ms linear}.drawer.active-left,.drawer.active-right,.drawer.active-top{visibility:visible;background-color:rgba(0,0,0,0.6);-webkit-transition:all 200ms linear;-moz-transition:all 200ms linear;-ms-transition:all 200ms linear;-o-transition:all 200ms linear;transition:all 200ms linear}.drawer-nav{list-style:none;width:280px;margin:0;padding:0;position:absolute;top:0;height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;background:white;-webkit-transition:all 300ms cubic-bezier(0.215, 0.44, 0.42, 0.88)}.drawer-left{-webkit-transform:translate3d(-280px, 0, 0);-moz-transform:translate3d(-280px, 0, 0);-ms-transform:translate3d(-280px, 0, 0);-o-transform:translate3d(-280px, 0, 0);transform:translate3d(-280px, 0, 0);left:0}.drawer.active-left .drawer-left{-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);transition:-webkit-transform 300ms cubic-bezier(0.215, 0.44, 0.42, 0.88)}.drawer-right{margin-left:100%;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.drawer.active-right .drawer-right{-webkit-transform:translate3d(-280px, 0, 0);-moz-transform:translate3d(-280px, 0, 0);-ms-transform:translate3d(-280px, 0, 0);-o-transform:translate3d(-280px, 0, 0);transform:translate3d(-280px, 0, 0);transition:-webkit-transform 300ms cubic-bezier(0.215, 0.44, 0.42, 0.88)}.drawer-top{padding-top:1.5rem;top:-525px;width:100%;height:500px;background-color:#92BC9F}.drawer.active-top .drawer-top{width:100%;-webkit-transform:translate3d(0, 500px, 0);-moz-transform:translate3d(0, 500px, 0);-ms-transform:translate3d(0, 500px, 0);-o-transform:translate3d(0, 500px, 0);transform:translate3d(0, 500px, 0);transition:-webkit-transform 300ms cubic-bezier(0.215, 0.44, 0.42, 0.88)}.drawer-open .main-content{min-height:100%;margin:auto} \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/fonts/esri-logo-3a94862e.svg b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-3a94862e.svg new file mode 100644 index 0000000..f13dc7e --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-3a94862e.svg @@ -0,0 +1,283 @@ + + + + +This is a custom SVG font generated by IcoMoon. + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/fonts/esri-logo-71163913.ttf b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-71163913.ttf new file mode 100644 index 0000000000000000000000000000000000000000..853dd561cc81adfae0e7e0c8eca2325c49242260 GIT binary patch literal 7860 zcmeHMdyHIHc|YGd_nvcKGjr#0=g!W~%+Ac+o!N&yyYt?)z3WHpbx0f%;@Ghj#CA#S z^%lQaZ-Pxhq=0xvEwlkuEiDy9Gzz7qAXHJQQq>kx%A*l2Rf#A{Ur4R03L=mIQMO=qi?!W#f z>VAUMI|GK{Uwa;XJ1CEzIk$N^{}lf)%Fm#D`s{@VSKoEum*38q!1!$W-0J0v?7egp z^(Rm+pI<$9>ci^MXBivW1n)x^FI?Ij|D8L($JnTc^5aae9Vz#~Hx8^M_WXdk91O<3 z);ScvnO}R3GkOkXi)~d8`p|RNo?{KoxT@J&()K4g;8f`zHZfr9hBV;q8#W{QK7D|h z%%UT78oa~9{0D4=y%RgeOzhM3w*GYr`8}r(J;e60)$d|fdJdRd`OzCQ&;t#gr?xVb z$B?Q>Eu@WMJ~PZ8MxH|IAhmTq?EOkIJwKfagLN_XI7)gS3d~@ak*Ams4urA?*&17C z7umz?%6AzwKtHSO6nJl78{2s7+F;h#KH+ak@>vEgv#hK;;2B{#mWR{~E3#2mVinW{ zs75+BX{=E1-ZLfQ!^hgeK$P`(cjg~6e0K+FkjLpVgseu2pc5(WQ zI3s>yyw7aNo_tm@O@P3JAnJDtaz$DNNj zPdLAiSz@<_+K+uqQiVg=>A9^S_!S$LKA zv5&JqW>2%{*$;`6LutxWm3B~*=4l^Pq$)GnR<9$gotDmPDEC^KYS^jwx}6yc+Cdbw zTlID;gF+Ws)EjnD=n`aPJF26FLh45Sc8I**5BptR9`x--$m_LwKO4$wt=s9gGl3p* zNKMpx{a!zmN@@{-jH;b>D@5m7R1GriR=?Y>Lo%u|)kPXot#18A1DF`0+gqg0)^D{) znJ|!Bzp6;tF|n6g-Da;}@3n)f3Im8&-Cnz;x}7BgD~!5*NbU8zQq?f0LAFGDNe-H! zgNha@>|+=#L}w)m*{~1Y)|0f9Tiu?@H}A{ru2O&`3#yT zjF^$Dp(}DlQxr>ERr9zg%T&ya#7LpxQe?hIjE{P^`^i+&3xku1a?qYjshH$2VKHg*>~#vWp4*e|k2*gM#}*$3Fi*dMUZvp;8FX8*vx!~TPPkNuGSgap}? z#CodKpanWWcOr`1%~%?$l^x@?2&$G1vtdtbOoLZtf`T|DC>wyK)eBlzgS}~+8`x00 zUnFgIT?Jj=BEw+7i25+aOjNCB+bwMg3g%T0`noa`)-)$X-i7%Lj3-3(pt9YqMxmBe zBv_a34V&urGq5_%!g z^@nq;x9gGGnr?p}>BefdnA()L7FB6_A>$YhSC)Bg^JB!X(1_>Ger=S?Ff1T@Ns5v5%coXnCSkGK$S+%RmkBfLte zm1&qtn&L;C;4U#F#oPo8T0kH-pk)LB23H10(aCYxJmkVg49=y;(LNwMrpV?N@+k@H zfNYzbcychCdv784FNxl0a!#Xy*QSN#B@>Bwe1@ReobNE=7@gZxjt6HF&7`}UaDT;#>h z~|SaPpj1Ses36@qcE-!5_lvS^I=s)b6z*EV@oSOIg<~6olzz zU{WGE>CZT0g?yLGtk>a2WfBWKBsq5~L7c~xYE*f7(@E#t&6r**>| zr2_mTOheJtAA2NCN);E3sf^+?7P;JYxtGjAHvBO> zS2sk9E(!{0A*^faXVs|1YJ6_JTH5#NN-3&Tic=-Sc(PI{l#ZvHt>(dFnmm@7Yqbs* z*7lu@zjEFBLezMlO1<&qNJ=(OW{Q(zLi|eaTvRN5@O7_iHG4P6R{z(|RQj`eAAL5% z6#YGY9{4c<^f-pNx6aKoU`+3B3TNJ@u`D8we6>4qyD77 zo*T)JB&%a@59UgDEa&ZXDs_94)7+6GO%tGI!k`^Hi;D}TnZWbbTCcimjzs%N?QlqR z5_14v!W@+2ZlkY${;ekt^t(AHY`6E`_sApnEp=LO}1=BWc2hRI#_kRZdTUusCh_YH%hNYaVe`I?r#ikU>oiXLCr`*{v zk)Jj#S(x|S{^-?jQ`g;`v3<8;#u`r7oX#g+Xje<@06PrN{BzsYgm%AC4>$rorX38N zFw99i;r19w4d4Ga6Z;u`_0=cN>_3^PRO8Lb{n6JerE0aBpnahj85q@z?dz3W*3)p# zb3ck^H#Xj{W=2w~bt3EU4~>=n4V&6-UIYL1Fnb!l`$^!*_5e#B#9qD#5tih2NC-5@ zH6qN6(KbZ5Wmno!Yx}AP-OQK$S~71MRLS&ulQ|JHTDsnye~>;3jKJ%HFYGblhPgB>TLSeVaNr0bg|Sa&lroH3;F>N1dos+U z^Y#A-aSZE9v(&ZcacA-nrFw@K|&}R+& zxe_7P_c~n^LNx2w64<_8y{fVb(l846gYjRI4|cvU6(-bDa)zondk&hyhlM>ohise_ zMz7Tyv_wGZ3UdwtD|E|Re;`%K`b|oPI16qqE&FGSdy}KBj{NL_uB_*>d7nSFa9cdS ze~(IhWXI%aqB|W-8{TxscRTjz*~Mhp?*T62c*SGp2!;aav`rCrxQPRv6w(TnD(N5z z#1`isndX=@cr@eiv2r;%8gz1T&Zj4m_eZ0pWKep2sZz{OSW|bWQk5AmxpSY4%}ghZ zew7>Lu0_-J2X5P?p{^_*%8=EVP2~(XpWb^hHxawD9qs9zT}=5BC%uEWai4!IHses- z#97dCf|TV*!|~D-H`CXKc?X?YqCTn>#L3<3k|at~-dA8pEj&$~Qo9QNq{`QG4 zTBwhmpubFI-=Cf`Rk9=%4hFkNmJ&OsYp>?^Sc;BtHM>U#kM78bB}BYc$`~2PIoRfR zH0j=n>Bi%OSowa(e2KF;uuL;Lv@4h z?!CBY+zV8~`n6uawIupWqT3*tXBEc+ZFKz_b_qVDUXx0jXB3B!puH~^PZX+!!?d} zp18gVV#+n8A>faN8HQXu4;N}%*fy#3a%Lp77p8304L86c71uVZgqsSI*{|ekT*d8x z0}%!nbISlWu893!HLy4rv2zK02gL+@1gF zke1;86V7;-aPC`2>$8ZeYe?+WrH%ESXD_UQyusTlE~EN9La)v@(D)Q9<6zWabI5lg zy;Rs1zsY(SU>>Q3woN!GwtV6I=JJJ&wNvF*W3Ifbd}C11&EC%Wovpbhn!Qxw_URo* z{RS4WKA2Y-lJ#8J@lzX@)-RkdHybG2S^{=Y`_@}MRa6p#4dAlIAd@7#5r7ZwwO!oi z#3;^g2WmaWj<8p;d)aH){kUT|h%I_GJ2ALxcrDJ-_o#=@uP@Kd&DA$o9$r~ndHu?T zmDQEam9xm#kTzGYtXy0exaODkSo9MHFzg6_Sfc)H`d_zj{ zmQqmra=nML!x#3wAv1W{Uf^zD*HA|C)XF8yYW?QA64yDy7O@xfQ^Q)l5YW9xN;g>qx^!Q~1`D#Yr`Wx-DJ~U!?NDq6tXY;%Hl5!ncq2uqWAH zv43VirWEQjkX6LDs{rjo%qu`C7@T>_gRfcFC7T%MRxPiOC(+Btd{U5?fus~xugf>* zsL#~5l4PO&w>>1EXwj5Bov8aPTG^)RbQGj_@)D SkA7F|OYgma0P@0bvi}3m0l5bN literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/fonts/esri-logo-80bed756.woff b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-80bed756.woff new file mode 100644 index 0000000000000000000000000000000000000000..0a592601b538431cd5a93c5eeaf1950315ffd84a GIT binary patch literal 14468 zcmZXbRZtyWw5>O`aSQGi+@0X=5P~}!ci6bQJ0Um(g1Zyk-QC?KxI0|_b8g+2yQ)Ta zjjvbFRW-U_R(DOe?~;<=RaL(O06f6}WWeW8#RNe7cmDr}n4}~r006-P0I;6`0P^+C z)Z5#VlBx;-04L$+Z2V6VnqECAN{LHIelng3_2M=^Q7e zq9*#u{6Br)XWjgr%!BXWRhZcT050)QCif|jlHi(@v8^Half{4f=+AlS%&}%)EKChe z008d))@Aw>*IU@gvc)I-Wb&V$_)}k@(LOFMY@OXdna!uC`IJ6B05Zwe(EYO>cjBi9 z{*OqN0CtA9rk^bH)31E4k(3PUzXG;*a{kQa^L_x*r$_-%0DyaDySJOS>io+2$}h{W zWbHqLgM+8!ggw!rzKBDMd)m*$ILA|wtHBdN|L+h-fra?F0nbUcFrsShI#h@g=un%uC&?IB zqUngSFoJUj$3cc4>zgPYldS)j(m9p%iBz5rl|0FqLevaao73u_y;R5qtTxZpG_QQv z9~pu+_tnF_lBfjiHguI#C>igael}mveR)soj(L7Zeh>saP;GBc&YyhLvA#d8H$r{9 zjdvnHqF%fn*4;x$qGp6{4u0JI%OLo;g?O>I$Jwh&LKoF4^v?4xW6;P=!Wxk^O{&$_ z$}3k}pgobGzHCW3A{Rsx=o`$9b2o5CBa+aV)^NsN?-Ra?IASVw&>{@3i)y?u{?Hc5 z4z4dd(f*Ksymc#Udy#lK`*}#tEU6#SM(ja{#qr z6hkxvtplsVVmfy!7p|^szB`CEK~~%q)t>e?U|HE>v`khjXOr15Y;rAs1_qxqqSF*g!c5|v&Q7OLwDLi_c2Hw7 z(Ew>(w%qn=Ej6(&{(zT>h7_G``-mqFi8YF9OqVw zK~*CpnkHdfd0;rLSPie}zIFj9R!?=Da%YchINDj%hXTy@D#bp8>-t`tox3o^Ctl5+ zOA%s}_Q{o_FC%%@?mq6YZTiW4xEN&~z&2<575pGo&niaAe>Jc|K9Sq9S%QaTC@E6F zT^3r1ltZSg>Lu6jM~lHbf71=`p*FFeZNqrx_`S)RkMY8Dea)!Db6p3u2z@WUGr7k1 zT-FGQPqSDs7eB4_-$yZIxWR?l>+I-bCKuv0fo49Nv{62!t;#?cU+W0aqks89uboz~z zcjY}xtcNmF9l!l#{Fy}C@CBK{d2KgLWpGe)H4!f77n_%-H9y}UA>6|ydn{9W*I3M? zlg%FdIp)lg4&)iSVglZHvkaMMwHdc3tj-O@M2~cycjmSfn~%~6dZdybik59ZrO$@Z=Hpc&W-o)HLkzxK zF_t0dCL#LSA>S3DnW0*DQuaJBF400$n7Jx??liu`N-w{zbh5lst8uN`O1>a4*t}ee zM=tWeUuF_oMuj8{uYwogqsXg*W>G4hjgfx25>y@{^)L4E!K8{BVq`uUlZ}@c58te% zxc_U6BU3tTJl`jaNfEka2~I(~cg+LJOy3<1k@^lZ!dz(NNE++^OYO-?SbnD@OFo^s zdcltNCR(9XA$2`a;d?4TEOX$`)b3S$*CMj%rhXU8`!?%Pt+x2jFFZ|Ma8*7s-nE)i z&9{OwM95iIb+k*irQ8SE2lj_7LgFfk}R|llqu9u82wCvAT?ZdYc z9H;@M9m=v%*)cOeQom1UDbd#o_AQfER}kJnqxT=jilF;g2~YlpMPwwrCe`5C6;mv`0=*l?|w){#eTkd4Bv*R-HO&}JC=F^c)_YB7vY z68lcfF^4AqY*~UYT&;)anyP;#{9D?225YE^g(FXJ%PCm&)Bv;b0UuaiqKLB5CfXhs z1etmbVkA6h>p9fd0|S4?*}1Ql2aT<>qd9SDQK@Vfsh}4N#kH?-2be3sP27zSv(sV_tLOZYAy+H zB`ITGJ%HXn7ukBbw;fUJB0D0|-%3*Z0fOcRh^0bp_$fHD~jc zvnJ?7<*AKFAJj!uqhBwMahngu?!;GXwugoM(mU7?0RP=1sTX- zP4SPDH{I5=G}-(3p;YdzzKkInPJg@L{K0r$fDz$Pt+Q@9R3fc}6ZH?%pmoze*r z|E2$I5-U&_cY-U7D+>d(%g!T#`Y-d~5s!bXg(1@QU5+9B+Qq#3bn_OhfvR%qJnY`} z2#rWZ7t$XzeCwM&eEG*t-{}l?<5%+h71+|Dsw-he+XJW_3n?8#IR^s;>;`E^9&C;A zV$6>D`B4nqXv!hY5fHDtuw?p5V3D+$l#1SH%vnY8_5h_z3Iy#^<>1k&?kU+@w|M_b zXhbV{;0L#Gz)234gs^wm6-QZKvlpbFyIV9Ib{0GuP0@r0_QT458E|<@eS=#fdT6ss zHOfYGXU~BO(crP9fiUgZ!pB6|%m0Bra~Qhg8XyI=w#16ssAuTF*viuKxYduzpFI_T z#zdqpmWK+pee>N&7yjEQg)Y=gz|Nz%QFQJ|rTYyMlCQ@g4v*JACr?GaFFAeZ)SIw?8yd8Tg%^nthDR|X91Ob8eueeju2l< z)pVer>BUyPdw~wx&yNS1E3hmRY;VWxEM~blW^7!j>3BalG)Cg<*wu_{G$Z$O9$2<# z=+Vqinn!tpSbwTFes=&KQZUvn5U|EP-l3@<_Fw>pHmc>WCtYz{qRq;0Ulo#Uo4nt! z`WEu8p=i}Leh|H+F(_SKYm)g^6$+=_a(4Ym9ZwaOL?qOQoDF}%9je8+jj}i2wJ|i! zv?WC${0%*NUJp&dB*ZLH&0eU67fBoFn-w#!TOI!8RY!$1zuM6JD(z4_et){loHk$=VA`LZczst;fqVUnAyCR)tltk-9Oy{NaR{QnVWr+ad&IiDi2{Rbf$|ljzwUTW zZa4*tsZb7+Z5(s8#K;R zMDVZBfUIv!fLbd?EhOV`lX5)oKZD>Vc7bHVQG*be55Wk<(2jmSy#~v=?1AH#1#op^ z@tf28>|cTQ7eW1KqXBB1;0#f3c!Nqj#EdKtPv+E1jIj$jUh5Qk@ONh8wyxk|ieqXD zUjJec4#G@bb~RFK*H&Og*WE^*e^ag7169$4C@sAkVR)QnvIsr>qBwK`Znxkr!wxC{ zC&yzdl^&{mAK4~$9ulG>@!#S3?iNa60RIyu~%WFN|Or7rr97AE$hZn^V_R zIipw%67;UNz^{?L6GqG1Y?5G))EXsN*GC{ggC1i`mHuOG#`iL!4=%avF3+%d?*SnG z&UbJOhb9ZE52>Umj29h`4`c04+<9;Z)~Q5G#AEpix$HEa(!V3nh+*3d#)#zd z6_rNyy^518)=kQ2nm|x3do4Y7I0#K^TYlHKj^d)QG2qvgJh8=tvn==4?ivkNJs{!G z7ubSaFHOtz#*)1triMVQ{*ag(!jCwROro%zZhi&!PbuN=y0B>VTJ}Y2iGy;Nu3oPr zawf4q?9Prexz;!6!2VJmx)%O>)K37-mLvg|K(S|Q;DeZ`3PCTWls)bk7w#srQVHjfR^Mu1F zdq2`uF$J}q@m)op@2c6=!gt_Y-j!m;V2Hdo*4i;Zo%Do_g{4S2jF=BBv5teA*tsia zy-r)2di9K1Xn`WXUja4w#ZXJ6FF`^J=%fmkutzi+13L`#z#!TpNK30h$+s9;7KTU6 zCZ)An*iLg6w44s7IbRlB6pSA|2Uek&Uu0ao{N>cJVgZjMlmPXa=Pl^GV5v=(uR#o& z%nk;qtvf=8z(1aC95N;B2N|`R2L3I~QTkzM29VJsBU4V} z-TmSLVxuChqhaCRW9&>NZNWf3`ESCN{f0~}>~J9Zihm~+R1VwuMpO{K-jQHOWUPIq?fWJ_ce?Sf<4*ZK;KrAD`xG z#`aap(Wp5$t)9FTW|8R}v%~8!M#1V+@uvaH-I`lA;p`)_Qy%xuPN+z*Y$RS+nI*HZ-}s z?s9?}7aszKrsXB{{2p<`Xk~d5B(@dx^j`8QG~GS&S*%n__O3}N89>_4AzFqWV5U_= zwIAa$pZR!D#lMu1qu1E^7vqiw>-{iT?jU#7M_|Uo^`t)%{gpeV1PmPyBQh2X>#~)goasyw5`3$6wR&Mkl)VHv0 ztQAs=KX(0$NxGWFP<`$TGVmWb&t!a(K|U2e8t7l|PD=ZE``dd)nPY#P5X+nMTEn6= z5=Lw#(q9C{QjDi~gl*4Xllu1**SF|GLuQhu|6Y?3%W>{XVl&PI@-XF5k|E|xQhg`| zC!xIJVe?~XDm1+Txsx96kgNCDy0ftVNT0u0lwhhn|I920vGmYl`0w9o_;(I49kQ5p zR;q6760##l{=WQ*ZTw7LoKR>byuKkXlj7`+l12$f*AX+Nqj+2g5Vk%*##cmSs2cs} z4mWtRZ(z7yDR#iVn6h)XtwF=$kJq1>j6Y8AoOq5yB36kC<)R+f5s8k%)E}P_O*w*a(_d~rEze6gKrb; zVodUg3Ym&Ifqq2)(P()oDu%Xg-vPTT)Zn#g!8uSMSQJE_)*J2orQ22}%+CG6t*_X~ zpWa5)y|WT`#{3B9aSBJ%l4K}><4HhVUQ|efX*J#fM_rD!8C~$@5K?4+vFgE4#l0v7E^8*U_QShd1f)AX7c^z(`e)5vtl@tc(rRbHqrpEia&iS_sw= z%l9K5V!7vwxlNr?^A;oVEA-|dL1Ne1=%dbud-YQ`#Q+99<{G%Ka9FT#7D5`%1*ixh z(I!S~$-3$nWX*IMGr*zZ0&F{X2rK5c$eXa%NbW!P@W? z{dq;LK@`3Vy11R^$){LHz;@_$f3S+JUX^6{q^3=EHuF5)y{LY19JCDvDqj=sMKb&6OHe(HXx!(Oe zvQDJ@3no0rb0ny{1mp)-j!+A)G2728_*Nv`_P)D0C!81061dez;8vM>J9YTJMklgI zZdsB)Gvsgoo?(`JK#T5^O6(L<~!ZQ>P`b1y;N)xyd;8|3@D8P+8r$Q~eb&IS^+jNQRI zGk_70U&h`j8_#D8`6eR-boQDT)y1f_g*=?{p`lCax z^c%l-5vR|QY;|kgP>P zSp$hjBe(-l8BUTD*AN!-L;fnvhEH6Imr_)^`4A&K5QTL!<5qDMEYZY<8p3;qRQC8J5CdaJW=q~u-uL=xi7!;N)bU_+3P4x}Aqn(FP zNVdxEq{U*tQ65Q%_GBT-2o7r%!->JlvEMjrNPc)OP3cY@X_jM9VJ|8q@P-Q`^A~>} zk8}6;qu*T5ct8tDj1hTN8BjHTs`TP7uQ5oDsTh^&@u+Hj#$S70dmF^7WPw+b4S=?U zebi%aMQ2wJ#@kft%ixM69eFfmE@`v(>K7z%2_3}mNXv00jn)LUI`YicI$T`#mf0A< zvU=Flray<~DuAs#g<;3QkbXRhbjF(#;N1+o*bSIaT>wSJ;EEft&K$|wmi~8y;aDBY ziz5Q_#ATSPW~nCxT8L<9wF`DHQ9kQJB}y3GtXE)Ijt;0@pVzSR-Anjwb|W63@pnV> z3XZG#QC}fk8n>18npV2|Y};4)dw_H{9$ce77qp6Zc^xTqUN^;|_S6%#5IJ;mT#)Y| zZt27;2NvOzr7RV*^)-0Pl@`bb%U1G2h5hp+7%J#n?^%?#kUxXL=bjelQi4Q%w=AvZ zpj(I%f<>ZhYVlGJe$L^ydJQ>2;LcLu!No9rxg@btVD!fo@O2Gr0m8?+l^E5`j1gko zccL@NX+m0Dip0uU`a8D7xakpL6J&9!>mFxg-K#tEZxS%$h~qJ{(a}Y&WlmRbn-+Tr=&yhf0x#Y>}Ke@`NsR&MTOA@x;?9o2ftj=B#yK~A^OwU>7 zoUAVpKyTl0*PkxH5KiO}3(XQA!qFpWccx5kaEQ5R1|79XK0hf&kH?+slsGzG>QRd@lB z(^|8p3{)x=ca#(1vq$9A}#(bw6agv>#}9=X$cOAq#SFtB#iz$wtGJne@lPK`U7~y34#~ z2MrXrtjq-^c#};{iHh>cE&d|-!AES1B+rGz0e%WXdqb#VCNowa18iL!$!&he0YzF9 zY(gz&^|SXgj9B%}YOlfEWg@KtE#5GmniFns2Rz-)HPBLSN9l=x`<|GF?$W#7muvyy z>UbVn;==y7?#}K2pKz$&UO#`_v4YiV`GYk=pL*bPLc?y2@NNyJDSFiMFbuQpn~y^2 zZ>gPuvU6T9!yfGmpG-#sJ+-zzV zvkSeFRpPNBzbkdx^Ti9u9bM)NNEkN_jc#oU@?Q_pr&A#6W%|Hp4Ti5#zfiA!N^EYQ zO7dmiIrV7il22GP2hJ3U*sSEsOmDrI3sX=Sh7#b$l_4u*N-lP5j+*_Tzf8-h@Q;;c zL`z-GDKj)gV;IWkII`@~bM37Dp1*Ts$MAsy>ImE)~ZLDf9nY20$C-=WLyC;{dAe z>-EnZbp%oR-X*So9m^5o_XQHRP3EV`d#e*6s)XN-35Cd{@L5)OEJ`wjm1}5iVwUN{ z(h=8p;{KDqG&sY5%t1DVS#g_DwDkG1{u6JgMWRAj7$GxFr3wT0Zoq{dqyJmilo1{M z2OqwV?2Z9PpNX>d&MB3AQSY$kb#}q9ePK`+7dSOwa;Dno1whdj(7m^g0Sfb#VexuN zXNLNL+%Rtz;nsn9XQ@}$a0;N%l$2%Nt3eF5-u-3|3Got9z+?I*qlLurk3X%fOT07L zax|Z#X<-X&aeih6m?t~EYms?0nOo~0v`h8eG2Rw9RzUZUxLf4Ske zA5#tse>w53=Bxd8t8({@xue%?8D#E-M-1$;;h#I52^2&I!Wdk&Om{zE&94z3rM)2s z87`cKHNRHu^SXk%uBjkr;2Swv%!h6M+~k~$T)KQ6c_(6dHa+EUJBO*JLX;!#mU}eT z8d2xXuJ5h4P4$XIGLmVB(AE>@){3}(l`El|%F_kg+K#*GVXPP5gekHlTCyB*4 zd&*C1?aC|rVJyugJa9jStKXqQSH~>M&c}!U{YS*I%ZH!Hi;$t~x=@ho3)J|N=LP&( zuG+0n-3WHcX}FP4UKNt zBA9a}{a(E4hvRJ9D}vVQtl9t(rl9VL3~hj%*G;5$p`9xt*)CJa@$l`s4V!ueqXzwN zY{3-wuZ`^9(ej+lC#Ql2ZvqY%n#H4#;?v(SU&vjr_nezX*@JUwSsmi3Mp<>5)0-jC zM=Uh#=2q}c3tnS$d=Gc!W2%{7w!Y{zuT&90V)(_*^^TSXgmu@JmaKi|UfdTBp3%d4@(aiAI!~*|`B(7rWMvADM0m)qy43USQ?b|7{Xa*@1Xs#c)`| zuZIX~Vno^18_3&ZtYH)8cU1vZt(AlaIy`qkgL7TvU4TKT=-&7aOEfnUvs^8o%%dj> ziD_;UP&hJ0nFdCn_c&RmX{dp)?*A6FL;j%=4pT0y_cXu!qxR)D(EpnIC?Lkb*_2`i zzGeR%x5ml1_&ZHL`_J|&3C;v9h5p%Zh}bGCvEPq~C2c+t4^O2sbd@q0G#9g0aVClS^Q zv#TS(-XT{IGq2r3pC+~v_y)b%3(6(-vZ!%w!b>(l+861UBCFZ*5;|$30ZVK;?`9@H>iQL6jbgUa)y)B!HiNjYL zeBtv~@X^bZFdCk}%A1R*q5r4pTYe!Us|{T-cYG%*94sACP;iH?Xytkj2LdAN4XO5+ zD3A6w5n3cFSi_%Wv{sEqdIaCXl%@w@Y4~sPVGsD%9FoHujxh;cFA|aJy&p9_y6t}hEoeG1LH5qvmK@c8@fliei6IOQ< z2ZD#WN7l`CWUHKhCR21*T+AB_ZkPA?V5LBAu+Egt2I5Dik}S3dV<_gGa60md%czY> z%o4I0O!$(nfAycPeQ3rpr0N;CZh35jLKf?{;95P1GwvmpZmi`k#DlOJ**&`T*UwK< zU`4UH=lFn*wa^D3Wx&TdYVl7g6B9dUS^4d8{z6fQMye$xB@#>v{~FicMqD6FtMvr? z=i3Q>V3^O+&$3;rkjhJ{>!(gb12Ih%_xh2j%RtJiWR;utd1XkTxw-w-692guPl*{8 zjkOZXHVNW%6$=R6n%zye0gr0J>&pWHP2*|55tKk>v!Yy=>ECUsGRUw~ml^dbN08?b zZ%_s)aX_cKf$Qj9uk!vG=sF?BzF<0&u8#Z3*f7w#X8UiVmhxg!{1}Jpk1!sBm{MDF z)|~o&I+`wp2BI3(QuAOfpME2r(BKF7xf_R63cz5_|C*C2unaFF~%*>oi)X4uw9I*6lGLyCVS&^$RNVDT)UjC{}EdH47JDCXa(UrrqZ& zRKOITf`Q%jhbUwr|MTn^1R1SF=`LC~oP>n4w9t>zBP zGj0$=&t***wU2%G42H={aj+<^0HWh3D_s8N0vAn_$C>n*w@Z^oE-;oH`N&@MdvU-<~>4l}~l)`IL zAQN!!ZX4AaKL_Mn&xS)MxTy{BLpoK9`;zJ!+#_wiYp^dpSKe_j1d?-LW&QmK36m7n z&Ro7%vF&TTMCuC7O`s4qKR|}Q-iW?8s6Czu2`PydfxB^RKQL;q@{N_cUjT#+Hxjxk zAFvO`D^MSg42+tbyCaxPf+il|(7io>1CSq{0SNDF^@J0p`3!D!;^7m*7&5Jc6gFxT_ER3^q z79KWBRN;CRZ{Tb07$wWFS2K|I_N&;wcj!HfOpl8$y3MVcg+FsYWAHML1_&}opiPTW zR#+xgew;TfwL4r`hl(lqN&3Mi5LG_FTj13eC>dg$v|R3Y&?_LTGUPbbbv~s0=lhQ` z0Yr%)(naF&G`^BQl(FvEvY72#Uoy0J@H)NE5y+co87vU7X~HuUAe*fF?~HNXn~_hn za_t}}lzq4^u_kDI@E8oJ*;bXnglr$tCB2KzD9b*iKbzM!jSY88H2RE^kJ-A6jGzn1 z`1tV$x`|Qw5w{7vsUi0Gp8-3+p^}FP@Gk4(;BgJkyQ(|SAg@_jb6(ONK;%1u%^`gF z>8z*Alkel6um=>xCas2YcBtVbzIfa7Sa34KH05H0?Jr<12MqpwFL0Tp>%zP-YJvGz z?~^0@?KS*r>xR_?Qd(cha;ms#m5H20%2)^$?HL^s!^gGMm)v{q92m zbch@1jM2xi5aGL+CS#kq*n&**?hDpw4TnJ}y!!}|KtJc8FjF^-7XL1!?<3sx!HJ}CHQZ4N z9n253a}V(vS&}X@(M1yUN-hG2UjQO^%5p?&FKg@C%w<0)FY4r4qtzFrAV~F#T+n0v znOV2LHq~wd%*D$$C0rlmra)>_;Q-1KFjXA8S@%aaWAHHl5^j!d@Bm2R zJut)KdOai+#R7Jr;gP(+X7NEG%eL2US~wBR%-pjVpX`Is^z7l0|CtifP*Yj64~1y^ z?lr)x!0`uS`>LojybzKUX4j!z{=-$FMTv8m#Hy!-y9&u7qSQWboO#lPZ5Iv^h6CfQ zkg0U(`4wA2o~1iHleiA;DGsG4jJ&~icKt|3cTRlBvSwyWqpjOtuADRCRYcrQF&&_U z^fS;glNj0J;um|Q(!%D#T}Jx2#p^&>rS2=_TT?ND36RseJrJPq!gRjlVP4XQ{)9-psp5ksiKu6V|9so;Zba0rSGiGVnU=Qp8bs!3)YJ>b~)576G~ zMbR64t+}R z#^g`r%bM}w1(ePQ+<@L3Yj0`4LzslUL|k=84i1DI)X*bs zAKI8YVcZ-uT6UDfWiHJT9{LzlDT%>1_H5D_jeiP;$Qzp78?<7LnmWT;FiU=AVr6%x ze^JJt*+v&$&M1#Q%Eeao&4|+P{*ltAaA?B1aYv%JF(FJyz6V;1eS|4JU>-m;7q#s? z5^}Ysw$6y}1)&xQ$!|kM8k$W?gvb#(g(f4ND#9gb{qdpjZPj;oc?%mZUwQkGMbNZR4{Hl%vacL4+g{uhBQX@&nB# zb?<9+y$H-Jv8d?c6&vGAkIM^70Lv1qaOLuVMmo+QR4kWeI9y-~qi!!yWDbr{FRf<& z@;hzQm%1oDH!V2x%kD817xfb#AN6Uji)O2K>6Q`UB9@f-jO)LnU9jrAHxB3w8!}100ek2ZQl4sTr0fsydJOXf@0- zjb6^Ggq$9b+Ui9SEA7JAZ&Z%;ChBJ7Zx-<#6B~!o>H7nH-rIQpU|{Q~Ymhh1uq&9s zLov-jJLL4jy?z;0I8m~Y(txh$_etsIh*lh^($hd2V1RmC ztE^~+4Rq4Nnzs|5`Z+#sR(V+@dV?N3IJ+`7v_~pxN_~%XV)oGZlM-nZqLol`%Mvyn zj}m#bP`o$;g%Cm|q@^{MR`<%Cav~BhdBEmi;bvA`9Nd-#A>^=$AV}HpF;R~oTto1X zmhqGVU0U4ywIQVilpRu8>&FoW@UDHuM#ga;a%^jM?sj6Cd3 zpI*w=xNU`Mj7vqUt8?@!vXw`H7t9mJrY@}---l35fdNH1M#T0)@wxXI^5&{Bd#UUT zu)Ngm@<|&eEvzQ`;1z*Dv{FTKT7|cFWvr|E(a8Y?rPR3Um~Di7@1sW6-5kyyOi%~i zEcNQ(>W)D*V9^f?o7Vp>X8en)y0}?}7&mmdb`gmrvQw%_50^iVXlOe+(7(`G75hZK zyi|%sxJK+F%RP@s)A(qtI(6KkK#c6NBRVD~TsQ=yZZ(#A+e*)?H!4IP!K4N8L@VN_ z*gj*Ea~2HXYyz@450yWP1j0$L1*GD1|4=<=PN_QQh&k0t(2ShOcp0jK4bGb-WZGg7ZvIyNMjJ-qU zqXE$9E9WYX*zjQyxa9rkfPNls##4D+Vme?jX7LE&a7!L$3+Y#dHCpVDVi)uds`}cp zJ52+HQT2f_dcQX*xrjUS!0dHRvmV2G92AZ`i&nuUss@dGb5zdw{JWYmcSXr`M1+`t z+Lr+(hd|c)wS#lS(H+J$*8v+Hm{|>MUPP6dU!*VDKYldT3?G+yfMY^c0`8xqv45n2 zaasKN3>s=K#603weP|pJbo9R(i%1YmR?%@+RaXS5B-+@iHCeB(#GQ@#U>mj3okE<- zx5**LS3qga(HKv9Y0V+LY(Vc0aeAU~#^3Rd%UHy^7opv|iR|6{I-epw zrrKO!go!MkINJ*My#3~>a)gB!}wax zL@#nCa%bn9^A~paGH2{qZeayTzkV)@n3b)*ou;4_FM^8mGV@6{0E8=>8#63GYCZ8zLFZFu^S7arh@ z*D09<@Z&ZdmcB`pL{%}<)sxx!1Y#_w5I~8*Tnc&>jz7W;zS>c|pzQI{Uv*W|F}Fpo zS!~(ZfiUJU3(}Xr=K4MR0ZF!Vi1*p+V+;a;OaOtuem{khK4(VIlSBgnJbBPr|MdYG zgG@l6Ehr-_AR5RBWCns3qXO!a9vH{N)@pUJApsDh0Rf*~LlB=r01$q5Bth61I@(xN?^u>aUWH)mJE=ZRHYaA#1*Gr164 zG?;>t_)^~4@|Dvi+b=))npf08G-G4ZTgLV7Z9YF0ytjz%Wu*2Z`O!<^3*|zC^XI=T z%wBtV0s@i(f~Lb*V*&!YiDdmu<4r6KL7&-}n)yRWLI9!Rq@5HD!650^uCB+e4=A9( z04x#$vM?tY20@qx5}+A_RP>q0-&i@6Kw&iT&0+^y3P0$+GCbpG2Qg{sOJd^gkii?E z@waO5aj5LG#{97rXc!kOl$kg^I$Hy&luUh0bUgx5L)-J*KJ#W(YGTLES%~m_|7I57 zZ} z2KE1a#(*8BSp|5S6|m7U}zr%kb?qTSit@MfA56%UNGl z>%WOxk@Uh|lFb~-5U)Wegcx@C+#J9*9R@{jn=-g_WX0bY@tgLyIxtP9Tt!ow?>67s zf2;E*+c!MLckdyZ98lSyiFWc3j4|hTV9S#0L_3nHcO(htKoHGd*+C=NR%rEg>xtb> z{e=J_r65z#ruItgIxk>tNg%;kb*PqSxS$Vsg=nROuo06qZd{{uJc1sMPU literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/fonts/esri-logo-fc93d7bf.eot b/node_modules/terraformer/docs-build/assets/fonts/esri-logo-fc93d7bf.eot new file mode 100644 index 0000000000000000000000000000000000000000..45f76a38a4949d56639736557fbff7c7a7dcdd49 GIT binary patch literal 8026 zcmeHMYm8(^b*@u&Z`FNu_wC2++tbtC)7^Kbdmg(z)9;zxoqc(C*4S%oyx#S0jF=4e zJ|^so*|G5w5RQX*S_vcuMF|NJSi~|RArKT1DN>XK9Ks_O2~n^Ja$ZP@q6jRI0Fm8% z)!n;0c9xCdSAOKq+^$ons!r9Zd(Nq^s(xmIu|F&^MvOE4aAt}D0nYnKQ-|*vB#ik( zzOKt2)AatYJ&?P`yOE~YNp^{CuywYbon;r;X}pYCTj(r1hB_OlwT`m$tjwCM!4^>K z=50}+hmb(8f?Zr$x$mx%-}%9-87uu7xP?Op4z93MtOoLF z{Da6phy1Ct7am-D$Npb(-D*(N4|W1?cB)^s>hyZY-|&}4_v%( zX>;Jh|d(0hvsjqYn#?hV))2lCVMlT?1jXorr;{S!K zFR+HLe?_zPEN*?015TChVN(OPu1Evk-cdE8@6!92$t*fdr@%WjO25a(*xR>Si*9+{ zK#;lT)WL_?Ubgn_(HJnc@?+OWpgS5o&kPgfC-7GBw(xF@(z#LkFwzv>4&Js-N3CB; zqODoKg@Im-J&By2hXOO0{{AW0wHVCVgD}-~c9A{IE`OWB0`#*6LtSTYfU(}-v8#ho zU;UUrl;pDvYGzqkH^4K-ax4$28CGQDti&oP3s9P3Nfx4CM)LYZFoHVQzu2HTeqR2a zuJM18bS#H4WQr`!#!HoKfbNqa`eyL=|6@;_J|)hG9~tj48?q;#S1Z<+tZ&+HaSG0) zv(4!^yPN~gVdp;Qwa!D%S!dIEi}QBp3Fk@YL(Wsq??M;M*2wxXmr1H{7(2aiWuRpd z`ktWwq{o?JF6JUcoY=-%YzN!Njvx%3LRfl?y@!32{SkYXy~w^#oE%D1o~pEsnzTrJ zVIozT$+mhOS?#oRT0_3q%2dNnz1Qu`QP2*epxvssTNz}!NTS}Ti9(YgBim6OH5A@% z)NhAK>;16b)%ii&ZiKX6tM{{^tk$}nZaWj`E=SZI{FYMaqPM9R8{zWhcZQYIU2ve!bTYswxa1 zUUhrzmg;tP6Ifx??L%s>-<7I{F%6R4w1?!N8XBl*nZiE0fg(C7Q7FIeNa;x7`?uRt z+6u%OCEbK+CcKnXmMJZ3I&Rx>E8%A4g5f%bZFmNc2{V>8&FOJNnQ_y4L)aHPa(BG> znDv@V_gYu}LuGpc5AUeB5{Bmq!!V`qOUdU@Jz>O*Tn$Z;Dw?5K+NzqzL|LX{W+cW6 z4VNPGU1DH+|nwgbDosr;0Y;(7YEBWkqOO2KTz4FFCSYr z@hshY?~+cJH$*>2q=>>phDA9t^<)VrAw*KCBz|4jvn(?wM9$1o!pj?`=bCXLY|pa= z_f5w$jDi;@+HpcCE+yT+^RhCe2szK13#Kql^)J%em#G-sR3$@HEYm9cPO4y-M!IIH zspRKq(z?4OT~#)m2{maHQjT_{DOP3wKrhmpn1f}#$+~POyN%t&j+2N zf`WV1gT5}zgf-0xk#^xe1Lp}*JSc2;t5K*W6$##@Tf?Wi{R}(~3;)562UZ0{Km*P3m9&+I$2Itb_s2`9WQ)F`s>5PPTK(KYqP@g zl8Hn-K1Z-@&bJwH^v?5f3&ziruAfY&)0u1rLb)ZlK|GBC<;jOmt`AK(#^OUy?h6kM zg-5VD7nLysHYPxDSHQ2J4%$JR7}sMqgr$hblq6@U7>Cjp>f6dvrkUghM<@_RIF8@3 zAfvUjG@Tnv;4S3s^f?wY3+q#izD%EHeYS@kWOuN;u~Iz%bi$_U{bsE`$Cs&Io5xt^ zNoi+^V5ZGbHM8MPUL<%@dk=-pb`PG@#==qWG&mx1J~S%%yv^w_0EY( z^piDJPZm8A@y-L=@)T%J|DP*Pc* zq1j!VZ83ou671p89!!{?x~PjugUY>j5uAkCRalIB{dSRK zA&Vw>uUhN$TG>oJLG4}}!lG-$^OSYnLP3~b1}-I%)Bc<@QOI|>%z7PeRHmWeLCLvO z3F17iRHMq6Bh1q$>qX)iREcQd&36aVj7_!Zj3K`JqSBq*QUqn8_$UXOYWY zmwU+^ES|XMIf7yna(q@yC4`!wrDE#O2dht5 zhEY8WTR~*%^?@>?U|#f)2U*92!HA-My^VN`$kh!|ql=6JS_tc!`bjNnxf)+sua@?H zvQmmFmEugvFrKbd3Z-M|W~+JNs3wnQ7Fw+Xh0}Xa#9z5>eJ*OeN2T6)Vk{+_Co;w9 z2_b%|cP=WH-v7GSwVJ)_WUK!xXDa=9J&!({V~YNcJ`4Pq0D7Fjy0^~W$bKH{-4pCr z*>A9qv5&J)u|M955{Jff11V-R0Ck;|26iJDHv)G<#E0c#p5U542ARQBOI$;;>x@hd2 zoH|IEg4a@SlM8k}O(aX9F*$R) zRI2gj^uFk;l~T1@P0-#@j18RX<^J``J?mKn=Y=0c^BWuQRdZu0)jFQ__l3r4|GH0Y zb+18udYC-gHjH3|G3IQj{zUcYbHX2HpsJ8dWKGGcBc&j5ny}v8#xoqC&Pb}RQkMG;15+B+&J)Y>!2D64Y+wt9wJ$`mM zS@wH?i`ZWAm^p^706J|`#2s#8gC~WwLZwQ2kpyCkbB|1OLK-}pbNEELoE#52xj5&u zQ_1_I@lrAk0*h1S$#bdS&wH?l<=RJb}L+UMV9#OWpUByMMA$DW}#aAr5FqSB|V8Cq_;h$1WeR~A#rNiVHwQbyK&CA2dISgYrTGJx9IN{-3Gxu ztJoH3r|Z`+ONb%$npE07qd3AuiCXyKgD8SI)WM)ujhpakCA0X~?uvi7IjSIPKz8ql zN+hKhQ*rJTgM>&Vb1GR}5oXyDX7&l}_te}3j&XGG#PLlKQ?4lufp{#;Fy!JzgizbU zv`MAanUkLkkU1q~ak6Zi>7t*?dJ8W- zWo^Ff)b;=K@L7+2a5PKAY@BBg&!ss|&ZkGTz{$|%5pAH(r$@Aj)7GzzXbJxJ^r^dH zgOh^XA+2zv7OB?Ik&t5ovf!(-d8fI4p z_e+~hryJNnpJZihjPzYo8Arh7n+O~7o2-Z7EaGjUZWBR@tz0<2xpHCS^vQCou~6Po zzTPS5W^eoA_SQlZ)oyb4b-gAon^1m}d#__BH!iJTIA3lya0zy6379<{TW|GLQHbk2 zeKdmu2a_bC5r7ZQwOyR%#3;^g$3Tvi-J?i1} z>njTj3-!&_hgVOpzJB$>>e}k&>RF_x@ouhOUcI<_a`n{e26E?DH>Yl0@AYW?;OZMD zHqmASe`{!Y0qMCx{<@UnEv2CJX01oE!dE zBlePZYE-Ic95+U|f&-;*pJj&ZH&&YZJviW47To& zqf6-Q`sp?BhH*)^(xn6r(L<2sVD}-AE5MvRcvuqNk%o_^aMzT@PBn(IAuop;sXVY~ z0uqKC?aRAy_wg?FH2X{TPwa=3LRki~inzN9P(Q@D0_1|hp0_->&AKMpL_fExd96Q* zRzAj)g1ihQrJ%je-x#CbQ{PIGh4Pz8xYmOW&9}C{A=yRz*;;a~g#-T0B*uYJw$|6z h;XZU9exm|r + + + +This is a custom SVG font generated by IcoMoon. + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/images/terraformer-arcparser-a0228324.png b/node_modules/terraformer/docs-build/assets/images/terraformer-arcparser-a0228324.png new file mode 100644 index 0000000000000000000000000000000000000000..424e9d17acde236440f6941f29b90745e9feab47 GIT binary patch literal 39315 zcmafabyQSe)aX!32q*|BN;eE3EhQn{-QA50B`qx=(k+5W2s6}>gM>&9-5m-H-QB#4 zzwcY?t@ZwRf55$S@40)Qv(N6mPn4R9EIuwdE(ip|mzR^$0D;i;?*FhK08g52(&vE7 za}Q}f4^3Aa4{vjbHAuqB)xw%u-r3yNTEp7h%Et|9Edl~%@X1R_XuY4=Zh9C`Kk1X3 zq2D|cd$wTq^3^l52MZXO?94<)Lvs1`m?%jDd$Q=M`Iwlgn4e8CO|N&tcdN%(s*`md z&`U(;VbMIs#0R56K#xRh%xqpg+cQ3^hH`k{EuJ{28Ed9!>t|bYZ(X5_!Hc-r*tQC; zHk;D!s*WxiQGB(|hM;*Vdde1kMuE(r2zm<=(%y764I&>N3h3h^p5n2rWH3nl$SwlI zxSmt35%l$Os@#}cGsz&rptqSV*bEJHeiA7l4KjAG=vwBnf={(KE3uxGMMA00-n&Om zTY^B?q~b+LEiFbxhEzo`kH)wr{3HKg9~QmmaV@`n;(Fg^u^-W<_pAB;BxtYWX~$wwx`s@K@GTu&*2?*-^=yb{IN0GYuzY@bKQ>qE$FY2LIFX}bKI^sx zi3winq;lArs7X$0+{7Pa2gzQwEE?~u_qt(h9SK;V4`vc)@+r7u3Q_n(TMQ2hD;x4* zuHyL?-QW8)^`~ub2jrEs^cW3jgWaHNZK=FZ*bOJP$YCfFldYus5h;}(%NC`@g!hU) zD6s5HkofXczC9?XJLUBIr86C)$$|2dsCkOR8(Ich(!vn;*L)w}GvMptsJRDu1k(u})LB{ZjfwU_Xx zRld4lf_`8)RQwX?j=go~o}T(ME6YHj_%h*jp=LsOD+fzmT=$9)p-zEvj^8IIdmf9_ z??j+$B_79$$Kd@W=Jlj^IVJ9H&J#jvpIibhRC;!Bq5Dt2@mKk(JC@cs2XR;n4XEP) zn-hX{ONP}SSQZe)%17dWKW+kzpLKAp8&g4m#ZuV%@oPs|MFJ2~s*?|NPBN4C2$|JE z;s6Tl&-DH#j9YzTHN|_*#Io{v8x3GS=QajLt$HHQ<`YMai9PiYfa)}Qk6*G3ebJo} zym3Y#bG}Q7u<4eP7+I5OnAwTdEwIKojBedU_MwA9!p$VETxR$MEKGL=`Uh)9e8pJo z?fWN|;i@@>$skaxWJRv1zlR*?+vd2B#u%l8}`D@HgCc{=i^gG$$d_o0$2Vd2q!k%q5WG zN+wl7wj>WaZ!`Sk zjKApro6J0`4lBLTc26l07n$okjlfXkY~#+%MPRV@vnCB$cZ%c zQhc(F;kRcut5q4*No!@ka*sf2V?LsWGR0YJAmhRPW{xXEYBU(V^~uhvAd**RO^gQ~ z&@1x{ra#p<4&hPO1c?@&c~;{zy5mCzWj8wJKXPxfb^MqY9SfCi+Z*1mQ;M2=O?od` z>l0E%0D26@Wb3vlkY^HeBGKR+3z$>b<`w7}Wp8$KjP&bQY3@0+*>0+po8Vn3A!4oD zliTM1onn8)4j=8%dN!3#VOuqO|%Q zM`UZX;3BC|$cT=4pUk|fYn@PeioXB_#=+T^(Y10^PB%Y+8~;D{z>XZpzHOV{1&M-zblaeSZ(nFCD&*2kkiyZAA&T}k_&M>U53H}WKzLJHr z(l2gw`sENC02o#v8CaRr*D*ULPELgJ0Kya5nczG^uxaq!E2F)SpF~-c0ono4{(Ksw zAsF~}so&-_IB`#KmX%ky-20%mj-K*#OEc-;%G9>0Zy)N=I0uj7UtmFp221pRKjD!q zsG(F8%733ptM3dfO{?tqFJ{2yksfhe6(9G-N9~}|vWbctJQfOottU1fDppi`{XOgNH>NrYn%ZJ&P;$?=37a(dBuH^M z&Q}u_tyyY=w3pY(hMZ7D#S-ay$W5>F+l!UjqWp5~esdLdh48;%+?pdzfe8p2q5&&w zk)N>YbVo!r?H>4g{z!&0l+_rV(VI2dm3H6A1Omi4=}B1)NwnVErEX=FK5`JHo2_45 zw)}3&m{WmUEbwLMA-H*FQ;YaNxsCcw%A--xmQOF_!4rp6zJki2i>84EAl9jSTCJ>b z)g>}`Q>4fnonzskY6ZcKj;&yuBCP*Zf(jX%v&$GcGz&HWtt?^Iv-!z~+-yocB2MvC zOf^ItMwyWeI|u&m4OBmzx9yhVX-PZl9sQd|xd!MZOuPndn4}Crb=CEw9H&#PR_;ZK zNW9At4+iKH#9@Y+vPl(8a%rTii9BfJ<=eV+OF7P0GxQgH`az$09sx46E`u16NUe#o z{Wi!S5N+l|qaWLoLWl)DzH+L=X2%li))?5?!F2p?{ON+W>Odt^3oXUmBYQWE$S!)A)#)~ zZ2T&}9seFS9cqICs@ANKeCqmVMZqyPP;tp5sih?4T1I@OgpqN2bCTYH!PxkOg248fne5cO}l}+=3Pi5e^R1-rqu>9_3~0ky3=n} z;~^!>Kma}Wqm1Sq1qYzYdgphgG*fUgOxRGa}QGkL)RXfGuUKTS6 zVBqQnk0)4kTT;)TEZ6Y0OMQ1uK76A^tKY3{+pC=*j5^t3rU2!3e)DrB$c+B0=-EBa z1JS(0Vwj-Rf?Jse7~X#Jq1P439}+>Z9zMy)Nw}#AO$1m8`qPDg3;JqBp|mw30Xh&5 zI}(?6^J@4-PiSH|e z$o^%f(ep<;e}v~%nt7D)#UBp^e~j~K9FVo9qHuh7XSaij08vcL7Jw<8mjw#~o_SX6 znnZTU(BDQntqGP%f?D%4LPbX(LXS`mh7^#3;%AiEowjx@$yqErEbDEUY*`g5>mZMh zbb`ArE+jJIKWa_2n%{8t-ZX)8^2R{F@Ohtjy{UQNxWI4_KL;{$tmhY1mGFxULfqA&O z`j5J~>POm6@OymT)dnAJeQ@eJgZ;*!AJ43tRPfhY>e}W9{UEzEyXXkRQ{@X7@NE%X z&Tkj%#rlD72b^#TQGQ@4Sn%|4L^8M=!!XL_iIj@A>VMUWu zzvitXBpqLP(>nM1Rz)(XfKbt&7=d2@VfEvc|Mv}&6(e7H#uiv*IwP&Ij5-D=ghT`> z#E^7Hb5JAm)k(69`j1o*o&N7-A{87Nra>zGAS!8m5Vp=fy`$EW6$Yf>>XN6M#3Raz z-TBYlNNvbN1_EL5ge!ea-zA{)JcSve6gJv0=4tg!la~V}FcJ$?pWY^+zI?16!~}_- z_;E@Pk@)K^;YOngeN1DRdlV87hjRI~Ro|W_1;15sH$f!B%zYNUVUnL=hncL(F^6=A z7J!x+-w}RI*)m>|{mnS2lu*rJNb++`ej{q>^+3Z@a6yq2eBfs??CoK*?8@NcE6$Cz zJ0p|DfijE_zPVAarXZdLN-pJ~fipbhI$(;Y#N>%d)1&EOVi|dB@ad;A-6IDLz%536x(ADO(|7 zn%XDOp9c;VAuPH_Fi8!KBBtzWeKlfJf|P5EN&4t9E4Q)-2{p0T@8jKRLygctWX@`c z5j2MuGZLW-owu&f7MWAn=%LF|>X@T8&@WVz>W=^#1{)$q$l3ZmQM}^SZz68li;N89 zNHNn1dwt*$7WYwv(Yy$~j!@sERP^FFQ@%qfHZtTxp5WhVv5A+_=zzNU5jFRUcW|7K zkJL}AeIwgCz1jA>0NIS+uq_KawZsj?PlYrH7mL6qyf5qs3#Wil2Rm0{W? zhyl#u0@L~TmGhH4KP6ia&J_jWsx8of3X8z0g2>FeEw%n*wc75Bs@VJ4^me5;YGw6{ zd0uuM&X5x7l*WA>^hyt!U_JiXqrCPu9*oUQ#mDyxh^bNuQ3{S}Z*)%K1j`338AYKZ z0}k(+46PxEHdtiN~s{QGV-jSilEj2nh?96raoP^PUGQ3OON{aJN4n3xxkDcCoSMCQ=s4ytrM_jTWVARHk`0TLfNPNfMTdFmdekmIMYH zv9FE$Mxz1bx!XsJa_A?V;oR(^1^c9JHOgBQw_RIK@Cwz?=?@iLN66_Ab^!C$iKHXj z>fm~1!eLe=+rIz-ORz9b!1+F2as8q2)70oL{`fQahkoV-Fk1Z@nhVHk}$q!5{6 z^T}(I&eLQ`K5a{j=GF?I>$dpgV6jesY6`5|st`LS3mY@IA0o1synI<||Me~gmY6`Y zviQ>~dr!R)G>^fj*KZlx4vD;oLt=UVMhTUt>8-rFbJkz`tP`Z}0H-$dHwt4O&ec0n zoMR8V4dy%fn?jgLWen_ED{o-aX818dr1WQn#!X0e=GG>Eq%gwYC zfd>PA%5{gX3?5S@kc^RC^fZlXzzbI*-0|icG{60h@8L9QF8T#>B0{_M(q%1822L&R zL~L%bd3ZjV-yBInifH3K0<;De{&h5d?}|>O^g=S;L15a}m}xVVf^_(nqTKuUnJk=| z+75rL>&4?d)7O2Y2J5{n1_0-hFDpbjWK7pgY`UdE3Tkvzabvh1YybE}w^h&T?p%2zbcvL}g{F7Bj>qR2LQ2FMX81v+a)d1h;M z2ydhP4}oMvbwq3N>8AB4&IJA?y+w_Y^~~Iq9O-*{yk8VTp9VzI_AUxgMlm%R7FgmH zxo@iJF2ArI!B<1JWTr^R>#}v+F7swbaAcDVnq~mkr z>E7zu_ONvG#-)=zEgO{p{$O9Z;5_r77eVUS+-?v}0yqIP=m!x>&9ny?Q6mRfN2ymc zP`*@mgNP#3k&M5dj2!8ChKxhy!aKc{2hmS~;g=jg1fwQb2Fn#hs4I0PyZD56Alh}p zeZou!jd8u$Nc0x?$o08fTNS~PP6pavz_$$%VxZ-$lwI079HeUSDK~moGySWWWyww7 zwQ~&>Y87mXm`7CxN;3Wg_Bev}ex+O)-3|V|&ICuFeJ1g z+yHZWJpYfU9R{n1qAE9x<+RrK+@vhYQ6aROF`5(_T+#%{>o2hg)^DoBpS3fJmZJ#N z@M;ruL`)HYDj><5q{dzn#nG8BU&hRzDeE?G$o< zQzbnQOK&H6iUBxl*+`kFX4a$XoX*~PJ!ZLy4i1$k9`v)!=zxnRlmw+%ZPIW(!bk*C z2ZrfnQC+%f_d4Hmgo1}M$C5;-NoV=Og_8~-5vWG*{>3wu8-dd(qc3?M)WVQ7@fN1C9afh)Xy!)JhB4V}LFZCZ-3di0a z=WLwP1Yb3m^YVJVG|k8q1Q+1|EDNEL7UkAAvOdk7TT!jon}1w8U$jT52pPQ zGp_TE*pXqu6H%u4ay9#LhN1o@0i#ehOlroyS#IdUMv=5Xd z$5<08UWz`2qwg-o+RwPRp4^KtE^RNx>W;V1GF3v%Iw5LMl|~=XPl;_V;c`jOdRG)> ze*CtsN>k4V-G(v#o_THj=alc=@+5eNRezL0R8t~QRI3aphat&Rr~V$S ze#z?eGsT{|*z~Fnu~ldef=P=J*cuKH7HB0x4<3kZeQ0lF6$?2bKc-Bx0Gx-{;hH}h z%2V$)zwlouFL&67(;LD!M2pZM z5b87RGeHxt2#L@<`tyYI&94G0`_%P8+Iw0llqHW6jbFO3TMYt&Ct;}`8w1r92&BhD zhU})W^*-7Ug!OFe!<}(X9|LYK{g+E(ij(usI4c_cp>T-yZ>~rmyeUP%&#Cav#E8XHSs4zP610p^7KpQ zLsi}j0BFtUN#>BU6t141&d-Cqf z0;y8Sj7;s@$&^=Hqn=9j_8DBWNz888J3xT!xgx^BdGnIJYAN1R|46X8zMMu+juZqL ze-0^lM5`CP%0twsc{~YDq>7j7?3jb0akKTAXxDRw;Pb?8#fv z>G41a$%=+6y-!H1lqUrwM1EWTj(v@?){+HMajMQ76P8yFQPS|;Aed)tnzaWnNLf*% zZ|_Hx^I+!5*88+&z7+*m5z}Nn0|<x^dp>qV+NJ}e8~Aj#;R74$XjwHAZ`%sZ;o zwdYRYcaLln8!_T;=*S?mGPr2jp-xKgT`nuPmJmD8;$__~a`a zgV*aXc)sO#ummU#P7~Ej)(ls}nxod6hzoF2oCy7aL2*1%$fl=d&__$BE@NYhNDS=k z%exF2aIE%udcU~b-j$NDqEgA0bn~OF0Pfe`0fW9(rd_dSqC&A-EoHVpU#@L^s&{@z z1eS0NJ7&=$A#v^$HZczfC0I*}9=Bf2Aw(XQ>r558Q)d74wal`=y*N4yG+q@EU60v% z+$EBT^})zfC6Hx0b!{ppSeWtT5_a=d<%PKkLwSEnK!8IgbioJF4gURg`b_v~QcDYEe~L*Q{n= zByaW(PR359=uBbM#)=Mi4JQ|29n<_DzA9$TnaZ0+mMzri^V{xZ&q^Dl{Fi7#r7!mH zW{EpyKcR*-Lp=BKphL&SkTdIxvc)v#AhP=zQl~=-D56f}!JLk_i+qSs2)@%GB*VY; z@O0yM5`3Y>wZgxeYG}`ZY>hpWfDXP86u%=l|Le59?-acM&TquV?{mWx0Xv~{-l#$0 zGHb=*3>S3Bsa|I(_Ca%&LfjjP*NY!7KMU<1wc!V@SvYpRgMOV$8WjAd!4MQU!zyxd zK6~gIaK6k^o|M5)oQaLWtPe=+2O}R=-3VyryM7}}m+IJev8aH}2p@(TS{KBKB|@Y6 z)Y>t0uc`h1*2_f`W0s3$lp#dJ3Eh2Esov!CnOO3<<;9hlK{yjeimX)=lcQ7B$ojK} z1cg1_Z>f6vq>7@AX-zCi4?m?lgtwLw

    1yJO+!yLFlx)qs3_NXk7)*a@>~ulcK$T zbnH1!oH^-S)X$qrN3l9DvEoh`jE?CN+S3WUmr9n7;NU2~YWUuH1+mT>>*jLMC$mj# z`TZrR;NW@Op7qSyR*T`@+06)f%Obx|lh7S`hqX|BqO|+p>f9q9i1vWxstw=dVWH|^ zdVB9^H`Q@+2FK}o7komkQ8c!h<1#E`;&tia`a<4hUH}m%?|Xa^>aHlp_AzoMP6tts zMXDMj5qVoFvziNAdkgg)o&r^n!%^DA<;x$Io_>78KakzGkvcSfzRd#=t-R4G!jy&b z4XM+tBMEmWXXj1?$D)s3^O3;HpfJ5lqMi*&#E?(*a=E5aNdlN2FCN-3z*PFg=SS#( z>y3)oPVSC6n$L_>k<+Lmw@-0wR>cUb2YeEaVA4Q%ZY2s~LC>>4_xdi>;v%I_Sbnw? z4-1r}_n3QyE`EExVA@ja@pO-ndz=b;FN671y*lf?)6MU((|KyQ*z246EVPnYH03a3 z>i>2gtvb|`;cO*|G_Se-qgb0v-R<8bLk8QbC zru*`4o<`rf3~4~Ub(JGr{oYAz`z?#u&L1CZaROxWOT#+~L!d=4d7$?=x^UsO_?fx51N()ul`nrFpEE&`w`E!PuDR66(y)q z{Mno8=`K2%nZGppu`VOOWSsf*?dazNs`5%F29sB3_@ZQc4u5W9wLG+Zjq8FkF4ito z#6Uk>~|q_j|-zc@1UowJ|nUP@Ht5_2x-PO|74 z;Jy1u6iRTeo;%&x!Wa~YgzQ>DEe^Bb+c$?_X{ds%n_9KDs?Oub7mAj0o3~&KhH1|? zyoq2KtG+J;x=z*8);eiMuj?kdBS&rRw>oS;eJrhDt?uq_$Rp?v5)%;1tKnQ{B}TnG z%{|v5t+7AxB1Wyh6J2!H*73oFdQQC&+t4oCb;vW?Kn8G7UtK);|g1%+Y55G1acL+K*xE|E`##of;0n{4L)oQ+3Rom#UikVp{ z8FE$c>5ds4o%o&=YA&)?El?qaOo05_E!i`!u`@?TALm^d-?Qr5*HgBFOgo}K(5*?n zR*xMa(pN3I8_!NuR0rSvrS4v9N)w+wEssp!ytpgv+1BM9egVO9o(dA$o$^Gx5L$+O zy3r3s4H-sSvDnfBWhWb@7O_%p!-q`)**xgKUS$3imtJ34pb)TK!9@?AutG{X!d1rf zs`Zli#Ea3yg~cn-O-#B;sP&tZz*$X?KD@#_SlZDtefG8t6c1xuP8R3tUw9~9aji77 z7ZPrSmWVP$LWsaZ2n=ey;HR)3RQ!|(bo$=OMAY$Hjy99~k$qAaE#L$;5ItZFf$Uju zC2Kj;{ZA;e{RtQdlv{z4K|I)X!!2E)_3Hz`?`76|f?)PGlJ#D}rB(yNMj#~;Y&~Xf zB0FwDqYDa7g1y1S1GR3-v~Hed7!@S2iNpOF^v4}4AcsvF+r|Kj!7twFlTXMj$RH=| zE4cAsQ+XXz46$pV@NkIr7T@SvNV{yo(i=Sy#fHpON1d3TGJ`@;-X-H^8?S_%cS3<> zVd}#B-tvx@afNOxgYF)G!)Ar3EHSuCWD!9sU1rrtfMou1BEwpo!bBSVDo{B&>-CG6 zsVL@gFiN|}a?+tU$}2LaE{uynUw?2GF-F04U9GZK5M%M?f%=!wpo!JP?HY$kE0XXvDr>*NIyb{M z?hFPl@GRHBH0TdS|GQk;F*ATP#*w|5FivtB$H`h71{L7JE&6}NwXIIwQrx-k5vc$n zLM9T6u;c%`M|bskyW|{=hPAnd>; zictQ#^4gCCf`yibLEkHk^!>#uBKXk?$X082@<&;(?&+^ep5sKlhG5B&jxozBgMGyk zfvo0)milmT`X20+BeXro!@`*qc&}qP@UvbjPx4Xv)>0_ZcK{8qLM~BkPxvlnhLe}x zieolCi)T+to;-nS9b{C=U-f8j?811pXJr&kSgd*4E<~OsPVD%-;c@4p=HC-ts~1$@ zD<@^83;n1Q3WGAiC~t+&RS=J>@7jTnJ6Vk(^d;kJOa}V_D(Q~B*mX}qLBoAg--DmW zsJXEAI&_b-y-8s!Sd{7&7)8PHFuZodiw+iQQ^Eo1I5^2BNClG=;G+qtMDyK~LkTg2 zB~f-vwk-?f{z`6hF0{%(Ppn~ln1!uVmFC{xq1puLT#{HI+U-jAHz2Fx_CN$c8Rkt2_U8H4^$Dqr?VtM zUy@#Ee;52z;y*zl1MA76o2-8dnb_4%_8wxQkuVGY{YFaO!bwEIDzby^Fpa%|f-)++4=QXuJaD(gFHo}m0P^@G&~ zQK`=Y>QGeIAiRvAh3!BLS+m1Kq^oeO`2`4oh3k>#vxD-DLt%sdljaKy9Fr)ICkxwf znMWYx<|BfJja2G2gx9d1=3(L+CrEKS6T>dg5s;s8z=sSE+f=g?#E9tcX$Eji@4On^ zsi3-|?=0yXH7$d_=Ka=@Sd%uA&M$1tQNHF=-P3qxwP?kx0mxU%oRjvRpQp@H4P(Hr zI@EWun1MDBgTuuEK~A>ZD|r9qi7M#^R^eN^{?M(LtLjkf4`wxAc8JRLQm9meX1W!5 zTqG~Z$(mw0bT^WX1Cy`~zqAn>FzaWA?ikAHv~7D%i~N`eeQ{`B{3eI?7^bs`ts*bN z9CTaI?tYn=Q4mmW;&|94?5W~CtMns#bxkBfXmgM(&`Zc-?>*ZHkDL!n{I=;qELCq15T~PZ@ zcjglXi3RfJgjH8tjM~dxx(xineSR_b5QP3lyrMlwZ-=s9Y;Bim-?}(vR~J_q zXsGW@)_i>XwAG6vnhZdW!2DR5b5X_EMtCW$_ zWd-$U$j$dA9*D*_qI#vZhFK3)HS_QD8hP2OP(EUZ($SZMoC9eHdoN6JxWQ-KVVbl( zHwB)mq<`Q}3cvTue2$WQ@wnE3!hmo155EFMJnVCawua@AM+J~|;keIMZQ6VhDl*+* zB>uUP-qL2C;Ml$XNKQvK54BX=l5FEpo@#XbA^GI_eJXp?=2Tv**XMi2>SVo94z5lO z!MM=GUy`SS)cO=%iuj*=Ha$36Bool7_2vVshMDfZd^MO`g#>)(oAAb1CPq&jSGVgw za(7vvUfUOe#^03?T|T9~DF-SyL#E{fM-#mr)q|+Zz@1mFwc2(DAaS@*r~ofnPVbq~ z&Z|9TebZ>VN1)av8O?Pzb$h)hrSl`7x46=_gslaco;9Wz08x!lgegLQ%EQIm*LUCg z^S#ksD5`dEAiykrj=Ia5`_MdZW;<^Ca@GC_y+-eYRZWiQ;Y}REKW?=f%HRCswtl8d z9mwprUfIPa*?8Rrx8FH(_Ym?oa3`sDu^g=LFyisPf2e9ltMB3i4?Y8XU4FB<^t^B2 zS$&X{a$eZ(cv&Y4^(^Tap)dTT{?Uv^f5%c4BTBmFOCWtxOUirWykmoJ*|R>rkAaju z>0HIBe#(^>34)y{u8WyP96s|qX_UE$j%YDWti^()fp~qitvurp16YK?FH3@>RXlvRp)`?s)Co}zKispfy@z8? z%vasJXZPA|gr8UYX*Vp^ie(mc^~JIr{evr(Vm<7)W9FB=Xx5{Uz@(9t0##u!_hMd~ zFtvWaReh%*Ht3HbkaK}5o(+596v6g0Yt0!WxvBM)|E`T$p?@gHQlvL8)BcfA-0lNa zj7)rmqeSJVCw2AX=E3q)$wr~eBXbOp1Q{%Qn{`XQ7twYV3DE9QG)_EN^_x1=ZEoDXM49_XAI#bzbiw70~x0hk(wXZ}94 z_G2V}UFSEQ1R9D8@dVPy-ar~)#_G&E%8&k1(Z)XV_~#sfw`C@75Hr_m#S{v@0Daw# zhAfFOMS5+!{+XND#SdZ~&7%Jec#G@Ut=y`O#!LG#5LNLWp8~0x;0(|04(N+|7JU8i zTRj#3>Q-{@4=#z|e(pWrSGJ>%%K17nw{^3w?$k^STNf}t)Z(RT%k`_3`rhOkdB|dD z3=As1MvV=B-l!t4XKAu0`3i^Qg447aQCYm?HTbIx$AR;X`D~ zA38efbZE>5TqXx1R{ihuRNB?T7Q7fM$a ze8af*EsR;)t#gv%s;AlwnN?*q-nLzZcYQ}%P6M!##Qfg-7+O3%4j#7ox zVc8&viB1Ne6lhz5p%D(X5i-i47Y8VGv8}Gn=Pk_(KW}a6Y9E~kd+qkCf z<*VL^ZdZKt%DmB{Qx1o_D0g3a#CE(f(~uT-W@HZerI32teX%BUX^g!1UbCx0SYYRV z<8?}T-z8OzvkxT_tHQl0RdBW2dvIR(jdo=WT&c0t`9SwBOk4P<$?KPK|2Na5m(q{r zkUiuGp~VkI8{K$0Ft{dX$IZF!Gppri74>b6v#1+O&p@M*qMtMa3F~6W#AOYJtvK+S2Tt^<>~-oBo;pauVQKbEcIL&agHiKF`;3jD?ZQ9o>E)%p5C6h$axt8>fQXJa`nx5r88%2jR z?v!O>oLiGBCz%ho6cieruZy=Ia!#H_Z_hpyK8VRQatxYUiev8?KiIhb!xhl@##P%T zVoW3;-wFhh1(Gpfq>vfOq2>Hufl0!5e+E%UCiFYySGF0!TePj4BFq!{c30K!qaq-WCqQ>s zQ9DZcGQw8GsI=Da=1Bpbv$!yPYczx@^Ie&p^0?}X|FA)2HCc@%uptt^7q`v>ff5D*Ej!+30l`N7;&NzND0m}dVajP zMemYOA3ZsPD-{Rc>w{o@EolJ<}1;5>nA&UpJKx|Nb{ZMoDG`_|if zEyg>Q!bvv|ba4S(Qa-(fd9|_xWHyOSY4Uku-=6DeVQI?X?FXqx2%y#0`$4@(YVS(h z4iT76JBR;jneK3p-G~N6{V_zlG)hhQ>Z^^wd&paa5+jwno>fBo9ujgiTj@h2pm=R~ zam^N@<39SqhyN0|gEvBC5Dx^qlxOvr0tAaqrG(iOO^icaO4Dercw$ie;&FEbZos?FW^`U3fJRj+Jz=6*+=Z?Rxdu4kQ9N#o~ zf9KrSvu8Y4+ixm6OKDM1ELEb<=_)|yTPl2EjMFEs?k(!3mv4o`fu60C1moW7ld3+h z)qs1vPjgjlRJT+oL02Zrr6_Hq45-Cjz#!@}Zd7(0sh&O*U?9CHhHWK7d5D5I53+^m zw^YRBQzu9>0##Ub3^3AQXKD%WHJ0=V>!ibP2tU;ef9qQJUeU|`%~Wmc_vZUJ1s#=zBPhY`E>2YtAHG~pZ{5~yfL8M&fO!q~rc$k|M(M0g zV5JJN3KBQNbmR{ihag8HA5x}d#VvIA2w$aE{boIm8ZkYM6g_uxzMQ7nnq?WCE&V+T zIhjZPTYitXfUn4QIbbA8W&jw$fYXw9&&n2o$U(zF1zB{J=`h! zq_=bM&X0C=s;sE^N-Am_U{#q48^J!|UJknwJ5eS9+8qp!IG~^N%W2XTh5qRpcfbH% zaf0V36X&4m%-=+`cU>5c2qd{m{%9RkoaOmtS2X@?n{=(??M@~ zaPS>nxr-c}vQ)I*bfUQbgTeQjUmde+12A+Wu4DpZLQJdi#pum@76uZ8UC zKIE+X`?K?tTCpDAh=7W<0%|`EenUs;nnfv_Q@y!$RAankYs~+PALJ2gmfpOK@fVPNOIRIT|# zTQLx(Mg>fARP$NuCN@%tQ=s??HTaXh45ogyua{ISkws}La8u>+!iB5r`58W{m(o)|QFc>;R9&;) zeCihPdg-T!&ApE?!(cG@0(t2%9jnNIx*&ClT*x&|boQB^+t#iomlr8Xg=F9;YaV<} zDD^H%ATrb8L6x8(4TkpRP3%lYE72x1AYTRhjf>E)^4d>zx(Fy#|qZ#wvz_P&C`{z;#0b1}_qzCE4GtJ$&c^l(-wM`b-m z?G6*-Dr-z7}J5mjxYK#VBkhM+nSZ>%u=WuZAeNrQglW6Ulk)P8rg zM~i=8fXRY_`1E$tU|b0MnR9>xYlim*$6jI*N!i+Xye8cnqs|BxitQzm}GfO2eK>oK;#*0E7p zPxBs%1E?&t|5l!QS~@&dI7`+PNc%1m^}XvC8SJ;3u<8&!HfXc~Z6#~cZd9wa1QI-U z&DR7m7wIU&N)ym6MY5jO7|cZ|+m#q8zlAqSX3bU?>txNIdO6%O2OL&DS7ig79F!wq znb#SiKGpnL=`Vo&4+XmZeO+G^&xpo)klh~u48cN6Vy93u%6h_CiA&M&mNH065mkbf zSkNCdQ@%+7Rnz2aRmc1{@HYM{V#n@5>Y%b-c(Vbk;pJ1~94b_gC32*&xs5@?vvKsn z@V##Wbmp>S8GJvMCCZFb5T>PaSgy50A0=V<%lJ^s5amD)!1gy-eMo;?+!wl2Qot=( z567keLUN!x^RBSOlF|k2Bk!m}nU=LZOfbd2!(86~5l?yDtg|VbRo7E4bwb6S^u&^} zx^VN|&zv$I3>i~8x9s*dAyNk0`$GgkZ(E?{xQJ4VuJtKplnXZM1VfLq zs|NX~GCpIzD@I)(GyZFHqtP4s(|^hV9THg~O@Zoa)yh$C#N52(lJrc`epdX=!~@o= z%PjGahVO!o#>cSh48yq&$R%=o{p2mu=01%k+sW=2?i3ZiCEa+ehkT&pCV9GHs+kD5 zF97KCem&x#1#^~M?D8P}y(Ft1$w=sA4 z%KLD_1)?QbXK830x|N^0?4c~cl~ssGERZo~%408YK(2`xV;d)Vs$jnCDnN+!$7r;LAbN~!Q;=Sr4JtG?hj ztcq1zhbD3wn*k_60L-23$1}+^;nCORDN_NVEHk_ca!!10L6Qmg@TFx|*0=f8fkk9# zLQuxOmCczHWO-Yxis9g#avD3^HJbg8s2>^wBpB0@n_%cgQOc^R?JQC5*;9gs&7n35 zlQj0LdV6tM^}nRJILBYWcNUM%-B0X)V-UF}W&yK>36*CnH#}KSvVg)QIlgP@zl@JL z#{5ZQpj6Oa#0oxAN~UVFWHr$F#-fxH{emM(LNG$r7p%f6Cu%d}C~57GOK)RPle1~K z?%9g;4oGi%2+GC4?Cl=+)LsqfVCCflRj*RVb*<^`^29MIgG*kiW|7@Zv?*WTu;z?n zyRTez`dku$a+|_ts9l~%QyBCS#Z3yV9$Yp$eI7f#2;YW)KI{^MFW-qn^*4d10}8vI z&Z8Dyf*|o%SZu?;vv9=Ot2^a|%hyDWa?;+8CC5T z>7hgZh3I*z3--9^{a`A0M2`xzl|1=1hg+XgT*V|Bs6ny9jxx+EIyJg4ka&*@c2NJO zRA8`sLW#Jlk9PsRwM09#V1qs)RxX>%t>JaSTfn_M!`8`@Zy7_&q%jGVG2!TW$$3b^ z)8#&*#HaGU5$9)YwX&Y3X67f7&`i_&)_nUW5ee+Tq;ed(H*b}%AN4l|ejEXgToRN9 zM#nQs0%3-D1v$L|$}AKkyE22PRx?|sPlt7Cu~pbx(+*Nzs}Za*;+0T~oeaFRlkbR}?PRs5%Y z1O}gWh10A}`8`VD0PX*E`CmvOSpNY2yL|XJ;9lhb&;I8Eq*8$&_mchpT>fWH|9`lT zd0V3yiSU5K2SC|PBvZa%!MqNbxVRb?+erQif!y4mSA_Q%E5b6X7l1}V(Wk=yCb0Wl z`X5nR9kR_%G`9au070LmU{7pb*0W9D@sBP#mRehp(!@0XzQE@Ox*dVL5ET2^|J-o3 zX`94JFCAb@-{Zhe_4@)bKT$va57=5`n+O~M5DSRsKyR^0&lBWCTol8Eo&26jP=J1^ zo+a|*OgxIF6p}JI)*EX@lF9d_rL%F#2Kje4QrT)0Q#dcYx#5D8w>w>2eNj@)d~LIo z>}2^_6bCdU8p5~!syrtzk{>ySOQ(sa{F%D&72R)5`#7JOy8xNeEjjWQ|obIux`+h<>(-Z^}c zLb2s5a*c=kibFqb+yPlatvk^pb)0C`{WYNn6)Ed}aYQ#gH}sBQ0L)l3#VVEH=5vQe zXL!Z%x%<>skQLxGYCVX=WXyHgLd#>YT|zRw65odNi%0nChSEa@N9;0`){rr6Pv+3lFWO%OJ!T*MHt~ z1nGorZL9HnUpfi-F`6=mdfHT0!`yR}ycHYi7MEYj;(^57E028k42hg(ITo02+gXq8 zS=JhjR_>^xsYK$R>dl+$$I=S%SxHM!CrzF&Oii*XBfT7w@n`vf~2NU45CyB zY>$`*t>H`qHjpC4=1>Tn*^ubrdK(sKUV-Q35ABc>Y0d9ye<{sw$T+r#a>MNU2do)a zRY~ZDg#^e=UbB&#%)NktpPc!Gpup;4Y+KGw zvPKX7WyK+oSHyq*Q~qfse83t~S(V{r@hUr((8m4Xh^V1do0A&S9J_W{6bYZED;k-m z3(YXH$DjDvt`a3cPcY(*2bh~6?1_19M4pqE!rl|2v)&H>PxE-5J&|voRq8KkL@^W` zUABF@^%>qz43>NE#%(oN#glJus`)O%BQkBy<1CRWsA0zs%IsS)_6llQAZR~ z6Y$PyxSz+5K=(1T4?#}<%I7aiwsC3xM7bVC2M(G9_y1PL@N_r@10RgE2hH^-0 zhLP@;?(Y5_KHulPuJ>PtbN1S6@6~JFM};j~IwcBJF86g;VC`TBBb;8UA&j_(n&u=w zp(@@UF8aGQ@c8!Ht5>C70XEm0JW#3)^u%W%x^as*n;E3*27bCCKIyVj8`~`V(R&_h z2-3ikMI4M&O2Nf;2v3pr;s1j~ASgBG1O}#>&C{<|jBA)H>MLh`6G0jc4{FS#fr43E#fM)%8{ODuDOoOx@Fp-# zm{=Q^8_PF=7JY;B-~7)Bk}a#5*mMB~&Uq>>uQRQ@_Lp_Ql7aj+W6Z_nBP!d-<>9tu zYRzgIQ$GJ-Zo0NodLy{wWE&IBOF#2bPQuLAQd*sUNSVx9NxBKb^ST*!@Uu2B9er0J zl2xX`X1$4YaIO6yrU?B!&e9?p>`IKGN1sC}kc`+D<<6ewN*FAivguC=*w|QYjC0Ze zMo%8`Av&4C4%hX%bY`C(?*ZtWH1D?hmjdKYVjv4af-At26VqAfhKc5qx1r-TK6|7e zzbLl0V&&^{jz)Kj;~&IKWN(vMuD&F_v2F@BA&)<}WZ-GZ?}Lc?dnb3gYpu<>sq>2_ z$nTS@4kjJU8ZUhPUR`!Nt>iIye{`z90>Ay;klN`HY3Ut-_8*7zShVWkh(!m&u*#|r zb%c6vqoA3@SdJ01=V;TANmt~`u*9o4S1y_*pY$K6^bdJ(L@QN0hu(pQ0EQNGj+nOJ zhhZ#)4S){7rBc9k09ELOHu^d&?!(4g7#1%?`EEY6oV=ycd&@$G#hZ%T%E!wgXJoEGc2|%f1_RZ&n?lfw(}`qSUkQ13W}J8L?W9UX#1b;5$B`*ashR zXN!^5DpTo%p6OL8^yTVwcx80<2HHioi^&Kw@K#}CAq6J z#doRraS=+p)@z=_19L*M>Z&DRYu6<;`cyv~C%0mSl!)a`_h*O>W?hkYzHRFZm*sR2 z9s%*1O4|k(o~!(>64BSO#B%U$O$*Mb#@>m=jJu1Ek;!XFn{1Al(Ji~>n1r!8^@FGs z5f*$Sp?vlx1u5H$mZMXs2HS%!Q+PAy0Ry!jgMbjq5B(p{v6^19%pavwX=FTOaBO(C zH1ua1?53~ESX22sbN##CB7qod1#T#)2mC`2^p^%dE((Qvjj2|TM`ztyfQ16KB8?ac z9E|?j;Jkm5vdyeULlJxeVAkNe6v&H2F5xOh}etUEW*S$oLdvxE3)*j`bNX>Dx2P9s_pGfuvT%A6!)W4UT3?qu@z>0LUXq zM%lA1xO23y-&6FnvKDr+{|H_0YVV-@KHYfmt)){Q9quE)thz>jAL#boK>2g_*PFUd z)4ir(4A)YCw}k#}6dPy2psweW$_ zxy7x;;jjd3x7ktcyO?<3-_1sX`zf(UA#JXQ~V+3PUS;cU^^jYEA z-XAuY^JWT(NVuichw)F0Rv(5Q82NS|KvngLtr>E09yJd##o#S3f5C%Qsk(z{*Ze3J z`H6{^%bvGMrLi)jpXF}V?r#kv9rZ%TUJ|RNX%%b1vl$kfSAz)vQ|CCgZdR%$^a4;D zPsU7O-R2(L!p8~I{x>yiNnf8 zlU{EH|G`d5@uuHgVWZSwk+XW^aN=I7Ao^NYh2(J`+q5JwE=|EITce+?FwFj-imRhW z62x_iU^4wUD79=)(hTc_4pK`+BtWSFXC`2^7i==Vzva_+(pL2zOyTstm$yDve;Wd* zyp`w_b1FyE%c+o>X;$Qkh=;ReWn>M8+KqL&i%w?Iizif-Y9VOZc(wKnx`Fx*O~$yv z2FVI3N*XW~Y;#vh$CyG2Wcpi@2=CEY19;a%85Ri) ze;(=&J z($UlKU&cvgxsY3x$Z0)?KSkM8(VIu#iRetntYDzCP<(GE(})9%n2g;$0G2kRe z|Dll~`~Bx1APUvu;Vd5WhF9%4F(qHufFRzcx?x9%barh$(mds0?d?`=`n(;Y9_m@f zv|>59U7t6<(E?oQytCNt9EHv|2%GJ?ULf~oQ@*(cnAROi4mRi4kgi;ny#^l-ckHGV z_9dsBh~Q_OF4`tmA=hO)G8jC+*lz&#({j%m$Mlo=oItDG_%x)ISlQEGmVwj1_~OL0 zIo3qkG#7(ir{Jph?`S4asbkVXr(-MSbR-ELcl!?$;;))X8d=nbAM0^>HH|N|o)5UX71}$B8z)tf2KPq5cvpjAWr-G* zoSkJow=}dy_mE2(J~Kto=%Yp3r1cORzI)2b<%5GQ^?@KsV=^a))l`PR#z)c7uU30! z)S1ftS6-VE4&v#T*dOGo^yG=ZJZOwn+J_4f<3+T*Z{Q6jjM|8J5$7Ag$L=M(Bq4wJ z*b|ib3ZonnSOPv%XGR&)Y>i(_HCJH^n87u-51meDw}N)cd&F3}6ttI^i94_*lq!C6 zao_oy9Rd&@1_`#nuicxA;ewzSRmV;z6!%YhBVop56gh$1$s~-)AoWBbR7~Vi*m@?e z{URkd-Gqq+52Sik*-69z_i?oQY(kqFXD~r3MpIp5y(Ttazw__jfsyPgduC&szzBN6 zl96Klc|?f+bYbICivFto>WFSsw@2jUdXX(~?>cC;${06Bmyi|-0PzINP4G#b}pCx{S3B8-XxZNtwMTxuPK=O0E6FWc(@JJKvDOtD1|$9!REc=JoO zsRYdWO_uEx{t2O%6FomcjAI?xF_;z(NI=7f%2W9^H=v(#D|{`|z>qF+mLZ0RWM0Ql zPfe(Xcx~H+dGuoB>PR}BK{#9ce*XG(!biVq>a0GadJbXxj`+Dz3TT`Vw$UFjVM(L7>>QkO>Q=lgi%oS zDqs4RZ}$h4zA6h_Qy}285eyq@*8w9&yjI`(8zx39aK{Vt<6#uU6>^HOX9gNWlM0SD zc?jUQ-$^pxAc6}yQ;<2+0+5EqCE-Z}Z`Y`YsX5YC_)G~cB(bN(<0s{&!0i}(*j#ej z;Dd40?0K}J?@E1>AZPaYN7~iz0YM|^Uw&Xs_!1h8s!SZ{4ZvYP8Vt7bw{j+L`pV?I z&VkI0jNgut2M)(@#(l}zOJcZ}zH3W@ynN^_0$oVq& zeSNHZlLetn_|Py$nNIJ(yfBydW>s}QOSf|HB#;GaEoKOqC+z@cNcBWr*@5I&KmAzu zpeS>02c(JVh#lWJ0c+7%;a2Bqn+v-(GqRP5V~7Cr%m5O-fY1C=3~V?}DON{CL_!K= z4F+*y*%0d|<~Jfa#8^l|I@DPW^KWzk8;Rs2w}okM4o#E;znPUI;Mik$KQn>p@krK#{{ zlpRE786-zw$85MPSw5FdEj%Hf)H9mM;CH?gKXw9879Nf@BN?I|zLQ`m8%!GW7e-a| z$As~*#>n#a<+RfExMfm5`y!4>vBozP>2Tp2BvX%_dXQcc2eRpJmP%oCWs6 zPJ&!BTRYHvlE`1rNJP?%gV^4^vzrxA$mP7)6a4io>7k%AlwP*HwmFZTqkyLQoF|hU z+x9vvuq!bX@Hm1J4OmkVvZn_;h^Yeqr6Dk94@tt%)c7;RiqGVN=+!fozk2aWhQi=!T+O(d#Bh;FPP#3?>;Iw%Za6XC%JU&%kp0IR@na zf)!i};_?H5=|qm-UJ~5G0%R(}U`q!;*(PLV1e($EY)nbLL%K5^@7&)`+;>JEPwvEn z92EBWKiUg@U>c*-733axU~?|HoFVj&R6i+P?^STvj9jE`Dd{;;0L}pq1OVaKFZ|a3 z{DYlrTR$ygfhus8S!VJZ6`eBmu%`?In-9LN1+B2ho%pgsdO3ow zWIu&vFY2ViZ7~vsHQ9J+=hWT){#88IS#}s>n3iPsE-!siep)Ad+&Tp^N}PK{&QZ@7tMadD-rV_=nX;C|O>?Hp-M$ z=-)N>+BQKMkdxIh>a# zAgOK69Rj1DPY(}mK2KCSy~;h3UNd{yE$MMR6SVq~-RF>6_a9JfRXGUMKF&8Y2>6+F zzgejbuoD@VqOVLT`-p#`_*?R`Od$UldmdL>t;pwD-7C5PrM0c(rLm?ZJE-4f-0k>X zWIm8&KC_{T2OU-caX{!G(SyIW<82xJYV#pYcb%_v1GjsKsOFo(PCz6u`CY0ecXtz& zLjYFWf{T>T3E*XX9(n9!3Y5y`KIbt-mdUM-&9@&Wmp(KtPypNhYpkeb;W0_yUV2T? zqtL^WNr++0$@jM9FEvsKxI{szEO&I}$|2{+Qf|sX&UA8eL#l(u7E<+28FBb%MUO8K zF`tzJbNOr=0SajVz2LRL?B;qSK8si45te!Q6%FC9?m(Q+D2FTDab zrDK==T+?PX^#ZIArXAL^0i<__NBFE-N^LRIW-7+HZsej4#Yq18OwMlU1Up2fm;af(2!Ksls`ffMm;B`t03V0MmF2zsJl z6$9YZBvt6syNBH4ajdu)T}tHXE&$=y?CNE6Qr^=qf3UQO*MAM$?H!?2^-^DjHX9gk z#(nLcyyzU*QV(IrEn-uM{uMG~Giu7hhYw)bI4?p&(w#0UzCC0EUR{Nf)F9yl>j+i%ejQi1l5S<}&hlaB(YzoMurw)F#Sca}T)16U#f=r*tZt?E8j5 zaz(Z;`|Vg^n||f#0+@%yx^!;ffh?p2WFItQ2q8WVc?uT@$>QkuvYb;SL224 zJ4~#P9n^?^ep=_q&Z4!P2Z?0@d=^?F&kiRdi+|I&JBy|G!)F|`*?<4CwR7?Veuq#_ zzw|}4vccFBPczkBup@tx^`r-Y8mILX6en8&^d!*Ct%|xE_D#~#+d{dYY!x)CyO?cp zG)wp0@s1kcqWp7g<8(Pf!|*p~Xwp6W#x})HN|$2QbADCTYo0h_K0D3of0THAQQEO` zf+YB6BbwtbQsuh0aOi^2BZ@O>d{3ks4ECnd;SFBnc{Cm&(hvSei!20HxoHVb*5Mbc z+pFO43nAcKUj&=%xqYvv>y=08_Z)4}*7L1}PgVKbbNbK&MT5uma}NW|-`o-DxTi=~ zFSII@q>yrMo^aqy0O9FhX|Ma7^kI~ChbgV8FmOkJRt&7t%j7O$0bE;BpAY9TE^`C< zH7I{3gOlY8aC%qWlBY%Rcb+w=*2({!h~BHFUgEh9KF69KA`r?*+A(%T}s z^EIb#=(_z;$9vYP5^68hYH9bm+lrU3fS$%iKdry{Xf*56KOSWDBs*He3Aj?%`THNj zJw=LkA@tKhPF7vfa+`tz7O9_BQT}bo8Y<*?p_#Do8DBd1BEEc=+zS=fiDQ#5~0 zCvR#&;RIy(d90!E_Y?Exqr`VP!VPg?9w`xA*F$h_{jJVtPEAQ_u%$M`XZ7wAZm|G| zg6}AQ4uWfC^Jczu$w&4}Oku1e+DH}I{w3P&GM$#s@T8|_AvTKU>?~y^^A%STUWxgu z0`ih|<3XMYB(p*jA6+EY@~&-+P@)00vCph|z?s)Sp84tIRTNH?0df4@k5A*qdcHh( z7%{A`g5D0UbsWSP8~D}&-e6yx@oU6W%EPan9CwnoRa$g~r(Lj=ZfZf%rT*6hD3@B5 zFR!^xYgOj3R>PY528I5B?OP>)_%+I|;Sec6B9uQ0#1piV z@6WocRq#C+++KubU#1VwUv_TQ`a zfHGHB{NFQ00L;NoLHO440%Qd?aS3u%Hyw-vH3+Z~w=l)m5L`sCNoPf*!Tq(8OWJBIpXDJ z-zyAhrG7;^HimW6Lw~IfzfIzPon9xgO5@}m2fR-TVA^|{#PDwqMyZ+UFjEWKCVC6~ z$+UnZ03V(Zq%5dsFZU)nk@QyMkiKe@(8auNL+XR=U*uISqMbm|x0`L>*Ij-ZjRNu1 zN-$23KCM(#XM`9dCe^_0GuFz-e&hP!&reYnF;nEH56e2J_1EY#4?j-tt=MCy zJSyN{a4*6n(-ODrJ~L)0rm$tcnBH28+`OWqjFuyEd;6%$KAc4@x2}E99GUiaplzDK z+?@J_GDH__K6Hc;&fEmOt8SsgUoRS1O!Vhl@1bWON-UFqZCgRlw(Uztd|o|2gahCU zq90e9bFL$g_+QuU86a?TrmJakGgg1^=Kgo2bWaOZ&u>ds>H1IaJ&&&^Y0t0Le0#fe z&}^g~`Nw80@uTP^J$y`sIZHa0$ufFRm8a#YNdY6B>mb0GP}V1<=&(B^_;~v$VbdSy z&=o%~F>Ng8d1>UJv_u1Ns=)S_=py-|bwsF~d&3t^qwZCIniiOU;sPm4p`XPyuWXU5 zMM|f3=5MUL6Pi^^u8 z#hloc>jmcyZUAmiV(YhyD3j#YBEMfaw52R`Q4HhEi8jL2LY0-~4NC!@l@RgAR-cC}}=r)8)qUzVO!S}RFQGk2 z0d>Q7gtHm%tN1C>AgK;O>c@bdl!+Qejrz5O;`Gml41%mCJmP4i!B5M*qwe!Bznm# z4eL6X~1;ka#eq~Cku+?vA z-i*MNCs+f8GJC#JTj*5Pl3b3cCJNBM!Vf?WmV4<)>#piO7e0wtDuPJXuyR9+Mn7x? zfK$570?cm%Y5EI&b6DtVo-0sYaQ)UFQk|d6VNW6aG1nV!I}v2hHWmcaggsp_c#+i+ z3hu!&TUr_+siuCnrw@;%ev0C-UA_X5FaGwG*!VZUEKMTuMh5{gAMS@c2v1geS%sZm zVZV?_ruM(!4cdF1b|bR5=q4UPjtYJn63qU%*@?nva}iYz0J31{Eq&lPj?@QYR9k0Z z!Mss3Ce+dxNC96@>xuI#13Jj%9?pE7)>wR?Udsc+>=~M+bUPFIx(z5b=Wk5~u5que zcG2>YW1n;C`pZXT!n9DbI9q{=7qcGx4ztA1T||=niiTPYj?4BQ4})DaWx$9%P_%y>7l?M( z^ZcPMAAPrDeoWOk0TF=GQEjdr+x7P0rSNQzKs+Q@%|}0Qxzo0zSRf=V63ikx%7XAY zy1n#cueYVmxY%76OG0!tFSKZJQ1_gHOeP zp(F>)J(@^VCy?G$&i!lU$VLVpc?q6u2U~#^c@S@3gpVi!6N#x|J;X$m59g%*34Z!v z=SLr4kKu*84cvxHgTc|b+Iqv2GU97D??t!jIHXiVG;n`P>UwaE-#3MYQrvUYUG-I; zvPT`_*MbdVq^-F1XkX{rJh^Pdn^{*#_EUA#gHducHc+!6V!5 zOIF2amC|XW_l!R5R4rBIe6&Fs;t8hXn~3j>(OTNdA)TqhmLr0owWXBObmWT_jG>r} z2sKDS*Lzph@w-rSJbP_@rM+V7Bw;mhHCo%_MV0H;VYGP1Ug&@q6h`AxX-o?g zCiGErk7PTFCn%62X^q(dvv+HYV(v?`H7#cRnTn}p555kkTZ`5i^#?W81|8XDYfD;I zv!lrdVp+Z*ZOU|2XdVO=*eNJ|d;vWw%w9m5^`J$-lco3dkZ zJW;vXs%PORw-C)=suMr`jRuvOay1(l8R^9b^w>HDp zXzQfmvLdu>?_k}6pCD8oeagfzMvp<9R8t|GdI zaEa8SD*xZ|U-Vi<-(j&uB2V0^)^ELNlrKOZpx2+!HWbIs{27G2>* zl1W(?x*gdLrraJERe)N@@LI1&T6JbPNU$ny3{t$fk0M@eIdLakwbcKMz+WOb>?)+8 zSor5E`1{BA9|uBo4pBON2VrZLS?@(!D)80)ZpR>PKjBfE)9t%0yVmI8Oe zf9I4#GlLge#j6AJ7Tt+;RH>D22+j}RH39J1T0o1PQ zE^{W{49Dps%pyVnY0;(j1>7Z=ipQ$a_^Uw>Ct2L&&~8VrL6ubI4*(+uPq~8|n^hwu zdFQU(tz7#aOq_tTe{xf$25ovzZop>n5_wH(b$zB5(TC8tZs18OeUfhU(^^cqsN)td zDxL)zec4Y27gQWYE@heq-Sw-re_ONf8hfdAI`wDkqZac5dTBg3mmW(Ts*qTEQg;)Y z9eEm;kZ%&%LxcS5`*llV#ns@ zZ@DT@DE5(4mlaWRw%-1Z`Sw$G1=~dnEM%q?{=h=3W@>$tq?UD)c3mUrUu} z%U^3mHt9)0h;1cojiASljIrau!geFiE!$&AV7~Ed&BfP_DMIGizm@qnYfBqBOrM(# zpw1_2{ipN9R^(=QWyz|AUraRBk8Si|Mw#5RP7$xMFVcQ{Bs-8^a9!a8E13X*bJdD| z{5HjWpF!T(ORXEkzfd-b3o{5vk*6mh);Zxmv-5k*@(1HhPla+dD~yc|qDuouMjcjZ zXzFN}IeGm;lQiQplhO;VJ@sTAom!CY=Pw~BNd^COwBVRnP!~g*tFl9dNONvkpVi6< zaBYF*_DF5g=~wIJ)1*?58U24-tz}~`K_|s|>$@SL?Qf#Lo?LS#^MLGeziu!o&h~V0 zt{7mH77r%Wx)f%y2>veI$ud~|*pSUyH$fI$>w?PCKo+T^g7`$&)?vF-)6?o*{O9-RCrIowoo%KYNy=&dTN=8M0CjlW(@`?kI(e^zYZ zwEN4KNhEy3%Q$Bxz4f)j&qdH!>dqhGHeOdW&s?0dX_ZSo5@h;H(t3EiUS60QjDJC^ zN|jlr9j*(Wp<7s#?&A-S{%7%l?S$X1V={&LsNjpr{u)DTzONk|KREUP5aUgYHgdw> z0?S2B4MbP-JAEMSm$LIMrU{G9d4FA!2~+fezou{^HS7GE?1N5KB25>LX4``VPYORH zp9C-;*`pO+U4LH3ocM4YA5)|`5m2cyAuL^efHi7L^!u+Dy8X$GOI`u-$~%t)>%qnK ztC23g8{Du5m&E=35+kIO0K1T8)Vfg_IQdiJ88GxakrQM7m8($w7k$)T>*n^MmZ5w_ z(hR7$o0ON75MHIM?XeqeT>8ttg13_xSXURNA6n5`tec}W zT{3M+O?r`ub7=bmCw(#%1imFGVa+ei&Q4I+!AlloQf^T4w!aw_;gdkCIG9?t64vaX zD3ztu3*lP2-nJgKp8CneckJs8Im1+zjv3@%zfM4x8P(UCiQTEnyw+3Jm%?8;gN=Es zbJ|pNCQ`55kkiBl%2z&@HicRc?}LOh*>&6+nT=ATn?{e&c$k%AoaxDwba${2;~zV& z&wrBMx<$&1zFs(j68DYvFp}!tbW*nthH_EnWFTo@8T@m`zNn6BD$LBa?E{pq7YbY{ z97C4uVVZiBOJeJat+~mF(fEY;!t(k`_`ovbnA#iJN99hC$uIzr5`Iyo0LV`(IkeEM-qFby@c$6-KM02x~A4!fokeHI5jn zYxNOLZik6JcT2UYYujdoDzZ?Ms;`3=uZ{g;zkPApN6)x{hVnfH>39x3s1CZaS+ol) zu~lx{aTOcdh?S__8evv284&GvAbxx>Ai>YBN5aIKkwK$siP>FZl&0LtL!LOdR&iOZpt!f$Q}vJ6_=qtI$Ey0P%m} z?QS|~Jg-|51VlyO_KkmNQ?2$7lO;+kleLQV{CsHZ+mj4sX=o| z4Fc?oipr|#BOS`gj)m5^$^`9hw`?!8lJQvL8IaUEnkg)zYG|6T8Mx(@DzZb~{S$pt z+alukv0^+x7j`(4sHF%g!;1BMW=~IxHHJ^dBl5ylf}iRT3;8`|U#$}Q(@ca@Rt$=C z9q7rX?)xCYn9Ftb^lv>y?EApPKZD1c*XtjuO02x8W&fzKy(4eME6l*qEn^m~d4+0A zZ;>|9X5S|>;Kzd`B>wu)enOL?IgW#8^6ln=V(U(imEO)+yQiP~rh{`XOA;o&H$SbT z#q1{-BRP9GYCT_L2Tp^Wz~0Z-N7#PbU)}j&l=jE`E&~?)Nvh_|F7TIhs_~LeO!-pl ziAan$b(8$YqMz*>7PbfBew>p29f7*9{_9~JjiOWH!{{mSnyTK@=V*<-sz4#i%&Zf5D zlmqn~I&FF{lJbL`SNd4}k0WkD#AHG`!ybkIhO^HVn`win9o-+#bI(VtNSUP!j8jtx<8hC*1FycqfSOt zsx`+k=ymh$!24Iax-YJW$dKM-ErCY=8vO#CWS#acyK-MRJoaddU~>-p@&D!7ks#At5(mVLFZ)_(e8PVUU7I zYRU^;1f+^sJgpDg0d|dU+TiM4R~WYTjV|iO`cBAyeN(vf-^%qgT49Iu&ycta$Dz~8 z_vDIf`jPECqH{@C6{c1(@PDqKIb~nuye7hl?b}&vv79c#uXPeBcDfRKO^}&BXrF#L zXQ8`>M;!3oL$npXzJFtSrJ^GMEr&j!^*OxPzAH|FX(LNvpHEk*N7|@Q*6;)4ZZhu}i$Kg5*>#lTceG^0nK3o1e`i ztxwwYI$Yf6DqAt&Pvb!V*dZ`@rjWpb>w*RZr$FN!Dpry*bR@e%SRlnZ+~A2E5ztKr zAbyxbO6@iP(9kbn3D_f&2MQ1_13@0prLmUG5Ts)IqX|a`5J9k|RC5fGoGzl_f95irj>Q)T2HuO_apeDAM{yKvqWyc(Ipp#4N8{fO zn%SFr*=3+OUwMce%RjjITFr>{`0iNy%rY+;HtjjQ%4v*Z5lo>8Vo`=Ym53f2aaR8Z zmZqyRCzhXJvEJbTHg3YE*4*r}hWRBJ61v{rrKnZaAIc#=_Xk23MLqc=7mf#97Jy^Y z|Hgfu^6m7!p~d>|1SFtT+APl}VVQcWEBjKb%jO^5Q6W6+AQ_7wYe-?$t`x-m_n^x` zTwh+A8m)S=lw;tGf#Xe(h8zqUx#K9+564{|0V;&{TM#wolY;U=%wR=t7OW5AJ-_t-;k>6BW@7w}p_}ds@11W-k>OJ& z;NC+7(y-_X_`@bnMnjV(qXw!{PEx$;T=1%MP7{NLn|5EY_yW?Gu#A# zj)Z}98rxjlu@Z3Ywt_`BMy9it_5i1dIK7#QnE zLTYDv6((rR(pZz~6|`VDpNvMaF*#oVL#n^HHNM|vV%8EF;#c(djcepWdwE$;tXz5w z#Tw?e-27V0dP4TlVO!|i-}qnsG%2C+rTf;!F&U*LL`kJP{*GQTn*lX7Z>$>Z-cK;fgz0f-2UwR&7hTbOS(e`Df+q*?R+~kSegu-f*h<{>I6dQ&rl_d)BrIs>$ zH`$EB_Oif{lfiQJRa$mMcmVC%l}!lsEQT&@^DO$vArEGS%+sk7GQGdE*?8tyM1_f5 zkf7VU(!&EyV$0w$=4sTvjWxGp^GhpKt@tvk&VHoV>vG*%=m4=}&#rg$*G;1ABm_oc z+e+AaWXa>ucKUXMjYf+bnW1rZV@YH39og@6vKj;j4m6oLE{rngKJLBzUH#5OE3wnu zQPkUnyV+a-)m4F$aQeES`!dbue%(cGVu7alcFgR;Mkw;a-MuMj!wgzfaN_XIO@8}+ z>1xUJ2}K|Ke2-RFHwx>jr;ta_z+GD5Ep zy!7&M?|dIsHuH+!gc{Y05T?NcB-=_6Iy|jXKB2sLy_)Pd!m0DfZIz6%2y7qoD?h%h ztE!?j#8#wYW70n*(ev4BRA=2=92X2=qk0rLxI#vb`@z*IT<#1_^4j#rVsl(O)Hr`e zrqqeym4Bu}cj6UYkA2c>UQLd2E&N?7%Y(R`XSd{z_EG~D$TkgiCwK+tGT6!bdz_JL z15+hep30%2(|-7kG6Tu#R}Yl6wli&2{;*F=AzNW!H>W2EoA!^N;)SjTNnFokR5em4 zB+eg`k4Vi*{fT(W7ygL?{a@!^^Y41SihVi%bAaqqCk|@Cpvy|HfSNSov-jm2T3h;? z20?x?j}vTF<7|_osqmO@r}nG(fOV{GB70LaPok=wg~L9T^~zoNp<_O5UM)sSlam(p z3%LC0Lhtm1Bb=k<2;on|7RAsKaK6k0e)ZpzO`PDy5C=SilJf2Pte?cF)VPo`IrUeI z>>R6JM^$LuIV|cyQBTGI%UkwzcW3)wnGb2}K1bH|?F9kMk2042KV~?yvd}~&Go=n4#e;#Hw8g!H0kxJ+ zPm6%uZLlV3X6EUwQ3oy?m^d14l(b?rj)08jF>lS``qF9_MNcaeM4_qDKb6yR257hX zIn63+{xNsG&HdZ0Bfrn%ZF<{Q3xekQ90jjre>XKO>>zeE^;IJ6e;8oua5zQM%EVHN zR}#(0w%O)#Q|a33!4@PE=PU)Ck+@@Xe9N%0R-s(6SYVO~5FJ({QA+_!VTt$ESl6JU zfm46DraC8vG^eYW-ALD6jp^jOSpXbT5TL^(H{FIp*qXn(4la=Z)JWvmDR3S;`fM;J zVV{DiD9GHK6#c7$#p7emGiBITp%DYnF2R(l$y{$-aahT7bfWUsO|OKHlTqs}xsiF( zg-nZ`!%rWrC;i~5-heZtP?6)852&#X`>8b${zuC#M_Vv=;MQ;zCW_Z-J{OilLGG(=O)iSy{%47xeE4cuiOy;cdT*P(>@5v z7TH#zd;x2w=v&!jIQiRqSUn%M9ZhQOdG+7&ysew{bNO(r25id`$(!?EyxGQ4$>)B} zJ)KlTC=gAi_L)-L!yOv+T5W)$D`44kmLl{kvX;4MQy3!9wQW6O&CCjl-2pp?X}vB z9U`z*IuSSb{IM>j2Zy-d2Cs`! z7a2!e5*#t~IXSWHj0NnvpsH?Gu|_XLCdRw+feG`T$nXyT96(nMu7!DDMsE%L>e{Z| zy?)g*N=i6Aga5GyU?rn{xor3aT}1F3@k(YET~ZrwQh+L_>jhapu4NW9n+jf=K6T@L z3a=-=q>q%f{Z4WB7(2`Uet63T$8@5yR~bh&Aeao-_~_)?YIYTb@6m_$V}dryHbhi! z1#;$`K9*0?IDGh&^#WUPGPAtlns^HN=&Nu4%cbZD7$!z#Z~T(Ms*<7dDN!m=I|%1M zq;T~8s#n5it=K2|QQcBRWe$j$$?>Xi3%(*@V-bg`>g>MxpQU2ABgH2XGmoNB{@eih zR`IGWgjT6yolPu>Q~x)h=1Y{hi$Bq~M*EtM%=Pw@VU<&cynQA&k!0Z9Alg-d`?HKF zz>4xmIz5Q@CH{8OptNEyC377Ozl<979Z|pA$=GH8g zi|&J0q<07r3$L=smzsNONQ)~Y-l3<4li|6D@x5s`xlTr?dYG@%NWQfZTlk0 zIrj9YGXCRKQd$08%8kj)#o)$kpR@Zn|UlfS$_o*Hq?EEm`RKlPh$J2W0@kSsCqih!U7=YPI zya2Hrq8^Eh1;^GweOW#o(0GBJS+X*(y1+{EjgAH{oR zTeQE!_#XNPBCZb~fGhvP_dj9Ohwun*UoFBny~15nT_xJgUdhlR8bwJ�oS8oWR?b z48NIBztpnm0(Re_U|OI5$0l-XdP6di8Fyc0GpC2*G4hh>=}porJC`tyU%Pt!sMVcR&|ras0j|ddWOdFu8Z1qZH=6T{s9LG z3(mX1_vKM-vGI8c0}g(g-bG_ZDfR~$;q|t@;hW)i>wtb0g{dT4p1l)DuS&lG@x>aT z0zroy)XT0-><5#}dvo46xDodQSE_W)LBQ7PRZkV*;sW6{t8OuHn)R+JH=p;9F$UwB zxaTQZy!<(RM5!aa6MCg76pCUn-;@ve5Pm#OXfz>Im~b2&L+}w7y|mO~-KRGcsO5?+ z0?=adK<`;~dj|CeL})cFT~l*v=fWI1R6f01O8}p3^z__=qgUWC0dqpeL>7rI`i2LtZ#3XLG$qyXfpA-g5a=LY$vELmXxiVCu z1N#Iy0hU{s3$Mk!uafd_%<(`jNp{wIUXttzyO>{zLZ7R9SpLR6Jo{q<0YO-x<<|yO zN}){FYZ5~zV%0PycbkqX*nXq}xWH`<`T*hKSiXKZ$XpZ7X`DNLwpJXurE&mR38xIG z5>@>lJs?qADwyscRM_y0sd_DVkM3BkT36e+nHlQ;MBq_v1zpjW-juD~cl_Gvx7vQ= zdAG?$FnXurpdf>uuE7*C$4o-1Tj@d@wW^RiO*vAt_0@EeczbN&ryPyj=#dc66Y;j! z9=HowAX?o)GUU{Q-DO+o+#1<~jo5tGXe^F{a`!dCx32?D1wjlf+7aLcgQG9cb8@XW z1ZHDeAutPn`u|tbb@)^L{eOi@b{U_NeO=ihZbn92+>C2o^Inv_%a-*uGjF-KE4ft2 zwXe+VvRyZ1%ShSW5JE2Ud+YZP-1mLF&Uw9F&vDM{fK$c?;{G0;?poQa`(2|khH*Hx zmB>XOp?Ss$IkG1ZPLpPitrGm^d_HCod2OWI2d;C(&r1&Y#ik-s)|hj-20pm`tz?7D zsX@#@RfP=H8e9L<9DEMVSevSxB4T|cFZj2%cYL2woDZS;Uv;s44texJh~XQt{_lsV z$ob=uUKEW+fhO~~c#KL*Vas>QEa5~;F7}%2dzQlfy+Xr6X|VpL_gdzzT1bL=L0v*~e<^0P_PWILKp}9D z#o+k-jz6k6PO%P_MY97JN&3el$!VgTq=s^}sh*Blfu2u*1bmo;skqq~n3XW6|LDF){0o75Wo$$tq|%aBuvlpO0Lq&#+q) zG)F_hjp= zeUn4e%N>ai4Zny9lWwLNYF^aVulgcw1~dNmbK;| z2}6!8y9%)hr_nC#lpM zVeC_1O=Sk;LcFj?vM2HNe-K4Z4DfV-YB=iNX{W3G21Sc_)(hSWS!JBem}nlS09!9! z*?PSfS4J!5*-cYVTZc!kZv}SMGLkaY8rze7m;z7>zdkKNFvwcUeP#Kv+*vmnkfl_K zYLKJc4r!2gLmiEz1Zn(gi9Ma;a}Tw6!OI zryD8LC?tIg^Bu)IBJ;u#wU_J#DXoH;7O1IZxXW;m%S~`#Jz`|a;<^CZ<1CrY<5M5p z4KinIy+kTu5k~W$v>AJZDNP){UhX8Npt*Vc<8gvkF{}1mV||J&;G}|XIHL{yYc8jT z#$4$>zgm7>exT6<@@pyg5Oa(I=lKr2@Mrpimrno?R6n}M+GJN_Y{l-w)!Zt*LsC~A zKb2!q`By{mPB~ZJ!8eLikkzAsX-#$=O4BVy>`-T0?Fd@GVDANnczQB3o%@&lE4V-X z%vpZh)VROJgS?a|`mnR}H|NQH^$%`@#SujKH5yxSF8JFf=CJqAE8mvXxc45`#=5W1lvwe#ZT*fe`724CoRK(Ht&$sc zBlo|vs!d}dOLU%<4>Vn)q8TQle9bdl%-6h!mNxGOrvH67aj-k|n{%P=gCNIk6n7UD zmj#Kmo0EjI{S>&w#Vg^hYoOxiEwtlK$9@LxX{>U;nGZ8S{h-yXdX z%s;Y8leJ7tY(2e=)~C@(6BcCrWYfu= z>{BIf^S;UtIuZ_NX~n7q3j?w1V-i7X zAMWPa2@bH>|FWZgQ|NU*!$0TVJ0+lGst!0afYoaV@76K&yal4GwuSvl`+z!E z2ZS@J?u|CUtcHUXz%`{0r}pRv+E|I&r1=fy2a|j1yheeqZ~qL`WH^~>)_C*?5EuZ} zTQX)KQJD|h6?2k#UOXGlV>AMX)vyrC0_*rkyDP0aJL0?g#$>>$hCt$lKT#d&o1V^< zDE^=*@(@)mqHhPoK&OSW<$i*a#w@0Sc~&kbh^ORzyjzmSVW-RXo#~8x)7(6VN!IS$ z9b?XVcx>vJS13V5y=@Ks`C zi@yhqV4(42pu0}5?`*+5mblQvcf-(kmTyQ$kEm0Typ}&LG}YNw^EG@tpy4eiW77C` z>gOT#ozk|XmZHHpjVW!)ORKh=CD<3SWWxut(b9ere#qxiEszFRw$j2Yt`Nl?@s z9ev>h9ElWgCc1uoJvjS_`ftrSTrvqgB7*gv=zBI14~D%ciW{FdLl*C0#chEuK$TIp zTLkFst5O;l*qVIKh1aVpYh@YQGb-t<+R_7Ok^K2NugVZgAjxiz($OdF6~4a0(4Ew=>N!wM$+>^s-a ztci2RG!s?zuU1yXP*IWXyE5IN?T+M|10^{R)1Np=wm9b#j5d=gT2dum-@dYK@xGs( z{82Njy8L9QA=0sPdtS8#Q~VFX+>|qGBC@gw3feNiw9wV zXdjYu;m%R;$F=rVgV1qr9qDX8cO}5|zmUc@(v(o*TD<+GD>ux0!0oZ!p z`6u}VCpTpkx27S-YfWo;X7y{vnM7WbHTnJ?x$#CYg5)(cmV{2km_mmtz7x6_B_-|? z^)75hIe_*=(~^%1d2TP2@4~nkxJc$Yz1Xtkc0{yfJqTfT^e*#9Y`xf{Fmv8nu4K+& z2X&9hG*PA|(%uRmSWi^2NwuU!W17khU`@WBYyThI^AW`cTmQ?C+Ud&-(ly{Z)zy9> zE%QsZaw1^;NU{(Oa?e&%X@}n!9vzGbwyM$7SdUT4%Cs7-sPj8u% zy^xwmNxQEg|LaeP5Ps3c??8fBA%|u6*bF^Z&uv}s!G;G z?On6~#iF@|bCdlI$HMQukkRE)aP|u`=UD)w?6`u$eOC!2>$eLk5l{Dv|5otaKBTwoGJ6<_1b(Vjt)j*uO*T*mSg zEd{R>5B0BkrBU$1FVEzGIh}3i-=6<%NYJH%<7GCBDvo+w5Y)SJDIfIninytg2W^da zd_b5grvRNo0NTQ^x7A1~6AZFMX`yvXwOx<7(mUN*|#s$L@{{At;U+)vQ1kT;3kyhz#0+w=9 z?>0_ue9uJmkC@^-MsNmo1aTfhE>K?v(#`w1T?8#vCOpj)><)a>icarM&&CP^33Pep zOI{M&=w(~%ww0^)QKk$X|J#nL^2{y0`GCv>MU)Yi4ONo~w{Xo-%*w5x=E_bv`lbea4OGZ%Dw?!pI?uaZAY zkya14uns7o@80<%%An^Z-2epRsa|Acu$Uhr&xv91xz*$Au9q#?Ku%wMjGbfO^?6x{ z15wLG2zeig&zI2>Wmj6*t)$h0GWg%Ga_}SJ?Af-Az^?S$NPurpHLG) z5x}W2dxBP=quAUMp%To+iWn#>45dxd-8@3#<(EUI5-HI71Oi~40f>*fVdC9v9 z;AOSNI7A~ZO?b4lh((t2T-t(!pITgb<5W!fqTS|g&Ur*KyBwe z<0um%OBRNqDGL|3WMjXBmE#stP}~>C3@~nE5*TQ^GgVWdHB-*ERLZjJ{&-!Y^1wE+ z8&=eP*B(AZ(O}~WY_BXUH(Lrw0dH-68RH)%4LjC&FWhNAqa>HOtQMLb9kExiT@dWG zma*R_JYM#b#z}L<2}t19fquN_b{4|9Su@?v>sb+Ny7^t`^zBsPGe!M!2n zg*>n8>i*{;X#zm_m3m{dp}M1T1w8C;Ie{OkKOacXU_GhU;(W(vQ)k7gL0GaL@Y zU8Q>o^qFF#3_BZxxc$p8i`l)v^g-`uMZr3tO8b}ZMqtnhm90>6RJ z_g(KFvu4d*bMM(__w(#?Bj2mY<6x3wA|WB+C@RRPBOxK{JbnOZh%2oh)8-LhFI;7H zTt7H`boDTGwm_0JcK}<^D%zP^TBuu?ntM6*Tf9L+D*LV|BdOszyVrtVPYL^aZz!-G zR~14aNy{LEuRy0j`?}9ui3^Q_g2L9Z-Lz%5Qss7OebmU|#Ji<-`jeSi5JnG5GEjjw zk~SDgQ33Gsi;I-dyl>m-PnCixE|+4TA|K(Fwk;vmC6V!kaYMs}bN9&~E;ho#!bzQprxTy+rY?*2`a4@!8A%APJzmvuleC)k2p$F>yiQx#9uJP?8} z6)3BqBlR;C^GBf9pb@v&o<}!hl)~)6%0KVERb(jlW;->{Swag_t!^p>j6cH8l=B5B z1UVWx8ov#^!E!^~t2 zd#Oq)vIJjI5br&VU_VPMBi83^`!hl=1ITO7Z>J;r;Kq_0wnGr~Gs%bC!+?+{$!Hye-9?+ zoqyN8NUV>hmQZ;bozdTwok&NMP>(Zm_|-(ghOqpVRfqAexfv6i>t^*i#muz#l&_RRI;s|XbOr1P(v&^F!Kc4B_gV|a;^m5}N5`DE*qB3sQm>c1+UaO9P+I6Mqq7)r z?y-7qu(%_g>d%O7E6HT07?=-3(cdUIH_&TFPz~hMJ!&fHpWFjIxLEPIxFq?VCR@_) z7qsrdUj%|;#VlKSAAPn}ZQX%RE zJHJ%O)L@lw4NtKx0f5gp3|~sYbbDQ8RU)B37)W%AY(}-BYVwERe|qltqrK-1)D?)P zqCCFlJ0>8M0-%zBtidJlR2g$a<|)y9vt?{~DL_BjSq`nPSE8V%?Ux7$a}T3{y(Lse zj+EpXhye=+52Tw{3f}-51M~PYVZaw|Y{*Z~`D>O7SEj4NAN@fS9gGmQfc=%$b2opA)9B^V$zNg6gOT=PmeX<=Zi7DOPLKJje)lP7O<&{Jw^ z7F65&G^UWl+LOJwo=AB6%b;mohv-r1Qmd%WFAli*^SBkM`@VXHMnK+m+vre+B-nHc zxDcR|$HuA=lhT$HQHWGmCZ;k0A*A{&?plF|N4nZTT~+ROwny1C+)ei@r#>San}!(} zbOHr?35pj(Jz&{i!>&Z9@?|RZZL8o)L-$|2@$$}rryV9mX5HlLxAGRE7YYQAHq%|j zj2-NajXjlVhU$h+f=OiQUcm=n1&k)%#G5Xtrr{N>zd&7ixg_45%_gM)pKx^zp*blo z3Om5lB+@=AZPKD3R43;h`4Bs-3MU!k>wwg@nW~}pNI@gB&R@U%hL;R0R$6Hecj>0K zXy%cslIP&CcbfxFQh}h?}&2UK9(nK!WIs+>G?o`K&;92*?E|@bV z;|5L4&Dr6N{a&S)7-_%9VZShz&O}H;t|=wNHKH`w{FwWLFaKick$@WdfpN5GK?|~O z-VFTP$A@=LUtcZL2(*kf2RZtt!cI|JJMWyc=EcJ+5#E7F!ZB&_D3th{UkG_Bt$I+y}_+hJZ7h{i7p0x#Yo3 zvwX#kLuB6t*4?y#31jyEyfw2zzRFzS*t)WWQb8CaEk0xBMrCUXn;l_5-B4S5*hX0q z(j&aA3eVa#?hEYOORWt3{FNC7_lkdBIZ$YB5^ndp8B4iVbxL7SK{rRaE7MK>aV1o` z=Q{J%<#<1v&EwKA;xK-EXk#_4nUz9{m#r^;$G?Z}-=$y8AK1PODuRP`-l@aBsc*@n z(^lb&lY9Ul6f9U|i@?*uO zAsZcWJF%)M=;*uzrhN zJ2j->Jln(KvBr9NB4%_U9we)bu<-z+qwOU@m#syp!_CoXqx`*$%w8d*xLidyA~ht2 zomy#Sbw4k@WMy55oY>7Oa@-QLW}1=L`M17R1^Eq4trJLJGY)WBw(sq zcJU?|DX4Vu)rLo~PQX;5j0+h5UZi&syAh{mmv)KwUUo^JFU( z7N;Po2EIZUvppImr`IApIi%{Cr4S^$xwHB{twJcz$$3P~C|^k$jmRorfg@+ogA1e( z%`7ti(~27C4@F(C3;ZU%JuRV85D2gu2o~tinTGC!b-sswcn%+ZCo3i%oJAPmOfDo@FC)EHTgP2N-?bGk*xDU}OTf?h z^C-RS_w9F&#VxBeA5JK_DlTOe0^!n+h7 zLt1cebQYb(YsHkq5+2tdC(@4NgWb3vHOqwYVf5?5>_=)#=sV}+i~V<}MQ|b#PDEN@ zEhFtOIuxWU^b>g|1Y&7~{#ruslBOY~V6xzqBtLYM9XO;l^O1ZJQM#;}gZMd5+ee!sZ7#CO3D$(pMw2$otzA8= zXG}348hTXTEc+4RN&2S1qqCY7zL2*ruv}#3WOF^1w72{lSJG~~GCGp)J4ScNNXnRK z?Rz6)zf^U_@I*kOyVJ-7jWVBu*pRK|jr=(Ie4`7u>&q+pYs=W=9tCh0tctO_A;s5< zpyFMW;c2qVfJ#!SZE>iS2=@PlCVQ@4jf&=-w@e(d`|c)OU3(Q2Yy!M*)RJVJ{6^+dH`yiwBALADG?iBkkSi=6ZU*&Z@1?|L$^x@`r_>piKGFIoIg0VY-Qcp_3|%6GPpg?| zPL)jeuQHnX#B~aLt_w@Qjl13GSXk_b`f8E{gEiieiG5?akgEw(J@Yo{b8Ln}O8`Ik z>*Ws|`@#kJ8eL;SN8Y@BO>W#f<)&hGlz>=18jI%gy;(B)4+nNW{#M?8kw z6@mJmzs0)$qv1m*H2-?wm)caIn-cOt(>lvL4-|oV4t*!igbqu*Ne1sny(`HcVZlmt zZm~3+Gi3ZN5NG)1l+SyZ4AIEqwyrdOPlHn< zd5cOT?=I$Bl1cHN0wS*ub9}}p3+k`MN~rfn1eOw!S6spR35&VI*-V;~=!BJRb7-*- zO#irmz7^`N20BG`V$ z$Q1UL{GOrMx@v?+SLMjGejD__e(7$Uv)RaXh{A3a5^ zph5$ibFpn(t7aXErI&1CkAmEU5`#^$nB2pTQ>V7nXWX5PhH~n&>B+mGJz)jgJ*6th z`P$rpFWnCCbW_f#Sk|OFm6X$YL& z6m(B)=*6JEMHBoK?6M-zOHRRBn@cKqSPkx4ujp?S(KUbST%PsLjXx)1!^fD8wyGEC z(-5v|d)9MtK}qQ3RmR1SzSf8odVnk>zV7Opq*4%mfZ#$<$(;!B_%|n2L!Q6TGHDU@ zX2*E+=ywt*ifc!|pia;rWE>oCST?qVPRBGrI&dwfP2p5Bc(G8?^g8VanV;+kY25EV zr@E{fo+*giq*~03k(PN&|5?jpj;+e3~+Pu%p8 z(Rsr@`}{c7=8W+r=p28h_x1D=8Tp=}Ob9pc^G6}plz82*$}B(MHYUakA1u8p$$d(U|QUWpq%;vVA1?%F-_1aQ(LWWulI}n(8-1 zMBQq{!5<5Iiz29)`5D^%q<9x-W5;MtT%dpVSkLs%V~;YqGlSDiI6PZKrL;TZwT`2$tO3{Ggvstb;RwqHP(2&693k*R!j>KB%(F<$= zMl{fRDYI)E;bWDlg6jRhW(t) z3jPC}B9%$YF|k$u7{$7px~8+-mc&7LD|@o;jkBMTSf0d$s2|fg;%2xz0=U{pNfYmkF<);nKGr-7Rr3}QU8&}M^DKj9{SlR! z51B$IO3Fmtj~|||W=#rnrnl$`ax1nrUWQzSsvP_!)$P-cz{geeGLv5(t5BpDcryFxb-LUWs1$sx z)*XqB<`r~R%e?+g@Dvm({(So-7P?&c;D(Eh{`_zs@m^B%YYOzRTM(xgZ_yc6k?8!3rym&D(`flWWOK=>h&@e zDvf1-N#_y60Cl7KR4R~Zn2~Jy^jw%Ym2gq7>!2V+43tg6@(wa0${4Yl|Bop7fqlgV zvSJ|+KLk7BKe0H4ueHcBuDqxo>5fPC<}1|DHVH05S1yPZ|KAnj-*o&qjGaG2VUkbO zV8TE1XWsl0AGlfWACR;I5Un3cNU{*pXEnY%7q;E(YeAh@^m{D;Xj zSx~dV9>L5ZGJx)%+>cKsqMs0bh^{#?puH5PlI)h~>n+>E2?|r*iq4DCu9kabo@vJOiRmc8 zQ#duG<39+Pg&)(_azP@fUy3_H!-#-N_7@S#z%FbUF7bz>!JQAw)WXKt)_#or&h|m! z$;>5B1~%7m%#*hcOy^m{qx)0|UjZL|7w)?{+(0Hn>r(0_-SC+2>U7!gpgrO;1Bx15 z2lD-q4!bf~GjG|lh%}YHjOnUJl?w&P9L|$N-B=*}g_WdnkH8GT{K3%_ZH|SnARntM zD&pQh0xBKFg~Gf)+h0x#U;c1zl(-al<*9aoQ|xv2F_xo}+G@a_%Th8` z?SW`35YIVgZA?FrO~tG@VEJ`JAu?B)15GBwU$gnv>vxy{qp#vTb2a>EJE}X8tL@N4 zju(HcL0pYXWy}}sAq8(ff-W$x9Q8E>J1*+)7gwtM z@}s1Eo@^5+JH`NC9z06{l-0$acRBxStz=vG&@4SK?W(aIKb$=a!1k)O+5TUknrm4} zQrcN4A|jca(Vr&+q0c9gAHN>c!T^!UwMoM_T6=Zl@9m{(G7tFB4e?CKE@HLu~{^-b)t%V(>z+xe0f! z(KE-Cy^r~!KSWd~WUn`?_{a%*?Hw<8i4lgsdv=I6jfJVcKe4`FASdo&WKM2yY4GEY zsx+YP7=fK11yp3(y7AHe^x=aUgMbCc<>-wiAtxfQG7#bd3Dk8=_~aSNePB%-s&2TeuLCwg=Q0zsdu zp@IvB{oCjT&?EiyrZSiYF~*J#v5$4|^YfZ^3pOL7zS|(b8)?X4;{Z~u++4|B`zEsG zB%k=l*L-<2fP!-fambJtxcJ+hDQ3G7G!-@#Y4~yPJxBuS_e#}*xo#^6C%^}_Z9$qO zJSuP6_Op(-VIxel^q-sth+rPMG?ns@R@c6KJrnDTq{`q!O!J9{pw^&IBb)J;r6NwU zr?4Z#V(s=5{;;?A1{65)`l!Jhh7n7_0L@4@Z8aP>odcAf;a_8pn73Okb0 zxJ@>1A~hF!=U*LMllHVV-w@)DrP*LePJEN8e8rG0lzGha(9xkllz-fOuA%B*NmTo>lDbyX)@_3Om1LK5!kH6ma)MT|(W_y+F-v7!;M3h^*xc1*pSxEty zm6he?uQr#dgJI~mh!(4IN@ zVJC9;!>P;7G<5h}t0*FBV|y-8glbCPFMAOuj z_jYjfEx#J|(8+<<7Z}I9i#kgnPVV^&vbn)(sQ?e@kXFsFDNG?7KpSZdS7O%Sg`T48 znNo{M*!co3@pqRN?Cbu+xUt=BlG^R#475^bG91LzLII3I5)M%O9ZN`lA3YQZB5h|R z*1{TGsI!g!=11s8w)>Wt0v$qEtATAwmC}EcF|J-dYlf1sOOO#k!EZ3UfB-1vAF#gQ z$oygTmq~<(X!~PLW8dp+mFVo|OI;FO~or!=O=qAm3gAtzx+ z8#;(|J`Yu|CNJQd|EI)Ac0i_p^!x)$!+jeMdYG?7{0na)`2i2W^^u1r)u^{;lD2>$>VYV(J6Kvc)_6U)HV-5A46L-5YvAzdA z+I^@=EP0`V=E;TjCM8o@?&vC)IZ30y;$7V-oTuytYhY6~$aA_Y;LRS?<^4vg2N=8g z%oryp`l7^m<)NZviDc|x&%zogRVBe5olBePY?NjY_`o^+Y9&O%DzA5E8azry5kBZO zVgfiGOh-?ARN3pdBGK(U5kBWa)`ArTyFIJ4w<|-UT$?ETS;rv2!nO)A)j+_VZq_no<%pDfR;c#SJ+-(Dew!9Kd^8HjgxNwx zhlwXs>mhz{0{AD?Q#{;9wvLkKKuvqbNCBoFB zZ%LkERIbRXG-kkV{>t}7hOcxCvt?-nD&icK?&d!@5c!l48jFZo0zlt_s{xAdS23S4 zIJic#uG2S5lP}<~Wx0Z;iNv(9odHrrdHJMe)3D0@*U)D!*eUpv=sg$k{HGY+$^*UyRJ?cnpXzL_nc>%`E0U%U~#Shk3Iu>uf)e@%aNdrkzy%CNHS zL))4OdXKx^Q2Nzne@DBTTTQV4$c3EKEsbk+-Cb5IhTU0p5BwJa^gI`TZR=iF32_NI zylhSkqcD=)3hlW`og~8lFbLE7sRL)&YVKO|2UXF|a{Y?PhU9Vl3Ej|1g9vD+Bqvjg zD8&U7XJVZIvkPeaiaK|L*pS*%?rM(@UcT^_qdyyN2%WXMrfykM9T0_ve}6pD;4vIb zpuKIFmK_v6^OvQ3zD3#UcVa!csM5QEeML18ntpy;_z6w9)B%bg58urL0C9KVIKe?N zYM`5(#3(64vK(g7ezTjRT)ly9=6x&>xt=KZaz_Cw)^mY>nQ93;{HBqG9Nis_JH50` zm8Rd(n&PwHANixc(~*kqH_g@!8Q!mH5JBhmw-0$?320awmpPN@%>QP{&-_Dvi@a_1 z5&VI>@=8GHo@rzBLlk6HcKK3+og?wn@ERwKiKD0JTyYU>U6r&0lp&6fi`uVs<$T z)OQp6La4u@Pj*cbXkSac+f%zfeP%|r`K(jISI%b!0QwuiVG164f9KJtZ_toU>?!H~ znkhGU9VLYlRcp+YK9xhv93uYwGhUbI>>2^HGxpJS<2XD`4e4H9`_vhjgmI+g%m^Ra zH5bLE66Or*(y=AdQ7jIVO-QekQSuRc_W+xt^)A!u*|_30=<@4Pp+%zKNDDt5048~( zZ998dR!7#54tjm0>I4_G(=l*l9{jxISvNhmpT~V4XPw2y*d!(#o*J7lF|M6zBvoVU zTI+P;pG4OByBeU-QNMFA7*#vk2zZx;Lj8m0c&08;lMO|_EtM7?q~O>?Ld zV>889&hQN}mbi+pJ`)H7ZPU`{F>QC)bUC3+o-P&rQ`*ixk9`?;}7lt>1p|4&#$IVEB=+zSiyhkP;_)d=IjKFuTEPY%u0^P3E zGom?xsA8WI{mK(I)Xm1%ZP{nN6@!01LscD*_xAR!e)(sLn|CBF%Uh%U7G?|Wx3Kp~ zqyA8bgon|g(6itiacJ zZ=d^k&a3%e?E?Zad}5-*mJ|n?-T^ore)L@E@HJ2;8J_qLKFgsgbC3KtWux25%wN|x zciGb%Zl(3(-EXKno}K~o)>}WX??XmIJjf*4a+l#(c6h0vkB&5%q*5>P=EHZeVvOa` z*~*c;Q@NVOGcM67bgFW2jUFb9r)QhP#i-TI&dM6!e}1R*&0T#%;wo3bx{22_R+b#d zD-qEclk|H&v{T~PePov1FA&`X;L|e@_Vu`ul zFgJC`$tEGahlD|4t{z2{antEzq z5A~VyBkuiY5^g*$N34$CzZ4--U4hPAv7%d!H|N3Xwm$5j^UG9^zU?lEEuMQS(XXT& zdFxt#*@6BY95B5p!sFhcM_@2&grIr2g{jX*-Vjy4ma-ptiTE+UML3z?8QHfu*VQ;8 zT*hH4hk#4n=6-PN6!`a>%i^IxNptSK%a}K|q}qQ2TLFwgn631E+?(AUfdK(#406-5L+G@``JV7$~$LhIE(Tc@Xs8b>x7H*JwOn% z__C3`Y`?6oY@v3i#NLqKV7{(5x1dRY(tu*M@biAzzVf*Hp5gIH?SfB+2(IIfT-^gb z`3~qC9*IayU~~Kin&g{^I;MVdg$s_$k@1r)%^tL}JIKFyM?5=kRlzK}?S}Lb0z?)( zhV`3iascQ*d#Y3?>mi*;_!v@~0BEBGb#B3C>azH^IqrMHvQ<>EEk)8$N;d*1Ne zu$yd2Z0Z9$heMrT#TLUcS+R4Qht@WBOX8FOt`GQs-xo1?eM~^JgJrloEP_L>{27N6 ze5}I%c|}4cqi!2p<%U?5!o0o*)mtH&IE^(U{#(n5YvPY8YhH10uoqQMhB)l2i#S+{Oxa0RL3Xsz!{WI7O)70=0#3ek z⋘WAXp+$wyMvjLHCfQARIYM$oMt?*p&n^V>Q9OL~!4?ms|Y3aFo%t7*^7ixZ1ds znWpp@GVgCk?hS7-pK%Q^5=gU>FSHulk++Z7djlK-1KIr64g;lYT*nMIYr3V1Y7=*hIzN15gWM#Q*#d;X(vPrGWOs;2@((ws}lQ8 z14>=|2ll!qaJTpT+=7$rBCG%-N#eod_PUp$D-@-I&4j4FZl}5Ya`SeUxt( zSsw{%YbRtDkr!;I&+OuT(;l-A4bGWDA_lgc&HtfaLtzg!=^V-ywSo7N5L0+QUr1aP zu*b%V^YG)1R4c+@&S1X5eo@Hj<+(!f)BW4L!XYr*)q#zP$h*he zcb`@2+Izo2;h2aoPkeBA7cCAvhP?oHojYI?s{(9#bI2!rw&6yGK%s!O>8-NWA?BpX zE%qS%t|F`W#$?%i=|dqzAFbZQYo`+)<;KG=xOm8umMPeT2c*D022ab6q6kqqTTOFJ zlkWysU2ZW^9;ZOB87!mVv)yA%FNpQG)rv=nQArf9V;4Da_PTmTSVC0CI>0okqtweW zsY(&7R|SR+7w8h1FQ@%f6vWY=1r((Np*3$|Bm{14^g+=$xF808E=`r5t5nnH@c>El zjz1@oW?4-g+&#FYRsP=*Df7pj9I==QVtlLl24%wH%I{8L&j@G`!0Mi&qisYbrLaD# zKq7gQh=z{y2Ni7TO6F3}W*I_TrDd%;#T1+M=d~Wiint4-t_^H*_+!8q>#K!3?#_8D z#|u&8GTm?j;PFjt#i)KwvUbcPqUc3WY_IJxv3!`NoWJw$HYyOj>IWl_S!nL z-3LO?)1%6SupcB4f<}df@n#K8qhC@$Ay5nH(pcexHu=1Qt~d2gy;DVTesl2yx8$N) z5fc9xt6Pc*WD3K%gcf$r{iMBeWD<0%#oq*rkb*wmv}ku6+I_M;gfk)ofXCeP*p?U1 zSZeWocDrBam>tbDO4ya|5xTkO{~OUW0wbWK*15u@ZT*2;%{jf#I$CPe-Or+_vV~8d z>iBA?a&wOGiUw5^^5 zqNM=}4p?dv$h>28gm?gdo`-{mKdn@p_l&d*-Zxuo+quZ28{sV%~VVbrOy6K_iMBN#2HF>qSe7RSzcwNIp$e1epAX78;WYo8e%61 zJFG6xD=J#qJ}`_Efm$Av)=`e3i#kUfhU!MJH=jKE#Oiyef}`%uthv+f$tG~X*cTjz zIVr3>JZd8DP^4-ae)m3{Og8rz-+P0IKMT>3>=DAnmRKs++mliwLuP~U1whSc^g=hQ z%A>Ca{+TyD2@cKYmR*#@#(B*|8Ti{tV9R&+Rn@}K2|L;^zVswMApx)utA;7Z$K^d zAIox%Y92O}-Q7{J%Jc}b7686&9SR$hURzHb4YhTVg}rlB`iLM|p(5pOTFFVDS7 z;a!ghPwDOxdY+H$C4UE9N3)5uxM%%k$W8#fDpY9DC!br3rSflP}tl;8<%Y_&MjTgb8ayM(93CqqbltNa;bck$kqm2yLkQr!N)J7=yDSQ!_# zjYGk-1bTL6lY`?Ej9J4IJu!nuY*>k_8<52Ys^`kEb0ar%>lez`M*ABV_OnuWh;sWO zq+YqpLbN+bO6I&4(;w?r)TqL`)k-p9hIAGGr!=DJ+$ifYhOk~?E^=I$E$%<1LXyCc z{on1$@o&4ZX((l`#0=VkXs?2N#q=pQsHn*=2y09|MsK9dy|1qJG(b)~Sr^I1)p$%honT zA_}#!&bj(M!b=5R1op^`LIiz`YG=OZ3{Nd)7SwF5zH(U}su3pk3~#!?VcI(fAJIrV z%r@7Dq`dES0)*Z7sE`TDl=(y|gS3`3r5y+uSp*eR(W4gfMWYE@u=8yCLa{WP8)r&Z zJx#Ggh|5KMAs+muB zKE8&ZCN_?`>Bb~0C7pHX?CUJsOExoUOTjL01w$9eP1i8XI$m+FOCU3)v*}N` z{@1HNsISWLefCdTq*`8o*z=%+OdTaYRvbE~f@0pzv=s4i)r$BLI$z0JS^6z^4f$aI z7T;C_81l!W21~y@OEhM!O>aB+Bn{vqJu2*;Ae)Jw`BOJnCt%)V1_ z*|@WJg@#w(<+~I0>0ALkQB!RSkz=H;Fp8R(#$E5?Z=E30#fUB?WuO-RurV8LyU6pP z9e1D>kLT^v>ksqrA}JKN&9~L!x!ca-B7b!4@N7y#2MtB>r6=d}k%4Q)n&hjJwc!O~ zwkc534gAT)^*|%~-hzI_T_w*Q?HX5Iu+^Ov`_mn@<`HA(&;mfQBIJ~~D_9=2i(mrIX zbDPyG#vF5tA8i>tu@xKqVivil0=@Ogn2@1#Z3~%9w)vfiNmSbgJY7n7YuI_jgJSM9 z*waE(qa-uA&ISe|J^4tb#RA#U(2z7ZKdXP?eX-o^Ujbm{BqVokZh1O?PT&gP=dgaG z`WtQbg;v)?uZ?OStG{=~FYQg`tc^?AyDPive~Bzu8Lv>aMl`9FLB?Hv$tZ=*q(81+ zWYoPyEFt{Ot-c=H2{i}GNj5jP`L&_vM)z8AvU`j6krb8T__b;MJd5T%(Y;7&(!qlSN67S-vu*VJ5o~(}(lq(u|npwUNO(A?gp?I~|oi5zDhxckHPM28e zdySabRcs3}w&g|?AeIdS^0r*^hi-UVW4f?3ps72W!1Gvfx8&|BqBr^->J}S4&iDYg}CO0P)h?psd%w zUp?xyTgzMscLH$njpn^;j&zN0_<9%CfGr#}%c1dS6HT$?PqK6N4H3JRzFvNw$EAs% zRIO|blVt>kzX?0X$}*sfqo!glOL%g4DT(Lq)WenVo${$b5B^JJS`kC4MIX}(L zv)Mm1FGqD?OQHQAgm8IGy35D`*R^CxzU^lA#=fS8?^A}pz6hl9Sp>4UTv^xGVEjNK z?E!~IKg;>mB5mw})_yauWpbfwfGHqT&lZjuv@MwB`Cbdf9WmRAn7j8fmR2>G@0~ z(UBQLyeekQ#}B;fRYGimEGi^`BrMeO)cxrMUdi#!7k$zRJR6BW;>3VgQHvxf^)ed! z{lW!hI&1#TQNJ$loC_N&n(B??jkeDI`fH@7lULW&lsPRP6uI$u@Ez#Qz-Omg+qC<$ z&aSZ+XecYVW9sE#I+<1+j`s_i5>)x`bi_Z*Tb4+V;;f#_w6ryqzH*|g^SRI+{}f(w zdkrF`)ycu5`%^7k^q?3*GIlx7=I$SldlQ z?|ce2;;Bo`PFqi?oIApQ2Nm3?$_k3wHD8;9Lb`NxADnc>UdVIeZc+xM8I9bsj*5`~IMF&{-ggUVZ(sGGG=sH%&_Wis9;GYl(6K5KC&#iko z>_#l>4mS*2{-Tcxv+H3_e=b9tzsA;}x!9{WsV606c({y@{q`;=imG(Z;gds&Ku#>x z1^@!;(U(v@!#{A{NH;y+^;s`Lgl7N7z{!o>kg;@eR3mTweAlvZylwix^Ob zN@vnq)_bfw?v<_ZrmZ}f?28@#cYo(^t-6N3klV=mB?lID2TN~SME{;7K}sS?D}}YX zp-V+AQxNdWf5Sc9eRO-)PpAAowgN|NJBfVmbUj+^yauOW*Cjmuz*Hn(PgvN7pRdkN ze_^7^Vl`!9uCBJGuD78+W>_}Dh#vdX!Mn3P0nS{AxctDap_xx%&riqB1XlIY`VT9) z^2Y}SqAc;_tf1eM&hCS#I>s^nGd!G6m?!mr_xC{83Egt+B(`k?2ap}3C|5}{%$wpYF z@;q>Oep1k9cM<-#RFS2S7E+5osbA=CuWD_g!%*-3Z)M)!D)_Y9P&P9AIf0(wLDR;p zxMj1fyZqr+z`zYBIR(upmoNt&6n|L4ZkvJ-Wc@>U!cJGN7sJ~;RO9Ri9)9i$o@m?_ z_O_J6Y!`upF@@ZY-k53;rEhAzgh=2}_CRqRGHEAr(p`S`Ln*bsK(% z?B9Bv7iQO|G_h3F?5LC*0qm=*gkYQ(t+1olCxpzwP~X`{xL(CnHOq^>INI&c9I&Kq zJKM%vRR)fKv5RsSGb3)sMJyXwRU+k8_sNSs`-{&jyFko2rf&Cc=;!rWdfqMp4Th8f z+|N#?*unQXfEbszkc>@5?c_wCI3rH9-A_8`wHC2iIOIpsU`PDA$qEWxU zc5UY)S8ih~>1Z%s*LqM!fp>5R?koPvdcr2Axo7jCAsYGLLF>;z!^4jWT2Hg)2woyb zo7O*YGG%K}lB+1UYM-8}AC+wuKr_Y@s&JX5PSa zty|;48-c~S)?WkX6xE6=F79vJo8;&&TB{z6`-JLF6`v-xDqSBc9L~~Mme?(dr@L7V zQho@_KGrQsoxC zh%w6ks>|cwuaQGDl#Z<~k)9cF)1Rx)p#521imA6Z1K=Mo+jF6Zu`$Cm%)*k_iNBnkVXyZmNFRJ|YTqr^-;jOd^1 zZ7jdyYuhgeTqyo98!W*5o6Ga>_o;h*{4m!o$-Oz2A+if}Z@1}W>tXBoC5kEKy=?8Z zB^BLcyP*3evV>$|%HS5eEPJOq`$8K5Q z%@e-W=<4U;FnGZ7rEWS;2@`U%i#dk5z~-JEKfG)fx_$T|-|;5Jj2hCpqd}8l_s1+- zZ#!+H+Kr{k-{hiLVF%kBc$H^+s!F8$xVZQGETgb`mYJi;>51m0j1T%Bo-c(}`tdbZ z3%80JI5$LZ1wZ~uM;rc5h z&M#KiEaR_L1vCJ`#)J#^F7aJa=9nVjJ>Tmpl|iw~$^H~v-Qt3R@5x;q7g%2Be$&Kf zNS#i%!Ze(~dR&$J&K^MA3paAZM^_mXSF=QeJ1p+9xJw8U+$CsmcL@Q4 z1$TE1uEE_C+%@Rp?(V)g?A!1CqH2qpzPIm4cTb;lN@^q4L)&&;;gIQ`gwgTef7MF{ z8c8i|&N4(pbN0hP9#|}d{!hF%-&nD@7mhs)RzN%|a$hx`YFUV$C4Mg_ittL_xj(W_ zL>{GYi$-ks(D>RlX~aL}IQ!vBpahMC|LYUjOtbeRE6qrO`doUJst~OsFpYCMmM%;h z+Zh;P5=Fc2iqN<_^%87ERV%y@k>XmrB!!`x8A6COaM&hmr&io$Y8k=GzveI5^u!dL zh?689Sd68oD0?w6mbNt1Fmy)Ae*7zOw!~k-(-onQ6s1DcrsIXF4;!;Q`GPRNjwQ&P z{csQlcIp}ft*WL)YN4Cxbj}D>5ifxIjl9Y?#6r%bT%9Eh0Sn{WniIhb95s~s;641^ z#mcJL;7um)rFXoUAHM(WyV;x|?IJ)@kZ9*Kv-tywH~i}&{&-#gR3@cytFBpdbe#@< z@Abk-bbqOD7r$co?_Sm(&Nu~W0;4aGeh<=;4w;2bs#W0$JvliU_|z-SdTbzM$gw^Y zx9KdmzOs5f;|VNgt3C^>l@>)p$xpM%>V~NhoLt5dtQiu2T~9oK5){@&G0hdfU`}yj z-iYrt?hxwhbMhFM-@2^@pG7ieH}VADu$fsuFQIpt zK12#@D{XQ8KQ}YrS=E0sJ-PWZPeBrg? zv`!kgJU7F;o6mFBd*eBA6(F*?WK`+LiajH5=oGfF_3LoH8OK4GBjOFFK98E;>QUFw zp(-zB@sQD{pY!Z~82U%UqB_+a!uND5OCiN-K=v-a09h@IOG}_tpZyxTk&&5s)2}fy z5j%e04LH@G2-00#d+w6_w)xz~v;N(do`h7=8m>}l#5Sx&pqYf!I9%sPLR(|j;8kE- zP(IIq2(6$;N{@9L_O%yhaL)rE3a2 zMaO-Q;6{@tIV#(U(5UjRyEDD7{vKUPO*On+?yML;a;2vszHJa6VGA_I!2YUrpPMRTq4qo#hXfhs5?)b-@l$yra|%&j}5aLj)908D|D z@O$z7s)GgSeCgJZLwZvNs zI5xbWKc94ih^s!6VUd+w!El7{c^*WRHDmws}R>7w}+q{ksP{n>h zfE_b!s%H|^Drx}^N6BTc{kper_LLP^95vbHB;4uPS)fpastOa5CNbAz^r{JUhdVcAuW*b zA6;VF{M!-Q$WT{=`I`Y(IFsRN$?k7g$au__2YIPCy6L^UzqW))C`m92;^H;Ukhkg~ z<;N6EDA+onCyA64JKG;OEjJ+mJ{7J>`g@GExsat`L^${BLDx}ZVsX#2$!CGqN5|dY z*4CEegFIfG9Jjz4E;I}vdT!i~A0s|;b3{+nCq!-hF~mhcV{`mwC!H8O66LTByLiU4_5Z@M@Mxu z8f$#(BeguhV9x{ll~CAD_Hl`|0f0z?ym;Nnd~CdjTm`-G9V@-G>)2gCZ+}nzJIZW{ z2t2XW0!kgG?YI3nU{hwS!=z<5CHe7b`DR@l3#8*2@wu_&zT_Ox=ioZ zytJ46;zsp~_-Z6$ac3m>8%bew*Tnu2#O~r>Tkfc99BR9`zLfi~(zhcS7}6^V-8{d= zm38H(oqJGbnaXTYcD4W9ZEC`FN%3 zd`sLoqJM(97e~+y8$%0|mp&z-H$Z-kM-!9lz>^DkLaqKnb&@Fbkt;d|uo#PNiIu8+ z{%%QzRuUzwGr20#wwL!Wh^BgoBIw`aw@_-DuO#ZE%n@ULFqhuOplFmjLOkq=*mEbL zm0_!YBPgPkq1bawb2P(;AeFvro1p`NwX1ji(gW%_f9}=b;{B+G$H3wFZl?W~kO}5U z?hGgAw5$jH2BJKtKpx%A`(}%)ZDBct;m^eUhM%_lf*jn4AR@MxQEyE+fi#O20Y<-W zeNctaT~s0&JC#1845ty32A`h4axm73sCGeYIxx<=nfIR@?D|j;v<6@m)YV@n2j*IR zeO*qu$i3`UhbRw_Muru5*!h{Tjz);u%TPXdixXd&8$b8 zu*Pnt)%qtJHlUSAwx?ql3A0_nHA!1dyQ`P)!mUdlm-{RlT?3@t1F4xaOyl1*(%++` zW#puUbx4Y?ly^Z+O%+uRKZM&P;m#4}fn$nzi3{BZ+O1n>>r5rv)cQ^7tUb zzH>=E5C`#Tjn9gGgXtw#%Or3A?t^K`k^>q>wPya0tT`ysl~X;$TxaqIq{=d6 zNL;uk@W4UdIXq5#|%~6Z6 z>&t%_;`hSKZZ-9oM`L>qcYp$0z$T&3P4PB&Hk4M$E@YJwwvJKCl?4VqYV_%$ zM{p^ z20q0}1V}xs)%umxEe9UTJtL5hlpxeKTY%()_D3n{K(HTj4oC7eHTqZA+Nf1GXaz}2 z6M>*Dz8mi$TD7DH_08UxCcym5vu;iNb?STa`;YJB9%E!HQE2&lJF_OgcVo||QJK3I z^vuKm7{_msELNt!7pZVza6$8dloSfdRD{%Ie-8X6KL%hvFaz0%ZqYnmteH7{ zhkfi;Tdq|V4aD?oR4(eBv-FrM?a{03JBdx8 z@Y%mprHY{T>E4j{EL2qv82OGZ&)!8XoNeSqnLw~l@p-`>+h7>TT%~+nzf6H2tb)jf z*hpVj^s2HzmZGg8b=Y|p0 zZ!do`5G$MR2IwltwFZC4XiX<0aK2tAxBTe`o|ar^N|F816?ILAO=iw<&Ls|tT-+|3 z3NL7&hFZenSqOalnU}Q_3d6PVo*g=8M2j7Sx-13&G&i5>!lscwGSZ|!*g8{QDz^7T z*?%XaghfN(mH)r%PFcBVmpZ8e*0*6E%a&+t;=1W9!}g~6qH`#>O{G$!YvnSw#9hjx z(l-B$loz(kpzZ87y&y+C38giPd(~v2s_8s%j*ese5o@k7u7K2@kx}NCz+y?m2Rx4{26>Z-S;SAt&2OkU3tli^ z-l1Wy+C^SywoSUBry{;Tfv_ggb1u$sL(0eFax=sNL|kf$>5cFbR91}ObVww;(71q zXX?Pibq;+J(n^9KC7H0N$iIH$q5cS*FKn{%yL@iT3wvs+O>CPs^mqJM+9XDqd|9Gn zkq>MYBTWjHcrBN6xlZ}Y4&YI8uF9f*Jnv=p8HOI^IHJ71CWQ}Jeq{DctqfCBCeV{3 zFUyRGpuE$_whd>_9i{*09&HTyDGDsIa?CJ6+R93}mh+Y!BmTf!N?E~+Gx4rDH zzuiVB11rNl4Y-%DEvhs;T7gy(-6-6G9zzJR{3qM zPpzu#6^Tgjr(Z5eY1M!OYkXY}ho$b$yTi`>{>chk2crLXx5A8=EUgHwsj1xcX`s6O z@W*$X)k0x>anVPw@`|u{#lOFd1SJuy$DH_QZ}ex}W=B2)&wAFK<3PlMtgc=k+GAM> zjr&O4tXD+Mn87#oOkO(M)_)_4b-q6JuW#wqpTn73CRjCHfmsa$} z!=A$RZ0@)}*ssADm;HYGy@uKK&BIH|r-olN#J@!&4y}``w)lE7=~j;;nsV$jH8W31 zA*Jrn4~h86yn>-O3;aKRqn~j_f;5>SF5oV9J|7hLWh@I({mA4*`h1tI&zaM085zuZ}0)oF^N?O`6jQ})` zVbfQ%7S~@JSGpN!KIinCvDQdD@FXBnPC{HnNOKv*ut1=F50=S80_{&vm$S}s92qlA z;u5jYmkA?pbWK<}V9tB^Z1u8+A3EzhIx0Gjr`8{H{)Qo3LJ=fMBG}GVmI$|Yx?0q0 zU$d1ywd&+s4V zxMTnQbY_a&g*ujg@MgtiZf$B030b4{Ec1CrI`K>}mIDEy&ETnd5())#1j5hOY%G%g zW<}KLy&eeTp+_69#?i9Z$0!3I6x%fw4bzih5Ne<&7dnUul9DD`pyl5cW6k2ld_m|f zW9-wN@Zda6?3gVZFcZE1aGA6p4P!i<2*ktp>gQDQmmyxo#1JhL0?*oNPnRW;QOd-NlyKlotdu7S1oCjwgNh$0*-gQt|AG(U?LERu z_jKc4Eku)VGiwTd`hE!|m~;@xx<~@Q0L36*S@J7Y~tHOWmTp|58dkvDuIvH`*x+i3C0Y1^* zTO2Xmo%p@|nQsu}{wY}{;w=)xlAhEZo#|}=JavOgvXv*FquZ~>+J45hOC%EPw;Kt= zUq;h%b)$Tb1tD(v_&7lwh&V9Psryw?*z>?`HaGbK21*$A!m_{ISrKF|(KTdB&rgVj zUOmaOc!(lw+`zv9Pbfybh{f$en0!h|KOFLv1irx@xh_YSdbn|VnCoXMvvtlA{PO0g zFGF^d#%Jof_p#)>x)!x7$EWJe3@1<6Q~6eY?kJ&j)$$s3Th8SVlEM)eLK%|68Ma4b zV3sw$)}E#1^mg5(+_BYbmtfrX%}?gveovjgR>W^g_QwLS(w+8)BT4#T{G{Vcxk@M^ z`Pc(P`Mt*eTokz5=loemQY?@!>}gw1ru6HX^=j?KNr=GQ3tVCx#87&O_!2ooCJCw%Qkyk$&qI5g%of`HkV|AxvyLtFIQy z@Y!ZnDhZoQKVoV%IusM*@2t$NFP;X8YgTc3oVMt0e1uc|MELTc@YOw3qp#4Ir=~}u zZ@~b6lA-R^G88^l$Z_kF`>%R#cw3!ntPj_Q0LA<1?+gcYiDCuI@U@94mu0Nmp{~nCeqw<2Z)ri$ zYF^2dhkUf7+F;)Hp2?YSRi9F&_Sj=#jT%P@alW;cNDxH~q)_uIZb{Rp6PEVKkUENH zGJTR9y^iH+N^4ki6#N%(Mf17qsY3x85IVyXP_R2T<&xa>4`S<--i?#Hd3IC4y||ax zn)BQb3PK&iY6*1+ClxP2*pv$Eu3y&}Jf$(yq$PrJseUX(Ud)l!UBdWN*iXA)umB?V zE3Thz{OtvmE{+Zug$+dDyX(tX6+V_=;G1{t+n)EiEdPDVz@E*^vZ;aO1vcf)`X(Xw zo1I6@Ict*LZ$CZ=)gncG1Hky$BtA>vI;AGT-k)&DQ9C9Ce-b}1f`ifAMRBbcJ{JQ> zPAVZ`(n3f~9^_Sj)+ZQjq5Md9mEP~y(i6TH<~mWWeVwn$MfBX`INhpNgGEFN?2H{u zBF+a_7`PXa-jEuja4-5%uOi|YGg(2Q93JW)`oPVmO6X-&U~FKKDx6L+P~uZf$}@ZD zn`1fm%kIS8%G8>dMmuVik?UVl?}d428sZH2cJnZPohEE>o$`9WR7BsUMl9@w=?EBB zJUi?|wFeIKjxKHYn2N-s`Dq$SxSHHd_jlmR5q(S0`$@#p%*(^$+Vq3Ox9+*Zv32P& z&o}%J=0oVKqj(4Lqj*Q2b}TH5MgrW8d(2sme11yn8U6$clu#95Z`BqSBt`e9SQa}9aNk4;Pxnd z6*J;Nt(r2mxIBxh`eHRP!OQEn5CxxY-P*|9%PI`ggt|72A<=iIaL8CLB7^y-_OV}$ zTCYLWszp|*?h7=7m4h7vI||EE))*y;AyF91Q?e_!#RvImK`*g_6FVDO{y0)n&%W`9 zkUr@QYda4jNM7_%i0~O#!XCt?N3PC$8F1g+ho3$WW358ensNs8R2b_d@N{ZOXB{v_ z$M+<~`fTt;3=+)Ix~OvK$BKF?1R~C2P5WE_o8Q&WG->8bXMXi4P8mYL!=MC2Ip7{& zgRs|W4mw^nkX-+Be`EXKm^>zpp$3&0IfHXkQPIS6V=H?G=)(b^Hh%sVF#v&E1V8mO zzr@zkcDrPY7zhn!LGuc9nfu9_DQ3Qh4Q5~Z@u;h%v5AQYBu+0kz^H}3+_081thGvK zNW&wlAp;@FKzt@5R6jh2NnI3v z`HgPl995Vr!<($`J6H4Y`UTBv4=%wKC%!9E?(ezvolOc70!_}665}(@2FKfces&$7 zFZ~tno6~uq7Nn`_?yLr*(rqGq{Ec?%e(RHS>*kJLb}azqgbYM}ybk~O?5Tq*G+go0 ziMsikKk5{Okg|~vy(NT1gent$-Ej~3k2BIrcdMVJ0A^RSP3__{^AZ4EZ{2(DehwW^ zGaJk=hM-I+G>95U$I~G+kJHU=bFAMrmiHg`&lhg+_Q$d{^OBw@_++k|3MDI$=7=}^ z`wv{pWzs9wE_pcVcK50GG|k>Zwp9in)?NrwJPMuvV~K=wyVTBp4f$I|G$1GwbLX!2bf37JVz}GNMU2H_piIvWmpGg{vDI!h zV_$4LbiSs(PHx_^)8pxIK_@Yid~3ZWbiW=}^X=*GFJRQY1Tz1)qGIOMcucPE)qf~z zQT!4)VfIK;;4*k7Sv&tBFFcY0i2hZCvLJ7sX$Uj#+4DMta*kYFY9MV>w$*2@zk#)?zfeDAH!WzqgF`;g&}#))6ak^EDR|tF^;xAjxNb_%qQ;L^v0N@r^Vg1 z9@E#iD>5h_WV*t>i1Z$INxC<1aMMa{IW_I^`_V@K>ZoGweuBOH1|8TxkVly`N0PA) z2Z7>5B|X8~y;zDLeL+B^sm~DTaq2L;p}@G0kjMD=_?R;np;n1y{5ZRF zP@cW$h%-MTeV5iIfpDb=KvOCGd6g4A^S2^rzuabKG0x}NC z{3tn5AaE3Q^z1qv(DKAUp(UL#L%OUFow{a>bwA|*e%g+ERn=O(swN11sOP|RT=8Ii zO0CgEK-@e^&65o!1|!J?;UB(!1yC$*2RQK)Xl^dUkFQb(HA{K+AN)^|VNyX2&p+`K zycJvCJOj>MT4Swv4x>)53Got8C(#5J8&0L!6wWrT5C+0lQd28zWfNAp<)b+LqyN22 zUW{?XNoo1gg_U)`)-z2c?+!(_bXZqGrWKeTKqSCueP2}ETK;W}3k;U!pBX?PRW`Y3 zjD0lQZjAz+J-0!c# z;-vG1H*rjN|28biPO0q0K=)spRK71?Fx82|lMe!BJmO#Uf5&dNGZE-cPLUK;KVW=o zhLX;AH{k=xT|NVWR{&Xu17T+a{YurEbuhx{7$@&rEi?`wgHK&+aWoh{OP?+5LWcGX zAzj!wTr$XRY}6{OkA`Jt(rZm92L@l}d=*j@rbox}UFjG$4^`*%%Bs1Z4(PHuO8}8z zy-?Kv?(zmEgJmKTUlD;LPNOVvTpDRRKg>RiP?dFjQ({kewY zW?Bxq_u%Qk2!DVpT~F8hd=p2q3P|kh=_QQ&(@6b|pNrP58r1wow*to{8nlsotBHJn z+oG%cbp_na&e?Q$K!ufM^6gk<2$St^k{) zXPr$qR5OBpcePM0Kk-l)8^EGT5WD2NHWuGmQDod5pfJnf4 zXr_;L+~2$|A%iXO24U8>s@uE!5Akr4mq)Fi`*-OZW69n0GRzX^muWMlhwh!(QIDH} zZnYnq7B^JnBACqF!|5J{CwA z8|TA}g1KWU%C{EjIQ&KxY!Mi)ls2z5yPBv>OJFLHKHh}!L=LOcykrgD92e$N(Kd7v z4K7$Lo5(GT#LSD7wkAC9*i?kKKO|(eAIC=|9%4N4F14EzNYNzt_z&vSc|x75oYpZ7 zU?~+!$UJkEmBvdr*dFrTclDCs2INcC;7&a3T~gmEjpV%s-}Q;8B3rBYMhY}hJaoTy zcTa&2zmerB$sz2_2esU)B3c4fn+jjzYW7?L`L0cwr zkXbu*r;!c&$H;9Zu!?kc0!5SuM@{EDAThCLzVUgc0-v?+P)(1V{|qZ}vfy`pikI0_ zfO86khjvn3&;?w6!Ov^-)PH0?%+;IJCb|qv%E>ffF0Hh;#`p0bwwa-KpUIfB~U(vCSvp$A3C`Zj^Ck%|jXqy3=@3+hq9aYa^U z@HjQv_(;j9aA#J)cPmGk#WvGc&slP~$HRkZ^zTPxfp#i%Y&Zu!MPmqu(Tz^P&yVQ^ z5HENvhY0+=9Z40{+VoT`ve)fz9eQzuexI&NKlcsaKST(V9qMYHTpsWrdSAP{WcM++ zG%a=A1aGcG*ViXA8LB=C#YkJ?@0~s0B>k}}X=Z!ge6s&LW#LIuvIrx^R1PfT(N!c( zfg&9$pLpq~6Hyph9`k{!$Mu$WFAr*64h&L^CPVan3RE&VX~5T|`*F?kjQ~UbihN83|Xg8JO%#)L&<-BJ4w-i=`~1r8qH5?h0qR{Eud<+QkRX6t z$-J~}p=?>1!pSHUj+3;pA|n1LuD-{*r2V$Bkz|zDb<95hy2LhFpsqBA%6K5ffDd&L zf+`h;5GO+N=9`cyrdmq!@*S1qq2sS6GH1r$=wQ*@KCnm{05t~FVqC8vP+GuHiZOVu zf&`}z8AvBSue9_k{H7fD1AEWZ4Q~)HA*?;RHyVfkt^w2oi}`pcl=H0ckwc?3{&X1xaOMQ$S+J?(eXtrt0+}iU*m)DbUgd^XT955v2SCo*n>-uzoF)z9i;2qt&AiYX`_!JkyDej4|K68|e?HK<7J=+k#LmPksxS9t zufo?P$^p+Wei2}}omGV(lSj&R7GAFJkU~!Q)JlT{15)8mhNm^Wk-SShZ@Q|RL~}tE zg3bFD0j~w3hbUDOR|$JEG_fCR>qCt*f7?dDuH?s z!ENRzGU0rGx_eO)RO;&e2DR{cKRY`Efm*7iL-&Dq!%=GwI+&UZ{J75CeECW;jfqEmu8wt!tRhu!Wd@=H_KJ(jnU*9+8*8QMq-W=&<3DLRo+ zS{iJ}B}M#p!6+dI%W)hUVky$^k3_wT|KcUxsr&fgW9hXajmfJPx*N1^iPs0iI)$gX zY^(1hOOb3TwBNg@3tM2_zZzig#Ogel97~dlpg}AfNL6eSq3qjem2ds{GG+8gNhcJn z!6x{O{o8tBG`>IDCYN%%7snoz?qndphUcdn9}CNT_mIm& z#symmJ&{kD0f8mgc)7MdXiK!p!%Mc+-i+ z*+`>11iQkEWFx)XVbq4#<^4M}!vGA*YGvR-ug=yTn zldo%(?>7wx=eH>yp5k>;xS?wf);pE9%pjqhyi12h-RHcLLT3uxGto+MgwcT^pXe3T zOgB&_iKSpnnI%Jl%xCkBSeR=6ts@ouM8P*$6vR^BW#^s8nm6`f`wLV**(@Bz;)pbe z4}6zb#7Y$*+CsWh|JC)0HT^zjI|%`sC;c#L-R?}o5eGB!vNx&iqXa>76#2P}I=_=F z4svr<^CZ!o2|klI`ZDD%^v5C^y?49CE)cK*3MKT9qN1Gdw%HY7K6;{J4J|2DU-SO6{eHCqW8J8au7Vj%e!D(JT?FlWEIftCM^HcLyCgh@Rcj!I{LlqYIZOJU zW8*a+*`?x?M-eIqW@&oDO$z4svdh`OH3W?`N)Ib~*^s*AIq}*ZRHqR?F(@wqB0_3Z z)yNDo)$Yq7j`Kf-*jQ_@vJ}Pvzq$DtS>Ja`lvY}@qB-1<{hqq|%@Nw#qv(DaqZ6rM zqZ-OFSA)RUT_YfSLmtY2l$CU%95(HYl zp_9r!?}))7fJ*b6hp3=|THL=jZSxxg{6^QXK+QZQJZT2yfkb@B;h4gK^WdaNQ6VyJOcI!927%FSb*8W&?AZ7JnH@$#X6Av zWUpa(riREsaw^)tw^Y>V^-Y=5fOL>VaZGT*aYzxt%m#e`6_V z$+5)W_f0VE{`Bj4+3k^h)xp`uxwF#d-hW+9T1<(d%Le>%RO_K0$GwT&Hpiy(Zj&#{^w9da?9^kU$*5(DT|#@?^ZX1OZgFc|&501*C0+ z9mCdbXi+CgB2XtEc1KSWV!9U_=%-81AF4wuO0Saup=U30*{ux^m$csvZZE(7WP!3~ zex$84kU)#OJkoqNix3Uo#(C7Oj_iFh`*uUQpFJHMn#&qyMitjWVsGbxDO#UBg%*9Z zFGtkzt61(o4EK-e>!PSChfEWiF3Is%k+^=k2t4*fA<6gGh{rJ61D|x?=@9V&yiJT{KN~LF-i4_74g6zoW#u7nWN&k_I0J-u3O!9BTg^k%)I1v)@DZKoG!f zQXk@RvLD^fzE%B22b8`Y8W$GVi|?p?;{Da=mdMqvW>@k0WLYmtyh)4G ziOh;Giuwa?G3rf5YC&3HE#2eO2dHR@s!8bF)SrmA_*c(xCUZvik~6T=d#u@mjk#d# zyr{Zsw=Vk5Gm9CA=TcGa(q_b)#(+FYSlZ|9|H!X3Lx&EybYFkf$92k=lI2y$ni26z z#BY4uK+LFk$r^lDcz>-~!okXd(oE-3H+0eP2GBvj+(sGbBvOHfTc6z0`*{ryM!1q| z&9MvRGj(TjuK^QWNIfG1GM&8Jn=#emyZ+6gv{~M@<9VXM!O!IbQ{8uBVKeMJ*znf> z(2HC@EC9Z~DrE6WBn@9Rnc?75e6;*7E!B-k@RQb_<2OL^&gWbPuPEl$ldf*(T+_Si zW`twB?j!dc>QEIkIn(dD@R1A&=>{`87XQ=4>zNjybH_&Hi0& z4#b&3zdm%ikSvq#O(s0co*~^F7P794qp%sgP>$xcyc?;B#p1nWL{xR->|TBRKe*6L zPSP`ih&3Rf8X@yp94R_6@@+VDggaU!>Q$1s2kq1%4z zfulu736S|99{?{u9RZ;GvU4IOuMjEl#k&+)+Rnhvz+hng-ATs1-RbmCa^X+s~mxKPB zFVcFUnhadNqWbue@?XEb8t;A193`L)(GYz7D{qQ` z1%HBH@MF8$4*NZQ1V^uIKl1E?kuX@d*?rG*OspQlyxNa;AJx$v*qjUK?*wcY5--WM6-1Fv$R{zk#IJ3owbL2&Fx096tE|#r4LEQ^QwC#q5marha)7s zm`O^iQu5|iWS+$yO*rs;b&(VivH+dUIYRpWyu2bT#>!QC^$_4{H^Uf&;ZjtsZ?<}y z{6EMeT`-ebo@zZfETT$-esfMLfg>vRkd2NDrMkK%Ndc7gYUy4Qsg&|ylDgyYH6*)Q z4vNvLpjZpF|8)j#-J+>#v$cL8^6&hG6Tv!QJ>i;S&=>#9$I@Mdg%|qh7Off&Um0WV zTqWd^Owm(C%kk)DbpJ~C$v)k_4ABP^wNMx1=`pqk!xx998nh{)OP6xZ@wY`t@-+TM z0m_F_RG~@;FrwR<@jFuK2Pf-(%b%Ov{66zl=oj2g2g1(DrR9rs!)rzdgjOHwszA-B zpK>jALBAyut}Qm0lQ{GLYUP3+VwDyHh^wBgZiQKSl{RiOSs{#<-F;fLAw}4j*d^UL zG7-MvJ5jVc7Ch1U9*>KI2migYKvcfn>=^YQohB$h~=i6*vE z#Dqj~;IZchtO^zVPdw7sjofM_WG1>hlc!m=gI(@+o^twpSB*3Ou{?-$l?Y;QvMI}d zc+4d6*3xhqNx@E?qLq*ZD_tLjvvxD54ZE!DEq=XmB-b%@d5JY7a|x=5WDP|q zkm!g0x0(vhz9~nFoA_#;`A1cA?^CwX7HNPWp7qe(VH0n)2g-e2go4-#h1>M1Zhu)4 zT^At=Ewzpm{{DkiPD!p<1oC2ey}7sCJ-pN)__o9xl29ZGT@C_Sg(ve8vbURqTEv+7 z2`3)++G9Jl1AfeIk!(R36xq~3n&WY^)fe^_$~|3p8w;*^n)>7a=z}*E8ps*EpjhLONH&iq zx3V`4fwp|+rVHK}d*F3Mx$?7}_)@&)SA1}SapRJfx%GTa(%~zSer{0+g&D*MGBi*u z`eKKKb=mmL$4vg8vQuIRT8(c*z?+PK#80mX&y0dG3Ok@$QFpW&zd%9L{%1Hvy{Q|3L%wo%lJo3`;$vd*c?K&)O#jBQL&cAu=na1ujR6CQs z-c^}k%tXM&wnf3N_q36UmbBx7a-Zl1q4jf|&c`S?iWgDwe&`ps$Mr!G95hNiU8;f9rrD;mk3qLYjn;^h zvV!7TJ<-47E4;-xGfK>5O~j|=E4jjF3^^0lcOU^jX8F*14FrOqjmuANN2D<`pj{rx zODHW=`Ip`luIj*X^SPu1%$<<>V$IYF?MYvZ%Tdo=g)?GvVZ97gJe7#b)BFcm?gX!L z)0X_w_w{PU(s1}z!OYsfX9C{flepED=G8F8^Vgq=--}x7>y7-xdRU?(WoP#;U2jOF zQg%C6Xdx~)h){D9y`hikY~Pg+H`GH@Y1(8`RR^|w{IF(SZUr4YlsMs|OeK?zGBU&x zLt0`m&2qqt_V*2yQMAKkUlGJp@M@_qU^l4-ikEr#+-c#0`=%PN+Ur6@Y4^m*C+&;QrrK$2->NXzv-@$4 zt^=_gpM@P@9Lisr1DtdU&j$H_Y#NwKQ~cSVJvn7S7ihYJXdXOaO4(P05$`Qz449sc z$uW&M-1^pIey`ALZPS4|Qnu!lz8?MiFf8D3Ry^+zhCb6nV68jYOkqEp9Z87cbxH!= zLgQ(QN{V;%$qv&)#DhH%%TZ$iD~~f9PjWO=UAhZvGd7QJVRy5tDZ5hx^+l5x=4%_N zej~s~B~(j(>JBie$hC`OB&_ib<0o;Ht~HWTVWUj;yx_8v77PgKMTd6SAGEYoWljA$ zqqL4C!ZqMarpD!}3JFUW(30{7eXKqvT|j!{VJF|-q&F}S*YKqeGh7_)f*6@QM_HEC zYmydNlx=`M!wilSD&B1@CpKKt%*coj2nsDy#y|R88O|$pXGNKo`ayPv;RmisT1&Xk z3ZP7sk!l_}sR(uosaM~v^{m@m)lKokhcUV*{n>}Jtk3NFZSYs-04=f_WfZP&vHL)q za2BAnY;`@ivJ(C)N&KlGm;nDN7G{G~JO8W(xKgIBcsMr!e;enfphMc~-*RW=(8B>I zk&XE``gJF&x}|3FldURC=v463V-qslfCQCDC9iZJ%C+hvIC>iuT{Bx%u-uJ$68-3g zbxZI7wHl^n@!0GASz{&EbCa=dNqHb9jUyyusIApBg7S0LeKZcR zL04*_c@H!^AW~|C@QM@fMS$ejX{6?WAkcsY70$+d4GK5Z5O>w6Lzw4MU;_g*T-?Yw-O1xsC>zG|Kz7j z7?ceXJ@t)_s`LxZa(Sid<-VrjX;uHs}+7meftalz?wGArgt|L%CEFqf;LV^?1=lxf)TlV^) zz3rWbgCHvs8YlUDrWz^oW;_>v3Tnw?Q=i^Jm6z)NrWYKFjeD<`?m;e5vE>r{$lv^M zQe+E$8B*4O;a=8*>QwMk+oqfn5_w2#cwsO7i4SAcB$(lS7z%#Q zxn8E63gU?>YaMmpnH3)kCMt;uLD`fd)+xfxg50oMo|}A_$YzuY12;?Wq6=eB$1HfV zS_=j=`S7)smkVX^wPg)gx87-vI!X0o5>E5b(2G?T{hO^kYsokZ0o*9pG*%_1tON*J zqc#-{r>;of!j%*sixxH8TF^i44=M+|Zz&r?Qu;NaIcW0!NOr=n5!zA(vywNSpHt0ULi9}@JFDNn?OO*x zITc~vc<%fq{B(cAxt@5oLM3mJ4@bG08jD#{`33;Cq1(n0OdjH*44?sa-7dN?vz_LX zCOHv(ISj#{B1QAAu0Bz}1~rh_HSvl*)6nmb1w8U(GyHEuz5&%l=q? z2Ak$IIl={)%#$F247)#6xjg-=8KifKBm@)9;>D|p?pCt zJl!8mn{uK7eV`FMMcIAHU&S$)<&rqI|C0<37#s8oUSE#K@+<~_EA%W(m&{{@ zC@G1c_1)gTUcWm;^iyvw+ZF8CB;<8ZKf( zCk|0lng6u@uQA}v&7%u3CpzMuaq6O4h@X(u_y#P5jG0}w8V%XatBkqKWU>8UvTT6z z!4a#XyPG!Wa5i&2OM@%30H!}=S6J)zi7G_nz@0KHKnlL(*c~UUIETJNUwx|l3sSpO zYNc*`4fEhUkuUvo9nb%DRq#}zk;}j{`P8NqQK=iYb`nD4)RMn%HFU$b9t`a&Dgau+ zme*xV300a%F>Hn0+139yUnC|amVcYgKz=5GuT|)ZKU(&C2v~9iiYy!tJ|hjPDLi|D zy_8xG!8fbeswc_%dlIrF!DVd)gi_){laPcD5@_Tn9L4?QHg>{&Ms27NNJ>YX8A!pR zeGL2OiE@GZp5X~Sq_Brm$YxbH_0a3ZB%&tx&+vPCTp;Wu_u$1Rz9BbitQE6*4Cgc3 zHa1bJ|Ds+A3DjzVV^yx;Gm7&7!S6^uP}(rvX1UbUoJl^hVG&h?HIv0L-#LmT@Kv&@ z4i5M7y-jQ6cYr2&3>c?3IKs!$5DXS>@K9gbwvZa`ed{p3EPZ)_?;~zR)YeeQ`cIFE zfa&kQAP+sJoNIbr5j#5y+6Y#~d0E|*_P?BtzS!j6gyzCpzs6&aso5(dT#kyv1R^JH zx_pNg>Vp{$O^ScMGnXYO`InKvTkFRw0o%634cN!rgHt(^9-7ssUjyoYk&?GWl6Ic_FT5|eX|p3a?AbeZ`x)jDwV_CJ&hkqdUvVMVz*RtqpRiJ?=gVxv?HMlK;g3oX#1eKMf(4Jrx^@Te%t>Rx^iP zy@$tusrs`1Hb?1Swb3me;^UXdT5XTgnZb&%f~YFO=B(4&YI6JI152^J`uAY z%B=zBtjQ0Q2eV55Cy~^PQr2T3zd@R@DRddSA`ib>^kyTIc+;5P`)%C}{>s{1(Wjx-mp1rKM7%=OV@6&oLzd?|UZbIQ zTr&SxkqANBU|`5+6gcWZk+$@X2or7DX+%7!FshjV^oKG*PJ<=|?)cd|jO(hITe>XI z5-eSa&Fk0t(Ev;rn|&4{vy}yZ5=zoS8Fou9-7e_FPFmh7jY6H&Ficij=hXH8RdlLw_DRQ!*>FwHoU3TVA|PYTIQd4e7`*h01Hsw#hAC zM^-S`Ynmvn9cbH;;iv&&#*Rjp zk~T97kNkpgGQwEMc;z$cxpPhAiZN&KqZU2KlRI>^rcX5l@xE@Ko4lr$y&GCf0q3Va@JM9b_y8CFju}O)ubYG%y&y1yWA?7prv676JZWi)<-+7?C$5JS` zT*DH~06c}jR>70U-G0F&^xcbviU6|I~AGKi{eEqd*@aA14&P z2$%5m4qleIK9wNceDPZBYY$6wWvQ4D=hR;uQ3%N=3}Pb}Ua|D=-ur29MkO5+tukDp z=50fJ=rp){BCie{o6B88Vdhi@QV+W&xJfC+LVoP6^+@Eeg3Fq}!<>nG{6FZG3W!#d zvp<5f2cGNq)Jk5(M-8M|47zGjMiL0D59zph?#^PX zOqXJPq(D;9?JUo=#q^iTvCl*3_aSt;M#3;mzV!`)t3hyXGKlS=72& z7EYhiQ;~}F&0}owHE_`R`_%fQAn!%kZ~XLmT#y0xiN^hYln0<-;regDd0TPOn(UEO zuftcJU08qd?xfgC=Q8OTHHEb>e1?B?v-d#JIZfNs3liHZkuRGvdhuejT=!egf>A2S z+0>Qs`qONlB(i1=_U-UPFUu7T_`K1cC;3<@rr=vqhk{&3r;s6^K`ILjPU#VKG`!Fz zKac3&yfNN-V9Eh&FSD|x6bE^1yp_p3m0c-;bKDsPAUicgXE;-r0!OLe zn1m6|_rNOl^V$Zzy3>4aJItCz>dC=)r)1~roW2#C%QkQ6zse8yFT@&^9{s(_tr@!Bb- z;JoL{N1tkr*ZfS^GQc`SgP~T2u%G<9=U&rxhX$=%V|N-&4^)ZFO7ggislQc_vO`7( zY8KNDu#YK`6_Ev4Lcx(V=VmCG=pv6ckzhMv*Xvx7ef$W^>(@@5Nw^Od#HsQIY_N6R z>z(v64kUC(9;V3!*BS2F#D3B7#JOAQWtg91fipzGz{-2IbV(fV?cJG=i>}ls*|NR<1 zRp@p6(2?y~8l-NPck+X5k?KF@PvYPd626}93_ubn-+`wCZ+Ra8{r`XP(m(;DVA8*G z{Wf!3n?)6O`~j0&|3oVPxdsS>w3at&0KD%96ripJ-mq|7ktFBezQZrKS^e_FL5ZDe zzwWShZlnd{;H1eLK+W#S`bvnjX>G^UD;kVmq^A8b>(%Y@lI9gv8g{M>FaO5)b%(%s zfz3mEw-9mJtkq#-u?gFJuunL9FsYP=Uk}C?xQn9xba1Z3@Tr&hzwGMZQHl6X3GKE` zY($=Ty}jOdcf~#al#I=&|Axy!$*)k?5T8OS3fZqFAk4utUJ#)Y$$w96XKh^}_;Q}N za)xXg*;#2}X*MrqsZh}Z!kRwQPZQv4E zL%>6}%(%O+Qx-0TQg~xeH85p0JOp+f#JJr$RCcqF# z3_qI37x`ehe}XhWBVJ`Xl!xIeM7TS=nI@O1c=$~M*B1x9XVD~29HCX7U^5ZX&@Bbz zmTd$+tTFTp_--c)xSL#k^Q_!_?v^t%{GoerHEh6$PgQ0~V3x0bekQLBRb$jx^xGfl zpjX6*I`tIO_wU&2?uvH=08! z1|L6s4|UadKphidY@JwCki$lMf(cE~3wU%X;P85lZg^Q5NPx|!GJsXds~RGufsa#r zuBvBsu&ZYYZH4Y2Rp3C8?%+0v- zWoBf3#4x6UX-kP7!57hYg^Mtqb+g5^bvHO}4h6}JDXI|1hL^u$%vtJ}KRZnC-7p)# zDDrsT@4;o$B*lWB&4s-VB6#DN#8Iy0` zZ(>%c0Cv;xe2Az{lin}SMi5H&@CyzS6O{#VLkVZJPFcJ1P0lA1gV#wjzcPGE0(dBJ z`|Lw*Y>K6VdG9wSAo#!unNl^rF+tO-;HIb8*+k4TASi4zW2((Ms(Ip_6?dKNN4#@S z_huFUr*gG_l%Dxn+_mWLT0vS3XBk-En57Tw3+umhwIDUMfyT&v?tM5-=`1tiIvYGu zeC8w~is6`nblu}^7BXC{X;myX#Fk$xxOj?Skx*2BP#nGZ(ZGf`@mOEnt9=!rfk-=* z^^ZveJ~j~-aBxC>F#Q^oEMDxiKO_iOmx`7B<)YJA~| zYRa#E)z^sEQ5qWq!TG@;>#gsMWH@$&k^C2k8}Y@Nz~DH$6id9_R&BS{QMUj5GCV7TC@{HqCaeB>hU~oVW5=Ft5*I zvr268FpNqByZE=SL~F~d5HEqis?_nXOM?v+@M^IB8ADss3{iAo4sG1DC$8Mht5JzV zrp3(V;6^>JhABu`4n-;mj&dJ`~W18R)<7TW43 zDsHoj*X0MTXu%`BF0I|RGagPA1sYA*`2?Ti2KwY9gcNX38<}P~q~hQ8T|$?f9-sr_ z+^WvQsb9V1(feBnY#m~;2w~%{Dls@Qq?{{#Cpmn7))FFgN{DypfmQQjKt|9-hRZAJ z;apW74jUz2R?hNs8RfqhXb{qDzkIh zt?xP{uXWo&drCNq<@#;>u}^Ww-Y@j>xTC~-NFg##BmZ4~jBdK7vwN#FKbqLj87V_^ zXGvsCOigLjrCy~0OqYJjqdacuQmIW4R`IRJtun69nR?x9dTkz5B4IP18j~&Jm6pqX zUpwGC!F+RLM`?Q4I2S_JJz)dEmHoYfzz%(s8eUP}@mi-e3jx9*<#@E03=DSYh+yt80GHghNMLwx_^g^O# z{?{&2g1zK7cUCiL0{0t5sfKe1G2h7LLYLz|e0VioiIKhr(gVJlushkWjAiK!0L^QF z(n9tmTa2gEQ|5si-Lt5SdHd`Z3WdP%S@}mW(^oOKnsS)zJE?sxG0+bp-=|}(Sn&AV zPiG2Mhx(D-!$M+|C}s}OmbppzIbMzdAX?SY)6+>;@5F|T`wX~ALe@Ww^gg6_ORTR! z`;X);ZOH2lwc-W?NlH(gpx7&F9QqObow{&2vvqZ;CT%EKF!J~a|8zllq*BOX zHfuVG(qR^WpDql{-=9@EX(NWL3I&wouFCz@C882Tc9mUaTRE?vl;rnh2a|mGAU7pv z`6EK$g`U9lEgX^aRMud-Nl?J%{Y$#7y{aRa%h$u!m2P8ql?xGBp3Uam{H%K!*j>As z%oirk=lM`Q?x%HzVs=m9=2EkJS#QS|%iv zQ!1~H1ByAJ-I7hh_%HxR?l3^=C{PRMW^lgv%=xn%3(EHCC@;e{1y5eGZux`SY z=iNqQKU71*j&DBU6{mNL$>8MevJkm9HHRkE`ufFN znX=6u5t}eDiTIh;o+AB_NzC$qK=s`#<2DkHaE_(R#i7$@=^IBH5SoyQH&ppcnOr8$>!oP&AJ@|e$qbrrgN9QQs_|1s9HgRP@0I?~TE+A~&tnAzLi zG$VvAG*%LKB`zYd1Uua0HYIV?2jkDeUn$7z7uyW?aC&+0Yc$D2o6KAxeVdP)3ivgo zTjb|)%tyAZT`!Xr?yc|SiA{0K@0}WN`)Fj(ONN!In*@b?8?}5FTl?+A-y7`s6VH48 zpv_|RL{4{WpBRUYydSw4IDfXVOoPmP@)M%?!=qKXSl*m)rJVoLsygEHqD?|N<8-se z+%9pu-~EavZzJ(>9Z~*V|hw^o{H;ZVk2a1yrXPDYhYj zG}{&keDoDp%GI&Ud*d%wkJ_er(_QjDW%sKU+Z|2GQlNJ#Ceptd>$+ukGy~rUtKEZWxzi2L6Nf^{c(^-4z-``WBWE~_q@z3wyn$_%`P-lbtOr=BvRJvaN zDU}b?IW9yVLgFHS7l3m^w7hwAHP?~Gmqh894+IvzX%b+d(EhXJcEw}l3d8@_PiG%{(ocnL&~xK93XHM%&$@QYv2!)b0qo` zw+RY)lr3(ZmsKsfGqB9@GHx74JWP{Qn9T=Ev-Z|dI23o!`T19(9G3RkfOt~%Dc9gI zm-I4Wcp_)P7>obcP~YAb96!S+@vuktCo?YTi*@Qb62&A^IE~=T(08+Z!PG6>Snzi{ zHB>0gK0v0tc#Q+mT(>)%<04$;op!gz*{r*Rpwi)p9(#6ykjbUOE8>OUIz=qgfZc#L zacukrC%>v9_-!p(qd!QQ)PW-Y6Wut{GIx3>YFFdB6h^sGqxuQ&cSbNNdg}74?UkBY zFqxA|CjWCu_lAxx{*_c=5}z$!O|T-Kl$Pw6^_+@c2JQ8Pd5D2%JefN063r8vF_4bY zI&R-r3>w0v0l}#+4>~6(IJ$WnC^3tYpnx%a$a76sp8w;3W|_)_z5Y9qQ<_q^^|xN1 zaN?Xi?P{5X=vA=dkU@-}%ea2+2*QiGCqex$c!VBq;q==pyg8^L8A$yBZc6`Yk9U~2 zPkHC)(wNi%53{%pLtOms6ZGWe<)h4BSYtq3RFbMPo|flnEBoZfkA4m3MU`!S)hUH6 zr|7a?Yr1&!7fB@7Ywi`8K=?A3oA4St5qC*^x9i0e{z$rzX)X5%6}a$kiM@TqzviOP zpIP1U3v}0Ii~r@M@GXDfUPcHc9Y3WjiyidxWkX*7WeLMeS~fkyeK9P&mv+-4A*o-R z&2HV^G;l=o68!V!#%9OSl>1X6KuBX=t5na1ex-5V`FBM>gHf|>Tp)UWtaBZe1a0HzbwIp3YN~{{OK1(FU2w^ z(;0JmIS}K$#Rb?&zm*f=oz21%uSp7{jI5!WogF3Q6HjW5QGXSeHMQCt%0&PC=EpSv zb~&N>sUuqSJVaj;Xe79lon5ACnti>Q!}I4{1Huj~hw3J%;s(P9!sxg^1ZZm!PB9p_ zY$0$SFX7^95KytZdOvPI1Aop^%%FfYdcY7%0>>G3VQyGyChalwzgqT;oLJszZ6CL_ zeys1`Ovcyy{t=YmE2fwx6@dQkM;55L>v{(#o17Qf%ePA*WdOdouJXw8?+2rJy@LF|eUovzt{{KGb2(X`oqi{xTmp0QWH`xYmM1imj=vsB_hv`eRRhLV)s?X-4^VZY%}|I(hHt zm~fM#X}>Fm{q9e1@fUcL9W@&S3jjO!?ksJ!e+2h*Fb}P6$(m|h{B!fc03eO~O+HhtApGH3H=0H=Jl=zzF}!{Imp%GLc#Zlbi| zdsz^>*p}3YKh41-V*9shs*IYjMg9q)p9?feabN*b<>${Y2Yn-5>X`yt9=EP{1Fmbw9X~A(8<5b;1Fv5*fJ|2aQ=M3}8d8<-N`Kchlv!mqkOj2jP9B)-| zPp?;b@5>!V#3^@JLIbU95t1D<>=dcs_vkyUJ+hY_ZS}Eu82#S|@C)#>l5#KyJL;XL z{@ComMiXmj)w#%QeUOLnPZu{~`Y)bKdTR4sM{PE2Y^`_3f*vRxE!HFz21i1nU=f(a zb?P=LL!`F5<*Sd&2V$X84TD}c880w^$N&f@$FR@FwMMzZMg+*n&NsH+@E2ZqAQl6H z>jHkJdz{arC6X>Z7Eempp(>jWiojJWrVGC?b16cG1alGGZoV(5o)jbxN-m-KS*UHhZ*VQ6Y6nWV zaOvnIQL)5=be~RM6c4aB-lz|4;yljHreng<`cgHgzjkTaH?NvC2i_R`M<>)o0>t3~ z`hF{=iIK4!;u6~udxddDC)BP#$lcx(SLCSopK9nkPnL8v{L<@a)Yyy#+r#F)Ll($@ zQy#S`d&^8IDy5pzRf0~^UBJtK7WSuS4`en~S`rqBO_Di|1C1m1jh#_c+mkafg5W3C zv7$(-Yi6X}vMns|3JvBnJe!YA($e>&&s z*6sBUI!bF(V&ffKG(-9*b2W!4Giw~x(@t>dA`G*=W8-^ewof~D1VsaX{o*&RjXuZP z7RUn6i=wx%yj)&G3Da3csd@2xwSnMaVUu~v|3(lj^x^jsB)?MG7Rd(*tT=!yR>|~Y zz?q&_R;%TIna!n3vUkqXzOvy_{tY>Q>zRIFY~h5olF3BNa09((7jbCoihKk_V?fbH zWfi9lt6`}QG0cpK4m5<;6kr#MSSNJ(>;*9H?@4(oAOGOq92-g>!lYJt#?RN%RE-NsIMJ0XLsw76Mr`a!)EeRtE_ zcef~2&UaeRFOR*oR2%X4PU$pKj?;4=2`u(9GYt>K_1yG=gB2f38*#{mmABcogz1s1 zATPB7hsmz7_-H37bYKNN4(J{!r#(l4Erzt3b3QwrwaG+WmTQGbX;n%@ zBUoR#vwZJHfT7Yt18jPh;(H`tY&7xq!Zi-HSZ`edXIkj1s)YXAHMy$o9E+1QTW4Mj zk{$AHhUAH_@l$WsU`z1AwEi#=KlP_-BS~}<`HnIOCbCTyPT$9aIMSpzUVuW1{|&vP z{BMm7E%St~;(C4To&@&{5a+&VL(4gYi*18CdyUsiyV4p9%Q!$r1QG0byn7*NMd7Yb z^j8#^eowYP4&cBAuka}^yfzR{S0L0$*DAB(4|R7Y+0AJQ88byCi~ z`BwkJguUt6xqX8+XRUYg7QCIiq47TC)wX0QKK37<0VhM@AGR@_@2FEDOrvz-(HPgz zKpO4i&M71pLzk!ZvDEe@g#DO=1D2)rrExC#Q@vxs$hih0R)7vCXY%Pq%so`L_8S7- zpAdY3uJx~cdU?;wK;nyqSF#)S>^4v&gC4EjH=`~>KNjo#u5WdXD}_dNv7C4`>+m=T z%Yw1~bC!Tn4*u)hU&(*Dp@JTQs4E2XioR*9u-FTId8`Oj?<$>Wf^4vRkYUwRV)fyu zEwMwoUye|QYC{*c-_=5oW0SeMo~|^(pK_7aovoQL5a+6{#EA*4otl^p8wV@Zv)C0e zes(faY*wUV#Ve*?e~JyBL3w&P_gi1LS-TcL!9%JRAE(@i&qGdE ztM}#MyT2p~aOr~Lf$)SK_I75$6rEIkF%K!;-%N|MMyt>=hxvGa3{7|L1RFHb#LCSr zJXIhewse;Y6ms=(Y>&o;%p?4W!b6h6P3i-)yU3L+yZ>Nd2Gp2NmR#^ z0ON4>&kIb$t9s&;IHtVyjEdq##TqRE8$~t+2_{w@1m+jt zAV_*0lWpt8kbnCfH^qaH+^)VYrFJ&qJ~&E1IUF=wMbNy{tM9uiFIWC}>_8^cb3$o|!V9jbC^X3oI|u`%c+LdveCP zd~`r9PDlw)xp%4KEY+0}pDqCk5~rWl1_fO{I#Zq^qRNRDmY2?C2HGq+iqsKuGAlSI zM49ZH$)(1Ds^9i{?P@+0cQfX*Aa}J>vL9}OMUogFnh%kD57gSXiqoX)8{^;=AY#i& z^2<)`dAIJnB;GaDy_=^3YkX;7mjDf-vOW;f`fSOs;MP_)=MV(n}oyn5^wK1E--&GIbO5%>`&zl-L^!D%bAUtT0vIj zM*|u@-fLK?zKs(pB9KO9gz8{6fIy|6U*Pl4kFU$+Mu6LFD=u25F`8V?U&AgG$j`qH zh-Su|4rgiFA3yDB`M{ih`?;3H?o}mM7r;Vw6HFwJ)y`06Y?EjAo3LjXul{kvV7y(1Hu2}Wx|T?=jtO$jAqoVs_reJ0 z#xrguneR&KpSZ#*mmjXsTKrdSuek}&_Qd93kztx&aDv7bE3_2k0BK24dUD!fO0xc2|PC!O>{gRQDnToI=rY56u zgUq#V-soUbpx!{v^7&SAbarxthofcULr%DahWZ$b3ud&>FIwj78K(&<4(TqIoJ|UN zmM~3Gl&zilUhd;u@Q^A{ECnchKng=`2sC6PiAwHU*CgR<&L&{E<575>jjL zN{aGdW?OY2D7BxVggqf<(e`bnF{WI-95mi8fNd;b?Nd$n=RWC=hKH#C6U7NG7c-d> z(2}&bSrqKz(fY$U5D_$+Gtz(iW%|r6&*>q3hrMo6Ib9?~&l43Fb$T*`!Q!_O{$FuHQb4hcFXjFb*! zaaup6!rYI#9+^WCA5u%{I!p6k3KxIHhdkWLGE1NH*$_>r`&R@9aJ5g&h%-!4wT+S! zPcDY6x%CyRF8)fJF1i`2onQTC0Z@I{BS%OcksurHM5Z9OvAnTyV*olSnBlgFD9 zMO-lkmi|->jYGRv7$RaEGSzu2#vJ%-`)WjlVzW1t;N6s7-EsA;C>hXc>&pyq#S5@^ zl{W}?6Y?mxxqs}C!P@9EuMPO*EnS^DwHba{;%!okMikA5k2vl68Xcx>M7NgI!Cpot;eCu7D9;&^Hs zn@RsI`=)ihKJ~Txbq7}7yPJF*1y4}) ztz)54JELd7%-1es4_2Qy+Oa{9PrNHjkBXbrL#85dD2#q^nt|Cp1?XZPjvh*!%J1D% zdR{`ph^+ijb}>YV!J)C#J0YDitZOrLbQvPO1W#fQXE7EtC#}_$U}lw|fOV`=?>Y>E zfA>xb82J>d65Q+Egb``gYY`UiK}d)%rR(zw*)_@{^-9`r(G{?O8E-;9<8kyUFUTM{ z?Wa%o8AfeOq7`xhtk{DBYuv5~zsX3|zuR01CzO=+Er!tNvA5RjF3orNakC<1A4o{X z^};nJzXak829cTBWZushD?-j~IbbI*u&e>GSZwa_HXzulE!lbyr@x_Su_i1=^Hat| z7`1uHDz9WHOAqOPs#JXOr!){31)7T$r~CNq@$y+P0%29Ok$|YV9R4$Yd0mK8GT1Ws zpFU;u%+Uf<_ZT!m=S!bfAdI8Jv4&iLy239GMZN_m=32oByVBC|y+U|iV1fH7jQ&}C aeEcZ7yL-&(RGIk^@TaPzrC2F%8TfyTU0hTE literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/images/terraformer-geostore-9e09ce2c.png b/node_modules/terraformer/docs-build/assets/images/terraformer-geostore-9e09ce2c.png new file mode 100644 index 0000000000000000000000000000000000000000..9766a1e0ba9e45f938dac702a23b7cdece5757a0 GIT binary patch literal 50945 zcmXV11ys{-8>JaNKtOtQjV=jk_|q|Jq_lK*rwr-Q3W5kyqq{o>NQX2^Nr|F>fWSBP zJ7;mu&d%?xC+>6a^CswO|3`#RgO7%WMx>^y1VKZ?fc|*{a8SSWIOMLQzNmebp}zVa z4!!}_-u7tnb{;nNAT>AZ=k^eLYr7yXq`fp6+Q>UKC3%Cu)st?gG`eL!_TZ|Hjw;&Q z9)6-okQ^GTD#p6FCoWY&6Q_PLIH9T8q-Df*^fm0Dj@fcDRh)lhN8IBi9jw=2rae6#X) zBDrQ6v9(sx^ySKkS0$%8=%e`3*4paA!nl+o5bIMt<8un25?F9Zxh9fk^lBBOaGIT~ z_mdkF>f!y&Fo;UQ&Mh0)L8jG;`&|2ZQJCSCpG%sF{+1qdEOb=(k>XyMkB=z4Vh)lylCH z=;jW4h@%&W%oI?Qq0d)V1%Bs%YEgs|qZY}AXIckfUK_M-UmsDIK+V~=1p}!?ghz?m z0@O#WS`GX7=paNz-6>=1Y~r8+L!DwMYW-3EE>{IT_ueD>|F7Yk$%rKjs^tq-(ft($ zsmXcR%8ZIIM%Nye5U#5y17t6pKEBT7!7e=5y~4O&FR8aj4b2M0(u*E)P77TpA=|ql zI0pbOU)W+?2qKHmXR>z*~&e*>VL2HBso0qX5*zJ3W}QsFU<;f6~apu)u6wu2RCyl75r z0YhTFiXnW=Ulx$B0>-0Kyg3aDI6oYyxH=Z0MtmIKBklKyOj_T@+m>c=CM^q%k4}8R z=`R9_Ya_KF9h@_br>-Q+6rW??OHd9*U!-RaH@IcM>t`YC8to%c z%1ZNT(|7O+{TlBQsGUO1yWUXgs)Is}IqV_d)<;8Sr*I#c0{cRiru!p{h!x68pAa8BAuIox9`a4z1$myfK!59w55Et z_b!#R;@g%nd&jVB9NAGmg^j3nD~Bxr@4HN2!;3oVvCl?aW}ab?V5g0(lcNA)8lE?& zR>Y9R1l+H`+Maft>a}=AgH-DP#ow^3;lwj6<`Ji94FX@#s)sPM>!f_rlJ(WQF5ixQ z*UpkJc%SK*JP+~c=rApaeDQd_WU44=2*QiienB(%zLAhoINNUqXC3ZR+O?LkmyU8% ztVGZN3;MfEsFvrQpKik9W?Bm7@f11x&SkWQM=e>~>B_pjz0oo#7bc9E*St}@f$kUc zxXOO&u{h(Xd|}+m3)N5a%ipQY5gH{3uu2!rUl-8BLzyUX-@HXczgt{hgxTPd(OeYc zstJfDBql9hs1p~qrI5esr{1M2>q*52i19pP#fFl2h+A+FZZizJwPomF{55sbsUqS$ zOhB}PcRzI|QNRKj*RkUU=XhAZUGytXa8QHCP~X#HrKtpZ^(O6eVwCfv&Y~a3WavuH z8-0oJIUR6arDa!vz@-wgCf8m6x$%V*rLDskbuNv)d+~^2~{aLyWxdXz`ww=j(J4zzUmDbj?Nb@dGAkPmvWmm zYzLkx!E6D-Q390`*1Xcg!zbQ*tE^Oc34Po3r=OIH$joNnJmn+5caurr%w&;kcB)_o>0bkp92WK9=KHkR^XX#Ab8{WwBSQ zk$WTS(qX!jO099`EbapP8~y>Z#fGjuje4-i=+|(m!R`Dh5E{7{YJ%E_VO6zO!iJ^ z7Z;895JgS)k;>ZopQ%>u4ICbzkJpMzM#D`BwsY(=Wl?s6#S&`awK;nQf~MzTnMkPE zl>imfUtgQOi|kOw`M@&LV71u3DnjlTmg-@fe_4)#=+7gCdK}W?`_)-*XnC%fRUO9dz=7qs zLu~T>bd8+TY7#7aB@0@%)XPLiJFiE^wN{YBTFah*h0$s1od1AIC1Iqf)h==Uesn|9_#B=~IK@=-fq&M$Sx^>h9}uk($UbgM z*CGD5Bw>?CjW0BJcsw6)?S0(_lkM|jiX1FpoeU*=4qUw6`EDcXFS=VbE8UYV*EsKz zLBE!FZ}`p=m;lAVqQo>#v8YJDPc9G@oOR`Qhewnlia4{2_PYG4XFk0#PddEJ@y*Tu zEA6B4Gr}KJY@{4|!*tDnW&BCzq&5~moBxD%sJhc+Xa?U5?AO*!cm#X}oj#tPFf~>= z9<7~|GDrL-o=Ek~1>|d*kb$v${<3&F*lcM-cfbw59{Nlqn=SQ@O|PAPCA zGRj4J>h*Ab1W{ar-p}jr?wDkx=SBL@L%0~#3YwIHTsIy}CF1?ggJLq{OMmJ?qML*j z?Fy7jp|!xgtRD~mF^18DgQjNi(l)2hXIX6&>Tond7|f@HOVsL6I5NXr%RilG$ms6< z%vT8shR-cxj(xY}BMr{zS7So@1FQr_TD939RF=D``zX~PwMRtK5#SGC1oNyEM|$H$ zR(J!7+X^^vzCEYg#TS%$u$=tJfiK=?#wLBxzNzIQ%8$r1GIdYqk|^rD zNoJ`UKOh)TxE0hf>Nt9p%m7#v2=gf@TD!zor?Gn$NW19*Zry$R29WbRK;fd~8~X-h z1F_z;YZ7Vx1!S0AJn>0=tTDc$)aUbxmyzVvw{sLAzv7iB zJJ)%R65X$)IoAp2RmcYyfNQPCqpE2&fBWtJ3w;Yce` zjOnf4jZ+4Dm*C(XTF#zyeDLoguwCL24@L3KTXqh-pH5## zZQTR2hHJS~PvN8mIs;gZ>c+!$DK9rDU8Ccu>LgP3?k;?uuy>3#hGwTe{$sQj=q?Kd zH}pn4Ly9Y}ppQ$8Xn1-*mvZVTT#{T(ksTs(j$hwCbw-a2!3g@jy;|oN;4e_OBrXs_ zUbBp3`bsVsqJgpL0ad4R3L!{z?5~vIC&?q-O^Vgv1Lv@3$GKXX4bfSF)3^IUYa5#X|z`rFwiP7^RS)^`rCk4`B#^jgAAdd{Q(V#@N=mM-MU zJqg@5G8gqMn}42VrByDlk_pEsqbFDLlJe|&+w%#E)w(_}nOKqAHsb52u`RvznVtpa z$TTgp{)7DI!4$Yko~lag*(7_z63TI+zr3-l7SCpzxW2qGo}1MsnOFW)?^By`?sR>F zosrNf$+wr|{pLfL85XGoJGYm@NZgLe4WXt;{mw-0Z;2YaJVUu5fWDpQ!$joTKxVIk z@&!l_%GnIyIM`4KbkJ=w#fSl~10^pH z1Fb@}$DN2|ws!R~t2oZBJE?%rML#SuS{Z$Wa82xFN3L?n(J+2`r<@67zXd@Z*TSrW zvJZX=Rqxm^XcoNr|^ z09FJxWVA)=cYC!N+u?i3XaULPXfEz{%NgZvt@b$In6 z{nxI+`wgbICOMn~-F6f}!GX~^wJwGt#b}zFXS6);zY$+|t2Y;@ldbBxFZ_pB(wi?~3t}UkMY5kbb;3C^Elq=8whxKT5SdbE$ANL$kn%NhDpXh>am||x z_ui>J`gZM+YGd&y{73t$a>QAIbbmY84)Z?+?*-V;%|_d~!H*R?D0UlSZmnF!?J8D( zwJ!8!;omWpeEn#ot>0bR11yT@wVkzT@99Rr6pqw+{0Ds~v0;8!5YDvvkQwC_Ls;H9 z0aH>4{TcSiuWH~!e8~sJXp!z7RD`^9tBsVGW*u8zK zAXMpJk@A4GivXquBxi|G2C9emLQ|p&xpV4tG_FYeB@4p|C2FIJ_y425IWVOXpoce?_D`q7uu+xu`aUZ#Hl`I|O(xC=tg1MNnD zq|Sl+h51|A82{YrAZ+n3AqeWfbtiKK9NP)~KyxU>Zo4~ARG&0(zz&iWX{QKkPF_Uu zBY!v##fFygczuFneO0N!S6t7=?h05K8-H?u^J))=(Eg1CNVl^#`b2Y=5STwb4hnth z@*a#_+!!IVZ~or0{y_g{u$Qai_4u&I*0H9{(M9^g`%Hgp?al*%`Vj2A zZ-dV}jygue90dYQo{4D^sQj6>p0ymr8en~iZ~d&!K(3oM=IHULcN%va0hRDG;}ueG z4jlZqM?6=*x@=dvnc!7MMiTNs%l=l$;$L9df)}(7z6__Ncu9=o=ZtXX=?wWRPM408 zRidv_BDE?Kl;Ubp+b7(%rH^iWEQpWy-b)k5izw8kiPrDq{h_e9t<#i=d!)3MyL`|b z(mpIx$0=QJMrbbN@$Sjbi)!h{Tza%*9TPbbRGHZRBRHlpc~<#KsM0>R_wMjRA7`tX zFky0ANM_A50A0k5*J5dNe|@vidZPuz(gPZxwvmiZ)4KUraeZ{Yi=UuPm6&P}c0$BBj9ehxW)=xvowtxuclvebSqahSmpltINiVVrnLjovoof)QSv{sX-323btx}S zSmJVGY`LdqmyAqWR?Xv^7>$fXO6Hj8|DD^=A{N2dqLrHA47+Pju6TPiH#=TK5u|fY z!+)y-l-GDdGI9?C;Q73U(CXh?1Fuk_T3z>j6eou{hrKs_B{p{ z@1|*%f;62+t>~RRT-ILZ(r~Tq$$qgU63uI)ZHsZw-is-vgZq6E1IyYN@?KGzI!@DQ z3~y=MkX&thbM*=ufwQXxv6txNf$5i8sG>i==;f(wmORyWXs*)}-G>g#aRZb4 zp3rd6aU9t$_?FfQ%*#i(-C627@*H~0@AVn8cwXb^vqJ1`FB1CI`uUWal;~WD|0P#28Iy-9E!D|Q!hoU6TQAlO|!diUW{m5j$vNe6;zk0NW-9*>> z89U~AFn!W#(epMES)K_GL8CVVIE*n;>qo7$JPDp+jexOrLf(%!M$Hx@1N(7W8 z%l4is7~AdY7)kKx+KF?&^J{lL<7@yiOs{$n7xv2R>K?ft} z%QNw%lTj8(N|u5tqaU*0CKk%xrZRf?Txf#b%~Upb1J5S7F!R`6w$9=7JjiunOVPAd zyXc>!4XCp612dt9O0-;Ur*+LfgA=6L^!Zq`lTLCr)a*NL2P~0n@ z8(O|mtp=GlRj8mkuKS|Bg|^Z@``$grO`FrC?>h-qp6ViJLeqp58*EVeC-w8vlS~Y% zLk6~IbqrHW9V7QWtfO)kAEx(YvM#LLV$H5_<_*2kkzG_f47x93{t?bH$N{S^J)EyP zNu@b{IWo9)Px>!JH0}rcdbMOi@{)eW%&TK!{PY()#BEkNUBH0P=-@3s;Z?M-W2)H2 z#-=Q0q)dQnrKgT+E$^i9NJy>9T>O$eQ{b2#r0lQd}_H|iu8blF&g z6HKj4QI&R;tu@vEpR}As%jO_FpSYV`pZBAx3IPr|cidwWO!zd=#iAR%HXU{FWa1N% z8P-@FXx2-l2gr;=zlwGezU&tcav}DPJC^HOC1uMaB0jdLk$l3re5d#nhaGo;vjY2V zr`~-CX0}xG8>W#{ZQ~6^?@x-|)05(AK&2D;EZgFroA}`9b6&1)i(!Ded&dD^0{qZQ~F{oSG{L z9`yR&HO=QEgf-f)mMnk5o0##@Hp81t+X2bA$4!Flwt8FDL-MZs6;D$iZk037t{?|;u$*2a5oQ-XFe1O)7O%fxF z2GAs4yx!{#u z@df|n%x%|u*Sy+m{6U(JpB&;-C~*Q|7GLqLcoSo=dH9S(dM{EVuO%SvA{M10MWYur znaK-C=70P&lPSO;LJMarYvfh6m?XdzXN`G`iuvWMb z=I_{T^;BwO)<_2BT8{_}ygA0>phOT1k--Zp9IM^V+aYR9*5kodEb%SR(GJhjuoA3+ zH_2ktP&mm(^_3-GKxPNId|S~Y5)GX~x}5Wl6Q3~H1>9fy;3;VfsVQS$5St37^d+g5 zx)oDgq}&6Ju|>=`dD~-cs_%o7J*{>d!VOc;UL|P`Ml7C=a9Mk6@bzuH%!`WmeF|;L z&!EXa{y^XZ!ThIza1B+a5^pw|$B3JIB$gs3C~X&G>?=9!ntg+$pFv}`O=BipOW-dJ z46r6fgBB-72^fr&EffMNB=Fu25ht$c@q4*)mwqdOYta@6%O>yLH}V=hR1P`6bfNk$ z6M8z?@KFE$xCG}mR55SiA6;yK-;PlceT&Sq#HK9W8zG}|``%XQT5qULC!RetIF(k5 zKH90Hkq@ARA)PXi|G|!B-`iEPrS23>%Oe&BpQf$)FNZy;w!7Xj7bf+40J+Qz9UVJU zeT+X-Bl@d6DzT;WK*R3)MS+9G=ZQtxFTstNOpSG{<54ClA)Uy!gU@nxo&^s9nMz72 z%NlA+T2B!#ZUM(jN8m>OkX2b#aq#PMv$8l~te53Sr92Q|fM}nYRh?p0=FQyyp~Qp4nr7!uk`PqOb=tVP&qK7RdgeVNwo+UdHm9wink zU40(^BbYpnbaMe?j6ZN^Y4>szGGgV`@UL0ntf%1DOe^d&uk&9WDPIT2*PDj`G$VBO zcm_T`IITRe+YX0GSip1LI-*klvCQf8fF?^9@O9kgY7J>ycno2U$2h1n-f))yo8rje zYU|c?;CLOZ9NK1i+?eM5uN3-%uFBXbk7LmGQ!+z}cA_{gxAMSV0@4hUyJM~zCx4}W zy}K8FWfbk!ib*>ocRanO@fYL%irl}ueMeXaAd9DqthVrr$#k*5Rv`D*mL@|$NqL4c zZP>ri&5Pavz4aCBDBVX7f5pOBJ_@>yYOxAy>Tw0Y9FoY{q z?k<-7yHD=Ug_#w@hF$V7Q}K&^SK=F$I5-ou^7FlukKboEtQP*X+t6$sluw|DH&U6J zfHWQ}dqRrtR>>)0L}>K&wmII$)~&@ZzNzC(`|9+2oxclJnr)kR(!7fps|Vnp5$yQC zQNWRN3|}Ag+m_IJ@@6GACYJiH;AlT&PJS+bt4dR)XtCP^TC1*B{JHJ;N)pcVuZ)rO zjw_i?m89(E$2=Q=bW!GH8xx$lQ-wMrcGnv(u6Df7_|*#B92QXplP0SPwh}d*2c{}> z3T-MjKvJY@in zjxVWsS>bYM{6Crg6J{Ds-F$`Ik1t+aTbbtwButIDZ0mTTyAlA8%ggP}nkz~a=mcgX zT=7oVOkDoxbL=7P>SU^D`I@Byx5R2Mk1*=-Nma)olOZS zCm$n}OMkCm0x&zzL@N(P$;k~mYLZkv@j3OwW%YYgw3R-2oocVk5hzxs5d}T^0^7sqDm`pCzz!sB@!3yk3fjp0pRc0GmD&oIeQoADRhtu^Es(LN z@aM-ci)((xn}X;Q5YJc-t&9J zq?)u~Z#=3l90TZc+bMEo@UY3Isn(WW2nks}s1VLC+h6lESXM0Y zuFeNFqkW9+85zBV8F!|qvg;|iiW~g~l{^pT`QEVs{T??x_T!pAOF$|Y#gCm2Dj#yD z7_2KgVjs$S2nmsY0p~>0Jrbf+--?Z3K8T6D87+~cV5~Qro@gk{u_1&LOCSGe6Td*w zVd-Au_NA+Ar)2y@KFRim!>*qd5$}IRsei@NGxx?OSU;fKJ%ZO`LAH2|irVR@gz=w= zP#gMoaYe{a`JtUXmLI~H%6ZX)ApXN5*WlQIU31p$xnvU+HRJLzF*YLh1BG8?RhKOY zqhP_;>mk=qMt5pY#sB;{AJ`DxRun>?7|ud}Fq`Z5`N3L9g7LUibFY8}R(wUDW?8Qo zI#s8FDj%WPSb8E>_$~CF$<)!E82&Au!k0^M|GSN1EWGb-)#$2A*eegA*EdOg(M87` zS$1G6VKy6p8I+nPa1=_9ItY2+VXV=sRB1RD)|=(mnw4~bc;*?=Pu6Qbt4u5{_>CBE z*TXjlt>4C9)YW5bj!uNbDMVb5YIPW$|1EwN_!wLE6b9|yk$;|3c~6HGT%~|0dr{;S za}>-l`+-0~x5zRDd2K$m^M**|le$m-2V)hLV>}_gfMd~~;Y^)B!<#2FrSu=_k`!>m zh!7U@nNV!{l3S;WfD>Ae-hvA6l6Nw*r(<07Z3x`sRjpuG!sr~HZ{gTS{8^74EMRsc zBb|^<0#6wL(RIhWySTV+NH~qB8Q^%6?EG3}yg8f$=AZA1Yy9g#(L?U==M`owy5=k% zyBgaeXQ0s*vGWDHY8`A`j;%LrWmPk$vk{4RDQ{G8#i!!bb^OJ!q%JRtkcbQ)l)jN$81q!A*4 z^y#yAB`1KoQ&G}pY-yKpyd^naZP4i=xC<22q(F|cusCvrI&GUgY&-hP9$oIP6bvZh z&K}VC!HcVN!PFDlB60A8h{lefW;ockbe#I|S4dYj&X5JN=SuRv$|tm}{H<*MvLrzW zWcH2p)IlckoV85^!yI$S1vW@iPN|h?yJgHmLMpn&Q@T&gEGY}wpVAx)5@=ennq^>` zK1zg~eF&ZWBcpK`7=OHA(2v$H^?3NQU|s)eCs<5=Xo-f0V&;1&arswxfhpy%V`0^jm15MXOCv2ecHA`9`NRf0|_X_#?1TA}tRy z$n}AJwUrE}Te$%hw5GyXnx(9GcgBTB#Ntkjb!#Uk9$FJ}8oaW?dGG>3#sB4+sdSNB z#_6wRhH1R1*dlFu`S?*8AqGyoJ!As=UZlSX3rf^F z$`z4|On+2gnO*AcDZ3J0|Hgl=uaqQUAepj;>7EE$sSdX%uu*7uwc8QF{j5-w+6f1% zOVP@+BD97l*1KbhGv5}$wcSEdt&CjUCu2ww5U%#<`+)nSp4DcCUwi3!z3DB$OaVjw zml;$UwfE@+@0ziOT@BUwB)&t2Y?1A~u87^~E9!|3La!N}Pp#_gh~*VWYd8t8;`^$# zj<7}bDy;pbA;uBfGOo)y!Hdu3N{2RZBs8Poi6bIV>u4?=)#JDusV?NOm}w_u!}dZW z?$P$|bjcFS2aMScM&1P()I7<_ftB1l5&wC=_5@R z8?)01xD<{_h6mZ&iUN!N z?aXmAEohzckX@%xkp$+Sm_Yc`$ya~cI0Zb_C9^KjaUejvU1C~m@W%Vsn$%->j?Bvz z-eDkRAZvkp$9wU9zcu8um|}~q7jFr>+b1FJ(kH)q%=b8cw^XD5F>O@KXV%SoTn*x% zB|YVd4AJBD@8h`Qk7LXSm>+%62P9IOhrY}5yv`#coD!L}lYJyTD5>rW(Ge1l&h zq4!qFW=M{>e~gEYg8zW1BjPc*ZRkzrd6iI?b{nRi5m$O71%WrQr@bN1N<*Pbo7!8m z#mZ8>VXcWyeT_2G*7IE3S!VXZzjy)^jfrP_oJ#kjhng&QC7iPvr`ZKA z&6ZUgHK5dhKV5Owa>IfVT*EDvR_`}{u$tIw)PO#GXS2n=#SGCjHWrizDt)?TH$o?6 zS=jwFGCwv%c1TODV9QlNc*l%Dqe)qHIa!#2D63%wjo80^lE<$r1 z&VhcJ{gmxDmdj_kYOq*jbBf^$iF0a1jw^CIWdpo&l9kE$2Jap@f3W08IXo1pWJcVF*eUs%r69o0H~7(7Cw&LJ)A-RoZeFIFM&W`mY1h9R2D zI~Mvx`I0nKfCQb#qWy6R{qHxTe^n#-T?X@XhJ8yeV2-b8wKiw{D$=wP=AUN3jNR(l z@!D{k@;;?0z7fHT>VI4Mqi2!P8$2HyeaD_bh8;=ZnUI+!l-tsn&5apcYpnYEBe>9~ zR5PI3dr}|^C=bNO;e{%3!Fg0Aem^(9wQxa{^iY{7Qf$evPmJ!oKc4KL5>cO%X{mdG zvLLJ{*m;~1tomF)gqe9FX<8_vyE?f-kDJaBb53Q68$CV~(;VhWubs2UQsSEJ2i5z# zd$EaD@@tMQE`kn88=!~e>^TtT7q%q>#BG$)&SeJX z8h`UTBGF$XXay=L=84;Hm^%}7@!pPm5xl1wVrGWxQp*fm6lmWnH1b~D`fePL96G7a zzVwW0Mm79pTBS*mJ{O9kLfZu@^+poe6}sl3WmvU4)#1LBTH{@tW*eh+xR^n zpx1x`yl%6S?fdY)Us8XnS(rM=;4yGi5|BmDPeE-Lxxs`fXww8b6!;Ifm!HxTU%kwA2A`=}U$@VL&CR1D?3(Cf|CC>1~pOFj99NVw2m!ja} zZRl@Tzdp(vc9mBZwz3%vlJP>}XWFEG=3-_8M>7`Rx`L8j?neq+-X}I@0fJBooc&En z&S~%FkVyrl&?R}2TQsJwd8iRNheYhPi6bpr7!x9?jXdDPMpdFIq>}c_f;2O zkyKMWdtr~-PBG}NB(DQ!?7(m_D_-*j@}La2LL(aooTpFyv^GRz-rn>?Y(<2$X6f+! z717t#C=idynX6a)OkJ7@#1+55S$~rOFA!Fpq>~b(EKGBMjkQ=HKL*Q zd-7k4Igf^X?P4oO{v)_Mp>rZSmc+KO1HS98be;quI*>F+) z@%t}*RB>5H2xQxwTxE)+g@h1v;N^MF4f)WqvCzjG?R1vgsEKo8+hM!KHk{RA^_T1O z_gKK=DN!4xgpD^9tyQc$|gx}w`35f%D7Pdi#xULGXY#-Y8b@Gxp z!I5%5l_5rJ^`11-7m=B?=6W-r(iWqhzAN zOl#d!K4^OnB9VCFJ_5=beL*pAcufbv^?Y5hFn2g|f^*>w5Z=oBQ2x;&gPjnw#&fQi*=)v3O_XaT0&?~+5ALg zf|Xxe!4X{|f4Qh#7?6zhHkQDnCef}>sF7|sF^heBJJscv?8O0t#MJalrMmlZ=s=C< z^<75(=pG<7&L4aEc!9wvCg}xl`^=+nPe646)Dw_AeAT*jx%G7p(Au1TYC{ePP`q{@ zZzvZC`g9HFfkybRmZ;;Dc9EZsM|P^jDSlGNSc$gB%5EvMLQj9#M@rtJ6st7XtF!Zq zA0rJ*=)Gxsx6Cy=O*j12`d9oz z|DAckzbUzm8(f_I=4a&D)#be!CjeMd3dq}JG#v|{@crfWim}$8fW)PeM5T_QN--j; zeXoUbYlO1*oQm(UbJm`XookIi++~k#3+Wp+_Atm9o`Zq}hXv>3*n=QjYo$H%UDi(< zIp{*gRW%F9c)AGt7DFPa=CVZ+EcIWAU39kgu;*#VRWy+#GJ-2e@Kz*?>|8V+^P^~d zRQ``84=L^9#+)q0Af5wx@*}tL1IQh4R-<-Qt%a4d|2z6jkpA&e=K4>$pZMzMp3im} zL?yy;*^HODSE&8%tp`}=c5p>Va)p_)Xy&TeKWk7|?FllOb!NJTDO97f@E@S5%fDA8 z)Yrv=IkAL6vS4PP7Pm+!zi`Fv)sGlOsZNl+OD*dI{DsHdP>mFv^#HAUylittb5+YU zAI7R7=PsY1i*GX3m<+jT2W47a6&@C9o zt6|P8tTOqLc1&odL_Oi0ygwo1ETn-hZ=Utsq;$C848M)2(jSQE>;R@u;r4(3aKio< z`$c2Gi6gi$C!DX%!7<}|(IU zOs)&ku)6ZoBW)%bg7$Wc7EG>KsrhVH$0e6KWU3omqeT!sF=V0Un08~+Ke5GG(B$&8 zD`h{@4}*&3^Y(V-YgeJ8)11ZNHZj8ExBJogw&0aG9;XC&n6u=~hD1yA)x}_y7IQXv zi5t~t^B{Im1Af(#wf|pP%YgknY<>g{wqm|KQH1e*YEh_M368IVV>!tj>jG@Vuc8~p zt&h>Bgb{#E9*3oe2EKB|+`FW(^x3KCc(RL)x`-nm=+kD~hr5#d9(zq*$GMQQWYBBs ziBCt}&8r%|Bz>qCNC02_lyPr06{oAWTz@yJYhxwA+QDke zOhx=6Pqb1jUEL_BPdKY3p-q~6=E0O{dT8{-`OnstgJYFn2#m?p#EeT*>-xtp!RDRX z4qU5Qo=cO1r5QP+oU<=LMu(b9Nm0c0QjNQ^C9W&0gMtlgi7(LDSeb~O!IbNUb?#c8 zq-9K|4u|)Axk)rPk+~Z`vcY!FC6t^qw(s|g=uY?3He-+-gz8_n(!!!n`1+rI4~)=D z1u~v8w-;T#6i=L)hFZc9;Tao_hc-h6C{C3lj22P_MdR{OU12wE* zLo?!eE@a)-You<%9`h?}B}p>Tv%9XsDGiiC$3fVvFyVL86S$(GOHG@BTQb{(Mb~Q zkA6*ZeWlwVG#L{cgUW^k8E!QlK5P%| zcc{h8%}oq%_@8ABpTs{T^=;sup3mu|@4p-+S>Xq8DT=i&r z(Du#3$1ZU6^`F_YG~>-4l~cbm z{wj|uqPDEc6o10due8xt+SYcC#)N;hxMDV7ETgUh#>ZfPc325d%T#=xb9(q$O!GYi zX5TT@O!PTithKdyuau5|tyOJ>cT}!U@N?MqD~x(M%_UlEXmx{p3LaGs{X>)C)Q;-g zvqluhd+M=Jh!Q+pBvKn83dX%TVZ|b2f~2)LSI01SBgL>mKiHG%42H8U%asEawvz(q zuWkpg$a2IOv|7YlnwC-+(}WU~=&DVs=a#mfdnf|;uu)f&X5J1I_db3&#g(IB5H%j1 z-5nqTK^mU2K9U(rcgBj^{d1EFmT3CQLy~TVA@FNcA$nLp0TpJ!h#AWU32I zP1SSz+wQXaw$r{nH;$9NG|a#cP+>d|LwKBDZ_#&ynfHP**W~gB?2i4+14_lX#c_EMg5BeQWYNV<{-cm-I+-<5 zP8K7_H=%dpwh5-Ia`}`9lYlR-Pnq|zcxqdRd}-vrKNHW^m|-^tT>?cc{7Su+lo-76 zSBNKH+|@K)@VcsC>8%uDCyqIpf2((wT*l`H-yHq&kQLD0`ug8qShSWFkp? zJGQEZoF@7AXTp2ETQ--b2@6*STG#XXn{uzQE;2LfG#C_WDEe!j&r-2pyi7BVKdetI;h&0W80**70$Mn1zwy=B+IutfUMHf!W*`rBPP9>M>dW4Ct7)hqR+}PrWkp}2WB;VZc zC(nA*qBp!Zw}h!T>WZ$hHn!X__BcG4975bvf-9EZ=G>z>3nR}825hU)cPSb z_^%SI9_7dszURke%1F&4u7+Q#e6IhSCA=|)Ew ze7$q2Okre`)MrzZA~N&Mz7zPnOnDfk_r{$PjM4#<875K2+(lRiYYrZ-! zAiwyxZ`F=3KhLt$63-SHh=vg-Tt3lRE!{Fuv)tG?iN`A@>^I?4%1@xgSbA85zEVi8 z>5X3{BYZV+CNUb>@&S72rdl(eWA};SVXFQMpA)XIq731B=@|0YAlmNu&lSso{5vNgKdA5b{E*3{sVyHRxeREVuz&rq4M7bEvmXI zkgpQPG1dct2xSDr*b<7Ck!yLI<){3T*~DT|KLWRk>NCPWF3=Khljbi>g)p0j*rDA; zg`%#w{!Eie-($=-t#J-q5?3@K>E3b@@k?N?V;HVulx50UW;*Zsa_FJAZgh%{~`uiuZ>w3|5FAZT+sm zZ5(5jG<)WW*JI%ji;w=BJb90}zz(6bWT{&^L||X;9ugN?0pNikUAfEbK6>-w?yaT; zd|T4gVkHlAXINPXxcqWtcXs6JM((Z*RSHmjdy(0!xi z>mO;h^Y@>mTv?;XvA<(Csx#PN-eb>DGtVaiWm9P_uSb<8?oj0g1j2d(8pH*imC1s|1#5PH_4a#uF zNXkba+?K4n*1XvyAz(HSy(M2nvKV$(>KLXTMjZWK#iR=P$OujuJ98XmV^XQGRI5(@ zZmNyENldn1l3u=#aLmJ>J%x$m#J1In3ZZ2;4a?8pO51dp;t9(6cbu2FVg}X4Ph}J2XzkSd zw2$Gm$X3~>?m$6i^GR7%UPXL3crmKSu9FLyZaSHsel_XdwV5546TI{V3BJFt68w7u zQ8B=pieRRHLF9}YbN$m)n#gpv5L02zPuDV_Q>tbj_NRYhoeq?Xes~lA z3nyZpF2@6^G(pU~!is#oda#ySp#$?p~m{I}~@9g>UcY{rz{+qAAm{q@sP-u$yYJcN=aEfC%9kJ`&*(= z2anTNzSc$;SxmuDt~UX+w6!i27IyIqWAPbYC)xM?s?AOI@`5cdCQk7lRxK4roU3+uG(eBC7g0wZ-2Q$6=SDn*&|k@Q--{1 zrowG57qgBuGE$vVI<5BBfAQ$}P`SfM?;T0Ojyu8J_)V?Ha?>j<#G4OmIC#Hx(^b zlK$6<9Vt&9!$c@b^R94^N~&*KyQch(K?4#(VSWzX0mG#W%0aE1bh`-a5#3RP%4S;Q z11!o5$WO&M$FoKjyKc=#KYUo=#iupwnYqm;4#wkzB{-L4Y|oYQ9G-fIup$al4Sn)C zI1K6@JsesxdXepLRd996S#FsEoCjdAZdh<|poEL8;|@A!TQbYSA9xJ`2glV~wDzV> zt7c48Pv!f?H zm#x&~{%_UhnsFp@Ro1DiWW-4wVp)s1-}-7y3h(RswJ}3uun~pqeG8vK*htJK#UbUq z1~Q96-|4D+>_cXjEmm%TWmlZv_Sh*nVMpk_sGzbmLHsGpFEA4%ZpL~5AjhK?)R-o4 z2U$clDe-;CHo32oBP{(=PgzMh&Dz@XxVKfV`3lq1ddfap|MLh2T%{|{YLoyoD}eXK zDP+|uoshpnlntXk1TP<)T!AiE|qHX=5@C%cT**bPkxp) z4_*yQ_i>7beySnBnKVW+Iv21C0+uasp8t*&ywLD}Osc`h*kbj73oYXsz;vb@o;63W z&=4dU?M+)(eaL2ohO|db3fE!x7u_7B3^7|2GtA3rafyN{#L^bka1UA6n{* zy!uHpH0ql|qblt15!OPE740v_!?FKDohwq4(oPj@q{H@C^JceJ1SDd8ReIR4)SAoI z8N@#R#29$>aSSV_%^EN6+Adw#s0F3?E!dwvq&vnwOWLG4xfkF=Y(m~A7fQ6 z?Ft!Z6Nxr#q^*r|e1-Ru%|IK-1 zS0xN5DcrDtiL_eENo=ZH*2VznxhosqrEV+H zRR2fHimqc&$$%qxJ;Q_4T9W;%8tUquF3$u$yRXDl+q1g{RjF`v@%|VUPH3T??~;tGs=SUW z+;Y;+y0?4(Ow(rkUCJv#;z^t63TYf-(`Onq-Wmd2=SQ1om=wKN2oWnfJNvXG;1cY_ z6L_+{SL zB34EZu>9BO66Cu`%94Y5BlGLseBXhy?6s7))xd;ak@t5BB&V3jA9fow7?ezax&%oZ zCV4C1wbAc&;8^=yJ>1O(9EdN$_+W$a;bWaNE3Ec%sJ%ctOUW`bhU#PULh$h)1yI!( z55F~^HM&vkJTgU_+Y#ZKc=z9R3od)7`<1?UBp9U-wFfR*quC3pN&+kATRNgpYT0p zp{l8>d*=W^m9MY88zFCIquMXA2|%*7HwZb(PD2d(lOX@a9HrEMUqJqYl|?=wj;^6s z=!0FBWHaNjGpD1Y(J)oXW4Lo!V8)YjjQia;=Wm#*Zfh79dglO`+fUD&_8&M+ z`nK$JhU*(XA$l|lRNQS(fl-377d3sl3#sNiZ!yVvFqB%952oR@uaU_!$#o&njE7H+ z_+ydkuZZ}&08QziMdvJlN?2%{04+{|_s7YSZ`SW6Nuox#|DfVI^`!Mmr#fd2^?v&< zSY38fSg|hhe&fF?IrU55_vrkz(QXkH=EXVhSQEs;=OL*#smojgeo$n9%ihnr@8^1w zCYhQH{|q6zx|~L{h~=p;?<&MJdi^z1D^C`KlzAit0PqBC7-$zWqgfe`V-QQ zZMUQE9#p2s1|eg2SAe6yZtvLq^MJ#Ld3)cjsfmuwPI$?~_@TdYiBpj0W0-54Z^))3G^ zP$Ld59!mOzlNZa$NpoE<){kL_#C{OZEO4C3NWCLJw-;_S($d(EP13lCvC|rWN$ggG zx28k$I^26K5|sCFkfZk;mDeDb7W?RiB$MAvA#HK>p?>gd?;B#Id?Iwz#OTP@DFty| z&f~OCv&<l|`Tb zvu`R0JvHvmIxR&bRTC=Ks4luT@X`%)m@9^KQ;h58si&TG;>sI!rSyY@ulDrTE$3{cN&bgBiNF6phgn#gA? z5WhCs%Mcbs`O(>#1jSvGv%d`6uX`0g>grV-JI5-yG(BuPW?Bu0KsJK~@iEGU)~p zvC~6;x##9-lNL1?zRgAi|4cQExdk~D3V7C3YCWu;8vDlP>9=3GWT1<0b7VYM_^fFh zz{o!U<1-QZpP~71T)nXTh7iSJ5H)?q7h^_lb-f`suTMYXZ8wd6(>=X;@U67@{@2d63tbg@&UuX=zqhueCltibB2y(X$oW{1SdT|1js zFh!LtTv_|=DsEB>N2j_5juz`7@xwu|3Y=_5VixZQ+Bme0F5-X3bYUeO^yH6wc%|hT zIZ#?bY#mWpwJ1&=Z19z8Lrvo54pNksriVeEgXN$g`;izTi&}K}1gq_r9_KCVB zGMS|(R=F=vi~ZU5eQdFzYu!@jzfHqHM-r+!Q^+_&3k~}&y`*Jtj+xOxmtHcJWX>1PEFUhtKFkLYcP*9Acqvq=k^ZXHkMkjul z-mttk7VgIi38Qyu2h84fJr8hphSo3UTq&u#x?_0e(UklY-M|Gc%eZxe`FzL^%xkPw`xsrN=ykYFh+u{)AxA%}*T|XEt^mPVS8A5I*k7O&-HSWnmwb>Lp^a zzlulYgEj}~{H_l_Gq+Fs?d)A`)mw zwJAF`&9d(PzW4fNvxFg#$u%H(N`Xc-l^WUXRlU?^g9dJ!#`@$rdfd#ZPd-Im9r1$Y zWZz-51eNskpQn_O&@J4S6@9x30x+@XQc)9HEKq|$oI_qvn@!Z{4W34vs6fWAcf9!R z7?A?~?}iTbvU|Y>apeL!P~Blr!G6QD;o^Qki1Y$KQ>{jTU$vs$)1U)A3P5+p?eIYpeFA@qD|5eA+wJT7gL{{l%^W?;XyMETN=|}XXi>M{ z)HH=XiTkkD&YPl|P2t0475l%TRt3;k2v@?)c$P{#!FFje9!%W0MQh9a%zLU+5}8aj zsxWy<3(@1(|0aX-=GHT@Dfv_UQqUr=htW9kvs9Ao-7 z)fpl-#?r}d03+zdQ4>}y5Em6OVE95QuFCZFu>-5UCf|M(VaKmbT;YgdC;On1^D^`x zGM=YSd2AtSjd!CAL}aG&AvvLVyG{O1YrDi(1s{DFX_l>VlknGDo(T^;9%jBG=g@u! z`Ov00ZO*fUuVC(uv$~Zu<(RKKY^(kl=Qp|_x?t0zafk`t^$A*SkEJwO@0H>q>+GQP zFUlwALc&R6EaQ^*>9kLl7^d~$pk(C`Hu|t55MKQtClImq>gLlp(`pKH$(q{Gv65*Z z1$Wwy_G<*?kNren#{>YcdeR5T)Wq2c^W8pyW8y)JEpCQpAGjA&91EGPDid!Mq97Ma zbj9GPIl}%Z2Yr8`E#tQpD^@Ci7_5hn7|ibfR}7oFxz(+!RkmFWZWY`@HFu4 z+W&>$k93o+tPfM;?uq>if)35USK62w@jcTc*#-7NXI#=I4A?C3vuWHBT;Zug`s8@g z;|)Hrr$3f#kc^GOQcz6l>dI*kp8QA`TE{+SwD?W}q<%&}GIG5yAGni%xHgT2 zJjK(7!$0Uzvj>-sUM52l{1Sr^m;sYZ7*G4G3}8M->b6~YtgrTOD#h@zhG3qbm%N1%xP!T05eCiIo;)vYO{qTBbO+lxoxBsyC9@mCr zb_mdD>ju30~vlx>_5ESVWHn^S5ife+-^0ECyvh!MVMjH`rsPkWQlj? z!=4ZDiA^NlNzs$dcHIdpLHwDL{i;2-%{LS0r^%bj-q{%DU1y&NfccOjT0ImG&|RIA`zee-mNFswb*}zLw0(GKmM!=Zush%uLyQZ~+j@ z#$G2=%2Qo@f+~G_8G_EOm%9UCuh@RDA+nY<3ZYz%**t}}h|vir+{SM8&W<=qDLG@> zbP?#4!CEDNNHqi9B_|{Jl2~2CVjXbw&f-b%Lc2#I1J25Z@RkM%8){n*bXs5dcn~-& zV7K)D1hb|d9e74@*GB;ruG;?JW{EKDHJ-Xi%lP~J*0i76nLj6)!Rf;1yRz-@k%V$K=nkZN)Dsx<8s&F%bkdwQ3{e*`TEYt?-%3pUm%y z5QWVea925{RdVjlSdhi)kOje6I2Ee4zAR;nFgd<)uQ~#{jx>=Yw*5MxfL2GHjYLR| zR}loSdcAc+o~`{v(H2YqN-N#Q+FJ+mxfT?c;i*wjy%S9AY_F&j-MG`jA(ExOweMyz z8?!G-=b%734HEA@tVFV)L$AmHDAlhlVG+!)Nx`>KpMI<9>=r$+j?@u{d)vUFhBZ4B z4L(X`xumE6`s}aq7!`ok|KylK^OTG-=AhkOriN-Di>C*;nrt~!T=w7s0CE#<+p4;o znT&N#wPMA_gX}h6Rb*jeImIKEC6h9&RB(6;bTS*jCB64b1d~$p`FYasLu%t4(gy@0 zOOMa-J<&hT?t*0D?X5s7iO83hNWt!^I2^>1%#cjSJ|~t+b^pb)TezOD4_m8hOih%{7V&@CutVl_q02zHQ{GyqgFD&v=Sb@-n!0<{mE zoGL7oz03Ck>Dm^S2o7K&T<5>AjC~b-Q~LFT6*>}_DgZ0n5%V&(HGkhxMec@&a4q4J zd2)E1&J^NP z<@t`96qGry@~UvrlP|8kgHyE_$W1;y=@mB{-QCUB&D?YtR;X zA1pI2@J}*NFbq5S1u1GhIMrHlW)Q%88-0eHU+HWbvM$p>{S%=(`|_8Vb*3o98vC@= zd!3#0FKtLX(zCN-PEbaGrO!DwUaDflMUq?{EADT-;RGXY++(uK)Q*py`aS%s*;PVmMF2Qs_r&a3oCCwq#cMp&q$d2+v#M9h!wtqP4eNbS5=*Pd-u4 zLuCKc?`uA#`5%;3iwK6g3PZTV3y!|EVux6)P$o5O0nY1vdbJjCUf;goP|S77vjqIh z1OjOEHl6tU`>J0I^}AO3OAR&Jf2Q6Ox*@=t^MXwp$~1lSLFq^^hc|B3{gJtmMpcO+ z_3lhz*aS#utl5feg}@F;C_$CmACX?}ktBhO0#O4~0rD|tn* z+OIo@Njhhy-#0Lk4}%xR9)4UxCJ+~RX`B#vMz&PTl!TS&x)|Z-9@n{H^IF#-$(XTZ znH0`eQ(TuQT*MioQDJk5DanAzTzlExw^!&nqHUbI+C^W6GxxB1Nu;& zv3Q?r>@bC{GdDV=UR~Q`5gE{8`q3@NHm=oc{dM`A0zpyk03vJ1oex2^vj)A1A66Y% zs_w@nq^2QQSC?B=;_-sOL|%kcxK%!LiVL|Q>8epUV`rNAy7jGrR#jc&temNk3u3CV zEV`uq$t{_K2ds`v3D82;%oqC>$5)jk2c&A88*5)YUf^ zC=ukZ3_bC@q!NW>I|1%uBnE=;)liBM4hm&;4zr{Ir3ystEe7s_On@H(3^Q%3Wji?{ zjT1dWQ%`=)WcLWx{t8q)rx^mW!DNY3oYT3J6C+hWegCvO0g7sI-^VYpO z7W@1@t(3fHf#ePvjWl-+Bm|LG9^Vqk+f+McdhFKU4WMXox^wvhzg53B9MpJ+`j{Mx z(0K58@=727<+*G8!i$C4@1Gpx0Z>|RU53RpMaJUGN86|pZ>Nx{ZGk$D<|E?XTkETH z)%%ki?7pXx+}c&{t68OgCcEYhRCrf)$}*Mjuq4geAk_Kjbi~?#H4XTd zOFG2<7t}qv=zmIsS$>Xfe-_@DY4<*?ZT!1Wq20YG`+@2R9)H%9Hc4}cX=hFBb{#ha zD~x;uofGE3q9B0f zdy#^cjjsFebzD|wGxe2fR|^|`{sMP%eQVYNpqr?!Z zTT7U8jUUtnT77kR9PqAP8BiZDZq2#h2=?o1ID5;ZEadHkuq!k4w+4;rBN&gqCq@Q7 ztlj2E?u;fDzu#z<-EP+SkuG_E{lLBB{#Fg!Mb+y;lp*`}5FH)R*0+S1mnJ4g$zj#F z+ijhA;ZiyL8FUo2Iv<+ePcFVcI0aq#seJ?k$dyl#!}QS&-k{g1!UDU3wT81R9xzxh zz4eySm}!CffiRi>_mFF^kmT1!UNoG3&2%6$*S(AnCY6~0ripg*3m zqcwI!n26n#e8kjqNb(6$)is#t{gyUM;Ux6cL&O6@Zr``PekLh0=s!Y74HUh8zl8Tl z3hT6!4_;26@;z)G6ce?QP`K2JF&HHs(fvbU5)_|jubs^Jq)mp^`)fsMnJH1~$WdWo zTt=F(WU0U`0TGYcrS%Aanga{RBS^PP$-kT=919sm0Mu4W^U3NV`QsGNO0v&m`6i1B z_dgoRFlWH0GIub^=&F<6Na%?ie>%jQDVmvj=AJG=UYp ziGX3`f-aIn_VM!ZS!vF0G*#xn2UFh@$xoO`!IAs71wbIrt3+4$NQ#m1j%PpeZhY9e zKYz>QC`t@LU`Rvn9i{<3vvVBbXa5up?tR4*dQhv@CadzV&~P%MRvb7o0)La-dc59y{=I&p$6L*_%6L`nFVqFW|a$H164qa`SKvyTUUberEn8;zzwFx!- z-U%0e$&Z|afO=nO6jfVE0WqmJ=`N3HggSncFGu(sbc|wwi=_Q?uD`VQp{~2zu$a^1 zdUtO6!;l=}`IrEeJHOue7@vORikF6^Jf}2W=T0LG6En`OdSrkW%`4prMSzZ901hG3 zOb(W?P{MlSn+3nt&;r-&F1X>^@W~S7fya~eIZ!~YzRjJD`072oEsnx5804j@&p`m* zs{1}8*QqNJkHC@0UAz4dh7ZLdh#nevhfo)$i{vOvJYj6z5E(t4_6n%}Bb@eZ)a=&6 zJIUi9ZTqiC9|I?Or()o(lEe-k#=D{ky3KZXq&v5@f1r&XVe!E0n%IlVm6JVrRBN-mg-PsQ1Uy zl^*&Kc1?ju%7Zav^bf|MV@dVsbu_(^+MgB>tvrO7tW?U*G*6ECSpR-fUZz@qNb3E~ zhq1BJL)2XPXN5BD(0UP7H(#f3+)DTf`Ka5hE~tOWqFm!xwy^jVeaMk*>eQ)pllq3b zO6yd=OjQ`iIUJM6C7dE!M`CyMyD5mgq8Y0H))y5MPsxfL#}(AWKM2OX6eG_X)N=wHZU@D;@oNL+w? zVUkR-5fAR1U~j8}F9v&`m5Q`&ojiMYKN;&=f?jp$FCZA-{~C10>W#OS z47VT|M%Kjzms0Kl3*FA(axkzLnKin)U=rd9eihD^kzhJ>b|8%5ekDkyr{rRRJfpXz zZjQ4Auqr=f z)JqqA2`U%Ey96eHXn+PIkPEBzy|p^{4ER;$A?ns4@J4dpw>Y;VE$tcpM|wCKhHmL2TVGI(Q`xFx)X z!i1)?gz354^4Glwj9~OVd>y&cg$6RJ37bp2@7W~xp8%1 z!Frd*FOnHhw!y+h`%xa%od-nz)0)adzl}h2rXlq{@$`#PDPbMG^?|x&-Wx+{zb(nw zVOHGv<&kjq4T^Gvje#U?29UgCf+-ZfVh6S&NhwySHTjdm`D{e0We|;)koexr+H}jW z-Yss0=`iw30b)C6uXmO-g5BC=rH!{YHet^@V%HPvV>o~(G z&Di8tfm2vn`KeJFz~KqFrkr9@N)>!o39H4$)SE*p06sQ7k5o1kvsL21a)(@&9C{AO zLHQBTEB5%<6V1f#z`_7z9^DXp_jFI6LNM&~(17OBk;@ zSzem9zG?iq2I5jry0-oRj7e20F%v96KKKEClm5?rOcwWboYSVwGZ!`{Ryh!l8FZ!U zdjnyR^4XfK4sVK%(~{Y-JT!1cY-7#55%3_4u8kQH5ha>ht5taBE)EIAafl)@RrCT^ z4?PUSG?r`1c-E4rbGtfUgcD~H?_|V%xi)!<)p;nYtS!(nOfu1d7m46dhZk!@z}u_3 zz*qCow%{`m5XN!h-cDX6&Tix+D7JNy3l0lFdJ!*!jUIdJ5sSv?Z}6kT$zFi8Ahwxx z){mQqbWT2F8$zYhboAw?CVo;u|Jx9R>?Mkr>lf6c0^V9Nr%kXqMWx_VK$SbK$xsRI0~v`D*};J_M#Y1``^nXLs>ZDm{;2RL{4s@Wp3KA zZ$Nv!b~yW{I}ol4orBoAV_Hc(7lEWnLOoPxkpg7s{SSw-rQt4NR#~BUbm2|OA(+Wj z8*y@DWD)mczTot#An}?GvtyZL?-DC%$Eco=!+BNkcNN}ZQm!ow`vRuo%F9s&r$$YB zn!RdlToBxU-f()FCe`mD&uEI0KDc6l_@LM@6FMDB$Y@WaPU^7QUA>Ei{YJ{N!-=s{ zoC@ZC{x%cBG*X9&TNBWkvgIh)M6dnnxFMRo_)b6XldLVY4%JP827yeI{A7^W|GB&J|tdJO-CPXd`Qt6`BEJNBCk=Hux{0N$6fTSw9Yq#z{3WVT{-dIp( z=z+p-rxaot@eE;4`LQ7)*iB?7H{?6QkT?itQVmlCunz7KN&LlY1pWBVu?^}JtH#DG zwr&1-MkEtGUJJV-Pg6SOb(}k@Nf~jw^ixb0FA%2cE2&A!_|OCRTMC`!Icqxq8j&yj zU{F(8I;eWG1(`*<<%X?Or4@8Bc0Rxj7l~4lasS4$Phu&3d=GAH1fp>4y!A3PL3kCtTC33D zHa)wpL}H7pf+RV@!wiF92)KhDiELi2-R8Rn;w2d|Q`&OP7PKjN`|l6hok1KBt) zaIcv?+C|=)H+dyDT8grzi151@AKF5?zk=DR*b+#K%Lqswwo@a6(jZwwX}U}J@I|rg zMLH>gD<6vt3yET+b!*E0KB0EWtVu_j0zsyo_Av|NU@T#-As*@UEjYV%rI#euyULM+ zNdHQhU0v|PF-Vv5h(6VeqXg2^P9U&;AVCb7W-#p8a^{#v?!5Jr@%DRCY0jKQ*Q+=W z{fwUR6)@6D5xZNhkvubl{YK{&O`>-+27_6F)H6*bwN7Tn2u)lp>_1AD0alTeL06>3 z;rn!L8h!nYhm0?9-}5Vh5an7TWSTw|PnagYGz0v8|HH8f#DfQrQ7r#{Ztx>(4S9pV z(SC!r|6_po z);%M+{W#~@fQCpq5^P}*?4yA3p6=p(a#E1WqE$658URRn+TQ?L!>K!cNvS0Z??s%OuX(}?0obEFVm}SOIw*CX}VxEtBK!bNic~aM+ zT2rvD^i9Sqt5Du(tUXRWk$qw`%l@E3cVY3_Nv58|p;=tr#urxCF`jhCMlFx{z`0;y z@CB*;7d450diR3H%r%E5w5lBaDi_k+Ng=k^(Ee#%6Z6qUkD9yK-1-pZbY(BvH%=d0 z&E$i@*j0n{@nbqmqqxdzT#Nol+LH^QnX&n8NU@TZU5MbUU8(C2x#dz1cR%D+w* z*OH=OYHCVE>iA#`af(DJ{vcF>a;H!y#x(U^C#^Uy|E`-Yt55Y$m!~tWO;Z>5#p96* zyXJUu@BoVw_2YTrHgeH`DmkLI7|7rbg7e4W;D zp3=_5$I#vOJGe#m8lN@(>?XsSaZ|VWIlqo0mNrP zmDdq=tyK=`T>)#0RxK3MUO3{vX4mVkTaZtYP$T~04R=}ohxCg9A|i0E=lAjTn^|rY zXU}YvDc6c(=>C^ zWg{&kzKv=|V`3{LW6$gFi65)2c8}5%79g+VUxNMSxPV9M89M<>?U@L}WeRwx8Tqi- zA?42ZPCkI!0}s2695$G7HST=le$&^ZF~|n4TD3d2 zqqB$Nh8w=OVt#TzG?H*y$LYkR5TUAy0|tTlTI@jSuir*za7R^Sj8b}~ zepdqqZvolpXCnIrn+B$A8(c3>GTI>E`O2!@2xh?x+?H7@jdTbrvlf0SjHc9GJxH5R z1^!8*8t%(s=dtDD93zY56cV%d?AL=nuo{={`>bDSk@2;L*QM;;l@t{X(W3#YNEO#+ z`q7un<+E@qL||8e@;cT^7d1a^)pJjIvx@-t<~#*;UF8kUApRdxPu3nR^y^6tzaAH_ zlEHg!M6H;2U~I}s+v>o`uT39ud`Ufw*)D^65v=X`Dkgh^O!L^gqHx`_osaU6;J>c> zOib2UI>fh=_$MAK;onlbG1-b(Jiw4^ll9rwdEcOVG;W~P!R zRSELME;du7|qIx#f>P*UE|#DI`3# z%eI?6;!ssihRp9zj~=;EobX>+;v=xX**XCa1)`RP51xrQ-PxbAKDzkNjj#B5f z^bz#UA!kGErk1UFMY;ePY;CKh1v ziK<|`pZE5g7E;o7G82}|M4O5^ddJTcVdrA~G$ZbhBn$T)VWChg07HD90nZb*w4TW6 z?aWaow-5Te4$Cqab1y@x)-`!*!~R>QZ`Xoy9zNg*1auQVwrGC`dhPDBuH>+OUjCDy z1umW4B=yNb!t#TFJSV@#?t3y1y0V6bX*O7(g+G5(|2NjFA%!hr2g}SbVfM9Q2!J zQ>mdfixwaP>Roug@2Q_{A&|v7V?;net5lx=CM$Wg!DrSFnl0O(K@(qc;+`jE$C7&@ z_6>}|t|LeK83{>apc$T0H@~AagZ;m>{E{FRK3$l@gJS4Mix^bB@kb`A) zf}XvRg=SoBd+;=e;r&yL)|3Gnx>Qw!;=8TSuXaZgd@iFHtXUyrj1=99+DXJ^=R7<0 zPCxzt5i&Ig)7|E_5sx(mitI8H3FU-kOC5Ux>5H5 zvoqG-?Gub4`!=gzMx!c2`)QB*Qzw*bX^oNJ*BRl!|8^JNWJ(MuXUomX7#-oE8tmzNL)Bdq;e;~Xss%PH`bCbnKp zXZL%Nh*S3rE3#Ll_9pOJAX;SnG;u$FnIY%+Fob|Z{;`yJ9?)?2Y}q*Nupa4i(HHWp zPAck4PGV_mLEfUR7Gbpr36#jp%MaclETB95xj=HjcjQQ)@=y;eSy;m$)+&rbrUHt- zS=g*B_-)Q#&4@rsu$6ubo5x}%f6)e^rTkGkZ^W9;YC%8h*a}Qfm_e)Y?D;$%*Wie|1nbld=6J-$;7sCPDZW7p+rRnr0){$2QX6|HBuT zgf^$wu(H&{3h^!_QOm)P$weB8lDaOj*P(20pIvLc2X7`nab-T_uUR=_Xf{E-Lud0> zIR&VyuZ$gwno#lxstN}|i?Gu8wp&8axsD{e?#)%*D_ofJ4!LxK{QhfXcQb`69n1kM z=g3*nuC>1}E^W!Fz_*IG$^#XCaaSVHh|xX2ZN;@y_XN#dzYZNaGi5N0rdNV10ozvd zbR5>XVNh8c#*s&97Kc@UU4s||$xjd2zza^>;U7Rjh!*H|{<6->UofehV$%nwyt{46 z1CJU5J7|c^l#&bveuc!$Len$GXJ=g`XoI<NB|yX~frvMp<*)gbzbJ)(x3Lf} z1XtSE7thTua4~)U2K7gD=Z`=t8j|Eevp>8$WZ6M8Pb_3v82_6Do@TVJOWK_=?rpbw z?0`kTaFb}YIF6ji%6{ER8y&-1Yq`vSmQk2EHu*XJ4*d07=)gy*-N%TzCWPz9Z*Xu| zg(2XKs&6F7PY$9%tNOn`W`x0GWcwGpZ&fpk*fM#~&#Aggs(~4W^%ao^^68Yyhqcew zT~mtczkR?(WULC9E@N+J@3+3M-IJ-cV-!;jbzj}A%W}ACkoQXIDE@CrR5og#LDGjq z-hslJ_syp{N7f{me8er{DVg+~=K~*5=XiHBYXwx8|E&oq!`*;{JLmfR9DUcmdmDh+ zf-jg?-Yz@L${4O%ceR^q5Hh3PCK7k(DT4f;>CvatVrxd5f-e{Kh)d@8t^#=EYV46n zp+TIqyJVI|>r$I2Z88D`5}us@19$%{F7gQR=u7=kmX~?nou6jb51&H0<3pd)0EV`0 z{$~@#@9P%@g}DDsCDzC~tHP7jn}`R$MWLT`GIm0Q^!)V$Npgv08oqn8=>I0{r1?)i zM_JiPXIK@}0YgFrSHe1d@1&NpX>0U|WMi35gIXMXh^Wd5JNAHeXOZFy1m|0(XBTD& z)i2LJ%KwMs@W1>!wDU6!oWhZUqE|~r+Y1dx1aK^qWH)lBNIG_EN(lu=W=`qT|`iD61-2nE{N<^K(=zM=&b zVTdD829!{h|122Jm=?+mY?JxLpb;!W8h|M#84veUdGa{yG0cVonL(U6V2S@Du zRM)s#Cwjy03(!7tiXHOatWn0+7vW9Pq>7q8!|m{|t`tS^F-nP7xjIEOeN8QQJvUE~ zVr~$-FPem49r2B1Od5GnAa9z049(*@Jo#tsj7WEd9YJZ)Y^-G7_(561d|Gr`afs7gn=FW<^V&Lv;Jn$^t0vH1tQF{+YhxP#x7=p z+da&c@LzbKmEffhDzd2m`wiHs!&gio=IZNg6m0dAcmFZexb?O4x1{e_*TmmhnAw-A zW~3W67t)TV_Ei$BzzQ3l6#p+yS0Uv-{V5lsV|I;o}hDPS=eU{uP7)xp^ z z>x5C)F%rdkY+AMW9{C%LiC`$NcWKf5AM98#%Lv#yO-y>Pmn}Z|cklh84)uj*XS3|# znJuibj%|olH#GEENP|yC_WSA6;7l~OCAB5Dnr;T|zv)n|^tCjy;5RonKiJy*5?Xh< zzc2U~RED0j>3ME6dDEy^ud!OWstZ27DFbL2HEbW8dXOE#W;k2Jl>sxIdA(+t_cjGc zn47V#)F_nA|D0kz>cpIPp_?nSMLP%84CTRS?s8oTdP+@3G=5o|ZhmyOvlCj=(Vb}~ z5%g|)*{K+u@>V7jc0XPihpE5$|4Z6~#UEa@`r)I+V<-G>wg1=8m+19Lcs2gavosJr z%jAOe|Fv}0QBi$eR0&DxloAj`x;vCq8fk_YhEfnx5_h&wE>bki6>``9@5R);G%V4 z)Xrs4v-{!9!qc9aCOa~UG|Y(N$G~Sz3@s=%lW!; zH=yhE(P|5x-|1d}?1~GQ{USvEp*rSVzH$(v`HsF z8S7T@!27WeopV+>rAIZC(RJ<|JB&sjC78NmVo{FiXc&9W%K}xV9zZL<5cpw^F^0}F zX@W}itD)w1A8$Pr3QuBMa9;(Fh6+?RV=n~-tDouwYKey=f?^ipXk`@C(bxvNelbt( z&6J-AAO!--<+r(eeOuFD-CHk*NHTJzGi$wI3~t>{=gH4y1vX9~y+H=?Te4Rt6Cid_X)p_0{yFKQbHi1*a&v z-4CPbl$XUvz%_$BH%C>2szsRSzUC03ZU4#)uK%Ks=6PUsZT7e#-UymYgUPD|dQNOk zc-)J$2Pdykp(>Vp{@=eCbFcj6&7R^RGpm%zQRLEOpPV_{#m7}CjV=+t3=HOodu#<4 zfSJc*Gq$YwNK&UT&Id9Rc2S?p0r+hO1(|2Axw-$P&k`OkpT|(6wQWQGW&sMov-dOC zLo{(3^Wnbt>FYfnoYq)ySn79mzV*L1~R~wALRkv!4VMM%<_Eq{)2^e*Ns%m7HK-*kmEly>tOD@%e=>-a_QR9L}L!_L>RQ z;RpiLc;K~!4;U;+op|dAGWMe8zhXDIbYAa|a!_L7V$4FM`=G->Hm=AhT2H5F4YU> zM!yJ%DKkQH&a*pdeITteJ)X#bZVjhZRw(`(IWi`E-r}}&nhe=-ZrzckXmtbaofEzv z+N<)wAO07hIHE;wW9tj`8e0NZsHHJxttWT>;2J*7dcjK1u%#B)FfYda<)V8WCA;iD z(kn^G%pJycFtD;$%%e6KI=eu zBfiQn@@=+x?EBsPISGPUA<#ex+8NnmHS4;SdmitMsLp1ojpW|NrAuBuLwb$iWpkj} zY>ii5Q7+oj@8WJ?HfW|gYc6CXtHBDJ5;ypv&^es}B<+O+ zUjj>;>TKqQ8!0$wjg99{n8`D`f4r)8(>k?DA1%Fu0*ZySrk*ah_o)A<{cY+!ABzBg z+adC!5`TEK*yYaRpbI~P2h2NOO2)jM=Ra${e_1j|9>;}O`*^G&v*2ushMk}O)UDx2 z-rELLUE6NYErx-Bn8`qg)3Dc%Dsv3gzsw0&(cX*wd-G7!YR~`qc<3{3NRRQC)h0@> zTOdtAgq2edV@%oRvwHd9ozfFexv3cO9#5dwP)7X1K)Wxllqjhj|%g$5ymC4*lALh+u+yVzR zIOz;`IBctnxMOX*v_AzHay6aWFBqCWc%hQ#5q`w?@<+QxlLMEkYnycCN|VIbd6t0f zH1CfVZ7cY1;-73h$J@xHx(geiycz=PW04V=-s&X#R93{v?uUgaUyuFsKnH5k-xJo^ z?9`QU!yqDRHEw1YIhe`-Y--J;jcim2g7sGf6tW{Iz1Kd~($?bDD#Xxav*AChMLrbM zqn{~)AH{g|3>1fNI8AW%-B8Q{w*0qO`en~XE08kQb-jzGU#*FN8r<;te=ARMGNum{ zGe%*6EIsheIU3n}$Vrv`Zc!ly^wvqYp<3n7E(!M;w%~=kGjZ*xdLZ_&GC_EsPxYY9 zwg*CQP)C_4oVm6d7OUtOOOVGZw7qLF<_J2Vq%@Mrr;*++4w$d0V}AY4B5td?k-Vna z+^;XZWu+*LFNANXZbJ{BRXr|AF6Pgr@y9{EdRb=$)4baU)Xo~vou4e*e^LW474>d>{cLZVigv?T8k#eEGFm>MTaQy~k_4 zHzpIDCDL9N!FH&JK&e|S@ZH6nh&?)n%|Diz0TUPXo_Ond{iyx%a|#mxU;l+6-hCL(uly;hxtAg8 zF7rvLvlb8nH0r^2ra@F%Ivg&8vPe(+D>~+OP?qTJPWR6|@oW74Kl84LN6x7kd%uA= zhI=5Sz@WW3nKz#aX7>Y>g)X_{ZNyXLQeK-_Ldcw;Ep9su5^&fTg${x^s9ogwjT* z0OH^G0Tl~RckGbgf3VWRn&nG<#r^aK4#dv>52x`;R4NIExe3v^-yNf%o ziTEz~o8PkDXNJhBVaJdL`pbvJ0Kd=vq4SRI+H{rX?Jl zJ?{tQO$0~w2&~to!0Q*BWt@1QDn(=*E`RrRB^S%l0UmN z+TJ{ppeQ{kffcV7vTVylSmxt-wkrF#L19Oj0-QJcT0dmxxMs~xgW1N!&A>tSgAhv2 zxjgcSaI2y^<<)~ACUVVP>)s|}ag9Kue`tmk%Fc}Z-fmRNP!!2w&xHWf#C&6EwV=U~cyoiwvJe)9ftxA$G zkUs5dQU@nty!5Ox*nysvs}T8!CT_QoD+^4JBk`oExXCC7E=;m=>Nk60$6J12C|L61 zE>9Q|@La6Ghy)+KqH`Np{we%mxXb;x7qosF<18PJe4^>Fx~#$kPJQOWOc0hXGIn}D zwgFoQ`NK=}=wbd};P#9mr>Y{kFcR#J_w~hBbi&RIm{?iYQ@+{4&q<$-tR^Ag6dwl= z>a=&UO^^RAzIJ#?PZpkeo`NyYt+&J48Z|1rr=+1zRevqn_rA+HBH4V%soff}Q(d;W zS;0d(ctD3)>Djg!d7^0}n;$GP93M?S4lBX_9HToK0?U6{zhEYK(Pbu)U)bhgvn|?q z+P9N;OAbi=V(v#f$%#U=bU1`t1jN#{$^`GnG>%mWw*UIszgh`I@L9oKpCxXk208xHk(E*K-Pg09L~vRHiXF<@V}6z3~T3U*E>0DPK~k|ztJ zVoXg(=6_%?U%`q&4e}d72jos0c>1~Iw(U1gE;KdqJ^awBu}O{sf(Hx`3wH(Z0$@Cy zGqRlHYa#K+#P>9j8FCAbR|GR*Rt&DZDVN{gpo&nsDojT8f9$^*wtcYv( zAmf=)FXU+U>(r<5!F+EdR6;0Fm->voM#w;9H18^7((6ask-W?3n#mOB z5KsS(Yuo7-s++&FZ#w>*<16rj4Eg)X9M#>k(dLHOo{d?+`_Z5;P+wv3W4owrKpy0%(u&QW8XvGgCB}(pgdyP4cHzX(mYb<&4M+2{6ZL z`=PCd!{kQa?u^mUT-noC_=aHJCZkyYhVloxM(#BZ4&|vdpAt0 z-W<~Gd&*Z(0|=#Fztc#u@Jacb9)B2MQ~iD${*MDC7!w0Kzi&VPNub`MS;kb-F5`rT`+WD0rOyjKCQutdq zt*s$C)^zc1vD=b4%eYbm^rD7X+gNVhbT*6x@81fhZ`4hm`vBPgh~d-CS`d@^4O@c~Xa0zIQ1yXq`;l0pOLeUF1xhS=kyo)4HM*8ooAgnV9TBRavk zD>AuAa=hhxtyE%4DF`GlY-)aOHaJIqxO&(UIIK*AUF-h5bMQS*7}-YQ3rw}Vk`Pie z{+FeJQH{*fRbj^Pxan~8*N+dj%BQsEh)(&?p~Y`WcQc)s2~&yqX5SL3?nM>*%$S+* zcQcgG=M%K_x5|{N{}pT6@kb6Ajbc<)E`D!5H>MDK`}Pgk*1Ui#mn-s*PPheX_S%i6 zU^Q7m`+A6g?RPjyK$l4Er5VliHB$5r3Cs8njh>6k~N z)rt!;<`t!U%=gx(Twi+9mw$5&+)t||>Je2ZZGe0YBrN0O7GhO~Z|1R){nEDK@1-e? zw4MM{1h{2?+mG4_&lU+^?}i222WaVru`+P+(~D<7CsdT$l!(UTMGVO+C_f5jRT6gTEK6C5_xMLm*mlVp>{!qH3f2$E2Ik_YZQ zMIQD}W$V1*s`L=^RAB5mAMTkR?OybdRg3WQQR{ELd*eL?0Wy zS!Yata>nduI=rH1_+Xsq$mox$Q$ODf+QFW|5>GQghi8(lYwtlAzUsL}SpGa#NV(t= zME<#L8iT+VOZet!hf|4i>eTZFUAlSF3}ioBBoG0-%+z`4F?s%3<{%|qo^uEpCy66I z@0(L&oh5rqW#Zvzz0NW4uIVW8ihac*%BN5;!!+3RUKm;O1xbfSR3IU#XZ8I1hhDTQ z`E}7e_y^EWMB1cF{W7Tl`}Q8(-a_Qx0=K7A zPu>u+5|W#s_JwEj*~s(PSD`J6;0EaG_)hRO$>>@;MGQGaiNE&%#(*Y3KFRPREv~V? zndhc9r7CgIx6Ej7R0=11tNWdib%3XW&T@4yxZaHPQsrB>q2@=}<;R9=#TQ-z@m@(4 z7(n`uXnH8S>ipu*Y0VHv@pIgE=w3`xJVn^^f@N!2p7<*px{wxo>+g)x zupH4fU~(vdqAaFWp(9Xof7umGk+r;3QQ$OLIA?IT^1R%9_XF&hLmau}H_1l-8WsR) zi{5W~NL`o+z1%uCkRsFbYa}&#vFaqPVp=F zf=xoGm#2)i<>@e*ii=}cI`(h`#WIBDa>QLd3S-Pr9?;@P_3VsbHU{%Hn z?oK@dWbvkozWB3XBxOrrb)(Q86XXr`+S)$sX8X)?ZLz4uYA-2zTWNl3L9zzC{o-z+ zieOGZIG7LdxW;UL)~^pd`Cg4m2-G{y0d2b}KyCaFv+F0abLwHM&9~&Y;C(-djoAgc zzRWPRW7E`m#Q?LtXJhMwBZcM5dzX?nrNjhAu5K8D?2yL9;XrtpJ7F%DjcHG})HX@D z>}9XVtAP`KNcRDX&M3lT3n~xEMje{BEc%;6>LChc+q}0+`a*ewRRu`X5R^xdkxXrh z$}EWTY9ezq2ss)?1IT>}T+|pr2{my`GD`&#{d?kM4zzu}(3&%IP0;S!+#rG@zTd*K z%toR-`W1uFWD7xdVg7;*+=`47va8{ezR@kAZ7NmG)`gZOBE(XS_d?B#SbBo6tmROs z;BDm$nZD+5=Tx;!rmI$A0#YK2bb_qAb@mPU5~lX~YzADxZK4s_zTIpR0n@;$q>@j& zT?%q<+PS04uGB^fnO>=kweM=95OmegZ*Rq^DNtr z`$jTj-Y(O{7pHrkbx=ivdpz$HT9WeF>^@GiNbl+U$OH;>L$r;YSWS$VFQ-7=Qye`{ z5xgd03l{pr`NFwv(r<&(%s~0ot)|9&Q;c?lK5j7xjT>{7`Sn@E1A1OBd#E!kW`FR# zXgFE)HYa9uA#^MAAPKmlT?{ecy=8guQNAt+5>73tP%Enik>{lDHj>Q-uvF&}Kwjwe zTxDZ;Lt_nXG?xJ3;AO}w54S+TYp??>TkwuXcla&6r{*a?CW&kOg|H^1n+CD{d+eP{ zfR^nT@_nytF#5)Z$51U8^el6;a3pF6FKd*ojV7yEj4}B-kcYAg7j+J2CcmSV`*Hj9 z@JXR%qqBvhYiAV^Kn+N8)$#<_-hC6yQgi9V9vFjENFJ z64Z-bx~P{Ntc2aPHp>*OIN0yX{C9~eECshrnvE>fdvV<9jmy?Z!_zFbOYf9WOfJA+ z=Dz2)0qg!BhwvfP+6MiT{Piu~GA!6}FsI`)&f5Q23*vO_%g6Pjt=x%*)vJH_QA!@l zO}K6~mY7R$Z6jW(Jm!u{EaBbLs3$>$usOK&xJ!2kc<%SqO1=j-9d(}2w=8RMsh>$l8-I0IwXnUJ2x#}N3V$j?stTD(}qInxVvisLovuw2f z)a2#5!Q&p~lbBK&(CQy1^UE2yUE1Km-0noM>D}#3ih3&AmwlI~2glr(*i$WfUv%^; ziJj{^9eDucA>LG(8h^qybClDPLJH^BB5`-JnS3~zZ$Xe({uQ@EstwPC9WFRzY={MI zyC{w%HfTf`jEi|M?Kg_>Dk1;$KQ5~V?sckmwm3~ZYc%qPrTd4=)yY(*j1v(28@$c$ zNky)|c3_d9>NJ{&{($L8o3>%;#v8`AwvwGQsT`y<2yqnXo%k+@>8zb1`9EH2muK23 zQzuU3N!mOyVACIG&p!F}!aPyv{s9;I3yHnQa;JjhyHK+H&&LMjQQT#k438c$47cOD$P1RrYR zmr9t9eGmI%_J*nJ8a}`1eB2J=2_O-tpHS1ztSl8;u$vbpO`g%iztPV9 z2!qe{7}X+w&bX1w1sGs+a74{J2zwB1r1z@{mTx0dfLL--lnDt2)A#-XB`1;P8}#967%)AI zi^DcYkWOV!rKEVls;|15;?l(DYc3b|J-CZWBX-u^x!b=`8pYMu)~#+ETN~rYuuTNLg^M{*W#3H!{N3s7DBThA=tyGOBQ&~P-|NZuO}t+7 zkCfJwKy1Oda%gN}pk(K@`HuhlLUOq2cGjp=gN{zf-I%T7^F2t*j2TGt-9mm5o3R%< zywp!?=|7hZ_ciWG`C``?T{?1zbSs>Vvv)R$^d*~Vtii3tzAR05QHP95<-|wy*YwUf z%%6Nv+*UJz$jdMB6?&1*(K%1MYl3O?*92*1#TU-+DqwZ?A4siZHg1RC`8LwY8qPET zv+N$v2gRA88`|Fb4HK=A_q8L#GrSi^9nuXiK4qR^L$moHHgUp;UYu!WN*tL?mixZ< zE-U`_9ZhklsU0L5MHnM}y-t}|r1aK*gXwD}7e4GXMI0?8y<6%8U%!HzUS_$%&A!T5 z++kGTe`?mGLicn=<{meC&;N`WP{?VsDC^H37sI5<;@IJ+2>x_j_nv3-0yKh1ejzdA zQ!Qu=BBgx#0{}K7nzH73q$b@GxwFGp{qfIRMaP#w_Tl&5)zVqL3M8=`gEU_=oNqW_ zu5%?iwUSxr-zIeKD}e}m>%MRsSOf2#BiYxxL2$IN9aGrGHkfCTTFUp#II=K9PuXlw zi4OTu4hDcbZ}!AksUUuO_ux)$9#1cUw9C>WP#h>VB*(&9{7J3)=yOlKuB#uK9Z){k z91*uL?AS-zK_PbO+788Dq=7V$xZ(VJe0^?JnN@RX!0CnoFGMFir!+tI)@P)%IB+LQwi(EV{Ltas@!f){?x z4%i*~8WVEr;%&|5YB_htRRI;_#t1x^rmyDC-Mk5-`_+Tc7OAnmwwhPswpc4tWrGz> zky)g5&nt*&3exg#r4 zEcY;Zuw+{7mJN_t{=M*uIH?GMU`zH7LWPT?_OYN=m5r9~CIlgHs|f%4&cNN?K%?XW zb2moW2h18GBWFR&k{CTPf~jBlIZv(EgW5-za}IV|PyhBw@G++M^H0&f<7Fv)wXF5k zAHDY8KVbZvrZbA;)gI}8bSGQY7od|~a3Gk?DR(&kmW;j53TN(xPzo>u!_=7w#9mx0 z!fm(@Ob*;iuM2a}OEj@~22ehadiPxjDpmr~M*)=81?GsQX(OZt*O@n5^E(}AitU^l zg<$ARX%HJxbDvgv62`^-hmFecA@>SXiDuBQ|IjlC_3N^CKj`(h!q~BS8dM*4#!48r zxrrw4U$|Mhu1d$nDDxFx3!f12r55NgsPVh2icXA{^tAQcJ@umICs_u6+(K?ED`<~yuU>CKqV zn_3kYR9_nx7YE|1#pM}*>j#M~uO{+6%?6w1r%0Gi1Fn(gx}jE~FGFI#UbOW9n_}dZ z??~ha-OPV|$0=m=_~o4?K34711)PCwEQ}8bo5$H2M+H2UAJ=v!MkLgqCPsp#Vh+hv zU*#N;Yg*G4!}pTij25ZtJZG)a?T9E&+l3LG15Ms& zBy9%`k2a=H?w`8My=ZB)wP>9m96v!N)r|Jj$r%027yI@kaGZvOh;iT}$+V}S%#cza z{*Gp}lA3?dui1(I7R6w%NGBFO@Ww~AljoAAUyq;s2c%R@;C@kCCTT_- zvA)XW@bUA<$!OKpH*)-g_wr+TwQtMl&m|QArLWf4sN>s;-k7*x+4%39yQRbJQQ;p6 z_*G>cm^&;|Zegt5&&~*yHFIKPs-KaP4<=@4Hu;BVS+%;<_RGd8bTu+&Nh-YEPKvJI z-np=390JX_O|HbGcwj1mJ2+5E;e@XnDY8X5p%c?9G5?}X? z>zxxSwKZ66T$Qa z%@|ExbEgSQj}|+0RoXq%2N_O$x)#x`p%t13i{1xVW5Y-L9i)}*vvn)_{A<6KW7-}_Jv%I?f|ie5FB zOAN$6V|EWN|8TqwO4?m%_awxauj`JE1OB67LI^Xcg#cxoUG_q1%z!-cjfSjjqgP9) zL)Y^e+kBuEbZyr@_0;?sDCc`PE0K(N{0^YIt%IKS36lC4^{S zuu4oTgP)|_j8*K_z_nmJ5b;xLjdSxnRA9)aP-(1R7x$GE zOzbVU0l2Q!a9rOUWnndshsd3B@Yjyx+~55!7~JhH>xg37V7CoH$%X$QN$<;=BW#m^jfl(1-6b^X%1kN8y>Ccc2*L0W+iRKH(Wxg9 z7WjxlF3v?rATmfJab#P3&b0`i7n*jf+x3x5?~1#J8<7{&y*XHOul5PcS05tRc9*3C zxGBr59NSYLR^@(OenmYoQBm5S{hS>x;pAl$iX z19}6{t78qHrqaa3fN@9Gu+2lA9O(1Owj7)u<;E7FRKGY-$#lEsI-MFNgVHzG;DFABGQ^b1AO^+C`;jC-$71nd$FhRF=r-xrxy+!rE9utto&q zSqu@n$>U|N^7)HM(R{j>%7_FHIy_}i$QBPlfafg;;3vNu!bZybC26QU#iCXUwPFj$ ziKm^MKxxV=etqUf0|T2Xhl^3UKeM5Y6p-yI4)Diom$4#h#m~?Om^#(|aV}lZmII7F zSPh?=l{|3ROQTx!r1dx7wf7&Ncy7B8U6di4(~dC~BELtFo z^zpz{i|dQno2E9TDTWn(_DF@xaV;mrn>Yug@J!RP%-)Tokt$pB_Z1HcP}TPwX=QQ- z`;UXYCy}SftU-D96zLV7YQZYY?OS;;pb0mn1x_5^+lm7rFH9Xe;*PEQ$qZ3!SZ{JRdswl^~n&9?}k2_9lf7U zJrvMEQ|cfGO2cC&Od%eP3BIB{$l(FTfKsPtfuD=I&tIcuQE%Gr`r;>JBte5)78S6l zjpGJ-@KTNvM`OiLXxmg&SS>T z*kINHSHQ#1EK3ecp>b8O7|}41cFvJ>6~@=#yOAv^hJGv;S?YV^ahd7b>{z;bxa`q4 zmPjhO)J?6pRHbDsk{X;hcOPBat7h2D+=jX{ z5VF2*PB6g9C$^<0a}P|8;i=^h80*r(?_>4g#psbeqpvW`v~Y@_sH6)5WxbC(_jbquryRKZ6_}fOQ76vXsLcTcLx& zBS@VFB0#x(@Nkds4tM*F6k+1n-d-FNb~sW)GD5_V*Ni@&)tT;#AY>{?RVwqRK2O-o zD}Kx@3RmM%BU7ZQ(rpe7Xe$m!CFqU z3eIk7bQMZt!=~QLt_|&-@ll!@ce;f0Ra9?#XxEjHdE+vH9i*2g zM_Bjqo>YW!?Xzg{_tqP&p`Yedqj+AJo##?fj#cvf=j2q<-*HJ(r4hyC>ML5YM?=5?(C)SY6-QrtSdbKco zB3X;sK7PN|{50&P0IW^vv_DZpAmhmCs%S2Mm4bfEER{4P!CP!9Q26=gAK7V!H`^AD zQ-=FL-^oSL0-wL`sh!>NA4p@;6#LxkvLqC&Qc+u!hs2ti_F_!K zux`r6SUf%l?qSRJ)X`i*&D)#io%J4HrO6EC(7sK>UQC=H7NFpCX?wOPzSmUha#{vs z2}y3{l4b`WZ)*u!l#XBl(kyyZh0F}Elj+_1e4j8r zqidU0Xy8ZEPX6ffPKP9GMmoh{b`tM3DY@h`>|IJV(rQ%Z$cb^|X>L9hU;?PmOEXnw zqC5OX^uW|YnlV7C%?Zb%U()W1_X@i)SHA!h%;I5=u3qyV{F`A#A33coj~X#@4N)+i3h{M&b$%2 zHO?-1D<*Ui8xWL@#YwHr1y-@uF8}eTxx!M6oYs$Pw2no3BJ*muOUrk1PXL={a8IxEL z#DF&VG!P5LY)m@(;Y>Q;53SG0xs93iD`OMB{^GVj*b=_QvAcm^zl{PqZMqI7*U!42 zUDNb-n};QI-I(xoUUfFQW3rz)5FTPzs_!p4%`-x}$LyG6bBJ8@r$cN+*m?RN8=J<_ zUQJkxpnaWM0L#{Ses(#Kq-8&>BD?{g$ z=T2b}{!lP5A?jiC=l!0$wjy?u&K#bUaxTQF2a!jyTU!NV>HZ>$3cumO*5m)8FS{ycV6&cR|n+cwc;xQ^e@knPAq!ss@muj6+=G;6;v% z^z72A{KCm-`;*GTVH*?H)juvMJXhNnq5pkm4GARmXza_=Sy$HY;Q-w{el**LMo~-| zrQ}VJmpnhUM~G^msm;&`=;i@Ri9^?uN&V<4{#>rW1~un8UALV4Y-&2ATK_VR|FR7k*|=e>(Of){+Jpw#5qN0+yw zJW+s@d>4I^h%~V37Z@Yrq`*MRQ~hg>fv9`+*K(!2o{C%6Q}Ef2?U`Dp&U%yVc1o47 zkQ`Y8?^g@>dFHf59m^oNo>_}k`32Ts2#fIYW9%?t*O|J5OFPXaN?r*?6%J^Z{k&5& zK+7#b*mCZ@D5Z`ZImTpt7{7XJh~ksuz`S+k%V z_iKT)PM;Orv>v%(VstuY50G!8?SuZVkEtR7;~U|F{sJ5E=Rkb8M6sUOQD_h&6maO6ouNlV4lRDPtew1bVBd^*MJI|)$Fuy6cmb|W3n+?!^3}dG9Zf2 zSPv~OJs^^|$KzP@-O3DLMzXf(vvj_@GS+_WhFd%V0j5uIV@&b?>?uUN#Y*%H2=DYq zb~4;QIg@oQ{<&Fb=Girkf(X!{jPB8IX@L|+-v2jo_?rRa;s|(!8O1T~$PP$VzTvB1 zH9w`}E|-=3n`OyN!DEl&efPeF{bO0(V9H`uB;q6~)qa01k;9nYzyKHd&o&-REqzy; zip8T1EaH;lfR9F6*rYua)j=P%|8A+@JCTI zii6b5gjJRYU-D|CXRY6&-_BwHP!;n`on{Cc#4Mi*YDgjB_J#;8x+MEm z0%-sx9lJg0CJ-F?O1BmchtE!=L~Sl*8pAH|o!65)1mLH&UL_q}20t zi4VeRm=74aT>6M&Q~QmxJ)suWKSM}vshp1Fyx&cV7Zq=sxP zFt!NVXbT7M2K|@bmF5r5ff#>Dkx%1DyhoJjo~)5w>O2Y3h|*A|^REq(Km7L^CqFyV zLVEg~zj;bK-XTAFWd&~9v{?P=ua`9-$YFXPf9kUGJ@mh+;De<|FF_|WK{8;y^Rmlh zd{M$OyAhfG1cG9H(Xz1NjvMVlBnu$4LJ%=@K9&1-Up(I3zna(%vyaN{oCWfFiXPms z7B!s3`5oeg(sh}0(3rx8d;EsnM4fm)7_@ZBKZPRgYt3d{b=(3m9)zgFUjWP!;0QY? zGkL26T!$EBIwgT|2KBjQ6TEt*_j1HK?6m}mtc&E?sjyxNDOA?j>z&a8qUlsuT>xd~ z@%s%VUDSwuk}q(tgoQN3#9!(3dw!#hcv8=or8ByX%J-}CgouJ&Ey|{B{#x` z1wcds7i;P?lbn%@j&drBQLpncvCI&LAfet8$V_nS9uR#*FZt^{G5F}<+)|Al8-e^y zU)H-JWwvh~4dMT?D4a#jYA4(sa;l z_5UZQ2XG8m6d0D6NL8V=t5qq9J%Kq;Ust30TWt%%vJZko9S5ST10WAL?yjY`HLZY} zulr-1HQTIl%DbKow)CI*YnStn-Tl^;hd*Llb$Y7m=OlU!(3H;8=X?{(sn@13Nl%pn z@XmzvOPbQ+RgVz4A{jR#|8u3)|CGk~=}st6YNaahRJxcyk!d4S#1Fp8X1&;uZ#(bX zB@UZm?^F7#*YP1w>?w@*@Pf{-65RLx!-pN4rs%CixGA`Ny`(eXJ==dFj^{^hKGw}Q zCl>lXIs?zbV(iO@X=+dZY`mqw%J2bxeEopu;kAE<*CmAE}OsVy@ap(xozJ&eO7Lyk1TYPto8PSJX-fN=8&a!zB$^-Yg5MA(-X*bIm_w zQ&wt0Pf)7I3GVH-cb2fOG1U3+pX?pY3ys+*`KaKzDDm_WQ=gAcLVK|dGvc8HN69>W z!IrhRwKrAxKs54)#?U5sA@(HyB}$LE=D5ptcM2u3cZalMUv@b%K1XdU?lras~ech2NxbK#JEcyPgmE4>GPV{b(!5GTdeS zGs@rVQ%VqdCDOMg1h7vsrF)c{T25O&=g4Oc9^G;fmznLC%nDrpd`o{9CCGn(tM?=eBPEb6< zKF!$GBF`B^Z)wX&V{gpS_O`TZpG`KjgG%YMikyXB2rr@saM=E^nERz#+3fd5vhhI; zQ;D*t<=c-KYQhdA3tW1$E1F9ys&`IE!ai0DFAEVrEYrd4b2z1VA*-^G4=!?o?;1c0 zFsKE7T0g&iY}hFr+kWCL9>7#A=U|ssed6MgL(%|iJC}_ZZY;QKa5jkVgSxLRp!hY( zJvsvQiIs1(^6Hmgw$Jdt@N{F?>e&^66bQ90ZtQmKc741Ra3(In8eAi%6h7~8x87zz z$c}mkK*ZkNn?s$8tQ;YMhfOb&hrgDTKI7t zYKs07)5t(N3 z-*w)M1#Oxd+)!%0f#)x6`yX!dc^NVKy&K_y@;crEF;)#{$^6jn+H}}#F#^NRV%*Os zMCB(Xe-*@oy>jX93zvR)y}>pgUv(3GWbp}IT(ou_NNKd~CGl_fsIU^g#9tulfaY<7 zj;i9IUkEZYO{dN==-eNJ$-BQ}tZL~*eDRC2dHJ-8lWY&Uu~@@O^KC~lO54K{T#cy1 z&SSaQ)?cP1?aIFR`o%?wZU6Zj9HDq30VN(m>K@3fmqbb&nPYbUc1_`B#cbXhMF&_9 z_=%gVlRc;oB)G$%hNHwNY{yggnGG87=CYr+6fr@;kG*jYa>Xe0=Gav6*cgV-2_rMj o*9*J*0h7G`{hmC0OAfq;`}W7{0=4w^dzi0RD%#2wiolTn0f*&%zyJUM literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/images/terraformer-parser-a57c9c2d.png b/node_modules/terraformer/docs-build/assets/images/terraformer-parser-a57c9c2d.png new file mode 100644 index 0000000000000000000000000000000000000000..4fdfa27b69db47147cf1e7c0a1cbcd1b1d781929 GIT binary patch literal 24986 zcmZU)cU)6X&^H=H5JW_z2~mnP0RaIiN|z4Odk7#^AtAKTr6^57dJ~Y|drg4Q6b)4b zqjUn&4JC+_fV6w~J&|YP`3Ic&>wKP?YKp?VN z5a?1K6(!K}B|4xI_+dq=Ss;zwosoWaUQQroM|XQCPAxaP=T1gWc8&p_15R=vke!^C zs%Irw?p{?$QCXsv1{j<LP7UR9k0L|ifB^cd3;-e{!gM$;up2d zaa)305J_(mrT*!xS0|$6Zx?aCe?#0 zuVhyLMT0(rFKU$frQU>*y@lo9X4Lvox4ReD8adVx8>>Cv2K_|EazkWUNop%fKudeewPk6g7E;{gY<%8!! zbAL{V_qXpAZFBD5Eo(5HO89$HYkCmYq{ZM1vyQ3d^Pv~vg!X6L&>OcOVLx}{EpyRp z{4r!BKfAn#CYs6KL+_r1d<%BiT;)6EOVQH(?;E_Jp~I1#6H=WqQ{CT?2dHLuzY^Px zbX1DHM?`|<{%NSuP?!hV!jm)cVA!n08`3M`^E>yO>T4mg?UVVvrTQB!m~cjw)-VsQ z%&-0`PL10sH%pSYS7Y$<-7o`^-)4p}`Kt^1T?w0wzDM77`LEZTRSapR;jGEc$Q!~_ zww0{OyZKCS0Gz+D;e(mRYWRnI&Jtlabq?aFFeWC~fvd^?d-*^G#Tuxvs{K&jQcZvb zv~Z~>vR75MKkWtS?};)Awv!lf3=*KEhK3*H`kRhNFR5Pegy4G~{J^d2XL#p}-Qikf z$?WW2?CI1utLaD6?_{#uS9)W1SoAX6IG6g|q_+o%{xw6Xk|tRt@9P}4@Bcy_YK^$_ z2DjAKRm|p4u`E1E5^uF`mg%huotwIn#-;GyP|H%Q6NdX&gZGNH(cT(g{CD#$Og+je z=+$B?8=d?Q`Ou#=weJhOEpwJ&-`Q4jwoiQomBD|OMXaCiwi(ll^hC2ES-UIYWj!4}KOuK6?{iBE zeQ*bJoyAjw8yZ1l$+!g?3Ds{8dY7PYK3jB+n3IZii2DE+4-bdB_=Yofp-XVO7U)j9 zHJ33|!o~+%_l5noZu8KwHdJz`(ZmXb=n)a?!6np)A9Hdh-#95p&2>r-rx)Igmvo)h z^=w@;51@l9C!7^3f0x9B$=(5G_W}ji zeP(O+u6)TsDj$0p>+O=p&I8Ua=$#YdNH)@vGR6&u!Gr#$FVbVfU3{{=f|WPlvJl7vke+gGwqYtMjT*vE->1`X$F~DI$JRd z9_w|VCPvGk@B|^spGP3C?Aj%*+5HQ_sEUA@4%zOV7^Y*4eKLPHX_@tD-Dl!|xj~Yx z9B6OBRr#0(ep=>c{kpkwtREvV`=xlM*map>qm_N5VcwU29&bH4zaiQ76IS!V-L&KV z@(c6YhCD65gvW}H2jrD-?kpE;`W7ke$@&sD@X>mhm#O!y8bQMqbInm=qI z+rQP^P4<&(cfoDD7YEafYNC=^NJ}!t$Qcor_wCOKsVUCP!MD|DQzhm(c%WY;BB*mM zp{2tXhl}Hy;kfs0|KyW)*4I!T+ETI!6jPQ`BBo#%HZ8Y61$f_Uvx9>EzG zxPFE1KKw)pY&ghJoS3B7tPvQO0NQU%*>o6e&X6J;zK#g0Sxku8<`clnG>-Y1?6>Wv z+(aZS&CH&LX!ys`rM3M`^LN)N{IcQP@_11G{?9;*<1|OvjCKZK7w*Nps7duqUo*cW zZB&S=y*<9a9O5*(dsF6{(!#oIoljic%_IbL3NuoA!K&+NVNC@klrboLrl-rIxE`;&e-2 z=&WW9t}xvv-8mgx&cK97Fxs{tg*l~Yd>J;dF+S1mJJC)lf%P?Y2O0dM#lN}%>}1E# zxHze>=Btwv|P(a3GT_41J4>7eLS;!A(cf!|Y0* z*(k&_mA9)kZi1GdG=qh@N)$tH8Kb2>o`ec@m0vq3ZFT}*F)x7$M-(A**a}-sTpm_V zH4eX+{%UlRutryGZ`v~Cu-OY~IDbMwW>xjNU+tIrWf#E%DnBZoTNO`CHzjXdcL2jb zRwf+xO-9BYI?_6`>v}yb- zIhzjsC`?CMW0)XldEAT4s^pdlTE6+fb}~!9;%zO=b1xD%H0+@htVA1j+MeMw{g2co zEcZcoefCTqdv5&Fl=aW4-DhED3ydL#iRlS2hD*hwE58l+dE1;fSoJz!CE${4OdE2R zj)FPcWo*v7jeF_vkTD4L+9jt}zcR5%tJvaW{ai&~k0M4rfZVlV@#@I-)&0wUQau#? zS@0Usg3gg?OrKy-#<5n-ykJrESs23>3V$5WY{Db;<}(SLiYRcJ;qF`&JTnbF>s-_& zdPUGAGEL>K)yVqTut?!XGN%zgQt5<$<7-Sg&N-aQ6?FpVfU-78MI8O(QM1eSDep_8Pv(J2gp9XvuwC7qfqD+E9DSSEor28~mtC-&-+}tcSu8 ztc#AKjq_uuNEaYLSn}_MFJ(Z`6s`I-BY!FaG5{eHpZ_wRwNFFu1S8jgW-hDlh*=mP z%#WIugo>(S`lZerQEwl?Q&9|m?^{REIEhR_V9Rmb@Uy7J_2Sh!H_+;>({kh**G$hK zIyU%!`gFWKcJcK6lDuVtl}z4pH4@pyp;)8lRM3%WZhnLixrDU{j{>;#PIOIN=Zha7 zEQh{TF2cW9bl^djq=g?U#C{aIhhIDRZBv1(%ce5g}9zfBd`4s^oZI@bu^r zR-G%Gqs%RXAR!9K%jUB&<978)gtmku><7W+dl_{fJ~}VHqcH+!eK+Y$FEnIsx39NW zZQ`DX&|ao=+ZzzX7K3sv3+IOa%UUz%mKL1R$CP=4-iYE!?PlClTAKnmQJaz6gmi~2?emv$UKGDm>8nez8gXxd^D2$T;SLMr>Kvk~Le|y8?UvJs&Qrj4mnDzNxxcg?X;$@<#zZK~7Si+`BOl zz!E_-`j{}CPt|SGQFK^zcB;qV*bWw;xsfUQd+t%qr{hC0;oR7I!ay>y{(g>}>7aoW zL1awVUyXa)Z&r3@TLZ9I6uS(QzHqX6d#9gB`EA$ToNn1~PzV!}WBE`O^kOU0*m-XD zqXNPlUOxHw85rEKE`ga3ozeu;0-t`51gCBJF|}(gsHe^^+k&B_^AiXg?J)Z@iNsw8p$ zq#7y82PiOQ@h^UTn$oTrx4s9Tep*F6_yrjP9OcKh`-MKI4d4@51ZObl_nnkqYRQOA zYAX1%Yr+VlJ+nYbdaKX<)RwF)If71MFG{Sk6-n>kWY742-PMxp=Q88=cF)OUt&k}o zBZO#>CU^st;v~slZHPSlwA+5kM{H;ptS<7+Xz?yI%wuZWAny6kog~kgN(H|*@gzN? z8(v?a)=i)oBqiBX05KTi6Xr8@sq7;^4a6I2B7i z8tz7%br0A9LpiPQ$qS+s3b6XzntsMuUX1O(zEp&%nBLEV~N54*yV52yID-*B)T%q$#`DtFX3nmra5ZIm{S7Ug3+bU#Mk7SwgGzlNn;Z8 zfF=tk2I*$e%OTiP+Sfc4A|g20`Pzevt`XI%BULgn|9e}WNw@O|DPdK1;x0s4;t$be z85F@&Ku((0=;G-khNXia11BtcNj~%;+eV&W<04ecuZWL$ej6JvEF)S>qxM|w4bpaE z@my_k#1f$@1l$+T2)@sS(c3%oEnC1b5Wx(UT zy=K4E$iw>3_5kVr{CWtBS@*=IpuNX zSc`o+VyhI-?@$(pEcl8;F%O*+A`{wPb`g_?Z-^-E9=>OhE6MN?YLzX8YrNROzRQ)y zMT+Z?)P!qkroR4LJ9A4WX%@Mu0O&#mQWg@M^F*p$zhuTq%n>GC(b=+tOm ze@Z>o%VwPWUTN-!xm{gjSMAC_DwY@#tCX(|T-lvP{!**vAATXmtHY56)g@5a)Cq%V zu}+dqi>2vM`u4rvz>xNM&#OTtKAeDJZfdtz?U(Xvr!LzN#!sgP1!P5jDTY~dwdxnZ zaXDq!6|QW_5?9MYymqXpfC3@7IcfFNFgrdT%-U#zLHVIIqTo_$jXCtYLS5@e;m?<; zv&B~K7Sr&i*6xo4-*=R#s`=+n9uQAkxl4gvm5iAC$r{`GmP^N?Y9Sx-_)bjF(xyev zW0Tlm?<^6`mVE=%JX>{YJC9@bF4FzW)||AWX0ebH_kQPasDR}4apvXD8yf6W)w>I;k=6CxEOG&1lKK7* zSGz_G;1*#I#Q_C@b6fKoU>wqXty*&YhFL!n?(6uWA$=d@PTNeRnS!%0QAw$_8l>WC zXczoF`kfO9s}`(9$o9xJeSZVS>Xl``B$3p2w*Ct>>D{->C^e4;g&<$AO%@NsaP1ea z^2fOv%Kg|=&K?GYaJ68Y{wEwv5m*-*T382uIEvB)2ZrbF#O!=k0awT8ka2#?ZA=bV4iK=8a3UZ$t`of8T){nq#aR>f` zGB}Vl1km@D#qV18i&tg0Noe_HG1EoBeG7@vn5xjUk*_fZgKjVO1R`i^zNq_9yDqqF zBk~dqF(?uB=V|xu0F!@PB_H}X88R7uGDV%{MKVyf0|aW;F4&c+`)8iHfXxPA&pV_e z^mk4g42CY_B8`5P?zD3`N^J0%_|awvtx)P7xsWE#0D$cN93e*W_efs*%^EG=w#7DJ z1%m#aIBKQbBs{S^Y_eDW7+7@{CyNN2^hiGblA}en@Fe|?Uw_0%Q^e`V&&WG5;jMEY6hifB7G;8gi%2+jf8O+J%R6=QIfXx?$B zaX3@#F9(d`)W6@kq1Q>H)qp2{_tq}D3@OAz!PuM%v%dzu=5Q{v?S<9Jo#$;}{yZ&| z_MM7F`z=BcT(NFqWPgWX^BP(3agqw@9tAh{>xNEP>=K+ayy!(3BNGHDQ?6~)gK?3s zGra0(rZ#U_pJ(??c1r%*q_XHv(Qfluc?5{I0R|P~*U_$qQ4(m8uEzd-E2iBxZoF6$ zrn~C@N#X++^d8R@fvBWwnk?E@gPjVFO+`LieHCQclS}hbzoJYfZAG|j3*LtVcH|!- zGl7pbZl`fLC1#3jqh@~76Br9U;wRTFx#y1!T|Xxpe2w!?q+;=kTW)A#o=Li?DQ!2c z`TA>yS6?*T_sQ2VEPT9% z1c>0LO`um&Zfde90ZPX3rAEJVANubtdXZ(;jjLZ?Xlt@G4rQfwZ;Obw3XRl?UFlJ3 zHCV^FSyknkC5b5A6EYTAnf`4+_Z*c9Ktgrz_J0H0M>f84khm}9V{02hb0eon^HMR* zsE)wI>iG4nlP{E2lif^xQ65}=npaOzGKr~57?5PEY&AenR%j=jl5`12QI1uK$v}F8E z7+qAg;%xvRtgoD})5gr3+^(B6`~HFw5qIa7v*?{_-b3KfFQ>9F#$FoV&W8mV11oe7 zpT*eXbAEgMD5W6OY{#ueR;9t1{ATptBpo5jh?lyt53sRn_j`_)*;7}=xS*O>tF(!3 zkMC!rK08{GBFJl#J|lR9al^N&v|fMxtJ(k0BuJJMsu}a3po`rh&)3@^=N*!)P+Yfx z^Vz9htu<9oWY5)!%D}mI4I{x?X2mo&n55n28317*KT&YGLnnRx;dx=D34F3SpR8w| zSZ=lvxV;i(Ka=xw_#HBI+4*_JnshUz;0zxUTEw8RoiAc!MVO`ZblDpOl?+P>D@0k+ zvoCKewa?-bsuk}=%zsmovLt!o@ml> zQ=)t3^X?3t#kH-5KppMY#E03@a{amqO~y{E+pwL^_azSbz=rFfGup?$dQMt3Xoxnd zwI*J*GwqgGBw9#gFBQik$;9tkIXHjBC<~IgzwzMGlA^JAZW_P+u+jT}Ud}vNs5J&H z^oBV%1$@M`-5GQJth=p?8T_e>IbT!@Et4&ZE_RdYGL>Y%8o0p?-_FUHm?Sl_ox9JF zd{yd9_R_Ccb@)V6->x_e1fZ4B{o@mZZe#i28jhWw=!Mv!J-*E)MeSr;k#{?ptVElq z;Y>uE&4KGNyGH3X^y7VgLfGZn&}JWB-@wG{Zf;oiwE9jX)^cpiC8+>NPiK+keA(0B zl*h&Gs-6vqM%DmrW9b(kogQ`EzMpcW>_=FK#{YFCeeN`yvC$DB6C={6Y|$~28>PFM zcRioji$ZCC9NZ1T@6%PL7G%Q5fBkrd=d~8@T2c!Vl~eVsKzuVid0O$2=fJ>!>hWuv z6x!`M4glVfV4eCH$qGn7;L))r3*l0u+bek7BeD%RvLo(>2+ybbFdsA2q0LR(%Ip_n zI5kWd+=|nRyP9lGGlE9zf!s5EN4%?K10}hp^f7M#H9rW{Uj#3r^1Iv|u>Y)qaSK;tCzjLMK#IITgB z;FNlEXFyHUT~G*%EU;yBLX|L@ETAbVO$`+0=SJ|g1Cgk^|8HBg8rg=FQfn9z&~oXH z?Z$deU_Pk!|NM7$lr@VD{Z;{w!=`$WC5kAqJHkGP)^gbGDn2(r+x2YC*i>BmUs@Z- zpcEqB*2w^kk8GdbwGy_P`QYC36WZXlcjY&n4CAx)cHs4VOjt1yr8l{(e zC;(mB4>$}L^99stqR7QufuJAZ5~o!JP1psA%f*YHl4EPN)R2}7GQf|bEN=hmbnAcr zM3l7O{{Q+5UyNCNo72h>_8>qx>#g<20UF@$JcE4LJZtOSeLncRrYuKt zWC|AcHy2RTz3BzfB7&(&m(JZ$bU7NwiV-dSxn^y|#I*4pY@#_}qv%cZL8NW6WcxvF{jzev7j`mUUbiY2+!JxQ;WY-(Nejr>g0U?M>7XoXIHd#Xd7>}M9AAg|v&LK)Mo^#p@a>{`RwtKPxw5AHnxMA>ls z?#!|_y4G_%1?rqBvLK&XwBc{@nh=Hzx711#f2eJtLEPUBd2PZ?u9{J6PF!CJQ5K>X z;SrvNc7IkwgEU*Nzh-;u3xwZN>jhV4ud+;C;>16uuKaEl>A~f)a3J&+UQ-;(+DP%j z0#mkn*epcFa&Li8bS6(QJoDoUXtW-wSQqrC`9rRk0a>`Zu@ZHQR%39Y4q3hnPF}hU zSE9|DTvP;+T(}&^F9*69J6SVB&`I;dN&t&UBe2!F&kPI{0G9~(lm;4PfFz*J1-H0( zXX$Q;JPcG}H@P}~00epHPVVQjb@Yfi%TtCro@03~B_6G;ycx%D%H z0+Wb-OcGb`;_GjUm=2CIrc+io!Qh;Y6#W!1qjaLZaF^{3!u1lsHf63&%5-&dq`A=_ z!<>qYy^E)P@;3=f#gg^ure6_+`;9r1z5vni#BfIlE9Xc9qR2obdMN%bH=B6CA@cB@ zNO30QL}sY(4Vl3_~K!D1oV!{2Qsyk4c zv1-Q=NAKq;kv9fs<#8k;DoTQY%ez^-<#V$Pr(@Fu;OMGdu)=JBdA=e2sE(;`W_)UD zpf26az6Eu*Umg)u%RF-#Ze)6r5YhfH*5#H8x)*{SymtG{FID+#`R+@%+rM*kJc8~U zO+!b2q3p&YwMgf)h-0&f1>7t=^NDc1(GWd(2$`tztnfE!OswM7`^RDqprGXN`sPn`9D^b<@HP0y(y>@h3liEHKnMhu9vBVpWi{BWXu+<0nb}gAI7ry9Dy(w&V6;amI0fM%@0C~y`LKWAJo!TH(*$Hf(0=kY{!n?y*duIC z@HH0p1>C$Yo&;s_mRfZQa;Yh!zDEywYdMx!qF(Eetdc2cA>h7VPC7Q*smheK-pM-J zj|?V}a!d>9+oiM^P8)rf#MpdSC)ut$8~B1Mv)n=bYZR-`uzpF1&k<>eC54XYIDcu{ zg>;&Yb%uws-@*m%^i|R4DlI*Dm3Qmvw-8Nf1#M~YZ~ot>H7M(V^0`w$cWnfH+R|UG zdeC%ZA)V^<7hmy^T=(>0xQ%v8lhNaN3STlxcq2;WSBRLe+qU)N!xA#W6WZ%Lub;a5c4fIU+K2>R5VcvF)93XTvcI#ImXX5HzSMc`43|A*5O#O9j{_G#pzkSj=5kZCj zv6+^5smETlwcuWlaFYLoppE+{QrD8m7YKaKS)!5!93RIT5%XCb@cg9SE~$(wx~gD- z)!Xl+)jk)nTVeyelkg0c+E3Q&_yWYOjin%IEkFxl(hyqN3`t+*3NjkUAqSTpQbM9)n*^_lYJ)IA#c( zt$sjO5U-x)2>=R$zh5_}4@z8;V%?0S%S2ztyn4DAdN-1ckj|2Go@?_*)(qwt0Q-vH zW^Fu+ESG)Kn#ea2Sv@bi8p5&nx}BYj6K}suNZh9*ESz)#_ysIXQc86>g70)oAAa+qUDGCyv*{kg)@qTpM{~Do5`wKCs`R-|sv!)}$Xn8@d$jCyfW zp&C?l*LR5@Zy;qvFPsjruZf}8X_>&zo=U~&UK+Pz+Rvt9X@m}<&RP@NvwuDRNBSH? zm(?6pB?ZwEB*zKIAxCJ1Uai~75l^PVRsN>DHT*Ysk!pe5Hk@ovKn>5?MFUr3?$mX_;f`=;0TIa$3_(s(p)gA4y8%juZ+DQL$s z0Env<9li-LSp=OQObjLJiJ~iSF{qZwy&6C5dS(w zqy2~2#H};Nyp>vy>@(QU(Rx!$UqzFNEKJ!+svMu#q&l96gBYJ+G%yZyi|X?5?z}Mu zpliFKYePxjXq3E8+ql5#RZ)M45};yFaW!!bXOW4+tARUxPt{xhn41LRHDmKh=%z*V z2cgyr6gt2(Qhx~&4{cd`B9(n_N+D(c zi+bykT^Zn_IsLn-Wzv+|{zZ!g9d(?CcNi?^wn>g$QxT-( zGRxQCTtyC1(6R=`_V4TGn_{(ND*FJg>5__|txWl>(`H8V$2)<@4{A%Sjd!pWj=w(j zwO6W(SCsmlM=aN@xmKYj4t3;P$IT0B6t)gNHxNFPa+ClYu6O&`)&X}aBd{BzbL<-%chCG#n1 zHo@S-_@UUdKgs0diI-PWY7ZO=k7Y$$`J+6m9FJAWj|i)fO zO+7cpV^?TaT050lRIoG}-V_>cI@BcJ9V!Cixo;i(jmN)%MNYlL&f&|s1?f5W>8jh} zzxrMa2HY(rss-m8q?@4|0BV}%(s(JSDlYtG)!i4hL$#GF``|>P1LP!A=mzH_f-fwo z!@Iw9TxMM(uA{|=ZsAHKT*`O{$wnRJ(ezf*+*Xfpz>NzYp~=&nt4vRD`%@LNr2P|g z1Au=vOTWhsPQ`q_3n#$_e7%4GaP+ou=dVgfn5;)tP`O5{ld9s`U2N#aNS^=M(_4ID zyiUxuO9I&HM7IN69NKtR)WiCENcH>SG^!hK#bP*AlWNhAzVEh!BE^(Ri#4?D8S*db zXs1@`S5Uh+?Ryc~ZaX4|9r?HF9vqz|EMCXHOD@$Y3j$FG<#`)%=S=$)h2~>R*u(8X zs!q`l2(CG4t|JNcqF^%OTHNh-#B=M;KRfT|4dp&K-{qQpN&WoQq6>CiyzCXroclOL zKG$_gRGQOTNb5XX!;dK}s-)_?Nkp1OZ4%J1p)TA@JR4mt<~saQaOZ&E!-M+crI|_q zR{v(dFG$D{3`6?*bK4eX&r#x^@dyGyKvlQf*WGQwe-SUo*xv~?(#Ffon3-*{%@6wU(rtR<)uDEW{jb!3LJDNr8vs-LwqvOyy zK)7sfte<^6524lr+=^Am8hT5MqN`O#XC_7AsX`177Unc6$$#?VLw8QP&~}ZeD=)y@ z0ovTQ<;Sxa);l*EGf_jg^31B1ed3cgE_vO@3t$GSr=`n1BTU_a&;}t~Aw-MEQT8bi5Xrv~zGL>r^K*)#v z!`Bibr@`Z!=WK4~ZhP&sf4mg;-nX*nvz{1|ejZXf!Rq1^2uI;_m+iKrw%zxsfsn;( zmgskc3J*+xbcYh;&jd zEt&N9(;t^lbWUyW@)|lZj{oU#ew3*`NDkzojOk*wS*AK`-y1tHz;64bpo0`?_~Sha zG-tPtO#97S8!{L^YmtD^?qfCr+jXaX@|qBLAaAd{WcIpwWQSnfwh9JR zljhbEH2-gBZuw~2r5$r(K|8^1sSSb%kUzYK&)e!KF%@-BA2qkA`c12om^##&b#)k3 zs~D6_H_JDzF)hTD{qC1RUF4}7klx{iL#ea6^EJ2+yp$BU_Gm2wqk+)b7~+|#NG3K{ z4*<{!1wM+%@B~Tboy)UC;I-Eb55x}Zq`tmxLDWzqmX!8EnP|eo* zcd!JEAG65TYZA1flkSmEvyR z5f?$Wp1!4aHCxMB{`AV0i= zuDNE??7+Cpx7{`6Gu{e@x28PGUVpB)>|dj?FgI0CfLrx_k2z&3)9DIIzTKAM#*#OR z+12DyYQ4ZyUnZA1mCSIXWF}94i2q61551Bk{$HObn9Pome}dl(fIvRiPONTh+zrHP zNQO$YOh<+(#{{Ox+Eij$1C1{U5)nwxJcj2pAKYk8=_zjK?TO@>;^9g0&*0IPXP6w> ztxAU3i7S}S>~o>KcxOcPemvLXUV((U zr=uLW;jXmP-^LD3+cdlZvTte_;m#3t*BxGLue{m5@yl_1G!@HDfrY!X??w%4fLLgt zC}iS|VY*8z|2_}vN6{Z9Q+M&>gTChGjdv^@Qk3;DKs>zIvd3D0>^|39qYR>na7bOb z`s8fx=!p61gU6p#1cxLI;xKj$jx*L6evh%x2-SZJkoGH)r-*~ZAJUHAL2u;Q7M^7B zLbY3JQi#`tYfbJaSX`2y=seba-EBI%c;p?+{CFz+o>h=$0M8;RMD18EzG}{@_;BPR zCrO5E>cFQ^{_dj2oXPAfkAh5=g}^z?_JbP;-(pzN%Tw)!2aCbTju7LG$3K65a!e(w zH96@$GwFb?&KF;wvZ+3#!{*TYosQkqnP6W=7(??nHVZEQZL94yY*#($=fQFy&udg$ zN1sYjX@x@Wwb)>2a*)r}Pu|eR?>ur656=$1KX|R?=cznapK+Ue#wK9I5$3WI<<-%l zM_{*ZbVOZgjZHO^n%n#9ybUG2ilaYw!uG%6XbAA{+vu_~{&`uWwT8R8VfdKGkgpiV z`hCnNRiq~SGsPert*eB|iMg`BW-iz5X)X}8P^E&N_om|u)v9}3a!gCIR_kM54Xxfg z3c^}Zzd;Yv-u6zvtF04qoI@P#^i3!nb+F-{-Ms3@rIpG`m_EjWnGyiDQ6J?rGQY`? z*7K(pQLd|s78Or-@`vgZw^B2`1A{axR4@m3SePs@2Y>w27Gc^MeaVNHq~Bwwauq$E zrmDM{`J4pd9rQD}M3q}>9EuY8yVQ6LON(bJT1R%l57b~Nhj zBa3cmxP$gY6!GNvgLaEfv+ek!b7+!9(2WVf^Vpa`zJvN+L$kP!LU@3N)pPz`@v`(u zH#fZK&+Wi71Lw}24v}8PB>Sn}xH7nkGSSK*g%C5p-U8R+fDG8bV=faq7*O__6BL6c zrNV=XW4DekjpPYQ$8?;T+Qt3)_SK)Q7Fl>Fuh=oDjZTlM^$Nzpbf)EZ$a^Em70%hc z$SRtjlsbpLA4?gKh6+z(R@6JBpm?pA{r1xqNrN^ynxaUp2Sq3u>@K*`(FYf4#Z<>D zJo6rhnvfmW4ko=T%^BGD6>1Z*PDlUx*YZlZdgbM)lEN70Gr2V|P~~oX4R~tootXyEPK|$W5uy{yz^L!NwTNWm;1H z-+Eke5q9ESGox((APYy?)T&GRT-mtBK-D7IgSu%r`jKGXN{UDn1?292mAy^Xyl9ik z53Pr0cOO}JcGy4FOKz!X9Bx3meRToTuZxsmH(1-x=*AYy+4}<9iIG~%*Qr|4dhjYV z8@Ci%dl?qG+sIfr^A_EPbgqO@_c_ZqGM8$!ZZte>+~Tqp$_c*vSuu^)z_VrX6OVeN zE6&F~U}}xgN}&3qM+&%x_6A}jVrJM0@|A!fls$SG!S&i~oo-J>lq4l0%Bj!rKJ zcIQ(7#~fmC2-@^+PLP2hC9{vmEhF>%5eHGZKcJ~(myIMg5;#p zlergRZF0}QAvDxVs2X)OF$W6c>gR!TJlU%s8N)n)>-n??71Cu^1EYPxp6I{kxH8GZ zA2iZlBiof@{c~phkwl~0Yvk5#8(%SAoi)dr-&+giH7l9xwH<7=b~oIk?Zrr@3~;RAFR3axc&W(YaL{7ZKS2pq}<$jY*owD zz~BhLJK{mB17(O^+3vO~2|3@Cm6{>k6h5vsf38!ryOhjpZg)$J#oT(6jdd zMRzsd!-5#_zJ_;rmwC zf|YkV#4Z25UfqS%zx$%yG=4ti%)T-6kq95`ko6Ik(;vJb`SbnjIOfWoxyw7#ap$e# z(?MEevnL1OHe5AIX0HAd-jZYX`K;u}uZ~nK3zs5N{pmb;KkVBRSDBsAqKR2;hn+RP zOZ9x4gQ~~H6y&y?z=#I6>a&trTdQsMq)STYM@z@QzAE%5130GJ+~t1sg-CfzI9J)A zN$tl0XPSDb!yNHn(wYs>Q#60jnG&;|#a3k8!pXH@I8enwp~)Z4PCN?du;9)nl5<+< ztmGLj4&b+4QdC|_Jxe*to!{S3J4Fj=ie2!48!4}OjGH4Pu4s2A2&i<4DhpW9K)^*L z>tOvW-AX@jO~!!*VWUzq8;DO z#s>Ue*(a^FYo%+uJkIMPzKoJ-o9?#-`^3&g8GNYpZj~xnYFPRc^LNw;a~#g2 zxxb3Cl)di58ZVz#iwq6Dg?WqMPvh*HAUzX>(73={+9P9gtG|c9F|tCh{A?kT{-}XI zSQEj5sTK8yIPdnTpW64$v0o=V-Gq%B5<&C5Axen6GodS-(386kq~v4@XVoVt;2kG& z`fke171%fgTfxLE#5s5#g?!{C!&@fsXr|>WAWf66+(6V-yZ92ula@7gvOOPxdfbGS zC9i(9x*G6&H{u}Mge8NA!%M^Ke_p6;e-FO&H{SG0o$j;lx7TX7wTHDNM++lpe9~I; zj|@t#MXFsoMs4iM&Zhm5@*dLd=q*ju@sa|!Z~v2Yu|4>9V9nz0tp@5DMg$s{TvJP| z9sBv!cfocqB-9j^|M2SokQUpUJ3s7f5F6Rvs0UO7&0$14%PfBPU}UB^Ifhy#pl>bm%*rRjx7r&uTqcU!dV=;DDt02Cp`znQ z)eGhn0IpPSL}}5YDmSkt)LK}zJXrrG%ws5J4hY&7i@wyZN@Qy`(qjQ4%Agw}&A0yN z_u<>CS{J?oSHOD_DiBb<2-N=e2rD!jQGx(v$Mf%Ubx{z|))UG1J%a}Xv;ptKJZR`X z50ZfZ;GB%I>wgL2MTp@sA&i~r~=lQ>3fQ#Xx{r`IYzlZP9_&rl+t0*jGwpT@; z;A>J9t0e#mTl@|r1P@YS*MO{`!i#xPILaq;nx;orb12>XZ*n%Rr&@ObhJjkz3yz)h z0A#O*S%_SURr9}zX?CSv6y|~!o?Pu&xg!Fs5`{J}P8a|fLg#>$t}CCnhImRmh; z?sX>P{BJK9e)z31abHFAzk%bLF8|k0Gq-+#`o{ln1aBoE6JwBueU2V@&v;|?vm33B zd}z5u0fst{h34#4^&jRXEsu7QJeC zQO(W6gwx(cOPvdp89ma7-ExIXnV0+;(h|NGW-;@@L}TyGoU12LERgY$+4+xL6wEWX z1)&&_{m$_fz6r0gR{z141Mm$Zf|7$E#JH84#O@?WqROX(@Ak!~6_bN%@=M`Xgq_O! zTGC2r<;k59gATW$`wFUn45fG^j4r+j(+#~x@J+N&^!x+?CkiuJ$qpb2e$V_uNO0rd zH*UqzVW{6XXcu~xfQ};X<@eB zV%BQ|pCx-DFGs?*-A6ouC|Wu5{+kTm*|g$Yj;f8Hn}{CAfd zH~Nx6h89o7p;@}77@%NhtUcY(*~L*IWh*wO?6-5oMX|E4D(oV^>?6#Yy!^q_LU4%y z{;^|F_@WGU^jc}Q)31YC5_QP{vex&)YJzY>z)k+P{L{*;inF#t3adv&#=Ii z%*w6qOv44=wL4hu-1(l&cNf*CVT`IXBU31$}=CBtN^tHspy_9k-2C_QSLeT$Cs_3 zBNjJXEZ4su#U85HosL;%pV4(2s}j!aYpN92C<&TR(T|*su`V%ngjv63y@H5~l$Nd+ zTdxB2`KLZTQp};#X~lmV?uDcMstwr!BGZ8a4mUlWR{6||R`WHIlph^XV)jPFYGcm( z)tdfmvDO!BYrTwJ5V5-N$p~s4G^#!`rz?L?#=3#aj~;NCTS1=+@fNWT^4%P6Nr#%$ zEtb4^=K(Y)?<{fh7Exc2eLSFU@f)D-L7~Hcw&b@A|LwvkQr%LM5vfsz90CNRM%pj` zoM(d0>x6QA7p@mw@cWUa@74&1zg_sHJm)&zS%k}P=Es}96e8V1$HTUV<(lz3QhBY?QYt_diS)^O5 zWE$N>m2b{GLJXuu0U8KX4BJL#6yKX^q-qfgzEIUK@8KhBi>>OA73$Zc-xBFXKuRh& zH8h~j-ydj~&{cp8i~;-Pz6Q`zVAFQp2wo@i)DyG#gk!c#on7*0}>bw>^NBc3pqTKmN%J| zgPI9;Pq=v_vd$z{$Pwa>)(hs&$NiqUO4pXt9dpHUXqp>20y$j;plubZ>Rj~xpH>lg z0)i$GLqK1(+`lEgeKw&`y#joZjJOCE#9Wt0K-hC8YfHK_FXTo$cA2Zbi48t(R;zev z8ytUGou>h%ARQ~RD{z6YfhI`9yTPJXe78bTX?o`Hi%*xane5)^ri+kc%;PDwx`$?~ zUOxjk-)MNPKR>K1TxMC&HVBo~Y>%Jq3==c2ZYEo&-sMyxu#Cv!PcP*pX3hUl*-rb& z7Fj|#zOHxlZ?HhpJYN4=;WL5eVxMJ{M^_8KAH8(pzrU0*_T8Vi93kJV53fDf9lVvyOYT6xk&e@?`?%BqVX4VD2P%;0g>~3C&T11oQbtv0#82@8=-Oy+a za-Xr%3)R`Lfn}~$OEX$#tv85Dmp)8m;zSB(asns!C)QqqoKYyJ!2slQ7)d7Gd{&o* ze^hSyIfzb5*mo%y@BbPUz1KLp@t$i#kf21B-YOrp>teujN+0>IM%~vOy_Iw8Ham%# zLOcHc?#-`dV6$=Eu9HkootXT2G35v4>Cw$jNN^VgHJMHekfdA0!m#7UG?%Gf$o{9U z7|4 z_zWfr?Tr;Na!))Esb2?p&juVkIa?a3V=D4M(VaqrF##)EO&l2WIqK>gi*W~>z-vTpY_OhRZ_?z?h+PY0geJO@UFn(bk z!L#z#f6pcaOEVYF|D+j2I`OgdQD_q`Nto2-a?0nFqkOsTw?QU2E&JDv+;l;3%GL7i z1^~Sf0~3tI`)0VvRQfh0-#6fyqiwo4k^$bO6F`(!=<3@qjZueZ1~(q~DYHzkXr=gR zS()_0_Zj=oL>tEjPu=F2I1dEE(lbW9dX(W*p4G5u93>k6PEWrLgrw!%TRJdrTB7B% zwq(I0S@AX94F|p)h&aYN39KLZDS>TfGLWE1XvILCxdlJF7!GFNk?hYEAsJ%ZtycEv zGm$>ECR|GxompXJkTHJ!U1Vb)dY3X$zflI#>}8?y+p8GVprp%LMDd1B2ljEk4GY?~ z_weHcrUQScCByX#)^97P_Qb~qUJ7lk{pXSReMZm>b$!j>ILZ0SoH*)tTj81Dh-}t4 z>81)`^1gA_E{ucha>3wbr*CUIT{SuO#C?+p*?XR+nqGVE^Y6UMl<(D>(&6|l2n5nr z()&@+Ip!&RiECRH4#@$8Q5|v_Qi&*2{pFTc$;VWCu40NvUv9sFjs(2ZFih9rZGb7bilZq~Qrq&`WxHoU(-X&Fd~Z{&XZ;zUM4{wRcodKx`)|t`nq>r}zRVWcs7oEe z-Ybr9tI{C+a>!p1@}r!m>gWJKZQS8 z?iI6t2-aqq^4V^Sp|iIdgV+Tx&*J%=?80* z8YS4l6yrH8uDk2EeZ-Trd^F*W==KO;=LDC}zOJ^!Tp{nDvOh5|*s@HS zf8=x~@@Yk-*42!^b>PgzA2BJkpF>aIkz_g1?}Yq-NH}Tak|o>m%OR`CLhNIR+dg(r zL0=+g_6d9+3a!`bWNs6idTLGrexj8$y3Q3NyUE9{US!93TIu9yivtUIdx5}f6G;eW2#*s3ZwJlP?6fL)$00u~e8fqQKWs=~tYOli zho9qB`w~apJ`Ga&4;dE=xCB^}`n=V9D^+%dKp}=EgMmZ180RR%{n)+1v+)2`ePJo- zFW5MEqQ4N&0}jKgx9@_OLyFX=K~~HAfL>`%6Iwa~rh=zM+||z;fVVFE?86yW?FWx( zJ9^pr`7DYM;v{1~WtFnZ#!GQgA^7R}DSXWjMN0AV0a*ru>HUcTyZ+A&h!qBo5Esk$ zB~aUfca{#tA#i?*_KT?x5*3q#qJIY>Eu?jvrV7Lc7%dcZUNqKgRT)l$G?yvjw#y}CNtVA{L#9oQToz;=JV=iySyx%uTk{1SMd)!4V^r)B$Jmd@!a)} zzqp5)Yn#WBmaQuxy1r71ao;AmB;m+AH{CM-NHIW-`;AI_p3&<&zXu-Rp03w95i5(# zgM-qS`AvxUjU8itEVM7N08u_AyQFf>Xw>l>MH~1UPA{&c#DcIJsx0G-6wqXYO3PWjrmWXwL0-Bi`GzjIzmN3}?kZDIVEgh`VvRAhi`&=GQR zZtWl&LVveazoRTuUf6LU4pAvn|Nb8M_m7;df1naK+C8sBDeQwYJLetoCkKeh2>*f6 zf2M(^X19Hjfc0aP`S8x}ybQiDj4}t;*R=Hj3FtPn`aSDz+ns2j;4m7nllR&>1CpK| z;&6xu4s^$ElN2ornmpByQgCygeA^)?bXF znj>&xcM%Cri)t9;SD|03o*&r!sS%ltT_ zPTqPoP2xcwuy=KoV5@w*cEH`apR@VubeF^2+dq3I;Z~y6d4KOm4YqFyeT~ir6=KfF zh978T`~ATWgQWf>Ch>oxQH_!eJNC9vRu(4Ni95Jyo>?s|L^sI-oj4W$5a|+kl$_JG zG5zxAs4`fnGbImv1;*VYU;-572>L${7LWVTtV4< zn6s0@t@0KlQPUs!g(|^yR`$ZAox?eT$G{qh{#&;HZVAB(FyCuAECaNX0kqw6SkM_|dE(6U$;<#y5a8&=T zeoxFMPZy;JUEg$YXsga4Nv;9JN%X6^wC=aO5Qgl!?#a34^o(bgR@2cB|J)taq}y#x zGWzYvy2kfALayr%xiY~7gup1W%Y@Nzx1J2fgM^e@FXi; z%Bc4VJI6kPX+Cp2Rw%qN>`VO%0^Erm=cCMz%Jd^fnTDm4YaZ+xSe| zK!4tdGSgj~a%bXA>RkBrZsyL-JSyk`lSboQ6`KLh(v3r@SLXo_oywMg$R!|70Q&&2 zwEASgPEd0KU^Sy6CBUP|%G*Q^Q0WKf%O2_s(NLSf z)*|vXh5p~gz(Q=60my|=&Dv&e?O_IQ;{HQ0XqrVG3zHk^7LLsBjBwz)g zO@FQZy~SWS8VGR#*C8B6DXvv>1^{a;qBInhMW3Hle^;CDZws_nUPCd8VsxW7|B@eK zscGpb@B{P@3vEtZx=Cfm{<0r{*dWWnsP_bV4^w6U!+FO!&khh4nap*WewKIB7Rh{G zr)1q8dG%!d!u#f2uMvC(wm^-ib{P5_&um1Ge{cKL^z~^!1#|t{AsZh>O@8BUM%}!< zRmIcsDZRQ4!i4`=o9-Dx*BboXett2-8yy}x(c;xjmEn{+*yoUDq*OaXJ?~oN^ZsN% zf!z$($gM8%1KZo*eoZ`23&?dvS?PCn8v76AqmtJj{%NA0EWn|eLoofP z-9Gzq*zk5n5qMS%sVRNWpAar4eb%j@&++N^ zs7nexrF&7Vr?!R?dX7cPKRuDdp)!%4q0l-7P`U(za{Fq?rIjuuTIKYCaqJYxLmIN! z_He`LVf^dPanbPy%>2&ecX#4ed)jLI8%_B$NI5w`vThW9AK3MAVz<@E6&sS<$fk!W zdmR9guGx2=hXIyD<-r3bk8iohchI!vMNH1UM^5t% zp~wF;z?8!(@V^tmPz;~o&C8E?TzR}@N62h8zZ({&qonXndX~ab{n&{M+`&mK6A$H9sKAD$hLodBE zbe2zyTi9{!MU9e$99V0LS*D%8xO~z+$~KEdl`;*tuBTFSNM1S<+qGs}pIh0JlI#Gh znW30d036@-;n^wnw8H!$MXr3&AvJ3vNHmGd+1fMG6DQm ztUE2UBIKd+^OR_(7kO&omCZHG`iE&vyW4pfdXlWxn8 zcex4;pB++7C;(UZ0V}A#mOOA zGN#l50q}kOhSNcuq$T?7=4enrU^uwFwwHL{j`*hqXhdcW zvOy>-j5Xci7ZjMlPR}rZh-7ETI*oAazepV*hk%-NRpkZ{P{?5u-1RdZP&#^=(?tho zfGLkXd;BHpvIzzJ3n4Hh13l((G4~~?J>;Ro7s3%+8>-)P!G3S(Vd=BwL~AH1_H-q@ zbM|~JswI)2`&@h@3JFvOw>$Kjgxw2GG3Q}2nw|NJ@cofTs=$`w<)$P)YnStD`lEoFd<|BTg;Eylhfs()>=Ceu9TYW$vx{F$!}=kV zN{3;chCNKMw&2;SFQLlAl=}gtUjrDoJRLG3iq$v zXxG#Yq$GIQ{rdR*jXRqwfB(X)Ni517SO4BW!k2S2gO#>-7=|EbMu;N96ZAW}GF`#h z%z8!Sv+Eg-vEUU8&~@Dox}6T{L%l0G2~*~!97}I+Q^l6OZ1oQXo73JGMpWRtSO&oW zUZh;F*bc3N-2s8~>jf!OBN>y@xrqoB%^lmM7+mn+I(GJ0%J~Oa zTebXP+VuC}9AjCa9sh8{>Dv<{WOw4C90MqY17tje_D&j#UFwoAp=3X`Koo zxPH!Mtd3VQ%k|do(J~o`kZ8PLcVz{-+*#$KVeYTat-EV6CC2#jo)A*cQ4M(o&f)Rh;k3LpP$#8n8 z&b^-i!}PcUmDjE-vMQw{dNc6FG|SeJ9!70Xu={cU{Jc1c;L*igWyW}4(y_*hm<4D> z$jAKZ_VNeRtutFL*ehtdBP8ktQS-IZzO=yh$YT`f|CYW&G`jQx;zC;7k}@`^*nHM% zA`7Yv(fp3@vPiWCrMujtNRz2<*|C-<-)3 z=6;7BGt;IWfigpyd)Ga;5aaz{4zYM@vYP8g^JY!|H9H|~ACUTmz>JAr(nKrZ2Z4Im z5HVSjJeHcZj!p0YO3tHf{c{!EQ7P0MjcD`c;#I#kg(}`V>uS`@bCWx%9|Sr;0{E2+ z>|S;?zY$Qhc3G!12(0*nrSeq#d!Bi$=15hOaH}O8u!EciPbKQRDq|44f5pbt(fCF*W0_lCi+IwA^pzniw++3=7eYd zugket_$`F35~C}APk*lO1hT}|0*78y^LN3rt9DHn+n7Lh&HK8l%<~G?{VO+1=O(XB zM=L!+l&J+g%rX8Ljg~XJUj2PqE44xD!+jAFVOAS_8)_XYL)CRDe%AeyxPyXQNqjJ3 zA*i=z+OP1;yJc?b;oC}ODe~UsEM1b!*Ryq&ZIh}v=VaG=ix-g{RIf$&<-2xNp99du zK0v8LGxpbgJ$yLEBcwvcRweHogbLLZY~boX>|EdP*xC9Mk}5?O{4rg1%|I}sea7i- zBY#f;`NM&H(b3WDU68XswO!6#n{yOoeWD8Od6s*qxcK&`$O_jQP`$4_-!db;p#|R+ zY&_b3MrZov_@qOMQaZw@aZ;+N{w5Lp`*YbS!KWt~_i-k&{9Nj-z>O4KQtdiQZ_}*; zlp{rbd1WCr9g>GE5+}E`cEi`|9#p_%Kmph$Hp^>bE68e$9*;? zBYf@~sl^u9h0yGvg?|@|s^5hb9M6(pQThd+56=XBU2<*u>9wscd1oFJ z>o6SiAjP7FLq>~miwC4_XS#<|kN=s-Ab#WQQ#%NOSs=wh*GB{JTelvmzDZV`qd~+v4=Zr&zo9(#s z3}P$&O=l3BPv5rZlc)>tlNmJI!M9A#DPkV|l)s_6Lo(OYMw((d?C-6p@%kbI%f1S_ zHf4xNL#a1q_0A0-?`H&-+eC<8XodG=cJqZMa6$XTn>gk13Qk>Xh$Rt06Eun&{ku4O z+ZU5R^m+1%)a){iwr@2UV&(g=zF_Eswvc;-d3;QEbgE)K-{Q^_c1j90yFRz1I+`-6 z|2(Ro-FJguO=qVf6&>M=;uW2hx?)5$%0)Kx1!v3IoZR($U2uB|F{oz*z{^Vo_k_%vlq(6 zW)AhMQ#{}~{0M4ov|~ATh#gsZDV~Pe2HoT)!xhKj25qviLGxxNa8;vRBWKS@O-JmC zun2+jq~|VfTvMKv1a&*wvE~PMZ*4ZL-0R%+Jl96J^8B*#h4j8f?~Ga-ZWRE>ETA-W zm;5Sa(lz_ifRfHAfizIl7B0I$n{z*5qV59F)sE6C*2dHNVmfx(bZ}*Wd zQP!K?-^OflehQ;!zbvUV6gsbpSl{paqtFWxD%MXwPAL=siX{mArtyt>ZRdOc2QMa( AnE(I) literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/images/terraformer-wktparser-b18bc9d9.png b/node_modules/terraformer/docs-build/assets/images/terraformer-wktparser-b18bc9d9.png new file mode 100644 index 0000000000000000000000000000000000000000..885d887fe4b20bf7a02401de70f23753c55fbc77 GIT binary patch literal 38482 zcmZs@2RK_{8$TRdDXK+2cda3fI5GSJM=H88{}zy+iZ_j7i+3Gs1qb1`*sf`>jPxZDSUkb95^ z>gG>L8yz9(T$2SwIZKA&c%2>@P%Mb{3aCIgDNBZ5B=IVkL6+E?3gZY5mw(dsxdnvegq+=i{SHgHg;NIH7t1mhbXmcsrN6jot)Fgjy3da<{XRs8&0-|YU2=w` zt@a~deepJTb#dtobWqt1e-o(aqmc6DXB~)iDf-qPW6q4z*(#D%yw>uAAXrGm=iM$9 zvFw5P0fz!T$XLm9L9Kt73U}>2a|Ggpi>;sjq-~`O6GWpH1e!ViVaTpFoxf3RoMteQ z8z{q^%pKsrPtWN0`?Ahu5U88nT`q^N7hX`xfSBN{Oj;H%fj%{&gMC=AdmVgF6;G0u zFwI%s0D;tML88o6k0E&}<|)=wjmDp@2R~)WXUAA2Og8Bd!vzadd(AUZ-|ZF$$S%eP z#OsBdzS3dx1`Z{~%>j3v%b69F_ml=YcUYw;j<9#|(!YTPRYp>13>QxK_mCAZn zU>rn*koHJA(u}x{kjhs02?AAp(R@wqpJ?l$R5gFs`3I{5OUAts!IPEY3<*QG0#Or0 zP)P6MdBwJun_vh3Ds(FK(vTX+U5oZB$kA#A(^m!RcN*z~rO9$-T=(gb^-*w;t?;h+ zq4ZX0Rv`8rZXZ#4iYwUjr3Brg(5rnf+Z%VrB0XiYG`S*JfC#iES`{RT8#F>XXT>t7 zxh#>eNFEtn+4xJykRHhYZk8h%JhX$no9J2nQ@?UBe4x_UbGUmS-M-u~_^kofXx8nZ zcd=|&#NEl}ZZqv`K;x}7g1+^AZd9C+EHhiW8TzNhz+PsvT}JL(GjcOhL8vnKhpSI^ zgW3=|h&4e}!+(-f{nnm`m`zeizAUk9^|HE**pNQMbnUnx8`eL^;S{&H&m3?CG-D)z zrezlQ&trAp&yq8W*5ui-=w<%01J$RJx07 zYuF=z`agr#4sTCT)PQ-mP-A{7Q6@aS^THw4KmNYBZbb9n^C#QmFIKkdaGP%fM!!MM zrAFVA0WzvlTNF`8bf4d9z%i62|7oY4U?ND|@;}2M385?mp8t#>opo1GNX&yh(x8ec z#AocW)Zq0zy#q~}`#g6bE|1krjfobym1Bc@J15P^lt)3`eT>|tPNIR=^XPqFRY{(d zrmUP7Ai1xfxZ#*;0$j*IvGI-#Xv@_&`vkktZ03xBP#8~SA7lkd`ioGro}nq6}ZDp1Dn20 zu#UH7(+EFby{+M=r+D+^?)3L3Yj34n=3JSpjm{FiS2%5-fnpr_EURx>9AAm(Ds`uF zP`b6cvR|<_IzpzPQ6^#|%|q)iHSH6PoI#&!=KEY@$Axh>FkC?6;*G`n?^LsU>Ri;NzB9y5eV!hh9}W#+FlE zdGH-F^mfr~yyb1g{#6ShK+e7gcM~0pw?v;juJ%2SFTLhDUQ04R_Yiz6Ve<9Qjs`<7 zsvmJyj4BghNJmHDW!7B;Y#L^UWnqn^7Q|_U9Wf2w=Gv?QkVD=?heFYvCYJK$eZs5n z+=Vq3jBBJczSS3!&mH@@z1DCzTXyy2bsEYsvXXtrq|DaiUxfl>)@VLN(Bq_hMUWd) ze9td~&;dK*7RLWM>$*ZD1K93g5BIpztBP2ZxP4M8VtCIcZho9am$zNsW=d48MiUJa zQFLmw%S27MKkQMh@mEgOpAgl8qyht}o@BfCTT{F`OHi+hmlzU?g>F+xao zU8Guc zu2srBiYg@sf{{H=qa?3X^L6%nl^r~u&&gd}KsUwQ=O4Jdn-h1j{@apxb zl8#%eaPH5fuWO&Sa=JDJ^`{vl?GI|i3DSJRQRTKR#8VlK<$E~a&G?GVDtlRIgHpA3 z+TbXiMOg<(Rb({_v*J`E zbRAk9otfmQ2(I5>eIIP-+1XdPg~xGA;$PZ+vG~VkaSbFRX3nfpy`;xGveh7(_O(>_ z9SU<_g6Z2M*%_5K(GOjgNn22Lr2XjH2d)-T=+aZ9ZB7;LgkHR@O7w&Dj*dR}ev@B) zRkG#*g1Oowp;0GX+mqsN&DY;_AQ-(*?fVqxGAFXYds!(+c1z2t>pBm|JS=l@lwvwK zJO{?SXB{o*B^xlV+ub)Eg>y*)(GwAA*4_H0PdimAAqrBMvE{KL&Q`r^TMZhi zdP;~zWs3P2pNZ`H^H%N-&pSM`^?-i&6Ff!Ucjpa`vt80d8JOdYvMkNP>%-PsSh~d? z6G*gJbd;efcyvtG^dtqCC&uxa&7xlTuTxGj&Ii(PJ^HXb@4HZbnSl=u{XIu+?^bfx zZzIZ_A6Jbzd1$rt_0w1HoRpOM>9>AB(gGJZAZ$Ihhg55E6lapfg{N;4{l+eHW$(%F zsGUWL?Sbx=`8tSb;;doVfE|7bkFI}5^McCWF6gNL7_tUi58CJRO>}8c`J1a|@78Kj z(~cpM9wOsSf~Rr!pFeCeomh_{t3x0QID77@kSLII+Mov3ihu=cC~K>B6T z>8!?ZM=h=4>m6y$#R|BcHrAHULVreV*H0)LfMn0Egg80Da}2b($+6Q``9Z3zEe_wh zZL(NZd5aBtuF^6Tj4-_5begRMgUtOGwk_H?A%m z<+6x`gjM|e)gmCq7$2cV$nveU>rL?Lt=+=CW|S>^d-GQ>#pUyh$Li-UGX5o$la=)K zZSi#;Ou(siQf1kraKa|~Z^hz6V)y>0d=EkGiSC4|^%V1!4_fSIN5^>a!w_7=D_aT> zCA#63tmQ5m5oKwp#QPPy{skLP~yDX=wcARJU`+vR89rphPD&qR3^^1p~$e-EOfa?}>6O1%e z$*a-8lJ~OVZ(6sWJXYvxf}UIz$aKiIG@!`93Zu!2Fe?&P-$eOKOa)9*= zyb&P#2w^7kL`qzOEU?wbJgt=0&AUesU4;-=4_{cLy`-d%IZwu&-N12zu3#n*7=@gH zY7ML&mGOP4)qdCSKZ1K7aw~1qr`nqrkDRi1NOMY9or`}t7^EAH$46|Pz#1Px>S8+W zTu&Xa@4|RMB$_JP>F$#H4k}gq7q$h6J*G{5ixDDXzis@%qwFWDl9|!C4T_B5T*?bE ztF!eOu9$DsOW?Z4w<YydBMd_;%p8WmOU4OQVti4-yZRYnJ1FOAp|-dRZ)&=Iv! z%^ogX%({?@Stj3Gf#n9iVo&~rc#Q>w#@yE)Qs;hM@c_0s!zIOUX^kk|EJ;Fs)~Vh| zmyfpb7;h3k&yRRG?d+4WCxMh?a6s}$(6W21t0APJDy=kOkx-^*~?$5@rdV(REOf(3ty?tls3|=>S{iY3w1Yvpo z$lyDZY9)ZfKusWTf=tv)A893i3Uq(d)++(bQDoZEx0jC?TX?^g4#Y2T55a?SeenZE zg_;`SCP3C=^+xK(w7G0~5##rt6Jl{sNBUlv)^->zw%hB&0JokBoI&&AfF1KGPXR%N z-(fULSnF~s0GK$O30eOIPiR#@YU;?ii?Ibu617E$3_&O z*d^BoMshZO(1q2#hfDR!XxsA6NUwV@ek*QLBd7*H$ELswkOU^Zh;vDWa(P4wAP_BP zSQ+OtnjMu1gm87qUrcGIs6}KOH0+hSAU%ma19K`J`oWbs5^}_?P`>&AU>=G-w5{|R z|8C&*)IXx7hT-&cUyDxFaqkWP*%I&M9VsJJbmagREb%{hfIt4tEtd@7g>(G+*wwmu zkL^F2xc6+Y-^9(oI&5RwU#)&I7DZhI_m{ z+_FA+#NIjIeueCU8Luw6x*x*+mCpPfhBh1dq=$#IYziT$d^0eb(xEf1%svVGdcn3YjM|Y#q`TgPC&1X8` zNc%IuKCOh$c8h=v zhs=7;%4|ujp+Z z@XqOPx=97T%xm84#jNyzZqdPYIZLLI_8pEK-LMbJ5&^H$G2=f4=skt3%3h#J0xMgV z@#xbA7l))EWd(p=>Y?t}Hk|KNA(mg*B-VO-Jn)goQq^Ubxl6jI?0WZHnN4rH^kOj0 z<2nH0Zxs^w3%k61o0s~Kb5Ctdv;is0ea#}4vHs-UNBxoJ{I*H+X6rUnac=!R4n|%; z49fgQPF!{-VRCwbzyHR1pg$1B#B2f@I<@NQ2;{;LrDm)!cnbP+-VRck8Cps5tM8pw zhyd7>6{2YfAqhuEsS_>0+^D^zRYrUEW$H548_L;(_9cZ}a(jw6 z4PdVnr}R*5-g#N}OZpRS3i>cDgt-5~QZFv;vx+x#?r2e7ZZ}Z(&8`2i%f};|h_;>k z1R5QIBZ72=bbQ!D-Qw4koY|ztxMV zL*ol{&kdCX7PXTd@VIBX=i1AW#fW>Mpzn?6J(gr;)2-gE$TFITtdDYu1I9G(d<*zRv^eX3`7o!9WUKLu<~)Hi@U1? z22zXJG+4aiTqOhIW7v}bdaD??y4h}fD=Z^4l08liFs|daFYmbc*_Pd*w4F(`6m(sTvFj2{oavJhND~lj2 zN`S0*cjTK=CS8)NvqiP5-SMdxVH~PIQ4OaUqyPHtG-i-ri2w#!MonZ=x!iSi5x{!s z_4b_B8qAMyVrQO~i`q`YlC}GdwxbjnMF{6^y>t~UQu-uU0n4;>El`nhEL3H3F|iV* z7O6`-mt;EXV8gB};=bPbo%v4~b$yIJvQl)SHtMCP20$K6*zzb}G6WnzVUM`0hI{WK z=v>!qFo(B-(*W$Cg&mo)HYCwd7G&l9KB9v)5lX_Y0Qk0BHQ2rhX9B@zo{8T|9z-Oi z$Ol(^2=W0dd5K!Vz&<#G#2<gT{Pq@+}fB6u9jzSaWY2_WyrL3psp2yo8Pp;AD zcwG69nmE24Y^R__p~3ntzjh_(<|Pnk?I~%8K0>ne$NX}>Q`rGzYMg3p3u}~O607c0 za-4MW)f?Yyjl&5gtyefcH4FH46{kNmeZE2IFP!Cw>?C;L_lx=KhlQQ%j_Brn8#26O z@~e~KR?q!G*Ji!;I&ZsD8ak}u*N&+ms(c~9%EI7rgYA!y7+n_w-x7yxRn-(YpVbJ$ z{dz)lwJ`=SwD3f`A|kYYGP4Zy`?=@`;{t4uDdgY9=}{(=d;uWY9Iup{Vs?8Z@r8u3a&e#?Ab@Xu_f|t z3Qrylc8Pd3IF%SpZ)@i~#`(%kPmDdrfzr_kcM+JwvtgwMVW;|!E)+3DKnvraLaZ@A zw@eUJBRm0RwzwP}Sv~-Vfcee(ke@S;JA{y8OC^KtDycXB`}N(vakpwB9}@@IqR%BS zRGCW)kk}`^SHZqX+Q@M&dc%VtXBRbk&zVC(yTA^oLh%cuI!Lf2h( z>>*!V&W3lFSNnH)Uq?rQy9h}G^FoBS3 zO${CcH330-0=YX?3(-qSa{9g(&-0___e!uoN|`YYR73stIe~f6Sh1U?`s3f+#QqJ2 zaJ01ETqTh2Iw1Bu=iJWo6q?Su?sq@@KNI z>#%yeGyFPwIoml!KerZ_aWdJjkar@^Blp#8sq;$zVNFJ&oMRf~*dlJeG8?y(lEAWzdM|;l>dfrI&U%R0XshR!cO!;eU|#} z50EqZ;N z5xhB2RQ8Z_5Z4kLR5dU^5^PW58aeDQ43y9aJ2-`=6)V}=QhJ@J!S80bVqFcG<@ofKGgf+i1%=9+%${)w3+YEU9?^;rioLS0tk1cn zPM;!tGfroPPa+X*6c_3q17z-Mge91doLKDUt&jiI7~+*hZ>HsriBIocSl4aWMLBzi zRwmv-7K}}`w>PGRj!J*@*M@xVR}p?=Q&_bvZ{Cag%=1s;>suC%$S!_*Z0j?0VANQsbw^O9qp@foYsj(y+`nPDh zSmceTBbxy(KltL41$oO;y{PmdQ?#%%-1y9V1L%9q(Mm@^=kwlUYWse;dLH+-@h={9 zyISZm=)OU!I?I*1K6=N>GUvjKC;#+!igNt_oULj8QDx65@3>yLlI73sHlVzpkCI`# z@>VQh&Qqy6i{jBGPZ5-y$Vki1&NDKT(-!|`i=aYNInj4l=2koE!TIa0m^|$g^9=km|Vv#4|2C4H_9R{U!bLL0fi1SK5O8 z_Ojiy!Xh!oiR)~D=Y(RxfC8vu;N#cZt|@Q`0%1DVwJu3se~}JExF}6`+By&2LO@cSi% ztqN$_0oNckc6?l%Gtrg|UkYav>n1*ndBo)eP&H_f-OML&L230b%#Tk@Kxk-j8~SOG zsfAn(mtR!gyKFybSXA$P;E`!xXlp#l3N#^->o5UH zR^YN6@OryJ=LS209Ei))#VVxQmLhHlaaJKPPjuM<(t6nfsNzSQpehM~BMan)#x+fk z!5u)=%w-y=A|c}87rs^&;ztJI6fq~Z`fzDJFI`Lx2cQUu(kp02(4*t1ZTNnminz#g zU^rmGfH{%LNsJ#O9zL^@*E_Cv6(7{V0!xg$$kztX35(dm?XLv@0|5v&X1c!`NIF7> z-A_qpt7iYFnWtr+#kq25cgrFvHRUNbscqVOvoPy$8gn6mt9S@%?@cN!d4BGbSzm%rY=2y0(ZT;j#ue?{5>% zhpXC*R~SHsx@dFe-$?v~>)G()JNe1WoInkn>>eKga1#%4VFWsme}^MsQ2bVAn-4qS zLzf9nO-L@%rDIUpm~a9$$UXilrb&MdpL728fjG(+;WI8L>|vy&hO^Fn0x-GRx^~ft zSvD5>D*FM}Xngyy0}-(#DK(8qCx{p+xw8=TAlAM5m2$l+0{Nbx?+4nyw-Bu2(tajH zP1$tO%^QtYh|gmj*?R&IDT~@93fPfyCdd=zWn{^^gY)+ttbKczaBKv>yiSnqwx%zsw1wsL4;NwrmqE1 zPOV~P!Sg0aSkvb}UxjGk5`a7z8;mW^$|c_y^~*?R>>R9eWD`5ESmnSv+L3xsp+?GT zINQ*z)!L*l@?Q^JYM{-1oEUF28V1C_=)U7<3nIh2FLwYj3tBPC^XcMW&EfdB%$FBx zBW8OIfKZgu=vuckc*0uQGB_}d@WiL24!k13Kx{K3`sp7Zx~g1U86LNhLEr%%8Z6%e zXNWqE0b*1(tiFEFJB3paA%Hs=yn;m8d+6lEq+mu-fGw&L+p0}!>LBuoddl9!H5TMb zNc$P^7|kwWd(ByXuk29>_CuvY6y==im<6gTdDY7m-@CXGoBX!{rJIK@r|95@=o_1Qo%4ciWLGe){PK0lh)${Kvulut zt2(Zz#txFj&%&l~%~|_}sQiYPe=qBz#BP(tACkm(oa51B-S3lS;i>|M2_ga9fSP5w z8|ocb{yQoJpIQ^8yr5yoIBoY-wj6oiu>`#3nh81j3 z0~rW)yes%rgQy?$xBB^Dih1(C5NNaB>@sUP-%TsSG&|#;*;K0Xo-}66@NVXdnXz067N3Jm-@r_)rzQX*#VC@jN{#STz2ywV6KB7a2B$o zg~sNdpR!@M6mWPCD?$2n@da33=oj>L-(Jaq0kQl5z}DM1SCMb%)nRM=ktD2FY(AAB z`Y1gzHS0==o2acrFRq41koFF6|A}w1MqR~-x=V(C6UqsuYPej44dzF;nj88`NrBw@ zSK@8^M&Q1U%N5Z3SKG96=S>%m?Q4@Pl*n&dF{mAwY4u{mwp&ECQ~agJF7ndV@ghOE z^@gWr@#|(SB@%#@8jSBVuKWCpWd6O9F5Zx{-|v>RlJDpl9gw!XJUl%xEhPVSh;Fic z{P}ZlkRbZf?PpqBc&o)SJ^m(6-@2T`+|W_LRH8fX_<&PcUze5HkiOowTsX#VQ`76h zz83ZT*kjEppZv?hMwch&+vFvFPF~Imgm`{`yoctG<~2)Bqwk6#Zh2J-TDItm3KYkF0yTG2pV`jm|`T&YEs`*th&(HT`si`Vzj z^IZB+W-obGPP3UK%&Zk${avq4;NN5Fz)cBC1c zT~JyW&0$wobuHkadZ#mrnz2A=o%iC~UHhgoeAce0yZR5Sw zGBw=4sBUDXhJ!_RjdqXKG+8~EzOORmL=KvyN7c@{&aJ z3$}e!&rM@pR$)K?2JF$6rkWX8j!c0?XWpQwHYJeUMz?v>F?!gp$2slOuFM_75f<3$ z2W;!Vzh5C&yGu6#m=nLom$oUri-+LIG3%)(5VZL3%%gEGnrhMfAFR}Z=*9i=QIe`F zw#oUQ>EfC<+xo;ZL$u^qCGgR`SD+ErSQpX*Ru*v|@32~}9jo~_@_>>)lA1GJr8BJg zuw_lzLn+w*o98WYw+*4_!~WHkwyV;4mejtW0#Ur#0XsamIr0`rUs{A)@9l z8$E0Ql0f6ejQ~iDi00US_LoE?>MT)o_?4?af1^<;G;dDOZ*A ztTp&)7qs0lo00MKO2QRjeQ5(SiKcnZ%D?d6&b;ZDo8|)DyqCKsA2igM<6K|C%kGsG z&w~3ebDcxPrp+dQQ~kDp`c8&}tLt)V7?!1;`~{4zcHQVQ_0wjyw@rC3R#k!e7w2G9 zX>OH<)#06-e`4h__mPhcFpSCg#fe3-o4;En9tx@lcm-|+yI>sBG>-+9h0wLQne!kX{k> z>GG+6NjJ@e_P)&ol6cYetfUxh?q+zLvTCI4>N3sG?foa>JQ104i(5kaT#}HciO_MY zvOG)!d$19xjkd-M-vMPm$VB#1>pcs#sJ*k|@mMdPiMp|h(+K4Bwi9F)DA!f*#j&9R&aeXH3#Gaq z*$-{}Z4pt&{xg(eC3<$Rd$TK4$A01?k9o&}X$%ke;%sgB7ct0xico2$dv;Rwsc2;6 z2f~FU=9$)60PZ||WqYlwa+zk(ucPMq%joPX^^5WWAl&$MAH0q4Z+Qz5t7|Sh582CZ zkB|^$#n*$gE$yeD!erH2MYJY#w}S^oc%&yeL4b5!?ln|!bxCNe3*YUq@ZEU}#hy2R z@>d*bMeGYB^g3eP|F!tRrXCsVf5Dras9g#TPwF89SxYUxN${*c1y?osR zx-f6va%SOj%E9qN6B=>K@%2g4?xoxe(>O7&M+Y^1vR7&XPMd5FplKX4hvC)NO@Y>3 z3~T|YvEA=^N4|@<6-7jG0 zkYWRIy%7B%^xn0Z(}(i>Q2IQHqN|u8f|swUnBg@LI$1y&fQ~D$XJwt;`+1!K$MuW) zf2Ka_;NMq7RTe}QIo#Qlw3edLRZO9&s_m25hE5P=~FU z;{Av1Be#_SLfIEp@3V6$Wk?sWlC7ntx*W58eNl&+q>HNn%28AxpJ%YL=vl%wDi8pu zMJ=J@eJJd`PaKfRM&mR0D{G@V)(+3j~sBay-&3UI+UiSi#fX;E!DQw%Wjv?H|=oo#9DLEEkIKAE8c-T`^8dFGm2Kdg zjn^RxFV2$%lobcKEa^^^-{ZN#z7{AR*6Rs!cj@N9<%B%z`TmPy$w70mosDLIMG}>O!y}mP+1HN76N>M zFB)ZQj}Q@v-^l1KAbkLUHrkS{n6Wf0vFCd)g-f=9ier6mMX4%c=|yk#i#{k89%<0I zB5=s1%*X@TGO0u?5^~BmnVT{+K_il}K_bk_V1>)6{>H?_tNrfbS*lqygD8%FQPZgh zw(+(S#Z3Rw1guiIX(X7(Owmeo0|(cOxrNI?MPSN)8EJ`w?Xpv(=Ih_*=eJhXZt$0m zn;9L>nVa~wJzjwESsWq8eLIxR7R{0T<(XtA$pCOll35A^Vue#8r^;qZpODt^w zvyW$|`}MW7_Rf-ntnDsXW{<-QuC^iiZs;DeL(a8%j0+e~4_qJ)nX2ayqRV1mnC{Nc zFVd%aHxNOQ$@(bj_DC2p8hJl-s1nqSa0qwVp+V>ceINP$Ia;_YJim<+gims;Rh5{W~pv9>80rwgO{Skx&}|FLDqV;$KK0!%U8zC@ox|W)oeZmlF@G_ zyjPnUQ^?Wg^HK+|#CT|HAI@b-R9LkSDK3%GQlllPubu&R$ccjLZK9oFd?jt(F( zd#NCkm5`7OV`8@w_G!`WvORCRMj>fD9w(~&;@+`-$2KzF{)**{K5!n6st zDjkz&Cuv0*TH_P5;r@%u{OP3k#ygt;^plzV(Jvlfba4Bp19I=Z`}Q-FV5Hg}dye5M z^i*&i&y_6IS6G;i$A0{wG!XhnHlb-D%iwG@Fte-t)uy{h3qUIOp4Hhuj0-PG1FY|$ zb~dgxRhsgpaAXlb=8h~fm~(TPWLvVogWE--eH(Dk z_~aWedQ)LJV5^Y607d1g=TmR_%bae#k#T5I6Yz0T2AKqLCCt>UFS8c$%UUlxQ&l1PRW`m&S`o!r~& zTp425bWtc{kFg+$YQ@>_PxwVM&!@t~Dk_5W|E79RQd&rZ@Oh3N28H{uMh;IAkIDzO zzDZ2}?!^N%>#vz5ko#(A0yI+()z}kmL{yoYv}7rupX^<{i{Q!L)32f=E0Ul>_cEBG z%M=$sKh4mjXH&6-4h7AqNKBEO*|v(;6k9y65{SVW*5mJ>F)O)$@Bhl)Z2QP|(FPl{ z%Vfp2&#m3~x%ybtS%0}IV+}JWfb5Fr1;_;$;2-uHV#gCB4B*+UfXwrGSG?; zlpJhwE|283mz9|@anavPN$)8}OOaARjhY|-X21Rf?)A+&ausH`R7H&_)12h8Lx?H@ z9k4(PmQf1_9@o*4YB}|ySD3R|!aBF1TadxEb)pKh3DaEkL?X%-z^OJ<->h;aWva6J zEzVjlFUQw>`&f);*JGjS; z^x$N@kOy*pN$8vFX8N`qqzQ7IaU&2wG$4EI$R@q5qvgt*wf8zz=No()6HqovIvF(A zxp_}w`pB8Z=PfL#bGA?0#NrvzKJc0g=Sr@)6qMZW&NPQCuS5FYyvV1Eq-l5T8gFf3 z6RzWUV??yaK|d@r!MC3)B;|1kx|Fl}L&4=vLwpb**g)j^n-87R7hMxu<1X?lHS(|X zU8?%$NvSQ39$zy+!PfC;tL!46-RXjjRT19+1x6=`YAxxZf4&ilDHThtpQlA?PdYes zTXfAEjAJi+f#%f(H1ou~gohmxJ!0=StRDvD`TRHlUzxfYW8jM@)pXRVviuaP@b0`I zpYngSexB@Gltdpt%e{u#xY?sxY+YIW#e}nJOU6_dw&WT3-o2VG3US>Q$o2AB)*dI+ zzo8{bt^*aBxGK}sK8hp#MR-r@JdI009Q5>cn)Uw4tI~NH8$TUTj5R%~a3kItFmN)| z6J(*5HS#45)v?g_2a zh?8a-($1h>!~OkNVPK2g7YPU>xmvv@8z25hkIf^n$9|^v$#1dR-u|8RGe(8+?Vo#F z$y|kC^HO`{9)_#t(c*PLvS`_5zEIdcL=D2^)RuzRt3@ko`Y29rDvWLae9O%?XXS{} z&WxVu`+PeOTn>mqUt2VyV?@_LsaiAFAgy5*fv5T5l%SN~r0$6uiRzl%-MkHPsZtW& zw=N6cPq|m{7+0hEV~-5vPTnmY5M+}P8tvnP<^ZidK_qCL!j>|=2neOHzb+q7KJV!^ z{P&Z;%Z%X^*Tom+Kn{{&_oMhIq28!jaO26-$X&*oVZxejbs_IUIt2({=s5a%EtKnB>(*;w+c`^RTL0GJ;$ZCFRy=z$RTSm}`eXQ30O&L?XIXpFI zZ-T%<=i%3(E@0Ckw4dWq!59mzqSWt!3|!C1y}e2#W>IefAS__Hz|m1jF{aTjl+td? zreMD)=03FYGRISKYg>rxHnGvY`m%>~SJtf~DnS1>CiIy!{PQ9tIR4~RE%>=F?q@E_ zfz;NGx9p#rGm``EZY&i1jK9!KixzlK3q!JU4#fov0`FrSf!%-??lSN)f{0xb*$GV& zrvW}tq7^l?R2&5RFV1&gOabWF#p{3G0~>l?$N^h`K_fe3p5h-I*pB{*TQLHkt5byw zf>oMZzx?EL1FkHptc<7NyBK((a=-yl?2Fe6qx=6JZvOAgf2g2k|IgvSgk8uyFz$bc z|C0H?nf||r|KEA>?T%C*7MOE3P^^;aJO&?~{Q@j6h=Nk}JG|Ww)(>kN1U4muVo;xK z-tG@g4&t1((UA!O-UFO;r0XV^|G^aBZrE(7 zl6n~wll%tEa23OYHJ+4WyP#i<%j^wkXtfE1H^FydpEpeSZ!HndGQzt&%`~+1jV3E-C1o^Uv-Q zo>|?b4L&Y8W9Q@Lv;6-2rF+A? zs{l0j7<;uUX80P{>c*d%#J#`A{K{vkYE4V~tiB(A|ABuQHYmTlOA*K2Q{cy0{{V+k z)SsZC>qAav4p>9OTDsfhf6;sF9KJZwT*m2rx=K$Vd_#Uj#uNS?O%XmWg>plkIv^qa zoxg%Y-_uSyP1W3UV*$m~|6i|-C#DcdK#?c^irYBP;0#aF1hMHM-`M5}0&Ox-=ZyBu zVLHa3KpJhOlheoyS^irbPd2N9VLXMxk~^|LFCDu+uz%N)@&1+kV&TIfiC~F0Z{{Sf z*8kgK?z$arB)GmGD0;eUt&iH6SB5o?dBoeU9#DU2b;#PxH`N!c; z5T&pdCaDpkHzXM>uYv2!K$plTK9zo*pK@5bEDH|Ps#07WGN~YoR#adqG_uX@z&{Ok z)j04Xg{`v}f$eJa!mNmor-o(RcmRtqC}K%s*GAJyaaOj*nyXWNU`7#ueQLl?YdSv& zw0DKc2l!!tSAmR2;U6MVZZ0B7-HCj8j%Gm*;x)Enx~D(I;sx1s2PJ~b*{|AFTADtW z*v#19)Rz*{6m`(X9W27WjGJCi2rMN-=bP=L#X#>A?~@qe3b5aqhl9**FnLR}^Z8Yg zXiv#G3F5dIu|b;>^ZnPQ%1?{28XZXi1y+j<_hJ2z>gTz$1KsZst2{G zQo&}U2f`bLA=Wriq*zKw*~0ZIHVm8lDon5lT6yhswpf2>%fQdxrwN&Fd!2Q`I?vv~ zUX~QQ`2P^~)&Ws{PuwtqfP#RCfKo~$yL7kGB_-X`g4EJ2Eg-eDlz=qs!jemhNG#pm z-QD?IzQ6Z*-oN+mx#!H8GiT;AGoO2`zH_lsI1$^uZk~DCp0(SQk#O>R=l-Q7&;P`u zR8qNkMG3X5f&>g;g$UOD9sjOf8upBpPkWsCkJUmzGn;qUIHA7pH%s{<2GiC;WLuW? zZ+Uu#bc8oDm*+AdAu8X*)AoYqQTG>AkvfbdN?&v*5{tHFF={Z|w#+%Rh)^+>C3B@5 zF67-ePTT;E>o9lc58wCAS-t=$f@6?F5$uC*`eDRRX7ax*Oq%nw6sDgP9 zb9SDGrDS?+twb2ql-7SfTv?%-TqCWDXS8x@OatkxN_)dKVO_I^Eau%O8Tv%1XTdpm zw^Fh^za{*vsV7tCo3@I`KXMYwE3tf)Rq7b?YHjMi%Q$#vL~E~@qY($U{5 zXYinD5csVJf`fakQPkDqYUIX-G&+B6d4FJ;<@&0&D{-ZbM(Yt;i~FKQr{?gk zMrP4k1@+T+?L@)Ao_v~Ihyz)piz=$ppL{a@t~)%VYg=F|pXSIf;ObbC@rnnZ6Sv45N(t4X_3^zB=ox5%QxPfi3+#RLdlC_XKkfCOi_ zY)3atUAqRvfh<$4zIFa3=BbvaJ9>q9qA7FpcP3A<09%9tIO7fFZu(|6VArol7dQS9 z`9p^z9Y3sY<3Hp*&?Xcpm56f=GG|YZ(sPOv;yun8C$Jwoljt^ld8CY`UZR*|UD_qD z*aJ@ry^}4pF3H`$t`D%3B4GueGnH^K>u~j_c@`dzh07x<4b-$+SBql4x`Z-t=f-Vf zpise&Vy9x&!Ji_vYsoavl!LzdKs+7O`N;U+y!uWxYzy3hlW@ExBGPrRqtIc8=0zgV~5|z z-xKzPnWuT;!$Qr;DoJ0m#Fk7PqCOaLJFv2k#J-D-Kk;7b`unSMBr(_U$J89``s|dC zEh9x#dd8OY{{^`)PoA^_jUpu=P?5tdy6*cKC%8KlpaGze?;gJ zj_SonoRQ;feK2LkcHVek($^((ong5l`*@PMdwNh&)-TftGZDYD)xK0tdL3q+>u@>E zaog>NxhP}HTnPP=quOILEs3)U)7&KaD(DFJ5uND|L_=-7bo;D87W`DrxZrp} z%_T$lcPPE>mVOTrW)$vZH96Q$pO_ z4z~2bG?=t{5&L8d8bcuZX%xy5@Y@ATMNdwpqp+@W@-bS|Wmfkq4v)F?)SM2#ie5DO z1E+d-4rbi3b8K0AkM_QMi5~Y)3p85sX=pQ_H+N;0TV_{6;vIb9Uzg+9 zZg>b*!mg_b9e^rPo_vyVyw=da2KmA?B&H~iMu z;C!38L(su_(8-v3us7i$@_rwAc+q(5AKP~etdlem{YM=ht&!7E<4uUG6+lJeuizykM=(BarYaXOZrH;I=LZi`rGo~EEM6I zW%)xn-l2SO58Y5b$7|TnmLJVfHXSFpfxAIyOjvsIOd)i%3z86Vb~e(2aQS1!3Up=* z@^TV~>4M_s6S=kD?{JUxQ{#tr-*&AZCKz^Fr*LelBUTzTQCDfd2Y*OX{^ZXe-f#(= zuF9&Zma=w1T8}Q{qLq+6P>W4<$tm)!o)@mTkjx<2zF(bNAFbk@vSpTwtn+zMx zie^hQfSw?}`=}ZYC4R@QSNu!_@yxz?K^pZl;rP5;vzpF^iBmIw=CUwe* z*ZKq@c2}tCD)4GGMsRZKF7Km_~vezdHgl| zP}M&pS>1(aj{#RI?JvwTC}i(60pzo>J>i++|1;2Z)+ftlwzVx6Rg7^qxV%zi8p@zV4+Hl&ojvpzM?t^0<*l~(O5N?SuzRU1sP`n>tLPzz ztc#T8$;SOc`A+eq-SGFygfphjm{~Y|4Y;xcUxbdi3QRSDeLb(TgN;`qIcX8gN@k_M zv8yO4ba2pY-)V=$Nj+9jz?Uvb`xB``gbeRm;nJ+`O(mY>WhX;c-%tIx19TC%vJXv` z0pbd_7fcjcv!=QH=rOG^a!S8MVw>rpJW|!@@9S~Kp32pS_vl3%kE+8eSGJB72&y(* zB(_`it~k^2g&)m-wesnY$oR%L*XOYkiN&goa{g0znoAOApm13Bwxg=?$f$FD=9V#q zN|sSAQwD+dYZkNk)$&7`#fTzIw4P3j(o2RnOvScGcqgFg-KAG1;HcBVz|Zn5NUqZ_ zJ`zSKjhm@36YB~KRL!C^u*O{*k?wXDPD7ttE)y~c-7EmHLi7vQXU3svW+lQYU8b?kx$Gq|B%b|RU_aD9CaxK$dAnrGT@?3$(OC< zB|%d&rK?#-BowBx@nq}%WH~CrD(kkn+E$n=o7T;{x8>T{`Xa-OZRtCHkzCXTXaTpQ zZ`Iay$I9RLfTzIDJ$74nC**2v?Pcxi=q`s4v^S`6TPuu9lpR}NnYs7kiYG*Se`|C@ zc2eJAyJovm#?PQN<+wnkS#6s-T5f6f=>t+wto{))KsQe5_f4^!!nSIbTKQ13Mr8wK zi&HmWk+5B3JBg~l*dCtu=Yc%SJeT}-)6M;^-mJdUXILJ2YcE?4&!$dI$xx2pGJ3% z-Nhax^1L2A3c86?fK<6#SU5qfKeuYkpLo7#iG|(jmJS!C&|WTDS>o8f-FGI3{S6r< zYkf|iM+&FQH{~+#9<^H6z*}0qwjouv6e0>5J8d8XoLvxLh56VB2Vphvd9K@S(=W00 z1l=O5*E65ceyw6E*f~E%E`G89+ly&oBLuenG;wMcPc)KVT3JKR`sjFf^Pdq z!m}t>N~qIyLhy2&*HF1+blsh@n%m} zp)QQusvyx&2e=Y4HegxXU?NHG$|fPA@Xwc70M3yiyRb1r#F(ikEL0(^WG0yMRHuxu zD&~7k&cF^`zRC9Tx<&hG+Xth!CsHO~GT@+zVVCX+{OIvxB_yvMO%2*F%E#NX{{0Me zBBqlaT>(oF9_F~{LX}Ie*4RFB8MiN}_>Og*XHjALnBEZ{Mq!vTLihXsa*;9?86u|u z$AOEqLRkhF%FNuN1b`UPM#%>GY|q!EOpxcln#BZPHGWpd*z*08mF0nkCNCC8elcxH zXTZy+7D?*NPZ(ja7NgFhMK*H$2^ugb`*y&id%`ZdpFF1K%FMXZrkQW2{|$!n^dFzq ze}0}TzrD|YSMLy_0R5-xe(c|qP_j_BM~dtHM)w-CfQlmC=1xnh&ypp$wBVy25KobK zgndVKw_*BZeNRtr807q*nZBFH zWsKOA$MFPyw`rp?EbDaTEpTbYfV9YdYfKwpdJn!YbK39h%cTm;D&M>9E{Dx6sYs`F z0c{$5i`!4rPhCRcWWFF`g%j3{lqTuGiU$x>XRxA-ZRX7^k1%XJMqfb{LI|WLwU=(8 zA(Dl{z|?0KpI!u{Nbj~9z&!(+Zr)~Hh1{2#5(uX;yR8CUwe%?Gmi9X!I&Gb^TDZ}O zQ0{1dL3G?o)&#`MmtEn~`^$~X0HP-deY9KtAWOx~QKgib0zVm7Jlpu1^QNA4kt|cp zkQ&v=tB}r7@!aM>Gyl{9j;B?g!uQ7)ZAjZfq4Lh$m&6Pahn zfc;Q_YLDE4qOiH_cWvrDTgknWupRK9xvUXnmj;|r#ui76-T@3xk)QJnyJsomLhoaRXU|+4RE=LzP=;?1=KH=vSwqTebz##a z0HA=-Oj`HL0N^>`x+?9h>>x9I_j$3`C-oLXm9pbl31HU*#uJ|_;c?&a>TNYa>IGqk;9h&KWmx#TnWUgqQ~tM_RAR-O2PWC5$Q*Eh+$ z2rI`+rrH9_u`kGM!+UnQzG!8Mk47uh1}S1LH|E_CNV{HXtn);ZevAG0z*r&(FW};?r`NB+jeUUhb!UUE8aGLMo_*o{{}%(%`9m{%Ws>Eq4f7vQOo;uqfHc+hd3rdPIl&(|^ICLsj`t4Wdgp z{jBq{&Iehju4dl&LMmnv)*C{k zpwYgqB;wcQJ|sgO2%t}Ic)xDCBe;BhEdn)(u|kCA^i?%#%Pn)@Le7EufqE!_HP)jA znws7mxgu|B=<{bNkFGU+_J~CEr-1R`A57%o`gxREp+|}8bhz0E+Cz8w^Itvcm}eo; zhAw;78d+z|J5Q7@1p_T1W1HI(BH57KN3uREK*b%j47d9}muII1GJS;^H94xNQ1Y#Iai0W;<;AH*Q%vp}kqrRh zhjOD8HnTy@f*0+`CrnIC9p})$U1KV^Xa4S&9Xfb?IU3+Ky-;gKdT6KIxjz16IK?us zy#dO1(6H)kyl%uZ973z(^7i92%6jloW)=3H#`1Mwc8RYFpq5G7J`>C1HVW#Q3i`uD8g4z^Bd^VuI}K4^w}#jZq@nMjn` z=r?r$*vItGilV*55Vx_4{ns{mnsOOP2`XBYAot?E5Ja!(u9}qDd-SasQ-Nxr!yHoB z`IR`vmc?6fj{4osHcm)Dj=}Z`hH|Ia=02WLr{3PL&QbE-IwEErs4pw@^c56SiJGQz zD~dIx=+E6oOL5;MY61v_Uyn`bOr@B4c)-WsAnmLoZZ7SBqBWp}>>1lcPkkXVK}Z9& zjb5=HCyB@G07EzTSNvzv$Dyr*&=Ty~GG!Va0)Vr^d0f|Mr2%li8;0hF<}QLKKTg`f zmSyeqN*5f~3z`{ks$H!xaL`KGwAnUU;GGRDkQ}|?fR1JS#`ErJ7a8LMS|{56AoGnU zN~&F zaC}wPW-4#Q%#0e}_18@ei%gnnE8-7XQU#+ec(x3M6eLCT zM99`P5#tAhmB+nn#IfIl!r&Hu@vQcD%W`!#e%Jh$c;N|-o9|zDmp$HnsJx@ zgO%N(6>oy-j`sT~Ic-@rL*dmtaL68xp^)Vz0M-|W%9g45}`{G-60=`%hRcaH$6Zp=rJmArTK2G zoH$n-WAFozg3-*b$M{bl|5b2$Oj^WF8~8rs=JZitHpIjd4B^D4U&gQ1D#9hJl zX#NLWD1N@|K1>tT2q@m>AV{~ODDf9Nu5?!TZsK(x~a&PYhg#i zl4FkuQ7^!kHQjaKq|s4Hc(p2JYBcJCWbot^tMh`mI!g9^$b<`VFCKcW&%fX_V&|UA zXLF;az(jK>H3m4BqNl--oSBWktX*D|%7f$-yIZHy=z~2i8&5K-8bC!%C;OIDn?aHY z&F9|TG>F~fU+sMVV(eSU&*0v%3b{UEVMs;dCfTv@7qEpZDj$Km;Qxu>LkD9T^8vED z|Ef+njdZ4rD9`bl>Q<pj-(Sl>UMV^Fm zh2Z~psMqOt`AkkV;JdeZ2aFB?nP0}Y)S^~?tw`rhp6vX?wR!aLRt_S|XwumenI`RXefxd6wT zrM2p6i2T)e*DD(TzMg4>ra;Np8Q5}mqogLaj`?*$G}FG)dcJ-p$jEc(i#-HFEu?8R zcM$}DQdfw|2w*237dx7v6Jhb4JY(}&*v456wQygaz#!<4)6kL|b#J-&+S#u2(&)4R*?cb`KsmvhBot1%*8vvA#Z(Wc zEz4fff!X+cG1;I%>s(;O-Ri=>HF7AibhuiE{!h2s1)hz)?JzUnrmoCRGs4F0hLkzC_xF#~&Z+O?q~iy>u)(j<^h zD#BiFiZb?H7|}wNPAQBn6&B7O8ROT;XZ(vYY$`SA4{hTbuHR;MjzHPTW#wA`brw#s zyWYhjvWLv zfs6O{HRsL+#r_HZ>~hnZes#&S^88^o64ORN3J-R-+Oz*`jli%}V)=I`GhOjpDsc{O z+`>tBi^o_-<6Slr^W=NS7md@M)Mx;I2USWMWj=WLu513yE+0X6JRHOwTeHzieh;s= zvm2WIu26LL$j|WK;l2&MPF@{*?N44ER)6E{UK;HPREFZfVAMjq=BbVH*pB(`A>gRl zDP=0%>i6}^K_0qRr;etfC%t3a+s|Ch-z0poUmBW8p7}AWM*oVvkSw5Th8@7e$Fasn zl$~2`#3St!wkAUUclM3c0B!FGHP$U(4%f7*)_| zb(40zcXmHKIayy#yJ5?V2bdqg1%&;wQw#*|kuyy*-ST#Qsa$+!=Rof(4FMuvc%Z3f zJw{db zGaq>9N|5}<4Puei!xU4tal3K0Fu3gYDp8+ebNZOkCZIs2p|FBzbF&WQi`%WX}%8A|VPYGvdvR+8oEcI3q% zJqn6_b>Baif{k*VJ#XwsTJB>+V3xggguZ=$Kq4id{a!8+tVc*Z$*iEMW8Ps-Ul^ax ze82cuBP@;+6!lfX6`3{>MW9-}BYFPC;H7LB_7f=0H_Sx-Fw^q$MyLLhgn9csOOElq zzMZqQ>)V%xc-8Bk$5$@R%FX9j=dy_Q;88l8s&n$J6;}l=^hkGa2)l;QyK=pW?1839 zRro%M0p$DEVC3lvv!l;pv-Dh=H{M5FG~@0kBs_I9xW`PnrtwNDo`v|4emc-qvM2fq zx#aOb%yjY!x1A1=(rl*4*5O#Z530&tv0$6@Ib7)L*6(?LmDVEueVpGo{PM5zdkXi9 zQi$+Rj?!$Tjx>K2STBKOt4Vw{~4waG`8jmYJIJhXb(nLeklP)VLUllsf z$c}GB7nPodsY(b>K7-QBLrwC2ylh<8rA=}=C^tBlHJA%|GKb7CD+QrF6`{I9MRG-| zRWFjt^xLlzX>0_iu3Ix}713eNHyyJB>?38Wx`Oy5JY_WWQ4Y786iAZ``3qXtiy%+# zyYWqb`t29}s4lN4I)&7*yxa(S1-s)P7E(Qa^MBF{5D9W5B4uWHab^Z17CFOA#40fT zLJ{BB5KOd*vcSrVeXk!wUYZ_Jw5-j_3-1$Lpe6EN2n77y21@YbJ1q)lA>zLrC6zCx zb;Q+(zpf)~f?I`}nGQJL<1yS|{ZbF6-E)NHI#~%_7&`MVcXA&lN^d zkOkZlqwEoEBs!20VGd+Wg)H<%X=M0)C!0?lc`|N((MFA0Dj0+hSdNyuh4@M|)rOf! zNaf7`Hv4jNS17pZE!4Majr$|VwetK_L z0xzl1lm8|r&sPGbXDc~;5#@2hA-Gw$o!l`NSJGYrFaUIpdIB%I8`E6rLP&NJ1J$ur zg8iR#LGpa_<`D1;jnV@VN!giqNynz-&3g=mF<;rl3MhTol1Dt&3J$P8 z-;8Zxs*Uml{iVkUf}y7#Y;-m@vYO+c-24=d>e&^aAOrLtl0>ONj15MH`HH?_NFl%>VloAt@EjO4i>hGWDjMgXPmiB7hp_Ii|wy>Ad)d_y6Cd z*8T-Ao8A)TR*@X{cFFMp1Yr-0eqYu_lw_`lsC1#*P9l2?j{!cC@~{TYVcD_YF;C~q zrqY8smfY|E)m^RcEFUuOSZ0D0GMvi>keQlIs=RL*|cx zzg~rog3Je)J?bR>PkcrBW_ZJ`&0p1Ei2d$1z2Jt#cRDRKE5E$Zp_tX*03i1O1d#8% zmq<@lc??=QB1jQ?byT1yfOKvO&Mp}ArvsBd{nnP| zM~YmNdG=RPpgb)Cn~AGmfn zm7v+jzyET|7pbT51Eii^)7X zm^dyO7jk=Y<{Mx<`W~UAmenjDP0n&))iOWFyjB%Ury#le$R)lQBL<|hUe_6L?q$V_KcE&-gOHaafokro38|pm)t(j{Y!`wm*Evi<);#5HE2^a*qXm9=I56_ z4!QG4LCVMrV2X%I5cqwZFNPlrJQCW!RuJy69pf91V@Q>_5je?c&L5xGmss+Jr_I;A zW|!0kv!<3$ig%xB3BXtJNTFsL9<>9JKQZ2F8Apt@(ViU0>A|#V+qUSJ6JTpHmhpWmb#_Ui z+9CRmmjB@Eoy0Yk`MWY9(eH0~H4#$-g*JcmRJJDR zK;SAkSVWuEOTTUlO3y8=OoA2zDoZftSP(>sXc&RxLDx4Fr5{AyZ)a@J?wb=6K-bqS z^8Gj|RP<}R_-7_AlTcBec^_o}~9Ro#2DYQc8;Yu^*FP5I49!1qhc?kAiO zfH(fWyww7>d-$qTg!y_$EVI=41+sO#QnE)NO9>%XHDM?IM28$UQ-!#}wnNbd?oM z>Rj!|fEM0j?_y=Lm9UKquuVRvw^?2GRJyM0&f4!i>+{%rHH$8Z7o@HjeM3 zni%yLEl;MRiMAV}0xkEuJ#IZ6nrcZSLOJF^@s6YnkBbir^$1Alx(Ue&wUQWfL;TINlj~?0Nu-TU_LbfPSjnmTf1~GxtwnEbh?RE6G zAf8VyqERDhK4pfl0x_@4XS1q9a(A)CEr>A_tLJ|;H%m@4GG8R0QRp~v?#~RikZQd7 z?fm`7#X55F6VQW=lUPHQ^3BZOBEJvPrq$TId2lFX-mxZU_g2hSe2v$YF;wucYjo=p z)={f%M?TZ81G|`w=gt|CN^%LR-c0nXwufZg5E7{4;_WyvIX09+LYGC(OtX6$6dIbl;~nu|x3~#F;H06p z7hCY8$s+1PqTXDq2kyc1l0!Ep=S6;gKKz3G|=mQDbr zVrbOzFV#2fk?^`sU-;m66Su0?Ad^mH$ldpSLsywWVEcS$Cyf1F7i}0~9Sh&KEW?-{ zcZ+phiq)M(MlCwwFkKmjxGm+8WUbkQGZIX?>lU@z_9~pz>+JcqoP}rB1ZMaa|5*G~ z_||@VRpdIgl=G+!dLwbQ&luDb!wM(z#tIm17y}u6Fh?E}a zfm`+2HjEoriwXuymM*iV_KQyf%5;uf8{b$EvnG#q^;@@wW-?K?0*FJ4%y{5_Hps>M zALX4v-mp;AR4AA8&JhKBl+LJW_p?yuD@cmJ<|+U3Ilg;L7OK8!rXzUFZ{qV`6IXHWZjIJ%_Anh-7LPRl(` z%B})*gfk0~s)AK5?I#So#rscF4$u%1qd~M$_wIq0PgQ-J#P5CHJJ?-BtaGJnFJJDc zWaJxPC+&K+LOHY-+g2;cpK$*Ku>tqLiXJcAGl6v@ADRA~^Mf+MNZQ z!YFMmwP8b%pSm1U<$TQ1vtExw2-KUH+Vl+5}Dq8Wzsfj9%fp#x{rFpH`J6XoIX|XOXHo`4A-FrUNh%( z{itRPLDMJu832pX_bKYS>?~dOzBAlr6}@Mse5AA&`m*1kBHEm!#BFGv4bGwds-oMW z@mS(4YD+!$xZvyIa>Prj7wexlem)}-FOydYv+h>o^>Cu9D315SHLTEW-6>t(@9Y{4 zoV11Qw&3S>OvfdFtkITrkX^PVOImAeKyjq`{$l}|FSG4kFaGr;G?|CdSyL9sX+Zx3 z&CNNl+US~}LLADZsfI{6-RN_dXE!1awJ$~wxmrT8qtz%y#7%g>%uv?46}oe))iJ&O zmOY`9;0XZ*E`sTfKOywE-&_`~HYp^^YWgnOcm8#}I!}u%J)HXL9@1uQ(V205VoOb= z`Jt-K{&PYS+Z3eA@L+fcDuhekGv*Y3(Xde6rc6YU5rNgBt0${1z2{V`@9lEMLciMO zcmLrB!1KP#!4v6>NZ!AFXbdJld1faQ<9)ceH95+WSvLpq( zlLyc0FJWD$B;2s<9*2UU*VGkfb9SE-kcMYR{6bDEWmA{ogKm)5yU)j{?v}@&J>4eA z1@dj@^2bEEHwP-KUQDxWX3}Owp3Bc4gWi9Zt{2D}p z%^38Y*q$hdxi?06AT4mmJ``vhLC<=W!YFdc<`c?O(P(91fYc~-%bbHiE3VzL~ zo_^Jp;AV6l0q_MD$wcGktxkAgis<}mS!7xhZfIK{oG&wFH7H~BJocUqB=((S^)xDs zsH5{))9qg98N3b&Re!)d!voibZ{6@X=-@wx1zv#jF`@e1_!?g3K=Rq+kb*&8x zf3l~9hyFI2)fX8Eyw$#JpfeNSPVIGl0ZY< zr0ureP&sp9_{PXw2;O>Lv)yoBFK$7@-(Rt$@;LgF=t+R<-F5u>C_~F}*<>?lg14d1 z?Wiu~dWUWT!h~BR;pUKfJj%Iub)CZUjo@j@+v;nDmGtAIaExnkeM7&!=Is<|sH|a2 zh4y9)h+Fj6A)Ue>2WqRHI+TQ_-#asgBug)AZJ0K~J-kzF*oGB$NCDxWub# zuOFPT;HZjpChwgCm9_QV0kYy2wU>Q_e@TM@!+ErRG*hu-5XO4#M00l5{Chu*nRcIq zoi%45Br7P-Dh?mDgBm&Sg#NB)=0hI}fEyHBIu?t9|u4MI4ZX{jJk-@kW% zn(?t$x#c~^^m$zkwp$E;1FTo_d@cBk)dICRs<;p7R+Xt78H^7>n|2oAR`fYEf;sr! zmks?2cYTtOkWq3{ZI_wpg`mqM>pwF~DBAaADz`c}ODWj@)wOPxm1r}^BQKhE(}y!g zJ~QHG6(%{_grVga1L`EU%9}$!G4q#(=V$^Krs1W-k&sR7xwRj*66?dy6Kc@WvyHyi z0B{%(h5TvWOK|Wy^y>%20s55~wEqrvGT+msw%@92LNP2~>Ch(HcOG3E)y_ zNc3NM(9?eLwX;29RCoi2N1vjV=>L1@t0ICQYd~y8K9QI5sgz+RMF_wF3ABJhF#ojE zgB}499l&f1L~8%<4-caP<3EI$vLryX2-GA40ownag#Q&SPU1J>F@VDJf0OE9XGz&= zrT+gPEnCdd9EqR+!A{>Jc&T+vvs&qjUi>#sfc^(qH51H#fnGHsCkBj756U?DGzrAn zz$$=f(YlzX2%2bjBZoL?``17?oE=lrtB^>jfcd|7J%rCFL5V6;R_~*+*Z;k5z<5_U z{8!;Bv-GB5F6~LmXb&WuESFE~k|hm}!P3;tI=CO5RBm)WB=M(Zf3`Zq>=NJJi}hs5 zic~J~xwrGW>SX?v6Me*rF`ZBJXH!IG7g(cX-!D>)fZh#ehDk-i{}(D{?xqwY$pzAx zTn50`#W+*ifX`Ib=OV0-hsIKpSWvsnrUXyt*$d#c9v- z#k1lW^5Y+`hkZ+*(r?p7CIXT|`}1y~YL*>BpF*c)`4IgMspL>q(c4h82KUL4gy23x zOSL{$eT+w=6}XvEto;tj`AJ&;sNVYyyL!LWJOij+w0j+^jws29|JJ=LFi=sEaHivJ zwic2ya2nY#zUh@GMK2QD)GI2cDCp1mS8)GT!CC-+iLWo2o6p!vl#S1@&guzgsu zZNGPvc7s9u7n?&@x%kInP7Lyu_d`#k!r+9L!h^_;0+Sl79hYBg2W)FIz8+FUJf;nIVVDXXQEm@Rh;E z{!E)i0wK+0@UQUUs|*FKT1<`6(CswK^aRl~Nmut*yQ=ZryWW#!v;ro5-`wGTe)&(UXRuJas3(%(bmG z5j2eUkpuI~{JRfD;G^~jBn2(?AC8>gvS?*9;U=~bePjH3;|0+k37`gg@DCK~1_oH#NLKc2a2c;-5DHfATt=+3!v- zzG?PXeO}TKqxFT4QPxYxgJT-=k;b2RqY6XJ)4&YIJQvDU}C)7UXgwi z`PFfQgS0$5T)-j#%1!13d@Fgc8;68|IidWLkvhuB+TLUaFL?yP|&C8AMs;?CqM%&?<98(UsHVREy;swVu2>o$TVW1Xq%J zjP@rHTOz2+JV8D2^CW`2vAA|7p{%)*%{+l*F6KrD5ue)ZaEUQWHH4FVwo5-dLEdcFi zAWxjim)1w@_A8k9ABu3!BFPDw^<_UwS!nSdu`fbs&Lw>w(_;d4M=DAR&iW)hjB$-y z`kwCWX**yts+Ykw%lFp_??%`k{ww<9ce^;QGsJL{nB#BZUD~==Xw)0>_ZL%uC-f0f63AYWbk=4SMDqq-;=!kp2YX)Zi#N@pz-4jLb}=I#m^dQT6O>WU-TOKI zWkIf)lu{&s>obBf?$3}P0*k;qv%a)ON$j<-R_Hd#XI4GD}z9zJO04g<%LgGxb zHXDjpS0(p|4`Z{IJIr1Z6(pE#Dukud=~%wiaYcgLYe?Wh6_|50KRlg5D%4Z8Mo=`9ycwt<_|j?3!<6iHFd1hXSWsZ_~2vfw>o;tfTnZe zlHQO=DQuo7osnV6D-rQC$yY6x02Q3%@6j0Lf-vdiQ zWJ~JQ*RNCGe~W`6wZ->23f$VMk6E_{1ocP9F z{RN)D#vOw-z@88=%8&P2#z`!Wg5V?UYb99K==-W6^}Lw#O>+1UdQ1t~?OEGJ-(Oou zy=9ND-7j|5#DY$~5yN?b5kLc$j{f;{52diX#XmEBlcU#~*6&9)KAXz!NY1N z!P8id*5tpAPIQGZl+mhhvAh@dD4}w*0T_NCHOh=la$AH)6 z`Wu;d8ed3#+C7ZS^Sc&59LV}5n{RhJcpO*o`au~@xw1coz*j@QmN^f1AB#c^j~|CW zeUB(Qs9!U6dubOJ2z#oU@JX6~RJD?U8ZI=kd)r(9R8T(AT;|gkzTXP|SJgJyup1FJ z16rTmXe%OT2>-=H9}#-rQ#+U7r}+}Es>5$M5uR`+m3p$?|8`uMP5FPs|GhjVS$J&nRSQ10;YGjXm5h3g%*N*Q5l zjA<~Oh#;O%AJ*Ol%-}P(m*}#IM9rT?c~!VQ(nIe(Z#PX z{CCv&MlI7uq|)hG$&ZgP)g-@ z^3-nX!p+ukxljaixQqZT_KaouI6$gYvSvmnP{$2*lgavAIP!Ky$$i}robPE^HbxD& zpi&-37Wb6kyR@so45QSI!3UN$dLZ{zajAYjw#RCMu8b=9K2X4Pc30r{^8Jd(ar zd2Hg{W228^VnoQeag1KCDf-Y+Um$@V`mnIEh0yZYlx}3CFpt{o6@-S|@uydY=y#JM zs*&g9Ou=KZ;Hk_#HKOSR*Yl64oPUv4MZMpxr*SfqZeja#S3Sz@Wp4isV^y$r8hqhY zh&pheJ3~$wc9$VqJ-q;+PAKTXBAm*73?_Jas#FM3-^Kj_@vThRXj;mWFc;rFzUMk) zeo!sl8#-Q2E|b@J)ez#o&*T;~^-hMzzSxWn7z0pf8wWg`raB^9>d4u{+{CNv$yz3* zlmxzKlf&^QQTIg7gIH{M)Shx>`7t`Wlw183VpFlXM@5T;4xvYa0q?U$>61a!xCCOu zt8q%)+kVkiV1q0P17^F?JY|1lM^btU+H7W{tHFWzMYP0>=Nwm{ncNo?q`&1V(>1) z-0o{FzD&_9Q#N!!k6FUab>_qHm77z97Soe11}tch<>jK1&{gp-{vin^PYRVH=_8_J zU%27vTKg?zzYSx6pUPcsg1rs#>zYN*CP`V1_aDNK(%JVc8^`7LjEv$QZk(IlC~B@e z^KrFhsV`#R9why&L7VFhZSb^QhMjpRR@J38U^$ciC-3@UpT1|Ke|)E7+U+Jpuajs|Tlrd$7iSM=C0P?@>%T1^5qjxH%&aE9 zr$~S&UDom7<&+Ncr;J#6^SJt21WiY$h5S>7CXj!N55);&;uvs-5)XUEEoTL$CV~_5 z4-aO8ZSal^{DBZA_{1QvVlZ7(&A#8u@Fh#`?6JfoyeVAd;hfl(wttEGnG2_9JTf(X zy}0tLJZ+=;er45JR2&-YgZon%kzIJ#E3awI+|Z%8MHxIjYBz5VsO1IzjG7x>m+0!x zp}$^u@fGuu8pJ6xnZjgLiSDvQdQy&gQUI*-9fKBPRdL@^LXqS1% z^l_jE+ScleDj!(PmfPKQ*J>d|u`vE{D3UNz+<7PX$aD1d`1^wjKt~B%GaeF~-)0fo z^ATwo7v;Gr9!^1($O-?n3+?H5w=|D&f$wzW?!S6Qx%8)AinxCGIFZ7cC3o52V`#*> z!8<=88M(6x{Uo1yr z4+{Us`a3X8si5(Wqx+ZXXJKc8e$^f?f2N<1{BtkF{HbX?zrj-%6Y%lbFgUPtNvf@qptAF)B~<)Jqy*INvp$rzy$)Gl&UuybpM zxq94VJy69y2bXE)IPwBUH9zWEM+^v5kZz5(dexNrY@;jHGNe$TDRjAxoBo#Mnw?Yh=bY_Obh2{rr%z1e_c!arCE&tEhl}PMQsSwx4UuKzLO6Rq6p zE!Hl`W9S2}e;SM#C_vJp#$IYAp}{Sg5gD*)0A=3}dERu^y_a4SKYx;BXu?{Kuv)9C zi?`tA>N~jNRN?qg1eFl8r+v?N-grc~Z_HhdUi0LtYDlZ7*|A*+6f1s8$@1rWbfb@K zVYMqi&?8ai;3aqrNV?&&c|1eYahvfj5rBB^vr?=p*vL(cc{tY-?x9du0QtKQt2*numu!Hy`rgO z=7XZ#g@!TR#Q0c{p zQD+obx~jU8rwB>2>o`hNFAiqghr|g(&w4w? zN%<@y)(4MDVj3!bAPl2Wn9jxK<;mMq>d{6s@2%|3Q;=PYtoxPXNsoEl_#$rH0#p0|-e5>$-m~ck*yf z%TlWMG@j$^2@;DvVQ2SOb}g;Xg0aD5DJU#7jIqBQs5lC>&@dGY#OGk;Up8NtNx4te zzgZXq)}0!iQ_5$KHin-v9R2sA+Ohc7+Pb|n_>|9?lUmeBmTG9gm+rTc0i#QE}_En z&4nL7QTnLz!bXZzslyV?q%s;Dp91_6R^fDhXN6dre=k;K3jO74mBrR}#AQ6tA<751 zmj~4iO^?dn^}5uBRC)#Prj?PH-_t>YkK-U)^YgU=luS=~|2XlH)( zm>7%_!_#yo0nb=)n&-28MqOAwcn`EKcxQBGBuhA@UQ`MtW(h}24x-QnQ{_FATT*TP z@M!=k6L>GZba5M)DnC*@QNy?Dx@6CK*ggj|%I5&UPbbiSgjG{;MzdQEGa#$%cy4|+q6DOG0C3&`e0GI4RFWyX zB;?jsCQ!E;FL4bLT)Wd1w8h8V5%h{B(BLb;pdOHijqL15`#DuFXG4H(;c|i7I05W4 z$t8k!#evl9zDOrS4l#<#9iZOIr*i$>4QcOryHZ`nZ?|2%3b8f13NQ@-Z)+$b+=N39 zbw*`L286Z(-bwkL>5VEpPzKddqpp@9t-C7_!~hj#+pQW-(3=11ROqZ_Da5wC{=%i{ zhuaZ~e3jz8)qdHP=L}kNxw$T}xw(peD-K`6_h(4q!jS;_L~7iPqkT!3Yb~VL>L-oX zZ>+?=E|tbAP2Rweflox*0T#Ea4=`cuc}K@qbL7X0hT|iK_B6OohW7Vn=awl_rFn3S zlbxfN%6o(BrbqanGLCWmaL(ZqxI^ywB%_Q`y&Q{cn~4{kiC@$WnYoLuH%wTFf$>%n z97NFrXfx~j2!xPfJha2l=+?coJLD3mp zQCEwpxmhvD1glX4OV@(U#nd@YLzuF0mai0GVuAfD#tiU|u8kcHQ@GLYMa>q5qLe|U zuST*Y1azb~`fMw{N8pxT6@!h=MI=iwvCKtLP$|Ly43Q)$b_sz7 zlfb^RJO8QwC}1vD9Gamo-ML1ckX0KsGl_ah>M?jlfnaWPzVb&0m}kcSYm6b^$igH( z67y>N*`MPaP@vozX!mTq$IYcC0qG$rDDY+tOozshRM?&?A@ztY4k+>DUwiV;;p~6w z^#%9J=5ldt8Tw`=5&O$}MWzFk;O>!mymylk=@}PwvrkOf@$iPPM}wI_Ms5=YpfWV0 z;6)`fb{v;Bd$Rd6GP%N)gM%$>tZ3CAwcBt`ZA<_Dx|ej*ZVK5>mbhKtqkAK0;(~RO zxdbx4-{DUBaZ|7BmL;xdp@H|$6u%fb!%zFNCG!7Bh)V;_te|J#=hHF^Ui05kAkso5^h);xh5A z$yTtWA-pt#yZ0-+n-RdVv2)zy4nS32Jb2-DnZsHxdvWEQj>v~i6V*KTe74NoTBw=7 z!YC!|WTW|k{cRfKT3l=qq0|eEXssWu7~S(`L~hmQL5iRV%sCgk>#FaE<%39upr`Z| ziEu(gp6^qMpkp%&7b!P93N1|_*xSrKx+>JOT~#@j$4w7IzG-u-f`!C2N41AWg26P- z12kxudZszhJiO+6=u4e0^!!R4Y^%?^cUPh%7I|UW!(6DJ!i$yV?Bno2v;9=>Hng{Z@T$Zy6Wun zbe5e5S{3+sb5Ge1c;`Z@>+J9IXqwrJ z6fJFGh}*UZr$`&2+7LKYcE|V4K;Cjb)F$nV)%NyR!BkB$y1hRd(m`_#J6$KQWNSrI z6#ErMIv=OqI!e6IN2q)H<1WH-hoJo2^E5EXRMop24f2mj-3?7$xl ziNNzh-|IfJW3bAp>FuxYX4214bfjfhjwCm(@~ z$tFH8y}c^iz@udAw03J;GuGo)89prg{qq8vrg;r;R)VgH1^4)NOq>i_jASxZ!&yav zH&Th%Fbfjmy13|9;_woY5!ji36O)2x8)xSFr+{J(J_VSRAGtnkLWQ2+3Y_>k@sRAs z1EYM9NmsyT%la0J! zFPFP@(fB1Hc=!Fh)#eedww5!NO*;pO@gu5Anb05-@8FwnK+cW8B&J^I`mBH}@K3OO zJyP1w6TfGct!aL=s^}WcA~i)TXfPMe6CZwJ)VP6N)oVJ`(^}*90YHNtkMpZLKaAA= zc@bIFQiAkVO!B4t+Ih~j&MIIdMDFdI90Kn%ej+!3=XOlZL3+lG{!vr1X*kZc3zzXU zX+GRCZB*1*zb)ul6L^>=EO4-kU&{ggwn!N(nO4%z)8RPeYh)@RGONG^vD8;1PHQ;Z zRZ=n@(1MF-OVd_=0JWv{%m-N~H)}F$$mT#4AOt@w=8g~ETOAK45|Yp=8z*-Lar8{6 zdHQfW2-T>HYNO5iJranDj}d!G`sv4uS%T%-eX*J(ijElMso|t;v^6^%Hja{|mmmSe zqGM{gmG-FGCRKPv-tY8~VgTTunit;qL@0RLLLPHW*d_uFZ_Rif(! z{GDpX+gZyg-gLaVS71HbA|U0J$3b=ezXCXL6$HLwoEWnvN$;ycph6?3$5k+zI-N4u z{$%((1=PFT-6!5wP-lv7(Z>XtTAloxh$jH9@%Xq0#xzPW!*}jLQCgs7h1A61#RNDu zGYy`Vqf(W2lP=p8R}|`ao3lU|l=_k8LJ%(mDl!1bYq&kW#PXx>1S4wF6N_rESqApH zq*F5M8gH}&w_Di~p>bqb{Nl>+*>ou}*F`eJ4@VB0wts)sM3xJ-pRM33O!u#l^bPB_ zd2;IQk$7(WypZubdA!?nOLN*rSE>VaCPR-1&uZ9PCVgGw%vUw(oE%p8(gTYpF|6;$ rN+(XL8>muTyn!MkpJ=>bOvbrU>d~C&K>#UhazI literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/assets/javascripts/all-da39a3ee.js b/node_modules/terraformer/docs-build/assets/javascripts/all-da39a3ee.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/terraformer/docs-build/assets/javascripts/classie-b6db1f70.js b/node_modules/terraformer/docs-build/assets/javascripts/classie-b6db1f70.js new file mode 100644 index 0000000..e481577 --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/javascripts/classie-b6db1f70.js @@ -0,0 +1 @@ +!function(s){"use strict";function e(s){return new RegExp("(^|\\s+)"+s+"(\\s+|$)")}function n(s,e){var n=a(s,e)?c:t;n(s,e)}var a,t,c;"classList"in document.documentElement?(a=function(s,e){return s.classList.contains(e)},t=function(s,e){s.classList.add(e)},c=function(s,e){s.classList.remove(e)}):(a=function(s,n){return e(n).test(s.className)},t=function(s,e){a(s,e)||(s.className=s.className+" "+e)},c=function(s,n){s.className=s.className.replace(e(n)," ")});var i={hasClass:a,addClass:t,removeClass:c,toggleClass:n,has:a,add:t,remove:c,toggle:n};"function"==typeof define&&define.amd?define(i):s.classie=i}(window); \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/javascripts/drawer-3a1490eb.js b/node_modules/terraformer/docs-build/assets/javascripts/drawer-3a1490eb.js new file mode 100644 index 0000000..d654731 --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/javascripts/drawer-3a1490eb.js @@ -0,0 +1 @@ +var drawerHandler=function(){function e(){var e=!1;return function(a){(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}function a(){var a=document.getElementById("wrap"),o=document.getElementById("drawer"),t=e()?"touchstart":"click",i=Array.prototype.slice.call(document.querySelectorAll(".toggle"));document.getElementById("main-content");var n=function(){classie.remove(o,"active-left"),classie.remove(o,"active-right"),classie.remove(o,"active-top"),classie.remove(a,"drawer-open")},c=function(e){classie.add(o,e),classie.add(a,"drawer-open")},r=function(){console.log("click"),n(),a.removeEventListener(t,r)};i.forEach(function(e){var o=e.getAttribute("data-direction");e.addEventListener(t,function(e){e.stopPropagation(),e.preventDefault(),c(o),a.addEventListener(t,r),console.log(a)})})}a()}(); \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/assets/javascripts/modernizr.custom-cadc78a2.js b/node_modules/terraformer/docs-build/assets/javascripts/modernizr.custom-cadc78a2.js new file mode 100644 index 0000000..f55b54f --- /dev/null +++ b/node_modules/terraformer/docs-build/assets/javascripts/modernizr.custom-cadc78a2.js @@ -0,0 +1 @@ +window.Modernizr=function(e,t,n){function r(e){g.cssText=e}function o(e,t){return typeof e===t}function i(e,t){return!!~(""+e).indexOf(t)}function a(e,t){for(var r in e){var o=e[r];if(!i(o,"-")&&g[o]!==n)return"pfx"==t?o:!0}return!1}function c(e,t,r){for(var i in e){var a=t[e[i]];if(a!==n)return r===!1?e[i]:o(a,"function")?a.bind(r||t):a}return!1}function l(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+C.join(r+" ")+r).split(" ");return o(t,"string")||o(t,"undefined")?a(i,t):(i=(e+" "+w.join(r+" ")+r).split(" "),c(i,t,n))}var s,u,f,d="2.6.2",p={},m=!0,h=t.documentElement,y="modernizr",v=t.createElement(y),g=v.style,b=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),E="Webkit Moz O ms",C=E.split(" "),w=E.toLowerCase().split(" "),j={},S=[],x=S.slice,N=function(e,n,r,o){var i,a,c,l,s=t.createElement("div"),u=t.body,f=u||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:y+(r+1),s.appendChild(c);return i=["­",'"].join(""),s.id=y,(u?s:f).innerHTML+=i,f.appendChild(s),u||(f.style.background="",f.style.overflow="hidden",l=h.style.overflow,h.style.overflow="hidden",h.appendChild(f)),a=n(s,e),u?s.parentNode.removeChild(s):(f.parentNode.removeChild(f),h.style.overflow=l),!!a},F={}.hasOwnProperty;f=o(F,"undefined")||o(F.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return F.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=x.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=t.prototype;var i=new o,a=t.apply(i,n.concat(x.call(arguments)));return Object(a)===a?a:i}return t.apply(e,n.concat(x.call(arguments)))};return r}),j.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in h.style&&N("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){e=9===t.offsetLeft&&3===t.offsetHeight}),e};for(var k in j)f(j,k)&&(u=k.toLowerCase(),p[u]=j[k](),S.push((p[u]?"":"no-")+u));return p.addTest=function(e,t){if("object"==typeof e)for(var r in e)f(e,r)&&p.addTest(r,e[r]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof m&&m&&(h.className+=" "+(t?"":"no-")+e),p[e]=t}return p},r(""),v=s=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=v.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=y[e[m]];return t||(t={},h++,e[m]=h,y[h]=t),t}function i(e,n,r){if(n||(n=t),u)return n.createElement(e);r||(r=o(n));var i;return i=r.cache[e]?r.cache[e].cloneNode():p.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),i.canHaveChildren&&!d.test(e)?r.frag.appendChild(i):i}function a(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||o(e);for(var i=n.frag.cloneNode(),a=0,c=r(),l=c.length;l>a;a++)i.createElement(c[a]);return i}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return v.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/\w+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(v,t.frag)}function l(e){e||(e=t);var r=o(e);return v.shivCSS&&!s&&!r.hasCSS&&(r.hasCSS=!!n(e,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),u||c(e,r),e}var s,u,f=e.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,m="_html5shiv",h=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="",s="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){s=!0,u=!0}}();var v={elements:f.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:f.shivCSS!==!1,supportsUnknownElements:u,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:l,createElement:i,createDocumentFragment:a};e.html5=v,l(t)}(this,t),p._version=d,p._prefixes=b,p._domPrefixes=w,p._cssomPrefixes=C,p.testProp=function(e){return a([e])},p.testAllProps=l,p.testStyles=N,h.className=h.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(m?" js "+S.join(" "):""),p}(this,this.document),function(e,t,n){function r(e){return"[object Function]"==y.call(e)}function o(e){return"string"==typeof e}function i(){}function a(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function c(){var e=v.shift();g=1,e?e.t?m(function(){("c"==e.t?d.injectCss:d.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),c()):g=0}function l(e,n,r,o,i,l,s){function u(t){if(!p&&a(f.readyState)&&(b.r=p=1,!g&&c(),f.onload=f.onreadystatechange=null,t)){"img"!=e&&m(function(){C.removeChild(f)},50);for(var r in N[n])N[n].hasOwnProperty(r)&&N[n][r].onload()}}var s=s||d.errorTimeout,f=t.createElement(e),p=0,y=0,b={t:r,s:n,e:i,a:l,x:s};1===N[n]&&(y=1,N[n]=[]),"object"==e?f.data=n:(f.src=n,f.type=e),f.width=f.height="0",f.onerror=f.onload=f.onreadystatechange=function(){u.call(this,y)},v.splice(o,0,b),"img"!=e&&(y||2===N[n]?(C.insertBefore(f,E?null:h),m(u,s)):N[n].push(f))}function s(e,t,n,r,i){return g=0,t=t||"j",o(e)?l("c"==t?j:w,e,t,this.i++,n,r,i):(v.splice(this.i++,0,e),1==v.length&&c()),this}function u(){var e=d;return e.loader={load:s,i:0},e}var f,d,p=t.documentElement,m=e.setTimeout,h=t.getElementsByTagName("script")[0],y={}.toString,v=[],g=0,b="MozAppearance"in p.style,E=b&&!!t.createRange().compareNode,C=E?p:h.parentNode,p=e.opera&&"[object Opera]"==y.call(e.opera),p=!!t.attachEvent&&!p,w=b?"object":p?"script":"img",j=p?"script":w,S=Array.isArray||function(e){return"[object Array]"==y.call(e)},x=[],N={},F={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}};d=function(e){function t(e){var t,n,r,e=e.split("!"),o=x.length,i=e.pop(),a=e.length,i={url:i,origUrl:i,prefixes:e};for(n=0;a>n;n++)r=e[n].split("="),(t=F[r.shift()])&&(i=t(i,r));for(n=0;o>n;n++)i=x[n](i);return i}function a(e,o,i,a,c){var l=t(e),s=l.autoCallback;l.url.split(".").pop().split("?").shift(),l.bypass||(o&&(o=r(o)?o:o[e]||o[a]||o[e.split("/").pop().split("?")[0]]),l.instead?l.instead(e,o,i,a,c):(N[l.url]?l.noexec=!0:N[l.url]=1,i.load(l.url,l.forceCSS||!l.forceJS&&"css"==l.url.split(".").pop().split("?").shift()?"c":n,l.noexec,l.attrs,l.timeout),(r(o)||r(s))&&i.load(function(){u(),o&&o(l.origUrl,c,a),s&&s(l.origUrl,c,a),N[l.url]=2})))}function c(e,t){function n(e,n){if(e){if(o(e))n||(f=function(){var e=[].slice.call(arguments);d.apply(this,e),p()}),a(e,f,t,0,s);else if(Object(e)===e)for(l in c=function(){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n}(),e)e.hasOwnProperty(l)&&(!n&&!--c&&(r(f)?f=function(){var e=[].slice.call(arguments);d.apply(this,e),p()}:f[l]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),p()}}(d[l])),a(e[l],f,t,l,s))}else!n&&p()}var c,l,s=!!e.test,u=e.load||e.both,f=e.callback||i,d=f,p=e.complete||i;n(s?e.yep:e.nope,!!u),u&&n(u)}var l,s,f=this.yepnope.loader;if(o(e))a(e,0,f,0);else if(S(e))for(l=0;l + + + + + + Terraformer + + + + + +

    +
    +
    + +
    +
    + +
    +

    Terraformer Core

    + +

    + + Link + Terraformer.Primitive + Back to Top +

    +

    Terraformer Primitives are JavaScript objects that map directly to their GeoJSON couterparts. Converting a GeoJSON object into a Terraformer Primitive will allow you use convenience methods like point.within(polygon).

    + +

    Every Primitive inherits from the Terraformer.Primitive base class, thus all other Primitives share the Terraformer.Primitive methods.

    + +

    There is a Primitive for every type of GeoJSON object, plus a Circle Primitive which represents a circle as a polygon.

    +

    + + Link + Constructor + Back to Top +

    +

    You create a new Terraformer.Primitive object by passing it a valid GeoJSON Object. This will return a Terraformer.Primitive with the same type as your GeoJSON object.

    +
    var point = new Terraformer.Primitive({
    +  type:"Point",
    +  coordinates:[1,2]
    +});
    +
    +point instanceof Terraformer.Point; //-> true
    +point instanceof Terraformer.Primitive; //-> true
    +
    +point.within(polygon) //-> true or false
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    toMercator()thisConverts this GeoJSON object’s coordinates to the web mercator spatial reference.
    toGeographic()thisConverts this GeoJSON object’s coordinates to geographic coordinates.
    envelope()EnvelopeReturns an object with x, y, w and h suitable for passing to most indexes.
    bbox()BBoxReturns the GeoJSON Bounding Box for this primitive.
    convexHull()Polygon or nullReturns the convex hull of this primitive as a Polygon. Will return null if the convex hull cannot be calculated or a valid Polygon cannot be created.
    contains(<Geometry> geometry)BooleanReturns true if the passed GeoJSON Geometry object is completely contained inside this primitive.
    within(<Geometry> geometry)BooleanReturns true if the passed GeoJSON Geometry object is completely within this primitive.
    intersects(<Geometry> geometry)BooleanReturns true if the passed GeoJSON Geometry intersects this primitive.
    +

    + + Link + Terraformer.Point + Back to Top +

    +

    A JavaScript object representing a GeoJSON Point.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.Point can be created by passing a GeoJSON Coordinate Pair like [longitude, latitude], with plain x,y, or a valid GeoJSON Point.

    +
    var point1 = new Terraformer.Point({
    +  type:"Point",
    +  coordinates:[1,2]
    +});
    +
    +var point2 = new Terraformer.Point(1,2);
    +
    +var point3 = new Terraformer.Point([1,2]);
    +
    +

    + + Link + Terraformer.MultiPoint + Back to Top +

    +

    A JavaScript object representing a GeoJSON MultiPoint.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.MultiPoint can be created by passing in a valid GeoJSON MultiPoint, or an array of GeoJSON Coordinates.

    +
    var multipoint1 = new Terraformer.MultiPoint({
    +  type:"MultiPoint",
    +  coordinates:[ [1,2],[2,1] ]
    +});
    +
    +var multipoint2 = new Terraformer.MultiPoint([ [1,2],[2,1] ]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each point. Equivalent to multipoint.coordinates.forEach(function). The function will be called with point, index and coordinates.
    get(<Integer> index)PointReturns a Terraformer.Point for the point at index in the coordinate array.
    addPoint(<Coordinate> coordinate)thisAdds a new coordinate to the end of the coordinate array. Equivalent to multipoint.coordinates.push([3,4]).
    insertPoint(<Coordinate> coordinate, index)thisInserts the passed point at the passed index. Equivalent to multipoint.coordinates.splice(index, 0, point)
    removePoint(<Integer> index or <Coordinate> coordinate)thisRemoves the point at index or the passed Coordinate depending on the type of object passed in.
    +

    + + Link + Terraformer.LineString + Back to Top +

    +

    A JavaScript object representing a GeoJSON LineString.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.LineString can be created by passing in a valid GeoJSON LineString, or an array of GeoJSON Coordinates like [longitude, latitude].

    +
    var linestring = new Terraformer.LineString({
    +  type:"LineString",
    +  coordinates:[ [1,2],[2,1] ]
    +});
    +
    +var linestring = new Terraformer.LineString([ [1,2],[2,1] ]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    addVertex(<Coordinate> coordinate)thisAdds a new coordinate to the end of the coordinate array. Equivalent to linestring.coordinates.push([3,4]).
    insertVertex(<Coordinate> coordinate, <Integer> index)thisInserts the passed coordinate at the passed index. Equivalent to linestring.coordinates.splice(index, 0, point)
    removeVertex(<Integer> index)thisRemoves the coordinate at index. Equivalent to calling linestring.coordinates.splice(remove, 1)
    +

    + + Link + Terraformer.MultiLineString + Back to Top +

    +

    A JavaScript object representing a GeoJSON MultiLineString.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.LineString can be created by passing in a valid GeoJSON MultiLineString, or a GeoJSON MultiLineString coordinate array.

    +
    var multilinestring = new Terraformer.MultiLineString({
    +  type:"LineString",
    +  coordinates:[ [1,2],[2,1] ]
    +});
    +
    +var multilinestring = new Terraformer.MultiLineString([
    +  [[1,1],[2,2],[3,4]],
    +  [[0,1],[0,2],[0,3]]
    +]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each LineString. Equivalent to multilinestring.coordinates.forEach(function). The function will be called with linestring, index and coordinates.
    get(<Integer> index)LineStringReturns a Terraformer.LineString for the LineString at index in the coordinates array.
    +

    + + Link + Terraformer.Polygon + Back to Top +

    +

    A JavaScript object representing a GeoJSON Polygon.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.Polygon can be created by passing in a valid GeoJSON Polygon, or GeoJSON Polygon coordinate array.

    +
    var polygon1 = new Terraformer.Polygon({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +    ]
    + });
    +
    +var polygon2 = new Terraformer.Polygon([
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    addVertex(<Coordinate> coordinate)thisAdds a new coordinate just before the closing coordinate of the linear ring.
    insertVertex(<Coordinate> coordinate, index)thisInserts the passed coordinate at the passed index. Equivalent to polygon.coordinates.splice(index, 0, point)
    removeVertex(<Integer> index)thisRemoves the coordinate at index. Equivalent to calling polygon.coordinates.splice(remove, 1)
    close()thisEnsures that the first and last vertex of the polygon are equal to each other.
    hasHoles()BooleanTrue if this polygon has holes.
    holes()Array <Polygon>Returns an Array of Polygon objects made from each hole in this polygon.
    +

    + + Link + Terraformer.MultiPolygon + Back to Top +

    +

    A JavaScript object representing a GeoJSON MultiPolygon.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.MultiPolygon can be created by passing in a valid GeoJSON MultiPolygon, or an array that is a valid coordinate array for GeoJSON MultiPolygon.

    +
    var multipolygon1 = new Terraformer.MultiPolygon({
    +  "type": "MultiPolygon",
    +  "coordinates": [
    +    [
    +      [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
    +    ],
    +    [
    +      [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +    ]
    +  ]
    +});
    +
    +var multipolygon2 = new Terraformer.MultiPolygon([
    +  [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
    +  ],
    +  [
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each LineString. Equivalent to multipolygon.coordinates.forEach(function). The function will be called with polygon, index and coordinates.
    get(<Integer> index)PolygonReturns a Terraformer.Polygon for the Polygon at index in the coordinate array.
    +

    + + Link + Terraformer.Feature + Back to Top +

    +

    A JavaScript object representing a GeoJSON Feature.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.Feature can be created by passing in a valid GeoJSON Feature or GeoJSON Geometry.

    +
    var feature1 = new Terraformer.Feature({
    +  "type": "Feature",
    +  "geometry": {
    +    "type": "Polygon",
    +    "coordinates": [
    +      [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +      [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +    ]
    +  }
    +});
    +
    +var feature2 = new Terraformer.Feature({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    +

    + + Link + Terraformer.FeatureCollection + Back to Top +

    +

    A JavaScript object representing a GeoJSON FeatureCollection.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.FeatureCollection can be created by passing a valid GeoJSON Feature Collection or an array of GeoJSON Features.

    +
    var featurecollection1 = new Terraformer.FeatureCollection(
    +  "type": "FeatureCollection",
    +  "features": [feature1, feature2]
    +});
    +
    +var featurecollection2 = new Terraformer.FeatureCollection([feature1, feature2]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each Feature. Equivalent to featurecollection.features.forEach(function). The function will be called with feature, index and coordinates.
    get(<Integer> index)FeatureReturns a Terraformer.Feature for the Feature at index in the features array.
    +

    + + Link + Terraformer.GeometryCollection + Back to Top +

    +

    A JavaScript object representing a GeoJSON Geometry Collection.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.GeometryCollection can be created by passing a valid GeoJSON Geometry Collection or an array of GeoJSON Geometries.

    +
    var geometrycollection1 = new Terraformer.GeometryCollection(
    +  "type": "FeatureCollection",
    +  "features": [geometry1, geometry2]
    +});
    +
    +var geometrycollection2 = new Terraformer.GeometryCollection([geometry1, geometry2]);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    forEach(<Function> function)nullIterates over each LineString. Equivalent to geometrycollection.coordinates.forEach(function). The function will be called with geometry, index and coordinates.
    get(<Integer> index)PrimitiveReturns a Terraformer.Primitive for the Geometry at index in the coordinate array.
    +

    + + Link + Terraformer.Circle + Back to Top +

    +

    The GeoJSON spec does not provide a way to visualize circles. Terraformer.Circle is actual a GeoJSON Feature object that contains a Polygon representing a circle with a certain number of sides.

    +

    + + Link + Constructor + Back to Top +

    +

    Terraformer.Circle is created with a center, radius, and steps.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OptionTypeDefaultDescription
    centerCoordinatenullRequired A GeoJSON Coordinate in [x,y] format.
    radiusInteger250The radius of the circle in meters.
    stepsInteger32How many steps will be used to create the polygon that represents the circle.
    +
    circle = new Terraformer.Circle([45.65, -122.27], 500, 64);
    +
    +circle.contains(point);
    +
    +

    + + Link + Methods + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    recalculate()thisRecalculates the circle
    steps(<Integer optional> steps)IntegerReturns the number of steps to produce the polygon representing the circle. If the steps parameter is passed the circle will be recalculated witht he new step count before returning.
    radius(<Integer optional> radius)IntegerReturns the radius circle. If the radius parameter is passed the circle will be recalculated witht he new radius before returning.
    center(<Coordinate optional> center)CoordinatesReturns the center of the circle. If the center parameter is passed the circle will be recalculated with the new center before returning.
    +

    + + Link + Terraformer.Tools + Back to Top +

    +

    Terraformer also has numerous helper methods for working with GeoJSON and geographic data. These tools work with a mix of lower level GeoJSON constructs like Coordinates, Coordinate Arrays and GeoJSON objects and Terraformer Primitives

    +

    + + Link + Spatial Reference Conversions + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    toMercator(<GeoJSON> geojson)GeoJSONConverts this GeoJSON object’s coordinates to the web mercator spatial reference. This is an in-place modification of the passed object.
    toGeographic(<GeoJSON> geojson)GeoJSONConverts this GeoJSON object’s coordinates to geographic coordinates. This is an in-place modification of the passed object.
    applyConverter(<GeoJSON> geojson), function)GeoJSONRuns the passed functionagainst every Coordinate in the geojson object. Your function will be passed a Coordinate and will be expected to return a Coordinate.
    positionToMercator(<Coordinate> coordinate)CoordinateConverts the passed Coordinate to web mercator spatial reference.
    positionToGeographic(<Coordinate> coordinate)CoordinateConverts the passed Coordinate to geographic coordinates.
    +

    + + Link + Calculations + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    calculateBounds(<GeoJSON> geojson)BBoxReturns a GeoJSON bounding box for the passed geoJSON.
    calculateEnvelope(<GeoJSON> geojson)EnvelopeReturns an object with x, y, w, h. Suitable for passing to most indexes.
    convexHull(<GeoJSON> geojson)CoordinatesReturns an array of coordinates representing the convex hull the the passed geoJSON.
    +

    + + Link + Comparisons + Back to Top +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    coordinatesContainPoint(<[Coordinates]> coordinates, <Coordinate> coordinate)BooleanAccepts an array of coordinates and a coordinate and returns true if the point falls within the coordinate array.
    polygonContainsPoint(<Polygon> polygon, <Coordinate> coordinate)BooleanAccepts the geometry of a polygon and a coordinate and returns true if the point falls within the polygon.
    arrayIntersectsArray(<[Coordinates]> coordinates, <[Coordinates]> coordinates)BooleanAccepts two arrays of coordinates and returns true if they cross each other at any point.
    coordinatesEqual(<Coordinate> coordinate, <Coordinate> coordinate)BooleanAccepts two individual coordinate pairs and returns true if the passed coordinate pairs are equal to each other.
    +
    var pt = [0,0];
    +var pt2 = [-111.873779, 40.647303];
    +
    +var polygon = {
    +  "type": "Polygon",
    +  "coordinates": [[
    +    [-112.074279, 40.52215],
    +    [-112.074279, 40.853293],
    +    [-111.610107, 40.853293],
    +    [-111.610107, 40.52215],
    +    [-112.074279, 40.52215]
    +  ]]
    +};
    +
    +var polygonGeometry = polygon.coordinates;
    +
    +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt);
    +// returns false
    +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt2);
    +// returns true
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/favicon.ico b/node_modules/terraformer/docs-build/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..37904b6c7075e99025fef173197d83477721abb8 GIT binary patch literal 6518 zcmeHLd32Li7LV)5c#fkZE{xzHBW0%xEiGM=rb(KmY0_qI_Owa5g>GruEGKbXT&(Aa1iqbW2aJWdUVL*oN~066{S z=x1Myoxfn|Y_-w*>g&4?WWDm*Zn@f6wQK%@6@WG+fm_*H~s0l_) zoNR{K;ptTCZJk`P7hK6a2;`xYZ@qIMZQ#0|-kuxgKKxX(Ilt-vPu2)?;q#EH8jmu)Id1~eCd;TUtuFe6iqZQVY?GP)c!?0T{KAt+5tkS_7UUQh^$ zY94fsXQ4FvA<=We&k;eS5+jbEjCqf>w!E?XJ)uPDIG$fnjA~yENtP?(Ty;X|MjKyP%zRak;7b@B1H-#N%<_Hgj<$I%8$$+3#cD!7Y0^nWReip${l z`%zOYsOF1Lj($CsS^w6aeL`uDXw6t4kzT87M`;dZ-=FDJK5e3X&#sCC4fLp>m8-Y z%uzsL6+oyGL9Hu5jzfifUvbxwkB+f6ShV!H2L;L}SpUix{~86zHVYvjn=$J}N(H2b zbnq1dC~~dHcG$3DUE8dP{kpr)-B>qs;ToVQwa?cYc8fnYl_h0|vP3 z3t+HS?VtDP^5*XD-Www8BkgOizbD}UJvH2n+|u#dureQ zPm?3_uhbqod^DzcN$cZAw|DQWukV+>ylc18ROs8g@afjaKKSsn3E?%peP@0kANHHh4*Xro)>j$3=FpK(;#RMJzWjj)m$ZCyqBANo@2g|SMm5fTvU%;Z zJ4%my{AEmJ{QuGZ*md@{bsM&pYb}+#$HeAz54~TE!Na)FSVAA3?C2W$?YAd}Nmb5+ zgNLPJ$bABgidLM{T58@{zj0@A*SYh5`d@T-?Ty{K44LE8yYCZXc$6GtCaOr(h@Py5 zN@s!27C0oyDLO39G7vA?!4=gbCBuhtadr%gQb3SB^~l@r9ufaq9U5jo+;-a#F2+Y| z5R+g=YK9krtR~7qT9yOz%nryDX4Hjz#M7lPy0;Riw^3f$43m2!?vHk&>7i9m{1W_* zj*g-0Hne+JuiNI!b5!mh9b<${D)!wv$2!8-vHVw5>cM259`UIf#PbR%muzD5 z5tEZ_CEJK6W*~uQIU(0p>?`#?y6tpl*N~sm9?A&H}sQ@Fchpqj%hjZ?=p;xRlw|Oc zdv3Xk4%gMx&1%1M7#}0X%GunYH`^grHxvJEVc*N(t1PXUkf5RbQv++h6PfA->|PoD zF2&yf6YGa9|V+sJ-Z#PM9h7qa{vHA#T>7xy~*>u|cWV@R?Vfm`H zO+!a!LGM@#Gwo$uyyaKpUyd!HyeI4v1?A7NNnEU4_iBK_?;?It>We9Q-Oj;$4H_=&Y0GIwx5(bIml~FIGVr?c8g(4&fgnh#FlQIRkKSqxCKRm|oINfn)Ma|4D zcMea1F3&-=jT2^DA-rB6%E~KYvKCw>4rd8!Yim(i<)!&9`rnQz0w=_p3)rS`osl9F zA~`(|4yqL_wi4K>=3w4^&&Ui^_*=Ggp6U8CBUWv_+xeG=^j*EF>ULZSQ&g&TLuDtR_g15^!@=tIx+i?2%~FKMh--}3@FLJ zjL&myLZoJq53;P7M%cCf8ca--!c)DF!5-8fJM!Gy+jC<@P2;BV@!4#B>!DgXM`J~< zwx3YnV0N?o!|b2YArPoVJXe9}v_lp{?t6Di{9RG&5=f$ztt7$w!v)oc!8@R|J=xJqF#6;iES z)F(`zsjnIRk~35YH9oVFFt51+E{FC$sIs=HZDK+;?a5Cz3$pk!efa!Yi`(e_!koXg z#J}20@EIL~6ccsimx03gk+Bm~?rt09Vwzw$@cKvjUzXpn# zJc@m><|6-^i?$H|tz!9~!DM2Jc|Y?Uj>7@?6gP|=*|~Kgit8X!g^V4R_UX`h=FAa4ge(w}0)n;h)HuARxdOG_&Q7$A}!YABtexdWNsm8bjx)W-g&>CEHuVU=$ht*L8 z4fUC^h-maqx;K@vv65$T)A=r>dzO=G6Cr{#m##T`_S`LRzw@>xDppNCo{nTui1;Oh zDXavkUk9~~xo2*^z%4$OTaqOr#PWm~If>8eQC}ax#3VVzN(LtJ1&B)*AfDP$33RuU zTHvkrA}TJE9gpJ)*!$Y3NlF~};H&hrXFG4tHCBF}Yxz6n(RNsixAv28EfeN7AA8S~ zU*MJ;d-!~-v@X=s`A^^~k*O83=T8wie{umE|5aWuVp1iPf5PX}Ql+JuA^1_(xt^Pu zICy&5ig|IoS{Ao|4)3$M_9Av9moR5MNi0Bre4&cTvHkc*b`d{1MFNqAhsrsWv-5OV zynJUvBnD5O{O(?^B)>yxT6w|NR6F$L@5`~-T>1;~$0v#~wJ{%|Cn}MiRq}1e>8`sY z_)NQg!$$wuL^qq~ern&pX8+~o6?A9K$CEG2MS@6y=Qh9T>5mr70#A`l-$MA1<%#-ghsfR~divHuTp!235dRnAPmn8sM8{{v%EXx4fC=$* z50Gea#|R#@)@l3CoH=*%D859nSL-otkrzvL&PPGO4V5wU-jWp?ealz3dA~pT!_WxM&$Ych z-~^^UxP3%SB61y>WCuRg6X|3V9wrf1Fc5-*_)4a*5WXL&Vk2fOuE$e59>kJ=Jc1Rw z9)>($gZidbSFCq`4xjn|rU*^{j^)ddS8hT1EaJNc8=Gr0Bs#KZXrEF)^+O>& z3v--kZhMsQ=OEZp4Us`d-)ag!f919PhW`fZYI9DXK0RdFiVXps&9_&Q=RB_|c4Fx0 zbjFu^I;n;|b?W4>9DVWo_l}bx$5}u%h`C#3s@}6?dApbHJ3r~`t6^Sgytk+44{z?? zoAJ;i%Vv3l3pRfD{SWs==6!wq>oFDnIh*G%Skv^@o`byJUR?GK=6v@#%CQ%}k3`lE S{2uUo|91=gZh_y91^xpodZm#7 literal 0 HcmV?d00001 diff --git a/node_modules/terraformer/docs-build/geostore/alternate-indexes/index.html b/node_modules/terraformer/docs-build/geostore/alternate-indexes/index.html new file mode 100644 index 0000000..ec22d5a --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/alternate-indexes/index.html @@ -0,0 +1,210 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore Alternate Indexes

    +

    Alternate Indexes are a very powerful way to apply additional filters to your searches on properties of a Feature.

    +

    + + Link + Using Alternate Indexes + Back to Top +

    +

    Alternate Indexes can be added to an existing GeoStore very easily:

    +
    // create an index on the properties.street value
    +gs.addIndex({
    +  property: "street",
    +  index: new BTree()
    +});
    +
    +// create an index on the properties.crime value
    +gs.addIndex({
    +  property: "crime",
    +  index: new BTree()
    +});
    +
    + +

    Queries against Alternate Indexes are very specific to the index, but the basic syntax of a query is straightforward:

    +
    gs.within(
    +  geojson,
    +  {
    +    "name": {
    +      "equals": "Main"
    +    },
    +    "crime": {
    +      "equals": "Arson"
    +    }
    +  },
    +  function (err, res) {
    +    // node.js style callback
    +  }
    +);
    +
    + +

    In this example, first every Feature that is within the GeoJSON is found in the Spatial Index, then each of those entries are searched for in the B-Tree indexes. Only those entries that have a properties.street of “Main” and a properties.crime of “Arson” are returned.

    +

    + + Link + Indexable Data + Back to Top +

    +

    Only data that is available in properties is indexable. When a Feature is added to the GeoStore, the list of Alternate Indexes is scanned, and any property that is found is added to that Alternate Index.

    + +

    Alternate Indexes are asyncronous and use Node.js style callbacks.

    +

    + + Link + Existing Alternate Indexes + Back to Top +

    +

    Terraformer currently ships with a single alternate index, with more coming soon.

    + + +

    + + Link + Writing an Alternate Index + Back to Top +

    +

    Alternate Indexes rely on two methods to be exposed to the GeoStore to add and remove data. Additional methods can be added for querying and are introspected for searching.

    + +

    For instance, when a equals query is made against an Alternate Index, if the equals method is on the index, then it is called with all arguments from the contains or within.

    +

    + + Link + Index.add(value, id, callback) + Back to Top +

    +

    Add a value to the Alternate Index by id.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    valueString or NumberThe value to add to the index
    idString or NumberThe id of the Feature to be added
    callbackfunctionCallback to be fired when the add has been completed
    + +

    Example:

    +
    idx.add(value, id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + Index.remove(value, id, callback) + Back to Top +

    +

    Add a value to the Alternate Index by id.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    valueString or NumberThe value to remove from the index
    idString or NumberThe id of the Feature to be removed
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    idx.add(value, id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/geostore/core-concepts/index.html b/node_modules/terraformer/docs-build/geostore/core-concepts/index.html new file mode 100644 index 0000000..088e482 --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/core-concepts/index.html @@ -0,0 +1,97 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore Core Concepts

    +

    The GeoStore is a spatial database builder. With the GeoStore, you can store your data, index it, and search it.

    +

    + + Link + Indexing + Back to Top +

    +

    Indexes are key to GeoStore performance. The GeoStore uses indexes to look up potential candidates during a search.

    +

    + + Link + Geospatial Indexes + Back to Top +

    +

    Each GeoStore instance requires a Geospatial index (like RTree). These indexes allow for a quick search of possible data that could be within or contain the polygon that you pass in to the GeoStore for a search. It is then later up to math to determine whether the correct data is found.

    +

    + + Link + Alternate Indexes + Back to Top +

    +

    A GeoStore can also have one or more alternate indexes associated with it. These allow for other properties of a Feature to be indexed, such as Crime or Year in order to quickly remove the data from being checked with math.

    +

    + + Link + Storing of the Data + Back to Top +

    +

    Data in a GeoStore can be stored in multiple ways. These Stores can be local, a database, or remote. As long as they conform to the data store model, it does not matter how or where the data is stored.

    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/geostore/data-stores/index.html b/node_modules/terraformer/docs-build/geostore/data-stores/index.html new file mode 100644 index 0000000..7bba77c --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/data-stores/index.html @@ -0,0 +1,251 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore Data Stores

    + + +

    Data stores are the foundation of the GeoStore. They are key/value storage devices that allow for creating entries, updating, deleting, and retrieving single Feature objects in GeoJSON.

    + +

    Data Stores are designed to be asyncronous, using Node.js style callbacks. In syncronough stores, like Terraformer.Store.Memory and Terraformer.Store.LocalStorage callbacks are executed immediately, but in truly asyncronous stores they behave as expected.

    +

    + + Link + Existing Data Stores + Back to Top +

    +

    There are a couple of existing Data Stores that help you get started storing data immediately.

    + + +

    + + Link + Writing a DataStore + Back to Top +

    +

    Since Data Stores are simply key/value stores, it is very easy to write additional Data Stores as long as the method signatures are correct.

    +

    + + Link + Methods + Back to Top +

    + + Link + new DataStore() + Back to Top +

    +

    Instantiating a DataStore should return a new object containing method signatures conforming to the DataStore interface.

    + +

    You can pass any needed arguments while instantiating.

    + +

    Example:

    +
    var ds = new DataStore({
    +  "path": "some_path",
    +  "username": "me",
    +  "password": "mypass"
    +});
    +
    +

    + + Link + DataStore.add(geostore, callback) + Back to Top +

    +

    Add a geojson object to a DataStore. In the case of a Feature, the id should be used as the primary key for storage and retrieval:

    +
    // get the id
    +var id = geojson.id;
    +
    +// store the data
    +this.magicdb.put(geojson.id, JSON.stringify(geojson));
    +
    + +

    If a FeatureCollection is passed in instead, each Feature inside of the FeatureCollection needs to be added before the callback is called.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectMust be either a Feature or FeatureCollection and contain an id
    callbackfunctionCallback to be fired when the add has been completed
    + +

    Example:

    +
    ds.add(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + DataStore.update(geostore, callback) + Back to Top +

    +

    Update a geojson object already in a DataStore. Only a Feature should be able to be updated, the id should be used as the primary key for update:

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectMust be a Feature and contain an id
    callbackfunctionCallback to be fired when the update has been completed
    + +

    Example:

    +
    ds.update(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + DataStore.remove(id, callback) + Back to Top +

    +

    Remove a geojson object from the DataStore by id.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    idString or NumberThe id of the Feature to be removed
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    ds.remove(id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + DataStore.get(id, callback) + Back to Top +

    +

    Retrieves a geojson object from the DataStore by id.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    idString or NumberThe id of the Feature to be retrieved
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    ds.get(id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/geostore/index.html b/node_modules/terraformer/docs-build/geostore/index.html new file mode 100644 index 0000000..55bb3f1 --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/index.html @@ -0,0 +1,409 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore

    + + +

    The Terraformer GeoStore is a set of building blocks for managing spatial data as a GeoJSON Feature or FeatureCollection. It includes functionality for storing and querying data in primarily a spatial manner.

    + +

    GeoStores are broken into three parts: Data Stores, Spatial Indexes, and Alternate Indexes.

    + +

    More in-depth information can be found in Core Concepts.

    +

    + + Link + Using the GeoStore + Back to Top +

    +

    The GeoStore can be used in both the browser and server-side via Node.js. Functionally, they behave the same, but some Data Stores and Indexes will only work in one environment. For instance, LocalStorage will not work by default in Node.js.

    + +

    The GeoStore uses Node.js style callbacks, so most method signatures require a callback function that expects error and response: function (err, res) { }.

    + +

    The GeoStore manages data that is made available as either a Feature or a FeatureCollection. In order to work, there must be an id field.

    +
    {
    +  "type": "Feature",
    +  "properties": {},
    +  "id": "my id",
    +  "geometry": {
    +    "type": "Polygon",
    +    "coordinates": [
    +      [
    +        [
    +          -111.09374, 41.50857
    +        ],
    +        [
    +          -111.09374, 45.08903
    +        ],
    +        [
    +          -105.11718, 45.08903
    +        ],
    +        [
    +          -105.11718, 41.50857
    +        ],
    +        [
    +          -111.09374, 41.50857
    +        ]
    +      ]
    +    ]
    +  }
    +}
    +
    +

    + + Link + Using in the Browser + Back to Top +

    +

    Using the GeoStore in the browser requires including both Terraformer and the GeoStore:

    +
    <script src="https://unpkg.com/terraformer@1.0.7"></script>
    +<script src="https://unpkg.com/terraformer-geostore@1.0.4/browser/terraformer-geostore.js"></script>
    +
    + +

    Once those are included, you can create a new Store. You will need to include both a Data Store and a Spatial Index to instantiate a GeoStore.

    +
    // create a new GeoStore using Memory and an RTree Index
    +var store = new Terraformer.GeoStore({
    +  store: new Terraformer.Store.Memory(),
    +  index: new Terraformer.RTree()
    +});
    +
    + +

    Once the store has been created, you can start using it right away.

    +

    + + Link + Using in Node.js + Back to Top +

    +

    In Node.js, the components are available via require().

    +
    // require geostore, an RTree index, and a LevelDB data store
    +var GeoStore = require('terraformer-geostore').GeoStore;
    +var RTree = require('terraformer-rtree').RTree;
    +var LevelStore = require('terraformer-geostore-leveldb');
    +
    + +

    Once the packages are in scope, it is very similar as using the GeoStore in the browser.

    +
    var store = new GeoStore({
    +  store: new LevelStore(),
    +  index: new RTree()
    +});
    +
    +

    + + Link + Methods + Back to Top +

    + + Link + GeoStore.add(geojson, callback) + Back to Top +

    +

    Add a geojson object to the GeoStore.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectMust be either a Feature or FeatureCollection and contain an id
    callbackfunctionCallback to be fired when the add has been completed
    + +

    Example:

    +
    store.add(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + GeoStore.update(geojson, callback) + Back to Top +

    +

    Update a single geojson Feature in the GeoStore.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectMust be a Feature and contain an id
    callbackfunctionCallback to be fired when the update has been completed
    + +

    Example:

    +
    store.update(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + GeoStore.remove(id, callback) + Back to Top +

    +

    Removes a single geojson Feature by id.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    idString or NumberThe id of the Feature to be removed
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    store.remove(id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + GeoStore.get(id, callback) + Back to Top +

    +

    Retrieves a single geojson Feature by id.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    idString or NumberThe id of the Feature to be retrieved
    callbackfunctionCallback to be fired when the get has been completed
    + +

    Example:

    +
    store.get(id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + GeoStore.contains(geojson, search, callback) + Back to Top +

    +

    Find all Features that contain the geojson primitive passed in. contains can use additional indexes to do set elimination on properties of a Feature.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectA GeoJSON primitive to search with
    search (optional)objectThe second argument is optional. If provided it contains additional search criteria for set elimination
    callbackfunctionCallback to be fired when the contains has been completed
    + +

    Example:

    +
    store.contains(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +store.contains(
    +  geojson,
    +  {
    +    "name":
    +    {
    +      "equals": "Multnomah"
    +    }
    +  },
    +  function (err, res) {
    +    // Node.js style callback
    +  }
    +);
    +
    +

    + + Link + GeoStore.within(geojson, search, callback) + Back to Top +

    +

    Find all Features that are within the geojson primitive passed in. within can use additional indexes to do set elimination on properties of a Feature.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSONobjectA GeoJSON primitive to search with
    search (optional)objectThe second argument is optional. If provided it contains additional search criteria for set elimination
    callbackfunctionCallback to be fired when the within has been completed
    + +

    Example:

    +
    store.within(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +store.within(
    +  geojson,
    +  {
    +    "name":
    +    {
    +      "equals": "Multnomah"
    +    }
    +  },
    +  function (err, res) {
    +    // Node.js style callback
    +  }
    +);
    +
    +

    + + Link + GeoStore.createReadStream() + Back to Top +

    +

    GeoStore supports readable streams in both the browser and Nodejs. Currently only flowing streams are supported. Streams can be created with the createReadStream() method. When a stream has been created, the next within or contains request uses that stream in place of a callback. It is important to note that the stream only lasts for the duration of a single search via within or contains.

    + +

    The stream will emit data on any data, and end with the final entry found.

    + +

    Since streams are not reentrant in the GeoStore, it is recommended to create a new GeoStore for each stream. Streams are destroyed after the end event has been called.

    + +

    Example:

    +
    var stream = store.createReadStream();
    +
    +stream.on("data", function (geojson) {
    +  // found geojson
    +});
    +
    +stream.on("end", function (geojson) {
    +  // final geojson object
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/geostore/spatial-indexes/index.html b/node_modules/terraformer/docs-build/geostore/spatial-indexes/index.html new file mode 100644 index 0000000..2835187 --- /dev/null +++ b/node_modules/terraformer/docs-build/geostore/spatial-indexes/index.html @@ -0,0 +1,250 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    GeoStore Spatial Indexes

    + + +

    Spatial Indexes are an extremely important part of the GeoStore. Spatial Indexes allow for very quick elimination of Features and are part of the core of the GeoStore.

    + +

    Spatial Indexes are asyncronous and use Node.js style callbacks.

    +

    + + Link + Existing Spatial Indexes + Back to Top +

    +

    Terraformer currently ships with a single spatial index, with more coming soon.

    + +
      +
    • RTree - RTree Index, works in Node.js and the browser
    • +
    +

    + + Link + Writing a Spatial Index + Back to Top +

    +

    Spatial Indexes are designed for searching spatial data, whether in 2D or 3D. The Terraformer GeoStore platform has defined a set of indexes that allow for multiple spatial index types to be used. As long as the methods are asyncronous and conform to the Terraformer GeoStore interface, any type of spatial index can be used.

    +

    + + Link + Methods + Back to Top +

    + + Link + new SpatialIndex() + Back to Top +

    +

    Instantiating a SpatialIndex should return a new object containing method signatures conforming to the SpatialIndex interface.

    + +

    You can pass any needed arguments while instantiating.

    + +

    Example:

    +
    var si = new SpatialIndex({
    +  "width": 45,
    +  "dateline": false
    +});
    +
    +

    + + Link + SpatialIndex.insert(geojson | envelope, id, callback) + Back to Top +

    +

    Add a geojson object or envelope to a SpatialIndex. It is important to include an id, as this is the key that is returned from searches.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSON or EnvelopeobjectMust be either GeoJSON or Envelope
    idString or NumberThe id of the spatial area
    callbackfunctionCallback to be fired when the insert has been completed
    + +

    Example:

    +
    si.insert(geojson, id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + SpatialIndex.remove(geojson | envelope, id, callback) + Back to Top +

    +

    Remove a geojson or envelope object already in a SpatialIndex.

    + + + + + + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSON or EnvelopeobjectMust be either GeoJSON or Envelope
    idString or NumberThe id of the spatial area
    callbackfunctionCallback to be fired when the remove has been completed
    + +

    Example:

    +
    si.remove(geojson, id, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + SpatialIndex.search(geojson | envelope, callback) + Back to Top +

    +

    Searches for any id’s that can contain the geojson or envelope passed in. These are returned as an Array.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSON or EnvelopeobjectMust be either GeoJSON or Envelope
    callbackfunctionCallback to be fired when the search has been completed
    + +

    Example:

    +
    si.search(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    +

    + + Link + SpatialIndex.within(geojson | envelope, callback) + Back to Top +

    +

    Searches for any id’s that are within the geojson or envelope passed in. These are returned as an Array.

    + + + + + + + + + + + + + + + + + + +
    OptionValueDescription
    GeoJSON or EnvelopeobjectMust be either GeoJSON or Envelope
    callbackfunctionCallback to be fired when the search has been completed
    + +

    Example:

    +
    si.within(geojson, function (err, res) {
    +  // Node.js style callback
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/getting-started/index.html b/node_modules/terraformer/docs-build/getting-started/index.html new file mode 100644 index 0000000..8961ccd --- /dev/null +++ b/node_modules/terraformer/docs-build/getting-started/index.html @@ -0,0 +1,177 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    Terraformer

    + + +

    Terraformer is an open source (MIT licensed) Javascript geo toolkit, built for the server and the browser.

    +

    + + Link + Getting Started + Back to Top +

    +

    Terraformer is broken into multiple small packages to give you the functionality you need while still remaining extremely lightweight.

    + +

    There are currently several packages in the Terraformer ecosystem.

    + +
      +
    • Terraformer - The core library for manipilating GeoJSON and performaing calculations. Most other modules rely on terraformer.
    • +
    • ArcGIS Parser - Parses ArcGIS geometry objects to GeoJSON and vice-versa.
    • +
    • WKT Parser - Parses basic WKT (Well Known Text) strings to and from GeoJSON.
    • +
    • GeoStore - A JavaScript database for storing and querying collections of GeoJSON Features. GeoStores also need an index module and a backing store which are distributed as seperate modules.
    • +
    +

    + + Link + Node.js + Back to Top +

    +

    Install the core module with NPM and then require it in your Node program.

    +
    $ npm install terraformer
    +
    +
    var Terraformer = require('terraformer');
    +
    + +

    If needed, supporting packages can be added too.

    +
    require('terraformer-arcgis-parser');
    +require('terraformer-wkt-parser');
    +require('terraformer-geostore');
    +
    +

    + + Link + Browser + Back to Top +

    +

    To use the Terraformer library, include a reference to it using a <script> tag.

    +
    <script src="https://unpkg.com/terraformer@1.0.7"></script>
    +
    + +

    To utilize supporting packages, you must load their source as well.

    +
    <script src="https://unpkg.com/terraformer-arcgis-parser@1.0.5"></script>
    +<script src="https://unpkg.com/terraformer-wkt-parser@1.1.2"></script> 
    +
    + +

    To see Terraformer in action in the browser, check out our live demos.

    +

    + + Link + Working with Primitives + Back to Top +

    +

    Most of the core Terraformer libray centers around using Primitives, which wrap GeoJSON objects and provide additional functionality.

    + +

    You can create a new Terraformer.Primitive with any GeoJSON object.

    +
    
    +var polygon = new Terraformer.Primitive({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [
    +      [-122.66589403152467, 45.52290150862236],
    +      [-122.66926288604736, 45.52291654238294],
    +      [-122.67115116119385, 45.518406234030586],
    +      [-122.67325401306151, 45.514000817199715],
    +      [-122.6684260368347, 45.5127377671934],
    +      [-122.66765356063841, 45.51694782364431],
    +      [-122.66589403152467, 45.52290150862236 ]
    +    ]
    +  ]
    +});
    +
    +var point = new Terraformer.Primitive({
    +  "type": "Point",
    +  "coordinates": [-122.66947746276854, 45.51775972687403]
    +});
    +
    + +

    Now that you have a point and a polygon primitive, you can use many of the primitive helper methods.

    +
    // add a new vertex to our polygon
    +polygon.insertVertex([-122.6708507537842, 45.513188859735436], 2);
    +
    +// figure out if our point is within our polygon
    +point.within(polygon); // returns true
    +
    + +

    You can also have Terraformer perform many geometric operations like convex hulls and bounding boxes.

    +
    var convexHull = polygon.convexHull();
    +
    +point.within(convexHull); // returns true
    +
    +var boundingBox = polygon.bbox(); // returns the geojson bounding box for this object.
    +
    +

    + + Link + Whats Next? + Back to Top +

    +

    Start exploring all the options you have working with Primitives and the core library. Then start exploring other modules.

    + +

    Terraformer GeoStore is a JavaScript database for indexing and querying large amounds of GeoJSON. You can use multiple types of spatial indexes and backing stores for your data.

    + +

    You can also convert data between different formats like ArcGIS Geometries and Well Known Text. Since Terraformer is a modular framework, you can pick and choose the pieces to use in your own application.

    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/glossary/index.html b/node_modules/terraformer/docs-build/glossary/index.html new file mode 100644 index 0000000..3bd33d9 --- /dev/null +++ b/node_modules/terraformer/docs-build/glossary/index.html @@ -0,0 +1,449 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    Glossary

    + +

    + + Link + GeoJSON + Back to Top +

    +

    Terraformer uses the GeoJSON specification as a guide on how to format all representation of geographical data.

    +

    + + Link + Coordinate + Back to Top +

    +

    A coordinate is the building block for the rest of the GeoJSON specification. It is represented by an array of x, y integers. The ordering of x and y are important, this means that when representing latitude and longitiude the order is [longitude, latitude].

    +
    [-122.680, 45.528]
    +
    + +

    GeoJSON Coordinate

    +

    + + Link + Coordinates + Back to Top +

    +

    An array of Coordinate objects that are used to define a line or polygon.

    +
    [
    +  [-122.680, 45.58],
    +  [-123.230, 45.62],
    +  [-122.80, 45.22]
    +]
    +
    + +

    GeoJSON Coordinate

    +

    + + Link + Bbox + Back to Top +

    +

    A GeoJSON bounding box is usually a 4-item array representing the rectangle that will contain the GeoJSON object.

    +
    [-122.70, 45.51, -122.64, 45.53]
    +
    + +

    GeoJSON BBox

    +

    + + Link + Geometry + Back to Top +

    +

    “GeoJSON Geometry” refers to any of the single geometry objects from the geoJSON specification like Point, MultiPoint, LineString, MultiLineString, Polygon, or MultiPolygon.

    + +

    GeoJSON Geometry

    +

    + + Link + Point + Back to Top +

    +

    An object representing a single point.

    +
    {
    +  "type": "Point",
    +  "coordinates": [-105.01621, 39.57422]
    +}
    +
    + +

    GeoJSON Point

    +

    + + Link + MultiPoint + Back to Top +

    +

    An object representing multiple points as a single coordinate array.

    +
    {
    +  "type": "MultiPoint",
    +  "coordinates": [ [-105.01, 39.57], [-80.66, 35.05] ]
    +}
    +
    + +

    GeoJSON MultiPoint

    +

    + + Link + LineString + Back to Top +

    +

    A series of coordinates that form a line.

    +
    {
    +  "type": "LineString",
    +  "coordinates": [
    +    [-101.5, 39.662],
    +    [-101.75, 39.2415],
    +    [-101.64, 39.2415],
    +  ]
    +}
    +
    + +

    GeoJSON LineString

    +

    + + Link + MultiLineString + Back to Top +

    +

    An object that represents multiple linestrings in a single object.

    +
    {
    +  "type": "MultiLineString",
    +  "coordinates": [
    +    [
    +      [-101.5, 39.662],
    +      [-101.75, 39.2415],
    +      [-101.23, 39.2415],
    +      [-101.749, 39.7984],
    +      [-101.5, 39.011]
    +    ],[
    +      [-99.23, 38.6605],
    +      [-99.56, 38.727],
    +      [-99.25, 38.018]
    +    ],[
    +      [-98.499, 38.913],
    +      [-98.499, 38.913],
    +      [-98.38, 38.15],
    +      [-97.5, 38.629]
    +    ]
    +  ]
    +}
    +
    + +

    GeoJSON MultiLineString

    +

    + + Link + Polygon + Back to Top +

    +

    An array of coordinates defining a polygon.

    +
    {
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [41.83, 71.01], [56.95, 33.75], [21.79, 36.56], [41.83, 71.01] ]
    +  ]
    +}
    +
    + +

    GeoJSON Polygon

    +

    + + Link + MultiPolygon + Back to Top +

    +

    An object that represents multiple polygons in a single object.

    +
    {
    +  "type": "MultiPolygon",
    +  "coordinates": [
    +    [
    +      [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]
    +    ],
    +    [
    +      [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
    +    ]
    +  ]
    +}
    +
    + +

    GeoJSON MultiPolygon

    +

    + + Link + Feature + Back to Top +

    +

    GeoJSON Features combine a Geometry object with a unique identifier and set of metadata.

    +
    {
    +  "type": "Feature",
    +  "id": "stadium",
    +  "geometry": {
    +    "type": "Point",
    +    "coordinates": [-104.99404, 39.75621]
    +  },
    +  "properties": {
    +    "name": "Coors Field",
    +    "amenity": "Baseball Stadium",
    +    "popupContent": "This is where the Rockies play!"
    +  }
    +}
    +
    + +

    Feature

    +

    + + Link + FeatureCollection + Back to Top +

    +

    Contains multiple Features objects in a single object.

    +
    {
    +  "type": "FeatureCollection",
    +  "features": [
    +    {
    +      "type": "Feature",
    +      "geometry": {
    +        "type": "Point",
    +        "coordinates": [-80.83775386582222, 35.24980190252168]
    +      },
    +      "properties": {
    +        "name": "DOUBLE OAKS CENTER",
    +        "address": "1326 WOODWARD AV"
    +      }
    +    },
    +    {
    +      "type": "Feature",
    +      "geometry": {
    +        "type": "Point",
    +        "coordinates": [-80.83827000459532, 35.25674709224663]
    +      },
    +      "properties": {
    +        "name": "DOUBLE OAKS NEIGHBORHOOD PARK",
    +        "address": "2605  DOUBLE OAKS RD"
    +      }
    +    }
    +  ]
    +}
    +
    + +

    FeatureCollection

    +

    + + Link + GeometryCollection + Back to Top +

    +

    Contains multiple Geometry objects in a single object.

    +
    {
    +  "type": "GeometryCollection",
    +  "geometries": [{
    +    "type": "Polygon",
    +    "coordinates": [
    +      [ [41.83, 71.01], [56.95, 33.75], [21.79, 36.56], [41.83, 71.01] ]
    +    ]
    +    },{
    +      "type": "MultiPoint",
    +      "coordinates": [ [100, 0], [45, -122] ]
    +    }
    +  ]
    +}
    +
    + +

    GeometryCollection

    +

    + + Link + Terraformer Primitives + Back to Top +

    +

    Terraformer Primitives wrap their GeoJSON counterparts to provide extra functionality.

    +

    + + Link + Point Primitive + Back to Top +

    +

    An object respresenting a GeoJSON Point

    + +

    Point

    +

    + + Link + MultiPoint Primitive + Back to Top +

    +

    An object respresenting a GeoJSON MultiPoint

    + +

    MultiPoint

    +

    + + Link + LineString Primitive + Back to Top +

    +

    An object respresenting a GeoJSON LineString

    + +

    LineString

    +

    + + Link + MultiLineString Primitive + Back to Top +

    +

    An object respresenting a GeoJSON MultiLineString

    + +

    MultiLineString

    +

    + + Link + Polygon Primitive + Back to Top +

    +

    An object respresenting a GeoJSON Polygon

    + +

    Polygon

    +

    + + Link + MultiPolygon Primitive + Back to Top +

    +

    An object respresenting a GeoJSON MultiPolygon

    + +

    MultiPolygon

    +

    + + Link + Feature Primitive + Back to Top +

    +

    An object respresenting a GeoJSON Feature

    + +

    Feature

    +

    + + Link + FeatureCollection Primitive + Back to Top +

    +

    An object respresenting a GeoJSON FeatureCollection

    + +

    FeatureCollection

    +

    + + Link + GeometryCollection Primitive + Back to Top +

    +

    An object respresenting a GeoJSON GeometryCollection

    + +

    GeometryCollection

    +

    + + Link + Circle Primitive + Back to Top +

    +

    An object representing a GeoJSON Feature which contains a polygonal representation of a circle.

    + +

    Circle

    +

    + + Link + Misc + Back to Top +

    + + Link + Envelope + Back to Top +

    +

    Envelopes are a common structure for indexes like Terraformer.RTree.

    +
    {
    +  x: 1,
    +  y: 1,
    +  w: 15
    +  h: 15
    +}
    +
    +

    + + Link + Convex Hull + Back to Top +

    +

    Convex

    +
    {
    +  x: 1,
    +  y: 1,
    +  w: 15
    +  h: 15
    +}
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/index.html b/node_modules/terraformer/docs-build/index.html new file mode 100644 index 0000000..9535705 --- /dev/null +++ b/node_modules/terraformer/docs-build/index.html @@ -0,0 +1,172 @@ + + + + + + + + + + Home | Terraformer + + + + + + + + +
    +
    + +
    +
    +
    +
    +

    terraformer

    +

    A thing that does stuff to your data so you can map gooder.

    + +
    +
    + +
    +
    + terraformer core +

    Terraformer Core

    +

    + Documentation + Get Core +

    +
    + +
    +

    Tools and objects for working with and transforming GeoJSON.

    +
    + +

    The core Terraformer library provides a series of Terraformer.Primitives which wrap GeoJSON objects for additional functionality and a series of Terraformer.Tools for manipulating and performing calculations on coordinates.

    + +

    You can also use the core library to see if an object contains or intersects another object, convert an object to a different spatial reference, or transform an object’s coordinates.

    + +

    The core library is also used in most other components of Terraformer for performing basic tasks and calculations.

    + +
    + terraformer geostore +

    GeoStore

    +

    + Documentation + Get GeoStore +

    +
    + +
    +

    A lightweight API that allows you to store, index and query geographic data.

    +
    + +

    GeoStore is a lightweight API that allows you to store, index and query geographic data with a variety of indexes and persistence methods. Each GeoStore consists of…

    + +
      +
    1. A spatial index which is responsible for indexing and optimizing the geographic data in the store.

    2. +
    3. A data store which is responsible for persisting data, either holding it in memory or persisting it to a backend database.

    4. +
    5. Any number of secondary indexes which index properties associated with your geographic data.

    6. +
    + +
    + terraformer ArcGIS Parser +

    ArcGIS Parser

    +

    + Documentation + Get ArcGIS Parser +

    +
    + +

    Allows you to convert between Terraformer Primitives or GeoJSON and the ArcGIS Geometry Objects.

    +
    // parse ArcGIS JSON, convert it to a Terraformer.Primitive
    +var primitive = Terraformer.ArcGIS.parse({
    +  x:"-122.6764",
    +  y:"45.5165",
    +  spatialReference: {
    +    wkid: 4326
    +  }
    +});
    +
    +// take a Terraformer.Primitive or GeoJSON and convert it to ArcGIS JSON
    +var point = Terraformer.ArcGIS.convert({
    +  "type": "Point",
    +  "coordinates": [45.5165, -122.6764]
    +});
    +
    + +
    + terraformer WKT Parser +

    Well Known Text Parser

    +

    + Documentation + Get WKT Parser +

    +
    + +

    Well Known Text is a format used by databases like PostGIS. With Terraformer’s WKT parser you can convert between this format and GeoJSON.

    +
    // parse a WKT file, convert it into a primitive
    +var primitive = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
    +
    +// take a primitive and convert it into a WKT representation
    +var polygon = Terraformer.WKT.convert({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    + +
    + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/install/index.html b/node_modules/terraformer/docs-build/install/index.html new file mode 100644 index 0000000..127d511 --- /dev/null +++ b/node_modules/terraformer/docs-build/install/index.html @@ -0,0 +1,155 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    Getting Terraformer

    + + +

    We make Terraformer available via npm, bower and via a CDN.

    +

    + + Link + Terraformer Core + Back to Top +

    +

    Node npm install terraformer

    + +

    Bower bower install terraformer

    + +

    Download +CDN

    +

    + + Link + ArcGIS Parser + Back to Top +

    +

    Node npm install terraformer-arcgis-parser

    + +

    Bower bower install terraformer-arcgis-parser

    + +

    Download +CDN

    +

    + + Link + WKT Parser + Back to Top +

    +

    Node npm install terraformer-wkt-parser

    + +

    Bower bower install terraformer-wkt-parser

    + +

    Download +CDN

    +

    + + Link + GeoStore + Back to Top +

    +

    Node npm install terraformer-geostore

    + +

    Bower bower install terraformer-geostore

    + +

    Download +CDN

    +

    + + Link + RTree Index + Back to Top +

    +

    Node npm install terraformer-rtree

    + +

    Bower bower install terraformer-rtree

    + +

    Download +CDN

    +

    + + Link + Memory Store + Back to Top +

    +

    Node npm install terraformer-geostore-memory

    + +

    Bower bower install terraformer-geostore-memory

    + +

    Download +CDN

    +

    + + Link + LocalStorage Store + Back to Top +

    +

    Node npm install terraformer-geostore-localstorage

    + +

    Bower bower install terraformer-geostore-localstorage

    + +

    Download +CDN

    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/cover/index.html b/node_modules/terraformer/docs-build/partials/cover/index.html new file mode 100644 index 0000000..e63b478 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/cover/index.html @@ -0,0 +1,10 @@ +
    +
    +

    terraformer

    +

    A thing that does stuff to your data so you can map gooder.

    + +
    +
    \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/doctoc/index.html b/node_modules/terraformer/docs-build/partials/doctoc/index.html new file mode 100644 index 0000000..809e67d --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/doctoc/index.html @@ -0,0 +1,23 @@ +
    +
    + +
    +
    \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/footer/index.html b/node_modules/terraformer/docs-build/partials/footer/index.html new file mode 100644 index 0000000..4e95355 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/footer/index.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/index_partials/arcgis_parser/index.html b/node_modules/terraformer/docs-build/partials/index_partials/arcgis_parser/index.html new file mode 100644 index 0000000..819f197 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/index_partials/arcgis_parser/index.html @@ -0,0 +1,25 @@ +
    + terraformer ArcGIS Parser +

    ArcGIS Parser

    +

    + Documentation + Get ArcGIS Parser +

    +
    + +

    Allows you to convert between Terraformer Primitives or GeoJSON and the ArcGIS Geometry Objects.

    +
    // parse ArcGIS JSON, convert it to a Terraformer.Primitive
    +var primitive = Terraformer.ArcGIS.parse({
    +  x:"-122.6764",
    +  y:"45.5165",
    +  spatialReference: {
    +    wkid: 4326
    +  }
    +});
    +
    +// take a Terraformer.Primitive or GeoJSON and convert it to ArcGIS JSON
    +var point = Terraformer.ArcGIS.convert({
    +  "type": "Point",
    +  "coordinates": [45.5165, -122.6764]
    +});
    +
    diff --git a/node_modules/terraformer/docs-build/partials/index_partials/geostore/index.html b/node_modules/terraformer/docs-build/partials/index_partials/geostore/index.html new file mode 100644 index 0000000..98235ea --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/index_partials/geostore/index.html @@ -0,0 +1,20 @@ +
    + terraformer geostore +

    GeoStore

    +

    + Documentation + Get GeoStore +

    +
    + +
    +

    A lightweight API that allows you to store, index and query geographic data.

    +
    + +

    GeoStore is a lightweight API that allows you to store, index and query geographic data with a variety of indexes and persistence methods. Each GeoStore consists of…

    + +
      +
    1. A spatial index which is responsible for indexing and optimizing the geographic data in the store.

    2. +
    3. A data store which is responsible for persisting data, either holding it in memory or persisting it to a backend database.

    4. +
    5. Any number of secondary indexes which index properties associated with your geographic data.

    6. +
    diff --git a/node_modules/terraformer/docs-build/partials/index_partials/terraformer_core/index.html b/node_modules/terraformer/docs-build/partials/index_partials/terraformer_core/index.html new file mode 100644 index 0000000..0f8ba53 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/index_partials/terraformer_core/index.html @@ -0,0 +1,18 @@ +
    + terraformer core +

    Terraformer Core

    +

    + Documentation + Get Core +

    +
    + +
    +

    Tools and objects for working with and transforming GeoJSON.

    +
    + +

    The core Terraformer library provides a series of Terraformer.Primitives which wrap GeoJSON objects for additional functionality and a series of Terraformer.Tools for manipulating and performing calculations on coordinates.

    + +

    You can also use the core library to see if an object contains or intersects another object, convert an object to a different spatial reference, or transform an object’s coordinates.

    + +

    The core library is also used in most other components of Terraformer for performing basic tasks and calculations.

    diff --git a/node_modules/terraformer/docs-build/partials/index_partials/wkt_parser/index.html b/node_modules/terraformer/docs-build/partials/index_partials/wkt_parser/index.html new file mode 100644 index 0000000..b842eca --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/index_partials/wkt_parser/index.html @@ -0,0 +1,22 @@ +
    + terraformer WKT Parser +

    Well Known Text Parser

    +

    + Documentation + Get WKT Parser +

    +
    + +

    Well Known Text is a format used by databases like PostGIS. With Terraformer’s WKT parser you can convert between this format and GeoJSON.

    +
    // parse a WKT file, convert it into a primitive
    +var primitive = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
    +
    +// take a primitive and convert it into a WKT representation
    +var polygon = Terraformer.WKT.convert({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    diff --git a/node_modules/terraformer/docs-build/partials/nav/index.html b/node_modules/terraformer/docs-build/partials/nav/index.html new file mode 100644 index 0000000..b832bf0 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/nav/index.html @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/partials/subnav/index.html b/node_modules/terraformer/docs-build/partials/subnav/index.html new file mode 100644 index 0000000..001cf49 --- /dev/null +++ b/node_modules/terraformer/docs-build/partials/subnav/index.html @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/node_modules/terraformer/docs-build/wkt-parser/index.html b/node_modules/terraformer/docs-build/wkt-parser/index.html new file mode 100644 index 0000000..1e0687a --- /dev/null +++ b/node_modules/terraformer/docs-build/wkt-parser/index.html @@ -0,0 +1,147 @@ + + + + + + + Terraformer + + + + + + +
    +
    + +
    +
    + +
    +

    WKT Parser

    + + +

    Well Known Text is a format used by databases like PostGIS. With Terraformer’s WKT parser you can convert between this format and GeoJSON.

    +

    + + Link + Using the WKT Parser + Back to Top +

    +

    The WKT parser can be used client-side in a browser and server-side via Node.js.

    +
    // parse a WKT string, converting it into a Terraformer.Primitive
    +var geojson = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
    +
    +// take a primitive and convert it into a WKT representation
    +var polygon = Terraformer.WKT.convert({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    +

    + + Link + Using in the Browser + Back to Top +

    +

    In the browser, the core Terraformer library is required.

    +
    <script src="terraformer.min.js"></script>
    +<script src="terraformer-wkt-parser.min.js"></script>
    +<script>
    +  //Terraformer and Terraformer.WKT will be defined.
    +</script>
    +
    + +

    You can also use Bower to install the components if you like, or download them and host them yourself.

    +
    $ bower install terraformer-wkt-parser
    +
    +

    + + Link + Using in Node.js + Back to Top +

    +

    Just install the package from NPM with $ npm install terraformer-wkt-parser. Then include it in your application.

    +
    var WKT = require('terraformer-wkt-parser');
    +
    +// Start using the parse and convert methods!
    +
    +

    + + Link + Methods + Back to Top +

    + + Link + WKT.parse(string) + Back to Top +

    +

    Terraformer.WKT.parse(string) - Used to convert a POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON or MULTIPOLYGON WKT string into a Terraformer.Primitive.

    +
    var geojson = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
    +
    +

    + + Link + WKT.convert(geojson) + Back to Top +

    +

    Terraformer.WKT.convert(geoJSON) will turn a GeoJSON Point, MultiPoint, LineString, MultiLineString, Polygon or MultiPolygon geometry object or a Terraformer Primitive into WKT.

    +
    Example
    var polygon = Terraformer.WKT.convert({
    +  "type": "Polygon",
    +  "coordinates": [
    +    [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
    +    [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
    +  ]
    +});
    +
    + +
    + + + + + + + + \ No newline at end of file diff --git a/node_modules/terraformer/gruntfile.js b/node_modules/terraformer/gruntfile.js new file mode 100755 index 0000000..79e459d --- /dev/null +++ b/node_modules/terraformer/gruntfile.js @@ -0,0 +1,161 @@ +var fs = require('fs'); + +module.exports = function (grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + + jshint: { + files: [ 'gruntfile.js', 'terraformer.js' ], + options: { + node: true + } + }, + + uglify: { + options: { + report: 'gzip', + banner: '/*! Terraformer JS - <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' + + '* https://github.com/esri/Terraformer\n' + + '* Copyright (c) <%= grunt.template.today("yyyy") %> Environmental Systems Research Institute, Inc.\n' + + '* Licensed MIT */' + }, + terraformer: { + src: ['terraformer.js'], + dest: 'terraformer.min.js' + }, + versioned: { + src: ['terraformer.js'], + dest: 'terraformer-<%= pkg.version %>.min.js' + } + }, + + jasmine: { + coverage: { + src: [ + "terraformer.js" + ], + options: { + specs: 'spec/*Spec.js', + helpers: 'spec/*Helpers.js', + //keepRunner: true, + outfile: 'SpecRunner.html', + template: require('grunt-template-jasmine-istanbul'), + templateOptions: { + coverage: './.coverage/coverage.json', + report: './.coverage', + thresholds: { + lines: 90, + statements: 90, + branches: 90, + functions: 90 + } + } + } + } + }, + + jasmine_node: { + options: { + forceExit: true, + match: '.', + matchall: false, + extensions: 'js', + specNameMatcher: 'Spec', + helperNameMatcher: 'Helpers' + }, + all: ['spec/'] + }, + + complexity: { + generic: { + src: [ 'terraformer.js' ], + options: { + jsLintXML: 'complexity.xml', // create XML JSLint-like report + errorsOnly: false, // show only maintainability errors + cyclomatic: 6, + halstead: 15, + maintainability: 65 + } + } + }, + + s3: { + options: { + key: '<%= aws.key %>', + secret: '<%= aws.secret %>', + bucket: '<%= aws.bucket %>', + access: 'public-read', + headers: { + // 1 Year cache policy (1000 * 60 * 60 * 24 * 365) + "Cache-Control": "max-age=630720000, public", + "Expires": new Date(Date.now() + 63072000000).toUTCString() + } + }, + dev: { + upload: [ + { + src: 'terraformer-<%= pkg.version %>.min.js', + dest: 'terraformer/<%= pkg.version %>/terraformer.min.js' + } + ] + }, + }, + + 'gh-pages': { + options: { + base: 'docs-build', + repo: 'git@github.com:Esri/Terraformer.git', + branch: 'gh-pages' + }, + src: ['**'] + }, + + middleman: { + server: { + options: { + useBundle: true + } + }, + build: { + options: { + useBundle: true, + server: false, + command: "build" + } + } + }, + + copy: { + main: { + files: [ + // includes files within path and its sub-directories + {expand: true, src: ['examples/browser/**'], dest: 'docs-build/'} + ], + }, + } + + }); + + var awsExists = fs.existsSync(process.env.HOME + '/terraformer-s3.json'); + + if (awsExists) { + grunt.config.set('aws', grunt.file.readJSON(process.env.HOME + '/terraformer-s3.json')); + } + + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-complexity'); + grunt.loadNpmTasks('grunt-contrib-jasmine'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-jasmine-node'); + grunt.loadNpmTasks('grunt-s3'); + grunt.loadNpmTasks('grunt-gh-pages'); + grunt.loadNpmTasks('grunt-middleman'); + + grunt.registerTask('test', ['jshint', 'jasmine_node', 'jasmine']); + grunt.registerTask('version', ['test', 'uglify', 's3']); + grunt.registerTask('default', ['test']); + grunt.registerTask('docs-build', ['middleman:build', 'copy']); + grunt.registerTask('deploy-docs', ['middleman:build', 'copy', 'gh-pages']); +}; diff --git a/node_modules/terraformer/package.json b/node_modules/terraformer/package.json new file mode 100644 index 0000000..39fedb3 --- /dev/null +++ b/node_modules/terraformer/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "terraformer@1.0.8", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "terraformer@1.0.8", + "_id": "terraformer@1.0.8", + "_inBundle": false, + "_integrity": "sha1-UeCtiXRvzyFh3G9lqnDkI3fItZM=", + "_location": "/terraformer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "terraformer@1.0.8", + "name": "terraformer", + "escapedName": "terraformer", + "rawSpec": "1.0.8", + "saveSpec": null, + "fetchSpec": "1.0.8" + }, + "_requiredBy": [ + "/terraformer-wkt-parser" + ], + "_resolved": "https://registry.npmjs.org/terraformer/-/terraformer-1.0.8.tgz", + "_spec": "1.0.8", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Patrick Arlt", + "email": "parlt@esri.com", + "url": "http://patrickarlt.com" + }, + "bugs": { + "url": "https://github.com/esri/terraformer/issues" + }, + "contributors": [ + { + "name": "Patrick Arlt", + "email": "parlt@esri.com", + "url": "http://patrickarlt.com" + }, + { + "name": "Jerry Sievert", + "email": "jsievert@esri.com", + "url": "http://legitimatesounding.com" + } + ], + "dependencies": { + "@types/geojson": "^1.0.0" + }, + "description": "A Geo-toolkit built in Javascript.", + "devDependencies": { + "gh-release": "^2.1.0", + "grunt": "0.4.x", + "grunt-complexity": "~0.1.3", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-jasmine": "~0.4.2", + "grunt-contrib-jshint": "0.6.x", + "grunt-contrib-uglify": "~2.0.0", + "grunt-gh-pages": "~0.8.1", + "grunt-jasmine-node": "^0.3.1", + "grunt-middleman": "~0.1.0", + "grunt-s3": "~0.2.0-alpha.3", + "grunt-template-jasmine-istanbul": "~0.2.4", + "phantomjs-prebuilt": "^2.1.4", + "tslint": "^4.5.1", + "typescript": "^2.2.1" + }, + "engines": { + "node": ">=4.2.6" + }, + "homepage": "https://github.com/esri/terraformer#readme", + "license": "MIT", + "main": "terraformer.js", + "name": "terraformer", + "repository": { + "type": "git", + "url": "git://github.com/esri/terraformer.git" + }, + "scripts": { + "release": "./release.sh", + "test": "grunt test", + "test:ts": "tslint test.ts index.d.ts && tsc -p tsconfig.json && node test.js" + }, + "typings": "terraformer.d.ts", + "version": "1.0.8" +} diff --git a/node_modules/terraformer/release.sh b/node_modules/terraformer/release.sh new file mode 100755 index 0000000..8b4aebb --- /dev/null +++ b/node_modules/terraformer/release.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# config +VERSION=$(node --eval "console.log(require('./package.json').version);") +NAME=$(node --eval "console.log(require('./package.json').name);") + +# build and test +npm test || exit 1 + +# checkout temp branch for release +git checkout -b gh-release + +# create built library (and versioned copy) +grunt uglify + +# force add files +git add terraformer.min.js -f + +# commit changes with a versioned commit message +git commit -m "build $VERSION" + +# push commit so it exists on GitHub when we run gh-release +git push upstream gh-release + +# run gh-release to create the tag and push release to github +gh-release --assets $NAME-$VERSION.min.js + +# checkout master and delete release branch locally and on GitHub +git checkout master +git branch -D gh-release +git push upstream :gh-release + +# publish release on NPM +npm publish + +# push to s3 bucket +grunt s3 \ No newline at end of file diff --git a/node_modules/terraformer/spec/geojsonHelpers.js b/node_modules/terraformer/spec/geojsonHelpers.js new file mode 100755 index 0000000..07dfd9b --- /dev/null +++ b/node_modules/terraformer/spec/geojsonHelpers.js @@ -0,0 +1,392 @@ +(function (root, factory) { + + if(typeof module === 'object' && typeof module.exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + exports = module.exports = factory(); + }else if(typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory); + } else { + root.GeoJSON = factory(); + } + + if(typeof jasmine === "object") { + root.GeoJSON = factory(); + } + +}(this, function(){ + var exports = { + points : [ + { + "type": "Point", + "coordinates": [112, 0] + }, + { + "type": "Point", + "coordinates": [-105.01621,39.57422] + }, + { + "type": "Point", + "coordinates": [100, 0] + } + ], + multiPoints : [ + { + "type": "MultiPoint", + "coordinates": [ [100, 0],[45, -122] ] + }, + { + "type": "MultiPoint", + "coordinates": [ [-105.01621,39.57422],[-80.6665134,35.0539943] ] + } + ], + lineStrings : [ + { + "type": "LineString", + "coordinates": [ [100, 0],[45, -122], [-60, 45] ] + }, + { + "type": "LineString", + "coordinates": [ [-100, 40], [-105, 45], [-110, 55] ] + }, + { + "type": "LineString", + "coordinates": [ [-105, 40], [-110, 45], [-115, 55] ] + }, + { + "type": "LineString", + "coordinates": [ [-101.744384765625,39.32155002466662],[-101.5521240234375,39.330048552942415],[-101.40380859375,39.330048552942415],[-101.33239746093749,39.364032338047984],[-101.041259765625,39.36827914916011],[-100.975341796875,39.30454987014581],[-100.9149169921875,39.24501680713314],[-100.843505859375,39.16414104768742],[-100.8050537109375,39.104488809440475],[-100.491943359375,39.10022600175347],[-100.43701171875,39.095962936305476],[-100.338134765625,39.095962936305476],[-100.1953125,39.027718840211605],[-100.008544921875,39.01064750994083],[-99.86572265625,39.00211029922512],[-99.6844482421875,38.97222194853654],[-99.51416015625,38.929502416386605],[-99.38232421875,38.92095542046727],[-99.3218994140625,38.89530825492018],[-99.1131591796875,38.86965182408357],[-99.0802001953125,38.85682013474361],[-98.82202148437499,38.85682013474361],[-98.44848632812499,38.84826438869913],[-98.20678710937499,38.84826438869913],[-98.02001953125,38.8782049970615],[-97.635498046875,38.87392853923629] ] + } + ], + multiLineStrings : [ + { + "type": "MultiLineString", + "coordinates": [ + [ [41.83,71.01],[56.95,33.75] ], + [ [21.79,36.56],[47.83,71.01] ] + ] + }, + { + "type": "MultiLineString", + "coordinates": [ + [ [-105.0214433670044,39.57805759162015],[-105.02150774002075,39.57780951131517],[-105.02157211303711,39.57749527498758],[-105.02157211303711,39.57716449836683],[-105.02157211303711,39.57703218727656],[-105.02152919769287,39.57678410330158] ], + [ [-105.01989841461182,39.574997872470774],[-105.01959800720215,39.57489863607502],[-105.01906156539916,39.57478286010041] ], + [ [-105.01717329025269,39.5744024519653],[-105.01698017120361,39.574385912433804],[-105.0166368484497,39.574385912433804],[-105.01650810241699,39.5744024519653],[-105.0159502029419,39.574270135602866] ], + [ [-105.0142765045166,39.57397242286402],[-105.01412630081175,39.57403858136094],[-105.0138258934021,39.57417089816531],[-105.01331090927124,39.57445207053608] ] + ] + } + ], + polygons : [ + { + "type": "Polygon", + "coordinates": [ + [ [41.83,71.01],[56.95,33.75],[21.79,36.56],[41.83,71.01] ] + ] + }, + { + "type": "Polygon", + "coordinates": [ + [ [-84.32281494140625,34.9895035675793],[-84.29122924804688,35.21981940793435],[-84.24041748046875,35.25459097465022],[-84.22531127929688,35.266925688950074],[-84.20745849609375,35.26580442886754],[-84.19921875,35.24674063355999],[-84.16213989257812,35.24113278166642],[-84.12368774414062,35.24898366572645],[-84.09072875976562,35.24898366572645],[-84.08798217773438,35.264683153268116],[-84.04266357421875,35.27701633139884],[-84.03030395507812,35.291589484566124],[-84.0234375,35.306160014550784],[-84.03305053710936,35.32745068492882],[-84.03579711914062,35.34313496028189],[-84.03579711914062,35.348735749472546],[-84.01657104492188,35.35545618392078],[-84.01107788085938,35.37337460834958],[-84.00970458984374,35.39128905521763],[-84.01931762695312,35.41479572901859],[-84.00283813476562,35.429344044107154],[-83.93692016601562,35.47409160773029],[-83.91220092773438,35.47632833265728],[-83.88885498046875,35.504282143299655],[-83.88473510742186,35.516578738902936],[-83.8751220703125,35.52104976129943],[-83.85314941406249,35.52104976129943],[-83.82843017578125,35.52104976129943],[-83.8092041015625,35.53446133418443],[-83.80233764648438,35.54116627999813],[-83.76800537109374,35.56239491058853],[-83.7432861328125,35.56239491058853],[-83.71994018554688,35.56239491058853],[-83.67050170898438,35.569097520776054],[-83.6334228515625,35.570214567965984],[-83.61007690429688,35.576916524038616],[-83.59634399414061,35.574682600980914],[-83.5894775390625,35.55904339525896],[-83.55239868164062,35.56574628576276],[-83.49746704101562,35.563512051219696],[-83.47000122070312,35.586968406786475],[-83.4466552734375,35.60818490437746],[-83.37936401367188,35.63609277863135],[-83.35739135742188,35.65618041632016],[-83.32305908203124,35.66622234103479],[-83.3148193359375,35.65394870599763],[-83.29971313476561,35.660643649881614],[-83.28598022460938,35.67180064238771],[-83.26126098632811,35.6907639509368],[-83.25714111328125,35.69968630125201],[-83.25576782226562,35.715298012125295],[-83.23516845703125,35.72310272092263],[-83.19808959960936,35.72756221127198],[-83.16238403320312,35.753199435570316],[-83.15826416015625,35.76322914549896],[-83.10333251953125,35.76991491635478],[-83.08685302734375,35.7843988251953],[-83.0511474609375,35.787740890986576],[-83.01681518554688,35.78328477203738],[-83.001708984375,35.77882840327371],[-82.96737670898438,35.793310688351724],[-82.94540405273438,35.820040281161],[-82.9193115234375,35.85121343450061],[-82.9083251953125,35.86902116501695],[-82.90557861328125,35.87792352995116],[-82.91244506835938,35.92353244718235],[-82.88360595703125,35.94688293218141],[-82.85614013671875,35.951329861522666],[-82.8424072265625,35.94243575255426],[-82.825927734375,35.92464453144099],[-82.80670166015625,35.927980690382704],[-82.80532836914062,35.94243575255426],[-82.77923583984375,35.97356075349624],[-82.78060913085938,35.99245209055831],[-82.76138305664062,36.00356252895066],[-82.69546508789062,36.04465753921525],[-82.64465332031249,36.060201412392914],[-82.61306762695312,36.060201412392914],[-82.60620117187499,36.033552893400376],[-82.60620117187499,35.991340960635405],[-82.60620117187499,35.97911749857497],[-82.5787353515625,35.96133453736691],[-82.5677490234375,35.951329861522666],[-82.53067016601562,35.97244935753683],[-82.46475219726562,36.006895355244666],[-82.41668701171875,36.070192281208456],[-82.37960815429686,36.10126686921446],[-82.35488891601562,36.117908916563685],[-82.34115600585936,36.113471382052175],[-82.29583740234375,36.13343831245866],[-82.26287841796874,36.13565654678543],[-82.23403930664062,36.13565654678543],[-82.2216796875,36.154509006695],[-82.20382690429688,36.15561783381855],[-82.19009399414062,36.144528857027744],[-82.15438842773438,36.15007354140755],[-82.14065551757812,36.134547437460064],[-82.1337890625,36.116799556445024],[-82.12142944335938,36.10570509327921],[-82.08984375,36.10792411128649],[-82.05276489257811,36.12678323326429],[-82.03628540039062,36.12900165569652],[-81.91268920898438,36.29409768373033],[-81.89071655273438,36.30959215409138],[-81.86325073242188,36.33504067209607],[-81.83029174804688,36.34499652561904],[-81.80145263671875,36.35605709240176],[-81.77947998046874,36.34610265300638],[-81.76162719726562,36.33835943134047],[-81.73690795898438,36.33835943134047],[-81.71905517578125,36.33835943134047],[-81.70669555664062,36.33504067209607],[-81.70669555664062,36.342784223707234],[-81.72317504882812,36.357163062654365],[-81.73278808593749,36.379279167407965],[-81.73690795898438,36.40028364332352],[-81.73690795898438,36.41354670392876],[-81.72454833984374,36.423492513472326],[-81.71768188476562,36.445589751779174],[-81.69845581054688,36.47541104282962],[-81.69845581054688,36.51073994146672],[-81.705322265625,36.53060536411363],[-81.69158935546875,36.55929085774001],[-81.68060302734375,36.56480607840351],[-81.68197631835938,36.58686302344181],[-81.04202270507812,36.56370306576917],[-80.74264526367186,36.561496993252575],[-79.89120483398438,36.54053616262899],[-78.68408203124999,36.53943280355122],[-77.88345336914062,36.54053616262899],[-76.91665649414062,36.54163950596125],[-76.91665649414062,36.55046568575947],[-76.31103515625,36.551568887374],[-75.79605102539062,36.54936246839778],[-75.6298828125,36.07574221562703],[-75.4925537109375,35.82226734114509],[-75.3936767578125,35.639441068973916],[-75.41015624999999,35.43829554739668],[-75.43212890625,35.263561862152095],[-75.487060546875,35.18727767598896],[-75.5914306640625,35.17380831799959],[-75.9210205078125,35.04798673426734],[-76.17919921875,34.867904962568744],[-76.41540527343749,34.62868797377061],[-76.4593505859375,34.57442951865274],[-76.53076171875,34.53371242139567],[-76.5911865234375,34.551811369170494],[-76.651611328125,34.615126683462194],[-76.761474609375,34.63320791137959],[-77.069091796875,34.59704151614417],[-77.376708984375,34.45674800347809],[-77.5909423828125,34.3207552752374],[-77.8326416015625,33.97980872872457],[-77.9150390625,33.80197351806589],[-77.9754638671875,33.73804486328907],[-78.11279296875,33.8521697014074],[-78.2830810546875,33.8521697014074],[-78.4808349609375,33.815666308702774],[-79.6728515625,34.8047829195724],[-80.782470703125,34.836349990763864],[-80.782470703125,34.91746688928252],[-80.9307861328125,35.092945313732635],[-81.0516357421875,35.02999636902566],[-81.0516357421875,35.05248370662468],[-81.0516357421875,35.137879119634185],[-82.3150634765625,35.19625600786368],[-82.3590087890625,35.19625600786368],[-82.40295410156249,35.22318504970181],[-82.4688720703125,35.16931803601131],[-82.6885986328125,35.1154153142536],[-82.781982421875,35.06147690849717],[-83.1060791015625,35.003003395276714],[-83.616943359375,34.99850370014629],[-84.05639648437499,34.985003130171066],[-84.22119140625,34.985003130171066],[-84.32281494140625,34.9895035675793] ], + [ [-75.69030761718749,35.74205383068037], [-75.5914306640625,35.74205383068037], [-75.5419921875,35.585851593232356], [-75.56396484375,35.32633026307483], [-75.69030761718749,35.285984736065735], [-75.970458984375,35.16482750605027], [-76.2066650390625,34.994003757575776], [-76.300048828125,35.02999636902566], [-76.409912109375,35.07946034047981], [-76.5252685546875,35.10642805736423], [-76.4208984375,35.25907654252574], [-76.3385009765625,35.294952147406576], [-76.0858154296875,35.29943548054543], [-75.948486328125,35.44277092585766], [-75.8660888671875,35.53669637839501], [-75.772705078125,35.567980458012094], [-75.706787109375,35.634976650677295], [-75.706787109375,35.74205383068037], [-75.69030761718749,35.74205383068037] ] + ] + }, + { + "type": "Polygon", + "coordinates": [ + [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ], + [ [100.2, 0.2],[100.8, 0.2],[100.8, 0.8],[100.2, 0.8],[100.2, 0.2] ] + ] + } + ], + multiPolygons : [ + { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] + ], + [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] + ] + ] + }, + { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [-84.32281494140625,34.9895035675793],[-84.29122924804688,35.21981940793435],[-84.24041748046875,35.25459097465022],[-84.22531127929688,35.266925688950074],[-84.20745849609375,35.26580442886754],[-84.19921875,35.24674063355999],[-84.16213989257812,35.24113278166642],[-84.12368774414062,35.24898366572645],[-84.09072875976562,35.24898366572645],[-84.08798217773438,35.264683153268116],[-84.04266357421875,35.27701633139884],[-84.03030395507812,35.291589484566124],[-84.0234375,35.306160014550784],[-84.03305053710936,35.32745068492882],[-84.03579711914062,35.34313496028189],[-84.03579711914062,35.348735749472546],[-84.01657104492188,35.35545618392078],[-84.01107788085938,35.37337460834958],[-84.00970458984374,35.39128905521763],[-84.01931762695312,35.41479572901859],[-84.00283813476562,35.429344044107154],[-83.93692016601562,35.47409160773029],[-83.91220092773438,35.47632833265728],[-83.88885498046875,35.504282143299655],[-83.88473510742186,35.516578738902936],[-83.8751220703125,35.52104976129943],[-83.85314941406249,35.52104976129943],[-83.82843017578125,35.52104976129943],[-83.8092041015625,35.53446133418443],[-83.80233764648438,35.54116627999813],[-83.76800537109374,35.56239491058853],[-83.7432861328125,35.56239491058853],[-83.71994018554688,35.56239491058853],[-83.67050170898438,35.569097520776054],[-83.6334228515625,35.570214567965984],[-83.61007690429688,35.576916524038616],[-83.59634399414061,35.574682600980914],[-83.5894775390625,35.55904339525896],[-83.55239868164062,35.56574628576276],[-83.49746704101562,35.563512051219696],[-83.47000122070312,35.586968406786475],[-83.4466552734375,35.60818490437746],[-83.37936401367188,35.63609277863135],[-83.35739135742188,35.65618041632016],[-83.32305908203124,35.66622234103479],[-83.3148193359375,35.65394870599763],[-83.29971313476561,35.660643649881614],[-83.28598022460938,35.67180064238771],[-83.26126098632811,35.6907639509368],[-83.25714111328125,35.69968630125201],[-83.25576782226562,35.715298012125295],[-83.23516845703125,35.72310272092263],[-83.19808959960936,35.72756221127198],[-83.16238403320312,35.753199435570316],[-83.15826416015625,35.76322914549896],[-83.10333251953125,35.76991491635478],[-83.08685302734375,35.7843988251953],[-83.0511474609375,35.787740890986576],[-83.01681518554688,35.78328477203738],[-83.001708984375,35.77882840327371],[-82.96737670898438,35.793310688351724],[-82.94540405273438,35.820040281161],[-82.9193115234375,35.85121343450061],[-82.9083251953125,35.86902116501695],[-82.90557861328125,35.87792352995116],[-82.91244506835938,35.92353244718235],[-82.88360595703125,35.94688293218141],[-82.85614013671875,35.951329861522666],[-82.8424072265625,35.94243575255426],[-82.825927734375,35.92464453144099],[-82.80670166015625,35.927980690382704],[-82.80532836914062,35.94243575255426],[-82.77923583984375,35.97356075349624],[-82.78060913085938,35.99245209055831],[-82.76138305664062,36.00356252895066],[-82.69546508789062,36.04465753921525],[-82.64465332031249,36.060201412392914],[-82.61306762695312,36.060201412392914],[-82.60620117187499,36.033552893400376],[-82.60620117187499,35.991340960635405],[-82.60620117187499,35.97911749857497],[-82.5787353515625,35.96133453736691],[-82.5677490234375,35.951329861522666],[-82.53067016601562,35.97244935753683],[-82.46475219726562,36.006895355244666],[-82.41668701171875,36.070192281208456],[-82.37960815429686,36.10126686921446],[-82.35488891601562,36.117908916563685],[-82.34115600585936,36.113471382052175],[-82.29583740234375,36.13343831245866],[-82.26287841796874,36.13565654678543],[-82.23403930664062,36.13565654678543],[-82.2216796875,36.154509006695],[-82.20382690429688,36.15561783381855],[-82.19009399414062,36.144528857027744],[-82.15438842773438,36.15007354140755],[-82.14065551757812,36.134547437460064],[-82.1337890625,36.116799556445024],[-82.12142944335938,36.10570509327921],[-82.08984375,36.10792411128649],[-82.05276489257811,36.12678323326429],[-82.03628540039062,36.12900165569652],[-81.91268920898438,36.29409768373033],[-81.89071655273438,36.30959215409138],[-81.86325073242188,36.33504067209607],[-81.83029174804688,36.34499652561904],[-81.80145263671875,36.35605709240176],[-81.77947998046874,36.34610265300638],[-81.76162719726562,36.33835943134047],[-81.73690795898438,36.33835943134047],[-81.71905517578125,36.33835943134047],[-81.70669555664062,36.33504067209607],[-81.70669555664062,36.342784223707234],[-81.72317504882812,36.357163062654365],[-81.73278808593749,36.379279167407965],[-81.73690795898438,36.40028364332352],[-81.73690795898438,36.41354670392876],[-81.72454833984374,36.423492513472326],[-81.71768188476562,36.445589751779174],[-81.69845581054688,36.47541104282962],[-81.69845581054688,36.51073994146672],[-81.705322265625,36.53060536411363],[-81.69158935546875,36.55929085774001],[-81.68060302734375,36.56480607840351],[-81.68197631835938,36.58686302344181],[-81.04202270507812,36.56370306576917],[-80.74264526367186,36.561496993252575],[-79.89120483398438,36.54053616262899],[-78.68408203124999,36.53943280355122],[-77.88345336914062,36.54053616262899],[-76.91665649414062,36.54163950596125],[-76.91665649414062,36.55046568575947],[-76.31103515625,36.551568887374],[-75.79605102539062,36.54936246839778],[-75.6298828125,36.07574221562703],[-75.4925537109375,35.82226734114509],[-75.3936767578125,35.639441068973916],[-75.41015624999999,35.43829554739668],[-75.43212890625,35.263561862152095],[-75.487060546875,35.18727767598896],[-75.5914306640625,35.17380831799959],[-75.9210205078125,35.04798673426734],[-76.17919921875,34.867904962568744],[-76.41540527343749,34.62868797377061],[-76.4593505859375,34.57442951865274],[-76.53076171875,34.53371242139567],[-76.5911865234375,34.551811369170494],[-76.651611328125,34.615126683462194],[-76.761474609375,34.63320791137959],[-77.069091796875,34.59704151614417],[-77.376708984375,34.45674800347809],[-77.5909423828125,34.3207552752374],[-77.8326416015625,33.97980872872457],[-77.9150390625,33.80197351806589],[-77.9754638671875,33.73804486328907],[-78.11279296875,33.8521697014074],[-78.2830810546875,33.8521697014074],[-78.4808349609375,33.815666308702774],[-79.6728515625,34.8047829195724],[-80.782470703125,34.836349990763864],[-80.782470703125,34.91746688928252],[-80.9307861328125,35.092945313732635],[-81.0516357421875,35.02999636902566],[-81.0516357421875,35.05248370662468],[-81.0516357421875,35.137879119634185],[-82.3150634765625,35.19625600786368],[-82.3590087890625,35.19625600786368],[-82.40295410156249,35.22318504970181],[-82.4688720703125,35.16931803601131],[-82.6885986328125,35.1154153142536],[-82.781982421875,35.06147690849717],[-83.1060791015625,35.003003395276714],[-83.616943359375,34.99850370014629],[-84.05639648437499,34.985003130171066],[-84.22119140625,34.985003130171066],[-84.32281494140625,34.9895035675793] ], + [ [-75.69030761718749,35.74205383068037],[-75.5914306640625,35.74205383068037],[-75.5419921875,35.585851593232356],[-75.56396484375,35.32633026307483],[-75.69030761718749,35.285984736065735],[-75.970458984375,35.16482750605027],[-76.2066650390625,34.994003757575776],[-76.300048828125,35.02999636902566],[-76.409912109375,35.07946034047981],[-76.5252685546875,35.10642805736423],[-76.4208984375,35.25907654252574],[-76.3385009765625,35.294952147406576],[-76.0858154296875,35.29943548054543],[-75.948486328125,35.44277092585766],[-75.8660888671875,35.53669637839501],[-75.772705078125,35.567980458012094],[-75.706787109375,35.634976650677295],[-75.706787109375,35.74205383068037],[-75.69030761718749,35.74205383068037] ] + ], + [ + [ [-109.0283203125,36.98500309285596],[-109.0283203125,40.97989806962013],[-102.06298828125,40.97989806962013],[-102.06298828125,37.00255267215955],[-109.0283203125,36.98500309285596] ] + ] + ] + }, + { + "type": "MultiPolygon", + "coordinates": [ + [ + [[102.0, 2.0],[103.0, 2.0],[103.0, 3.0],[102.0, 3.0],[102.0, 2.0]] + ], + [ + [[100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0]], + [[100.2, 0.2],[100.8, 0.2],[100.8, 0.8],[100.2, 0.8],[100.2, 0.2]] + ] + ] + } + ], + features : [ + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [41.83,71.01],[56.95,33.75],[21.79,36.56],[41.83,71.01] ] + ] + }, + "id": "foo", + "properties": { + "bar": "baz" + } + }, + { + "type": "Feature", + "id": "stadium", + "properties": { + "name": "Coors Field", + "amenity": "Baseball Stadium", + "popupContent": "This is where the Rockies play!" + }, + "geometry": { + "type": "Point", + "coordinates": [-104.99404, 39.75621] + } + }, + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [-80.72487831115721,35.26545403190955],[-80.72135925292969,35.26727607954368],[-80.71517944335938,35.26769654625573],[-80.7125186920166,35.27035945142482],[-80.70857048034668,35.268257165144064],[-80.70479393005371,35.268397319259996],[-80.70324897766113,35.26503355355979],[-80.71088790893555,35.2553619492954],[-80.71681022644043,35.2553619492954],[-80.7150936126709,35.26054831539319],[-80.71869850158691,35.26026797976481],[-80.72032928466797,35.26061839914875],[-80.72264671325684,35.26033806376283],[-80.72487831115721,35.26545403190955] ] + ] + }, + "properties": { + "name": "Plaza Road Park" + } + } + ], + featureCollections : [ + { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "id": "foo", + "properties": { + "foo": "bar" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [41.83,71.01],[56.95,33.75],[21.79,36.56],[41.83,71.01] ] + ] + } + }], + "properties": { + "bar": "baz" + } + }, + { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "properties": {"party": "Republican"}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [-104.05, 48.99],[-97.22, 48.98],[-96.58, 45.94],[-104.03, 45.94],[-104.05, 48.99] ] + ] + } + },{ + "type": "Feature", + "properties": {"party": "Democrat"}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [-109.05, 41.00],[-102.06, 40.99],[-102.03, 36.99],[-109.04, 36.99],[-109.05, 41.00] ] + ] + } + }] + }, + { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.87088507656375,35.21515162500578] + }, + "properties": { + "name": "ABBOTT NEIGHBORHOOD PARK", + "address": "1300 SPRUCE ST" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.83775386582222,35.24980190252168] + }, + "properties": { + "name": "DOUBLE OAKS CENTER", + "address": "1326 WOODWARD AV" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.83827000459532,35.25674709224663] + }, + "properties": { + "name": "DOUBLE OAKS NEIGHBORHOOD PARK", + "address": "2605 DOUBLE OAKS RD" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.83697759172735,35.25751734669229] + }, + "properties": { + "name": "DOUBLE OAKS POOL", + "address": "1200 NEWLAND RD" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.81647652154736,35.40148708491418] + }, + "properties": { + "name": "DAVID B. WAYMER FLYING REGIONAL PARK", + "address": "15401 HOLBROOKS RD" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [-80.83556459443902,35.39917224760999] + }, + "properties": { + "name": "DAVID B. WAYMER COMMUNITY PARK", + "address": "302 HOLBROOKS RD" + } + }, + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ [-80.72487831115721,35.26545403190955],[-80.72135925292969,35.26727607954368],[-80.71517944335938,35.26769654625573],[-80.7125186920166,35.27035945142482],[-80.70857048034668,35.268257165144064],[-80.70479393005371,35.268397319259996],[-80.70324897766113,35.26503355355979],[-80.71088790893555,35.2553619492954],[-80.71681022644043,35.2553619492954],[-80.7150936126709,35.26054831539319],[-80.71869850158691,35.26026797976481],[-80.72032928466797,35.26061839914875],[-80.72264671325684,35.26033806376283],[-80.72487831115721,35.26545403190955] ] + ] + }, + "properties": { + "name": "Plaza Road Park" + } + } + ] + }, + { + "type": "FeatureCollection", + "features": [{ + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [102.0, 0.5] + }, + "properties": { + "prop0": "value0" + } + }, { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [102.0, 0.0], + [103.0, 1.0], + [104.0, 0.0], + [105.0, 1.0] + ] + }, + "properties": { + "prop0": "value0", + "prop1": 0.0 + } + }, { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [100.0, 0.0], + [101.0, 0.0], + [101.0, 1.0], + [100.0, 1.0], + [100.0, 0.0] + ] + ] + }, + "properties": { + "prop0": "value0", + "prop1": { + "this": "that" + } + } + }] + } + ], + geometryCollections : [ + { + "type": "GeometryCollection", + "geometries": [{ + "type": "Polygon", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75],[21.796875,36.5625],[41.8359375,71.015625] ] + ] + },{ + "type": "MultiPoint", + "coordinates": [ [100, 0],[45, -122] ] + } + ] + }, + { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-80.66080570220947,35.04939206472683] + }, + { + "type": "Polygon", + "coordinates": [ + [ [-80.66458225250244,35.04496519190309],[-80.66344499588013,35.04603679820616],[-80.66258668899536,35.045580049697556],[-80.66387414932251,35.044280059194946],[-80.66458225250244,35.04496519190309] ] + ] + }, + { + "type": "LineString", + "coordinates": [ [-80.66237211227417,35.05950973022538],[-80.66269397735596,35.0592638296087],[-80.66284418106079,35.05893010615862],[-80.66308021545409,35.05833291342246],[-80.66359519958496,35.057753281001425],[-80.66387414932251,35.05740198662245],[-80.66441059112549,35.05703312589789],[-80.66486120223999,35.056787217822475],[-80.66541910171509,35.05650617911516],[-80.66563367843628,35.05631296444281],[-80.66601991653441,35.055891403570705],[-80.66619157791138,35.05545227534804],[-80.66619157791138,35.05517123204622],[-80.66625595092773,35.05489018777713],[-80.6662130355835,35.054222703761525],[-80.6662130355835,35.05392409072499],[-80.66595554351807,35.05290528508858],[-80.66569805145262,35.052044560077285],[-80.66550493240356,35.0514824490509],[-80.665762424469,35.05048117920187],[-80.66617012023926,35.04972582715769],[-80.66651344299316,35.049286665781096],[-80.66692113876343,35.0485313026898],[-80.66700696945189,35.048215102112344],[-80.66707134246826,35.04777593261294],[-80.66704988479614,35.04738946150025],[-80.66696405410767,35.04698542156371],[-80.66681385040283,35.046353007216055],[-80.66659927368164,35.04596652937105],[-80.66640615463257,35.04561518428889],[-80.6659984588623,35.045193568195565],[-80.66552639007568,35.044877354697526],[-80.6649899482727,35.04454357245502],[-80.66449642181396,35.04417465365292],[-80.66385269165039,35.04387600387859],[-80.66303730010986,35.043717894732545] ] + } + ] + } + ] + }; + + return exports; + +})); \ No newline at end of file diff --git a/node_modules/terraformer/spec/spatialReferenceSpec.js b/node_modules/terraformer/spec/spatialReferenceSpec.js new file mode 100755 index 0000000..e651c22 --- /dev/null +++ b/node_modules/terraformer/spec/spatialReferenceSpec.js @@ -0,0 +1,537 @@ +if(typeof module === "object"){ + var Terraformer = require("../terraformer.js"); +} + +describe("Spatial Reference Converters", function(){ + it("should convert a GeoJSON Point to Web Mercator", function(){ + var input = { + "type": "Point", + "coordinates": [-122, 45] + }; + var expectedOutput = { + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiPoint to Web Mercator", function(){ + var input = { + "type": "MultiPoint", + "coordinates": [ [-122, 45], [100,0], [45, 62] ] + }; + var expectedOutput = { + "type": "MultiPoint", + "coordinates": [ [-13580977.876779145,5621521.486191948],[11131949.079327168,0],[5009377.085697226,8859142.800565446] ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + // expect(output).toEqual(expectedOutput); + expect(output.type).toEqual(expectedOutput.type); + expect(output.crs).toEqual(expectedOutput.crs); + expect(output.coordinates[0][0]).toBeCloseTo(expectedOutput.coordinates[0][0], 9); + expect(output.coordinates[0][1]).toBeCloseTo(expectedOutput.coordinates[0][1], 9); + expect(output.coordinates[1][0]).toBeCloseTo(expectedOutput.coordinates[1][0], 9); + expect(output.coordinates[1][1]).toBeCloseTo(expectedOutput.coordinates[1][1], 9); + }); + + it("should convert a GeoJSON LineString to Web Mercator", function(){ + var input = { + "type": "LineString", + "coordinates": [ [-122, 45], [100,0], [45, 62] ] + }; + var expectedOutput = { + "type": "LineString", + "coordinates": [ [-13580977.876779145,5621521.486191948],[11131949.079327168,0],[5009377.085697226,8859142.800565446] ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiLineString to Web Mercator", function(){ + var input = { + "type": "MultiLineString", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75] ], + [ [21.796875,36.5625],[47.8359375,71.015625] ] + ] + }; + var expectedOutput = { + "type": "MultiLineString", + "coordinates": [ + [ [4657155.25935914,11407616.835043576],[6339992.874085551,3995282.329624161] ], + [ [2426417.025884594,4378299.115616046],[5325072.20411877,11407616.835043576] ] + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Polygon to Web Mercator", function(){ + var input = { + "type": "Polygon", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75],[21.796875,36.5625],[41.8359375,71.015625] ] + ] + }; + var expectedOutput = { + "type": "Polygon", + "coordinates": [ + [ [4657155.25935914,11407616.835043576],[6339992.874085551,3995282.329624161],[2426417.025884594,4378299.115616046],[4657155.25935914,11407616.835043576] ] + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiPolygon to Web Mercator", function(){ + var input = { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] + ], + [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] + ] + ] + }; + + var expectedOutput = { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [11354588.060913712,222684.20850554065],[11465907.551706985,222684.20850554065],[11465907.551706985,334111.1714019535],[11354588.060913712,334111.1714019535],[11354588.060913712,222684.20850554065] ] + ], + [ + [ [11131949.079327168,0],[11243268.57012044,0],[11243268.57012044,111325.1428663833],[11131949.079327168,111325.1428663833],[11131949.079327168,0] ] + ] + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output.type).toEqual(expectedOutput.type); + expect(output.crs).toEqual(expectedOutput.crs); + for (var i=0; i < output.coordinates[0].length; i++) { + var segments = output.coordinates[0][i]; + for (var j=0; j < segments.length; j++) { + expect(segments[j][0]).toBeCloseTo(expectedOutput.coordinates[0][i][j][0], 9); + expect(segments[j][1]).toBeCloseTo(expectedOutput.coordinates[0][i][j][1], 9); + } + } + }); + + it("should convert a GeoJSON Feature to Web Mercator", function(){ + var input = { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-122, 45] + }, + "properties": { + "bar": "baz" + } + }; + var expectedOutput = { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + }, + "properties": { + "bar": "baz" + }, + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Feature Collection to Web Mercator", function(){ + var input = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-122, 45] + }, + "properties": { + "bar": "baz" + } + },{ + "type": "Feature", + "id": "bar", + "geometry":{ + "type": "Point", + "coordinates": [-122, 45] + }, + "properties": { + "bar": "baz" + } + } + ] + }; + var expectedOutput = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + }, + "properties": { + "bar": "baz" + } + },{ + "type": "Feature", + "id": "bar", + "geometry":{ + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + }, + "properties": { + "bar": "baz" + } + } + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Geometry Collection to Web Mercator", function(){ + var input = { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-122, 45] + },{ + "type": "Point", + "coordinates": [-122, 45] + } + ] + }; + var expectedOutput = { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + },{ + "type": "Point", + "coordinates": [-13580977.876779145, 5621521.486191948] + } + ], + "crs": { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + } + }; + var output = Terraformer.toMercator(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Point to Geographic coordinates", function(){ + var input = { + "type": "Point", + "coordinates": [-13656274.38035172, 5703203.67194997] + }; + var expectedOutput = { + "type": "Point", + "coordinates": [-122.67639999999798, 45.51649999999925] + }; + var output = Terraformer.toGeographic(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiPoint to Geographic coordinates", function(){ + var input = { + "type": "MultiPoint", + "coordinates": [ [-13656274.380351715,5703203.671949966],[11131949.079327168,0],[-13619241.057432571,6261718.09354067] ] + }; + var expectedOutput = { + "type": "MultiPoint", + "coordinates": [ [-122.67639999999793,45.51649999999922],[99.99999999999831,0],[-122.34372399999793,48.92247999999917] ] + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.coordinates[0][0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.coordinates[0][1]).toBeCloseTo(45.5165000000, 10); + expect(expectedOutput.coordinates[1][0]).toBeCloseTo(100.0000000000, 10); + expect(expectedOutput.coordinates[1][1]).toBeCloseTo(0.0000000000, 10); + expect(expectedOutput.coordinates[2][0]).toBeCloseTo(-122.3437240000, 10); + expect(expectedOutput.coordinates[2][1]).toBeCloseTo(48.9224800000, 10); + }); + + it("should convert a GeoJSON LineString to Geographic coordinates", function(){ + var input = { + "type": "LineString", + "coordinates": [ [743579.411158182,6075718.008992066],[-7279251.077653782,6869641.046935855],[-5831228.013819427,5242073.5675988225] ] + }; + var expectedOutput = { + "type": "LineString", + "coordinates": [ [6.679687499999886,47.8124999999992],[-65.3906249999989,52.38281249999912],[-52.38281249999912,42.539062499999275] ] + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.coordinates[0][0]).toBeCloseTo(6.6796875000, 10); + expect(expectedOutput.coordinates[0][1]).toBeCloseTo(47.8125000000, 10); + expect(expectedOutput.coordinates[1][0]).toBeCloseTo(-65.3906250000, 10); + expect(expectedOutput.coordinates[1][1]).toBeCloseTo(52.3828125000, 10); + expect(expectedOutput.coordinates[2][0]).toBeCloseTo(-52.3828125000, 10); + expect(expectedOutput.coordinates[2][1]).toBeCloseTo(42.5390625000, 10); + }); + + it("should convert a GeoJSON MultiLineString to Geographic coordinates", function(){ + var input = { + "type": "MultiLineString", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75] ], + [ [21.796875,36.5625],[47.8359375,71.015625] ] + ] + }; + var expectedOutput = { + "type": "MultiLineString", + "coordinates": [ + [ [0.00037581862081719045,0.0006379442134689308],[0.0005116186266586962,0.00030318140838354136]],[[0.00019580465958542694,0.00032844652575519755],[0.0004297175378643617,0.0006379442134689308] ] + ] + }; + var output = Terraformer.toGeographic(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Polygon to Geographic coordinates", function(){ + var input = { + "type": "Polygon", + "coordinates": [ + [ [41.8359375,71.015625],[56.953125,33.75],[21.796875,36.5625],[41.8359375,71.015625] ] + ] + }; + var expectedOutput = { + "type": "Polygon", + "coordinates": [ + [ [0.00037581862081719045,0.0006379442134689308],[0.0005116186266586962,0.00030318140838354136],[0.00019580465958542694,0.00032844652575519755],[0.00037581862081719045,0.0006379442134689308] ] + ] + }; + var output = Terraformer.toGeographic(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON MultiPolygon to Geographic coordinates", function(){ + var input = { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] + ], + [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] + ] + ] + }; + + var expectedOutput = { + "type": "MultiPolygon", + "coordinates": [ + [ + [ [0.000916281589801912,0.000017966305681987637],[0.0009252647426431071,0.000017966305681987637],[0.0009252647426431071,0.000026949458522981454],[0.000916281589801912,0.000026949458522981454],[0.000916281589801912,0.000017966305681987637] ] + ], + [ + [ [0.0008983152841195215,0],[0.0009072984369607167,0],[0.0009072984369607167,0.000008983152840993819],[0.0008983152841195215,0.000008983152840993819],[0.0008983152841195215,0] ] + ] + ] + }; + var output = Terraformer.toGeographic(input); + expect(output).toEqual(expectedOutput); + }); + + it("should convert a GeoJSON Feature to Geographic coordinates", function(){ + var input = { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + }, + "properties": { + "bar": "baz" + } + }; + var expectedOutput = { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + }, + "properties": { + "bar": "baz" + } + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.geometry.coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.geometry.coordinates[1]).toBeCloseTo(45.5165000000, 10); + }); + + it("should convert a GeoJSON Feature Collection to Geographic coordinates", function(){ + var input = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + }, + "properties": { + "bar": "baz" + } + },{ + "type": "Feature", + "id": "bar", + "geometry":{ + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + }, + "properties": { + "bar": "baz" + } + } + ] + }; + var expectedOutput = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "foo", + "geometry":{ + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + }, + "properties": { + "bar": "baz" + } + },{ + "type": "Feature", + "id": "bar", + "geometry":{ + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + }, + "properties": { + "bar": "baz" + } + } + ] + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.features[0].geometry.coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.features[0].geometry.coordinates[1]).toBeCloseTo(45.5165000000, 10); + + expect(expectedOutput.features[1].geometry.coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.features[1].geometry.coordinates[1]).toBeCloseTo(45.5165000000, 10); + }); + + it("should convert a GeoJSON Geometry Collection to Geographic coordinates", function(){ + var input = { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + },{ + "type": "Point", + "coordinates": [-13656274.380351715, 5703203.671949966] + } + ] + }; + var expectedOutput = { + "type": "GeometryCollection", + "geometries": [ + { + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + },{ + "type": "Point", + "coordinates": [-122.67639999999793, 45.51649999999923] + } + ] + }; + var output = Terraformer.toGeographic(input); + + expect(expectedOutput.geometries[0].coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.geometries[0].coordinates[1]).toBeCloseTo(45.5165000000, 10); + + expect(expectedOutput.geometries[1].coordinates[0]).toBeCloseTo(-122.6764000000, 10); + expect(expectedOutput.geometries[1].coordinates[1]).toBeCloseTo(45.5165000000, 10); + }); +}); diff --git a/node_modules/terraformer/spec/terraformerSpec.js b/node_modules/terraformer/spec/terraformerSpec.js new file mode 100755 index 0000000..b9065f4 --- /dev/null +++ b/node_modules/terraformer/spec/terraformerSpec.js @@ -0,0 +1,1145 @@ +if(typeof module === "object"){ + var Terraformer = require("../terraformer.js"); + var GeoJSON = require("./geojsonHelpers.js"); +} + +beforeEach(function() { + this.addMatchers({ + toBeInstanceOfClass: function(classRef){ + return this.actual instanceof classRef; + } + }); +}); + +describe("Primitives", function(){ + + it("should create a Point from GeoJSON", function(){ + var point = new Terraformer.Primitive(GeoJSON.points[1]); + + expect(point).toBeInstanceOfClass(Terraformer.Point); + expect(point.coordinates).toEqual(GeoJSON.points[1].coordinates); + }); + + it("should create a MultiPoint from GeoJSON", function(){ + var multiPoint = new Terraformer.Primitive(GeoJSON.multiPoints[1]); + + expect(multiPoint).toBeInstanceOfClass(Terraformer.MultiPoint); + expect(multiPoint.coordinates).toEqual(GeoJSON.multiPoints[1].coordinates); + }); + + it("should create a LineString from GeoJSON", function(){ + var lineString = new Terraformer.Primitive(GeoJSON.lineStrings[3]); + + expect(lineString).toBeInstanceOfClass(Terraformer.LineString); + expect(lineString.coordinates).toEqual(GeoJSON.lineStrings[3].coordinates); + }); + + it("should create a MultiLineString from GeoJSON", function(){ + var multiLineString = new Terraformer.Primitive(GeoJSON.multiLineStrings[1]); + + expect(multiLineString).toBeInstanceOfClass(Terraformer.MultiLineString); + expect(multiLineString.coordinates).toEqual(GeoJSON.multiLineStrings[1].coordinates); + }); + + it("should create a Polygon from GeoJSON", function(){ + var polygon = new Terraformer.Primitive(GeoJSON.polygons[2]); + expect(polygon).toBeInstanceOfClass(Terraformer.Polygon); + expect(polygon.coordinates).toEqual(GeoJSON.polygons[2].coordinates); + }); + + it("should create a MultiPolygon from GeoJSON", function(){ + var multiPolygon = new Terraformer.Primitive(GeoJSON.multiPolygons[1]); + expect(multiPolygon).toBeInstanceOfClass(Terraformer.MultiPolygon); + expect(multiPolygon.coordinates).toEqual(GeoJSON.multiPolygons[1].coordinates); + }); + + it("should create a Feature from GeoJSON", function(){ + var feature = new Terraformer.Primitive(GeoJSON.features[0]); + expect(feature).toBeInstanceOfClass(Terraformer.Feature); + expect(feature.geometry.coordinates).toEqual(GeoJSON.features[0].geometry.coordinates); + expect(feature.geometry.type).toEqual("Polygon"); + }); + + it("should create a Feature from GeoJSON with null geometry and properties", function(){ + var feature = new Terraformer.Primitive({ + type: "Feature", + geometry: null, + properties: null + }); + + expect(feature).toBeInstanceOfClass(Terraformer.Feature); + expect(feature.geometry).toEqual(null); + expect(feature.properties).toEqual(null); + expect(feature.type).toEqual("Feature"); + }); + + it("should create a FeatureCollection from GeoJSON", function(){ + var featureCollection = new Terraformer.Primitive(GeoJSON.featureCollections[0]); + + expect(featureCollection).toBeInstanceOfClass(Terraformer.FeatureCollection); + expect(featureCollection.features[0].geometry.coordinates).toEqual(featureCollection.features[0].geometry.coordinates); + expect(featureCollection.features[0].geometry.type).toEqual("Polygon"); + }); + + it("should create a GeometryCollection from GeoJSON", function(){ + var geometryCollection = new Terraformer.Primitive(GeoJSON.geometryCollections[0]); + + expect(geometryCollection).toBeInstanceOfClass(Terraformer.GeometryCollection); + expect(geometryCollection.geometries.length).toEqual(2); + }); + + describe("Helper Methods", function(){ + it("should convert a Primitive to Web Mercator", function(){ + var point = new Terraformer.Primitive(GeoJSON.points[2]); + + var mercator = point.toMercator(); + + expect(mercator.coordinates).toEqual([11131949.079327168, 0]); + expect(mercator.crs).toEqual(Terraformer.MercatorCRS); + }); + + it("should convert a Primitive to Geographic coordinates", function(){ + var point = new Terraformer.Primitive({ + "type": "Point", + "coordinates": [11354588.06,222684.20] + }); + + var mercator = point.toGeographic(); + + expect(mercator.coordinates[0]).toBeCloseTo(101.99999999179026, 10); + expect(mercator.coordinates[1]).toBeCloseTo(1.9999999236399357, 10); + }); + + it("should convert a Primitive to JSON", function(){ + var geometryCollection = new Terraformer.Primitive(GeoJSON.geometryCollections[0]); + var json = geometryCollection.toJSON(); + expect(json.bbox).toBeTruthy(); + expect(json.type).toBeTruthy(); + expect(json.geometries).toBeTruthy(); + expect(json.length).toBeFalsy(); + }); + + it("should convert a Circle Primitive to JSON", function(){ + var circle = new Terraformer.Circle([45.5165, -1226764], 100); + var json = circle.toJSON(); + expect(json.bbox).toBeTruthy(); + expect(json.type).toEqual("Feature"); + expect(json.geometry).toBeTruthy(); + expect(json.geometry.coordinates).toBeTruthy(); + expect(json.geometry.bbox).toBeFalsy(); + expect(json.center).toBeFalsy(); + expect(json.steps).toBeFalsy(); + expect(json.radius).toBeFalsy(); + expect(json.properties.center).toBeTruthy(); + expect(json.properties.steps).toBeTruthy(); + expect(json.properties.radius).toBeTruthy(); + }); + }); + + describe("Point", function(){ + var point; + + beforeEach(function(){ + point = new Terraformer.Point(45, 60); + }); + + it("should create a Point from a 'x' and 'y'", function(){ + expect(point.coordinates).toEqual([45,60]); + }); + + it("should create a Point from a GeoJSON Position", function(){ + var point = new Terraformer.Point([45, 60]); + expect(point.coordinates).toEqual([45,60]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + point = new Terraformer.Point(GeoJSON.multiPoints[1]); + }).toThrow("Terraformer: invalid input for Terraformer.Point"); + }); + + it("should calculate bounds", function(){ + expect(point.bbox()).toEqual([45, 60, 45, 60]); + }); + + it("should calculate convex hull", function(){ + expect(point.convexHull()).toEqual(null); + }); + + it("should calculate convex hull using Tools", function(){ + expect(Terraformer.Tools.convexHull([ point.coordinates ])).toEqual([[45, 60]]); + }); + + it("should be able to tell a non-convex polygon using Tools", function(){ + expect(Terraformer.Tools.isConvex(GeoJSON.polygons[1].coordinates[0])).toEqual(false); + }); + + it("should be able to tell a convex polygon using Tools", function(){ + expect(Terraformer.Tools.isConvex(GeoJSON.polygons[0].coordinates[0])).toEqual(true); + }); + + it("should calculate envelope", function(){ + expect(point.envelope()).toEqual({ x: 45, y: 60, w: 0, h: 0 }); + }); + }); + + describe("MultiPoint", function(){ + var multiPoint; + + beforeEach(function(){ + multiPoint = new Terraformer.MultiPoint([ [100,0], [-45, 122] ]); + }); + + it("should create a MultiPoint from an array of GeoJSON Positions", function(){ + expect(multiPoint.coordinates).toEqual([ [100,0], [-45, 122] ]); + expect(multiPoint.type).toEqual("MultiPoint"); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + multiPoint = new Terraformer.MultiPoint(GeoJSON.points[1]); + }).toThrow("Terraformer: invalid input for Terraformer.MultiPoint"); + }); + + it("should be able to add a point", function(){ + multiPoint.addPoint([80,-60]); + expect(multiPoint.coordinates).toEqual([ [100,0],[-45, 122],[80,-60] ]); + }); + + it("should be able to insert a point", function(){ + multiPoint.insertPoint([80,-60], 1); + expect(multiPoint.coordinates).toEqual([ [100,0],[80,-60],[-45, 122] ]); + }); + + it("should be able to remove a point by index", function(){ + multiPoint.removePoint(1); + expect(multiPoint.coordinates).toEqual([ [100, 0] ]); + }); + + it("should be able to remove a point by position", function(){ + multiPoint.removePoint([-45, 122]); + expect(multiPoint.coordinates).toEqual([ [100,0] ]); + }); + + it("should be able to itterate over all points", function(){ + var spy = jasmine.createSpy(); + multiPoint.forEach(spy); + expect(spy.callCount).toEqual(multiPoint.coordinates.length); + expect(spy).toHaveBeenCalledWith([100,0], 0, multiPoint.coordinates); + expect(spy).toHaveBeenCalledWith([-45,122], 1, multiPoint.coordinates); + }); + + it("should calculate bounds", function(){ + expect(multiPoint.bbox()).toEqual([-45, 0, 100, 122]); + }); + + it("should calculate convex hull", function(){ + multiPoint.addPoint([80,-60]); + expect(multiPoint.convexHull().type).toEqual("Polygon"); + expect(multiPoint.convexHull().coordinates).toEqual( + [ [ [ 100, 0 ], [ -45, 122 ], [ 80, -60 ], [ 100, 0 ] ] ] + ); + }); + + it("should return null when a convex hull cannot return a valid Polygon", function(){ + expect(multiPoint.convexHull()).toEqual(null); + }); + + it("should calculate envelope", function(){ + expect(multiPoint.envelope()).toEqual({ x : -45, y : 0, w : 145, h : 122 }); + }); + + it("should get a point as a Primitive", function(){ + expect(multiPoint.get(0)).toBeInstanceOfClass(Terraformer.Point); + expect(multiPoint.get(0).coordinates).toEqual([100,0]); + }); + }); + + describe("LineString", function(){ + var lineString; + + beforeEach(function(){ + lineString = new Terraformer.LineString([ [100,0], [-45, 122] ]); + }); + + it("should create a Line from an array of GeoJSON Positions", function(){ + expect(lineString.type).toEqual("LineString"); + expect(lineString.coordinates).toEqual([ [100,0], [-45, 122] ]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.LineString(GeoJSON.features[1]).toThrow(); + }).toThrow("Terraformer: invalid input for Terraformer.LineString"); + }); + + it("should be able to add a vertex", function(){ + lineString.addVertex([80,-60]); + expect(lineString.coordinates).toEqual([ [100,0],[-45, 122],[80,-60] ]); + }); + + it("should be able to insert a vertex", function(){ + lineString.insertVertex([80,-60], 1); + expect(lineString.coordinates).toEqual([ [100,0],[80,-60],[-45, 122] ]); + }); + + it("should be able to remove a vertex by index", function(){ + lineString.removeVertex(1); + expect(lineString.coordinates).toEqual([ [100, 0] ]); + }); + + it("should calculate bounds", function(){ + expect(lineString.bbox()).toEqual([-45, 0, 100, 122]); + }); + + it("should calculate convex hull", function(){ + lineString.addVertex([80,-60]); + expect(lineString.convexHull().type).toEqual("Polygon"); + expect(lineString.convexHull().coordinates).toEqual([ + [ [ 100, 0 ], [ -45, 122 ], [ 80, -60 ], [ 100, 0 ] ] + ]); + }); + + it("should return null when a convex hull cannot return a valid Polygon", function(){ + expect(lineString.convexHull()).toEqual(null); + }); + + it("should calculate envelope", function(){ + expect(lineString.envelope()).toEqual({ x : -45, y : 0, w : 145, h : 122 }); + }); + }); + + describe("MultiLineString", function(){ + var multiLineString; + + beforeEach(function(){ + multiLineString = new Terraformer.MultiLineString([ + [ [-105, 40], [-110, 45], [-115, 55] ], + [ [-100, 40], [-105, 45], [-110, 55] ] + ]); + }); + + it("should create a MultiLineString from an array of GeoJSON LineStrings", function(){ + expect(multiLineString.type).toEqual("MultiLineString"); + expect(multiLineString.coordinates).toEqual([ + [ [-105, 40], [-110, 45], [-115, 55] ], + [ [-100, 40], [-105, 45], [-110, 55] ] + ]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.MultiLineString(GeoJSON.features[1]).toThrow(); + }).toThrow("Terraformer: invalid input for Terraformer.MultiLineString"); + }); + + it("should have a getter for length", function(){ + expect(multiLineString.coordinates.length).toEqual(2); + }); + + it("should calculate bounds", function(){ + expect(multiLineString.bbox()).toEqual([-115, 40, -100, 55]); + }); + + it("should calculate convex hull", function(){ + expect(multiLineString.convexHull().type).toEqual("Polygon"); + expect(multiLineString.convexHull().coordinates).toEqual([ + [ [ -100, 40 ], [ -110, 55 ], [ -115, 55 ], [ -110, 45 ], [ -105, 40 ], [ -100, 40 ] ] + ]); + }); + + it("should calculate envelope", function(){ + expect(multiLineString.envelope()).toEqual({ x : -115, y : 40, w : 15, h : 15 }); + }); + + it("should get a line as a Primitive", function(){ + expect(multiLineString.get(0)).toBeInstanceOfClass(Terraformer.LineString); + expect(multiLineString.get(0).coordinates).toEqual([ [-105, 40], [-110, 45], [-115, 55] ]); + }); + + it("should work with forEach correctly", function(){ + var count = 0; + multiLineString.forEach(function () { + count++; + }); + + expect(count).toEqual(2); + }); + + }); + + describe("Polygon", function(){ + var polygon; + var polygonWithHoles; + + beforeEach(function(){ + polygon = new Terraformer.Polygon([ [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ] ]); + polygonWithHoles = new Terraformer.Polygon([ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], + [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ] + ]); + }); + + it("should create a Polygon from an array of GeoJSON Positions", function(){ + expect(polygon.type).toEqual("Polygon"); + expect(polygon.coordinates).toEqual([ [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ] ]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + polygon = new Terraformer.Polygon(GeoJSON.features[1]); + }).toThrow("Terraformer: invalid input for Terraformer.Polygon"); + }); + + it("should be able to add a vertex", function(){ + polygon.addVertex([45, 100]); + expect(polygon.coordinates).toEqual([ [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[45, 100],[100.0, 0.0] ] ]); + }); + + it("should be able to insert a vertex", function(){ + polygon.insertVertex([45, 100], 1); + expect(polygon.coordinates).toEqual([ [ [100.0, 0.0],[45, 100],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ] ]); + }); + + it("should be able to remove a vertex by index", function(){ + polygon.removeVertex(0); + expect(polygon.coordinates).toEqual([ [ [101.0, 0.0],[101.0, 1.0],[100.0, 1.0],[100.0, 0.0] ] ]); + }); + + it("should calculate bounds", function(){ + expect(polygon.bbox()).toEqual([100, 0, 101, 1]); + }); + + it("should calculate convex hull", function(){ + expect(polygon.convexHull().coordinates).toEqual([ + [ [ 101, 1 ], [ 100, 1 ], [ 100, 0 ], [ 101, 0 ], [ 101, 1 ] ] + ]); + expect(polygon.convexHull().type).toEqual("Polygon"); + }); + + it("should calculate envelope", function(){ + expect(polygon.envelope()).toEqual({ x : 100.0, y : 0, w : 1, h : 1 }); + }); + + it("should report hole presence properly", function() { + expect(polygon.hasHoles()).toEqual(false); + expect(polygonWithHoles.hasHoles()).toEqual(true); + }); + + it("should return an array of polygons of each hole", function() { + var hole = new Terraformer.Polygon([[[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]); + expect(polygonWithHoles.holes()).toEqual([hole]); + }); + }); + + describe("MultiPolygon", function(){ + var multiPolygon, mp; + + beforeEach(function(){ + multiPolygon = new Terraformer.MultiPolygon(GeoJSON.multiPolygons[0].coordinates); + }); + + it("should create a MultiPolygon from an array of GeoJSON Polygons", function(){ + expect(multiPolygon.type).toEqual("MultiPolygon"); + expect(multiPolygon.coordinates).toEqual(GeoJSON.multiPolygons[0].coordinates); + }); + + it("should return true when a MultiPolygon intersects another", function(){ + mp = new Terraformer.MultiPolygon([ + [ + [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] + ], + [ + [ [100.0, 0.0], [102.0, 0.0], [102.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] + ] + ]); + + expect(multiPolygon.intersects(mp)).toEqual(true); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + multiPolygon = new Terraformer.MultiPolygon(GeoJSON.multiPoints[0]); + }).toThrow("Terraformer: invalid input for Terraformer.MultiPolygon"); + }); + + it("should have a getter for length", function(){ + expect(multiPolygon.coordinates.length).toEqual(2); + }); + + it("should calculate bounds", function(){ + expect(multiPolygon.bbox()).toEqual([100, 0, 103, 3]); + }); + + it("should calculate convex hull", function (){ + expect(mp.convexHull().coordinates).toEqual([ + [ [ 103, 3 ], + [ 102, 3 ], + [ 100, 1 ], + [ 100, 0 ], + [ 102, 0 ], + [ 103, 2 ], + [ 103, 3 ] ] + ]); + expect(multiPolygon.convexHull().type).toEqual("Polygon"); + }); + + it("should calculate envelope", function(){ + expect(multiPolygon.envelope()).toEqual({ x : 100, y : 0, w : 3, h : 3 }); + }); + + it("should get a polygon as a Primitive", function(){ + expect(multiPolygon.get(0)).toBeInstanceOfClass(Terraformer.Polygon); + expect(multiPolygon.get(0).coordinates).toEqual(GeoJSON.multiPolygons[0].coordinates[0]); + }); + + it("should work with forEach correctly", function(){ + var count = 0; + multiPolygon.forEach(function () { + count++; + }); + + expect(count).toEqual(2); + }); + + it("should be able to be closed", function(){ + var unclosed = new Terraformer.MultiPolygon({ + "type": "MultiPolygon", + "coordinates": [ + [ + [ [102.0, 2.0],[103.0, 2.0],[103.0, 3.0],[102.0, 3.0] ], + [ [102.2, 2.2],[102.8, 2.2],[102.8, 2.8],[102.2, 2.8] ] + ], + [ + [ [100.0, 0.0],[101.0, 0.0],[101.0, 1.0],[100.0, 1.0] ], + [ [100.2, 0.2],[100.8, 0.2],[100.8, 0.8],[100.2, 0.8] ] + ] + ] + }); + + unclosed.close(); + + unclosed.forEach(function(poly){ + expect(poly[0].length).toEqual(5); + expect(poly[0][0][0]).toEqual(poly[0][poly[0].length-1][0]); + expect(poly[0][0][1]).toEqual(poly[0][poly[0].length-1][1]); + }); + + }); + + }); + + describe("Circle", function(){ + var circle; + + beforeEach(function(){ + circle = new Terraformer.Circle([-122, 45], 1000, 128); + }); + + it("should create a Circle Feature from a GeoJSON Position and a radius", function(){ + expect(circle.type).toEqual("Feature"); + expect(circle.geometry.type).toEqual("Polygon"); + expect(circle.geometry.coordinates[0].length).toEqual(129); // 128 + 1 to close the circle + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + circle = new Terraformer.Circle(); + }).toThrow("Terraformer: missing parameter for Terraformer.Circle"); + }); + + it("should form a closed polygon", function(){ + expect(circle.geometry.coordinates[0][0][0]).toEqual(circle.geometry.coordinates[0][circle.geometry.coordinates[0].length-1][0]); + expect(circle.geometry.coordinates[0][0][1]).toEqual(circle.geometry.coordinates[0][circle.geometry.coordinates[0].length-1][1]); + }); + + it("should have a getter for steps", function(){ + expect(circle.steps()).toEqual(128); + }); + + it("should have a setter for steps", function(){ + circle.steps(64); + expect(circle.properties.steps).toEqual(64); + }); + + it("should have a getter for radius", function(){ + expect(circle.radius()).toEqual(1000); + }); + + it("should have a setter for radius", function(){ + circle.radius(500); + expect(circle.properties.radius).toEqual(500); + }); + + it("should have a getter for center", function(){ + expect(circle.center()).toEqual([-122,45]); + }); + + it("should have a setter for center", function(){ + circle.center([80,50]); + expect(circle.properties.center).toEqual([80,50]); + }); + + it("should calculate bounds", function(){ + expect(circle.bbox()[0]).toBeCloseTo(-122.0089831528, 10); + expect(circle.bbox()[1]).toBeCloseTo(44.9936475996, 10); + expect(circle.bbox()[2]).toBeCloseTo(-121.9910168472, 10); + expect(circle.bbox()[3]).toBeCloseTo(45.0063516962, 10); + + }); + + it("should calculate envelope", function(){ + expect(circle.envelope().x).toBeCloseTo(-122.0089831528, 10); + expect(circle.envelope().y).toBeCloseTo(44.9936475996, 10); + expect(circle.envelope().w).toBeCloseTo(0.0179663057, 10); + expect(circle.envelope().h).toBeCloseTo(0.0127040966, 10); + }); + + }); + + describe("Feature", function(){ + var feature; + + beforeEach(function(){ + feature = new Terraformer.Feature(GeoJSON.polygons[0]); + }); + + it("should create a Feature from a GeoJSON Geometry", function(){ + expect(feature.type).toEqual("Feature"); + expect(feature.geometry.type).toEqual("Polygon"); + expect(feature.geometry.coordinates).toEqual(GeoJSON.polygons[0].coordinates); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.Feature({ + type: "Polygon" + }).toThrow("Terraformer: invalid input for Terraformer.Feature"); + }); + }); + + it("should calculate bounds", function(){ + expect(feature.bbox()).toEqual([21.79, 33.75, 56.95, 71.01]); + }); + + it("should calculate envelope", function(){ + expect(feature.envelope()).toEqual({ x : 21.79, y : 33.75, w : 35.160000000000004, h : 37.260000000000005 }); + }); + + it("should calculate convex hull", function(){ + expect(feature.convexHull().type).toEqual("Polygon"); + expect(feature.convexHull().coordinates).toEqual([ + [ [ 56.95, 33.75 ], [ 41.83, 71.01 ], [ 21.79, 36.56 ], [ 56.95, 33.75 ] ] + ]); + }); + + }); + + describe("FeatureCollection", function(){ + var featureCollection; + + beforeEach(function(){ + featureCollection = new Terraformer.FeatureCollection([ + GeoJSON.features[0], GeoJSON.features[1] + ]); + }); + + it("should create a FeatureCollection from an array of GeoJSON Features", function(){ + expect(featureCollection.features.length).toEqual(2); + expect(featureCollection.features[0]).toEqual(GeoJSON.features[0]); + expect(featureCollection.features[1]).toEqual(GeoJSON.features[1]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.FeatureCollection({ + "type": "Polygon" + }).toThrow("Terraformer: invalid input for Terraformer.FeatureCollection"); + }); + }); + + it("should calculate bounds", function(){ + expect(featureCollection.bbox()).toEqual([ -104.99404, 33.75, 56.95, 71.01 ] ); + }); + + it("should calculate envelope", function(){ + expect(featureCollection.envelope()).toEqual({ x : -104.99404, y : 33.75, w : 161.94404, h : 37.260000000000005 }); + }); + + it("should get a Feature as a Primitive", function(){ + expect(featureCollection.get("foo")).toBeInstanceOfClass(Terraformer.Feature); + expect(featureCollection.get("foo").geometry.coordinates).toEqual(GeoJSON.features[0].geometry.coordinates); + }); + }); + + describe("GeometryCollection", function(){ + var geometryCollection; + + beforeEach(function() { + geometryCollection = new Terraformer.GeometryCollection([GeoJSON.polygons[0], GeoJSON.polygons[1]]); + }); + + it("should create a GeometryCollection from an array of GeoJSON Geometries", function(){ + expect(geometryCollection.geometries.length).toEqual(2); + expect(geometryCollection.geometries[0]).toEqual(GeoJSON.polygons[0]); + expect(geometryCollection.geometries[1]).toEqual(GeoJSON.polygons[1]); + }); + + it("should throw an error when called invalid data", function(){ + expect(function(){ + new Terraformer.GeometryCollection({ + "type": "Polygon" + }).toThrow("Terraformer: invalid input for Terraformer.GeometryCollection"); + }); + }); + + it("should calculate bounds", function(){ + expect(geometryCollection.bbox()).toEqual([ -84.32281494140625, 33.73804486328907, 56.95, 71.01 ]); + }); + + it("should calculate envelope", function(){ + expect(geometryCollection.envelope()).toEqual({ x : -84.32281494140625, y : 33.73804486328907, w : 141.27281494140624, h : 37.271955136710936 }); + }); + + it("should get a Geometry as a Primitive", function(){ + expect(geometryCollection.get(0)).toBeInstanceOfClass(Terraformer.Polygon); + expect(geometryCollection.get(0).coordinates).toEqual(GeoJSON.polygons[0].coordinates); + }); + + it("should work with forEach correctly", function(){ + var count = 0; + geometryCollection.forEach(function () { + count++; + }); + + expect(count).toEqual(2); + }); + + }); +}); + +describe("Intersection", function(){ + var multiLineString; + + describe("MultiLineString", function(){ + beforeEach(function() { + multiLineString = new Terraformer.MultiLineString([ [ [ 0, 0 ], [ 10, 10 ] ], [ [ 5, 5 ], [ 15, 15 ] ] ]); + }); + + it("should correctly figure out intersection with a LineString", function() { + expect(multiLineString.intersects(new Terraformer.LineString([ [ 0, 10 ], [ 15, 5 ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiLineString", function (){ + expect(multiLineString.intersects(new Terraformer.MultiLineString([ [ [ 0, 10 ], [ 15, 5 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a Polygon", function (){ + expect(multiLineString.intersects(new Terraformer.Polygon([ [ [ 0, 5 ], [ 10, 5 ], [ 10, 0 ], [ 0, 0 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiPolygon", function (){ + expect(multiLineString.intersects(new Terraformer.MultiPolygon([ [ [ [ 0, 5 ], [ 10, 5 ], [ 10, 0 ], [ 0, 0 ] ] ] ]))).toEqual(true); + }); + }); + + describe("Polygon", function(){ + var polygon; + + beforeEach(function() { + polygon = new Terraformer.Polygon([ [ [ 0, 0 ], [ 10, 0 ], [ 10, 5 ], [ 0, 5 ] ] ]); + }); + + it("should correctly figure out intersection of the same object", function(){ + expect(polygon.intersects(polygon)).toEqual(true); + }); + + it("should correctly figure out intersection with a Polygon", function(){ + expect(polygon.intersects(new Terraformer.Polygon([ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiPolygon", function(){ + expect(polygon.intersects(new Terraformer.MultiPolygon([ [ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a Polygon", function(){ + expect(polygon.intersects(new Terraformer.Polygon([ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiLineString", function(){ + expect(polygon.intersects(new Terraformer.MultiLineString([ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a LineString", function(){ + expect(polygon.intersects(new Terraformer.LineString([ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiPolygon", function(){ + expect(polygon.intersects(new Terraformer.MultiPolygon([ [ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ] ]))).toEqual(true); + }); + + it("should correctly figure out intersection with a MultiPolygon in reverse", function(){ + var mp = new Terraformer.MultiPolygon([ [ [ [ 1, 1 ], [ 11, 1 ], [ 11, 6 ], [ 1, 6 ] ] ] ]); + expect(mp.intersects(polygon)).toEqual(true); + }); + + }); + + describe("MultiPolygon", function(){ + var multiPolygon; + + beforeEach(function() { + multiPolygon = new Terraformer.MultiPolygon([ [ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ] ]); + }); + + it("should return false if two MultiPolygons do not intersect", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] ] ]); + expect(multiPolygon.intersects(mp)).toEqual(false); + }); + }); + + describe("Feature", function(){ + var feature; + + beforeEach(function() { + feature = new Terraformer.Feature( { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ [ [ 0, 0 ], [ 10, 0 ], [ 10, 5 ], [ 0, 5 ] ] ] + } + }); + }); + + }); + + describe("LineString", function(){ + var lineString; + + beforeEach(function() { + lineString = new Terraformer.LineString([ [ 45, -122 ], [ 46, -123 ] ]); + }); + + it("should correctly figure out intersection with a LineString", function(){ + expect(lineString.intersects(new Terraformer.LineString([ [46, -121], [44, -124] ]))).toEqual(true); + }); + + it("should correctly figure out that parallel lines are not intersections", function(){ + expect(lineString.intersects(new Terraformer.LineString([ [44,-121], [45, -122] ]))).toEqual(false); + }); + + it("should correctly figure out that the same lines are not intersections", function(){ + expect(lineString.intersects(new Terraformer.LineString([ [45,-122], [46, -123] ]))).toEqual(false); + }); + + it("should correctly figure out intersection with Polygon", function(){ + expect(lineString.intersects(new Terraformer.Polygon([ [ [ 45.5, -122.5 ], [ 47, -123 ], [ 45.5, -122.5 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out lack of intersection with Polygon", function(){ + expect(lineString.intersects(new Terraformer.Polygon([ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ]))).toEqual(false); + }); + + it("should correctly figure out intersection with MultiLineString", function(){ + expect(lineString.intersects(new Terraformer.MultiLineString([ [ [ 45.5, -122.5 ], [ 47, -123 ], [ 45.5, -122.5 ] ] ]))).toEqual(true); + }); + + it("should correctly figure out lack of intersection with MultiLineString", function(){ + expect(lineString.intersects(new Terraformer.MultiLineString([ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ]))).toEqual(false); + }); + + it("should correctly figure out intersection with MultiPolygon", function(){ + expect(lineString.intersects(new Terraformer.MultiPolygon([ [ [ [ 45.5, -122.5 ], [ 47, -123 ], [ 45.5, -122.5 ] ] ] ]))).toEqual(true); + }); + + it("should correctly figure out lack of intersection with MultiPolygon", function(){ + expect(lineString.intersects(new Terraformer.MultiPolygon([ [ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ] ]))).toEqual(false); + }); + + it("should correctly figure out lack of intersection with MultiPolygon in reverse", function(){ + var mp = new Terraformer.MultiPolygon([ [ [ [ 48.5, -122.5 ], [ 50, -123 ], [ 48.5, -122.5 ] ] ] ]); + expect(mp.intersects(lineString)).toEqual(false); + }); + + }); + + describe("Point Within", function(){ + var point; + + beforeEach(function(){ + point = new Terraformer.Point([ 10, 10 ]); + }); + + it("should return true when inside a polygon", function(){ + var polygon = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ]); + expect(point.within(polygon)).toEqual(true); + }); + + it("should return false when not inside a polygon", function(){ + var polygon = new Terraformer.Polygon([ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ]); + expect(point.within(polygon)).toEqual(false); + }); + + it("should return true when it is the same point", function(){ + var npoint = new Terraformer.Point([ 10, 10 ]); + expect(point.within(npoint)).toEqual(true); + }); + + it("should return false when it is not the same point", function(){ + var npoint = new Terraformer.Point([ 11, 11 ]); + expect(point.within(npoint)).toEqual(false); + }); + + it("should return true when inside a multipolygon", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ], [ [ [ 5, 5 ], [ 15, 5 ], [ 15, 15 ], [ 5, 15 ], [ 5, 5 ] ] ] ]); + expect(point.within(mp)).toEqual(true); + }); + + it("should return false when not inside a multipolygon", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ], [ [ [ 15, 15 ], [ 25, 15 ], [ 25, 25 ], [ 15, 25 ], [ 15, 15 ] ] ] ]); + expect(point.within(mp)).toEqual(false); + }); + + it("should return false when inside a hole of a polygon", function(){ + var polygon = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ], [ [ 9, 9 ], [ 9, 11 ], [ 11, 11 ], [ 11, 9 ], [ 9, 9 ] ] ]); + expect(point.within(polygon)).toEqual(false); + }); + + it("should return true when not inside a hole of a polygon", function(){ + var polygon = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ], [ [ 9, 9 ], [ 9, 9.5 ], [ 9.5, 9.5 ], [ 9.5, 9 ], [ 9, 9 ] ] ]); + expect(point.within(polygon)).toEqual(true); + }); + + it("should return true when inside a circle", function(){ + var circle = new Terraformer.Circle([ 10, 10 ], 50, 64); + expect(point.within(circle)).toEqual(true); + }); + + }); + + describe("MultiPolygon Within", function(){ + var multipolygon; + + beforeEach(function(){ + multipolygon = new Terraformer.MultiPolygon([ [ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ], [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ] ]); + }); + + it("should return true if a linestring is within a multipolygon", function(){ + var linestring = new Terraformer.LineString([ [ 6, 6 ], [ 6, 14 ] ]); + expect(linestring.within(multipolygon)).toEqual(true); + }); + + it("should return true if a multipoint is within a multipolygon", function(){ + var linestring = new Terraformer.MultiPoint([ [ 6, 6 ], [ 6, 14 ] ]); + expect(linestring.within(multipolygon)).toEqual(true); + }); + + it("should return true if a multilinestring is within a multipolygon", function () { + var mls = new Terraformer.MultiLineString([ [ [ 6, 6 ], [ 6, 14 ] ] ]); + expect(mls.within(multipolygon)).toEqual(true); + }); + + it("should return false if a part of a multilinestring is not within a multipolygon", function () { + var mls = new Terraformer.MultiLineString([ [ [ 6, 6 ], [ 6, 14 ] ], [ [ 1, 1 ], [ 1, 2 ] ] ]); + expect(mls.within(multipolygon)).toEqual(false); + }); + + it("should return true if a multipolygon is within a multipolygon", function () { + var mp = new Terraformer.MultiPolygon([ [ [ [ 1, 1 ], [ 1, 40 ], [ 40, 40 ], [ 40, 1 ], [ 1, 1 ] ] ] ]); + expect(multipolygon.within(mp)).toEqual(true); + }); + + }); + + describe("More Point Within", function() { + var point; + + beforeEach(function(){ + point = new Terraformer.Point([ 6, 6 ]); + }); + + it("should return true if a point is within a multipoint", function(){ + var multipoint = new Terraformer.MultiPoint([ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 6, 6 ] ]); + expect(point.within(multipoint)).toEqual(true); + }); + + it("should return false if a point is within a multipoint with different length", function(){ + var multipoint = new Terraformer.MultiPoint([ [ 1, 1, 1 ], [ 2, 2, 2 ], [ 3, 3, 3 ], [ 6, 6, 6 ] ]); + expect(point.within(multipoint)).toEqual(false); + }); + + it("should return true if a point is within a linestring", function(){ + var linestring = new Terraformer.LineString([ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 6, 6 ] ]); + expect(point.within(linestring)).toEqual(true); + }); + + it("should return true if a point is within a multilinestring", function(){ + var linestring = new Terraformer.MultiLineString([ [ [ 1, 1 ], [ 2, 2 ], [ 3, 3 ], [ 6, 6 ] ] ]); + expect(point.within(linestring)).toEqual(true); + }); + + }); + + describe("Polygon Within", function(){ + var polygon; + + beforeEach(function(){ + polygon = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ]); + }); + + it("should return true when inside a polygon", function(){ + var polygon2 = new Terraformer.Polygon([ [ [ 3, 3 ], [ 3, 18 ], [ 18, 18 ], [ 18, 3 ], [ 3, 3 ] ] ]); + expect(polygon.within(polygon2)).toEqual(true); + }); + + it("should return false when not inside a polygon", function(){ + var polygon2 = new Terraformer.Polygon([ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ]); + expect(polygon.within(polygon2)).toEqual(false); + }); + + it("should return true when it is the same polygon", function(){ + var polygon2 = new Terraformer.Polygon([ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ]); + expect(polygon.within(polygon2)).toEqual(true); + }); + + it("should return true when inside a multipolygon", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ], [ [ [ 3, 3 ], [ 18, 3 ], [ 18, 18 ], [ 3, 18 ], [ 3, 3 ] ] ] ]); + expect(polygon.within(mp)).toEqual(true); + }); + + it("should return false when not inside a multipolygon", function() { + var mp = new Terraformer.MultiPolygon([ [ [ [ 25, 25 ], [ 25, 35 ], [ 35, 35 ], [ 35, 25 ], [ 25, 25 ] ] ], [ [ [ 15, 15 ], [ 25, 15 ], [ 25, 25 ], [ 15, 25 ], [ 15, 15 ] ] ] ]); + expect(polygon.within(mp)).toEqual(false); + }); + + it("should return true when one of the polygons is the same polygon", function(){ + var mp = new Terraformer.MultiPolygon([ [ [ [ 5, 5 ], [ 5, 15 ], [ 15, 15 ], [ 15, 5 ], [ 5, 5 ] ] ], [ [ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ] ] ] ]); + expect(polygon.within(mp)).toEqual(true); + }); + + it("should return true if all of the points in a linestring are in the same polygon", function(){ + var ls = new Terraformer.LineString([ [ 6, 6 ], [ 6, 14 ], [ 14, 14 ] ]); + expect(ls.within(polygon)).toEqual(true); + }); + + it("should return true if all of the points in a multipoint are in the same polygon", function(){ + var ls = new Terraformer.MultiPoint([ [ 6, 6 ], [ 6, 14 ], [ 14, 14 ] ]); + expect(ls.within(polygon)).toEqual(true); + }); + + it("should return false if one of the points in a linestring leave the polygon", function(){ + var ls = new Terraformer.LineString([ [ 6, 6 ], [ 6, 14 ], [ 16, 16 ] ]); + expect(ls.within(polygon)).toEqual(false); + }); + + it("should return false if one of the points in a multipoint leave the polygon", function(){ + var ls = new Terraformer.MultiPoint([ [ 6, 6 ], [ 6, 14 ], [ 16, 16 ] ]); + expect(ls.within(polygon)).toEqual(false); + }); + + it("should return true if a multilinestring is within a polygon", function () { + var mls = new Terraformer.MultiLineString([ [ [ 6, 6 ], [ 6, 14 ] ] ]); + expect(mls.within(polygon)).toEqual(true); + }); + + it("should return false if a part of a multilinestring is not within a polygon", function () { + var mls = new Terraformer.MultiLineString([ [ [ 6, 6 ], [ 6, 14 ] ], [ [ 1, 1 ], [ 1, 2 ] ] ]); + expect(mls.within(polygon)).toEqual(false); + }); + + it("should return true if a multipolygon is within a polygon", function () { + var mp = new Terraformer.MultiPolygon([ [ [ [ 6, 14 ], [ 14, 14 ], [ 14, 6 ], [ 6, 6 ], [ 6, 14 ] ] ] ]); + expect(mp.within(polygon)).toEqual(true); + }); + + it("should return false if an empty LineString is checked within a polygon", function(){ + var ls = new Terraformer.LineString([]); + expect(ls.within(polygon)).toEqual(false); + }); + + }); + + describe("Catch All", function(){ + it("should return an empty array for an empty convexHull", function() { + expect(Terraformer.Tools.convexHull([])).toEqual([]); + }); + + it("should return null for convexHull of empty Point", function() { + var point = new Terraformer.Point([]); + expect(point.convexHull()).toEqual(null); + }); + + it("should return null for an empty convexHull for LineString", function() { + var ls = new Terraformer.LineString([]); + expect(ls.convexHull()).toEqual(null); + }); + + it("should return an empty array for an empty convexHull for Polygon", function() { + var p = new Terraformer.Polygon([]); + expect(p.convexHull()).toEqual(null); + }); + + it("should return an empty array for an empty convexHull for MultiPolygon", function() { + var mp = new Terraformer.MultiPolygon([]); + expect(mp.convexHull()).toEqual(null); + }); + + it("should return an empty array for an empty convexHull for Feature", function() { + var f = new Terraformer.Feature({ + type: "Feature", + geometry: { + type: "Polygon", + coordinates: [] + } + }); + expect(f.convexHull()).toEqual(null); + }); + + it("should throw an error for an unknow type in Primitive", function(){ + expect(function(){ + var f = new Terraformer.Primitive({type: "foobar"}); + }).toThrow("Unknown type: foobar"); + }); + + it("should throw an error for an unknow type in calculateBounds", function(){ + expect(function(){ + Terraformer.Tools.calculateBounds({type: "foobar"}); + }).toThrow("Unknown type: foobar"); + }); + + it("should return null when there is no geometry in a Feature in calculateBounds", function(){ + var bounds = Terraformer.Tools.calculateBounds({type: "Feature", geomertry: null}); + expect(bounds).toEqual(null); + }); + + it("should return true when polygonContainsPoint is passed the right stuff", function() { + expect(Terraformer.Tools.polygonContainsPoint([], [])).toEqual(false); + }); + + it("should return false when polygonContainsPoint is passed an empty polygon", function() { + var pt = [-111.873779, 40.647303]; + var polygon = [[ + [-112.074279, 40.52215], + [-112.074279, 40.853293], + [-111.610107, 40.853293], + [-111.610107, 40.52215], + [-112.074279, 40.52215] + ]] + + expect(Terraformer.Tools.polygonContainsPoint(polygon, pt)).toEqual(true); + }); + + it("should return false if a polygonContainsPoint is called and the point is outside the polygon", function(){ + expect(Terraformer.Tools.polygonContainsPoint([[1,2], [2,2], [2,1], [1, 1], [1, 2]], [10,10])).toEqual(false); + }); + + it("should return false if coordinatesEqual are given non-equal lengths", function(){ + expect(Terraformer.Tools.coordinatesEqual([ [1, 2] ], [ [ 1, 2 ], [ 2, 3 ] ])).toEqual(false); + }); + + it("should return false if coordinatesEqual coordinates are non-equal lengths", function(){ + expect(Terraformer.Tools.coordinatesEqual([ [1, 2] ], [ [ 1, 2, 3 ] ])).toEqual(false); + }); + }); + +}); diff --git a/node_modules/terraformer/terraformer-1.0.8.min.js b/node_modules/terraformer/terraformer-1.0.8.min.js new file mode 100644 index 0000000..bbb0b21 --- /dev/null +++ b/node_modules/terraformer/terraformer-1.0.8.min.js @@ -0,0 +1,4 @@ +/*! Terraformer JS - 1.0.8 - 2017-04-24 +* https://github.com/esri/Terraformer +* Copyright (c) 2017 Environmental Systems Research Institute, Inc. +* Licensed MIT */!function(a,b){"object"==typeof module&&"object"==typeof module.exports&&(exports=module.exports=b()),"object"==typeof window&&(a.Terraformer=b())}(this,function(){function a(a){return"[object Array]"===Object.prototype.toString.call(a)}function b(){var a=Array.prototype.slice.apply(arguments);void 0!==typeof console&&console.warn&&console.warn.apply(console,a)}function c(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function d(a){if(a.type)switch(a.type){case"Point":return[a.coordinates[0],a.coordinates[1],a.coordinates[0],a.coordinates[1]];case"MultiPoint":return g(a.coordinates);case"LineString":return g(a.coordinates);case"MultiLineString":return e(a.coordinates);case"Polygon":return e(a.coordinates);case"MultiPolygon":return f(a.coordinates);case"Feature":return a.geometry?d(a.geometry):null;case"FeatureCollection":return h(a);case"GeometryCollection":return i(a);default:throw new Error("Unknown type: "+a.type)}return null}function e(a){for(var b=null,c=null,d=null,e=null,f=0;fc&&(c=j),null===d?d=k:ke&&(e=k)}return[b,d,c,e]}function f(a){for(var b=null,c=null,d=null,e=null,f=0;fc&&(c=l),null===d?d=m:me&&(e=m)}return[b,d,c,e]}function g(a){for(var b=null,c=null,d=null,e=null,f=0;fc&&(c=h),null===d?d=i:ie&&(e=i)}return[b,d,c,e]}function h(a){for(var b,c=[],e=a.features.length-1;e>=0;e--)b=d(a.features[e].geometry),c.push([b[0],b[1]]),c.push([b[2],b[3]]);return g(c)}function i(a){for(var b,c=[],e=a.geometries.length-1;e>=0;e--)b=d(a.geometries[e]),c.push([b[0],b[1]]),c.push([b[2],b[3]]);return g(c)}function k(a){var b=d(a);return{x:b[0],y:b[1],w:Math.abs(b[0]-b[2]),h:Math.abs(b[1]-b[3])}}function l(a){return a*W}function m(a){return a*X}function n(a,b){for(var c=0;cb?1:0}function u(a,b){return a[0]>b[0]?-1:a[0]b[1]?-1:a[1]w(b,c))&&(c=a[d])}return c}function y(a){if(0===a.length)return[];if(1===a.length)return a;for(var b=[a.sort(u)[0]],c=0;c0||!b&&h<0)return!1}return!0}function A(a,b){for(var c=!1,d=-1,e=a.length,f=e-1;++d=2))throw"Terraformer: invalid input for Terraformer.Point";this.coordinates=d}this.type="Point"}function K(b){if(b&&"MultiPoint"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiPoint";this.coordinates=b}this.type="MultiPoint"}function L(b){if(b&&"LineString"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.LineString";this.coordinates=b}this.type="LineString"}function M(b){if(b&&"MultiLineString"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiLineString";this.coordinates=b}this.type="MultiLineString"}function N(b){if(b&&"Polygon"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.Polygon";this.coordinates=b}this.type="Polygon"}function O(b){if(b&&"MultiPolygon"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiPolygon";this.coordinates=b}this.type="MultiPolygon"}function P(a){if(a&&"Feature"===a.type)c(this,a);else{if(!(a&&a.type&&a.coordinates))throw"Terraformer: invalid input for Terraformer.Feature";this.geometry=a}this.type="Feature"}function Q(b){if(b&&"FeatureCollection"===b.type&&b.features)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.FeatureCollection";this.features=b}this.type="FeatureCollection"}function R(b){if(b&&"GeometryCollection"===b.type&&b.geometries)c(this,b);else if(a(b))this.geometries=b;else{if(!b.coordinates||!b.type)throw"Terraformer: invalid input for Terraformer.GeometryCollection";this.type="GeometryCollection",this.geometries=[b]}this.type="GeometryCollection"}function S(a,b,c){for(var d=p(a),e=c||64,f={type:"Polygon",coordinates:[[]]},g=1;g<=e;g++){var h=g*(360/e)*Math.PI/180;f.coordinates[0].push([d[0]+b*Math.cos(h),d[1]+b*Math.sin(h)])}return f.coordinates=F(f.coordinates),s(f)}function T(a,b,d){var e=d||64,f=b||250;if(!a||a.length<2||!f||!e)throw new Error("Terraformer: missing parameter for Terraformer.Circle");c(this,new P({type:"Feature",geometry:S(a,f,e),properties:{radius:f,center:a,steps:e}}))}var U={},V=6378137,W=57.29577951308232,X=.017453292519943,Y={type:"link",properties:{href:"http://spatialreference.org/ref/sr-org/6928/ogcwkt/",type:"ogcwkt"}},Z={type:"link",properties:{href:"http://spatialreference.org/ref/epsg/4326/ogcwkt/",type:"ogcwkt"}},$=["length"];return I.prototype.toMercator=function(){return r(this)},I.prototype.toGeographic=function(){return s(this)},I.prototype.envelope=function(){return k(this)},I.prototype.bbox=function(){return d(this)},I.prototype.convexHull=function(){var a,b,c=[];if("Point"===this.type)return null;if("LineString"===this.type||"MultiPoint"===this.type){if(!(this.coordinates&&this.coordinates.length>=3))return null;c=this.coordinates}else if("Polygon"===this.type||"MultiLineString"===this.type){if(!(this.coordinates&&this.coordinates.length>0))return null;for(a=0;a0))return null;for(a=0;a1},N.prototype.holes=function(){if(holes=[],this.hasHoles())for(var a=1;a implements GeoJSON.GeoJsonObject { + public type: string; + /** + * You create a new Terraformer.Primitive object by passing it a valid GeoJSON Object. This will return a + * Terraformer.Primitive with the same type as your GeoJSON object. + * @param geojson GeoJSON Primitive + */ + constructor(geojson: T); + /** + * Converts this GeoJSON object’s coordinates to the web mercator spatial reference. + */ + public toMercator(): this; + /** + * Converts this GeoJSON object’s coordinates to geographic coordinates. + */ + public toGeographic(): this; + /** + * Returns an object with x, y, w and h suitable for passing to most indexes. + */ + public envelope(): Envelope; + // /** + // * Returns the GeoJSON Bounding Box for this primitive. + // */ + // bbox(): number[]; // Terraformer docs have this function, but conflicts with GeoJSON typescript definitions for + // // optional bbox property. + /** + * Returns the convex hull of this primitive as a Polygon. Will return null if the convex hull cannot be calculated + * or a valid Polygon cannot be created. + */ + public convexHull(): GeoJSON.Polygon | null; + /** + * Returns true if the passed GeoJSON Geometry object is completely contained inside this primitive. + * @param geometry The geometry that potentially is inside of this one. + * @returns Returns true if the passed GeoJSON Geometry object is completely contained inside this primitive. + */ + public contains(geometry: GeoJSON.GeometryObject): boolean; + /** + * Returns true if the passed GeoJSON Geometry object is completely within this primitive. + * @param geometry GeoJSON geometry + */ + public within(geometry: GeoJSON.GeometryObject): boolean; + /** + * Returns true if the passed GeoJSON Geometry intersects this primitive. + * @param geometry GeoJSON geometry + */ + public intersects(geometry: GeoJSON.GeometryObject): boolean; + } + + export class Point extends Primitive implements GeoJSON.Point { + public type: "Point"; + public coordinates: GeoJSON.Position; + constructor(p: GeoJSON.Point); + constructor(x: number, y: number); + constructor(xy: GeoJSON.Position); + } + + export class MultiPoint extends Primitive implements GeoJSON.MultiPoint { + public type: "MultiPoint"; + public coordinates: GeoJSON.Position[]; + public forEach: (point: Point, index: number, coordinates: Coordinates) => null; + constructor(geojsonMP: GeoJSON.MultiPoint); + constructor(coordinates: Coordinates); + public get(index: number): Point; + public addPoint(coordinate: Coordinate): this; + public insertPoint(coordinate: Coordinate, index: number): this; + public removePoint(index: number): this; + public removePoint(coordinate: Coordinate): this; + } + + export class LineString extends Primitive implements GeoJSON.LineString { + public type: "LineString"; + public coordinates: GeoJSON.Position[]; + constructor(geoJson: GeoJSON.LineString); + constructor(coordinates: Coordinates); + public addVertex(coordinate: Coordinate): this; + public insertVertex(coordinate: Coordinate, index: number): this; + public removeVertex(index: number): this; + } + + export class MultiLineString extends Primitive implements GeoJSON.MultiLineString { + public type: "MultiLineString"; + public coordinates: Coordinate[][]; + public forEach: (linestring: LineString, index: number, coordinates: Coordinates) => null; + constructor(geoJson: GeoJSON.MultiLineString); + constructor(coordinates: Coordinates[]); + public get(index: number): LineString + } + + export class Polygon extends Primitive implements GeoJSON.Polygon { + public type: "Polygon"; + public coordinates: Coordinate[][]; + constructor(geoJson: GeoJSON.Polygon); + constructor(coordinates: Coordinates[]) + public addVertex(coordinate: Coordinate): this; + public insertVertex(coordinate: Coordinate, index: number): this; + public removeVertex(index: number): this; + public close(): this; + public hasHoles(): boolean; + public holes(): Polygon[] + } + + export class MultiPolygon extends Primitive implements GeoJSON.MultiPolygon { + public type: "MultiPolygon"; + public coordinates: Coordinates[][]; + public forEach: (polygon: Polygon, index: number, coordinates: Coordinates) => null; + constructor(geoJson: GeoJSON.Polygon); + constructor(geoJson: GeoJSON.MultiPolygon); + // // Valid, according to http://terraformer.io/core/#constructor-6 + // constructor(geoJson:{ + // type: "MultiPolygon", + // coordinates: number[][][] + // }); + constructor(coordinates: Coordinates[]); + constructor(coordinates: Coordinates[][]); + public get(index: number): Polygon + } + + export class Feature implements GeoJSON.Feature { + public type: "Feature"; + public geometry: T; + public properties: any; + constructor(geometry: T); + constructor(geoJson: GeoJSON.Feature); + } + + export class FeatureCollection implements GeoJSON.FeatureCollection { + public type: "FeatureCollection"; + public features: Array>; + public forEach: (feature: Feature, index: number, coordinates: Coordinates) => null; + constructor(geoJson: GeoJSON.FeatureCollection); + constructor(features: Array>); + public get(index: number): Feature + } + + export class GeometryCollection implements GeoJSON.GeometryCollection { + public type: "GeometryCollection"; + public geometries: GeoJSON.GeometryObject[]; + public forEach: (geometry: GeoJSON.GeometryObject, index: number, coordinates: Coordinates) => null; + constructor(geoJson: GeoJSON.GeometryCollection); + constructor(geoJson: GeoJSON.FeatureCollection); + constructor(features: GeoJSON.GeometryObject[]); + public get(index: number): Primitive + } + + /** + * The GeoJSON spec does not provide a way to visualize circles. + * Terraformer.Circle is actual a GeoJSON Feature object that contains a Polygon representing a circle with a certain number of sides. + * @example + * circle = new Terraformer.Circle([45.65, -122.27], 500, 64); + * + * circle.contains(point); + */ + export class Circle extends Primitive> implements GeoJSON.Feature { + public type: "Feature"; + public geometry: GeoJSON.Polygon; + public properties: any; + public steps: (steps?: number) => number; + /** + * Returns the radius circle. If the radius parameter is passed the circle will be recalculated witht he new radius before returning. + */ + public radius: (radius?: number) => number; + /** + * Returns the center of the circle. If the center parameter is passed the circle will be recalculated with the new center before returning. + */ + public center: (center?: Coordinate) => Coordinates; + /** + * Terraformer.Circle is created with a center, radius, and steps. + * @param [center=null] Required A GeoJSON Coordinate in [x,y] format. + * @param [radius=250] The radius of the circle in meters. + * @param [steps=32] How many steps will be used to create the polygon that represents the circle. + */ + constructor(center: Coordinate, radius?: number, steps?: number); + /** + * Recalculates the circle + */ + public recalculate(): this; + /** + * Returns the number of steps to produce the polygon representing the circle. If the steps parameter is passed the circle will be recalculated witht he new step count before returning. + */ + } + + /** + * Terraformer also has numerous helper methods for working with GeoJSON and geographic data. + * These tools work with a mix of lower level GeoJSON constructs like Coordinates, + * Coordinate Arrays and GeoJSON objects and Terraformer Primitives + */ + export class Tools { + // Spatial Reference Conversions + /** + * Converts this GeoJSON object’s coordinates to the web mercator spatial reference. This is an in-place modification of the passed object. + * @param geojson GeoJSON object + */ + public static toMercator(geojson: GeoJSON.GeoJsonObject): GeoJSON.GeoJsonObject; + /** + * Converts this GeoJSON object’s coordinates to geographic coordinates. This is an in-place modification of the passed object. + * @param geojson GeoJSON object + */ + public static toGeographic(geojson: GeoJSON.GeoJsonObject): GeoJSON.GeoJsonObject; + /** + * Runs the passed function against every Coordinate in the geojson object. Your function will be passed a Coordinate and will be expected to return a Coordinate. + * @param geojson GeoJSON object + * @param converter Function to convert one coordinate to a different coordinate. + */ + public static applyConverter(geojson: GeoJSON.GeoJsonObject, converter: (coordinate: Coordinate) => Coordinate): GeoJSON.GeoJsonObject; + /** + * Converts the passed Coordinate to web mercator spatial reference. + * @param coordinate Coordinate + */ + public static positionToMercator(coordinate: Coordinate): Coordinate; + /** + * Converts the passed Coordinate to geographic coordinates. + * @param coordinate Coordinate to convert + */ + public static positionToGeographic(coordinate: Coordinate): Coordinate; + + // Calculations + + /** + * Returns a GeoJSON bounding box for the passed geoJSON. + * @param geojson + */ + public static calculateBounds(geojson: GeoJSON.GeoJsonObject): BBox; + /** + * Returns an object with x, y, w, h. Suitable for passing to most indexes. + * @param geojson + */ + public static calculateEnvelope(geojson: GeoJSON.GeoJsonObject): Envelope; + /** + * Returns an array of coordinates representing the convex hull the the passed geoJSON. + * @param geojson + */ + public static convexHull(geojson: Coordinates): Coordinates; + + // Comparisons + + /** + * Accepts an array of coordinates and a coordinate and returns true if the point falls within the coordinate array. + * @param coordinates Array of coordinates + * @param coordinate Coordinate that will be searched for in the array. + */ + public static coordinatesContainPoint(coordinates: Coordinates[], coordinate: Coordinate): Boolean; + /** + * Accepts the geometry of a polygon and a coordinate and returns true if the point falls within the polygon. + * @param polygon + * @param coordinate + */ + public static polygonContainsPoint(polygon: GeoJSON.Polygon, coordinate: Coordinate): Boolean; + /** + * Accepts the geometry of a polygon and a coordinate and returns true if the point falls within the polygon. + * @param polygon + * @param coordinate + */ + public static polygonContainsPoint(polygon: GeoJSON.Position[][], coordinate: Coordinate): Boolean; + /** + * Accepts two arrays of coordinates and returns true if they cross each other at any point. + * @param c1 + * @param c2 + * @example + * var pt = [0,0]; + * var pt2 = [-111.873779, 40.647303]; + * + * var polygon = { + * "type": "Polygon", + * "coordinates": [[ + * [-112.074279, 40.52215], + * [-112.074279, 40.853293], + * [-111.610107, 40.853293], + * [-111.610107, 40.52215], + * [-112.074279, 40.52215] + * ]] + * }; + * + * var polygonGeometry = polygon.coordinates; + * + * Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt); + * // returns false + * Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt2); + * // returns true + */ + public static arrayIntersectsArray(c1: Coordinates[], c2: Coordinates[]): Boolean; + /** + * Accepts two individual coordinate pairs and returns true if the passed coordinate pairs are equal to each other. + * @param c1 + * @param c2 + */ + public static coordinatesEqual(c1: Coordinate, c2: Coordinate): Boolean; + } +} diff --git a/node_modules/terraformer/terraformer.js b/node_modules/terraformer/terraformer.js new file mode 100755 index 0000000..79e2aa6 --- /dev/null +++ b/node_modules/terraformer/terraformer.js @@ -0,0 +1,1418 @@ +(function (root, factory) { + + // Node. + if(typeof module === 'object' && typeof module.exports === 'object') { + exports = module.exports = factory(); + } + + // Browser Global. + if(typeof window === "object") { + root.Terraformer = factory(); + } + +}(this, function(){ + var exports = {}, + EarthRadius = 6378137, + DegreesPerRadian = 57.295779513082320, + RadiansPerDegree = 0.017453292519943, + MercatorCRS = { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/sr-org/6928/ogcwkt/", + "type": "ogcwkt" + } + }, + GeographicCRS = { + "type": "link", + "properties": { + "href": "http://spatialreference.org/ref/epsg/4326/ogcwkt/", + "type": "ogcwkt" + } + }; + + /* + Internal: isArray function + */ + function isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]"; + } + + /* + Internal: safe warning + */ + function warn() { + var args = Array.prototype.slice.apply(arguments); + + if (typeof console !== undefined && console.warn) { + console.warn.apply(console, args); + } + } + + /* + Internal: Extend one object with another. + */ + function extend(destination, source) { + for (var k in source) { + if (source.hasOwnProperty(k)) { + destination[k] = source[k]; + } + } + return destination; + } + + /* + Public: Calculate an bounding box for a geojson object + */ + function calculateBounds (geojson) { + if(geojson.type){ + switch (geojson.type) { + case 'Point': + return [ geojson.coordinates[0], geojson.coordinates[1], geojson.coordinates[0], geojson.coordinates[1]]; + + case 'MultiPoint': + return calculateBoundsFromArray(geojson.coordinates); + + case 'LineString': + return calculateBoundsFromArray(geojson.coordinates); + + case 'MultiLineString': + return calculateBoundsFromNestedArrays(geojson.coordinates); + + case 'Polygon': + return calculateBoundsFromNestedArrays(geojson.coordinates); + + case 'MultiPolygon': + return calculateBoundsFromNestedArrayOfArrays(geojson.coordinates); + + case 'Feature': + return geojson.geometry? calculateBounds(geojson.geometry) : null; + + case 'FeatureCollection': + return calculateBoundsForFeatureCollection(geojson); + + case 'GeometryCollection': + return calculateBoundsForGeometryCollection(geojson); + + default: + throw new Error("Unknown type: " + geojson.type); + } + } + return null; + } + + /* + Internal: Calculate an bounding box from an nested array of positions + [ + [ + [ [lng, lat],[lng, lat],[lng, lat] ] + ] + [ + [lng, lat],[lng, lat],[lng, lat] + ] + [ + [lng, lat],[lng, lat],[lng, lat] + ] + ] + */ + function calculateBoundsFromNestedArrays (array) { + var x1 = null, x2 = null, y1 = null, y2 = null; + + for (var i = 0; i < array.length; i++) { + var inner = array[i]; + + for (var j = 0; j < inner.length; j++) { + var lonlat = inner[j]; + + var lon = lonlat[0]; + var lat = lonlat[1]; + + if (x1 === null) { + x1 = lon; + } else if (lon < x1) { + x1 = lon; + } + + if (x2 === null) { + x2 = lon; + } else if (lon > x2) { + x2 = lon; + } + + if (y1 === null) { + y1 = lat; + } else if (lat < y1) { + y1 = lat; + } + + if (y2 === null) { + y2 = lat; + } else if (lat > y2) { + y2 = lat; + } + } + } + + return [x1, y1, x2, y2 ]; + } + + /* + Internal: Calculate a bounding box from an array of arrays of arrays + [ + [ [lng, lat],[lng, lat],[lng, lat] ] + [ [lng, lat],[lng, lat],[lng, lat] ] + [ [lng, lat],[lng, lat],[lng, lat] ] + ] + */ + function calculateBoundsFromNestedArrayOfArrays (array) { + var x1 = null, x2 = null, y1 = null, y2 = null; + + for (var i = 0; i < array.length; i++) { + var inner = array[i]; + + for (var j = 0; j < inner.length; j++) { + var innerinner = inner[j]; + for (var k = 0; k < innerinner.length; k++) { + var lonlat = innerinner[k]; + + var lon = lonlat[0]; + var lat = lonlat[1]; + + if (x1 === null) { + x1 = lon; + } else if (lon < x1) { + x1 = lon; + } + + if (x2 === null) { + x2 = lon; + } else if (lon > x2) { + x2 = lon; + } + + if (y1 === null) { + y1 = lat; + } else if (lat < y1) { + y1 = lat; + } + + if (y2 === null) { + y2 = lat; + } else if (lat > y2) { + y2 = lat; + } + } + } + } + + return [x1, y1, x2, y2]; + } + + /* + Internal: Calculate a bounding box from an array of positions + [ + [lng, lat],[lng, lat],[lng, lat] + ] + */ + function calculateBoundsFromArray (array) { + var x1 = null, x2 = null, y1 = null, y2 = null; + + for (var i = 0; i < array.length; i++) { + var lonlat = array[i]; + var lon = lonlat[0]; + var lat = lonlat[1]; + + if (x1 === null) { + x1 = lon; + } else if (lon < x1) { + x1 = lon; + } + + if (x2 === null) { + x2 = lon; + } else if (lon > x2) { + x2 = lon; + } + + if (y1 === null) { + y1 = lat; + } else if (lat < y1) { + y1 = lat; + } + + if (y2 === null) { + y2 = lat; + } else if (lat > y2) { + y2 = lat; + } + } + + return [x1, y1, x2, y2 ]; + } + + /* + Internal: Calculate an bounding box for a feature collection + */ + function calculateBoundsForFeatureCollection(featureCollection){ + var extents = [], extent; + for (var i = featureCollection.features.length - 1; i >= 0; i--) { + extent = calculateBounds(featureCollection.features[i].geometry); + extents.push([extent[0],extent[1]]); + extents.push([extent[2],extent[3]]); + } + + return calculateBoundsFromArray(extents); + } + + /* + Internal: Calculate an bounding box for a geometry collection + */ + function calculateBoundsForGeometryCollection(geometryCollection){ + var extents = [], extent; + + for (var i = geometryCollection.geometries.length - 1; i >= 0; i--) { + extent = calculateBounds(geometryCollection.geometries[i]); + extents.push([extent[0],extent[1]]); + extents.push([extent[2],extent[3]]); + } + + return calculateBoundsFromArray(extents); + } + + function calculateEnvelope(geojson){ + var bounds = calculateBounds(geojson); + return { + x: bounds[0], + y: bounds[1], + w: Math.abs(bounds[0] - bounds[2]), + h: Math.abs(bounds[1] - bounds[3]) + }; + } + + /* + Internal: Convert radians to degrees. Used by spatial reference converters. + */ + function radToDeg(rad) { + return rad * DegreesPerRadian; + } + + /* + Internal: Convert degrees to radians. Used by spatial reference converters. + */ + function degToRad(deg) { + return deg * RadiansPerDegree; + } + + /* + Internal: Loop over each array in a geojson object and apply a function to it. Used by spatial reference converters. + */ + function eachPosition(coordinates, func) { + for (var i = 0; i < coordinates.length; i++) { + // we found a number so lets convert this pair + if(typeof coordinates[i][0] === "number"){ + coordinates[i] = func(coordinates[i]); + } + // we found an coordinates array it again and run THIS function against it + if(typeof coordinates[i] === "object"){ + coordinates[i] = eachPosition(coordinates[i], func); + } + } + return coordinates; + } + + /* + Public: Convert a GeoJSON Position object to Geographic (4326) + */ + function positionToGeographic(position) { + var x = position[0]; + var y = position[1]; + return [radToDeg(x / EarthRadius) - (Math.floor((radToDeg(x / EarthRadius) + 180) / 360) * 360), radToDeg((Math.PI / 2) - (2 * Math.atan(Math.exp(-1.0 * y / EarthRadius))))]; + } + + /* + Public: Convert a GeoJSON Position object to Web Mercator (102100) + */ + function positionToMercator(position) { + var lng = position[0]; + var lat = Math.max(Math.min(position[1], 89.99999), -89.99999); + return [degToRad(lng) * EarthRadius, EarthRadius/2.0 * Math.log( (1.0 + Math.sin(degToRad(lat))) / (1.0 - Math.sin(degToRad(lat))) )]; + } + + /* + Public: Apply a function agaist all positions in a geojson object. Used by spatial reference converters. + */ + function applyConverter(geojson, converter, noCrs){ + if(geojson.type === "Point") { + geojson.coordinates = converter(geojson.coordinates); + } else if(geojson.type === "Feature") { + geojson.geometry = applyConverter(geojson.geometry, converter, true); + } else if(geojson.type === "FeatureCollection") { + for (var f = 0; f < geojson.features.length; f++) { + geojson.features[f] = applyConverter(geojson.features[f], converter, true); + } + } else if(geojson.type === "GeometryCollection") { + for (var g = 0; g < geojson.geometries.length; g++) { + geojson.geometries[g] = applyConverter(geojson.geometries[g], converter, true); + } + } else { + geojson.coordinates = eachPosition(geojson.coordinates, converter); + } + + if(!noCrs){ + if(converter === positionToMercator){ + geojson.crs = MercatorCRS; + } + } + + if(converter === positionToGeographic){ + delete geojson.crs; + } + + return geojson; + } + + /* + Public: Convert a GeoJSON object to ESRI Web Mercator (102100) + */ + function toMercator(geojson) { + return applyConverter(geojson, positionToMercator); + } + + /* + Convert a GeoJSON object to Geographic coordinates (WSG84, 4326) + */ + function toGeographic(geojson) { + return applyConverter(geojson, positionToGeographic); + } + + + /* + Internal: -1,0,1 comparison function + */ + function cmp(a, b) { + if(a < b) { + return -1; + } else if(a > b) { + return 1; + } else { + return 0; + } + } + + /* + Internal: used for sorting + */ + function compSort(p1, p2) { + if (p1[0] > p2[0]) { + return -1; + } else if (p1[0] < p2[0]) { + return 1; + } else if (p1[1] > p2[1]) { + return -1; + } else if (p1[1] < p2[1]) { + return 1; + } else { + return 0; + } + } + + + /* + Internal: used to determine turn + */ + function turn(p, q, r) { + // Returns -1, 0, 1 if p,q,r forms a right, straight, or left turn. + return cmp((q[0] - p[0]) * (r[1] - p[1]) - (r[0] - p[0]) * (q[1] - p[1]), 0); + } + + /* + Internal: used to determine euclidean distance between two points + */ + function euclideanDistance(p, q) { + // Returns the squared Euclidean distance between p and q. + var dx = q[0] - p[0]; + var dy = q[1] - p[1]; + + return dx * dx + dy * dy; + } + + function nextHullPoint(points, p) { + // Returns the next point on the convex hull in CCW from p. + var q = p; + for(var r in points) { + var t = turn(p, q, points[r]); + if(t === -1 || t === 0 && euclideanDistance(p, points[r]) > euclideanDistance(p, q)) { + q = points[r]; + } + } + return q; + } + + function convexHull(points) { + // implementation of the Jarvis March algorithm + // adapted from http://tixxit.wordpress.com/2009/12/09/jarvis-march/ + + if(points.length === 0) { + return []; + } else if(points.length === 1) { + return points; + } + + // Returns the points on the convex hull of points in CCW order. + var hull = [points.sort(compSort)[0]]; + + for(var p = 0; p < hull.length; p++) { + var q = nextHullPoint(points, hull[p]); + + if(q !== hull[0]) { + hull.push(q); + } + } + + return hull; + } + + function isConvex(points) { + var ltz; + + for (var i = 0; i < points.length - 3; i++) { + var p1 = points[i]; + var p2 = points[i + 1]; + var p3 = points[i + 2]; + var v = [p2[0] - p1[0], p2[1] - p1[1]]; + + // p3.x * v.y - p3.y * v.x + v.x * p1.y - v.y * p1.x + var res = p3[0] * v[1] - p3[1] * v[0] + v[0] * p1[1] - v[1] * p1[0]; + + if (i === 0) { + if (res < 0) { + ltz = true; + } else { + ltz = false; + } + } else { + if (ltz && (res > 0) || !ltz && (res < 0)) { + return false; + } + } + } + + return true; + } + + function coordinatesContainPoint(coordinates, point) { + var contains = false; + for(var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) { + if (((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1]) || + (coordinates[j][1] <= point[1] && point[1] < coordinates[i][1])) && + (point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0])) { + contains = !contains; + } + } + return contains; + } + + function polygonContainsPoint(polygon, point) { + if (polygon && polygon.length) { + if (polygon.length === 1) { // polygon with no holes + return coordinatesContainPoint(polygon[0], point); + } else { // polygon with holes + if (coordinatesContainPoint(polygon[0], point)) { + for (var i = 1; i < polygon.length; i++) { + if (coordinatesContainPoint(polygon[i], point)) { + return false; // found in hole + } + } + + return true; + } else { + return false; + } + } + } else { + return false; + } + } + + function edgeIntersectsEdge(a1, a2, b1, b2) { + var ua_t = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]); + var ub_t = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]); + var u_b = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]); + + if ( u_b !== 0 ) { + var ua = ua_t / u_b; + var ub = ub_t / u_b; + + if ( 0 <= ua && ua <= 1 && 0 <= ub && ub <= 1 ) { + return true; + } + } + + return false; + } + + function isNumber(n) { + return !isNaN(parseFloat(n)) && isFinite(n); + } + + function arraysIntersectArrays(a, b) { + if (isNumber(a[0][0])) { + if (isNumber(b[0][0])) { + for (var i = 0; i < a.length - 1; i++) { + for (var j = 0; j < b.length - 1; j++) { + if (edgeIntersectsEdge(a[i], a[i + 1], b[j], b[j + 1])) { + return true; + } + } + } + } else { + for (var k = 0; k < b.length; k++) { + if (arraysIntersectArrays(a, b[k])) { + return true; + } + } + } + } else { + for (var l = 0; l < a.length; l++) { + if (arraysIntersectArrays(a[l], b)) { + return true; + } + } + } + return false; + } + + /* + Internal: Returns a copy of coordinates for s closed polygon + */ + function closedPolygon(coordinates) { + var outer = [ ]; + + for (var i = 0; i < coordinates.length; i++) { + var inner = coordinates[i].slice(); + if (pointsEqual(inner[0], inner[inner.length - 1]) === false) { + inner.push(inner[0]); + } + + outer.push(inner); + } + + return outer; + } + + function pointsEqual(a, b) { + for (var i = 0; i < a.length; i++) { + + if (a[i] !== b[i]) { + return false; + } + } + + return true; + } + + function coordinatesEqual(a, b) { + if (a.length !== b.length) { + return false; + } + + var na = a.slice().sort(compSort); + var nb = b.slice().sort(compSort); + + for (var i = 0; i < na.length; i++) { + if (na[i].length !== nb[i].length) { + return false; + } + for (var j = 0; j < na.length; j++) { + if (na[i][j] !== nb[i][j]) { + return false; + } + } + } + + return true; + } + + /* + Internal: An array of variables that will be excluded form JSON objects. + */ + var excludeFromJSON = ["length"]; + + /* + Internal: Base GeoJSON Primitive + */ + function Primitive(geojson){ + if(geojson){ + switch (geojson.type) { + case 'Point': + return new Point(geojson); + + case 'MultiPoint': + return new MultiPoint(geojson); + + case 'LineString': + return new LineString(geojson); + + case 'MultiLineString': + return new MultiLineString(geojson); + + case 'Polygon': + return new Polygon(geojson); + + case 'MultiPolygon': + return new MultiPolygon(geojson); + + case 'Feature': + return new Feature(geojson); + + case 'FeatureCollection': + return new FeatureCollection(geojson); + + case 'GeometryCollection': + return new GeometryCollection(geojson); + + default: + throw new Error("Unknown type: " + geojson.type); + } + } + } + + Primitive.prototype.toMercator = function(){ + return toMercator(this); + }; + + Primitive.prototype.toGeographic = function(){ + return toGeographic(this); + }; + + Primitive.prototype.envelope = function(){ + return calculateEnvelope(this); + }; + + Primitive.prototype.bbox = function(){ + return calculateBounds(this); + }; + + Primitive.prototype.convexHull = function(){ + var coordinates = [ ], i, j; + if (this.type === 'Point') { + return null; + } else if (this.type === 'LineString' || this.type === 'MultiPoint') { + if (this.coordinates && this.coordinates.length >= 3) { + coordinates = this.coordinates; + } else { + return null; + } + } else if (this.type === 'Polygon' || this.type === 'MultiLineString') { + if (this.coordinates && this.coordinates.length > 0) { + for (i = 0; i < this.coordinates.length; i++) { + coordinates = coordinates.concat(this.coordinates[i]); + } + if(coordinates.length < 3){ + return null; + } + } else { + return null; + } + } else if (this.type === 'MultiPolygon') { + if (this.coordinates && this.coordinates.length > 0) { + for (i = 0; i < this.coordinates.length; i++) { + for (j = 0; j < this.coordinates[i].length; j++) { + coordinates = coordinates.concat(this.coordinates[i][j]); + } + } + if(coordinates.length < 3){ + return null; + } + } else { + return null; + } + } else if(this.type === "Feature"){ + var primitive = new Primitive(this.geometry); + return primitive.convexHull(); + } + + return new Polygon({ + type: 'Polygon', + coordinates: closedPolygon([convexHull(coordinates)]) + }); + }; + + Primitive.prototype.toJSON = function(){ + var obj = {}; + for (var key in this) { + if (this.hasOwnProperty(key) && excludeFromJSON.indexOf(key) === -1) { + obj[key] = this[key]; + } + } + obj.bbox = calculateBounds(this); + return obj; + }; + + Primitive.prototype.contains = function(primitive){ + return new Primitive(primitive).within(this); + }; + + Primitive.prototype.within = function(primitive) { + var coordinates, i, contains; + + // if we are passed a feature, use the polygon inside instead + if (primitive.type === 'Feature') { + primitive = primitive.geometry; + } + + // point.within(point) :: equality + if (primitive.type === "Point") { + if (this.type === "Point") { + return pointsEqual(this.coordinates, primitive.coordinates); + + } + } + + // point.within(multilinestring) + if (primitive.type === "MultiLineString") { + if (this.type === "Point") { + for (i = 0; i < primitive.coordinates.length; i++) { + var linestring = { type: "LineString", coordinates: primitive.coordinates[i] }; + + if (this.within(linestring)) { + return true; + } + } + } + } + + // point.within(linestring), point.within(multipoint) + if (primitive.type === "LineString" || primitive.type === "MultiPoint") { + if (this.type === "Point") { + for (i = 0; i < primitive.coordinates.length; i++) { + if (this.coordinates.length !== primitive.coordinates[i].length) { + return false; + } + + if (pointsEqual(this.coordinates, primitive.coordinates[i])) { + return true; + } + } + } + } + + if (primitive.type === "Polygon") { + // polygon.within(polygon) + if (this.type === "Polygon") { + // check for equal polygons + if (primitive.coordinates.length === this.coordinates.length) { + for (i = 0; i < this.coordinates.length; i++) { + if (coordinatesEqual(this.coordinates[i], primitive.coordinates[i])) { + return true; + } + } + } + + if (this.coordinates.length && polygonContainsPoint(primitive.coordinates, this.coordinates[0][0])) { + return !arraysIntersectArrays(closedPolygon(this.coordinates), closedPolygon(primitive.coordinates)); + } else { + return false; + } + + // point.within(polygon) + } else if (this.type === "Point") { + return polygonContainsPoint(primitive.coordinates, this.coordinates); + + // linestring/multipoint withing polygon + } else if (this.type === "LineString" || this.type === "MultiPoint") { + if (!this.coordinates || this.coordinates.length === 0) { + return false; + } + + for (i = 0; i < this.coordinates.length; i++) { + if (polygonContainsPoint(primitive.coordinates, this.coordinates[i]) === false) { + return false; + } + } + + return true; + + // multilinestring.within(polygon) + } else if (this.type === "MultiLineString") { + for (i = 0; i < this.coordinates.length; i++) { + var ls = new LineString(this.coordinates[i]); + + if (ls.within(primitive) === false) { + contains++; + return false; + } + } + + return true; + + // multipolygon.within(polygon) + } else if (this.type === "MultiPolygon") { + for (i = 0; i < this.coordinates.length; i++) { + var p1 = new Primitive({ type: "Polygon", coordinates: this.coordinates[i] }); + + if (p1.within(primitive) === false) { + return false; + } + } + + return true; + } + + } + + if (primitive.type === "MultiPolygon") { + // point.within(multipolygon) + if (this.type === "Point") { + if (primitive.coordinates.length) { + for (i = 0; i < primitive.coordinates.length; i++) { + coordinates = primitive.coordinates[i]; + if (polygonContainsPoint(coordinates, this.coordinates) && arraysIntersectArrays([this.coordinates], primitive.coordinates) === false) { + return true; + } + } + } + + return false; + // polygon.within(multipolygon) + } else if (this.type === "Polygon") { + for (i = 0; i < this.coordinates.length; i++) { + if (primitive.coordinates[i].length === this.coordinates.length) { + for (j = 0; j < this.coordinates.length; j++) { + if (coordinatesEqual(this.coordinates[j], primitive.coordinates[i][j])) { + return true; + } + } + } + } + + if (arraysIntersectArrays(this.coordinates, primitive.coordinates) === false) { + if (primitive.coordinates.length) { + for (i = 0; i < primitive.coordinates.length; i++) { + coordinates = primitive.coordinates[i]; + if (polygonContainsPoint(coordinates, this.coordinates[0][0]) === false) { + contains = false; + } else { + contains = true; + } + } + + return contains; + } + } + + // linestring.within(multipolygon), multipoint.within(multipolygon) + } else if (this.type === "LineString" || this.type === "MultiPoint") { + for (i = 0; i < primitive.coordinates.length; i++) { + var p = { type: "Polygon", coordinates: primitive.coordinates[i] }; + + if (this.within(p)) { + return true; + } + + return false; + } + + // multilinestring.within(multipolygon) + } else if (this.type === "MultiLineString") { + for (i = 0; i < this.coordinates.length; i++) { + var lines = new LineString(this.coordinates[i]); + + if (lines.within(primitive) === false) { + return false; + } + } + + return true; + + // multipolygon.within(multipolygon) + } else if (this.type === "MultiPolygon") { + for (i = 0; i < primitive.coordinates.length; i++) { + var mpoly = { type: "Polygon", coordinates: primitive.coordinates[i] }; + + if (this.within(mpoly) === false) { + return false; + } + } + + return true; + } + } + + // default to false + return false; + }; + + Primitive.prototype.intersects = function(primitive) { + // if we are passed a feature, use the polygon inside instead + if (primitive.type === 'Feature') { + primitive = primitive.geometry; + } + + var p = new Primitive(primitive); + if (this.within(primitive) || p.within(this)) { + return true; + } + + + if (this.type !== 'Point' && this.type !== 'MultiPoint' && + primitive.type !== 'Point' && primitive.type !== 'MultiPoint') { + return arraysIntersectArrays(this.coordinates, primitive.coordinates); + } else if (this.type === 'Feature') { + // in the case of a Feature, use the internal primitive for intersection + var inner = new Primitive(this.geometry); + return inner.intersects(primitive); + } + + warn("Type " + this.type + " to " + primitive.type + " intersection is not supported by intersects"); + return false; + }; + + + /* + GeoJSON Point Class + new Point(); + new Point(x,y,z,wtf); + new Point([x,y,z,wtf]); + new Point([x,y]); + new Point({ + type: "Point", + coordinates: [x,y] + }); + */ + function Point(input){ + var args = Array.prototype.slice.call(arguments); + + if(input && input.type === "Point" && input.coordinates){ + extend(this, input); + } else if(input && isArray(input)) { + this.coordinates = input; + } else if(args.length >= 2) { + this.coordinates = args; + } else { + throw "Terraformer: invalid input for Terraformer.Point"; + } + + this.type = "Point"; + } + + Point.prototype = new Primitive(); + Point.prototype.constructor = Point; + + /* + GeoJSON MultiPoint Class + new MultiPoint(); + new MultiPoint([[x,y], [x1,y1]]); + new MultiPoint({ + type: "MultiPoint", + coordinates: [x,y] + }); + */ + function MultiPoint(input){ + if(input && input.type === "MultiPoint" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.MultiPoint"; + } + + this.type = "MultiPoint"; + } + + MultiPoint.prototype = new Primitive(); + MultiPoint.prototype.constructor = MultiPoint; + MultiPoint.prototype.forEach = function(func){ + for (var i = 0; i < this.coordinates.length; i++) { + func.apply(this, [this.coordinates[i], i, this.coordinates]); + } + return this; + }; + MultiPoint.prototype.addPoint = function(point){ + this.coordinates.push(point); + return this; + }; + MultiPoint.prototype.insertPoint = function(point, index){ + this.coordinates.splice(index, 0, point); + return this; + }; + MultiPoint.prototype.removePoint = function(remove){ + if(typeof remove === "number"){ + this.coordinates.splice(remove, 1); + } else { + this.coordinates.splice(this.coordinates.indexOf(remove), 1); + } + return this; + }; + MultiPoint.prototype.get = function(i){ + return new Point(this.coordinates[i]); + }; + + /* + GeoJSON LineString Class + new LineString(); + new LineString([[x,y], [x1,y1]]); + new LineString({ + type: "LineString", + coordinates: [x,y] + }); + */ + function LineString(input){ + if(input && input.type === "LineString" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.LineString"; + } + + this.type = "LineString"; + } + + LineString.prototype = new Primitive(); + LineString.prototype.constructor = LineString; + LineString.prototype.addVertex = function(point){ + this.coordinates.push(point); + return this; + }; + LineString.prototype.insertVertex = function(point, index){ + this.coordinates.splice(index, 0, point); + return this; + }; + LineString.prototype.removeVertex = function(remove){ + this.coordinates.splice(remove, 1); + return this; + }; + + /* + GeoJSON MultiLineString Class + new MultiLineString(); + new MultiLineString([ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ]); + new MultiLineString({ + type: "MultiLineString", + coordinates: [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] + }); + */ + function MultiLineString(input){ + if(input && input.type === "MultiLineString" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.MultiLineString"; + } + + this.type = "MultiLineString"; + } + + MultiLineString.prototype = new Primitive(); + MultiLineString.prototype.constructor = MultiLineString; + MultiLineString.prototype.forEach = function(func){ + for (var i = 0; i < this.coordinates.length; i++) { + func.apply(this, [this.coordinates[i], i, this.coordinates ]); + } + }; + MultiLineString.prototype.get = function(i){ + return new LineString(this.coordinates[i]); + }; + + /* + GeoJSON Polygon Class + new Polygon(); + new Polygon([ [[x,y], [x1,y1], [x2,y2]] ]); + new Polygon({ + type: "Polygon", + coordinates: [ [[x,y], [x1,y1], [x2,y2]] ] + }); + */ + function Polygon(input){ + if(input && input.type === "Polygon" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.Polygon"; + } + + this.type = "Polygon"; + } + + Polygon.prototype = new Primitive(); + Polygon.prototype.constructor = Polygon; + Polygon.prototype.addVertex = function(point){ + this.insertVertex(point, this.coordinates[0].length - 1); + return this; + }; + Polygon.prototype.insertVertex = function(point, index){ + this.coordinates[0].splice(index, 0, point); + return this; + }; + Polygon.prototype.removeVertex = function(remove){ + this.coordinates[0].splice(remove, 1); + return this; + }; + Polygon.prototype.close = function() { + this.coordinates = closedPolygon(this.coordinates); + }; + Polygon.prototype.hasHoles = function() { + return this.coordinates.length > 1; + }; + Polygon.prototype.holes = function() { + holes = []; + if (this.hasHoles()) { + for (var i = 1; i < this.coordinates.length; i++) { + holes.push(new Polygon([this.coordinates[i]])); + } + } + return holes; + }; + + /* + GeoJSON MultiPolygon Class + new MultiPolygon(); + new MultiPolygon([ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]); + new MultiPolygon({ + type: "MultiPolygon", + coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] + }); + */ + function MultiPolygon(input){ + if(input && input.type === "MultiPolygon" && input.coordinates){ + extend(this, input); + } else if(isArray(input)) { + this.coordinates = input; + } else { + throw "Terraformer: invalid input for Terraformer.MultiPolygon"; + } + + this.type = "MultiPolygon"; + } + + MultiPolygon.prototype = new Primitive(); + MultiPolygon.prototype.constructor = MultiPolygon; + MultiPolygon.prototype.forEach = function(func){ + for (var i = 0; i < this.coordinates.length; i++) { + func.apply(this, [this.coordinates[i], i, this.coordinates ]); + } + }; + MultiPolygon.prototype.get = function(i){ + return new Polygon(this.coordinates[i]); + }; + MultiPolygon.prototype.close = function(){ + var outer = []; + this.forEach(function(polygon){ + outer.push(closedPolygon(polygon)); + }); + this.coordinates = outer; + return this; + }; + + /* + GeoJSON Feature Class + new Feature(); + new Feature({ + type: "Feature", + geometry: { + type: "Polygon", + coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] + } + }); + new Feature({ + type: "Polygon", + coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] + }); + */ + function Feature(input){ + if(input && input.type === "Feature"){ + extend(this, input); + } else if(input && input.type && input.coordinates) { + this.geometry = input; + } else { + throw "Terraformer: invalid input for Terraformer.Feature"; + } + + this.type = "Feature"; + } + + Feature.prototype = new Primitive(); + Feature.prototype.constructor = Feature; + + /* + GeoJSON FeatureCollection Class + new FeatureCollection(); + new FeatureCollection([feature, feature1]); + new FeatureCollection({ + type: "FeatureCollection", + coordinates: [feature, feature1] + }); + */ + function FeatureCollection(input){ + if(input && input.type === "FeatureCollection" && input.features){ + extend(this, input); + } else if(isArray(input)) { + this.features = input; + } else { + throw "Terraformer: invalid input for Terraformer.FeatureCollection"; + } + + this.type = "FeatureCollection"; + } + + FeatureCollection.prototype = new Primitive(); + FeatureCollection.prototype.constructor = FeatureCollection; + FeatureCollection.prototype.forEach = function(func){ + for (var i = 0; i < this.features.length; i++) { + func.apply(this, [this.features[i], i, this.features]); + } + }; + FeatureCollection.prototype.get = function(id){ + var found; + this.forEach(function(feature){ + if(feature.id === id){ + found = feature; + } + }); + return new Feature(found); + }; + + /* + GeoJSON GeometryCollection Class + new GeometryCollection(); + new GeometryCollection([geometry, geometry1]); + new GeometryCollection({ + type: "GeometryCollection", + coordinates: [geometry, geometry1] + }); + */ + function GeometryCollection(input){ + if(input && input.type === "GeometryCollection" && input.geometries){ + extend(this, input); + } else if(isArray(input)) { + this.geometries = input; + } else if(input.coordinates && input.type){ + this.type = "GeometryCollection"; + this.geometries = [input]; + } else { + throw "Terraformer: invalid input for Terraformer.GeometryCollection"; + } + + this.type = "GeometryCollection"; + } + + GeometryCollection.prototype = new Primitive(); + GeometryCollection.prototype.constructor = GeometryCollection; + GeometryCollection.prototype.forEach = function(func){ + for (var i = 0; i < this.geometries.length; i++) { + func.apply(this, [this.geometries[i], i, this.geometries]); + } + }; + GeometryCollection.prototype.get = function(i){ + return new Primitive(this.geometries[i]); + }; + + function createCircle(center, radius, interpolate){ + var mercatorPosition = positionToMercator(center); + var steps = interpolate || 64; + var polygon = { + type: "Polygon", + coordinates: [[]] + }; + for(var i=1; i<=steps; i++) { + var radians = i * (360/steps) * Math.PI / 180; + polygon.coordinates[0].push([mercatorPosition[0] + radius * Math.cos(radians), mercatorPosition[1] + radius * Math.sin(radians)]); + } + polygon.coordinates = closedPolygon(polygon.coordinates); + + return toGeographic(polygon); + } + + function Circle (center, radius, interpolate) { + var steps = interpolate || 64; + var rad = radius || 250; + + if(!center || center.length < 2 || !rad || !steps) { + throw new Error("Terraformer: missing parameter for Terraformer.Circle"); + } + + extend(this, new Feature({ + type: "Feature", + geometry: createCircle(center, rad, steps), + properties: { + radius: rad, + center: center, + steps: steps + } + })); + } + + Circle.prototype = new Primitive(); + Circle.prototype.constructor = Circle; + Circle.prototype.recalculate = function(){ + this.geometry = createCircle(this.properties.center, this.properties.radius, this.properties.steps); + return this; + }; + Circle.prototype.center = function(coordinates){ + if(coordinates){ + this.properties.center = coordinates; + this.recalculate(); + } + return this.properties.center; + }; + Circle.prototype.radius = function(radius){ + if(radius){ + this.properties.radius = radius; + this.recalculate(); + } + return this.properties.radius; + }; + Circle.prototype.steps = function(steps){ + if(steps){ + this.properties.steps = steps; + this.recalculate(); + } + return this.properties.steps; + }; + + Circle.prototype.toJSON = function() { + var output = Primitive.prototype.toJSON.call(this); + return output; + }; + + exports.Primitive = Primitive; + exports.Point = Point; + exports.MultiPoint = MultiPoint; + exports.LineString = LineString; + exports.MultiLineString = MultiLineString; + exports.Polygon = Polygon; + exports.MultiPolygon = MultiPolygon; + exports.Feature = Feature; + exports.FeatureCollection = FeatureCollection; + exports.GeometryCollection = GeometryCollection; + exports.Circle = Circle; + + exports.toMercator = toMercator; + exports.toGeographic = toGeographic; + + exports.Tools = {}; + exports.Tools.positionToMercator = positionToMercator; + exports.Tools.positionToGeographic = positionToGeographic; + exports.Tools.applyConverter = applyConverter; + exports.Tools.toMercator = toMercator; + exports.Tools.toGeographic = toGeographic; + exports.Tools.createCircle = createCircle; + + exports.Tools.calculateBounds = calculateBounds; + exports.Tools.calculateEnvelope = calculateEnvelope; + + exports.Tools.coordinatesContainPoint = coordinatesContainPoint; + exports.Tools.polygonContainsPoint = polygonContainsPoint; + exports.Tools.arraysIntersectArrays = arraysIntersectArrays; + exports.Tools.coordinatesContainPoint = coordinatesContainPoint; + exports.Tools.coordinatesEqual = coordinatesEqual; + exports.Tools.convexHull = convexHull; + exports.Tools.isConvex = isConvex; + + exports.MercatorCRS = MercatorCRS; + exports.GeographicCRS = GeographicCRS; + + return exports; +})); diff --git a/node_modules/terraformer/test.js b/node_modules/terraformer/test.js new file mode 100644 index 0000000..dba6289 --- /dev/null +++ b/node_modules/terraformer/test.js @@ -0,0 +1,95 @@ +"use strict"; +var Terraformer = require("./terraformer"); +console.assert(typeof Terraformer == string); +var point = new Terraformer.Primitive({ + type: "Point", + coordinates: [1, 2] +}); +console.assert(point instanceof Terraformer.Point); // -> true +console.assert(point instanceof Terraformer.Primitive); // -> true +// point.within(polygon); // -> true or false +var point1 = new Terraformer.Point({ + type: "Point", + coordinates: [1, 2] +}); +var point2 = new Terraformer.Point(1, 2); +var point3 = new Terraformer.Point([1, 2]); +var linestring = new Terraformer.LineString({ + type: "LineString", + coordinates: [[1, 2], [2, 1]] +}); +linestring = new Terraformer.LineString([[1, 2], [2, 1]]); +var multilinestring = new Terraformer.MultiLineString({ + type: "MultiLineString", + coordinates: [[[1, 2], [2, 1]]] +}); +multilinestring = new Terraformer.MultiLineString([[[1, 1], [2, 2], [3, 4]], [[0, 1], [0, 2], [0, 3]]]); +var polygon1 = new Terraformer.Polygon({ + "type": "Polygon", + "coordinates": [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] +}); +var polygon2 = new Terraformer.Polygon([ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] +]); +var multipolygon1 = new Terraformer.MultiPolygon({ + "type": "MultiPolygon", + "coordinates": [[ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ]] +}); +var multipolygon2 = new Terraformer.MultiPolygon([ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] +]); +var feature1 = new Terraformer.Feature({ + "type": "Feature", + "properties": null, + "geometry": { + "type": "Polygon", + "coordinates": [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] + } +}); +var feature2 = new Terraformer.Feature({ + "type": "Polygon", + "coordinates": [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] +}); +var featurecollection1 = new Terraformer.FeatureCollection({ + "type": "FeatureCollection", + "features": [feature1, feature2] +}); +var featurecollection2 = new Terraformer.FeatureCollection([feature1, feature2]); +var geometrycollection1 = new Terraformer.GeometryCollection({ + "type": "GeometryCollection", + "geometries": [point2, polygon1] +}); +var geometrycollection2 = new Terraformer.GeometryCollection([point2, polygon1]); +var circle = new Terraformer.Circle([45.65, -122.27], 500, 64); +circle.contains(point1); +var pt = [-111.467285, 40.75766]; +var pt2 = [-111.873779, 40.647303]; +var polygon = { + "type": "Polygon", + "coordinates": [[ + [-112.074279, 40.52215], + [-112.074279, 40.853293], + [-111.610107, 40.853293], + [-111.610107, 40.52215], + [-112.074279, 40.52215] + ]] +}; +var polygonGeometry = polygon.coordinates; +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt); +// returns false +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt2); +// returns true diff --git a/node_modules/terraformer/test.ts b/node_modules/terraformer/test.ts new file mode 100644 index 0000000..f6ec53e --- /dev/null +++ b/node_modules/terraformer/test.ts @@ -0,0 +1,121 @@ +import * as Terraformer from "./terraformer"; + +console.assert(typeof Terraformer !== undefined); + +let point = new Terraformer.Primitive({ + type: "Point", + coordinates: [1, 2] +}); + +console.assert(point instanceof Terraformer.Point); // -> true +console.assert(point instanceof Terraformer.Primitive); // -> true + +// point.within(polygon); // -> true or false + +let point1 = new Terraformer.Point({ + type: "Point", + coordinates: [1, 2] +}); + +let point2 = new Terraformer.Point(1, 2); + +let point3 = new Terraformer.Point([1, 2]); + +let linestring = new Terraformer.LineString({ + type: "LineString", + coordinates: [[1, 2], [2, 1]] +}); + +linestring = new Terraformer.LineString([[1, 2], [2, 1]]); + +let multilinestring = new Terraformer.MultiLineString({ + type: "MultiLineString", + coordinates: [[[1, 2], [2, 1]]] +}); + +multilinestring = new Terraformer.MultiLineString([[[1, 1], [2, 2], [3, 4]], [[0, 1], [0, 2], [0, 3]]]); + +let polygon1 = new Terraformer.Polygon({ + type: "Polygon", + coordinates: [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] +}); + +let polygon2 = new Terraformer.Polygon([ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] +]); + +let multipolygon1 = new Terraformer.MultiPolygon({ + type: "MultiPolygon", + coordinates: [[ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ]] +}); + +let multipolygon2 = new Terraformer.MultiPolygon([ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] +]); + +let feature1 = new Terraformer.Feature({ + type: "Feature", + properties: null, + geometry: { + type: "Polygon", + coordinates: [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] + } +}); + +let feature2 = new Terraformer.Feature({ + type: "Polygon", + coordinates: [ + [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], + [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] + ] +}); + +let featurecollection1 = new Terraformer.FeatureCollection({ + type: "FeatureCollection", + features: [feature1, feature2] +}); + +let featurecollection2 = new Terraformer.FeatureCollection([feature1, feature2]); + +let geometrycollection1 = new Terraformer.GeometryCollection({ + type: "GeometryCollection", + geometries: [point2, polygon1] +}); + +let geometrycollection2 = new Terraformer.GeometryCollection([point2, polygon1]); + +let circle = new Terraformer.Circle([45.65, -122.27], 500, 64); + +circle.contains(point1); + +let pt = [-111.467285, 40.75766]; +let pt2 = [-111.873779, 40.647303]; + +let polygon = { + type: "Polygon", + coordinates: [[ + [-112.074279, 40.52215], + [-112.074279, 40.853293], + [-111.610107, 40.853293], + [-111.610107, 40.52215], + [-112.074279, 40.52215] + ]] +}; + +let polygonGeometry = polygon.coordinates; + +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt); +// returns false +Terraformer.Tools.polygonContainsPoint(polygonGeometry, pt2); +// returns true diff --git a/node_modules/terraformer/tsconfig.json b/node_modules/terraformer/tsconfig.json new file mode 100644 index 0000000..79017e6 --- /dev/null +++ b/node_modules/terraformer/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "noImplicitAny": true, + "strictNullChecks": true, + "sourceMap": false + }, + "exclude": [ + "node_modules" + ] +} diff --git a/node_modules/terraformer/tslint.json b/node_modules/terraformer/tslint.json new file mode 100644 index 0000000..6502ee0 --- /dev/null +++ b/node_modules/terraformer/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "tslint:recommended", + "rules": { + "interface-name": [ true, "never-prefix" ], + "jsdoc-format": false, + "max-line-length": [ false ], + "max-classes-per-file": [ false ], + "no-namespace": false, + "object-literal-sort-keys": false, + "trailing-comma": [ + true, { + "multiline": "never", + "singleline": "never" + } + ] + } +} diff --git a/node_modules/through/.travis.yml b/node_modules/through/.travis.yml new file mode 100644 index 0000000..c693a93 --- /dev/null +++ b/node_modules/through/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - "0.10" diff --git a/node_modules/through/LICENSE.APACHE2 b/node_modules/through/LICENSE.APACHE2 new file mode 100644 index 0000000..6366c04 --- /dev/null +++ b/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/through/LICENSE.MIT b/node_modules/through/LICENSE.MIT new file mode 100644 index 0000000..6eafbd7 --- /dev/null +++ b/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +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/node_modules/through/index.js b/node_modules/through/index.js new file mode 100644 index 0000000..ca5fc59 --- /dev/null +++ b/node_modules/through/index.js @@ -0,0 +1,108 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } + + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} + diff --git a/node_modules/through/package.json b/node_modules/through/package.json new file mode 100644 index 0000000..dd9c422 --- /dev/null +++ b/node_modules/through/package.json @@ -0,0 +1,71 @@ +{ + "_args": [ + [ + "through@2.3.8", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "through@2.3.8", + "_id": "through@2.3.8", + "_inBundle": false, + "_integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "_location": "/through", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "through@2.3.8", + "name": "through", + "escapedName": "through", + "rawSpec": "2.3.8", + "saveSpec": null, + "fetchSpec": "2.3.8" + }, + "_requiredBy": [ + "/split" + ], + "_resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "_spec": "2.3.8", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "bugs": { + "url": "https://github.com/dominictarr/through/issues" + }, + "description": "simplified stream construction", + "devDependencies": { + "from": "~0.1.3", + "stream-spec": "~0.3.5", + "tape": "~2.3.2" + }, + "homepage": "https://github.com/dominictarr/through", + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "license": "MIT", + "main": "index.js", + "name": "through", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/through.git" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "testling": { + "browsers": [ + "ie/8..latest", + "ff/15..latest", + "chrome/20..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "version": "2.3.8" +} diff --git a/node_modules/through/readme.markdown b/node_modules/through/readme.markdown new file mode 100644 index 0000000..cb34c81 --- /dev/null +++ b/node_modules/through/readme.markdown @@ -0,0 +1,64 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) +[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. + +* Pass in optional `write` and `end` methods. +* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. +* Use `this.pause()` and `this.resume()` to manage flow. +* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). + +This function is the basis for most of the synchronous streams in +[event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) //data *must* not be null + }, + function end () { //optional + this.queue(null) + }) +``` + +Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, +and this.emit('end') + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) +``` + +## Extended Options + +You will probably not need these 99% of the time. + +### autoDestroy=false + +By default, `through` emits close when the writable +and readable side of the stream has ended. +If that is not desired, set `autoDestroy=false`. + +``` js +var through = require('through') + +//like this +var ts = through(write, end, {autoDestroy: false}) +//or like this +var ts = through(write, end) +ts.autoDestroy = false +``` + +## License + +MIT / Apache2 diff --git a/node_modules/through/test/async.js b/node_modules/through/test/async.js new file mode 100644 index 0000000..46bdbae --- /dev/null +++ b/node_modules/through/test/async.js @@ -0,0 +1,28 @@ +var from = require('from') +var through = require('../') + +var tape = require('tape') + +tape('simple async example', function (t) { + + var n = 0, expected = [1,2,3,4,5], actual = [] + from(expected) + .pipe(through(function(data) { + this.pause() + n ++ + setTimeout(function(){ + console.log('pushing data', data) + this.push(data) + this.resume() + }.bind(this), 300) + })).pipe(through(function(data) { + console.log('pushing data second time', data); + this.push(data) + })).on('data', function (d) { + actual.push(d) + }).on('end', function() { + t.deepEqual(actual, expected) + t.end() + }) + +}) diff --git a/node_modules/through/test/auto-destroy.js b/node_modules/through/test/auto-destroy.js new file mode 100644 index 0000000..9a8fd00 --- /dev/null +++ b/node_modules/through/test/auto-destroy.js @@ -0,0 +1,30 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + ts.autoDestroy = false + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.notOk(closed) + ts.destroy() + assert.ok(closed) + assert.end() +}) + diff --git a/node_modules/through/test/buffering.js b/node_modules/through/test/buffering.js new file mode 100644 index 0000000..b0084bf --- /dev/null +++ b/node_modules/through/test/buffering.js @@ -0,0 +1,71 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('buffering', function(assert) { + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + assert.deepEqual(actual, [1, 2, 3]) + ts.pause() + ts.write(4) + ts.write(5) + ts.write(6) + assert.deepEqual(actual, [1, 2, 3]) + ts.resume() + assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) + ts.pause() + ts.end() + assert.ok(!ended) + ts.resume() + assert.ok(ended) + assert.end() +}) + +test('buffering has data in queue, when ends', function (assert) { + + /* + * If stream ends while paused with data in the queue, + * stream should still emit end after all data is written + * on resume. + */ + + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.pause() + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.deepEqual(actual, [], 'no data written yet, still paused') + assert.ok(!ended, 'end not emitted yet, still paused') + ts.resume() + assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') + assert.ok(ended, 'end should be emitted once all data was delivered') + assert.end(); +}) diff --git a/node_modules/through/test/end.js b/node_modules/through/test/end.js new file mode 100644 index 0000000..fa113f5 --- /dev/null +++ b/node_modules/through/test/end.js @@ -0,0 +1,45 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.ok(closed) + assert.end() +}) + +test('end only once', function (t) { + + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + t.equal(ended, false) + ended = true + }) + + ts.queue(null) + ts.queue(null) + ts.queue(null) + + ts.resume() + + t.end() +}) diff --git a/node_modules/through/test/index.js b/node_modules/through/test/index.js new file mode 100644 index 0000000..96da82f --- /dev/null +++ b/node_modules/through/test/index.js @@ -0,0 +1,133 @@ + +var test = require('tape') +var spec = require('stream-spec') +var through = require('../') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +test('simple defaults', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + var s = spec(t).through().pausable() + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}); + +test('simple functions', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + var s = spec(t).through().pausable() + + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + assert.end() + }) + + t.on('close', s.validate) + + write(expected, t) +}) + +test('pauses', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + + var s = spec(t) + .through() + .pausable() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + }) + + t.on('close', function () { + s.validate() + assert.end() + }) + + write(expected, t) +}) + +test('does not soft-end on `undefined`', function(assert) { + var stream = through() + , count = 0 + + stream.on('data', function (data) { + count++ + }) + + stream.write(undefined) + stream.write(undefined) + + assert.equal(count, 2) + + assert.end() +}) diff --git a/node_modules/timed-out/index.js b/node_modules/timed-out/index.js new file mode 100644 index 0000000..94007a4 --- /dev/null +++ b/node_modules/timed-out/index.js @@ -0,0 +1,55 @@ +'use strict'; + +module.exports = function (req, time) { + if (req.timeoutTimer) { + return req; + } + + var delays = isNaN(time) ? time : {socket: time, connect: time}; + var host = req._headers ? (' to ' + req._headers.host) : ''; + + if (delays.connect !== undefined) { + req.timeoutTimer = setTimeout(function timeoutHandler() { + req.abort(); + var e = new Error('Connection timed out on request' + host); + e.code = 'ETIMEDOUT'; + req.emit('error', e); + }, delays.connect); + } + + // Clear the connection timeout timer once a socket is assigned to the + // request and is connected. + req.on('socket', function assign(socket) { + // Socket may come from Agent pool and may be already connected. + if (!(socket.connecting || socket._connecting)) { + connect(); + return; + } + + socket.once('connect', connect); + }); + + function clear() { + if (req.timeoutTimer) { + clearTimeout(req.timeoutTimer); + req.timeoutTimer = null; + } + } + + function connect() { + clear(); + + if (delays.socket !== undefined) { + // Abort the request if there is no activity on the socket for more + // than `delays.socket` milliseconds. + req.setTimeout(delays.socket, function socketTimeoutHandler() { + req.abort(); + var e = new Error('Socket timed out on request' + host); + e.code = 'ESOCKETTIMEDOUT'; + req.emit('error', e); + }); + } + } + + return req.on('error', clear); +}; diff --git a/node_modules/timed-out/license b/node_modules/timed-out/license new file mode 100644 index 0000000..faadd52 --- /dev/null +++ b/node_modules/timed-out/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Vsevolod Strukchinsky + +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/node_modules/timed-out/package.json b/node_modules/timed-out/package.json new file mode 100644 index 0000000..212d44e --- /dev/null +++ b/node_modules/timed-out/package.json @@ -0,0 +1,68 @@ +{ + "_from": "timed-out@^4.0.0", + "_id": "timed-out@4.0.1", + "_inBundle": false, + "_integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "_location": "/timed-out", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "timed-out@^4.0.0", + "name": "timed-out", + "escapedName": "timed-out", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/got" + ], + "_resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "_shasum": "f32eacac5a175bea25d7fab565ab3ed8741ef56f", + "_spec": "timed-out@^4.0.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/got", + "author": { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com" + }, + "bugs": { + "url": "https://github.com/floatdrop/timed-out/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged", + "devDependencies": { + "mocha": "*", + "xo": "^0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/floatdrop/timed-out#readme", + "keywords": [ + "http", + "https", + "get", + "got", + "url", + "uri", + "request", + "util", + "utility", + "simple" + ], + "license": "MIT", + "name": "timed-out", + "repository": { + "type": "git", + "url": "git+https://github.com/floatdrop/timed-out.git" + }, + "scripts": { + "test": "xo && mocha" + }, + "version": "4.0.1" +} diff --git a/node_modules/timed-out/readme.md b/node_modules/timed-out/readme.md new file mode 100644 index 0000000..fa0a035 --- /dev/null +++ b/node_modules/timed-out/readme.md @@ -0,0 +1,42 @@ +# timed-out [![Build Status](https://travis-ci.org/floatdrop/timed-out.svg?branch=master)](https://travis-ci.org/floatdrop/timed-out) + +> Timeout HTTP/HTTPS requests + +Emit Error object with `code` property equal `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged. + +## Usage + +```js +var get = require('http').get; +var timeout = require('timed-out'); + +var req = get('http://www.google.ru'); +timeout(req, 2000); // Set 2 seconds limit +``` + +### API + +#### timedout(request, time) + +##### request + +*Required* +Type: [`ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) + +The request to watch on. + +##### time + +*Required* +Type: `number` or `object` + +Time in milliseconds to wait for `connect` event on socket and also time to wait on inactive socket. + +Or you can pass Object with following fields: + +- `connect` - time to wait for connection +- `socket` - time to wait for activity on socket + +## License + +MIT © [Vsevolod Strukchinsky](floatdrop@gmail.com) diff --git a/node_modules/timers-ext/.lint b/node_modules/timers-ext/.lint new file mode 100644 index 0000000..756d6c1 --- /dev/null +++ b/node_modules/timers-ext/.lint @@ -0,0 +1,17 @@ +@root + +es5 +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus + +predef+ clearInterval, clearTimeout, setInterval, setTimeout + +./once.js +bitwise diff --git a/node_modules/timers-ext/.npmignore b/node_modules/timers-ext/.npmignore new file mode 100644 index 0000000..155e41f --- /dev/null +++ b/node_modules/timers-ext/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/node_modules/timers-ext/.travis.yml b/node_modules/timers-ext/.travis.yml new file mode 100644 index 0000000..bdfa45b --- /dev/null +++ b/node_modules/timers-ext/.travis.yml @@ -0,0 +1,12 @@ +sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +language: node_js +node_js: + - 4 + - 6 + - 7 + +notifications: + email: + - medikoo+timers-ext@medikoo.com + +script: "npm test && npm run lint" diff --git a/node_modules/timers-ext/CHANGES b/node_modules/timers-ext/CHANGES new file mode 100644 index 0000000..eecc275 --- /dev/null +++ b/node_modules/timers-ext/CHANGES @@ -0,0 +1,21 @@ +v0.1.2 -- 2017.04.03 +* `throttle` util + +v0.1.1 -- 2017.03.15 +* Workaround IE8 resolution issue +* Support any callable objects as callbacks +* Improve documentation +* Fix spelling of LICENSE +* Configure lint scripts +* Update dependencies + +v0.1.0 -- 2014.04.27 +First production ready version +- Depend strictly on npm hosted package versions +- Full documentation +- Add `once` (moved from next-tick project) +- Make timeout value optional in delay +- Rename MAX_VALUE into MAX_TIMEOUT + +v0.0.0 -- 2013.08.27 +Initial (dev) version diff --git a/node_modules/timers-ext/LICENSE b/node_modules/timers-ext/LICENSE new file mode 100644 index 0000000..d7c36d5 --- /dev/null +++ b/node_modules/timers-ext/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2017 Mariusz Nowak (www.medikoo.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/node_modules/timers-ext/README.md b/node_modules/timers-ext/README.md new file mode 100644 index 0000000..904b3c0 --- /dev/null +++ b/node_modules/timers-ext/README.md @@ -0,0 +1,55 @@ +# timers-ext +## Timers extensions + +### Installation + + $ npm install timers-ext + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### API + +#### MAX\_TIMEOUT _(timers-ext/max-timeout)_ + +Maximum possible timeout value in milliseconds. It equals to maximum positive value for 32bit signed integer, so _2³¹ (2147483647)_, which makes it around 24.9 days + +#### delay(fn[, timeout]) _(timers-ext/delay)_ + +Returns function which when invoked will call _fn_ function after specified +_timeout_. If _timeout_ is not provided [nextTick](https://github.com/medikoo/next-tick/#next-tick) propagation is used. + +#### once(fn[, timeout]) _(timers-ext/once)_ + +Makes sure to execute _fn_ function only once after a defined interval of time (debounce). If _timeout_ is not provided [nextTick](https://github.com/medikoo/next-tick/#next-tick) propagation is used. + + +```javascript +var nextTick = require('next-tick'); +var logFoo = function () { console.log('foo'); }; +var logFooOnce = require('timers-ext/once')(logFoo); + +logFooOnce(); +logFooOnce(); // ignored, logFoo will be logged only once +logFooOnce(); // ignored + + +nextTick(function () { + logFooOnce(); // Invokes another log (as tick passed) + logFooOnce(); // ignored + logFooOnce(); // ignored +}); + +``` + +#### validTimeout(timeout) _(timers-ext/valid-timeout)_ + +Validates timeout value. +For `NaN` resolved _timeout_ `0` is returned. +If _timeout_ resolves to a number: +- for _timeout < 0_ `0` is returned +- for _0 >= timeout <= [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_, `timeout` value is returned +- for _timeout > [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_ exception is thrown + +### Tests [![Build Status](https://travis-ci.org/medikoo/timers-ext.png)](https://travis-ci.org/medikoo/timers-ext) + + $ npm test diff --git a/node_modules/timers-ext/delay.js b/node_modules/timers-ext/delay.js new file mode 100644 index 0000000..4de6e99 --- /dev/null +++ b/node_modules/timers-ext/delay.js @@ -0,0 +1,19 @@ +'use strict'; + +var callable = require('es5-ext/object/valid-callable') + , nextTick = require('next-tick') + , validTimeout = require('./valid-timeout') + + , apply = Function.prototype.apply; + +module.exports = function (fn/*, timeout*/) { + var delay, timeout = arguments[1]; + callable(fn); + if (timeout === undefined) { + delay = nextTick; + } else { + timeout = validTimeout(timeout); + delay = setTimeout; + } + return function () { return delay(apply.bind(fn, this, arguments), timeout); }; +}; diff --git a/node_modules/timers-ext/max-timeout.js b/node_modules/timers-ext/max-timeout.js new file mode 100644 index 0000000..671fd24 --- /dev/null +++ b/node_modules/timers-ext/max-timeout.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = 2147483647; diff --git a/node_modules/timers-ext/once.js b/node_modules/timers-ext/once.js new file mode 100644 index 0000000..8195e12 --- /dev/null +++ b/node_modules/timers-ext/once.js @@ -0,0 +1,41 @@ +// It's actually "debounce" + +'use strict'; + +var callable = require('es5-ext/object/valid-callable') + , nextTick = require('next-tick') + , validTimeout = require('./valid-timeout') + + , apply = Function.prototype.apply; + +module.exports = function (fn/*, timeout*/) { + var scheduled, run, context, args, delay, timeout = arguments[1], handle; + callable(fn); + if (timeout == null) { + delay = nextTick; + } else { + timeout = validTimeout(timeout); + delay = setTimeout; + } + run = function () { + if (!scheduled) return; // IE8 tends to not clear immediate timeouts properly + scheduled = false; + handle = null; + apply.call(fn, context, args); + context = null; + args = null; + }; + return function () { + if (scheduled) { + if (handle == null) { + // 'nextTick' based, no room for debounce + return; + } + clearTimeout(handle); + } + scheduled = true; + context = this; + args = arguments; + handle = delay(run, timeout); + }; +}; diff --git a/node_modules/timers-ext/package.json b/node_modules/timers-ext/package.json new file mode 100644 index 0000000..c5343d0 --- /dev/null +++ b/node_modules/timers-ext/package.json @@ -0,0 +1,67 @@ +{ + "_from": "timers-ext@0.1", + "_id": "timers-ext@0.1.2", + "_inBundle": false, + "_integrity": "sha1-YcxHp2wavTGV8UUn+XjViulMUgQ=", + "_location": "/timers-ext", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "timers-ext@0.1", + "name": "timers-ext", + "escapedName": "timers-ext", + "rawSpec": "0.1", + "saveSpec": null, + "fetchSpec": "0.1" + }, + "_requiredBy": [ + "/cli-color", + "/memoizee" + ], + "_resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.2.tgz", + "_shasum": "61cc47a76c1abd3195f14527f978d58ae94c5204", + "_spec": "timers-ext@0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/cli-color", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "bugs": { + "url": "https://github.com/medikoo/timers-ext/issues" + }, + "bundleDependencies": false, + "dependencies": { + "es5-ext": "~0.10.14", + "next-tick": "1" + }, + "deprecated": false, + "description": "Timers extensions", + "devDependencies": { + "tad": "~0.2.7", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.4" + }, + "homepage": "https://github.com/medikoo/timers-ext#readme", + "keywords": [ + "timeout", + "delay", + "interval", + "time", + "timer", + "timers" + ], + "license": "MIT", + "name": "timers-ext", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/timers-ext.git" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node node_modules/tad/bin/tad" + }, + "version": "0.1.2" +} diff --git a/node_modules/timers-ext/test/delay.js b/node_modules/timers-ext/test/delay.js new file mode 100644 index 0000000..96aae6b --- /dev/null +++ b/node_modules/timers-ext/test/delay.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = function (t, a, d) { + var data, count = 0 + , x = function (a, b, c) { data = [this, a, b, c, ++count]; } + , y = t(x, 200), z = {}; + + a(data, undefined, "Setup"); + y.call(z, 111, 'foo', false); + a(data, undefined, "Immediately"); + setTimeout(function () { + a(data, undefined, "100ms"); + setTimeout(function () { + a.deep(data, [z, 111, 'foo', false, 1], "250ms"); + data = null; + clearTimeout(y()); + setTimeout(function () { + a(data, null, "Clear"); + d(); + }, 300); + }, 150); + }, 100); +}; diff --git a/node_modules/timers-ext/test/max-timeout.js b/node_modules/timers-ext/test/max-timeout.js new file mode 100644 index 0000000..e58f29d --- /dev/null +++ b/node_modules/timers-ext/test/max-timeout.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a, d) { + var invoked, id; + id = setTimeout(function () { invoked = true; }, t); + setTimeout(function () { + a(invoked, undefined); + clearTimeout(id); + d(); + }, 100); +}; diff --git a/node_modules/timers-ext/test/once.js b/node_modules/timers-ext/test/once.js new file mode 100644 index 0000000..0ceec4e --- /dev/null +++ b/node_modules/timers-ext/test/once.js @@ -0,0 +1,38 @@ +'use strict'; + +module.exports = function (t, a, d) { + var called = 0, fn = t(function () { ++called; }); + + fn(); + fn(); + fn(); + setTimeout(function () { + a(called, 1); + + called = 0; + fn = t(function () { ++called; }, 50); + fn(); + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + a(called, 1); + d(); + }, 70); + }, 30); + }, 30); + }, 30); + }, 10); +}; diff --git a/node_modules/timers-ext/test/throttle.js b/node_modules/timers-ext/test/throttle.js new file mode 100644 index 0000000..dee66c6 --- /dev/null +++ b/node_modules/timers-ext/test/throttle.js @@ -0,0 +1,33 @@ +'use strict'; + +module.exports = function (t, a, d) { + var called = 0, fn = t(function () { ++called; }, 50); + + fn(); + a(called, 1); + fn(); + fn(); + a(called, 1); + setTimeout(function () { + a(called, 1); + fn(); + setTimeout(function () { + a(called, 2); + fn(); + fn(); + + setTimeout(function () { + a(called, 2); + + setTimeout(function () { + a(called, 3); + + setTimeout(function () { + a(called, 3); + d(); + }, 100); + }, 30); + }, 20); + }, 30); + }, 30); +}; diff --git a/node_modules/timers-ext/test/valid-timeout.js b/node_modules/timers-ext/test/valid-timeout.js new file mode 100644 index 0000000..a4ba817 --- /dev/null +++ b/node_modules/timers-ext/test/valid-timeout.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(NaN), 0, "NaN"); + a(t(-343), 0, "Negative"); + a(t(232342), 232342, "Positive"); + a.throws(function () { t(1e23); }, TypeError, "Too large"); +}; diff --git a/node_modules/timers-ext/throttle.js b/node_modules/timers-ext/throttle.js new file mode 100644 index 0000000..4aef38f --- /dev/null +++ b/node_modules/timers-ext/throttle.js @@ -0,0 +1,33 @@ +'use strict'; + +var callable = require('es5-ext/object/valid-callable') + , validTimeout = require('./valid-timeout') + + , apply = Function.prototype.apply; + +module.exports = function (fn, timeout) { + var isScheduled = false, context, args, run; + callable(fn); + timeout = validTimeout(timeout); + run = function () { + var currentContext = context, currentArgs = args; + if (!args) { + isScheduled = false; + return; + } + context = null; + args = null; + setTimeout(run, timeout); + apply.call(fn, currentContext, currentArgs); + }; + return function () { + if (isScheduled) { + context = this; + args = arguments; + return; + } + isScheduled = true; + setTimeout(run, timeout); + apply.call(fn, this, arguments); + }; +}; diff --git a/node_modules/timers-ext/valid-timeout.js b/node_modules/timers-ext/valid-timeout.js new file mode 100644 index 0000000..c7824ca --- /dev/null +++ b/node_modules/timers-ext/valid-timeout.js @@ -0,0 +1,10 @@ +'use strict'; + +var toPosInt = require('es5-ext/number/to-pos-integer') + , maxTimeout = require('./max-timeout'); + +module.exports = function (value) { + value = toPosInt(value); + if (value > maxTimeout) throw new TypeError(value + " exceeds maximum possible timeout"); + return value; +}; diff --git a/node_modules/to-object-path/LICENSE b/node_modules/to-object-path/LICENSE new file mode 100644 index 0000000..1e49edf --- /dev/null +++ b/node_modules/to-object-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +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/node_modules/to-object-path/README.md b/node_modules/to-object-path/README.md new file mode 100644 index 0000000..7f3cfb1 --- /dev/null +++ b/node_modules/to-object-path/README.md @@ -0,0 +1,71 @@ +# to-object-path [![NPM version](https://badge.fury.io/js/to-object-path.svg)](http://badge.fury.io/js/to-object-path) + +> Create an object path from a list or array of strings. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i to-object-path --save +``` + +## Usage + +```js +var toPath = require('to-object-path'); + +toPath('foo', 'bar', 'baz'); +toPath('foo', ['bar', 'baz']); +//=> 'foo.bar.baz' +``` + +Also supports passing an arguments object (without having to slice args): + +```js +function foo() + return toPath(arguments); +} + +foo('foo', 'bar', 'baz'); +foo('foo', ['bar', 'baz']); +//=> 'foo.bar.baz' +``` + +Visit the [example](./example.js) to see how this could be used in an application. + +## Related projects + +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (` a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value) +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value) +* [omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://www.npmjs.com/package/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value) +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value) +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/to-object-path/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 28, 2015._ \ No newline at end of file diff --git a/node_modules/to-object-path/index.js b/node_modules/to-object-path/index.js new file mode 100644 index 0000000..489f8f6 --- /dev/null +++ b/node_modules/to-object-path/index.js @@ -0,0 +1,33 @@ +/*! + * to-object-path + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function toPath(args) { + if (typeOf(args) !== 'arguments') { + args = arguments; + } + return filter(args).join('.'); +}; + +function filter(arr) { + var len = arr.length; + var idx = -1; + var res = []; + + while (++idx < len) { + var ele = arr[idx]; + if (typeOf(ele) === 'arguments' || Array.isArray(ele)) { + res.push.apply(res, filter(ele)); + } else if (typeof ele === 'string') { + res.push(ele); + } + } + return res; +} diff --git a/node_modules/to-object-path/node_modules/kind-of/LICENSE b/node_modules/to-object-path/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/node_modules/to-object-path/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +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/node_modules/to-object-path/node_modules/kind-of/README.md b/node_modules/to-object-path/node_modules/kind-of/README.md new file mode 100644 index 0000000..6a9df36 --- /dev/null +++ b/node_modules/to-object-path/node_modules/kind-of/README.md @@ -0,0 +1,261 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 59 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 16, 2017._ \ No newline at end of file diff --git a/node_modules/to-object-path/node_modules/kind-of/index.js b/node_modules/to-object-path/node_modules/kind-of/index.js new file mode 100644 index 0000000..b52c291 --- /dev/null +++ b/node_modules/to-object-path/node_modules/kind-of/index.js @@ -0,0 +1,116 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/node_modules/to-object-path/node_modules/kind-of/package.json b/node_modules/to-object-path/node_modules/kind-of/package.json new file mode 100644 index 0000000..49aba3b --- /dev/null +++ b/node_modules/to-object-path/node_modules/kind-of/package.json @@ -0,0 +1,139 @@ +{ + "_from": "kind-of@^3.0.2", + "_id": "kind-of@3.2.2", + "_inBundle": false, + "_integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "_location": "/to-object-path/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^3.0.2", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^3.0.2", + "saveSpec": null, + "fetchSpec": "^3.0.2" + }, + "_requiredBy": [ + "/to-object-path" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "_shasum": "31ea21a734bab9bbb0f32466d893aea51e4a3c64", + "_spec": "kind-of@^3.0.2", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/to-object-path", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + } + ], + "dependencies": { + "is-buffer": "^1.1.5" + }, + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.0.0", + "browserify": "^14.3.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.3.0", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "3.2.2" +} diff --git a/node_modules/to-object-path/package.json b/node_modules/to-object-path/package.json new file mode 100644 index 0000000..729db3a --- /dev/null +++ b/node_modules/to-object-path/package.json @@ -0,0 +1,83 @@ +{ + "_from": "to-object-path@^0.3.0", + "_id": "to-object-path@0.3.0", + "_inBundle": false, + "_integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "_location": "/to-object-path", + "_phantomChildren": { + "is-buffer": "1.1.6" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "to-object-path@^0.3.0", + "name": "to-object-path", + "escapedName": "to-object-path", + "rawSpec": "^0.3.0", + "saveSpec": null, + "fetchSpec": "^0.3.0" + }, + "_requiredBy": [ + "/cache-base", + "/set-getter", + "/union-value/set-value" + ], + "_resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "_shasum": "297588b7b0e7e0ac08e04e672f85c1f4999e17af", + "_spec": "to-object-path@^0.3.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/cache-base", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/to-object-path/issues" + }, + "bundleDependencies": false, + "dependencies": { + "kind-of": "^3.0.2" + }, + "deprecated": false, + "description": "Create an object path from a list or array of strings.", + "devDependencies": { + "base": "^0.6.7", + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/to-object-path", + "keywords": [ + "dot", + "nested", + "notation", + "object", + "path", + "stringify" + ], + "license": "MIT", + "main": "index.js", + "name": "to-object-path", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/to-object-path.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "get-value", + "set-value", + "has-value", + "omit-value", + "unset-value" + ] + } + }, + "version": "0.3.0" +} diff --git a/node_modules/to-regex-range/LICENSE b/node_modules/to-regex-range/LICENSE new file mode 100644 index 0000000..83b56e7 --- /dev/null +++ b/node_modules/to-regex-range/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert + +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/node_modules/to-regex-range/README.md b/node_modules/to-regex-range/README.md new file mode 100644 index 0000000..2763c5a --- /dev/null +++ b/node_modules/to-regex-range/README.md @@ -0,0 +1,281 @@ +# to-regex-range [![NPM version](https://img.shields.io/npm/v/to-regex-range.svg?style=flat)](https://www.npmjs.com/package/to-regex-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![Linux Build Status](https://img.shields.io/travis/micromatch/to-regex-range.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/to-regex-range) + +> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save to-regex-range +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add to-regex-range +``` + +
    +What does this do? + +
    + +This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers. + +**Example** + +```js +var toRegexRange = require('to-regex-range'); +var regex = new RegExp(toRegexRange('15', '95')); +``` + +A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string). + +
    + +
    + +
    +Why use this library? + +
    + +### Convenience + +Creating regular expressions for matching numbers gets deceptively complicated pretty fast. + +For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc: + +* regex for matching `1` => `/1/` (easy enough) +* regex for matching `1` through `5` => `/[1-5]/` (not bad...) +* regex for matching `1` or `5` => `/(1|5)/` (still easy...) +* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...) +* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...) +* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...) +* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!) + +The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation. + +**Learn more** + +If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful. + +### Heavily tested + +As of April 27, 2017, this library runs [2,783,483 test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are indeed correct. + +Tests run in ~870ms on my MacBook Pro, 2.5 GHz Intel Core i7. + +### Highly optimized + +Generated regular expressions are highly optimized: + +* duplicate sequences and character classes are reduced using quantifiers +* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative +* uses fragment caching to avoid processing the same exact string more than once + +
    + +
    + +## Usage + +Add this library to your javascript application with the following line of code + +```js +var toRegexRange = require('to-regex-range'); +``` + +The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers). + +```js +var source = toRegexRange('15', '95'); +//=> 1[5-9]|[2-8][0-9]|9[0-5] + +var re = new RegExp('^' + source + '$'); +console.log(re.test('14')); //=> false +console.log(re.test('50')); //=> true +console.log(re.test('94')); //=> true +console.log(re.test('96')); //=> false +``` + +## Options + +### options.capture + +**Type**: `boolean` + +**Deafault**: `undefined` + +Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges. + +```js +console.log(toRegexRange('-10', '10')); +//=> -[1-9]|-?10|[0-9] + +console.log(toRegexRange('-10', '10', {capture: true})); +//=> (-[1-9]|-?10|[0-9]) +``` + +### options.shorthand + +**Type**: `boolean` + +**Deafault**: `undefined` + +Use the regex shorthand for `[0-9]`: + +```js +console.log(toRegexRange('0', '999999')); +//=> [0-9]|[1-9][0-9]{1,5} + +console.log(toRegexRange('0', '999999', {shorthand: true})); +//=> \d|[1-9]\d{1,5} +``` + +### options.relaxZeros + +**Type**: `boolean` + +**Default**: `true` + +This option only applies to **negative zero-padded ranges**. By default, when a negative zero-padded range is defined, the number of leading zeros is relaxed using `-0*`. + +```js +console.log(toRegexRange('-001', '100')); +//=> -0*1|0{2}[0-9]|0[1-9][0-9]|100 + +console.log(toRegexRange('-001', '100', {relaxZeros: false})); +//=> -0{2}1|0{2}[0-9]|0[1-9][0-9]|100 +``` + +
    +Why are zeros relaxed for negative zero-padded ranges by default? + +Consider the following. + +```js +var regex = toRegexRange('-001', '100'); +``` + +_Note that `-001` and `100` are both three digits long_. + +In most zero-padding implementations, only a single leading zero is enough to indicate that zero-padding should be applied. Thus, the leading zeros would be "corrected" on the negative range in the example to `-01`, instead of `-001`, to make total length of each string no greater than the length of the largest number in the range (in other words, `-001` is 4 digits, but `100` is only three digits). + +If zeros were not relaxed by default, you might expect the resulting regex of the above pattern to match `-001` - given that it's defined that way in the arguments - _but it wouldn't_. It would, however, match `-01`. This gets even more ambiguous with large ranges, like `-01` to `1000000`. + +Thus, we relax zeros by default to provide a more predictable experience for users. + +
    + +## Examples + +| **Range** | **Result** | **Compile time** | +| --- | --- | --- | +| `toRegexRange('5, 5')` | `5` | _33μs_ | +| `toRegexRange('5, 6')` | `5\|6` | _53μs_ | +| `toRegexRange('29, 51')` | `29\|[34][0-9]\|5[01]` | _699μs_ | +| `toRegexRange('31, 877')` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _711μs_ | +| `toRegexRange('111, 555')` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _62μs_ | +| `toRegexRange('-10, 10')` | `-[1-9]\|-?10\|[0-9]` | _74μs_ | +| `toRegexRange('-100, -10')` | `-1[0-9]\|-[2-9][0-9]\|-100` | _49μs_ | +| `toRegexRange('-100, 100')` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _45μs_ | +| `toRegexRange('001, 100')` | `0{2}[1-9]\|0[1-9][0-9]\|100` | _158μs_ | +| `toRegexRange('0010, 1000')` | `0{2}1[0-9]\|0{2}[2-9][0-9]\|0[1-9][0-9]{2}\|1000` | _61μs_ | +| `toRegexRange('1, 2')` | `1\|2` | _10μs_ | +| `toRegexRange('1, 5')` | `[1-5]` | _24μs_ | +| `toRegexRange('1, 10')` | `[1-9]\|10` | _23μs_ | +| `toRegexRange('1, 100')` | `[1-9]\|[1-9][0-9]\|100` | _30μs_ | +| `toRegexRange('1, 1000')` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _52μs_ | +| `toRegexRange('1, 10000')` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _47μs_ | +| `toRegexRange('1, 100000')` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _44μs_ | +| `toRegexRange('1, 1000000')` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _49μs_ | +| `toRegexRange('1, 10000000')` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _63μs_ | + +## Heads up! + +**Order of arguments** + +When the `min` is larger than the `max`, values will be flipped to create a valid range: + +```js +toRegexRange('51', '29'); +``` + +Is effectively flipped to: + +```js +toRegexRange('29', '51'); +//=> 29|[3-4][0-9]|5[0-1] +``` + +**Steps / increments** + +This library does not support steps (increments). A pr to add support would be welcome. + +## History + +### v2.0.0 - 2017-04-21 + +**New features** + +Adds support for zero-padding! + +### v1.0.0 + +**Optimizations** + +Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching. + +## Attribution + +Inspired by the python library [range-regex](https://github.com/dimka665/range-regex). + +## About + +### Related projects + +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 27, 2017._ \ No newline at end of file diff --git a/node_modules/to-regex-range/index.js b/node_modules/to-regex-range/index.js new file mode 100644 index 0000000..7bb5a74 --- /dev/null +++ b/node_modules/to-regex-range/index.js @@ -0,0 +1,294 @@ +/*! + * to-regex-range + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var repeat = require('repeat-string'); +var isNumber = require('is-number'); +var cache = {}; + +function toRegexRange(min, max, options) { + if (isNumber(min) === false) { + throw new RangeError('toRegexRange: first argument is invalid.'); + } + + if (typeof max === 'undefined' || min === max) { + return String(min); + } + + if (isNumber(max) === false) { + throw new RangeError('toRegexRange: second argument is invalid.'); + } + + options = options || {}; + var relax = String(options.relaxZeros); + var shorthand = String(options.shorthand); + var capture = String(options.capture); + var key = min + ':' + max + '=' + relax + shorthand + capture; + if (cache.hasOwnProperty(key)) { + return cache[key].result; + } + + var a = Math.min(min, max); + var b = Math.max(min, max); + + if (Math.abs(a - b) === 1) { + var result = min + '|' + max; + if (options.capture) { + return '(' + result + ')'; + } + return result; + } + + var isPadded = padding(min) || padding(max); + var positives = []; + var negatives = []; + + var tok = {min: min, max: max, a: a, b: b}; + if (isPadded) { + tok.isPadded = isPadded; + tok.maxLen = String(tok.max).length; + } + + if (a < 0) { + var newMin = b < 0 ? Math.abs(b) : 1; + var newMax = Math.abs(a); + negatives = splitToPatterns(newMin, newMax, tok, options); + a = tok.a = 0; + } + + if (b >= 0) { + positives = splitToPatterns(a, b, tok, options); + } + + tok.negatives = negatives; + tok.positives = positives; + tok.result = siftPatterns(negatives, positives, options); + + if (options.capture && (positives.length + negatives.length) > 1) { + tok.result = '(' + tok.result + ')'; + } + + cache[key] = tok; + return tok.result; +} + +function siftPatterns(neg, pos, options) { + var onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; + var onlyPositive = filterPatterns(pos, neg, '', false, options) || []; + var intersected = filterPatterns(neg, pos, '-?', true, options) || []; + var subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join('|'); +} + +function splitToRanges(min, max) { + min = Number(min); + max = Number(max); + + var nines = 1; + var stops = [max]; + var stop = +countNines(min, nines); + + while (min <= stop && stop <= max) { + stops = push(stops, stop); + nines += 1; + stop = +countNines(min, nines); + } + + var zeros = 1; + stop = countZeros(max + 1, zeros) - 1; + + while (min < stop && stop <= max) { + stops = push(stops, stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + + stops.sort(compare); + return stops; +} + +/** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + +function rangeToPattern(start, stop, options) { + if (start === stop) { + return {pattern: String(start), digits: []}; + } + + var zipped = zip(String(start), String(stop)); + var len = zipped.length, i = -1; + + var pattern = ''; + var digits = 0; + + while (++i < len) { + var numbers = zipped[i]; + var startDigit = numbers[0]; + var stopDigit = numbers[1]; + + if (startDigit === stopDigit) { + pattern += startDigit; + + } else if (startDigit !== '0' || stopDigit !== '9') { + pattern += toCharacterClass(startDigit, stopDigit); + + } else { + digits += 1; + } + } + + if (digits) { + pattern += options.shorthand ? '\\d' : '[0-9]'; + } + + return { pattern: pattern, digits: [digits] }; +} + +function splitToPatterns(min, max, tok, options) { + var ranges = splitToRanges(min, max); + var len = ranges.length; + var idx = -1; + + var tokens = []; + var start = min; + var prev; + + while (++idx < len) { + var range = ranges[idx]; + var obj = rangeToPattern(start, range, options); + var zeros = ''; + + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.digits.length > 1) { + prev.digits.pop(); + } + prev.digits.push(obj.digits[0]); + prev.string = prev.pattern + toQuantifier(prev.digits); + start = range + 1; + continue; + } + + if (tok.isPadded) { + zeros = padZeros(range, tok); + } + + obj.string = zeros + obj.pattern + toQuantifier(obj.digits); + tokens.push(obj); + start = range + 1; + prev = obj; + } + + return tokens; +} + +function filterPatterns(arr, comparison, prefix, intersection, options) { + var res = []; + + for (var i = 0; i < arr.length; i++) { + var tok = arr[i]; + var ele = tok.string; + + if (options.relaxZeros !== false) { + if (prefix === '-' && ele.charAt(0) === '0') { + if (ele.charAt(1) === '{') { + ele = '0*' + ele.replace(/^0\{\d+\}/, ''); + } else { + ele = '0*' + ele.slice(1); + } + } + } + + if (!intersection && !contains(comparison, 'string', ele)) { + res.push(prefix + ele); + } + + if (intersection && contains(comparison, 'string', ele)) { + res.push(prefix + ele); + } + } + return res; +} + +/** + * Zip strings (`for in` can be used on string characters) + */ + +function zip(a, b) { + var arr = []; + for (var ch in a) arr.push([a[ch], b[ch]]); + return arr; +} + +function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; +} + +function push(arr, ele) { + if (arr.indexOf(ele) === -1) arr.push(ele); + return arr; +} + +function contains(arr, key, val) { + for (var i = 0; i < arr.length; i++) { + if (arr[i][key] === val) { + return true; + } + } + return false; +} + +function countNines(min, len) { + return String(min).slice(0, -len) + repeat('9', len); +} + +function countZeros(integer, zeros) { + return integer - (integer % Math.pow(10, zeros)); +} + +function toQuantifier(digits) { + var start = digits[0]; + var stop = digits[1] ? (',' + digits[1]) : ''; + if (!stop && (!start || start === 1)) { + return ''; + } + return '{' + start + stop + '}'; +} + +function toCharacterClass(a, b) { + return '[' + a + ((b - a === 1) ? '' : '-') + b + ']'; +} + +function padding(str) { + return /^-?(0+)\d/.exec(str); +} + +function padZeros(val, tok) { + if (tok.isPadded) { + var diff = Math.abs(tok.maxLen - String(val).length); + switch (diff) { + case 0: + return ''; + case 1: + return '0'; + default: { + return '0{' + diff + '}'; + } + } + } + return val; +} + +/** + * Expose `toRegexRange` + */ + +module.exports = toRegexRange; diff --git a/node_modules/to-regex-range/package.json b/node_modules/to-regex-range/package.json new file mode 100644 index 0000000..3f73f58 --- /dev/null +++ b/node_modules/to-regex-range/package.json @@ -0,0 +1,117 @@ +{ + "_from": "to-regex-range@^2.1.0", + "_id": "to-regex-range@2.1.1", + "_inBundle": false, + "_integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "_location": "/to-regex-range", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "to-regex-range@^2.1.0", + "name": "to-regex-range", + "escapedName": "to-regex-range", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "_shasum": "7c80c17b9dfebe599e27367e0d4dd5590141db38", + "_spec": "to-regex-range@^2.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/micromatch/to-regex-range/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "deprecated": false, + "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", + "devDependencies": { + "fill-range": "^3.1.1", + "gulp-format-md": "^0.1.12", + "mocha": "^3.2.0", + "text-table": "^0.2.0", + "time-diff": "^0.3.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/micromatch/to-regex-range", + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "date", + "expand", + "expansion", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sequence", + "sh", + "to", + "year" + ], + "license": "MIT", + "main": "index.js", + "name": "to-regex-range", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/to-regex-range.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "expand-range", + "fill-range", + "micromatch", + "repeat-element", + "repeat-string" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "helpers": [ + "./examples.js" + ], + "reflinks": [ + "0-5", + "0-9", + "1-5", + "1-9" + ] + }, + "version": "2.1.1" +} diff --git a/node_modules/to-regex/LICENSE b/node_modules/to-regex/LICENSE new file mode 100644 index 0000000..7c9987b --- /dev/null +++ b/node_modules/to-regex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2018, Jon Schlinkert. + +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/node_modules/to-regex/README.md b/node_modules/to-regex/README.md new file mode 100644 index 0000000..5a28fc3 --- /dev/null +++ b/node_modules/to-regex/README.md @@ -0,0 +1,205 @@ +# to-regex [![NPM version](https://img.shields.io/npm/v/to-regex.svg?style=flat)](https://www.npmjs.com/package/to-regex) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex.svg?style=flat)](https://npmjs.org/package/to-regex) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex.svg?style=flat)](https://npmjs.org/package/to-regex) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/to-regex.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/to-regex) + +> Generate a regex from a string or array of strings. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +- [Install](#install) +- [Usage](#usage) +- [Options](#options) + * [options.contains](#optionscontains) + * [options.negate](#optionsnegate) + * [options.nocase](#optionsnocase) + * [options.flags](#optionsflags) + * [options.cache](#optionscache) + * [options.safe](#optionssafe) +- [About](#about) + * [Related projects](#related-projects) + * [Author](#author) + * [License](#license) + +_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save to-regex +``` + +## Usage + +```js +var toRegex = require('to-regex'); + +console.log(toRegex('foo')); +//=> /^(?:foo)$/ + +console.log(toRegex('foo', {negate: true})); +//=> /^(?:(?:(?!^(?:foo)$).)*)$/ + +console.log(toRegex('foo', {contains: true})); +//=> /(?:foo)/ + +console.log(toRegex(['foo', 'bar'], {negate: true})); +//=> /^(?:(?:(?!^(?:(?:foo)|(?:bar))$).)*)$/ + +console.log(toRegex(['foo', 'bar'], {negate: true, contains: true})); +//=> /^(?:(?:(?!(?:(?:foo)|(?:bar))).)*)$/ +``` + +## Options + +### options.contains + +**Type**: `Boolean` + +**Default**: `undefined` + +Generate a regex that will match any string that _contains_ the given pattern. By default, regex is strict will only return true for exact matches. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {contains: true})); +//=> /(?:foo)/ +``` + +### options.negate + +**Type**: `Boolean` + +**Default**: `undefined` + +Create a regex that will match everything except the given pattern. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {negate: true})); +//=> /^(?:(?:(?!^(?:foo)$).)*)$/ +``` + +### options.nocase + +**Type**: `Boolean` + +**Default**: `undefined` + +Adds the `i` flag, to enable case-insensitive matching. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {nocase: true})); +//=> /^(?:foo)$/i +``` + +Alternatively you can pass the flags you want directly on [options.flags](#options.flags). + +### options.flags + +**Type**: `String` + +**Default**: `undefined` + +Define the flags you want to use on the generated regex. + +```js +var toRegex = require('to-regex'); +console.log(toRegex('foo', {flags: 'gm'})); +//=> /^(?:foo)$/gm +console.log(toRegex('foo', {flags: 'gmi', nocase: true})); //<= handles redundancy +//=> /^(?:foo)$/gmi +``` + +### options.cache + +**Type**: `Boolean` + +**Default**: `true` + +Generated regex is cached based on the provided string and options. As a result, runtime compilation only happens once per pattern (as long as options are also the same), which can result in dramatic speed improvements. + +This also helps with debugging, since adding options and pattern are added to the generated regex. + +**Disable caching** + +```js +toRegex('foo', {cache: false}); +``` + +### options.safe + +**Type**: `Boolean` + +**Default**: `undefined` + +Check the generated regular expression with [safe-regex](https://github.com/substack/safe-regex) and throw an error if the regex is potentially unsafe. + +**Examples** + +```js +console.log(toRegex('(x+x+)+y')); +//=> /^(?:(x+x+)+y)$/ + +// The following would throw an error +toRegex('(x+x+)+y', {safe: true}); +``` + +## About + +
    +Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
    + +
    +Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
    + +
    +Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
    + +### Related projects + +You might also be interested in these projects: + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [path-regex](https://www.npmjs.com/package/path-regex): Regular expression for matching the parts of a file path. | [homepage](https://github.com/regexps/path-regex "Regular expression for matching the parts of a file path.") +* [to-regex-range](https://www.npmjs.com/package/to-regex-range): Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than… [more](https://github.com/micromatch/to-regex-range) | [homepage](https://github.com/micromatch/to-regex-range "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.") + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 24, 2018._ \ No newline at end of file diff --git a/node_modules/to-regex/index.js b/node_modules/to-regex/index.js new file mode 100644 index 0000000..a87d015 --- /dev/null +++ b/node_modules/to-regex/index.js @@ -0,0 +1,155 @@ +'use strict'; + +var safe = require('safe-regex'); +var define = require('define-property'); +var extend = require('extend-shallow'); +var not = require('regex-not'); +var MAX_LENGTH = 1024 * 64; + +/** + * Session cache + */ + +var cache = {}; + +/** + * Create a regular expression from the given `pattern` string. + * + * @param {String|RegExp} `pattern` Pattern can be a string or regular expression. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +module.exports = function(patterns, options) { + if (!Array.isArray(patterns)) { + return makeRe(patterns, options); + } + return makeRe(patterns.join('|'), options); +}; + +/** + * Create a regular expression from the given `pattern` string. + * + * @param {String|RegExp} `pattern` Pattern can be a string or regular expression. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +function makeRe(pattern, options) { + if (pattern instanceof RegExp) { + return pattern; + } + + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + if (pattern.length > MAX_LENGTH) { + throw new Error('expected pattern to be less than ' + MAX_LENGTH + ' characters'); + } + + var key = pattern; + // do this before shallow cloning options, it's a lot faster + if (!options || (options && options.cache !== false)) { + key = createKey(pattern, options); + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + } + + var opts = extend({}, options); + if (opts.contains === true) { + if (opts.negate === true) { + opts.strictNegate = false; + } else { + opts.strict = false; + } + } + + if (opts.strict === false) { + opts.strictOpen = false; + opts.strictClose = false; + } + + var open = opts.strictOpen !== false ? '^' : ''; + var close = opts.strictClose !== false ? '$' : ''; + var flags = opts.flags || ''; + var regex; + + if (opts.nocase === true && !/i/.test(flags)) { + flags += 'i'; + } + + try { + if (opts.negate || typeof opts.strictNegate === 'boolean') { + pattern = not.create(pattern, opts); + } + + var str = open + '(?:' + pattern + ')' + close; + regex = new RegExp(str, flags); + + if (opts.safe === true && safe(regex) === false) { + throw new Error('potentially unsafe regular expression: ' + regex.source); + } + + } catch (err) { + if (opts.strictErrors === true || opts.safe === true) { + err.key = key; + err.pattern = pattern; + err.originalOptions = options; + err.createdOptions = opts; + throw err; + } + + try { + regex = new RegExp('^' + pattern.replace(/(\W)/g, '\\$1') + '$'); + } catch (err) { + regex = /.^/; //<= match nothing + } + } + + if (opts.cache !== false) { + memoize(regex, key, pattern, opts); + } + return regex; +} + +/** + * Memoize generated regex. This can result in dramatic speed improvements + * and simplify debugging by adding options and pattern to the regex. It can be + * disabled by passing setting `options.cache` to false. + */ + +function memoize(regex, key, pattern, options) { + define(regex, 'cached', true); + define(regex, 'pattern', pattern); + define(regex, 'options', options); + define(regex, 'key', key); + cache[key] = regex; +} + +/** + * Create the key to use for memoization. The key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +function createKey(pattern, options) { + if (!options) return pattern; + var key = pattern; + for (var prop in options) { + if (options.hasOwnProperty(prop)) { + key += ';' + prop + '=' + String(options[prop]); + } + } + return key; +} + +/** + * Expose `makeRe` + */ + +module.exports.makeRe = makeRe; diff --git a/node_modules/to-regex/package.json b/node_modules/to-regex/package.json new file mode 100644 index 0000000..ca07164 --- /dev/null +++ b/node_modules/to-regex/package.json @@ -0,0 +1,97 @@ +{ + "_from": "to-regex@^3.0.1", + "_id": "to-regex@3.0.2", + "_inBundle": false, + "_integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "_location": "/to-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "to-regex@^3.0.1", + "name": "to-regex", + "escapedName": "to-regex", + "rawSpec": "^3.0.1", + "saveSpec": null, + "fetchSpec": "^3.0.1" + }, + "_requiredBy": [ + "/braces", + "/expand-brackets", + "/extglob", + "/micromatch", + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "_shasum": "13cfdd9b336552f30b51f33a8ae1b42a7a7599ce", + "_spec": "to-regex@^3.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/to-regex/issues" + }, + "bundleDependencies": false, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "deprecated": false, + "description": "Generate a regex from a string or array of strings.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/to-regex", + "keywords": [ + "match", + "regex", + "regular expression", + "test", + "to" + ], + "license": "MIT", + "main": "index.js", + "name": "to-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/to-regex.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": { + "method": "preWrite" + }, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "path-regex", + "to-regex-range" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "3.0.2" +} diff --git a/node_modules/toposort-class/.eslintrc b/node_modules/toposort-class/.eslintrc new file mode 100644 index 0000000..e36568a --- /dev/null +++ b/node_modules/toposort-class/.eslintrc @@ -0,0 +1,35 @@ +{ + "parser": "babel-eslint", + "env": { + "node": true, + "mocha": true, + "browser": true + }, + "rules": { + "strict": 0, //taken care of automatically by babel + "no-mixed-spaces-and-tabs": 2, + "eqeqeq": 2, + "no-eq-null": 2, + "consistent-this": 2, + "guard-for-in": 2, + "no-caller": 2, + "no-underscore-dangle": 2, + "curly": 2, + "no-multi-spaces": 2, + "key-spacing": 0, + "no-return-assign": 2, + "consistent-return": 2, + "no-shadow": 2, + "comma-dangle": 2, + "no-use-before-define": 2, + "no-empty": 2, + "new-parens": 2, + "no-cond-assign": 2, + "no-fallthrough": 2, + "new-cap": 2, + "no-loop-func": 2, + "no-unreachable": 2, + "no-process-exit": 2, + "quotes": [2, "double", "avoid-escape"] + } +} diff --git a/node_modules/toposort-class/.gitattributes b/node_modules/toposort-class/.gitattributes new file mode 100644 index 0000000..44b4224 --- /dev/null +++ b/node_modules/toposort-class/.gitattributes @@ -0,0 +1 @@ +* eol=lf \ No newline at end of file diff --git a/node_modules/toposort-class/.npmignore b/node_modules/toposort-class/.npmignore new file mode 100644 index 0000000..e64c184 --- /dev/null +++ b/node_modules/toposort-class/.npmignore @@ -0,0 +1,44 @@ +# Development stuff +test/ +Gruntfile.js + +# Configuration files +.jscsrc +.jshintrc +.travis.yml +bower.json + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Deployed apps should consider commenting this line out: +# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git +node_modules + +# JetBrains exclusion +.idea + +# Source files +src + +# example files +examples diff --git a/node_modules/toposort-class/LICENSE b/node_modules/toposort-class/LICENSE new file mode 100644 index 0000000..aa93e0f --- /dev/null +++ b/node_modules/toposort-class/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Gustavo Henke and Aaron Trent + +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/node_modules/toposort-class/README.md b/node_modules/toposort-class/README.md new file mode 100644 index 0000000..427691a --- /dev/null +++ b/node_modules/toposort-class/README.md @@ -0,0 +1,93 @@ +# Toposort +[![Build Status](http://img.shields.io/travis/gustavohenke/toposort.svg?branch=master&style=flat)](https://travis-ci.org/gustavohenke/toposort) +[![Dependency Status](http://img.shields.io/gemnasium/gustavohenke/toposort.png?style=flat)](https://gemnasium.com/gustavohenke/toposort) + +__Sorting directed acyclic graphs, for Node.js, io.js and the browser__ +_This was originally done by Marcel Klehr. [Why not checkout his original repo?](https://github.com/marcelklehr/toposort)_ + +## Installation +There are a few ways for installing Toposort. Here are them: + +* Via NPM: `npm install toposort-class` +* Via Bower: `bower install toposort` +* Via Git: `git clone git://github.com/gustavohenke/toposort.git` +* [Direct download](https://raw.githubusercontent.com/gustavohenke/toposort/master/build/toposort.js) ([Minified](https://raw.githubusercontent.com/gustavohenke/toposort/master/build/toposort.min.js)) for use in the browser + +## Example +Let's say you have the following dependency graph: + +* Plugin depends on Backbone and jQuery UI Button; +* Backbone depends on jQuery and Underscore; +* jQuery UI Button depends on jQuery UI Core and jQuery UI Widget; +* jQuery UI Widget and jQuery UI Core depend on jQuery; +* jQuery and Underscore don't depend on anyone. + +Now, how would you sort this in a way that each asset will be correctly placed? You'll probably need the following sorting: + +* `jQuery`, `jQuery UI Core`, `jQuery UI Widget`, `jQuery UI Button`, `Underscore`, `Backbone`, `Plugin` + +You can achieve it with the following code, using `toposort-class`: +```javascript +var Toposort = require('toposort-class'), + t = new Toposort(); + +t.add("jquery-ui-core", "jquery") + .add("jquery-ui-widget", "jquery") + .add("jquery-ui-button", ["jquery-ui-core", "jquery-ui-widget"]) + .add("plugin", ["backbone", "jquery-ui-button"]) + .add("backbone", ["underscore", "jquery"]); + +console.log(t.sort().reverse()); + +/* Will output: + * ['jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-button', 'underscore', 'backbone', 'plugin'] + * + * And you're done. + */ +``` + +## Usage +CommonJS (Node.js and io.js): +```javascript +var Toposort = require('toposort-class'), + t = new Toposort(); +``` + +Browser with AMD: +```javascript +define("myModule", ["Toposort"], function(Toposort) { + var t = new Toposort(); +}); +``` + +Browser without AMD: +```javascript +var t = new window.Toposort(); +``` + +or whatever global object there is instead of `window`. + +## API + +#### `.add(item, deps)` +* _{String}_ `item` - The name of the dependent item that is being added +* _{Array|String}_ `deps` - A dependency or list of dependencies of `item` + +__Returns:__ _{Toposort}_ The Toposort instance, for chaining. + +#### `.sort()` +__Returns:__ _{Array}_ The list of dependencies topologically sorted. + +This method will check for cyclic dependencies, like "A is dependent of A". + +#### `.clear()` +__Returns:__ _{Toposort}_ The Toposort instance, for chaining. + +Clears all edges, effectively resetting the instance. + +#### `.Toposort` + +Reference to the Toposort constructor. + +## Legal +MIT License diff --git a/node_modules/toposort-class/benchmark/0.3.1/toposort.js b/node_modules/toposort-class/benchmark/0.3.1/toposort.js new file mode 100644 index 0000000..92fcb65 --- /dev/null +++ b/node_modules/toposort-class/benchmark/0.3.1/toposort.js @@ -0,0 +1,128 @@ +!function() { + "use strict"; + + /** + * Topological sort class. + * Original by Marcel Klehr, contributed by Gustavo Henke. + * + * @class + * @since 0.1.0 + * @see https://github.com/marcelklehr/toposort + * @author Marcel Klehr + * + * @see https://github.com/gustavohenke/toposort + * @author Gustavo Henke + */ + function Toposort() { + var self = this; + var edges = []; + + /** + * Adds dependency edges. + * + * @since 0.1.0 + * @param {String} item An dependent name. Must be an string and not empty + * @param {String[]|String} [deps] An dependency or array of dependencies + * @returns {Toposort} The Toposort instance + */ + self.add = function( item, deps ) { + if( typeof item !== "string" || !item ) { + throw new TypeError( "Dependent name must be given as a not empty string" ); + } + + deps = Array.isArray( deps ) ? deps.slice() : [deps]; + if( deps.length ) { + deps.forEach( function( dep ) { + if( typeof dep !== "string" || !dep ) { + throw new TypeError( + "Dependency name must be given as a not empty string" + ); + } + + edges.push( [item, dep] ); + } ); + } else { + edges.push( [item] ); + } + + return self; + }; + + /** + * Runs the toposorting and return an ordered array of strings + * + * @since 0.1.0 + * @returns {String[]} The list of items topologically sorted. + */ + self.sort = function() { + var nodes = []; + var sorted = []; + + edges.forEach( function( edge ) { + edge.forEach( function( n ) { + if( nodes.indexOf( n ) === -1 ) { + nodes.push( n ); + } + } ); + } ); + + function visit( node, predecessors, i ) { + var index, predsCopy; + predecessors = predecessors || []; + + if( predecessors.indexOf( node ) > -1 ) { + throw new Error( + "Cyclic dependency found. '" + node + "' is dependent of itself.\n" + + "Dependency Chain: " + predecessors.join( " -> " ) + " => " + node + ); + } + + index = nodes.indexOf( node ); + if( index === -1 ) { + return i; + } + + nodes.splice( index, 1 ); + if( predecessors.length === 0 ) { + i--; + } + + predsCopy = predecessors.slice(); + predsCopy.push( node ); + + edges.filter( function( e ) { + return e[0] === node; + } ).forEach( function( e ) { + i = visit( e[1], predsCopy, i ); + } ); + + sorted.unshift( node ); + return i; + } + + for( var i = 0; i < nodes.length; i++ ) { + i = visit( nodes[i], null, i ); + } + + return sorted; + }; + + } + + if( typeof module === "object" && module && typeof module.exports === "object" ) { + // Expose toposort to CommonJS loaders (aka Node) + module.exports = exports.Toposort = Toposort; + } else { + // Expose toposort to AMD loaders (aka Require.js) + if( typeof define === "function" && define.amd ) { + define( function() { + return Toposort; + } ); + } + + // Expose toposort as a browser global + if( typeof window === "object" ) { + window.Toposort = Toposort; + } + } +}(); diff --git a/node_modules/toposort-class/benchmark/README.md b/node_modules/toposort-class/benchmark/README.md new file mode 100644 index 0000000..362f630 --- /dev/null +++ b/node_modules/toposort-class/benchmark/README.md @@ -0,0 +1,11 @@ +Benchmarks +========== + +Since I'm obsessed with performance, here is a tiny benchmark comparing the performance of the 0.3.1 version and the current version written in ES6 + +| Description | Library | Op/s | % | +|------------------------------|-----------------|-----------:|-----:| +| simple dependency chains | 0.3.1 version | 66,722.22 | 8% | +| | current version | 837,416.60 | 100% | +| slightly more complex chains | 0.3.1 version | 24,530.85 | 6% | +| | current version | 386,620.50 | 100% | diff --git a/node_modules/toposort-class/benchmark/general.js b/node_modules/toposort-class/benchmark/general.js new file mode 100644 index 0000000..fc99c83 --- /dev/null +++ b/node_modules/toposort-class/benchmark/general.js @@ -0,0 +1,56 @@ +var Toposort = require( "../index.js" ); +var OldToposort = require( "./0.3.1/toposort.js" ); + +suite( "simple dependency chains", function() { + set( "delay", 0 ); + set( "mintime", 1750 ); + + bench( "0.3.1 version", function() { + var t = new OldToposort(); + + t.add( "3", "2" ) + .add( "2", "1" ) + .add( "6", "5" ) + .add( "5", ["2", "4"] ).sort(); + } ); + + bench( "current version", function() { + var t = new Toposort(); + + t.add( "3", "2" ) + .add( "2", "1" ) + .add( "6", "5" ) + .add( "5", ["2", "4"] ).sort(); + } ); +} ); + +suite( "slightly more complex chains", function() { + set( "delay", 0 ); + set( "mintime", 1750 ); + + bench( "0.3.1 version", function() { + var t = new OldToposort(); + + t.add( "3", "1" ) + .add( "2", "3" ) + .add( "4", ["2", "3"] ) + .add( "5", ["3", "4"] ) + .add( "6", ["3", "4", "5"] ) + .add( "7", "1" ) + .add( "8", ["1", "2", "3", "4", "5"] ) + .add( "9", ["8", "6", "7"] ).sort(); + } ); + + bench( "current version", function() { + var t = new Toposort(); + + t.add( "3", "1" ) + .add( "2", "3" ) + .add( "4", ["2", "3"] ) + .add( "5", ["3", "4"] ) + .add( "6", ["3", "4", "5"] ) + .add( "7", "1" ) + .add( "8", ["1", "2", "3", "4", "5"] ) + .add( "9", ["8", "6", "7"] ).sort(); + } ); +} ); diff --git a/node_modules/toposort-class/benchmark/results.csv b/node_modules/toposort-class/benchmark/results.csv new file mode 100644 index 0000000..88f6e23 --- /dev/null +++ b/node_modules/toposort-class/benchmark/results.csv @@ -0,0 +1,4 @@ +2015-07-31 22:37:51,"simple dependency chains","0.3.1 version",2295.217390,153142 +2015-07-31 22:37:51,"simple dependency chains","current version",3299.024625,2762658 +2015-07-31 22:37:51,"slightly more complex chains","0.3.1 version",3313.337523,81279 +2015-07-31 22:37:51,"slightly more complex chains","current version",1797.512029,694955 diff --git a/node_modules/toposort-class/build/toposort.js b/node_modules/toposort-class/build/toposort.js new file mode 100644 index 0000000..616fee6 --- /dev/null +++ b/node_modules/toposort-class/build/toposort.js @@ -0,0 +1,281 @@ +/**** + * The MIT License (MIT) + * + * Copyright (c) 2015 Gustavo Henke and Aaron Trent + * + * 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. + * + ****/ +(function( global, factory ) { + if( typeof define === "function" && define.amd ) { + define( "Toposort", ["exports", "module"], factory ); + } else if( typeof exports !== "undefined" && typeof module !== "undefined" ) { + factory( exports, module ); + } else { + var mod = { + exports: {} + }; + factory( mod.exports, mod ); + global.Toposort = mod.exports; + } +})( this, function( exports, module ) { + "use strict"; + + function _classCallCheck( instance, Constructor ) { + if( !(instance instanceof Constructor) ) { + throw new TypeError( "Cannot call a class as a function" ); + } + } + + var Toposort = (function() { + function Toposort() { + _classCallCheck( this, Toposort ); + + this.edges = []; + this.Toposort = Toposort; + } + + /** + * Adds dependency edges. + * + * @since 0.1.0 + * @param {String} item An dependent name. Must be an string and not empty + * @param {String[]|String} [deps] An dependency or array of dependencies + * @returns {Toposort} The Toposort instance + */ + + Toposort.prototype.add = function add( item, deps ) { + if( typeof item !== "string" || !item ) { + throw new TypeError( "Dependent name must be given as a not empty string" ); + } + + deps = Array.isArray( deps ) ? deps : [deps]; + + if( deps.length > 0 ) { + for( var _iterator = deps, _isArray = Array.isArray( _iterator ), _i = 0, _iterator = _isArray ? + _iterator : + _iterator[Symbol.iterator](); ; ) { + var _ref; + + if( _isArray ) { + if( _i >= _iterator.length ) { + break; + } + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if( _i.done ) { + break; + } + _ref = _i.value; + } + + var dep = _ref; + + if( typeof dep !== "string" || !dep ) { + throw new TypeError( "Dependency name must be given as a not empty string" ); + } + + this.edges.push( [item, dep] ); + } + } else { + this.edges.push( [item] ); + } + + return this; + }; + + /** + * Runs the toposorting and return an ordered array of strings + * + * @since 0.1.0 + * @returns {String[]} The list of items topologically sorted. + */ + + Toposort.prototype.sort = function sort() { + var _this = this; + + var nodes = []; + + //accumulate unique nodes into a large list + for( var _iterator2 = this.edges, _isArray2 = Array.isArray( _iterator2 ), _i2 = 0, _iterator2 = _isArray2 ? + _iterator2 : + _iterator2[Symbol.iterator](); ; ) { + var _ref2; + + if( _isArray2 ) { + if( _i2 >= _iterator2.length ) { + break; + } + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if( _i2.done ) { + break; + } + _ref2 = _i2.value; + } + + var edge = _ref2; + + for( var _iterator3 = edge, _isArray3 = Array.isArray( _iterator3 ), _i3 = 0, _iterator3 = _isArray3 ? + _iterator3 : + _iterator3[Symbol.iterator](); ; ) { + var _ref3; + + if( _isArray3 ) { + if( _i3 >= _iterator3.length ) { + break; + } + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if( _i3.done ) { + break; + } + _ref3 = _i3.value; + } + + var node = _ref3; + + if( nodes.indexOf( node ) === -1 ) { + nodes.push( node ); + } + } + } + + //initialize the placement of nodes into the sorted array at the end + var place = nodes.length; + + //initialize the sorted array with the same length as the unique nodes array + var sorted = new Array( nodes.length ); + + //define a visitor function that recursively traverses dependencies. + var visit = function visit( node, predecessors ) { + //check if a node is dependent of itself + if( predecessors.length !== 0 && predecessors.indexOf( node ) !== -1 ) { + throw new Error( "Cyclic dependency found. " + node + " is dependent of itself.\nDependency chain: " + + predecessors.join( " -> " ) + " => " + node ); + } + + var index = nodes.indexOf( node ); + + //if the node still exists, traverse its dependencies + if( index !== -1 ) { + var copy = false; + + //mark the node as false to exclude it from future iterations + nodes[index] = false; + + //loop through all edges and follow dependencies of the current node + for( var _iterator4 = _this.edges, _isArray4 = Array.isArray( _iterator4 ), _i4 = 0, _iterator4 = _isArray4 ? + _iterator4 : + _iterator4[Symbol.iterator](); ; ) { + var _ref4; + + if( _isArray4 ) { + if( _i4 >= _iterator4.length ) { + break; + } + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if( _i4.done ) { + break; + } + _ref4 = _i4.value; + } + + var edge = _ref4; + + if( edge[0] === node ) { + //lazily create a copy of predecessors with the current node concatenated onto it + copy = copy || predecessors.concat( [node] ); + + //recurse to node dependencies + visit( edge[1], copy ); + } + } + + //add the node to the next place in the sorted array + sorted[--place] = node; + } + }; + + for( var i = 0; i < nodes.length; i++ ) { + var node = nodes[i]; + + //ignore nodes that have been excluded + if( node !== false ) { + //mark the node as false to exclude it from future iterations + nodes[i] = false; + + //loop through all edges and follow dependencies of the current node + for( var _iterator5 = this.edges, _isArray5 = Array.isArray( _iterator5 ), _i5 = 0, _iterator5 = _isArray5 ? + _iterator5 : + _iterator5[Symbol.iterator](); ; ) { + var _ref5; + + if( _isArray5 ) { + if( _i5 >= _iterator5.length ) { + break; + } + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if( _i5.done ) { + break; + } + _ref5 = _i5.value; + } + + var edge = _ref5; + + if( edge[0] === node ) { + //recurse to node dependencies + visit( edge[1], [node] ); + } + } + + //add the node to the next place in the sorted array + sorted[--place] = node; + } + } + + return sorted; + }; + + /** + * Clears edges + * + * @since 0.4.0 + * @returns {Toposort} The Toposort instance + */ + + Toposort.prototype.clear = function clear() { + this.edges = []; + + return this; + }; + + return Toposort; + })(); + + module.exports = Toposort; +} ); diff --git a/node_modules/toposort-class/build/toposort.min.js b/node_modules/toposort-class/build/toposort.min.js new file mode 100644 index 0000000..97e40f6 --- /dev/null +++ b/node_modules/toposort-class/build/toposort.min.js @@ -0,0 +1 @@ +!function(a,b){if("function"==typeof define&&define.amd)define("Toposort",["exports","module"],b);else if("undefined"!=typeof exports&&"undefined"!=typeof module)b(exports,module);else{var c={exports:{}};b(c.exports,c),a.Toposort=c.exports}}(this,function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d=function(){function a(){c(this,a),this.edges=[],this.Toposort=a}return a.prototype.add=function(a,b){if("string"!=typeof a||!a)throw new TypeError("Dependent name must be given as a not empty string");if(b=Array.isArray(b)?b:[b],b.length>0)for(var c=b,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if("string"!=typeof g||!g)throw new TypeError("Dependency name must be given as a not empty string");this.edges.push([a,g])}else this.edges.push([a]);return this},a.prototype.sort=function(){for(var a=this,b=[],c=this.edges,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}for(var g=f,h=g,i=Array.isArray(h),j=0,h=i?h:h[Symbol.iterator]();;){var k;if(i){if(j>=h.length)break;k=h[j++]}else{if(j=h.next(),j.done)break;k=j.value}var l=k;-1===b.indexOf(l)&&b.push(l)}}for(var m=b.length,n=new Array(b.length),o=function u(c,d){if(0!==d.length&&-1!==d.indexOf(c))throw new Error("Cyclic dependency found. "+c+" is dependent of itself.\nDependency chain: "+d.join(" -> ")+" => "+c);var e=b.indexOf(c);if(-1!==e){var f=!1;b[e]=!1;for(var g=a.edges,h=Array.isArray(g),i=0,g=h?g:g[Symbol.iterator]();;){var j;if(h){if(i>=g.length)break;j=g[i++]}else{if(i=g.next(),i.done)break;j=i.value}var k=j;k[0]===c&&(f=f||d.concat([c]),u(k[1],f))}n[--m]=c}},p=0;p=q.length)break;t=q[s++]}else{if(s=q.next(),s.done)break;t=s.value}var g=t;g[0]===l&&o(g[1],[l])}n[--m]=l}}return n},a.prototype.clear=function(){return this.edges=[],this},a}();b.exports=d}); \ No newline at end of file diff --git a/node_modules/toposort-class/index.js b/node_modules/toposort-class/index.js new file mode 100644 index 0000000..f7ff1f2 --- /dev/null +++ b/node_modules/toposort-class/index.js @@ -0,0 +1 @@ +module.exports = require( './build/toposort.js' ); diff --git a/node_modules/toposort-class/package.json b/node_modules/toposort-class/package.json new file mode 100644 index 0000000..2690f44 --- /dev/null +++ b/node_modules/toposort-class/package.json @@ -0,0 +1,73 @@ +{ + "_args": [ + [ + "toposort-class@1.0.1", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "toposort-class@1.0.1", + "_id": "toposort-class@1.0.1", + "_inBundle": false, + "_integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg=", + "_location": "/toposort-class", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "toposort-class@1.0.1", + "name": "toposort-class", + "escapedName": "toposort-class", + "rawSpec": "1.0.1", + "saveSpec": null, + "fetchSpec": "1.0.1" + }, + "_requiredBy": [ + "/sequelize" + ], + "_resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", + "_spec": "1.0.1", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "author": "", + "bugs": { + "url": "https://github.com/gustavohenke/toposort/issues" + }, + "description": "Topological sort of directed acyclic graphs (like dependecy lists)", + "devDependencies": { + "babel-eslint": "^4.0.5", + "eslint": "^1.0.0", + "grunt": "^0.4.5", + "grunt-babel": "^5.0.1", + "grunt-banner": "^0.4.0", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-uglify": "^0.9.1", + "matcha": "^0.6.0", + "mocha": "^2.2.5" + }, + "homepage": "https://github.com/gustavohenke/toposort#readme", + "keywords": [ + "topological", + "sort", + "sorting", + "graphs", + "graph", + "dependency", + "list", + "dependencies", + "acyclic", + "browser" + ], + "license": "MIT", + "main": "./index.js", + "name": "toposort-class", + "repository": { + "type": "git", + "url": "git+https://github.com/gustavohenke/toposort.git" + }, + "scripts": { + "benchmark": "matcha benchmark/general.js", + "benchmark-save": "matcha -R csv benchmark/general.js > benchmark/results.csv", + "eslint": "eslint src/toposort.js test/spec.js Gruntfile.js", + "test": "mocha -b test" + }, + "version": "1.0.1" +} diff --git a/node_modules/touch/LICENSE b/node_modules/touch/LICENSE new file mode 100644 index 0000000..05eeeb8 --- /dev/null +++ b/node_modules/touch/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/node_modules/touch/README.md b/node_modules/touch/README.md new file mode 100644 index 0000000..b5a361e --- /dev/null +++ b/node_modules/touch/README.md @@ -0,0 +1,52 @@ +# node-touch + +For all your node touching needs. + +## Installing + +```bash +npm install touch +``` + +## CLI Usage: + +See `man touch` + +This package exports a binary called `nodetouch` that works mostly +like the unix builtin `touch(1)`. + +## API Usage: + +```javascript +var touch = require("touch") +``` + +Gives you the following functions: + +* `touch(filename, options, cb)` +* `touch.sync(filename, options)` +* `touch.ftouch(fd, options, cb)` +* `touch.ftouchSync(fd, options)` + +All the `options` objects are optional. + +All the async functions return a Promise. If a callback function is +provided, then it's attached to the Promise. + +## Options + +* `force` like `touch -f` Boolean +* `time` like `touch -t ` Can be a Date object, or any parseable + Date string, or epoch ms number. +* `atime` like `touch -a` Can be either a Boolean, or a Date. +* `mtime` like `touch -m` Can be either a Boolean, or a Date. +* `ref` like `touch -r ` Must be path to a file. +* `nocreate` like `touch -c` Boolean + +If neither `atime` nor `mtime` are set, then both values are set. If +one of them is set, then the other is not. + +## cli + +This package creates a `nodetouch` command line executable that works +very much like the unix builtin `touch(1)` diff --git a/node_modules/touch/bin/nodetouch.js b/node_modules/touch/bin/nodetouch.js new file mode 100755 index 0000000..f78f082 --- /dev/null +++ b/node_modules/touch/bin/nodetouch.js @@ -0,0 +1,112 @@ +#!/usr/bin/env node +const touch = require("../index.js") + +const usage = code => { + console[code ? 'error' : 'log']( + 'usage:\n' + + 'touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...' + ) + process.exit(code) +} + +const singleFlags = { + a: 'atime', + m: 'mtime', + c: 'nocreate', + f: 'force' +} + +const singleOpts = { + r: 'ref', + t: 'time' +} + +const files = [] +const args = process.argv.slice(2) +const options = {} +for (let i = 0; i < args.length; i++) { + const arg = args[i] + if (!arg.match(/^-/)) { + files.push(arg) + continue + } + + // expand shorthands + if (arg.charAt(1) !== '-') { + const expand = [] + for (let f = 1; f < arg.length; f++) { + const fc = arg.charAt(f) + const sf = singleFlags[fc] + const so = singleOpts[fc] + if (sf) + expand.push('--' + sf) + else if (so) { + const soslice = arg.slice(f + 1) + const soval = soslice.charAt(0) === '=' ? soslice : '=' + soslice + expand.push('--' + so + soval) + f = arg.length + } else if (arg !== '-' + fc) + expand.push('-' + fc) + } + if (expand.length) { + args.splice.apply(args, [i, 1].concat(expand)) + i-- + continue + } + } + + const argsplit = arg.split('=') + const key = argsplit.shift().replace(/^\-\-/, '') + const val = argsplit.length ? argsplit.join('=') : null + + switch (key) { + case 'time': + const timestr = val || args[++i] + // [-t [[CC]YY]MMDDhhmm[.SS]] + const parsedtime = timestr.match( + /^(([0-9]{2})?([0-9]{2}))?([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})(\.([0-9]{2}))?$/ + ) + if (!parsedtime) { + console.error('touch: out of range or illegal ' + + 'time specification: ' + + '[[CC]YY]MMDDhhmm[.SS]') + process.exit(1) + } else { + const y = +parsedtime[1] + const year = parsedtime[2] ? y + : y <= 68 ? 2000 + y + : 1900 + y + + const MM = +parsedtime[4] - 1 + const dd = +parsedtime[5] + const hh = +parsedtime[6] + const mm = +parsedtime[7] + const ss = +parsedtime[8] + + options.time = new Date(Date.UTC(year, MM, dd, hh, mm, ss)) + } + continue + + case 'ref': + options.ref = val || args[++i] + continue + + case 'mtime': + case 'nocreate': + case 'atime': + case 'force': + options[key] = true + continue + + default: + console.error('touch: illegal option -- ' + arg) + usage(1) + } +} + +if (!files.length) + usage() + +process.exitCode = 0 +Promise.all(files.map(f => touch(f, options))) + .catch(er => process.exitCode = 1) diff --git a/node_modules/touch/index.js b/node_modules/touch/index.js new file mode 100644 index 0000000..f942e42 --- /dev/null +++ b/node_modules/touch/index.js @@ -0,0 +1,224 @@ +'use strict' + +const EE = require('events').EventEmitter +const cons = require('constants') +const fs = require('fs') + +module.exports = (f, options, cb) => { + if (typeof options === 'function') + cb = options, options = {} + + const p = new Promise((res, rej) => { + new Touch(validOpts(options, f, null)) + .on('done', res).on('error', rej) + }) + + return cb ? p.then(res => cb(null, res), cb) : p +} + +module.exports.sync = module.exports.touchSync = (f, options) => + (new TouchSync(validOpts(options, f, null)), undefined) + +module.exports.ftouch = (fd, options, cb) => { + if (typeof options === 'function') + cb = options, options = {} + + const p = new Promise((res, rej) => { + new Touch(validOpts(options, null, fd)) + .on('done', res).on('error', rej) + }) + + return cb ? p.then(res => cb(null, res), cb) : p +} + +module.exports.ftouchSync = (fd, opt) => + (new TouchSync(validOpts(opt, null, fd)), undefined) + +const validOpts = (options, path, fd) => { + options = Object.create(options || {}) + options.fd = fd + options.path = path + + // {mtime: true}, {ctime: true} + // If set to something else, then treat as epoch ms value + const now = parseInt(new Date(options.time || Date.now()).getTime() / 1000) + if (!options.atime && !options.mtime) + options.atime = options.mtime = now + else { + if (true === options.atime) + options.atime = now + + if (true === options.mtime) + options.mtime = now + } + + let oflags = 0 + if (!options.force) + oflags = oflags | cons.O_RDWR + + if (!options.nocreate) + oflags = oflags | cons.O_CREAT + + options.oflags = oflags + return options +} + +class Touch extends EE { + constructor (options) { + super(options) + this.fd = options.fd + this.path = options.path + this.atime = options.atime + this.mtime = options.mtime + this.ref = options.ref + this.nocreate = !!options.nocreate + this.force = !!options.force + this.closeAfter = options.closeAfter + this.oflags = options.oflags + this.options = options + + if (typeof this.fd !== 'number') { + this.closeAfter = true + this.open() + } else + this.onopen(null, this.fd) + } + + emit (ev, data) { + // we only emit when either done or erroring + // in both cases, need to close + this.close() + return super.emit(ev, data) + } + + close () { + if (typeof this.fd === 'number' && this.closeAfter) + fs.close(this.fd, () => {}) + } + + open () { + fs.open(this.path, this.oflags, (er, fd) => this.onopen(er, fd)) + } + + onopen (er, fd) { + if (er) { + if (er.code === 'EISDIR') + this.onopen(null, null) + else if (er.code === 'ENOENT' && this.nocreate) + this.emit('done') + else + this.emit('error', er) + } else { + this.fd = fd + if (this.ref) + this.statref() + else if (!this.atime || !this.mtime) + this.fstat() + else + this.futimes() + } + } + + statref () { + fs.stat(this.ref, (er, st) => { + if (er) + this.emit('error', er) + else + this.onstatref(st) + }) + } + + onstatref (st) { + this.atime = this.atime && parseInt(st.atime.getTime()/1000, 10) + this.mtime = this.mtime && parseInt(st.mtime.getTime()/1000, 10) + if (!this.atime || !this.mtime) + this.fstat() + else + this.futimes() + } + + fstat () { + const stat = this.fd ? 'fstat' : 'stat' + const target = this.fd || this.path + fs[stat](target, (er, st) => { + if (er) + this.emit('error', er) + else + this.onfstat(st) + }) + } + + onfstat (st) { + if (typeof this.atime !== 'number') + this.atime = parseInt(st.atime.getTime()/1000, 10) + + if (typeof this.mtime !== 'number') + this.mtime = parseInt(st.mtime.getTime()/1000, 10) + + this.futimes() + } + + futimes () { + const utimes = this.fd ? 'futimes' : 'utimes' + const target = this.fd || this.path + fs[utimes](target, ''+this.atime, ''+this.mtime, er => { + if (er) + this.emit('error', er) + else + this.emit('done') + }) + } +} + +class TouchSync extends Touch { + open () { + try { + this.onopen(null, fs.openSync(this.path, this.oflags)) + } catch (er) { + this.onopen(er) + } + } + + statref () { + let threw = true + try { + this.onstatref(fs.statSync(this.ref)) + threw = false + } finally { + if (threw) + this.close() + } + } + + fstat () { + let threw = true + const stat = this.fd ? 'fstatSync' : 'statSync' + const target = this.fd || this.path + try { + this.onfstat(fs[stat](target)) + threw = false + } finally { + if (threw) + this.close() + } + } + + futimes () { + let threw = true + const utimes = this.fd ? 'futimesSync' : 'utimesSync' + const target = this.fd || this.path + try { + fs[utimes](target, this.atime, this.mtime) + threw = false + } finally { + if (threw) + this.close() + } + this.emit('done') + } + + close () { + if (typeof this.fd === 'number' && this.closeAfter) + try { fs.closeSync(this.fd) } catch (er) {} + } +} diff --git a/node_modules/touch/package.json b/node_modules/touch/package.json new file mode 100644 index 0000000..f344f0e --- /dev/null +++ b/node_modules/touch/package.json @@ -0,0 +1,64 @@ +{ + "_from": "touch@^3.1.0", + "_id": "touch@3.1.0", + "_inBundle": false, + "_integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "_location": "/touch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "touch@^3.1.0", + "name": "touch", + "escapedName": "touch", + "rawSpec": "^3.1.0", + "saveSpec": null, + "fetchSpec": "^3.1.0" + }, + "_requiredBy": [ + "/nodemon" + ], + "_resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "_shasum": "fe365f5f75ec9ed4e56825e0bb76d24ab74af83b", + "_spec": "touch@^3.1.0", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4/node_modules/nodemon", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bin": { + "nodetouch": "./bin/nodetouch.js" + }, + "bugs": { + "url": "https://github.com/isaacs/node-touch/issues" + }, + "bundleDependencies": false, + "dependencies": { + "nopt": "~1.0.10" + }, + "deprecated": false, + "description": "like touch(1) in node", + "devDependencies": { + "mutate-fs": "^1.1.0", + "tap": "^10.7.0" + }, + "files": [ + "index.js", + "bin/nodetouch.js" + ], + "homepage": "https://github.com/isaacs/node-touch#readme", + "license": "ISC", + "name": "touch", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-touch.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100 -J" + }, + "version": "3.1.0" +} diff --git a/node_modules/type-is/HISTORY.md b/node_modules/type-is/HISTORY.md new file mode 100644 index 0000000..183290c --- /dev/null +++ b/node_modules/type-is/HISTORY.md @@ -0,0 +1,236 @@ +1.6.16 / 2018-02-16 +=================== + + * deps: mime-types@~2.1.18 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add extension `.mjs` to `application/javascript` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add glTF types and extensions + - Add new mime types + - Update extensions `.md` and `.markdown` to be `text/markdown` + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +1.6.15 / 2017-03-31 +=================== + + * deps: mime-types@~2.1.15 + - Add new mime types + +1.6.14 / 2016-11-18 +=================== + + * deps: mime-types@~2.1.13 + - Add new mime types + +1.6.13 / 2016-05-18 +=================== + + * deps: mime-types@~2.1.11 + - Add new mime types + +1.6.12 / 2016-02-28 +=================== + + * deps: mime-types@~2.1.10 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +1.6.11 / 2016-01-29 +=================== + + * deps: mime-types@~2.1.9 + - Add new mime types + +1.6.10 / 2015-12-01 +=================== + + * deps: mime-types@~2.1.8 + - Add new mime types + +1.6.9 / 2015-09-27 +================== + + * deps: mime-types@~2.1.7 + - Add new mime types + +1.6.8 / 2015-09-04 +================== + + * deps: mime-types@~2.1.6 + - Add new mime types + +1.6.7 / 2015-08-20 +================== + + * Fix type error when given invalid type to match against + * deps: mime-types@~2.1.5 + - Add new mime types + +1.6.6 / 2015-07-31 +================== + + * deps: mime-types@~2.1.4 + - Add new mime types + +1.6.5 / 2015-07-16 +================== + + * deps: mime-types@~2.1.3 + - Add new mime types + +1.6.4 / 2015-07-01 +================== + + * deps: mime-types@~2.1.2 + - Add new mime types + * perf: enable strict mode + * perf: remove argument reassignment + +1.6.3 / 2015-06-08 +================== + + * deps: mime-types@~2.1.1 + - Add new mime types + * perf: reduce try block size + * perf: remove bitwise operations + +1.6.2 / 2015-05-10 +================== + + * deps: mime-types@~2.0.11 + - Add new mime types + +1.6.1 / 2015-03-13 +================== + + * deps: mime-types@~2.0.10 + - Add new mime types + +1.6.0 / 2015-02-12 +================== + + * fix false-positives in `hasBody` `Transfer-Encoding` check + * support wildcard for both type and subtype (`*/*`) + +1.5.7 / 2015-02-09 +================== + + * fix argument reassignment + * deps: mime-types@~2.0.9 + - Add new mime types + +1.5.6 / 2015-01-29 +================== + + * deps: mime-types@~2.0.8 + - Add new mime types + +1.5.5 / 2014-12-30 +================== + + * deps: mime-types@~2.0.7 + - Add new mime types + - Fix missing extensions + - Fix various invalid MIME type entries + - Remove example template MIME types + - deps: mime-db@~1.5.0 + +1.5.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - Add new mime types + - deps: mime-db@~1.3.0 + +1.5.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - Add new mime types + - deps: mime-db@~1.2.0 + +1.5.2 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - Add new mime types + - deps: mime-db@~1.1.0 + +1.5.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + * deps: media-typer@0.3.0 + * deps: mime-types@~2.0.1 + - Support Node.js 0.6 + +1.5.0 / 2014-09-05 +================== + + * fix `hasbody` to be true for `content-length: 0` + +1.4.0 / 2014-09-02 +================== + + * update mime-types + +1.3.2 / 2014-06-24 +================== + + * use `~` range on mime-types + +1.3.1 / 2014-06-19 +================== + + * fix global variable leak + +1.3.0 / 2014-06-19 +================== + + * improve type parsing + + - invalid media type never matches + - media type not case-sensitive + - extra LWS does not affect results + +1.2.2 / 2014-06-19 +================== + + * fix behavior on unknown type argument + +1.2.1 / 2014-06-03 +================== + + * switch dependency from `mime` to `mime-types@1.0.0` + +1.2.0 / 2014-05-11 +================== + + * support suffix matching: + + - `+json` matches `application/vnd+json` + - `*/vnd+json` matches `application/vnd+json` + - `application/*+json` matches `application/vnd+json` + +1.1.0 / 2014-04-12 +================== + + * add non-array values support + * expose internal utilities: + + - `.is()` + - `.hasBody()` + - `.normalize()` + - `.match()` + +1.0.1 / 2014-03-30 +================== + + * add `multipart` as a shorthand diff --git a/node_modules/type-is/LICENSE b/node_modules/type-is/LICENSE new file mode 100644 index 0000000..386b7b6 --- /dev/null +++ b/node_modules/type-is/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2014-2015 Douglas Christopher Wilson + +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/node_modules/type-is/README.md b/node_modules/type-is/README.md new file mode 100644 index 0000000..70c47da --- /dev/null +++ b/node_modules/type-is/README.md @@ -0,0 +1,146 @@ +# type-is + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Infer the content-type of a request. + +### Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install type-is +``` + +## API + +```js +var http = require('http') +var typeis = require('type-is') + +http.createServer(function (req, res) { + var istext = typeis(req, ['text/*']) + res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text') +}) +``` + +### type = typeis(request, types) + +`request` is the node HTTP request. `types` is an array of types. + + + +```js +// req.headers.content-type = 'application/json' + +typeis(req, ['json']) // 'json' +typeis(req, ['html', 'json']) // 'json' +typeis(req, ['application/*']) // 'application/json' +typeis(req, ['application/json']) // 'application/json' + +typeis(req, ['html']) // false +``` + +### typeis.hasBody(request) + +Returns a Boolean if the given `request` has a body, regardless of the +`Content-Type` header. + +Having a body has no relation to how large the body is (it may be 0 bytes). +This is similar to how file existence works. If a body does exist, then this +indicates that there is data to read from the Node.js request stream. + + + +```js +if (typeis.hasBody(req)) { + // read the body, since there is one + + req.on('data', function (chunk) { + // ... + }) +} +``` + +### type = typeis.is(mediaType, types) + +`mediaType` is the [media type](https://tools.ietf.org/html/rfc6838) string. `types` is an array of types. + + + +```js +var mediaType = 'application/json' + +typeis.is(mediaType, ['json']) // 'json' +typeis.is(mediaType, ['html', 'json']) // 'json' +typeis.is(mediaType, ['application/*']) // 'application/json' +typeis.is(mediaType, ['application/json']) // 'application/json' + +typeis.is(mediaType, ['html']) // false +``` + +### Each type can be: + +- An extension name such as `json`. This name will be returned if matched. +- A mime type such as `application/json`. +- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`. The full mime type will be returned if matched. +- A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched. + +`false` will be returned if no type matches or the content type is invalid. + +`null` will be returned if the request does not have a body. + +## Examples + +### Example body parser + +```js +var express = require('express') +var typeis = require('type-is') + +var app = express() + +app.use(function bodyParser (req, res, next) { + if (!typeis.hasBody(req)) { + return next() + } + + switch (typeis(req, ['urlencoded', 'json', 'multipart'])) { + case 'urlencoded': + // parse urlencoded body + throw new Error('implement urlencoded body parsing') + case 'json': + // parse json body + throw new Error('implement json body parsing') + case 'multipart': + // parse multipart body + throw new Error('implement multipart body parsing') + default: + // 415 error code + res.statusCode = 415 + res.end() + break + } +}) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/type-is.svg +[npm-url]: https://npmjs.org/package/type-is +[node-version-image]: https://img.shields.io/node/v/type-is.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/type-is/master.svg +[travis-url]: https://travis-ci.org/jshttp/type-is +[coveralls-image]: https://img.shields.io/coveralls/jshttp/type-is/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master +[downloads-image]: https://img.shields.io/npm/dm/type-is.svg +[downloads-url]: https://npmjs.org/package/type-is diff --git a/node_modules/type-is/index.js b/node_modules/type-is/index.js new file mode 100644 index 0000000..4da7301 --- /dev/null +++ b/node_modules/type-is/index.js @@ -0,0 +1,262 @@ +/*! + * type-is + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var typer = require('media-typer') +var mime = require('mime-types') + +/** + * Module exports. + * @public + */ + +module.exports = typeofrequest +module.exports.is = typeis +module.exports.hasBody = hasbody +module.exports.normalize = normalize +module.exports.match = mimeMatch + +/** + * Compare a `value` content-type with `types`. + * Each `type` can be an extension like `html`, + * a special shortcut like `multipart` or `urlencoded`, + * or a mime type. + * + * If no types match, `false` is returned. + * Otherwise, the first `type` that matches is returned. + * + * @param {String} value + * @param {Array} types + * @public + */ + +function typeis (value, types_) { + var i + var types = types_ + + // remove parameters and normalize + var val = tryNormalizeType(value) + + // no type or invalid + if (!val) { + return false + } + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length - 1) + for (i = 0; i < types.length; i++) { + types[i] = arguments[i + 1] + } + } + + // no types, return the content type + if (!types || !types.length) { + return val + } + + var type + for (i = 0; i < types.length; i++) { + if (mimeMatch(normalize(type = types[i]), val)) { + return type[0] === '+' || type.indexOf('*') !== -1 + ? val + : type + } + } + + // no matches + return false +} + +/** + * Check if a request has a request body. + * A request with a body __must__ either have `transfer-encoding` + * or `content-length` headers set. + * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3 + * + * @param {Object} request + * @return {Boolean} + * @public + */ + +function hasbody (req) { + return req.headers['transfer-encoding'] !== undefined || + !isNaN(req.headers['content-length']) +} + +/** + * Check if the incoming request contains the "Content-Type" + * header field, and it contains any of the give mime `type`s. + * If there is no request body, `null` is returned. + * If there is no content type, `false` is returned. + * Otherwise, it returns the first `type` that matches. + * + * Examples: + * + * // With Content-Type: text/html; charset=utf-8 + * this.is('html'); // => 'html' + * this.is('text/html'); // => 'text/html' + * this.is('text/*', 'application/json'); // => 'text/html' + * + * // When Content-Type is application/json + * this.is('json', 'urlencoded'); // => 'json' + * this.is('application/json'); // => 'application/json' + * this.is('html', 'application/*'); // => 'application/json' + * + * this.is('html'); // => false + * + * @param {String|Array} types... + * @return {String|false|null} + * @public + */ + +function typeofrequest (req, types_) { + var types = types_ + + // no body + if (!hasbody(req)) { + return null + } + + // support flattened arguments + if (arguments.length > 2) { + types = new Array(arguments.length - 1) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i + 1] + } + } + + // request content type + var value = req.headers['content-type'] + + return typeis(value, types) +} + +/** + * Normalize a mime type. + * If it's a shorthand, expand it to a valid mime type. + * + * In general, you probably want: + * + * var type = is(req, ['urlencoded', 'json', 'multipart']); + * + * Then use the appropriate body parsers. + * These three are the most common request body types + * and are thus ensured to work. + * + * @param {String} type + * @private + */ + +function normalize (type) { + if (typeof type !== 'string') { + // invalid type + return false + } + + switch (type) { + case 'urlencoded': + return 'application/x-www-form-urlencoded' + case 'multipart': + return 'multipart/*' + } + + if (type[0] === '+') { + // "+json" -> "*/*+json" expando + return '*/*' + type + } + + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if `expected` mime type + * matches `actual` mime type with + * wildcard and +suffix support. + * + * @param {String} expected + * @param {String} actual + * @return {Boolean} + * @private + */ + +function mimeMatch (expected, actual) { + // invalid type + if (expected === false) { + return false + } + + // split types + var actualParts = actual.split('/') + var expectedParts = expected.split('/') + + // invalid format + if (actualParts.length !== 2 || expectedParts.length !== 2) { + return false + } + + // validate type + if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) { + return false + } + + // validate suffix wildcard + if (expectedParts[1].substr(0, 2) === '*+') { + return expectedParts[1].length <= actualParts[1].length + 1 && + expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length) + } + + // validate subtype + if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) { + return false + } + + return true +} + +/** + * Normalize a type and remove parameters. + * + * @param {string} value + * @return {string} + * @private + */ + +function normalizeType (value) { + // parse the type + var type = typer.parse(value) + + // remove the parameters + type.parameters = undefined + + // reformat it + return typer.format(type) +} + +/** + * Try to normalize a type and remove parameters. + * + * @param {string} value + * @return {string} + * @private + */ + +function tryNormalizeType (value) { + try { + return normalizeType(value) + } catch (err) { + return null + } +} diff --git a/node_modules/type-is/package.json b/node_modules/type-is/package.json new file mode 100644 index 0000000..d2b1f4f --- /dev/null +++ b/node_modules/type-is/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "type-is@1.6.16", + "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4" + ] + ], + "_from": "type-is@1.6.16", + "_id": "type-is@1.6.16", + "_inBundle": false, + "_integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "_location": "/type-is", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "type-is@1.6.16", + "name": "type-is", + "escapedName": "type-is", + "rawSpec": "1.6.16", + "saveSpec": null, + "fetchSpec": "1.6.16" + }, + "_requiredBy": [ + "/body-parser", + "/express" + ], + "_resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "_spec": "1.6.16", + "_where": "/home/agnynureza/Desktop/Hacktiv8/phase 1/batch16/week4/livecode4", + "bugs": { + "url": "https://github.com/jshttp/type-is/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + }, + "description": "Infer the content-type of a request.", + "devDependencies": { + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.8.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.2.1", + "eslint-plugin-promise": "3.6.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "homepage": "https://github.com/jshttp/type-is#readme", + "keywords": [ + "content", + "type", + "checking" + ], + "license": "MIT", + "name": "type-is", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/type-is.git" + }, + "scripts": { + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "version": "1.6.16" +} diff --git a/node_modules/umzug/.babelrc b/node_modules/umzug/.babelrc new file mode 100644 index 0000000..8cd4cb1 --- /dev/null +++ b/node_modules/umzug/.babelrc @@ -0,0 +1,15 @@ +{ + "presets": [ + ["env", { + "targets": { + "node": 4 + } + }] + ], + "plugins": [ + "transform-object-rest-spread", + "syntax-dynamic-import", + "dynamic-import-node", + "transform-runtime" + ] +} diff --git a/node_modules/umzug/.eslintrc.json b/node_modules/umzug/.eslintrc.json new file mode 100644 index 0000000..bb25dd9 --- /dev/null +++ b/node_modules/umzug/.eslintrc.json @@ -0,0 +1,28 @@ +{ + "extends": [ + "standard" + ], + "globals": { + "__dirname": true, + "process": true + }, + "rules": { + "no-var": "error", + "comma-dangle": [ + "error", + "always-multiline" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ], + "strict": [ + "error", + "never" + ] + } +} \ No newline at end of file diff --git a/node_modules/umzug/.idea/misc.xml b/node_modules/umzug/.idea/misc.xml new file mode 100644 index 0000000..7e5bdf8 --- /dev/null +++ b/node_modules/umzug/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/node_modules/umzug/.idea/modules.xml b/node_modules/umzug/.idea/modules.xml new file mode 100644 index 0000000..c9710bc --- /dev/null +++ b/node_modules/umzug/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/node_modules/umzug/.idea/vcs.xml b/node_modules/umzug/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/node_modules/umzug/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/node_modules/umzug/.idea/workspace.xml b/node_modules/umzug/.idea/workspace.xml new file mode 100644 index 0000000..2dc53cb --- /dev/null +++ b/node_modules/umzug/.idea/workspace.xml @@ -0,0 +1,1242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ify(fs.readdir)(this.option + SequelizeMeta + typesc + traverseDirectories + custom + require other file types, like Ty + Migration + return file instanceof Migrati + + + $PROJECT_DIR$/src + + + + + + + + + + + + + + true + + false + true + true + + + true + + + $PROJECT_DIR$/gulpfile.js + + + DEFINITION_ORDER + + + + + + + + + + + + + + + BashSupport + + + CSS + + + Code style issuesJava + + + Control FlowGroovy + + + Control flow issuesJava + + + Control flow issuesJavaScript + + + Data flow issuesGroovy + + + Data flow issuesJava + + + Data flow issuesJavaScript + + + Error handlingJava + + + Error handlingJavaScript + + + FlexUnit inspections + + + Flow type checkerJavaScript + + + Groovy + + + Guice Inspections + + + Java + + + Java 8Java language level migration aidsJava + + + Java language level migration aidsJava + + + JavaScript + + + Javadoc issuesJava + + + Kotlin + + + Logging issuesJava + + + Naming conventionsJava + + + Numeric issuesJava + + + Performance issuesJava + + + Potentially confusing code constructsGroovy + + + Potentially confusing code constructsJavaScript + + + Probable bugsCSS + + + Probable bugsJava + + + Probable bugsKotlin + + + Reflective access issuesJava + + + Security issuesJava + + + XPath + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs new file mode 100644 index 0000000..fabfa92 --- /dev/null +++ b/views/index.ejs @@ -0,0 +1,16 @@ + + + + + + + Express + + +
    +

    Welcome to Express Food Court

    +

    Menu

    +

    Restaurant

    +
    + + \ No newline at end of file diff --git a/views/menu.ejs b/views/menu.ejs new file mode 100644 index 0000000..c229641 --- /dev/null +++ b/views/menu.ejs @@ -0,0 +1,53 @@ + + + + + + + Document + + + + + + + + + + + + + <%menu.forEach(menu=>{%> + + + + + + + + + + <%})%> +
    IdNameMenu TypeRatingPriceRestaurant IdAction
    <%=menu.id%><%=menu.name%><%=menu.menu_type%><%=menu.rating%><%=helper(menu.price)%><%=menu.Restaurant.name%> + Edit || + Delete +
    +
    +
    + <%if(err !== null){%> +

    <%=err%>

    + <%}%> +
    + + + + + + +
    + + \ No newline at end of file diff --git a/views/restaurant.ejs b/views/restaurant.ejs new file mode 100644 index 0000000..4db329c --- /dev/null +++ b/views/restaurant.ejs @@ -0,0 +1,29 @@ + + + + + + + Document + + + + + + + + + + <%restaurant.forEach(data=>{%> + + + + + + + <%})%> +
    IdNameAddressAction
    <%=data.id%><%=data.name%><%=data.address%> + View +
    + + \ No newline at end of file diff --git a/views/view_menu.ejs b/views/view_menu.ejs new file mode 100644 index 0000000..1bd920a --- /dev/null +++ b/views/view_menu.ejs @@ -0,0 +1,36 @@ + + + + + + + Document + + +

    search by :

    + + + + + + + + + + <%restaurant.Menus.forEach(menu=>{%> + + + + + + + + <%})%> +
    IdNameMenu TypeRatingPrice
    <%=menu.id%><%=menu.name%><%=menu.menu_type%><%=menu.rating%><%=helper(menu.price)%>
    + + \ No newline at end of file